@refrakt-md/editor 0.32.0 → 0.34.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.
Files changed (46) hide show
  1. package/app/dist/assets/{index-MAa41Aoo.js → index-B9evDjiY.js} +1 -1
  2. package/app/dist/assets/{index-DC3NN32V.js → index-BEzsLLEi.js} +1 -1
  3. package/app/dist/assets/{index-B5EwV3L4.js → index-BRNcz3ZN.js} +1 -1
  4. package/app/dist/assets/{index-9FYuyjkb.js → index-BbKNPcZu.js} +1 -1
  5. package/app/dist/assets/{index-BYbu3e1g.js → index-BgoT2u0j.js} +1 -1
  6. package/app/dist/assets/{index-8OoX8730.js → index-BhvgBV4C.js} +1 -1
  7. package/app/dist/assets/{index-CokXa7Q0.js → index-C3621cGO.js} +1 -1
  8. package/app/dist/assets/{index-CTvbHdnl.js → index-C6O8opFI.js} +1 -1
  9. package/app/dist/assets/index-CCQ-z9aR.js +618 -0
  10. package/app/dist/assets/{index-BcuLfpXj.js → index-CGfziSaO.js} +1 -1
  11. package/app/dist/assets/{index-BGnYPYsz.js → index-CiVwGhFG.js} +1 -1
  12. package/app/dist/assets/{index-BX59bp8A.js → index-Cnibris1.js} +1 -1
  13. package/app/dist/assets/{index-C22IGCT5.js → index-DNGu9cr1.js} +1 -1
  14. package/app/dist/assets/{index-B_Cn-SCf.js → index-DcwpakCF.js} +1 -1
  15. package/app/dist/assets/{index-BtDnPCJm.js → index-DyjCpEtL.js} +1 -1
  16. package/app/dist/assets/{index-dOZj_cPm.js → index-MRvFn3Sl.js} +1 -1
  17. package/app/dist/assets/{index-CNFIYp8p.js → index-RTh1eW1u.js} +1 -1
  18. package/app/dist/assets/{index-B4gO_iPW.js → index-ojg7U5eP.js} +1 -1
  19. package/app/dist/assets/{index-Dy9gwdZ7.js → index-xzyBNgk5.js} +1 -1
  20. package/app/dist/index.html +1 -1
  21. package/app/src/lib/api/client.ts +6 -2
  22. package/app/src/lib/editor/attribute-completion.ts +5 -5
  23. package/app/src/lib/editor/block-parser.ts +91 -35
  24. package/app/src/lib/editor/content-model-resolver.ts +1 -1
  25. package/app/src/lib/editor/inline-markdown.ts +17 -15
  26. package/app/src/lib/editor/rune-palette.ts +3 -3
  27. package/app/src/lib/editor/section-mapper.ts +30 -24
  28. package/app/src/lib/preview/block-renderer.ts +17 -6
  29. package/app/src/lib/state/editor.svelte.ts +6 -2
  30. package/dist/community-tags-builder.d.ts.map +1 -1
  31. package/dist/community-tags-builder.js +4 -1
  32. package/dist/community-tags-builder.js.map +1 -1
  33. package/dist/layout-resolver.d.ts.map +1 -1
  34. package/dist/layout-resolver.js +30 -4
  35. package/dist/layout-resolver.js.map +1 -1
  36. package/dist/preview-builder.d.ts.map +1 -1
  37. package/dist/preview-builder.js +3 -1
  38. package/dist/preview-builder.js.map +1 -1
  39. package/dist/preview.d.ts.map +1 -1
  40. package/dist/preview.js +27 -3
  41. package/dist/preview.js.map +1 -1
  42. package/dist/server.d.ts.map +1 -1
  43. package/dist/server.js +26 -12
  44. package/dist/server.js.map +1 -1
  45. package/package.json +6 -6
  46. package/app/dist/assets/index-CzUb_76y.js +0 -618
@@ -0,0 +1,618 @@
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 n(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=n(i);fetch(i.href,s)}})();const im=!1;var $d=Array.isArray,rE=Array.prototype.indexOf,Xa=Array.prototype.includes,Qd=Array.from,iE=Object.defineProperty,La=Object.getOwnPropertyDescriptor,sE=Object.getOwnPropertyDescriptors,f_=Object.prototype,oE=Array.prototype,mv=Object.getPrototypeOf,qb=Object.isExtensible;const ss=()=>{};function aE(t){for(var e=0;e<t.length;e++)t[e]()}function d_(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}function Kc(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const Jn=2,Qf=4,Ld=8,h_=1<<24,Cs=16,$i=32,Jo=64,gv=128,si=512,Vn=1024,er=2048,Ti=4096,Vr=8192,Os=16384,vv=32768,Bo=65536,Rb=1<<17,p_=1<<18,pl=1<<19,lE=1<<20,ps=1<<25,jo=32768,sm=1<<21,Ov=1<<22,Vs=1<<23,qo=Symbol("$state"),cE=Symbol("legacy props"),uE=Symbol(""),ya=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function fE(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function dE(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function hE(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function pE(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function mE(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function gE(t){throw new Error("https://svelte.dev/e/effect_orphan")}function vE(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function OE(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function bE(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yE(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function wE(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function _E(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const kE=1,xE=2,m_=4,SE=8,AE=16,CE=1,TE=4,PE=8,EE=16,g_=1,$E=2,Un=Symbol(),QE="http://www.w3.org/1999/xhtml";function LE(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ME(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function v_(t){return t===this.v}function qE(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function O_(t){return!qE(t,this.v)}let RE=!1;const DE=[];function NE(t,e=!1,n=!1){return uf(t,new Map,"",DE,null,n)}function uf(t,e,n,r,i=null,s=!1){if(typeof t=="object"&&t!==null){var o=e.get(t);if(o!==void 0)return o;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if($d(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var l=0;l<t.length;l+=1){var c=t[l];l in t&&(a[l]=uf(c,e,n,r,null,s))}return a}if(mv(t)===f_){a={},e.set(t,a),i!==null&&e.set(i,a);for(var u in t)a[u]=uf(t[u],e,n,r,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return uf(t.toJSON(),e,n,r,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let Wr=null;function Va(t){Wr=t}function dt(t,e=!1,n){Wr={p:Wr,i:!1,c:null,e:null,s:t,x:null,l:null}}function ht(t){var e=Wr,n=e.e;if(n!==null){e.e=null;for(var r of n)D_(r)}return e.i=!0,Wr=e.p,{}}function b_(){return!0}let Ao=[];function y_(){var t=Ao;Ao=[],aE(t)}function Ui(t){if(Ao.length===0&&!rc){var e=Ao;queueMicrotask(()=>{e===Ao&&y_()})}Ao.push(t)}function IE(){for(;Ao.length>0;)y_()}function w_(t){var e=Ft;if(e===null)return Et.f|=Vs,t;if((e.f&vv)===0){if((e.f&gv)===0)throw t;e.b.error(t)}else Wa(t,e)}function Wa(t,e){for(;e!==null;){if((e.f&gv)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t}const BE=-7169;function Cn(t,e){t.f=t.f&BE|e}function bv(t){(t.f&si)!==0||t.deps===null?Cn(t,Vn):Cn(t,Ti)}function __(t){if(t!==null)for(const e of t)(e.f&Jn)===0||(e.f&jo)===0||(e.f^=jo,__(e.deps))}function k_(t,e,n){(t.f&er)!==0?e.add(t):(t.f&Ti)!==0&&n.add(t),__(t.deps),Cn(t,Vn)}const vu=new Set;let Rt=null,Lf=null,bi=null,_r=[],Md=null,om=!1,rc=!1;class Ws{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 n=this.#o.get(e);if(n){this.#o.delete(e);for(var r of n.d)Cn(r,er),_i(r);for(r of n.m)Cn(r,Ti),_i(r)}}process(e){_r=[],this.apply();var n=[],r=[];for(const i of e)this.#c(i,n,r);if(this.is_deferred()){this.#u(r),this.#u(n);for(const[i,s]of this.#o)C_(i,s)}else{for(const i of this.#e)i();this.#e.clear(),this.#t===0&&this.#f(),Lf=this,Rt=null,Db(r),Db(n),Lf=null,this.#a?.resolve()}bi=null}#c(e,n,r){e.f^=Vn;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&($i|Jo))!==0,l=a&&(o&Vn)!==0,c=l||(o&Vr)!==0||this.#o.has(i);if(!c&&i.fn!==null){a?i.f^=Vn:s!==null&&(o&(Qf|Ld|h_))!==0?s.b.defer_effect(i):(o&Qf)!==0?n.push(i):tu(i)&&((o&Cs)!==0&&this.#n.add(i),vc(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 n=0;n<e.length;n+=1)k_(e[n],this.#s,this.#n)}capture(e,n){n!==Un&&!this.previous.has(e)&&this.previous.set(e,n),(e.f&Vs)===0&&(this.current.set(e,e.v),bi?.set(e,e.v))}activate(){Rt=this,this.apply()}deactivate(){Rt===this&&(Rt=null,bi=null)}flush(){if(this.activate(),_r.length>0){if(x_(),Rt!==null&&Rt!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#r)e(this);this.#r.clear()}#f(){if(vu.size>1){this.previous.clear();var e=bi,n=!0;for(const i of vu){if(i===this){n=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(n&&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=_r;_r=[];const a=new Set,l=new Map;for(const c of s)S_(c,o,a,l);if(_r.length>0){Rt=i,i.apply();for(const c of _r)i.#c(c,[],[]);i.deactivate()}_r=r}}Rt=null,bi=e}this.committed=!0,vu.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,Ui(()=>{this.#l=!1,this.is_deferred()?_r.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#n.delete(e),Cn(e,er),_i(e);for(const e of this.#n)Cn(e,Ti),_i(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#r.add(e)}settled(){return(this.#a??=d_()).promise}static ensure(){if(Rt===null){const e=Rt=new Ws;vu.add(Rt),rc||Ui(()=>{Rt===e&&e.flush()})}return Rt}apply(){}}function jE(t){var e=rc;rc=!0;try{for(var n;;){if(IE(),_r.length===0&&(Rt?.flush(),_r.length===0))return Md=null,n;x_()}}finally{rc=e}}function x_(){om=!0;var t=null;try{for(var e=0;_r.length>0;){var n=Ws.ensure();if(e++>1e3){var r,i;zE()}n.process(_r),Ys.clear()}}finally{_r=[],om=!1,Md=null}}function zE(){try{vE()}catch(t){Wa(t,Md)}}let cs=null;function Db(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(Os|Vr))===0&&tu(r)&&(cs=new Set,vc(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?j_(r):r.fn=null),cs?.size>0)){Ys.clear();for(const i of cs){if((i.f&(Os|Vr))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)cs.has(o)&&(cs.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Os|Vr))===0&&vc(l)}}cs.clear()}}cs=null}}function S_(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&Jn)!==0?S_(i,e,n,r):(s&(Ov|Cs))!==0&&(s&er)===0&&A_(i,e,r)&&(Cn(i,er),_i(i))}}function A_(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(Xa.call(e,i))return!0;if((i.f&Jn)!==0&&A_(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function _i(t){for(var e=Md=t;e.parent!==null;){e=e.parent;var n=e.f;if(om&&e===Ft&&(n&Cs)!==0&&(n&p_)===0)return;if((n&(Jo|$i))!==0){if((n&Vn)===0)return;e.f^=Vn}}_r.push(e)}function C_(t,e){if(!((t.f&$i)!==0&&(t.f&Vn)!==0)){(t.f&er)!==0?e.d.push(t):(t.f&Ti)!==0&&e.m.push(t),Cn(t,Vn);for(var n=t.first;n!==null;)C_(n,e),n=n.next}}function ZE(t){let e=0,n=zo(0),r;return()=>{_v()&&(g(n),Nd(()=>(e===0&&(r=Er(()=>t(()=>ic(n)))),e+=1,()=>{Ui(()=>{e-=1,e===0&&(r?.(),r=void 0,ic(n))})})))}}var FE=Bo|pl|gv;function XE(t,e,n){new VE(t,e,n)}class VE{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=ZE(()=>(this.#d=zo(this.#u),()=>{this.#d=null}));constructor(e,n,r){this.#e=e,this.#t=n,this.#i=r,this.parent=Ft.b,this.is_pending=!!this.#t.pending,this.#a=eu(()=>{Ft.b=this;{var i=this.#b();try{this.#s=Jr(()=>r(i))}catch(s){this.error(s)}this.#f>0?this.#O():this.is_pending=!1}return()=>{this.#c?.remove()}},FE)}#_(){try{this.#s=Jr(()=>this.#i(this.#e))}catch(e){this.error(e)}}#k(){const e=this.#t.pending;e&&(this.#n=Jr(()=>e(this.#e)),Ui(()=>{var n=this.#b();this.#s=this.#v(()=>(Ws.ensure(),Jr(()=>this.#i(n)))),this.#f>0?this.#O():(Ro(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var e=this.#e;return this.is_pending&&(this.#c=bs(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){k_(e,this.#m,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#v(e){var n=Ft,r=Et,i=Wr;es(this.#a),ci(this.#a),Va(this.#a.ctx);try{return e()}catch(s){return w_(s),null}finally{es(n),ci(r),Va(i)}}#O(){const e=this.#t.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),F_(this.#s,this.#l)),this.#n===null&&(this.#n=Jr(()=>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 n of this.#m)Cn(n,er),_i(n);for(const n of this.#g)Cn(n,Ti),_i(n);this.#m.clear(),this.#g.clear(),this.#n&&Ro(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,Ui(()=>{this.#p=!1,this.#d&&Ya(this.#d,this.#u)}))}get_effect_pending(){return this.#w(),g(this.#d)}error(e){var n=this.#t.onerror;let r=this.#t.failed;if(this.#h||!n&&!r)throw e;this.#s&&(Pr(this.#s),this.#s=null),this.#n&&(Pr(this.#n),this.#n=null),this.#o&&(Pr(this.#o),this.#o=null);var i=!1,s=!1;const o=()=>{if(i){ME();return}i=!0,s&&_E(),Ws.ensure(),this.#u=0,this.#o!==null&&Ro(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#v(()=>(this.#h=!1,Jr(()=>this.#i(this.#e)))),this.#f>0?this.#O():this.is_pending=!1};Ui(()=>{try{s=!0,n?.(e,o),s=!1}catch(a){Wa(a,this.#a&&this.#a.parent)}r&&(this.#o=this.#v(()=>{Ws.ensure(),this.#h=!0;try{return Jr(()=>{r(this.#e,()=>e,()=>o)})}catch(a){return Wa(a,this.#a.parent),null}finally{this.#h=!1}}))})}}function WE(t,e,n,r){const i=qd;var s=t.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(e.map(i));return}var o=Rt,a=Ft,l=YE(),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&Os)===0&&Wa(h,a)}o?.deactivate(),am()}if(n.length===0){c.then(()=>u(e.map(i)));return}function f(){l(),Promise.all(n.map(d=>UE(d))).then(d=>u([...e.map(i),...d])).catch(d=>Wa(d,a))}c?c.then(f):f()}function YE(){var t=Ft,e=Et,n=Wr,r=Rt;return function(s=!0){es(t),ci(e),Va(n),s&&r?.activate()}}function am(){es(null),ci(null),Va(null)}function qd(t){var e=Jn|er,n=Et!==null&&(Et.f&Jn)!==0?Et:null;return Ft!==null&&(Ft.f|=pl),{ctx:Wr,deps:null,effects:null,equals:v_,f:e,fn:t,reactions:null,rv:0,v:Un,wv:0,parent:n??Ft,ac:null}}function UE(t,e,n){let r=Ft;r===null&&dE();var i=r.b,s=void 0,o=zo(Un),a=!Et,l=new Map;return o$(()=>{var c=d_();s=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===Rt&&u.committed&&u.deactivate(),am()})}catch(h){c.reject(h),am()}var u=Rt;if(a){var f=i.is_rendered();i.update_pending_count(1),u.increment(f),l.get(u)?.reject(ya),l.delete(u),l.set(u,c)}const d=(h,m=void 0)=>{if(u.activate(),m)m!==ya&&(o.f|=Vs,Ya(o,m));else{(o.f&Vs)!==0&&(o.f^=Vs),Ya(o,h);for(const[p,v]of l){if(l.delete(p),p===u)break;v.reject(ya)}}a&&(i.update_pending_count(-1),u.decrement(f))};c.promise.then(d,h=>d(null,h||"unknown"))}),kv(()=>{for(const c of l.values())c.reject(ya)}),new Promise(c=>{function u(f){function d(){f===s?c(o):u(s)}f.then(d,d)}u(s)})}function ge(t){const e=qd(t);return X_(e),e}function T_(t){const e=qd(t);return e.equals=O_,e}function P_(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)Pr(e[n])}}function GE(t){for(var e=t.parent;e!==null;){if((e.f&Jn)===0)return(e.f&Os)===0?e:null;e=e.parent}return null}function yv(t){var e,n=Ft;es(GE(t));try{t.f&=~jo,P_(t),e=U_(t)}finally{es(n)}return e}function E_(t){var e=yv(t);if(!t.equals(e)&&(t.wv=W_(),(!Rt?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){Cn(t,Vn);return}Ks||(bi!==null?(_v()||Rt?.is_fork)&&bi.set(t,e):bv(t))}let lm=new Set;const Ys=new Map;let $_=!1;function zo(t,e){var n={f:0,v:t,reactions:null,equals:v_,rv:0,wv:0};return n}function J(t,e){const n=zo(t);return X_(n),n}function HE(t,e=!1,n=!0){const r=zo(t);return e||(r.equals=O_),r}function q(t,e,n=!1){Et!==null&&(!ki||(Et.f&Rb)!==0)&&b_()&&(Et.f&(Jn|Cs|Ov|Rb))!==0&&(oi===null||!Xa.call(oi,t))&&wE();let r=n?Ht(e):e;return Ya(t,r)}function Ya(t,e){if(!t.equals(e)){var n=t.v;Ks?Ys.set(t,e):Ys.set(t,n),t.v=e;var r=Ws.ensure();if(r.capture(t,n),(t.f&Jn)!==0){const i=t;(t.f&er)!==0&&yv(i),bv(i)}t.wv=W_(),Q_(t,er),Ft!==null&&(Ft.f&Vn)!==0&&(Ft.f&($i|Jo))===0&&(Gr===null?l$([t]):Gr.push(t)),!r.is_fork&&lm.size>0&&!$_&&KE()}return e}function KE(){$_=!1;for(const t of lm)(t.f&Vn)!==0&&Cn(t,Ti),tu(t)&&vc(t);lm.clear()}function Th(t,e=1){var n=g(t),r=e===1?n++:n--;return q(t,n),r}function ic(t){q(t,t.v+1)}function Q_(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],o=s.f,a=(o&er)===0;if(a&&Cn(s,e),(o&Jn)!==0){var l=s;bi?.delete(l),(o&jo)===0&&(o&si&&(s.f|=jo),Q_(l,Ti))}else a&&((o&Cs)!==0&&cs!==null&&cs.add(s),_i(s))}}function Ht(t){if(typeof t!="object"||t===null||qo in t)return t;const e=mv(t);if(e!==f_&&e!==oE)return t;var n=new Map,r=$d(t),i=J(0),s=Do,o=a=>{if(Do===s)return a();var l=Et,c=Do;ci(null),jb(s);var u=a();return ci(l),jb(c),u};return r&&n.set("length",J(t.length)),new Proxy(t,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&bE();var u=n.get(l);return u===void 0?o(()=>{var f=J(c.value);return n.set(l,f),f}):q(u,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){const u=o(()=>J(Un));n.set(l,u),ic(i)}}else q(c,Un),ic(i);return!0},get(a,l,c){if(l===qo)return t;var u=n.get(l),f=l in a;if(u===void 0&&(!f||La(a,l)?.writable)&&(u=o(()=>{var h=Ht(f?a[l]:Un),m=J(h);return m}),n.set(l,u)),u!==void 0){var d=g(u);return d===Un?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=n.get(l);u&&(c.value=g(u))}else if(c===void 0){var f=n.get(l),d=f?.v;if(f!==void 0&&d!==Un)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(a,l){if(l===qo)return!0;var c=n.get(l),u=c!==void 0&&c.v!==Un||Reflect.has(a,l);if(c!==void 0||Ft!==null&&(!u||La(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=u?Ht(a[l]):Un,h=J(d);return h}),n.set(l,c));var f=g(c);if(f===Un)return!1}return u},set(a,l,c,u){var f=n.get(l),d=l in a;if(r&&l==="length")for(var h=c;h<f.v;h+=1){var m=n.get(h+"");m!==void 0?q(m,Un):h in a&&(m=o(()=>J(Un)),n.set(h+"",m))}if(f===void 0)(!d||La(a,l)?.writable)&&(f=o(()=>J(void 0)),q(f,Ht(c)),n.set(l,f));else{d=f.v!==Un;var p=o(()=>Ht(c));q(f,p)}var v=Reflect.getOwnPropertyDescriptor(a,l);if(v?.set&&v.set.call(u,c),!d){if(r&&typeof l=="string"){var O=n.get("length"),b=Number(l);Number.isInteger(b)&&b>=O.v&&q(O,b+1)}ic(i)}return!0},ownKeys(a){g(i);var l=Reflect.ownKeys(a).filter(f=>{var d=n.get(f);return d===void 0||d.v!==Un});for(var[c,u]of n)u.v!==Un&&!(c in a)&&l.push(c);return l},setPrototypeOf(){yE()}})}function Nb(t){try{if(t!==null&&typeof t=="object"&&qo in t)return t[qo]}catch{}return t}function JE(t,e){return Object.is(Nb(t),Nb(e))}var Zo,L_,M_,q_;function e$(){if(Zo===void 0){Zo=window,L_=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;M_=La(e,"firstChild").get,q_=La(e,"nextSibling").get,qb(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),qb(n)&&(n.__t=void 0)}}function bs(t=""){return document.createTextNode(t)}function jr(t){return M_.call(t)}function Jc(t){return q_.call(t)}function R(t,e){return jr(t)}function tt(t,e=!1){{var n=jr(t);return n instanceof Comment&&n.data===""?Jc(n):n}}function D(t,e=1,n=!1){let r=t;for(;e--;)r=Jc(r);return r}function t$(t){t.textContent=""}function R_(){return!1}function ks(t,e){{const n=document.body;t.autofocus=!0,Ui(()=>{document.activeElement===n&&t.focus()})}}let Ib=!1;function n$(){Ib||(Ib=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Rd(t){var e=Et,n=Ft;ci(null),es(null);try{return t()}finally{ci(e),es(n)}}function wv(t,e,n,r=n){t.addEventListener(e,()=>Rd(n));const i=t.__on_r;i?t.__on_r=()=>{i(),r(!0)}:t.__on_r=()=>r(!0),n$()}function r$(t){Ft===null&&(Et===null&&gE(),mE()),Ks&&pE()}function i$(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Ts(t,e,n){var r=Ft;r!==null&&(r.f&Vr)!==0&&(t|=Vr);var i={ctx:Wr,deps:null,nodes:null,f:t|er|si,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{vc(i),i.f|=vv}catch(a){throw Pr(i),a}else e!==null&&_i(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&pl)===0&&(s=s.first,(t&Cs)!==0&&(t&Bo)!==0&&s!==null&&(s.f|=Bo)),s!==null&&(s.parent=r,r!==null&&i$(s,r),Et!==null&&(Et.f&Jn)!==0&&(t&Jo)===0)){var o=Et;(o.effects??=[]).push(s)}return i}function _v(){return Et!==null&&!ki}function kv(t){const e=Ts(Ld,null,!1);return Cn(e,Vn),e.teardown=t,e}function hn(t){r$();var e=Ft.f,n=!Et&&(e&$i)!==0&&(e&vv)===0;if(n){var r=Wr;(r.e??=[]).push(t)}else return D_(t)}function D_(t){return Ts(Qf|lE,t,!1)}function s$(t){Ws.ensure();const e=Ts(Jo|pl,t,!0);return(n={})=>new Promise(r=>{n.outro?Ro(e,()=>{Pr(e),r(void 0)}):(Pr(e),r(void 0))})}function Dd(t){return Ts(Qf,t,!1)}function o$(t){return Ts(Ov|pl,t,!0)}function Nd(t,e=0){return Ts(Ld|e,t,!0)}function ce(t,e=[],n=[],r=[]){WE(r,e,n,i=>{Ts(Ld,()=>t(...i.map(g)),!0)})}function eu(t,e=0){var n=Ts(Cs|e,t,!0);return n}function Jr(t){return Ts($i|pl,t,!0)}function N_(t){var e=t.teardown;if(e!==null){const n=Ks,r=Et;Bb(!0),ci(null);try{e.call(null)}finally{Bb(n),ci(r)}}}function I_(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&Rd(()=>{i.abort(ya)});var r=n.next;(n.f&Jo)!==0?n.parent=null:Pr(n,e),n=r}}function a$(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&$i)===0&&Pr(e),e=n}}function Pr(t,e=!0){var n=!1;(e||(t.f&p_)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(B_(t.nodes.start,t.nodes.end),n=!0),I_(t,e&&!n),Mf(t,0),Cn(t,Os);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();N_(t);var i=t.parent;i!==null&&i.first!==null&&j_(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function B_(t,e){for(;t!==null;){var n=t===e?null:Jc(t);t.remove(),t=n}}function j_(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Ro(t,e,n=!0){var r=[];z_(t,r,!0);var i=()=>{n&&Pr(t),e&&e()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function z_(t,e,n){if((t.f&Vr)===0){t.f^=Vr;var r=t.nodes&&t.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next,o=(i.f&Bo)!==0||(i.f&$i)!==0&&(t.f&Cs)!==0;z_(i,e,o?n:!1),i=s}}}function xv(t){Z_(t,!0)}function Z_(t,e){if((t.f&Vr)!==0){t.f^=Vr,(t.f&Vn)===0&&(Cn(t,er),_i(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&Bo)!==0||(n.f&$i)!==0;Z_(n,i?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function F_(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:Jc(n);e.append(n),n=i}}let ff=!1,Ks=!1;function Bb(t){Ks=t}let Et=null,ki=!1;function ci(t){Et=t}let Ft=null;function es(t){Ft=t}let oi=null;function X_(t){Et!==null&&(oi===null?oi=[t]:oi.push(t))}let kr=null,Nr=0,Gr=null;function l$(t){Gr=t}let V_=1,Co=0,Do=Co;function jb(t){Do=t}function W_(){return++V_}function tu(t){var e=t.f;if((e&er)!==0)return!0;if(e&Jn&&(t.f&=~jo),(e&Ti)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(tu(s)&&E_(s),s.wv>t.wv)return!0}(e&si)!==0&&bi===null&&Cn(t,Vn)}return!1}function Y_(t,e,n=!0){var r=t.reactions;if(r!==null&&!(oi!==null&&Xa.call(oi,t)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&Jn)!==0?Y_(s,e,!1):e===s&&(n?Cn(s,er):(s.f&Vn)!==0&&Cn(s,Ti),_i(s))}}function U_(t){var e=kr,n=Nr,r=Gr,i=Et,s=oi,o=Wr,a=ki,l=Do,c=t.f;kr=null,Nr=0,Gr=null,Et=(c&($i|Jo))===0?t:null,oi=null,Va(t.ctx),ki=!1,Do=++Co,t.ac!==null&&(Rd(()=>{t.ac.abort(ya)}),t.ac=null);try{t.f|=sm;var u=t.fn,f=u(),d=t.deps,h=Rt?.is_fork;if(kr!==null){var m;if(h||Mf(t,Nr),d!==null&&Nr>0)for(d.length=Nr+kr.length,m=0;m<kr.length;m++)d[Nr+m]=kr[m];else t.deps=d=kr;if(_v()&&(t.f&si)!==0)for(m=Nr;m<d.length;m++)(d[m].reactions??=[]).push(t)}else!h&&d!==null&&Nr<d.length&&(Mf(t,Nr),d.length=Nr);if(b_()&&Gr!==null&&!ki&&d!==null&&(t.f&(Jn|Ti|er))===0)for(m=0;m<Gr.length;m++)Y_(Gr[m],t);if(i!==null&&i!==t){if(Co++,i.deps!==null)for(let p=0;p<n;p+=1)i.deps[p].rv=Co;if(e!==null)for(const p of e)p.rv=Co;Gr!==null&&(r===null?r=Gr:r.push(...Gr))}return(t.f&Vs)!==0&&(t.f^=Vs),f}catch(p){return w_(p)}finally{t.f^=sm,kr=e,Nr=n,Gr=r,Et=i,oi=s,Va(o),ki=a,Do=l}}function c$(t,e){let n=e.reactions;if(n!==null){var r=rE.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&Jn)!==0&&(kr===null||!Xa.call(kr,e))){var s=e;(s.f&si)!==0&&(s.f^=si,s.f&=~jo),bv(s),P_(s),Mf(s,0)}}function Mf(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)c$(t,n[r])}function vc(t){var e=t.f;if((e&Os)===0){Cn(t,Vn);var n=Ft,r=ff;Ft=t,ff=!0;try{(e&(Cs|h_))!==0?a$(t):I_(t),N_(t);var i=U_(t);t.teardown=typeof i=="function"?i:null,t.wv=V_;var s;im&&RE&&(t.f&er)!==0&&t.deps}finally{ff=r,Ft=n}}}async function u$(){await Promise.resolve(),jE()}function g(t){var e=t.f,n=(e&Jn)!==0;if(Et!==null&&!ki){var r=Ft!==null&&(Ft.f&Os)!==0;if(!r&&(oi===null||!Xa.call(oi,t))){var i=Et.deps;if((Et.f&sm)!==0)t.rv<Co&&(t.rv=Co,kr===null&&i!==null&&i[Nr]===t?Nr++:kr===null?kr=[t]:kr.push(t));else{(Et.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Et]:Xa.call(s,Et)||s.push(Et)}}}if(Ks&&Ys.has(t))return Ys.get(t);if(n){var o=t;if(Ks){var a=o.v;return((o.f&Vn)===0&&o.reactions!==null||H_(o))&&(a=yv(o)),Ys.set(o,a),a}var l=(o.f&si)===0&&!ki&&Et!==null&&(ff||(Et.f&si)!==0),c=o.deps===null;tu(o)&&(l&&(o.f|=si),E_(o)),l&&!c&&G_(o)}if(bi?.has(t))return bi.get(t);if((t.f&Vs)!==0)throw t.v;return t.v}function G_(t){if(t.deps!==null){t.f|=si;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&Jn)!==0&&(e.f&si)===0&&G_(e)}}function H_(t){if(t.v===Un)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Ys.has(e)||(e.f&Jn)!==0&&H_(e))return!0;return!1}function Er(t){var e=ki;try{return ki=!0,t()}finally{ki=e}}const f$=["touchstart","touchmove"];function d$(t){return f$.includes(t)}const K_=new Set,cm=new Set;function h$(t,e,n,r={}){function i(s){if(r.capture||Yl.call(e,s),!s.cancelBubble)return Rd(()=>n?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ui(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function st(t,e,n,r,i){var s={capture:r,passive:i},o=h$(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&kv(()=>{e.removeEventListener(t,o,s)})}function Vt(t){for(var e=0;e<t.length;e++)K_.add(t[e]);for(var n of cm)n(t)}let zb=null;function Yl(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;zb=t;var o=0,a=zb===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||t.target,s!==e){iE(t,"currentTarget",{configurable:!0,get(){return s||n}});var u=Et,f=Ft;ci(null),es(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||t.target===s)&&p.call(s,t)}catch(v){d?h.push(v):d=v}if(t.cancelBubble||m===e||m===null)break;s=m}if(d){for(let v of h)queueMicrotask(()=>{throw v});throw d}}finally{t.__root=e,delete t.currentTarget,ci(u),es(f)}}}function Sv(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Fo(t,e){var n=Ft;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function W(t,e){var n=(e&g_)!==0,r=(e&$E)!==0,i,s=!t.startsWith("<!>");return()=>{i===void 0&&(i=Sv(s?t:"<!>"+t),n||(i=jr(i)));var o=r||L_?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=jr(o),l=o.lastChild;Fo(a,l)}else Fo(o,o);return o}}function p$(t,e,n="svg"){var r=!t.startsWith("<!>"),i=(e&g_)!==0,s=`<${n}>${r?t:"<!>"+t}</${n}>`,o;return()=>{if(!o){var a=Sv(s),l=jr(a);if(i)for(o=document.createDocumentFragment();jr(l);)o.appendChild(jr(l));else o=jr(l)}var c=o.cloneNode(!0);if(i){var u=jr(c),f=c.lastChild;Fo(u,f)}else Fo(c,c);return c}}function Ps(t,e){return p$(t,e,"svg")}function Zb(t=""){{var e=bs(t+"");return Fo(e,e),e}}function an(){var t=document.createDocumentFragment(),e=document.createComment(""),n=bs();return t.append(e,n),Fo(e,n),t}function z(t,e){t!==null&&t.before(e)}function Te(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function m$(t,e){return g$(t,e)}const aa=new Map;function g$(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:o=!0}){e$();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=d$(h);e.addEventListener(h,Yl,{passive:m});var p=aa.get(h);p===void 0?(document.addEventListener(h,Yl,{passive:m}),aa.set(h,1)):aa.set(h,p+1)}}};l(Qd(K_)),cm.add(l);var c=void 0,u=s$(()=>{var f=n??e.appendChild(bs());return XE(f,{pending:()=>{}},d=>{dt({});var h=Wr;s&&(h.c=s),i&&(r.$$events=i),c=t(d,r)||{},ht()}),()=>{for(var d of a){e.removeEventListener(d,Yl);var h=aa.get(d);--h===0?(document.removeEventListener(d,Yl),aa.delete(d)):aa.set(d,h)}cm.delete(l),f!==n&&f.parentNode?.removeChild(f)}});return v$.set(c,u),c}let v$=new WeakMap;class Av{anchor;#e=new Map;#r=new Map;#t=new Map;#i=new Set;#a=!0;constructor(e,n=!0){this.anchor=e,this.#a=n}#s=()=>{var e=Rt;if(this.#e.has(e)){var n=this.#e.get(e),r=this.#r.get(n);if(r)xv(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#r.set(n,i.effect),this.#t.delete(n),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&&(Pr(a.effect),this.#t.delete(o))}for(const[s,o]of this.#r){if(s===n||this.#i.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();F_(o,c),c.append(bs()),this.#t.set(s,{effect:o,fragment:c})}else Pr(o);this.#i.delete(s),this.#r.delete(s)};this.#a||!r?(this.#i.add(s),Ro(o,a,!1)):a()}}};#n=e=>{this.#e.delete(e);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(Pr(i.effect),this.#t.delete(r))};ensure(e,n){var r=Rt,i=R_();if(n&&!this.#r.has(e)&&!this.#t.has(e))if(i){var s=document.createDocumentFragment(),o=bs();s.append(o),this.#t.set(e,{effect:Jr(()=>n(o)),fragment:s})}else this.#r.set(e,Jr(()=>n(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 le(t,e,n=!1){var r=new Av(t),i=n?Bo:0;function s(o,a){r.ensure(o,a)}eu(()=>{var o=!1;e((a,l=0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}const O$=Symbol("NaN");function Fb(t,e,n){var r=new Av(t);eu(()=>{var i=e();i!==i&&(i=O$),r.ensure(i,n)})}function Yt(t,e){return e}function b$(t,e,n){for(var r=[],i=e.length,s,o=e.length,a=0;a<i;a++){let f=e[a];Ro(f,()=>{if(s){if(s.pending.delete(f),s.done.add(f),s.pending.size===0){var d=t.outrogroups;um(Qd(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var c=n,u=c.parentNode;t$(u),u.append(c),t.items.clear()}um(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function um(t,e=!0){for(var n=0;n<t.length;n++)Pr(t[n],e)}var Xb;function Ct(t,e,n,r,i,s=null){var o=t,a=new Map,l=(e&m_)!==0;if(l){var c=t;o=c.appendChild(bs())}var u=null,f=T_(()=>{var O=n();return $d(O)?O:O==null?[]:Qd(O)}),d,h=!0;function m(){v.fallback=u,y$(v,d,o,e,r),u!==null&&(d.length===0?(u.f&ps)===0?xv(u):(u.f^=ps,Ul(u,null,o)):Ro(u,()=>{u=null}))}var p=eu(()=>{d=g(f);for(var O=d.length,b=new Set,w=Rt,S=R_(),_=0;_<O;_+=1){var x=d[_],C=r(x,_),A=h?null:a.get(C);A?(A.v&&Ya(A.v,x),A.i&&Ya(A.i,_),S&&w.unskip_effect(A.e)):(A=w$(a,h?o:Xb??=bs(),x,C,_,i,e,n),h||(A.e.f|=ps),a.set(C,A)),b.add(C)}if(O===0&&s&&!u&&(h?u=Jr(()=>s(o)):(u=Jr(()=>s(Xb??=bs())),u.f|=ps)),O>b.size&&hE(),!h)if(S){for(const[y,k]of a)b.has(y)||w.skip_effect(k.e);w.oncommit(m),w.ondiscard(()=>{})}else m();g(f)}),v={effect:p,items:a,outrogroups:null,fallback:u};h=!1}function Tl(t){for(;t!==null&&(t.f&$i)===0;)t=t.next;return t}function y$(t,e,n,r,i){var s=(r&SE)!==0,o=e.length,a=t.items,l=Tl(t.effect.first),c,u=null,f,d=[],h=[],m,p,v,O;if(s)for(O=0;O<o;O+=1)m=e[O],p=i(m,O),v=a.get(p).e,(v.f&ps)===0&&(v.nodes?.a?.measure(),(f??=new Set).add(v));for(O=0;O<o;O+=1){if(m=e[O],p=i(m,O),v=a.get(p).e,t.outrogroups!==null)for(const k of t.outrogroups)k.pending.delete(v),k.done.delete(v);if((v.f&ps)!==0)if(v.f^=ps,v===l)Ul(v,null,n);else{var b=u?u.next:l;v===t.effect.last&&(t.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),Ls(t,u,v),Ls(t,v,b),Ul(v,b,n),u=v,d=[],h=[],l=Tl(u.next);continue}if((v.f&Vr)!==0&&(xv(v),s&&(v.nodes?.a?.unfix(),(f??=new Set).delete(v))),v!==l){if(c!==void 0&&c.has(v)){if(d.length<h.length){var w=h[0],S;u=w.prev;var _=d[0],x=d[d.length-1];for(S=0;S<d.length;S+=1)Ul(d[S],w,n);for(S=0;S<h.length;S+=1)c.delete(h[S]);Ls(t,_.prev,x.next),Ls(t,u,_),Ls(t,x,w),l=w,u=x,O-=1,d=[],h=[]}else c.delete(v),Ul(v,l,n),Ls(t,v.prev,v.next),Ls(t,v,u===null?t.effect.first:u.next),Ls(t,u,v),u=v;continue}for(d=[],h=[];l!==null&&l!==v;)(c??=new Set).add(l),h.push(l),l=Tl(l.next);if(l===null)continue}(v.f&ps)===0&&d.push(v),u=v,l=Tl(v.next)}if(t.outrogroups!==null){for(const k of t.outrogroups)k.pending.size===0&&(um(Qd(k.done)),t.outrogroups?.delete(k));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||c!==void 0){var C=[];if(c!==void 0)for(v of c)(v.f&Vr)===0&&C.push(v);for(;l!==null;)(l.f&Vr)===0&&l!==t.fallback&&C.push(l),l=Tl(l.next);var A=C.length;if(A>0){var y=(r&m_)!==0&&o===0?n:null;if(s){for(O=0;O<A;O+=1)C[O].nodes?.a?.measure();for(O=0;O<A;O+=1)C[O].nodes?.a?.fix()}b$(t,C,y)}}s&&Ui(()=>{if(f!==void 0)for(v of f)v.nodes?.a?.apply()})}function w$(t,e,n,r,i,s,o,a){var l=(o&kE)!==0?(o&AE)===0?HE(n,!1,!1):zo(n):null,c=(o&xE)!==0?zo(i):null;return{v:l,i:c,e:Jr(()=>(s(e,l??n,c??i,a),()=>{t.delete(r)}))}}function Ul(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,s=e&&(e.f&ps)===0?e.nodes.start:n;r!==null;){var o=Jc(r);if(s.before(r),r===i)return;r=o}}function Ls(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function J_(t,e,n=!1,r=!1,i=!1){var s=t,o="";ce(()=>{var a=Ft;if(o!==(o=e()??"")&&(a.nodes!==null&&(B_(a.nodes.start,a.nodes.end),a.nodes=null),o!=="")){var l=o+"";n?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var c=Sv(l);if((n||r)&&(c=jr(c)),Fo(jr(c),c.lastChild),n||r)for(;jr(c);)s.before(jr(c));else s.before(c)}})}function wa(t,e,...n){var r=new Av(t);eu(()=>{const i=e()??null;r.ensure(i,i&&(s=>i(s,...n)))},Bo)}function _$(t,e,n){Dd(()=>{var r=Er(()=>e(t,n?.())||{});if(r?.destroy)return()=>r.destroy()})}const Vb=[...`
3
+ \r\f \v\uFEFF`];function k$(t,e,n){var r=t==null?"":""+t;if(n){for(var i in n)if(n[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||Vb.includes(r[o-1]))&&(a===r.length||Vb.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function x$(t,e){return t==null?null:String(t)}function je(t,e,n,r,i,s){var o=t.__className;if(o!==n||o===void 0){var a=k$(n,r,s);a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a),t.__className=n}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return s}function $r(t,e,n,r){var i=t.__style;if(i!==e){var s=x$(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}return r}function Oc(t,e,n=!1){if(t.multiple){if(e==null)return;if(!$d(e))return LE();for(var r of t.options)r.selected=e.includes(sc(r));return}for(r of t.options){var i=sc(r);if(JE(i,e)){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function qf(t){var e=new MutationObserver(()=>{Oc(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),kv(()=>{e.disconnect()})}function ek(t,e,n=e){var r=new WeakSet,i=!0;wv(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),sc);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&sc(l)}n(a),Rt!==null&&r.add(Rt)}),Dd(()=>{var s=e();if(t===document.activeElement){var o=Lf??Rt;if(r.has(o))return}if(Oc(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=sc(a),n(s))}t.__value=s,i=!1}),qf(t)}function sc(t){return"__value"in t?t.__value:t.value}const S$=Symbol("is custom element"),A$=Symbol("is html");function sn(t,e){var n=tk(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function St(t,e,n,r){var i=tk(t);i[e]!==(i[e]=n)&&(e==="loading"&&(t[uE]=n),n==null?t.removeAttribute(e):typeof n!="string"&&C$(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function tk(t){return t.__attributes??={[S$]:t.nodeName.includes("-"),[A$]:t.namespaceURI===QE}}var Wb=new Map;function C$(t){var e=t.getAttribute("is")||t.nodeName,n=Wb.get(e);if(n)return n;Wb.set(e,n=[]);for(var r,i=t,s=Element.prototype;s!==i;){r=sE(i);for(var o in r)r[o].set&&n.push(o);i=mv(i)}return n}function Qn(t,e,n=e){var r=new WeakSet;wv(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Ph(t)?Eh(s):s,n(s),Rt!==null&&r.add(Rt),await u$(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var c=t.value.length;o===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),Er(e)==null&&t.value&&(n(Ph(t)?Eh(t.value):t.value),Rt!==null&&r.add(Rt)),Nd(()=>{var i=e();if(t===document.activeElement){var s=Lf??Rt;if(r.has(s))return}Ph(t)&&i===Eh(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function fm(t,e,n=e){wv(t,"change",r=>{var i=r?t.defaultChecked:t.checked;n(i)}),Er(e)==null&&n(t.checked),Nd(()=>{var r=e();t.checked=!!r})}function Ph(t){var e=t.type;return e==="number"||e==="range"}function Eh(t){return t===""?null:+t}class Cv{#e=new WeakMap;#r;#t;static entries=new WeakMap;constructor(e){this.#t=e}observe(e,n){var r=this.#e.get(e)||new Set;return r.add(n),this.#e.set(e,r),this.#i().observe(e,this.#t),()=>{var i=this.#e.get(e);i.delete(n),i.size===0&&(this.#e.delete(e),this.#r.unobserve(e))}}#i(){return this.#r??(this.#r=new ResizeObserver(e=>{for(var n of e){Cv.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}}))}}var T$=new Cv({box:"border-box"});function P$(t,e,n){var r=T$.observe(t,()=>n(t[e]));Dd(()=>(Er(()=>n(t[e])),r))}function Yb(t,e){return t===e||t?.[qo]===e}function ln(t={},e,n,r){return Dd(()=>{var i,s;return Nd(()=>{i=s,s=[],Er(()=>{t!==n(...s)&&(e(t,...s),i&&Yb(n(...i),t)&&e(null,...i))})}),()=>{Ui(()=>{s&&Yb(n(...s),t)&&e(null,...s)})}}),t}let Ou=!1;function E$(t){var e=Ou;try{return Ou=!1,[t(),Ou]}finally{Ou=e}}function xt(t,e,n,r){var i=(n&PE)!==0,s=(n&EE)!==0,o=r,a=!0,l=()=>(a&&(a=!1,o=s?Er(r):r),o),c;if(i){var u=qo in t||cE in t;c=La(t,e)?.set??(u&&e in t?b=>t[e]=b:void 0)}var f,d=!1;i?[f,d]=E$(()=>t[e]):f=t[e],f===void 0&&r!==void 0&&(f=l(),c&&(OE(),c(f)));var h;if(h=()=>{var b=t[e];return b===void 0?l():(a=!0,b)},(n&TE)===0)return h;if(c){var m=t.$$legacy;return(function(b,w){return arguments.length>0?((!w||m||d)&&c(w?h():b),b):h()})}var p=!1,v=((n&CE)!==0?qd:T_)(()=>(p=!1,h()));i&&g(v);var O=Ft;return(function(b,w){if(arguments.length>0){const S=w?g(v):i?Ht(b):b;return q(v,S),p=!0,o!==void 0&&(o=S),b}return Ks&&p||(O.f&Os)!==0?v.v:g(v)})}function ao(t){Wr===null&&fE(),hn(()=>{const e=Er(t);if(typeof e=="function")return e})}const $$="modulepreload",Q$=function(t){return"/"+t},Ub={},re=function(e,n,r){let i=Promise.resolve();if(n&&n.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(n.map(c=>{if(c=Q$(c),c in Ub)return;Ub[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":$$,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)})},L$="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(L$);const Tv=Symbol.for("yaml.alias"),dm=Symbol.for("yaml.document"),Us=Symbol.for("yaml.map"),nk=Symbol.for("yaml.pair"),ts=Symbol.for("yaml.scalar"),ml=Symbol.for("yaml.seq"),ui=Symbol.for("yaml.node.type"),lo=t=>!!t&&typeof t=="object"&&t[ui]===Tv,ea=t=>!!t&&typeof t=="object"&&t[ui]===dm,gl=t=>!!t&&typeof t=="object"&&t[ui]===Us,pn=t=>!!t&&typeof t=="object"&&t[ui]===nk,nn=t=>!!t&&typeof t=="object"&&t[ui]===ts,vl=t=>!!t&&typeof t=="object"&&t[ui]===ml;function On(t){if(t&&typeof t=="object")switch(t[ui]){case Us:case ml:return!0}return!1}function yn(t){if(t&&typeof t=="object")switch(t[ui]){case Tv:case Us:case ts:case ml:return!0}return!1}const rk=t=>(nn(t)||On(t))&&!!t.anchor,Sr=Symbol("break visit"),ik=Symbol("skip children"),Gi=Symbol("remove node");function ta(t,e){const n=sk(e);ea(t)?_a(null,t.contents,n,Object.freeze([t]))===Gi&&(t.contents=null):_a(null,t,n,Object.freeze([]))}ta.BREAK=Sr;ta.SKIP=ik;ta.REMOVE=Gi;function _a(t,e,n,r){const i=ok(t,e,n,r);if(yn(i)||pn(i))return ak(t,r,i),_a(t,i,n,r);if(typeof i!="symbol"){if(On(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=_a(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Sr)return Sr;o===Gi&&(e.items.splice(s,1),s-=1)}}}else if(pn(e)){r=Object.freeze(r.concat(e));const s=_a("key",e.key,n,r);if(s===Sr)return Sr;s===Gi&&(e.key=null);const o=_a("value",e.value,n,r);if(o===Sr)return Sr;o===Gi&&(e.value=null)}}return i}async function Id(t,e){const n=sk(e);ea(t)?await ka(null,t.contents,n,Object.freeze([t]))===Gi&&(t.contents=null):await ka(null,t,n,Object.freeze([]))}Id.BREAK=Sr;Id.SKIP=ik;Id.REMOVE=Gi;async function ka(t,e,n,r){const i=await ok(t,e,n,r);if(yn(i)||pn(i))return ak(t,r,i),ka(t,i,n,r);if(typeof i!="symbol"){if(On(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await ka(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Sr)return Sr;o===Gi&&(e.items.splice(s,1),s-=1)}}}else if(pn(e)){r=Object.freeze(r.concat(e));const s=await ka("key",e.key,n,r);if(s===Sr)return Sr;s===Gi&&(e.key=null);const o=await ka("value",e.value,n,r);if(o===Sr)return Sr;o===Gi&&(e.value=null)}}return i}function sk(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function ok(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(gl(e))return n.Map?.(t,e,r);if(vl(e))return n.Seq?.(t,e,r);if(pn(e))return n.Pair?.(t,e,r);if(nn(e))return n.Scalar?.(t,e,r);if(lo(e))return n.Alias?.(t,e,r)}function ak(t,e,n){const r=e[e.length-1];if(On(r))r.items[t]=n;else if(pn(r))t==="key"?r.key=n:r.value=n;else if(ea(r))r.contents=n;else{const i=lo(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const M$={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},q$=t=>t.replace(/[!,[\]{}]/g,e=>M$[e]);class ur{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ur.defaultYaml,e),this.tags=Object.assign({},ur.defaultTags,n)}clone(){const e=new ur(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ur(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ur.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ur.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:ur.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ur.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(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 n(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 n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+q$(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=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={};ta(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)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
4
+ `)}}ur.defaultYaml={explicit:!1,version:"1.2"};ur.defaultTags={"!!":"tag:yaml.org,2002:"};function lk(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function ck(t){const e=new Set;return ta(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function uk(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function R$(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i??(i=ck(t));const o=uk(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(nn(o.node)||On(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 xa(t,e,n,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=xa(t,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=xa(t,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=xa(t,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=xa(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function ai(t,e,n){if(Array.isArray(t))return t.map((r,i)=>ai(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!rk(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class Pv{constructor(e){Object.defineProperty(this,ui,{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:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!ea(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=ai(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s=="function"?xa(s,{"":a},"",a):a}}class Bd extends Pv{constructor(e){super(Tv),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],ta(e,{Node:(s,o)=>{(lo(o)||rk(o))&&r.push(o)}}),n&&(n.aliasResolveCache=r));let i;for(const s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i,n);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||(ai(o,null,n),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=df(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,n,r){const i=`*${this.source}`;if(e){if(lk(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 df(t,e,n){if(lo(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(On(e)){let r=0;for(const i of e.items){const s=df(t,i,n);s>r&&(r=s)}return r}else if(pn(e)){const r=df(t,e.key,n),i=df(t,e.value,n);return Math.max(r,i)}return 1}const fk=t=>!t||typeof t!="function"&&typeof t!="object";class ot extends Pv{constructor(e){super(ts),this.value=e}toJSON(e,n){return n?.keep?this.value:ai(this.value,e,n)}toString(){return String(this.value)}}ot.BLOCK_FOLDED="BLOCK_FOLDED";ot.BLOCK_LITERAL="BLOCK_LITERAL";ot.PLAIN="PLAIN";ot.QUOTE_DOUBLE="QUOTE_DOUBLE";ot.QUOTE_SINGLE="QUOTE_SINGLE";const D$="tag:yaml.org,2002:";function N$(t,e,n){if(e){const r=n.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 n.find(r=>r.identify?.(t)&&!r.format)}function bc(t,e,n){if(ea(t)&&(t=t.contents),yn(t))return t;if(pn(t)){const f=n.schema[Us].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=i(t)),new Bd(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=D$+e.slice(2));let c=N$(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new ot(t);return l&&(l.node=f),f}c=t instanceof Map?o[Us]:Symbol.iterator in Object(t)?o[ml]:o[Us]}s&&(s(c),delete n.onTagObj);const u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new ot(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Rf(t,e,n){let r=n;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 bc(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Gl=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class dk extends Pv{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>yn(r)||pn(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Gl(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(On(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Rf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(On(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&nn(s)?s.value:s:On(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!pn(n))return!1;const r=n.value;return r==null||e&&nn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return On(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(On(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Rf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const I$=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ms(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const To=(t,e,n)=>t.endsWith(`
5
+ `)?ms(n,e):n.includes(`
6
+ `)?`
7
+ `+ms(n,e):(t.endsWith(" ")?"":" ")+n,hk="flow",hm="block",hf="quoted";function jd(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;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,v=-1,O=-1;n===hm&&(p=Gb(t,p,e.length),p!==-1&&(f=p+l));for(let w;w=t[p+=1];){if(n===hf&&w==="\\"){switch(v=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}O=p}if(w===`
8
+ `)n===hm&&(p=Gb(t,p,e.length)),f=p+e.length+l,d=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
9
+ `&&h!==" "){const S=t[p+1];S&&S!==" "&&S!==`
10
+ `&&S!==" "&&(d=p)}if(p>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===hf){for(;h===" "||h===" ";)h=w,w=t[p+=1],m=!0;const S=p>O+1?p-2:v-1;if(u[S])return t;c.push(S),u[S]=!0,f=S+l,d=void 0}else m=!0}h=w}if(m&&a&&a(),c.length===0)return t;o&&o();let b=t.slice(0,c[0]);for(let w=0;w<c.length;++w){const S=c[w],_=c[w+1]||t.length;S===0?b=`
11
+ ${e}${t.slice(0,_)}`:(n===hf&&u[S]&&(b+=`${t[S]}\\`),b+=`
12
+ ${e}${t.slice(S+1,_)}`)}return b}function Gb(t,e,n){let r=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
13
+ `);r=e,i=e+1,s=t[i]}return r}const zd=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Zd=t=>/^(%|---|\.\.\.)/m.test(t);function B$(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
14
+ `){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function oc(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Zd(t)?" ":"");let o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);const u=n.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+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<i)l+=1;else{for(o+=n.slice(a,l)+`
15
+
16
+ `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
17
+ `,l+=2;o+=s,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,r?o:jd(o,s,hf,zd(e,!1))}function pm(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
18
+ `)||/[ \t]\n|\n[ \t]/.test(t))return oc(t,e);const n=e.indent||(Zd(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
19
+ ${n}`)+"'";return e.implicitKey?r:jd(r,n,hk,zd(e,!1))}function Sa(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=oc;else{const i=t.includes('"'),s=t.includes("'");i&&!s?r=pm:s&&!i?r=oc:r=n?pm:oc}return r(t,e)}let mm;try{mm=new RegExp(`(^|(?<!
20
+ ))
21
+ +(?!
22
+ |$)`,"g")}catch{mm=/\n+(?!\n|$)/g}function pf({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(n))return Sa(n,r);const c=r.indent||(r.forceBlockIndent||Zd(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===ot.BLOCK_FOLDED?!1:e===ot.BLOCK_LITERAL?!0:!B$(n,l,c.length);if(!n)return u?`|
23
+ `:`>
24
+ `;let f,d;for(d=n.length;d>0;--d){const _=n[d-1];if(_!==`
25
+ `&&_!==" "&&_!==" ")break}let h=n.substring(d);const m=h.indexOf(`
26
+ `);m===-1?f="-":n===h||m!==h.length-1?(f="+",s&&s()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
27
+ `&&(h=h.slice(0,-1)),h=h.replace(mm,`$&${c}`));let p=!1,v,O=-1;for(v=0;v<n.length;++v){const _=n[v];if(_===" ")p=!0;else if(_===`
28
+ `)O=v;else break}let b=n.substring(0,O<v?O+1:v);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let S=(p?c?"2":"1":"")+f;if(t&&(S+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!u){const _=n.replace(/\n+/g,`
29
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let x=!1;const C=zd(r,!0);o!=="folded"&&e!==ot.BLOCK_FOLDED&&(C.onOverflow=()=>{x=!0});const A=jd(`${b}${_}${h}`,c,hm,C);if(!x)return`>${S}
30
+ ${c}${A}`}return n=n.replace(/\n+/g,`$&${c}`),`|${S}
31
+ ${c}${b}${n}${h}`}function j$(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
32
+ `)||u&&/[[\]{},]/.test(s))return Sa(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
33
+ `)?Sa(s,e):pf(t,e,n,r);if(!a&&!u&&i!==ot.PLAIN&&s.includes(`
34
+ `))return pf(t,e,n,r);if(Zd(s)){if(l==="")return e.forceBlockIndent=!0,pf(t,e,n,r);if(a&&l===c)return Sa(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 Sa(s,e)}return a?f:jd(f,l,hk,zd(e,!1))}function nu(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==ot.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=ot.QUOTE_DOUBLE);const l=u=>{switch(u){case ot.BLOCK_FOLDED:case ot.BLOCK_LITERAL:return i||s?Sa(o.value,e):pf(o,e,n,r);case ot.QUOTE_DOUBLE:return oc(o.value,e);case ot.QUOTE_SINGLE:return pm(o.value,e);case ot.PLAIN:return j$(o,e,n,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 pk(t,e){const n=Object.assign({blockQuote:!0,commentString:I$,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},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function z$(t,e){if(e.tag){const i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(nn(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return n}function Z$(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(nn(t)||On(t))&&t.anchor;s&&lk(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag??(e.default?null:e.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}function Ua(t,e,n,r){if(pn(t))return t.toString(e,n,r);if(lo(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=yn(t)?t:e.doc.createNode(t,{onTagObj:l=>i=l});i??(i=z$(e.doc.schema.tags,s));const o=Z$(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):nn(s)?nu(s,e,n,r):s.toString(e,n,r);return o?nn(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
36
+ ${e.indent}${a}`:a}function F$({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n;let d=yn(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(On(t)||!yn(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||On(t)||(nn(t)?t.type===ot.BLOCK_FOLDED||t.type===ot.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!s),indent:a+l});let m=!1,p=!1,v=Ua(t,n,()=>m=!0,()=>p=!0);if(!h&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(s||e==null)return m&&r&&r(),v===""?"?":h?`? ${v}`:v}else if(s&&!f||e==null&&h)return v=`? ${v}`,d&&!m?v+=To(v,n.indent,c(d)):p&&i&&i(),v;m&&(d=null),h?(d&&(v+=To(v,n.indent,c(d))),v=`? ${v}
37
+ ${a}:`):(v=`${v}:`,d&&(v+=To(v,n.indent,c(d))));let O,b,w;yn(e)?(O=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(O=!1,b=null,w=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!d&&nn(e)&&(n.indentAtStart=v.length+1),p=!1,!u&&l.length>=2&&!n.inFlow&&!h&&vl(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let S=!1;const _=Ua(e,n,()=>S=!0,()=>p=!0);let x=" ";if(d||O||b){if(x=O?`
38
+ `:"",b){const C=c(b);x+=`
39
+ ${ms(C,n.indent)}`}_===""&&!n.inFlow?x===`
40
+ `&&w&&(x=`
41
+
42
+ `):x+=`
43
+ ${n.indent}`}else if(!h&&On(e)){const C=_[0],A=_.indexOf(`
44
+ `),y=A!==-1,k=n.inFlow??e.flow??e.items.length===0;if(y||!k){let P=!1;if(y&&(C==="&"||C==="!")){let T=_.indexOf(" ");C==="&"&&T!==-1&&T<A&&_[T+1]==="!"&&(T=_.indexOf(" ",T+1)),(T===-1||A<T)&&(P=!0)}P||(x=`
45
+ ${n.indent}`)}}else(_===""||_[0]===`
46
+ `)&&(x="");return v+=x+_,n.inFlow?S&&r&&r():w&&!S?v+=To(v,n.indent,c(w)):p&&i&&i(),v}function mk(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const bu="<<",ys={identify:t=>t===bu||typeof t=="symbol"&&t.description===bu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ot(Symbol(bu)),{addToJSMap:gk}),stringify:()=>bu},X$=(t,e)=>(ys.identify(e)||nn(e)&&(!e.type||e.type===ot.PLAIN)&&ys.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===ys.tag&&n.default);function gk(t,e,n){if(n=t&&lo(n)?n.resolve(t.doc):n,vl(n))for(const r of n.items)$h(t,e,r);else if(Array.isArray(n))for(const r of n)$h(t,e,r);else $h(t,e,n)}function $h(t,e,n){const r=t&&lo(n)?n.resolve(t.doc):n;if(!gl(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,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 vk(t,e,{key:n,value:r}){if(yn(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(X$(t,n))gk(t,e,r);else{const i=ai(n,"",t);if(e instanceof Map)e.set(i,ai(r,i,t));else if(e instanceof Set)e.add(i);else{const s=V$(n,i,t),o=ai(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function V$(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(yn(t)&&n?.doc){const r=pk(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),mk(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Ev(t,e,n){const r=bc(t,void 0,n),i=bc(e,void 0,n);return new or(r,i)}class or{constructor(e,n=null){Object.defineProperty(this,ui,{value:nk}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return yn(n)&&(n=n.clone(e)),yn(r)&&(r=r.clone(e)),new or(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return vk(n,r,this)}toString(e,n,r){return e?.doc?F$(this,e,n,r):JSON.stringify(this)}}function Ok(t,e,n){return(e.inFlow??t.flow?Y$:W$)(t,e,n)}function W$({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:s,type:null});let f=!1;const d=[];for(let m=0;m<e.length;++m){const p=e[m];let v=null;if(yn(p))!f&&p.spaceBefore&&d.push(""),Df(n,d,p.commentBefore,f),p.comment&&(v=p.comment);else if(pn(p)){const b=yn(p.key)?p.key:null;b&&(!f&&b.spaceBefore&&d.push(""),Df(n,d,b.commentBefore,f))}f=!1;let O=Ua(p,u,()=>v=null,()=>f=!0);v&&(O+=To(O,s,c(v))),f&&v&&(f=!1),d.push(r+O)}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 t?(h+=`
49
+ `+ms(c(t),l),a&&a()):f&&o&&o(),h}function Y$({items:t},e,{flowChars:n,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<t.length;++m){const p=t[m];let v=null;if(yn(p))p.spaceBefore&&f.push(""),Df(e,f,p.commentBefore,!1),p.comment&&(v=p.comment);else if(pn(p)){const b=yn(p.key)?p.key:null;b&&(b.spaceBefore&&f.push(""),Df(e,f,b.commentBefore,!1),b.comment&&(c=!0));const w=yn(p.value)?p.value:null;w?(w.comment&&(v=w.comment),w.commentBefore&&(c=!0)):p.value==null&&b?.comment&&(v=b.comment)}v&&(c=!0);let O=Ua(p,l,()=>v=null);m<t.length-1&&(O+=","),v&&(O+=To(O,r,a(v))),!c&&(f.length>u||O.includes(`
50
+ `))&&(c=!0),f.push(O),u=f.length}const{start:d,end:h}=n;if(f.length===0)return d+h;if(!c){const m=f.reduce((p,v)=>p+v.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 Df({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=ms(e(r),t);n.push(s.trimStart())}}function Po(t,e){const n=nn(e)?e.value:e;for(const r of t)if(pn(r)&&(r.key===e||r.key===n||nn(r.key)&&r.key.value===n))return r}class zr extends dk{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Us,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(n,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||i)&&o.items.push(Ev(l,c,r))};if(n instanceof Map)for(const[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;pn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new or(e,e?.value):r=new or(e.key,e.value);const i=Po(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);nn(i.value)&&fk(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 n=Po(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=Po(this.items,e)?.value;return(!n&&nn(i)?i.value:i)??void 0}has(e){return!!Po(this.items,e)}set(e,n){this.add(new or(e,n),!0)}toJSON(e,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)vk(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!pn(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})),Ok(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Ol={collection:"map",default:!0,nodeClass:zr,tag:"tag:yaml.org,2002:map",resolve(t,e){return gl(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>zr.from(t,e,n)};class Js extends dk{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ml,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=yu(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=yu(e);if(typeof r!="number")return;const i=this.items[r];return!n&&nn(i)?i.value:i}has(e){const n=yu(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=yu(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];nn(i)&&fk(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(ai(s,String(i++),n));return r}toString(e,n,r){return e?Ok(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const l=n instanceof Set?a:String(o++);a=i.call(n,l,a)}s.items.push(bc(a,void 0,r))}}return s}}function yu(t){let e=nn(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const bl={collection:"seq",default:!0,nodeClass:Js,tag:"tag:yaml.org,2002:seq",resolve(t,e){return vl(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Js.from(t,e,n)},Fd={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),nu(t,e,n,r)}},Xd={identify:t=>t==null,createNode:()=>new ot(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ot(null),stringify:({source:t},e)=>typeof t=="string"&&Xd.test.test(t)?t:e.options.nullStr},$v={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ot(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&$v.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Qi({format:t,minFractionDigits:e,tag:n,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(!t&&e&&(!n||n==="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 bk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Qi},yk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Qi(t)}},wk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ot(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Qi},Vd=t=>typeof t=="bigint"||Number.isInteger(t),Qv=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function _k(t,e,n){const{value:r}=t;return Vd(r)&&r>=0?n+r.toString(e):Qi(t)}const kk={identify:t=>Vd(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Qv(t,2,8,n),stringify:t=>_k(t,8,"0o")},xk={identify:Vd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Qv(t,0,10,n),stringify:Qi},Sk={identify:t=>Vd(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Qv(t,2,16,n),stringify:t=>_k(t,16,"0x")},U$=[Ol,bl,Fd,Xd,$v,kk,xk,Sk,bk,yk,wk];function Hb(t){return typeof t=="bigint"||Number.isInteger(t)}const wu=({value:t})=>JSON.stringify(t),G$=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:wu},{identify:t=>t==null,createNode:()=>new ot(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:wu},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:wu},{identify:Hb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Hb(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:wu}],H$={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},K$=[Ol,bl].concat(G$,H$),Lv={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){if(!n)return"";const o=n;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=ot.BLOCK_LITERAL),e!==ot.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===ot.BLOCK_LITERAL?`
54
+ `:" ")}return nu({comment:t,type:e,value:a},r,i,s)}};function Ak(t,e){if(vl(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!pn(r)){if(gl(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new or(new ot(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}t.items[n]=pn(r)?r:new or(r)}}else e("Expected a sequence for this tag");return t}function Ck(t,e,n){const{replacer:r}=n,i=new Js(t);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(Ev(a,l,n))}return i}const Mv={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ak,createNode:Ck};class Ma extends Js{constructor(){super(),this.add=zr.prototype.add.bind(this),this.delete=zr.prototype.delete.bind(this),this.get=zr.prototype.get.bind(this),this.has=zr.prototype.has.bind(this),this.set=zr.prototype.set.bind(this),this.tag=Ma.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(pn(i)?(s=ai(i.key,"",n),o=ai(i.value,s,n)):s=ai(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=Ck(e,n,r),s=new this;return s.items=i.items,s}}Ma.tag="tag:yaml.org,2002:omap";const qv={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ma,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Ak(t,e),r=[];for(const{key:i}of n.items)nn(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Ma,n)},createNode:(t,e,n)=>Ma.from(t,e,n)};function Tk({value:t,source:e},n){return e&&(t?Pk:Ek).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Pk={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ot(!0),stringify:Tk},Ek={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ot(!1),stringify:Tk},J$={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Qi},eQ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Qi(t)}},tQ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ot(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Qi},ru=t=>typeof t=="bigint"||Number.isInteger(t);function Wd(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function Rv(t,e,n){const{value:r}=t;if(ru(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Qi(t)}const nQ={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Wd(t,2,2,n),stringify:t=>Rv(t,2,"0b")},rQ={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Wd(t,1,8,n),stringify:t=>Rv(t,8,"0")},iQ={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Wd(t,0,10,n),stringify:Qi},sQ={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Wd(t,2,16,n),stringify:t=>Rv(t,16,"0x")};class qa extends zr{constructor(e){super(e),this.tag=qa.tag}add(e){let n;pn(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new or(e.key,null):n=new or(e,null),Po(this.items,n.key)||this.items.push(n)}get(e,n){const r=Po(this.items,e);return!n&&pn(r)?nn(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Po(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new or(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(Ev(o,null,r));return s}}qa.tag="tag:yaml.org,2002:set";const Dv={collection:"map",identify:t=>t instanceof Set,nodeClass:qa,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>qa.from(t,e,n),resolve(t,e){if(gl(t)){if(t.hasAllNullValues(!0))return Object.assign(new qa,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Nv(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function $k(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Qi(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(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 Qk={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Nv(t,n),stringify:$k},Lk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Nv(t,!1),stringify:$k},Yd={identify:t=>t 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(t){const e=t.match(Yd.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(n,r-1,i,s||0,o||0,a||0,l);const u=e[8];if(u&&u!=="Z"){let f=Nv(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Kb=[Ol,bl,Fd,Xd,Pk,Ek,nQ,rQ,iQ,sQ,J$,eQ,tQ,Lv,ys,qv,Mv,Dv,Qk,Lk,Yd],Jb=new Map([["core",U$],["failsafe",[Ol,bl,Fd]],["json",K$],["yaml11",Kb],["yaml-1.1",Kb]]),ey={binary:Lv,bool:$v,float:wk,floatExp:yk,floatNaN:bk,floatTime:Lk,int:xk,intHex:Sk,intOct:kk,intTime:Qk,map:Ol,merge:ys,null:Xd,omap:qv,pairs:Mv,seq:bl,set:Dv,timestamp:Yd},oQ={"tag:yaml.org,2002:binary":Lv,"tag:yaml.org,2002:merge":ys,"tag:yaml.org,2002:omap":qv,"tag:yaml.org,2002:pairs":Mv,"tag:yaml.org,2002:set":Dv,"tag:yaml.org,2002:timestamp":Yd};function Qh(t,e,n){const r=Jb.get(e);if(r&&!t)return n&&!r.includes(ys)?r.concat(ys):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(Jb.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(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(ys)),i.reduce((s,o)=>{const a=typeof o=="string"?ey[o]:o;if(!a){const l=JSON.stringify(o),c=Object.keys(ey).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 aQ=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;let Mk=class qk{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Qh(e,"compat"):e?Qh(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?oQ:{},this.tags=Qh(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Us,{value:Ol}),Object.defineProperty(this,ts,{value:Fd}),Object.defineProperty(this,ml,{value:bl}),this.sortMapEntries=typeof o=="function"?o:o===!0?aQ:null}clone(){const e=Object.create(qk.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function lQ(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const l=t.directives.toString(t);l?(n.push(l),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=pk(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const l=s(t.commentBefore);n.unshift(ms(l,""))}let o=!1,a=null;if(t.contents){if(yn(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const u=s(t.contents.commentBefore);n.push(ms(u,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const l=a?void 0:()=>o=!0;let c=Ua(t.contents,i,()=>a=null,l);a&&(c+=To(c,"",s(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Ua(t.contents,i));if(t.directives?.docEnd)if(t.comment){const l=s(t.comment);l.includes(`
57
+ `)?(n.push("..."),n.push(ms(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(ms(s(l),"")))}return n.join(`
58
+ `)+`
59
+ `}let Ud=class Rk{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ui,{value:dm});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=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 ur({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(Rk.prototype,{[ui]:{value:dm}});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){la(this.contents)&&this.contents.add(e)}addIn(e,n){la(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=ck(this);e.anchor=!n||r.has(n)?uk(n||"a",r):n}return new Bd(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const v=b=>typeof b=="number"||b instanceof String||b instanceof Number,O=n.filter(v).map(String);O.length>0&&(n=n.concat(O)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=R$(this,o||"a"),m={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:h},p=bc(e,u,m);return a&&On(p)&&(p.flow=!0),d(),p}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new or(i,s)}delete(e){return la(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Gl(e)?this.contents==null?!1:(this.contents=null,!0):la(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return On(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Gl(e)?!n&&nn(this.contents)?this.contents.value:this.contents:On(this.contents)?this.contents.getIn(e,n):void 0}has(e){return On(this.contents)?this.contents.has(e):!1}hasIn(e){return Gl(e)?this.contents!==void 0:On(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Rf(this.schema,[e],n):la(this.contents)&&this.contents.set(e,n)}setIn(e,n){Gl(e)?this.contents=n:this.contents==null?this.contents=Rf(this.schema,Array.from(e),n):la(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ur({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 ur({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(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Mk(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,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=ai(this.contents,n??"",a);if(typeof s=="function")for(const{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?xa(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return lQ(this,e)}};function la(t){if(On(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Iv extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class Eo extends Iv{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class Dk extends Iv{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const Nf=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.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=t.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=n.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);n.message+=`:
61
+
62
+ ${o}
63
+ ${c}
64
+ `}};function Ga(t,{flow:e,indicator:n,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,v=null,O=null,b=null,w=null,S=null,_=null;for(const A of t)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&&(n!=="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 y=A.source.substring(1)||" ";f?f+=d+y:f=y,d="",c=!1;break}case"newline":c?f?f+=A.source:(!S||n!=="seq-item-ind")&&(l=!0):d+=A.source,c=!0,h=!0,(v||O)&&(b=A),u=!0;break;case"anchor":v&&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),v=A,_??(_=A.offset),c=!1,u=!1,m=!0;break;case"tag":{O&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),O=A,_??(_=A.offset),c=!1,u=!1,m=!0;break}case n:(v||O)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),S&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),S=A,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){w&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}const x=t[t.length-1],C=x?x.offset+x.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:w,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:v,tag:O,newlineAfterProp:b,end:C,start:_??C}}function yc(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
65
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(yc(e.key)||yc(e.value))return!0}return!1;default:return!0}}function gm(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&yc(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Nk(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||nn(s)&&nn(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const ty="All mapping items must start at the same column";function cQ({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??zr,a=new o(n.schema);n.atRoot&&(n.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=Ga(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),v=!p.found;if(v){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",ty)),!p.anchor&&!p.tag&&!h){c=p.end,p.comment&&(a.comment?a.comment+=`
66
+ `+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||yc(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",ty);n.atKey=!0;const O=p.end,b=d?t(n,d,p,i):e(n,O,f,null,p,i);n.schema.compat&&gm(r.indent,d,i),n.atKey=!1,Nk(n,a.items,b)&&i(O,"DUPLICATE_KEY","Map keys must be unique");const w=Ga(h??[],{indicator:"map-value-ind",next:m,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=w.end,w.found){v&&(m?.type==="block-map"&&!w.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&p.start<w.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 S=m?t(n,m,w,i):e(n,l,h,null,w,i);n.schema.compat&&gm(r.indent,m,i),l=S.range[2];const _=new or(b,S);n.options.keepSourceTokens&&(_.srcToken=u),a.items.push(_)}else{v&&i(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
67
+ `+w.comment:b.comment=w.comment);const S=new or(b);n.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function uQ({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??Js,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,c=null;for(const{start:u,value:f}of r.items){const d=Ga(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?t(n,f,d,i):e(n,d.end,u,null,d,i);n.schema.compat&&gm(r.indent,f,i),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function iu(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{n&&!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 Lh="Block collections are not allowed within flow collections",Mh=t=>t&&(t.type==="block-map"||t.type==="block-seq");function fQ({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?zr:Js),c=new l(n.schema);c.flow=!0;const u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v<r.items.length;++v){const O=r.items[v],{start:b,key:w,sep:S,value:_}=O,x=Ga(b,{flow:a,indicator:"explicit-key-ind",next:w??S?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!x.found){if(!x.anchor&&!x.tag&&!S&&!_){v===0&&x.comma?i(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):v<r.items.length-1&&i(x.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),x.comment&&(c.comment?c.comment+=`
68
+ `+x.comment:c.comment=x.comment),f=x.end;continue}!o&&n.options.strict&&yc(w)&&i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)x.comma&&i(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(x.comma||i(x.start,"MISSING_CHAR",`Missing , between ${a} items`),x.comment){let C="";e:for(const A of b)switch(A.type){case"comma":case"space":break;case"comment":C=A.source.substring(1);break e;default:break e}if(C){let A=c.items[c.items.length-1];pn(A)&&(A=A.value??A.key),A.comment?A.comment+=`
69
+ `+C:A.comment=C,x.comment=x.comment.substring(C.length+1)}}if(!o&&!S&&!x.found){const C=_?t(n,_,x,i):e(n,x.end,S,null,x,i);c.items.push(C),f=C.range[2],Mh(_)&&i(C.range,"BLOCK_IN_FLOW",Lh)}else{n.atKey=!0;const C=x.end,A=w?t(n,w,x,i):e(n,C,b,null,x,i);Mh(w)&&i(A.range,"BLOCK_IN_FLOW",Lh),n.atKey=!1;const y=Ga(S??[],{flow:a,indicator:"map-value-ind",next:_,offset:A.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(y.found){if(!o&&!x.found&&n.options.strict){if(S)for(const T of S){if(T===y.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}}x.start<y.found.offset-1024&&i(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source?.[0]===":"?i(_,"MISSING_CHAR",`Missing space after : in ${a}`):i(y.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const k=_?t(n,_,y,i):y.found?e(n,y.end,S,null,y,i):null;k?Mh(_)&&i(k.range,"BLOCK_IN_FLOW",Lh):y.comment&&(A.comment?A.comment+=`
70
+ `+y.comment:A.comment=y.comment);const P=new or(A,k);if(n.options.keepSourceTokens&&(P.srcToken=O),o){const T=c;Nk(n,T.items,A)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),T.items.push(P)}else{const T=new zr(n.schema);T.flow=!0,T.items.push(P);const E=(k??A).range;T.range=[A.range[0],E[1],E[2]],c.items.push(T)}f=k?k.range[2]:y.end}}const d=o?"}":"]",[h,...m]=r.end;let p=f;if(h?.source===d)p=h.offset+h.source.length;else{const v=a[0].toUpperCase()+a.substring(1),O=u?`${v} must end with a ${d}`:`${v} in block collection must be sufficiently indented and end with a ${d}`;i(f,u?"MISSING_CHAR":"BAD_INDENT",O),h&&h.source.length!==1&&m.unshift(h)}if(m.length>0){const v=iu(m,p,n.options.strict,i);v.comment&&(c.comment?c.comment+=`
71
+ `+v.comment:c.comment=v.comment),c.range=[r.offset,p,v.offset]}else c.range=[r.offset,p,p];return c}function qh(t,e,n,r,i,s){const o=n.type==="block-map"?cQ(t,e,n,r,s):n.type==="block-seq"?uQ(t,e,n,r,s):fQ(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function dQ(t,e,n,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(n.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=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===zr.tagName&&a==="map"||o===Js.tagName&&a==="seq")return qh(t,e,n,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),qh(t,e,n,i,o)}const c=qh(t,e,n,i,o,l),u=l.resolve?.(c,d=>i(s,"TAG_RESOLVE_FAILED",d),e.options)??c,f=yn(u)?u:new ot(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function Ik(t,e,n){const r=e.offset,i=hQ(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?ot.BLOCK_FOLDED:ot.BLOCK_LITERAL,o=e.source?pQ(e.source):[];let a=o.length;for(let p=o.length-1;p>=0;--p){const v=o[p][1];if(v===""||v==="\r")a=p;else break}if(a===0){const p=i.chomp==="+"&&o.length>0?`
72
+ `.repeat(Math.max(1,o.length-1)):"";let v=r+i.length;return e.source&&(v+=e.source.length),{value:p,type:s,comment:i.comment,range:[r,v,v]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let p=0;p<a;++p){const[v,O]=o[p];if(O===""||O==="\r")i.indent===0&&v.length>l&&(l=v.length);else{v.length<l&&n(c+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=v.length),u=p,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=v.length+O.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[v,O]=o[p];c+=v.length+O.length+1;const b=O[O.length-1]==="\r";if(b&&(O=O.slice(0,-1)),O&&v.length<l){const S=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(c-O.length-(b?2:1),"BAD_INDENT",S),v=""}s===ot.BLOCK_LITERAL?(f+=d+v.slice(l)+O,d=`
74
+ `):v.length>l||O[0]===" "?(d===" "?d=`
75
+ `:!h&&d===`
76
+ `&&(d=`
77
+
78
+ `),f+=d+v.slice(l)+O,d=`
79
+ `,h=!0):O===""?d===`
80
+ `?f+=`
81
+ `:d=`
82
+ `:(f+=d+O,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 hQ({offset:t,props:e},n,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=t+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":n&&!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 pQ(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function Bk(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,l;const c=(d,h,m)=>n(r+d,h,m);switch(i){case"scalar":a=ot.PLAIN,l=mQ(s,c);break;case"single-quoted-scalar":a=ot.QUOTE_SINGLE,l=gQ(s,c);break;case"double-quoted-scalar":a=ot.QUOTE_DOUBLE,l=vQ(s,c);break;default:return n(t,"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=iu(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function mQ(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),jk(t)}function gQ(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),jk(t.slice(1,-1)).replace(/''/g,"'")}function jk(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
87
+ `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
88
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let i=r[1],s=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?s===`
89
+ `?i+=s:s=`
90
+ `:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+(r?.[1]??"")}function vQ(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
91
+ `))if(i===`
92
+ `){const{fold:s,offset:o}=OQ(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=bQ[s];if(o)n+=o;else if(s===`
93
+ `)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
94
+ `)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=yQ(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
95
+ `&&!(o==="\r"&&t[r+2]===`
96
+ `)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function OQ(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
97
+ `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
98
+ `);)r===`
99
+ `&&(n+=`
100
+ `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const bQ={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
101
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function yQ(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function zk(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?Ik(t,e,r):Bk(e,t.options.strict,r),l=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let c;t.options.stringKeys&&t.atKey?c=t.schema[ts]:l?c=wQ(t.schema,i,l,n,r):e.type==="scalar"?c=_Q(t,i,e,r):c=t.schema[ts];let u;try{const f=c.resolve(i,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);u=nn(f)?f:new ot(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),u=new ot(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 wQ(t,e,n,r,i){if(n==="!")return t[ts];const s=[];for(const a of t.tags)if(!a.collection&&a.tag===n)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=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ts])}function _Q({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[ts];if(n.compat){const a=n.compat.find(l=>l.default&&l.test?.test(r))??n[ts];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 kQ(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}const xQ={composeNode:Zk,composeEmptyNode:Bv};function Zk(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=n;let c,u=!0;switch(e.type){case"alias":c=SQ(t,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=zk(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=dQ(xQ,t,e,n,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=Bv(t,e.offset,void 0,null,n,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!nn(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),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Bv(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},c){const u={type:"scalar",offset:kQ(e,n,r),indent:-1,source:""},f=zk(t,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 SQ({options:t},{offset:e,source:n,end:r},i){const s=new Bd(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=iu(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function AQ(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),l=new Ud(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=Ga(r,{indicator:"doc-start",next:i??s?.[0],offset:n,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?Zk(c,i,u,o):Bv(c,u.end,r,null,u,o);const f=l.contents.range[2],d=iu(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function Pl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function ny(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
102
+
103
+ `:`
104
+ `)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class jv{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const o=Pl(n);s?this.warnings.push(new Dk(o,r,i)):this.errors.push(new Eo(o,r,i))},this.directives=new ur({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:i}=ny(this.prelude);if(r){const s=e.contents;if(n)e.comment=e.comment?`${e.comment}
105
+ ${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(On(s)&&!s.flow&&s.items.length>0){let o=s.items[0];pn(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}}n?(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:ny(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=Pl(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=AQ(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Eo(Pl(e),"UNEXPECTED_TOKEN",n);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 Eo(Pl(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=iu(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
108
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Eo(Pl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-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 Ud(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function CQ(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new Eo([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Bk(t,e,r);case"block-scalar":return Ik({options:{strict:e}},t,r)}}return null}function TQ(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=nu({type:o,value:t},{implicitKey:n,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 Fk(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 PQ(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=t.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=nu({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">":EQ(t,l);break;case'"':Rh(t,l,"double-quoted-scalar");break;case"'":Rh(t,l,"single-quoted-scalar");break;default:Rh(t,l,"scalar")}}function EQ(t,e){const n=e.indexOf(`
113
+ `),r=e.substring(0,n),i=e.substring(n+1)+`
114
+ `;if(t.type==="block-scalar"){const s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=i}else{const{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];Fk(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
115
+ `});for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function Fk(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Rh(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(const s of r)s.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
116
+ `};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const $Q=t=>"type"in t?If(t):mf(t);function If(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=If(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=mf(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=mf(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=mf(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function mf({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=If(e)),n)for(const s of n)i+=s.source;return r&&(i+=If(r)),i}const vm=Symbol("break visit"),QQ=Symbol("skip children"),Xk=Symbol("remove item");function Xo(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Vk(Object.freeze([]),t,e)}Xo.BREAK=vm;Xo.SKIP=QQ;Xo.REMOVE=Xk;Xo.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};Xo.parentCollection=(t,e)=>{const n=Xo.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Vk(t,e,n){let r=n(e,t);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=Vk(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===vm)return vm;a===Xk&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const Gd="\uFEFF",Hd="",Kd="",wc="",LQ=t=>!!t&&"items"in t,MQ=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function qQ(t){switch(t){case Gd:return"<BOM>";case Hd:return"<DOC>";case Kd:return"<FLOW_END>";case wc:return"<SCALAR>";default:return JSON.stringify(t)}}function Wk(t){switch(t){case Gd:return"byte-order-mark";case Hd:return"doc-mode";case Kd:return"flow-error-end";case wc: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(t[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 RQ=Object.freeze(Object.defineProperty({__proto__:null,BOM:Gd,DOCUMENT:Hd,FLOW_END:Kd,SCALAR:wc,createScalarToken:TQ,isCollection:LQ,isScalar:MQ,prettyToken:qQ,resolveAsScalar:CQ,setScalarValue:PQ,stringify:$Q,tokenType:Wk,visit:Xo},Symbol.toStringTag,{value:"Module"}));function mi(t){switch(t){case void 0:case" ":case`
119
+ `:case"\r":case" ":return!0;default:return!1}}const ry=new Set("0123456789ABCDEFabcdef"),DQ=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),_u=new Set(",[]{}"),NQ=new Set(` ,[]{}
120
+ \r `),Dh=t=>!t||NQ.has(t);class Yk{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,n=!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=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
121
+ `?!0:n==="\r"?this.buffer[e+1]===`
122
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const i=this.buffer[r+e+1];if(i===`
123
+ `||!i&&!this.atEnd)return e+r+1}return n===`
124
+ `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&mi(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]===Gd&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const s=e[r-1];if(s===" "||s===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const s=e[n-1];if(s===" "||s===" ")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Hd,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 n=this.peek(3);if((n==="---"||n==="...")&&mi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!mi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&mi(n)){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 n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);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(Dh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>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("..."))&&mi(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Kd,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(Dh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||mi(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 n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);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&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>mi(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
128
+ `:e=s,n=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(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n: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+n>a)e=s;else break}while(!0);return yield wc,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(mi(s)||e&&_u.has(s))break;n=r}else if(mi(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
133
+ `?(r+=1,i=`
134
+ `,s=this.buffer[r+1]):n=r),s==="#"||e&&_u.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&&_u.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield wc,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Dh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(mi(n)||e&&_u.has(n))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,n=this.buffer[e];for(;!mi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(DQ.has(n))n=this.buffer[++e];else if(n==="%"&&ry.has(this.buffer[e+1])&&ry.has(this.buffer[e+2]))n=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 n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class Uk{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<e?n=s+1:r=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function Ns(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function iy(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Gk(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ku(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ca(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function sy(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Ns(e.start,"explicit-key-ind")&&!Ns(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Gk(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 zv=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 Yk,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=Wk(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&sy(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,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:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&iy(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.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":{iy(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 n=this.startBlockValue(e);n?this.stack.push(n):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 n=ku(this.peek(2)),r=ca(n);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 n=this.source.indexOf(`
138
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
139
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.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 n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const l=n.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=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.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(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ns(n.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(Gk(n.key)&&!Ns(n.sep,"newline")){const o=ca(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Ns(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=ca(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ns(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{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||n.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Ns(n.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 n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.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 n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ns(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.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 n=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":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{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=ku(r),s=ca(i);sy(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 n=this.source.indexOf(`
140
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
141
+ `,n)+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 n=ku(e),r=ca(n);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 n=ku(e),r=ca(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!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 Hk(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Uk||null,prettyErrors:e}}function IQ(t,e={}){const{lineCounter:n,prettyErrors:r}=Hk(e),i=new zv(n?.addNewLine),s=new jv(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach(Nf(t,n)),a.warnings.forEach(Nf(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Kk(t,e={}){const{lineCounter:n,prettyErrors:r}=Hk(e),i=new zv(n?.addNewLine),s=new jv(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Eo(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(Nf(t,n)),o.warnings.forEach(Nf(t,n))),o}function BQ(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=Kk(t,n);if(!i)return null;if(i.warnings.forEach(s=>mk(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},n))}function jQ(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return ea(t)&&!r?t.toString(n):new Ud(t,r,n).toString(n)}const Bf=Object.freeze(Object.defineProperty({__proto__:null,Alias:Bd,CST:RQ,Composer:jv,Document:Ud,Lexer:Yk,LineCounter:Uk,Pair:or,Parser:zv,Scalar:ot,Schema:Mk,YAMLError:Iv,YAMLMap:zr,YAMLParseError:Eo,YAMLSeq:Js,YAMLWarning:Dk,isAlias:lo,isCollection:On,isDocument:ea,isMap:gl,isNode:yn,isPair:pn,isScalar:nn,isSeq:vl,parse:BQ,parseAllDocuments:IQ,parseDocument:Kk,stringify:jQ,visit:ta,visitAsync:Id},Symbol.toStringTag,{value:"Module"}));function zQ(t){const e=t.match(/^---\r?\n([\s\S]*?\r?\n)?---\r?\n?([\s\S]*)$/);if(!e)return{frontmatter:{},body:t};const n=Bf.parse(e[1]??"")??{},r=e[2];return{frontmatter:n,body:r}}function Nh(t,e){return Object.keys(t).length===0?e:`---
142
+ ${Bf.stringify(t,{lineWidth:0}).trimEnd()}
143
+ ---
144
+ ${e}`}let ZQ=class{#e=J(null);get tree(){return g(this.#e)}set tree(e){q(this.#e,e,!0)}#r=J(null);get currentPath(){return g(this.#r)}set currentPath(e){q(this.#r,e,!0)}#t=J("");get savedContent(){return g(this.#t)}set savedContent(e){q(this.#t,e,!0)}#i=J("");get editorContent(){return g(this.#i)}set editorContent(e){q(this.#i,e,!0)}#a=J(Ht({}));get frontmatter(){return g(this.#a)}set frontmatter(e){q(this.#a,e,!0)}#s=J("");get bodyContent(){return g(this.#s)}set bodyContent(e){q(this.#s,e,!0)}#n=J(!1);get frontmatterOpen(){return g(this.#n)}set frontmatterOpen(e){q(this.#n,e,!0)}#o=J(!1);get frontmatterRawMode(){return g(this.#o)}set frontmatterRawMode(e){q(this.#o,e,!0)}#l=J("blocks");get editorMode(){return g(this.#l)}set editorMode(e){q(this.#l,e,!0)}#c=J(!1);get treeLoading(){return g(this.#c)}set treeLoading(e){q(this.#c,e,!0)}#u=J(!1);get fileLoading(){return g(this.#u)}set fileLoading(e){q(this.#u,e,!0)}#f=J(!1);get saving(){return g(this.#f)}set saving(e){q(this.#f,e,!0)}#p=J(!1);get saveJustCompleted(){return g(this.#p)}set saveJustCompleted(e){q(this.#p,e,!0)}#h=J(null);get error(){return g(this.#h)}set error(e){q(this.#h,e,!0)}#m=J(Ht([]));get runes(){return g(this.#m)}set runes(e){q(this.#m,e,!0)}#g=J(Ht([]));get routeRules(){return g(this.#g)}set routeRules(e){q(this.#g,e,!0)}#d=J("desktop");get viewport(){return g(this.#d)}set viewport(e){q(this.#d,e,!0)}#w=J("light");get previewTheme(){return g(this.#w)}set previewTheme(e){q(this.#w,e,!0)}#_=J("");get themeCss(){return g(this.#_)}set themeCss(e){q(this.#_,e,!0)}#k=J(null);get themeConfig(){return g(this.#k)}set themeConfig(e){q(this.#k,e,!0)}#b=J(null);get highlightTransform(){return g(this.#b)}set highlightTransform(e){q(this.#b,e,!0)}#v=J("");get highlightCss(){return g(this.#v)}set highlightCss(e){q(this.#v,e,!0)}#O=J(!1);get previewRuntimeAvailable(){return g(this.#O)}set previewRuntimeAvailable(e){q(this.#O,e,!0)}#y=J(!1);get previewRuntimeReady(){return g(this.#y)}set previewRuntimeReady(e){q(this.#y,e,!0)}#x=J(Ht(new Set));get expandedDirs(){return g(this.#x)}set expandedDirs(e){q(this.#x,e,!0)}#S=J(null);get externalChange(){return g(this.#S)}set externalChange(e){q(this.#S,e,!0)}#A=J(null);get communityTags(){return g(this.#A)}set communityTags(e){q(this.#A,e,!0)}#C=J(null);get communityPostTransforms(){return g(this.#C)}set communityPostTransforms(e){q(this.#C,e,!0)}#T=J(null);get communityStyles(){return g(this.#T)}set communityStyles(e){q(this.#T,e,!0)}#P=J(Ht({}));get aggregated(){return g(this.#P)}set aggregated(e){q(this.#P,e,!0)}#E=J(!0);get sidenavOpen(){return g(this.#E)}set sidenavOpen(e){q(this.#E,e,!0)}#$=ge(()=>this.editorContent!==this.savedContent);get dirty(){return g(this.#$)}set dirty(e){q(this.#$,e)}#Q=ge(()=>this.currentPath?.endsWith("_layout.md")?"layout":"page");get currentFileType(){return g(this.#Q)}set currentFileType(e){q(this.#Q,e)}loadFile(e,n){const{frontmatter:r,body:i}=zQ(n);this.currentPath=e,this.savedContent=n,this.editorContent=n,this.frontmatter=r,this.bodyContent=i,this.frontmatterRawMode=!1}updateBody(e){this.bodyContent=e,this.editorContent=Nh(this.frontmatter,e)}updateFrontmatterField(e,n){if(n===void 0||n===""||Array.isArray(n)&&n.length===0){const{[e]:r,...i}=this.frontmatter;this.frontmatter=i}else this.frontmatter={...this.frontmatter,[e]:n};this.editorContent=Nh(this.frontmatter,this.bodyContent)}replaceFrontmatter(e){this.frontmatter=e,this.editorContent=Nh(e,this.bodyContent)}toggleDir(e){const n=new Set(this.expandedDirs);n.has(e)?n.delete(e):n.add(e),this.expandedDirs=n}isDirExpanded(e){return this.expandedDirs.has(e)}};const X=new ZQ;var FQ=W('<div class="header__group svelte-1q0qpei"><button>Edit</button> <button>Preview</button></div>'),XQ=W('<span class="header__sep svelte-1q0qpei">/</span>'),VQ=W('<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>'),WQ=W('<span class="header__crumb svelte-1q0qpei"> </span>'),YQ=W("<!> <!>",1),UQ=W('<span class="header__dot svelte-1q0qpei" title="Unsaved changes"></span>'),GQ=W('<nav class="header__breadcrumbs svelte-1q0qpei" aria-label="File path"><!> <!></nav>'),HQ=W('<span class="header__error svelte-1q0qpei"> </span>'),KQ=W('<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),JQ=W('<div class="header__group svelte-1q0qpei"><button>Code</button> <button>Blocks</button></div>'),e5=Ps('<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),t5=W('<button><!> <kbd class="header__kbd svelte-1q0qpei"></kbd></button>'),n5=W('<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 r5(t,e){dt(e,!0);let n=ge(()=>X.currentPath?X.currentPath.split("/"):[]);const r=ge(()=>X.currentPath&&X.currentFileType!=="layout"),i=ge(()=>X.editorMode==="preview"),s=ge(()=>X.editorMode==="blocks"||X.editorMode==="code");var o=n5(),a=R(o);a.__click=()=>{X.sidenavOpen=!X.sidenavOpen};var l=D(a,2);{var c=b=>{var w=FQ(),S=R(w);let _;S.__click=()=>{X.editorMode="blocks"};var x=D(S,2);let C;x.__click=()=>{X.editorMode="preview"},ce(()=>{_=je(S,1,"header__btn svelte-1q0qpei",null,_,{"header__btn--active":g(s)}),C=je(x,1,"header__btn svelte-1q0qpei",null,C,{"header__btn--active":g(i)})}),z(b,w)};le(l,b=>{g(r)&&b(c)})}var u=D(l,2);{var f=b=>{var w=GQ(),S=R(w);Ct(S,17,()=>g(n),Yt,(C,A,y)=>{var k=YQ(),P=tt(k);{var T=L=>{var N=XQ();z(L,N)};le(P,L=>{y>0&&L(T)})}var E=D(P,2);{var Q=L=>{var N=VQ(),Z=D(R(N));ce(()=>Te(Z,` ${g(A)??""}`)),z(L,N)},$=L=>{var N=WQ(),Z=R(N);ce(()=>Te(Z,g(A))),z(L,N)};le(E,L=>{y===g(n).length-1?L(Q):L($,!1)})}z(C,k)});var _=D(S,2);{var x=C=>{var A=UQ();z(C,A)};le(_,C=>{X.dirty&&C(x)})}z(b,w)};le(u,b=>{X.currentPath&&b(f)})}var d=D(u,2);{var h=b=>{var w=HQ(),S=R(w);ce(()=>Te(S,X.error)),z(b,w)};le(d,b=>{X.error&&b(h)})}var m=D(d,4);{var p=b=>{var w=an(),S=tt(w);{var _=C=>{var A=KQ(),y=tt(A),k=R(y);let P;k.__click=()=>X.viewport="desktop";var T=D(k,2);let E;T.__click=()=>X.viewport="tablet";var Q=D(T,2);let $;Q.__click=()=>X.viewport="mobile";var L=D(y,4),N=R(L);let Z;N.__click=()=>X.previewTheme="light";var Y=D(N,2);let ne;Y.__click=()=>X.previewTheme="dark",ce(()=>{P=je(k,1,"header__btn header__btn--icon svelte-1q0qpei",null,P,{"header__btn--active":X.viewport==="desktop"}),E=je(T,1,"header__btn header__btn--icon svelte-1q0qpei",null,E,{"header__btn--active":X.viewport==="tablet"}),$=je(Q,1,"header__btn header__btn--icon svelte-1q0qpei",null,$,{"header__btn--active":X.viewport==="mobile"}),Z=je(N,1,"header__btn header__btn--icon svelte-1q0qpei",null,Z,{"header__btn--active":X.previewTheme==="light"}),ne=je(Y,1,"header__btn header__btn--icon svelte-1q0qpei",null,ne,{"header__btn--active":X.previewTheme==="dark"})}),z(C,A)},x=C=>{var A=JQ(),y=R(A);let k;y.__click=()=>{X.editorMode="code"};var P=D(y,2);let T;P.__click=()=>{X.editorMode="blocks"},ce(()=>{k=je(y,1,"header__btn svelte-1q0qpei",null,k,{"header__btn--active":X.editorMode==="code"}),T=je(P,1,"header__btn svelte-1q0qpei",null,T,{"header__btn--active":X.editorMode==="blocks"})}),z(C,A)};le(S,C=>{g(i)?C(_):g(s)&&C(x,1)})}z(b,w)};le(m,b=>{g(r)&&b(p)})}var v=D(m,2);{var O=b=>{var w=t5();let S;w.__click=function(...k){e.onsave?.apply(this,k)};var _=R(w);{var x=k=>{var P=e5();z(k,P)},C=k=>{var P=Zb("Saving...");z(k,P)},A=k=>{var P=Zb("Save");z(k,P)};le(_,k=>{X.saveJustCompleted?k(x):X.saving?k(C,1):k(A,!1)})}var y=D(_,2);y.textContent=`${navigator.platform.includes("Mac")?"⌘":"Ctrl"}S`,ce(()=>{S=je(w,1,"header__btn header__btn--active svelte-1q0qpei",null,S,{"header__btn--success":X.saveJustCompleted}),w.disabled=!X.dirty||X.saving}),z(b,w)};le(v,b=>{X.currentPath&&b(O)})}ce(()=>St(a,"title",X.sidenavOpen?"Hide sidebar":"Show sidebar")),z(t,o),ht()}Vt(["click"]);var i5=W('<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 s5(t,e){dt(e,!0);let n=J(0),r=ge(()=>X.editorMode==="code"?"1fr 1fr":"0px 1fr");const i=ge(()=>Math.floor(Math.max(0,g(n))/2));var s=i5();let o;var a=R(s);$r(a,"width: 360px");var l=R(a);wa(l,()=>e.left);var c=D(a,2),u=R(c),f=R(u);wa(f,()=>e.header);var d=D(u,2),h=R(d),m=R(h);let p;var v=R(m);wa(v,()=>e.center);var O=D(h,2),b=R(O);wa(b,()=>e.right),ce(()=>{o=je(s,1,"layout svelte-c9ce7p",null,o,{"layout--sidenav-closed":!X.sidenavOpen}),$r(d,`grid-template-columns: ${g(r)??""}`),p=je(m,1,"layout__center-inner svelte-c9ce7p",null,p,{"slide-out":X.editorMode!=="code"}),$r(m,`min-width: ${g(i)??""}px`)}),P$(c,"clientWidth",w=>q(n,w)),z(t,s),ht()}var o5=Ps('<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>'),a5=Ps('<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>'),l5=W('<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>'),c5=W('<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>'),u5=W('<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>'),f5=W('<span class="tree-item__badge svelte-150vzea">Draft</span>'),d5=W('<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>'),h5=W("<!> <!>",1),p5=W("<!> <!>",1);function Om(t,e){dt(e,!0);function n(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=ge(()=>X.isDirExpanded(e.node.path||e.node.name));var o=an(),a=tt(o);{var l=c=>{var u=p5(),f=tt(u);{var d=p=>{var v=c5();v.__click=i,v.__keydown=k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i())},v.__contextmenu=k=>n(k,e.node);var O=R(v);let b;var w=D(O,2);{var S=k=>{var P=o5();z(k,P)},_=k=>{var P=a5();z(k,P)};le(w,k=>{g(s)?k(S):k(_,!1)})}var x=D(w,2),C=R(x),A=D(x,2);{var y=k=>{var P=l5();P.__click=T=>{T.stopPropagation(),e.onnewpage(e.node.path,T.currentTarget.getBoundingClientRect())},ce(()=>St(P,"title",`New page in ${e.node.name??""}`)),z(k,P)};le(A,k=>{e.onnewpage&&k(y)})}ce(()=>{$r(v,`--depth: ${e.depth-1}`),b=je(O,0,"tree-dir__chevron svelte-150vzea",null,b,{collapsed:!g(s)}),Te(C,e.node.name)}),z(p,v)};le(f,p=>{e.depth>0&&p(d)})}var h=D(f,2);{var m=p=>{var v=h5(),O=tt(v);{var b=S=>{var _=u5();let x;_.__click=()=>r(e.node.layout.path),_.__contextmenu=C=>n(C,e.node.layout),ce(()=>{x=je(_,1,"tree-item tree-item--layout svelte-150vzea",null,x,{active:X.currentPath===e.node.layout.path}),$r(_,`--depth: ${e.depth??""}`)}),z(S,_)};le(O,S=>{e.node.layout&&S(b)})}var w=D(O,2);Ct(w,17,()=>e.node.children??[],Yt,(S,_)=>{var x=an(),C=tt(x);{var A=k=>{{let P=ge(()=>e.depth+1);Om(k,{get node(){return g(_)},get depth(){return g(P)},get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})}},y=k=>{var P=d5();let T;P.__click=()=>r(g(_).path),P.__contextmenu=N=>n(N,g(_));var E=D(R(P),2),Q=R(E),$=D(E,2);{var L=N=>{var Z=f5();z(N,Z)};le($,N=>{g(_).draft&&N(L)})}ce(()=>{T=je(P,1,"tree-item svelte-150vzea",null,T,{active:X.currentPath===g(_).path}),$r(P,`--depth: ${e.depth??""}`),Te(Q,g(_).name)}),z(k,P)};le(C,k=>{g(_).type==="directory"?k(A):k(y,!1)})}z(S,x)}),z(p,v)};le(h,p=>{(e.depth===0||g(s))&&p(m)})}z(c,u)};le(a,c=>{e.node.type==="directory"&&c(l)})}z(t,o),ht()}Vt(["click","keydown","contextmenu"]);var m5=W('<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>'),g5=W('<span class="tree-item__badge svelte-z46wvt">Draft</span>'),v5=W('<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>'),O5=W('<div class="cat-nav__empty svelte-z46wvt">No content yet</div>'),b5=W('<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>'),y5=W('<div class="cat-nav__list svelte-z46wvt"></div>'),w5=W('<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 _5(t,e){dt(e,!0);function n(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=ge(()=>{const d=X.tree,h=X.routeRules;if(!d)return[];const m=[],p=new Set;for(const O of h){const b=n(O.pattern);if(!b)continue;const w=d.children?.find(S=>S.type==="directory"&&S.name===b)??null;p.add(b),m.push({name:r(b),pattern:O.pattern,layout:O.layout,dirPrefix:b,treeNode:w,rootPages:[]})}const v=(d.children??[]).filter(O=>O.type!=="directory"||!p.has(O.name));return m.unshift({name:"Pages",pattern:"**",layout:"default",dirPrefix:"",treeNode:null,rootPages:v}),m});var s=w5(),o=R(s),a=D(R(o),2),l=R(a);l.__click=d=>e.onnewcategory(d.currentTarget.getBoundingClientRect());var c=D(o,2);{var u=d=>{var h=m5();z(d,h)},f=d=>{var h=y5();Ct(h,21,()=>g(i),Yt,(m,p)=>{var v=b5(),O=R(v),b=R(O),w=R(b),S=D(b,2);S.__click=y=>{const k=y.currentTarget.getBoundingClientRect();e.onnewpage(g(p).dirPrefix||void 0,k)};var _=D(O,2);{var x=y=>{Om(y,{get node(){return g(p).treeNode},depth:0,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},C=y=>{var k=an(),P=tt(k);Ct(P,17,()=>g(p).rootPages,Yt,(T,E)=>{var Q=an(),$=tt(Q);{var L=Z=>{Om(Z,{get node(){return g(E)},depth:1,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},N=Z=>{var Y=v5();let ne;Y.__click=()=>e.onselectfile(g(E).path),Y.__contextmenu=fe=>{e.oncontextmenu&&(fe.preventDefault(),e.oncontextmenu(fe,g(E)))};var ae=D(R(Y),2),ie=R(ae),K=D(ae,2);{var he=fe=>{var j=g5();z(fe,j)};le(K,fe=>{g(E).draft&&fe(he)})}ce(()=>{ne=je(Y,1,"tree-item svelte-z46wvt",null,ne,{active:X.currentPath===g(E).path}),Te(ie,g(E).name)}),z(Z,Y)};le($,Z=>{g(E).type==="directory"?Z(L):Z(N,!1)})}z(T,Q)}),z(y,k)},A=y=>{var k=O5();z(y,k)};le(_,y=>{g(p).dirPrefix&&g(p).treeNode?y(x):g(p).dirPrefix?y(A,!1):y(C,1)})}ce(()=>{Te(w,g(p).name),St(S,"title",`Add to ${g(p).name??""}`)}),z(m,v)}),z(d,h)};le(c,d=>{X.treeLoading?d(u):d(f,!1)})}z(t,s),ht()}Vt(["click","contextmenu"]);var k5=W('<span class="tags-input__tag svelte-14skhb7"> <button class="tags-input__remove svelte-14skhb7">&times;</button></span>'),x5=W('<div class="tags-input svelte-14skhb7"><!> <input class="tags-input__field svelte-14skhb7" type="text"/></div>');function Jk(t,e){dt(e,!0);let n=J("");function r(c){const u=c.trim();u&&!e.tags.includes(u)&&e.onchange([...e.tags,u]),q(n,"")}function i(c){e.onchange(e.tags.filter((u,f)=>f!==c))}function s(c){c.key==="Enter"||c.key===","?(c.preventDefault(),r(g(n))):c.key==="Backspace"&&g(n)===""&&e.tags.length>0&&i(e.tags.length-1)}var o=x5(),a=R(o);Ct(a,17,()=>e.tags,Yt,(c,u,f)=>{var d=k5(),h=R(d),m=D(h);m.__click=()=>i(f),ce(()=>{Te(h,`${g(u)??""} `),St(m,"aria-label",`Remove ${g(u)??""}`)}),z(c,d)});var l=D(a,2);l.__keydown=s,ce(()=>St(l,"placeholder",e.tags.length===0?"Add tags...":"")),st("blur",l,()=>{g(n).trim()&&r(g(n))}),Qn(l,()=>g(n),c=>q(n,c)),z(t,o),ht()}Vt(["click","keydown"]);var S5=W('<div class="raw-yaml__error svelte-30mbeg"> </div>'),A5=W('<div class="raw-yaml svelte-30mbeg"><textarea></textarea> <!></div>');function C5(t,e){dt(e,!0);let n=J(""),r=J(null);hn(()=>{if(X.frontmatterRawMode){const u=Object.keys(X.frontmatter);q(n,u.length>0?Bf.stringify(X.frontmatter,{lineWidth:0}).trimEnd():"",!0)}});function i(u){const f=u.target.value;if(q(n,f,!0),q(r,null),f.trim()===""){X.replaceFrontmatter({});return}try{const d=Bf.parse(f);d&&typeof d=="object"?X.replaceFrontmatter(d):q(r,"YAML must be an object")}catch(d){q(r,d instanceof Error?d.message:"Invalid YAML",!0)}}var s=A5(),o=R(s);let a;o.__input=i,St(o,"spellcheck",!1);var l=D(o,2);{var c=u=>{var f=S5(),d=R(f);ce(()=>Te(d,g(r))),z(u,f)};le(l,u=>{g(r)&&u(c)})}ce(()=>{a=je(o,1,"raw-yaml__editor svelte-30mbeg",null,a,{error:g(r)!==null}),sn(o,g(n))}),z(t,s),ht()}Vt(["input"]);var T5=W('<span class="fm-editor__summary-desc svelte-7izpdj"> </span>'),P5=W('<span class="fm-editor__summary svelte-7izpdj"> <!></span>'),E5=W('<div class="fm-editor__mode-track svelte-7izpdj"><button>Form</button> <button>YAML</button></div>'),$5=W('<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>'),Q5=W('<div class="fm-editor__custom-section svelte-7izpdj"><span class="fm-editor__section-label svelte-7izpdj">Custom fields</span> <!></div>'),L5=W('<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>'),M5=W('<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 q5(t,e){dt(e,!0);let n=xt(e,"forceRawMode",3,!1);hn(()=>{n()&&(X.frontmatterRawMode=!0)});const r=new Set(["title","description","tags","draft","order","date","author","slug"]);let i=J(""),s=ge(()=>Object.entries(X.frontmatter).filter(([p])=>!r.has(p))),o=ge(()=>X.currentFileType==="layout"),a=ge(()=>X.frontmatter.title||""),l=ge(()=>()=>{const p=X.frontmatter.description||"";return p.length>60?p.slice(0,60)+"...":p});function c(p,v){X.updateFrontmatterField(p,v)}function u(){const p=g(i).trim();!p||p in X.frontmatter||(X.updateFrontmatterField(p,""),q(i,""))}function f(p){X.updateFrontmatterField(p,void 0)}var d=an(),h=tt(d);{var m=p=>{var v=M5();let O;var b=R(v);b.__click=()=>{X.frontmatterOpen=!X.frontmatterOpen},b.__keydown=N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),X.frontmatterOpen=!X.frontmatterOpen)};var w=R(b);let S;var _=D(w,2),x=D(R(_));{var C=N=>{var Z=P5(),Y=R(Z),ne=D(Y);{var ae=K=>{var he=T5(),fe=R(he);ce(j=>Te(fe,`— ${j??""}`),[()=>g(l)()]),z(K,he)},ie=ge(()=>g(l)());le(ne,K=>{g(ie)&&K(ae)})}ce(()=>Te(Y,`${g(a)??""} `)),z(N,Z)};le(x,N=>{!X.frontmatterOpen&&g(a)&&N(C)})}var A=D(_,2);{var y=N=>{var Z=E5();Z.__click=K=>K.stopPropagation(),Z.__keydown=K=>K.stopPropagation();var Y=R(Z);let ne;Y.__click=()=>{X.frontmatterRawMode=!1};var ae=D(Y,2);let ie;ae.__click=()=>{X.frontmatterRawMode=!0},ce(()=>{ne=je(Y,1,"fm-editor__mode-btn svelte-7izpdj",null,ne,{active:!X.frontmatterRawMode}),ie=je(ae,1,"fm-editor__mode-btn svelte-7izpdj",null,ie,{active:X.frontmatterRawMode})}),z(N,Z)};le(A,N=>{X.frontmatterOpen&&!n()&&N(y)})}var k=D(b,2);let P;var T=R(k),E=R(T),Q=R(E);{var $=N=>{C5(N,{})},L=N=>{var Z=L5(),Y=R(Z),ne=D(R(Y),2);ne.__input=xe=>c("title",xe.target.value);var ae=D(Y,2),ie=D(R(ae),2);ie.__input=xe=>c("description",xe.target.value),St(ie,"rows",2);var K=D(ae,2),he=D(R(K),2);he.__input=xe=>c("slug",xe.target.value);var fe=D(K,2),j=R(fe),U=D(R(j),2);U.__input=xe=>c("author",xe.target.value);var ue=D(j,2),ke=D(R(ue),2);ke.__input=xe=>c("date",xe.target.value);var Ce=D(fe,2),ve=R(Ce),Ee=D(R(ve),2);Ee.__input=xe=>{const Yn=xe.target.value;c("order",Yn===""?void 0:Number(Yn))};var rt=D(ve,2),Ke=D(R(rt),2);let Ye;Ke.__click=()=>c("draft",X.frontmatter.draft===!0?void 0:!0),Ke.__keydown=xe=>{(xe.key==="Enter"||xe.key===" ")&&(xe.preventDefault(),c("draft",X.frontmatter.draft===!0?void 0:!0))};var Ve=D(R(Ke),2),ze=R(Ve),Bt=D(Ce,2),In=D(R(Bt),2);{let xe=ge(()=>X.frontmatter.tags??[]);Jk(In,{get tags(){return g(xe)},onchange:Yn=>c("tags",Yn)})}var tr=D(Bt,2);{var bt=xe=>{var Yn=Q5(),Lt=D(R(Yn),2);Ct(Lt,17,()=>g(s),Yt,(Jt,_n)=>{var se=ge(()=>Kc(g(_n),2));let Oe=()=>g(se)[0],_e=()=>g(se)[1];var Ae=$5(),Qe=R(Ae),yt=R(Qe),ct=D(Qe,2),Ue=R(ct);Ue.__input=pt=>c(Oe(),pt.target.value);var wt=D(Ue,2);wt.__click=()=>f(Oe()),ce(pt=>{Te(yt,Oe()),sn(Ue,pt),St(wt,"aria-label",`Remove ${Oe()??""}`)},[()=>String(_e()??"")]),z(Jt,Ae)}),z(xe,Yn)};le(tr,xe=>{g(s).length>0&&xe(bt)})}var Wt=D(tr,2),mn=R(Wt);mn.__keydown=xe=>{xe.key==="Enter"&&(xe.preventDefault(),u())};var Wn=D(mn,2);Wn.__click=u,ce(xe=>{sn(ne,X.frontmatter.title??""),sn(ie,X.frontmatter.description??""),sn(he,X.frontmatter.slug??""),sn(U,X.frontmatter.author??""),sn(ke,X.frontmatter.date??""),sn(Ee,X.frontmatter.order??""),Ye=je(Ke,1,"fm-toggle svelte-7izpdj",null,Ye,{active:X.frontmatter.draft===!0}),St(Ke,"aria-checked",X.frontmatter.draft===!0),Te(ze,X.frontmatter.draft===!0?"Draft":"Published"),Wn.disabled=xe},[()=>!g(i).trim()]),Qn(mn,()=>g(i),xe=>q(i,xe)),z(N,Z)};le(Q,N=>{X.frontmatterRawMode?N($):N(L,!1)})}ce(()=>{O=je(v,1,"fm-editor svelte-7izpdj",null,O,{"fm-editor--layout":g(o)}),S=je(w,0,"fm-editor__chevron svelte-7izpdj",null,S,{collapsed:!X.frontmatterOpen}),P=je(k,1,"fm-editor__collapse svelte-7izpdj",null,P,{open:X.frontmatterOpen})}),z(p,v)};le(h,p=>{X.currentPath&&p(m)})}z(t,d),ht()}Vt(["click","keydown","input"]);let bm=[],e2=[];(()=>{let t="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,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?e2:bm).push(n=n+t[e])})();function R5(t){if(t<768)return!1;for(let e=0,n=bm.length;;){let r=e+n>>1;if(t<bm[r])n=r;else if(t>=e2[r])e=r+1;else return!0;if(e==n)return!1}}function oy(t){return t>=127462&&t<=127487}const ay=8205;function D5(t,e,n=!0,r=!0){return(n?t2:N5)(t,e,r)}function t2(t,e,n){if(e==t.length)return e;e&&n2(t.charCodeAt(e))&&r2(t.charCodeAt(e-1))&&e--;let r=Ih(t,e);for(e+=ly(r);e<t.length;){let i=Ih(t,e);if(r==ay||i==ay||n&&R5(i))e+=ly(i),r=i;else if(oy(i)){let s=0,o=e-2;for(;o>=0&&oy(Ih(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function N5(t,e,n){for(;e>0;){let r=t2(t,e-2,n);if(r<e)return r;e--}return 0}function Ih(t,e){let n=t.charCodeAt(e);if(!r2(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return n2(r)?(n-55296<<10)+(r-56320)+65536:n}function n2(t){return t>=56320&&t<57344}function r2(t){return t>=55296&&t<56320}function ly(t){return t<65536?1:2}let It=class i2{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,n,r){[e,n]=Ha(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Fi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Ha(this,e,n);let r=[];return this.decompose(e,n,r,0),Fi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new ac(this),s=new ac(e);for(let o=n,a=n;;){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 ac(this,e)}iterRange(e,n=this.length){return new s2(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new o2(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]?i2.empty:e.length<=32?new An(e):Fi.from(An.split(e,[]))}};class An extends It{constructor(e,n=I5(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((n?r:a)>=e)return new B5(i,a,r,o);i=a+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new An(cy(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=gf(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,n,r){if(!(r instanceof An))return super.replace(e,n,r);[e,n]=Ha(this,e,n);let i=gf(this.text,gf(r.text,cy(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new An(i,s):Fi.from(An.split(i,[]),s)}sliceString(e,n=this.length,r=`
145
+ `){[e,n]=Ha(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new An(r,i)),r=[],i=-1);return i>-1&&n.push(new An(r,i)),n}}class Fi extends It{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let c=i&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?r.push(a):a.decompose(e-o,n-o,r,c)}o=l+1}}replace(e,n,r){if([e,n]=Ha(this,e,n),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&&n<=a){let l=o.replace(e-s,n-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 Fi(u,this.length-(n-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
146
+ `){[e,n]=Ha(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.sliceString(e-o,n-o,r)),o=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Fi))return 0;let r=0,[i,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=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,n)}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 Fi)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]:Fi.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new Fi(a,n)}}It.empty=new An([""],0);function I5(t){let e=-1;for(let n of t)e+=n.length+1;return e}function gf(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function cy(t,e,n){return gf(t,[""],e,n)}class ac{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof An?e.text.length:e.children.length)<<1]}nextInner(e,n){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==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
147
+ `,this;e--}else if(i instanceof An){let l=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>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 s2{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new ac(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<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)*n,this.value=i.length<=r?i:n<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 o2{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(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"&&(It.prototype[Symbol.iterator]=function(){return this.iter()},ac.prototype[Symbol.iterator]=s2.prototype[Symbol.iterator]=o2.prototype[Symbol.iterator]=function(){return this});let B5=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function Ha(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Xn(t,e,n=!0,r=!0){return D5(t,e,n,r)}function j5(t){return t>=56320&&t<57344}function z5(t){return t>=55296&&t<56320}function Is(t,e){let n=t.charCodeAt(e);if(!z5(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return j5(r)?(n-55296<<10)+(r-56320)+65536:n}function a2(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function ko(t){return t<65536?1:2}const ym=/\r\n?|\n/;var dr=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(dr||(dr={}));class Hi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){wm(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Hi(e)}composeDesc(e){return this.empty?e:e.empty?this:l2(this,e)}mapDesc(e,n=!1){return e.empty?this:_m(this,e,n)}mapPos(e,n=-1,r=dr.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!=dr.Simple&&c>=e&&(r==dr.TrackDel&&i<e&&c>e||r==dr.TrackBefore&&i<e||r==dr.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<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,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Hi(e)}static create(e){return new Hi(e)}}class Dn extends Hi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return wm(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return _m(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(It.empty);r.push(o?e.slice(s,s+o):It.empty)}s+=o}return new Dn(n,r)}compose(e){return this.empty?e:e.empty?this:l2(this,e,!0)}map(e,n=!1){return e.empty?this:_m(this,e,n,!0)}iterChanges(e,n=!1){wm(this,e,n)}get desc(){return Hi.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new _c(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);sr(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;sr(n,u,f),f>0&&Fs(r,n,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);sr(n,u,-1),sr(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new Dn(n,r),filtered:Hi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<n&&sr(i,n-o,-1);let f=new Dn(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 Dn){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);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>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let m=h?typeof h=="string"?It.of(h.split(r||ym)):h:It.empty,p=m.length;if(f==d&&p==0)return;f<o&&l(),f>o&&sr(i,f-o,-1),sr(i,d-f,p),Fs(s,i,m),o=d}}return c(e),l(!a),a}static empty(e){return new Dn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.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)n.push(s[0],0);else{for(;r.length<i;)r.push(It.empty);r[i]=It.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new Dn(n,r)}static createSet(e,n){return new Dn(e,n)}}function sr(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Fs(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(It.empty);t.push(n)}}function wm(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,f=It.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function _m(t,e,n,r=!1){let i=[],s=r?[]:null,o=new _c(t),a=new _c(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);sr(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&&!n))){let c=a.len;for(sr(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(sr(i,0,o.ins),s&&Fs(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;sr(i,c,l<o.i?o.ins:0),s&&l<o.i&&Fs(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?Dn.createSet(i,s):Hi.create(i);throw new Error("Mismatched change set lengths")}}}function l2(t,e,n=!1){let r=[],i=n?[]:null,s=new _c(t),o=new _c(e);for(let a=!1;;){if(s.done&&o.done)return i?Dn.createSet(r,i):Hi.create(r);if(s.ins==0)sr(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)sr(r,0,o.ins,a),i&&Fs(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;sr(r,l,u,a),i&&u&&Fs(i,r,o.text)}else o.ins==-1?(sr(r,s.off?0:s.len,l,a),i&&Fs(i,r,s.textBit(l))):(sr(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Fs(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 _c{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,n=this.i-2>>1;return n>=e.length?It.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?It.empty:n[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 $o{constructor(e,n,r){this.from=e,this.to=n,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,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new $o(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return me.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return me.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!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 me.range(e.anchor,e.head)}static create(e,n,r){return new $o(e,n,r)}}class me{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:me.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!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],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new me([this.main],0)}addRange(e,n=!0){return me.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,me.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 me(e.ranges.map(n=>$o.fromJSON(n)),e.main)}static single(e,n=e){return new me([me.range(e,n)],0)}static create(e,n=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 me.normalized(e.slice(),n);r=s.to}return new me(e,n)}static cursor(e,n=0,r,i){return $o.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?$o.create(n,e,48|s):$o.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=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<=n&&n--,e.splice(--i,2,s.anchor>s.head?me.range(l,a):me.range(a,l))}}return new me(e,n)}}function c2(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Zv=0;class Ne{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Zv++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ne(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Fv),!!e.static,e.enables)}of(e){return new vf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Fv(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class vf{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Zv++}dynamicSlot(e){var n;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:(((n=e[f.id])!==null&&n!==void 0?n: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)||km(f,u)){let h=r(f);if(a?!uy(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=zf(d,m);if(this.dependencies.every(v=>v instanceof Ne?d.facet(v)===f.facet(v):v instanceof di?d.field(v,!1)==f.field(v,!1):!0)||(a?uy(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 uy(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function km(t,e){let n=!1;for(let r of e)lc(t,r)&1&&(n=!0);return n}function Z5(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),s=r.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=zf(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)lc(l,c);return l.values[o]=a(l),1},update(l,c){if(!km(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=km(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&Fv(n,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 xu=Ne.define({static:!0});class di{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new di(Zv++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(xu).find(r=>r.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(xu),o=i.facet(xu),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,xu.of({field:this,create:e})]}get extension(){return this}}const xo={lowest:4,low:3,default:2,high:1,highest:0};function El(t){return e=>new u2(e,t)}const co={highest:El(xo.highest),high:El(xo.high),default:El(xo.default),low:El(xo.low),lowest:El(xo.lowest)};class u2{constructor(e,n){this.inner=e,this.prec=n}}class ws{of(e){return new xm(this,e)}reconfigure(e){return ws.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class xm{constructor(e,n){this.compartment=e,this.inner=n}}class jf{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,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 n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let d of F5(e,n,o))d instanceof di?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(v=>v.type==0))if(a[m.id]=l.length<<1|1,Fv(p,h))l.push(r.facet(m));else{let v=m.combine(h.map(O=>O.value));l.push(r&&m.compare(v,r.facet(m))?r.facet(m):v)}else{for(let v of h)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=c.length<<1,c.push(O=>v.dynamicSlot(O)));a[m.id]=c.length<<1,c.push(v=>Z5(v,m,h))}}let f=c.map(d=>d(a));return new jf(e,o,f,a,l,s)}}function F5(t,e,n){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 xm&&n.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof xm){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof u2)s(o.inner,o.prec);else if(o instanceof di)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof vf)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,xo.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(t,xo.default),r.reduce((o,a)=>o.concat(a))}function lc(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function zf(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const f2=Ne.define(),Sm=Ne.define({combine:t=>t.some(e=>e),static:!0}),d2=Ne.define({combine:t=>t.length?t[0]:void 0,static:!0}),h2=Ne.define(),p2=Ne.define(),m2=Ne.define(),g2=Ne.define({combine:t=>t.length?t[0]:!1});class Es{constructor(e,n){this.type=e,this.value=n}static define(){return new X5}}class X5{of(e){return new Es(this,e)}}class V5{constructor(e){this.map=e}of(e){return new Qt(this,e)}}class Qt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Qt(this.type,n)}is(e){return this.type==e}static define(e={}){return new V5(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Qt.reconfigure=Qt.define();Qt.appendConfig=Qt.define();class En{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&c2(r,n.newLength),s.some(a=>a.type==En.time)||(this.annotations=s.concat(En.time.of(Date.now())))}static create(e,n,r,i,s,o){return new En(e,n,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 n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(En.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}En.time=Es.define();En.userEvent=Es.define();En.addToHistory=Es.define();En.remote=Es.define();function W5(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function v2(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=Dn.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Qt.mapEffects(t.effects,i).concat(Qt.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Am(t,e,n){let r=e.selection,i=Ra(e.annotations);return e.userEvent&&(i=i.concat(En.userEvent.of(e.userEvent))),{changes:e.changes instanceof Dn?e.changes:Dn.of(e.changes||[],n,t.facet(d2)),selection:r&&(r instanceof me?r:me.single(r.anchor,r.head)),effects:Ra(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function O2(t,e,n){let r=Am(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=v2(r,Am(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=En.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return U5(n?Y5(i):i)}function Y5(t){let e=t.startState,n=!0;for(let i of e.facet(h2)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:W5(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=Dn.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=En.create(e,i,t.selection&&t.selection.map(s),Qt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(p2);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof En?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof En?t=s[0]:t=O2(e,Ra(s),!1)}return t}function U5(t){let e=t.startState,n=e.facet(m2),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=v2(r,Am(e,s,t.changes.newLength),!0))}return r==t?t:En.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const G5=[];function Ra(t){return t==null?G5:Array.isArray(t)?t:[t]}var Tn=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Tn||(Tn={}));const H5=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Cm;try{Cm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function K5(t){if(Cm)return Cm.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||H5.test(n)))return!0}return!1}function J5(t){return e=>{if(!/\S/.test(e))return Tn.Space;if(K5(e))return Tn.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Tn.Word;return Tn.Other}}class Pt{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,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++)lc(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return lc(this,r),zf(this,r)}update(...e){return O2(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(ws.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Qt.reconfigure)?(n=null,r=a.value):a.is(Qt.appendConfig)&&(n=null,r=Ra(r).concat(a.value));let s;n?s=e.startState.values.slice():(n=jf.resolve(r,i,this),s=new Pt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Sm)?e.newSelection:e.newSelection.asSingle();new Pt(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:me.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Ra(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.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=Qt.mapEffects(o,u).concat(Qt.mapEffects(Ra(l.effects),f))}return{changes:i,selection:me.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof Dn?e:Dn.of(e,this.doc.length,this.facet(Pt.lineSeparator))}toText(e){return It.of(e.split(this.facet(Pt.lineSeparator)||ym))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(lc(this,n),zf(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof di&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},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 Pt.create({doc:e.doc,selection:me.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=jf.resolve(e.extensions||[],new Map),r=e.doc instanceof It?e.doc:It.of((e.doc||"").split(n.staticFacet(Pt.lineSeparator)||ym)),i=e.selection?e.selection instanceof me?e.selection:me.single(e.selection.anchor,e.selection.head):me.single(0);return c2(i,r.length),n.staticFacet(Sm)||(i=i.asSingle()),new Pt(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Pt.tabSize)}get lineBreak(){return this.facet(Pt.lineSeparator)||`
148
+ `}get readOnly(){return this.facet(g2)}phrase(e,...n){for(let r of this.facet(Pt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(f2))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return J5(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Xn(n,o,!1);if(s(n.slice(l,o))!=Tn.Word)break;o=l}for(;a<i;){let l=Xn(n,a);if(s(n.slice(a,l))!=Tn.Word)break;a=l}return o==a?null:me.range(o+r,a+r)}}Pt.allowMultipleSelections=Sm;Pt.tabSize=Ne.define({combine:t=>t.length?t[0]:4});Pt.lineSeparator=d2;Pt.readOnly=g2;Pt.phrases=Ne.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Pt.languageData=f2;Pt.changeFilter=h2;Pt.transactionFilter=p2;Pt.transactionExtender=m2;ws.reconfigure=Qt.define();function su(t,e,n={}){let r={};for(let i of t)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(n,s))r[s]=n[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 eo{eq(e){return this==e}range(e,n=e){return Tm.create(e,n,this)}}eo.prototype.startSide=eo.prototype.endSide=0;eo.prototype.point=!1;eo.prototype.mapMode=dr.TrackDel;function Xv(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let Tm=class b2{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new b2(e,n,r)}};function Pm(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Vv{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,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)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,r,i){for(let s=this.findIndex(n,-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,n){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=n.mapPos(u,c.startSide,c.mapMode);if(m==null||(d=h=m,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.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 Vv(i,s,r,a):null,pos:o}}}class $t{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new $t(e,n,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 n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Pm)),this.isEmpty)return n.length?$t.of(n):this;let a=new y2(this,null,-1).goto(0),l=0,c=[],u=new Vo;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[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(Tm.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?$t.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],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),n.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),n.push(u),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new $t(r,n,s||$t.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return kc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return kc.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=fy(o,a,r),c=new $l(o,l,s),u=new $l(a,l,s);r.iterGaps((f,d,h)=>dy(c,f,u,d,h,i)),r.empty&&r.length==0&&dy(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=fy(s,o),l=new $l(s,a,0).goto(r),c=new $l(o,a,0).goto(r);for(;;){if(l.to!=c.to||!Em(l.active,c.active)||l.point&&(!c.point||!Xv(l.point,c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,s=-1){let o=new $l(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<n?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,n=!1){let r=new Vo;for(let i of e instanceof Tm?[e]:n?eL(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return $t.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=$t.empty;i=i.nextLayer)n=new $t(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}$t.empty=new $t([],[],null,-1);function eL(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Pm(e,r)>0)return t.slice().sort(Pm);e=r}return t}$t.empty.nextLayer=$t.empty;class Vo{finishChunk(e){this.chunks.push(new Vv(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,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Vo)).add(e,n,r)}addInner(e,n,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(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner($t.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=$t.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function fy(t,e,n){let r=new Map;for(let s of t)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&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!n?.touchesRange(a,a+s.chunk[o].length)&&i.add(s.chunk[o])}return i}class y2{constructor(e,n,r,i=0){this.layer=e,this.skip=n,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,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,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],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!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],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.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 kc{constructor(e){this.heap=e}static from(e,n=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 y2(o,n,r,s));return i.length==1?i[0]:new kc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Bh(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Bh(this.heap,r);(this.to-e||this.value.endSide-n)<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(),Bh(this.heap,0)}}}function Bh(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class $l{constructor(e,n,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=kc.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Su(this.active,e),Su(this.activeTo,e),Su(this.activeRank,e),this.minActive=hy(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Au(this.active,n,r),Au(this.activeTo,n,i),Au(this.activeRank,n,s),e&&Au(e,n,this.cursor.from),this.minActive=hy(this.active,this.activeTo)}next(){let e=this.to,n=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&&Su(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(n&&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 n=[];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)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function dy(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e,c=!!s.boundChange;for(let u=!1;;){let f=t.to+l-n.to,d=f||t.endSide-n.endSide,h=d<0?t.to+l:n.to,m=Math.min(h,o);if(t.point||n.point?(t.point&&n.point&&Xv(t.point,n.point)&&Em(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,m,t.point,n.point),u=!1):(u&&s.boundChange(a),m>a&&!Em(t.active,n.active)&&s.compareRange(a,m,t.active,n.active),c&&m<o&&(f||t.openEnd(h)!=n.openEnd(h))&&(u=!0)),h>o)break;a=h,d<=0&&t.next(),d>=0&&n.next()}}function Em(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!Xv(t[n],e[n]))return!1;return!0}function Su(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Au(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function hy(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function xs(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Xn(t,i));return r}function tL(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Xn(t,i)}return t.length}const $m="ͼ",py=typeof Symbol>"u"?"__"+$m:Symbol.for($m),Qm=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),my=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class to{constructor(e,n){this.rules=[];let{finish:r}=n||{};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(v=>p.replace(/&/,v))).reduce((p,v)=>p.concat(v)),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=my[py]||1;return my[py]=e+1,$m+e.toString(36)}static mount(e,n,r){let i=e[Qm],s=r&&r.nonce;i?s&&i.setNonce(s):i=new nL(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let gy=new Map;class nL{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=gy.get(r);if(s)return e[Qm]=s;this.sheet=new i.CSSStyleSheet,gy.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Qm]=this}mount(e,n){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)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.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=n.head||n;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 no={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:"'"},xc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rL=typeof navigator<"u"&&/Mac/.test(navigator.platform),iL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Hn=0;Hn<10;Hn++)no[48+Hn]=no[96+Hn]=String(Hn);for(var Hn=1;Hn<=24;Hn++)no[Hn+111]="F"+Hn;for(var Hn=65;Hn<=90;Hn++)no[Hn]=String.fromCharCode(Hn+32),xc[Hn]=String.fromCharCode(Hn);for(var jh in no)xc.hasOwnProperty(jh)||(xc[jh]=no[jh]);function sL(t){var e=rL&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iL&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?xc:no)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function zn(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)w2(t,arguments[e]);return t}function w2(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)w2(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let fr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Lm=typeof document<"u"?document:{documentElement:{style:{}}};const Mm=/Edge\/(\d+)/.exec(fr.userAgent),_2=/MSIE \d/.test(fr.userAgent),qm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fr.userAgent),Jd=!!(_2||qm||Mm),vy=!Jd&&/gecko\/(\d+)/i.test(fr.userAgent),zh=!Jd&&/Chrome\/(\d+)/.exec(fr.userAgent),oL="webkitFontSmoothing"in Lm.documentElement.style,Rm=!Jd&&/Apple Computer/.test(fr.vendor),Oy=Rm&&(/Mobile\/\w+/.test(fr.userAgent)||fr.maxTouchPoints>2);var Le={mac:Oy||/Mac/.test(fr.platform),windows:/Win/.test(fr.platform),linux:/Linux|X11/.test(fr.platform),ie:Jd,ie_version:_2?Lm.documentMode||6:qm?+qm[1]:Mm?+Mm[1]:0,gecko:vy,gecko_version:vy?+(/Firefox\/(\d+)/.exec(fr.userAgent)||[0,0])[1]:0,chrome:!!zh,chrome_version:zh?+zh[1]:0,ios:Oy,android:/Android\b/.test(fr.userAgent),webkit_version:oL?+(/\bAppleWebKit\/(\d+)/.exec(fr.userAgent)||[0,0])[1]:0,safari:Rm,safari_version:Rm?+(/\bVersion\/(\d+(\.\d+)?)/.exec(fr.userAgent)||[0,0])[1]:0,tabSize:Lm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Wv(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const Zf=Object.create(null);function Yv(t,e,n){if(t==e)return!0;t||(t=Zf),e||(e=Zf);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function aL(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function by(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function lL(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ou{eq(e){return!1}updateDOM(e,n){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,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Qr=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Qr||(Qr={}));class ft extends eo{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new au(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Wo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=k2(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new Wo(e,r,i,n,e.widget||null,!0)}static line(e){return new lu(e)}static set(e,n=!1){return $t.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ft.none=$t.empty;class au extends ft{constructor(e){let{start:n,end:r}=k2(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Wv(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Zf}eq(e){return this==e||e instanceof au&&this.tagName==e.tagName&&Yv(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}au.prototype.point=!1;class lu extends ft{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof lu&&this.spec.class==e.spec.class&&Yv(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}lu.prototype.mapMode=dr.TrackBefore;lu.prototype.point=!0;class Wo extends ft{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?dr.TrackBefore:dr.TrackAfter:dr.TrackDel}get type(){return this.startSide!=this.endSide?Qr.WidgetRange:this.startSide<=0?Qr.WidgetBefore:Qr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Wo&&cL(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Wo.prototype.point=!0;function k2(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function cL(t,e){return t==e||!!(t&&e&&t.compare(e))}function Da(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Sc extends eo{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof Sc&&this.tagName==e.tagName&&Yv(this.attributes,e.attributes)}static create(e){return new Sc(e.tagName,e.attributes||Zf)}static set(e,n=!1){return $t.of(e,n)}}Sc.prototype.startSide=Sc.prototype.endSide=-1;function Ac(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Dm(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function cc(t,e){if(!e.anchorNode)return!1;try{return Dm(t,e.anchorNode)}catch{return!1}}function Of(t){return t.nodeType==3?Cc(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function uc(t,e,n,r){return n?yy(t,e,n,r,-1)||yy(t,e,n,r,1):!1}function ro(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Ff(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function yy(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ss(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=ro(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Ss(t):0}else return!1}}function Ss(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Xf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function uL(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function x2(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function fL(t,e,n,r,i,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,m=1,p=1;if(h)d=uL(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}=x2(u,b)),d={left:b.left,right:b.left+u.clientWidth*m,top:b.top,bottom:b.top+u.clientHeight*p}}let v=0,O=0;if(i=="nearest")e.top<d.top?(O=e.top-(d.top+o),n>0&&e.bottom>d.bottom+O&&(O=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(O=e.bottom-d.bottom+o,n<0&&e.top-O<d.top&&(O=e.top-(d.top+o)));else{let b=e.bottom-e.top,w=d.bottom-d.top;O=(i=="center"&&b<=w?e.top+b/2-w/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-w+o)-d.top}if(r=="nearest"?e.left<d.left?(v=e.left-(d.left+s),n>0&&e.right>d.right+v&&(v=e.right-d.right+s)):e.right>d.right&&(v=e.right-d.right+s,n<0&&e.left<d.left+v&&(v=e.left-(d.left+s))):v=(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,v||O)if(h)c.scrollBy(v,O);else{let b=0,w=0;if(O){let S=u.scrollTop;u.scrollTop+=O/p,w=(u.scrollTop-S)*p}if(v){let S=u.scrollLeft;u.scrollLeft+=v/m,b=(u.scrollLeft-S)*m}e={left:e.left-b,top:e.top-w,right:e.right-b,bottom:e.bottom-w},b&&Math.abs(b-v)<1&&(r="nearest"),w&&Math.abs(w-O)<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 dL(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class hL{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:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ss(n):0),r,Math.min(e.focusOffset,r?Ss(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let yo=null;Le.safari&&Le.safari_version>=26&&(yo=!1);function S2(t){if(t.setActive)return t.setActive();if(yo)return t.focus(yo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(yo==null?{get preventScroll(){return yo={preventScroll:!0},!0}}:void 0),!yo){yo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let wy;function Cc(t,e,n=e){let r=wy||(wy=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Na(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,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,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function pL(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function mL(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ss(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ss(n))}else{if(n==t)return!0;r=ro(n),n=n.parentNode}}function A2(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function C2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ss(n)}else if(n.parentNode&&!Ff(n))r=ro(n),n=n.parentNode;else return null}}function T2(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Ff(n))r=ro(n)+1,n=n.parentNode;else return null}}class xi{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new xi(e.parentNode,ro(e),n)}static after(e,n){return new xi(e.parentNode,ro(e)+1,n)}}var bn=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(bn||(bn={}));const Yo=bn.LTR,Uv=bn.RTL;function P2(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const gL=P2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),vL=P2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Nm=Object.create(null),Ri=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);Nm[e]=n,Nm[n]=-e}function E2(t){return t<=247?gL[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?vL[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const OL=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Vi{get dir(){return this.level%2?Uv:Yo}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function $2(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!$2(r.inner,i.inner))return!1}return!0}const tn=[];function bL(t,e,n,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:n,l=s?256:i;for(let c=o,u=l,f=l;c<a;c++){let d=E2(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),tn[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=o,u=l,f=l;c<a;c++){let d=tn[c];if(d==128)c<a-1&&u==tn[c+1]&&u&24?d=tn[c]=u:tn[c]=256;else if(d==64){let h=c+1;for(;h<a&&tn[h]==64;)h++;let m=c&&u==8||h<n&&tn[h]==8?f==1?1:8:256;for(let p=c;p<h;p++)tn[p]=m;c=h-1}else d==8&&f==1&&(tn[c]=1);u=d,d&7&&(f=d)}}}function yL(t,e,n,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:n;for(let f=c,d,h,m;f<u;f++)if(h=Nm[d=t.charCodeAt(f)])if(h<0){for(let p=a-3;p>=0;p-=3)if(Ri[p+1]==-h){let v=Ri[p+2],O=v&2?i:v&4?v&1?s:i:0;O&&(tn[f]=tn[Ri[p]]=O),a=p;break}}else{if(Ri.length==189)break;Ri[a++]=f,Ri[a++]=d,Ri[a++]=l}else if((m=tn[f])==2||m==1){let p=m==i;l=p?0:1;for(let v=a-3;v>=0;v-=3){let O=Ri[v+2];if(O&2)break;if(p)Ri[v+2]|=2;else{if(O&4)break;Ri[v+2]|=4}}}}}function wL(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let c=tn[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(tn[u]==256)u++;else break;let f=s==1,d=(u<e?tn[u]:r)==1,h=f==d?f?1:2:r;for(let m=u,p=i,v=p?n[p-1].to:t;m>l;)m==v&&(m=n[--p].from,v=p?n[p-1].to:t),tn[--m]=h;l=u}else s=c,l++}}}function Im(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==s.length||l<s[c].from){let p=tn[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 v=p.to,O=c+1;;){if(v==n)break e;if(O<s.length&&s[O].from==v)v=s[O++].to;else{if(tn[v]==a)break e;break}}if(c++,d)d.push(p);else{p.from>l&&o.push(new Vi(l,p.from,h));let v=p.direction==Yo!=!(h%2);Bm(t,v?r+1:r,i,p.inner,p.from,p.to,o),l=p.to}m=p.to}else{if(m==n||(u?tn[m]!=a:tn[m]==a))break;m++}d?Im(t,l,m,r+1,i,d,o):l<m&&o.push(new Vi(l,m,h)),l=m}else for(let l=n,c=s.length;l>e;){let u=!0,f=!1;if(!c||l>s[c-1].to){let p=tn[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 v=p.from,O=c;;){if(v==e)break e;if(O&&s[O-1].to==v)v=s[--O].from;else{if(tn[v-1]==a)break e;break}}if(d)d.push(p);else{p.to<l&&o.push(new Vi(p.to,l,h));let v=p.direction==Yo!=!(h%2);Bm(t,v?r+1:r,i,p.inner,p.from,p.to,o),l=p.from}m=p.from}else{if(m==e||(u?tn[m-1]!=a:tn[m-1]==a))break;m--}d?Im(t,m,l,r+1,i,d,o):m<l&&o.push(new Vi(m,l,h)),l=m}}function Bm(t,e,n,r,i,s,o){let a=e%2?2:1;bL(t,i,s,r,a),yL(t,i,s,r,a),wL(i,s,r,a),Im(t,i,s,e,n,r,o)}function _L(t,e,n){if(!t)return[new Vi(0,0,e==Uv?1:0)];if(e==Yo&&!n.length&&!OL.test(t))return Q2(t.length);if(n.length)for(;t.length>tn.length;)tn[tn.length]=256;let r=[],i=e==Yo?0:1;return Bm(t,i,i,n,0,t.length,r),r}function Q2(t){return[new Vi(0,t,0)]}let L2="";function kL(t,e,n,r,i){var s;let o=r.head-t.from,a=Vi.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,n);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,n),c=l.side(i,n)}let u=Xn(t.text,o,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),L2=t.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?me.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):me.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function xL(t,e,n){for(let r=e;r<n;r++){let i=E2(t.charCodeAt(r));if(i==1)return Yo;if(i==2||i==4)return Uv}return Yo}const M2=Ne.define(),q2=Ne.define(),R2=Ne.define(),D2=Ne.define(),jm=Ne.define(),N2=Ne.define(),I2=Ne.define(),Gv=Ne.define(),Hv=Ne.define(),B2=Ne.define({combine:t=>t.some(e=>e)}),SL=Ne.define({combine:t=>t.some(e=>e)}),j2=Ne.define();class Ia{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Ia(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 Ia(me.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Cu=Qt.define({map:(t,e)=>t.map(e)}),z2=Qt.define();function Zr(t,e,n){let r=t.facet(D2);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const hs=Ne.define({combine:t=>t.length?t[0]:!0});let AL=0;const Aa=Ne.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class mr{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Aa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Aa.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new mr(AL++,e,r,i,a=>{let l=[];return o&&l.push(eh.of(c=>{let u=c.plugin(a);return u?o(u):ft.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return mr.define((r,i)=>new e(r,i),n)}}class Zh{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 n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Zr(n.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(n){Zr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Zr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Z2=Ne.define(),Kv=Ne.define(),eh=Ne.define(),F2=Ne.define(),Jv=Ne.define(),cu=Ne.define(),X2=Ne.define();function _y(t,e){let n=t.state.facet(X2);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return $t.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=xL(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 V2=Ne.define();function eO(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(V2)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Hl=Ne.define();class ti{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new ti(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 n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.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<n.length?n[s]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+o,f=c,d=u;for(;;)if(s<n.length&&n[s]<=f){let h=n[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 ti(u,d,c,f))}return r}}class Vf{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Dn.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 ti(s,o,a,l))),this.changedRanges=i}static create(e,n,r){return new Vf(e,n,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 CL=[];class $n{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return CL}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 n=this.domAttrs;n&&aL(this.dom,n)}}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,n=this.posAtStart){let r=n;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,n){return null}domPosFor(e,n){let r=ro(this.dom),i=this.length?e>0:n>0;return new xi(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 nh)return e;return null}static get(e){return e.cmTile}}class th 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 n=this.dom,r=null,i,s=e?.node==n?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=a.dom&&(s.written=!0),a.dom.parentNode==n)for(;i&&i!=a.dom;)i=ky(i);else n.insertBefore(a.dom,i);r=a.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=ky(i);this.length=o}}function ky(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class nh extends th{constructor(e,n){super(n),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 n=$n.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Gs)n.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,n){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()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(r=void 0)}(l<e||e==c&&(n<-1?a.length:a.covers(1)))&&(!r||!a.isWidget()&&r.isWidget())&&(r=a,i=e-l),(c>e||e==l&&(n>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&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Gs extends th{constructor(e,n){super(e),this.wrapper=n}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,n){let r=new Gs(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Ka extends th{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new Ka(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,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&&(n>0||r&&PL(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=(n<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:a}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):TL(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new xi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,a=!1;for(let l of o.children){if(a)return new xi(l.dom,0);l==r.tile&&(a=!0)}}return new xi(this.dom,0)}}function TL(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Of(e);return n[n.length-1]||null}function PL(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class Cr extends th{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new Cr(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Qo extends $n{constructor(e,n){super(e,n.length),this.text=n}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,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?Le.chrome||Le.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=Cc(this.dom,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return Le.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Xf(l,o<0):l||null}static of(e,n){let r=new Qo(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class Uo extends $n{constructor(e,n,r,i){super(e,n,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,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return Xf(this.dom.getBoundingClientRect(),this.length?e==0:n<=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 Xf(o,!a)}}get overrideDOMText(){if(!this.length)return It.empty;let{root:e}=this;if(!e)return It.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new Uo(s,r,e,i)}}class Wf extends $n{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return It.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class EL{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:a}=this;for(;e||n>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;(n>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 $L{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class QL{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,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 Qo(a.dom,a.text+e);l.parent=o}else o.append(i||Qo.of(e,(s=this.cache.find(Qo))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?Fh(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let a=n.marks.length-1;a>=0;a--){let l=n.marks[a],c=i.lastChild;if(c instanceof Cr&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(Fh(l.dom)),i=c;else{if(this.cache.reused.get(l)){let f=$n.get(l.dom);f&&f.setDOM(Fh(l.dom))}let u=Cr.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 Qo(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,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 n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=W2);let i=Ka.start(e,n||((r=this.cache.find(Ka))===null||r===void 0?void 0:r.dom),!!n);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,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(n>0&&(a=i.lastChild)&&a instanceof Cr&&a.mark.eq(o))i=a,n--;else{let l=Cr.of(o,(r=this.cache.find(Cr,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(l),i=l,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!xy(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Le.ios&&xy(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(Xh,0,32)||new Uo(Xh.toDOM(),0,Xh,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 n=new $L(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Gs&&i.wrapper.eq(r.wrapper))n=i;else{let s=Gs.of(r.wrapper,(e=this.cache.find(Gs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(Wf,void 0,1);return r&&(r.flags=n),r||new Wf(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class LL{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 n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const Yf=[Uo,Ka,Qo,Cr,Wf,Gs,nh];for(let t=0;t<Yf.length;t++)Yf[t].bucket=t;class ML{constructor(e){this.view=e,this.buckets=Yf.map(()=>[]),this.index=Yf.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,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((!n||n(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,n,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==n&&(a.flags&497)==r?(this.reused.set(a,1),a):(this.reused.set(a,2),new Uo(a.dom,n,e,a.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class qL{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new ML(e),this.text=new LL(e.state.doc),this.builder=new QL(this.cache,new nh(e,e.contentDOM),$t.iter(r)),this.cache.reused.set(n,2),this.old=new EL(n),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,n){let r=n&&this.getCompositionContext(n.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;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,a.toA),this.emit(n.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,n,r){let i=NL(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?Uo.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 Wf)this.cache.add(o);else if(o instanceof Cr)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 Cr&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof Cr&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=$t.spans(this.decorations,e,n,{point:(a,l,c,u,f,d)=>{if(c instanceof Wo){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?Ja.block:Ja.inline),m=RL(c),p=this.cache.findWidget(h,l-a,m)||Uo.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=DL(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,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=$n.get(i);if(i==this.view.contentDOM)break;s instanceof Cr?n.push(s):s?.isLine()?r=s:i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Ka(i,W2):n.push(Cr.of(new au({tagName:i.nodeName.toLowerCase(),attributes:lL(i)}),i))}return{line:r,marks:n}}}function xy(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function RL(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const W2={class:"cm-line"};function DL(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&Wv(n,t),r&&(t.class+=" "+r)),t}function NL(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof Cr&&e.push(r.mark)}return e}function Fh(t){let e=$n.get(t);return e&&e.setDOM(t.cloneNode()),t}class Ja extends ou{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}}Ja.inline=new Ja("span");Ja.block=new Ja("div");const Xh=new class extends ou{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Sy{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=ft.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 nh(e,e.contentDOM),this.updateInner([new ti(0,0,0,e.state.doc.length)],null)}update(e){var n;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&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!WL(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?BL(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new ti(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=ZL(o,this.decorations,e.changes);l.length&&(r=ti.extendWithRanges(r,l));let c=XL(a,this.blockWrappers,e.changes);return c.length&&(r=ti.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,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,a=new qL(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,n),zm(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 Vh&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(z2)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!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(hs)||r.tabIndex>-1)&&cc(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||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&&IL(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=u=new xi(d,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!uc(c.node,c.offset,f.anchorNode,f.anchorOffset)||!uc(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{Le.android&&Le.chrome&&r.contains(f.focusNode)&&VL(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let d=Ac(this.view.root);if(d)if(l.empty){if(Le.gecko){let h=jL(c.node,c.offset);if(h&&h!=3){let m=(h==1?C2:T2)(c.node,c.offset);m&&(c=new xi(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 xi(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new xi(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&uc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Ac(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){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[n];else{let o=Ss(e)==0?0:n==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+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){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,n):(s&&o?r=null:l&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(a,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof Vh?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.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=Xn(s.text,o);if(a==o)return null;let l=Cc(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(n,r)}measureVisibleLineHeights(e){let n=[],{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],v=d+p.length,O=p.dom.getBoundingClientRect(),{height:b}=O;if(h&&!m&&(c+=O.top-h.top),p instanceof Gs)v>r&&u(p,d,O);else if(d>=r&&(c>0&&n.push(-c),n.push(b+c),c=0,o)){let w=p.dom.lastChild,S=w?Of(w):[];if(S.length){let _=S[S.length-1],x=l?_.right-O.left:O.right-_.left;x>a&&(a=x,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=v)}}h&&m==f.children.length-1&&(c+=h.bottom-O.bottom),d=v+p.breakAfter}};return u(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.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=Of(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 n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=Of(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(ft.replace({widget:new Vh(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return ft.set(e)}updateDeco(){let e=1,n=this.view.state.facet(eh).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(Jv).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push($t.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(F2).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(j2))try{if(c(this.view,e.range,e))return!0}catch(u){Zr(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.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=eO(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;fL(this.view.scrollDOM,o,n.head<n.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 n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){zm(this.tile)}}function zm(t,e){let n=e?.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)zm(r,e)}}function IL(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function Y2(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=C2(n.focusNode,n.focusOffset),i=T2(n.focusNode,n.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(t.docView.lastCompositionAfterCursor){let l=$n.get(r.node);!l||l.isText()&&l.text!=r.node.nodeValue||(s=i)}}if(t.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 BL(t,e,n){let r=Y2(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc;return{range:new ti(l.mapPos(s),l.mapPos(o),s,o),text:i}}function jL(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let zL=class{constructor(){this.changes=[]}compareRange(e,n){Da(e,n,this.changes)}comparePoint(e,n){Da(e,n,this.changes)}boundChange(e){Da(e,e,this.changes)}};function ZL(t,e,n){let r=new zL;return $t.compare(t,e,n,r),r.changes}class FL{constructor(){this.changes=[]}compareRange(e,n){Da(e,n,this.changes)}comparePoint(){}boundChange(e){Da(e,e,this.changes)}}function XL(t,e,n){let r=new FL;return $t.compare(t,e,n,r),r.changes}function VL(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function WL(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class Vh extends ou{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 YL(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return me.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=Xn(i.text,s,!1):a=Xn(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Xn(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Xn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return me.range(o+i.from,a+i.from)}function UL(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+tL(o,s,t.state.tabSize)}function GL(t,e,n){let r=t.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==Qr.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function HL(t,e,n,r){let i=GL(t,e.head,e.assoc||-1),s=!r||i.type!=Qr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==bn.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return me.cursor(l,n?-1:1)}return me.cursor(n?i.to:i.from,n?-1:1)}function Ay(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=kL(i,s,o,a,n),u=L2;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
151
+ `,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function KL(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==Tn.Space&&(i=o),i==o}}function JL(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return me.cursor(i,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,(e.empty?e.assoc:0)||(n?1:-1)),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let m=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-m.from))),a=(s<0?m.top:m.bottom)+u}let f=l.left+o,d=r??t.viewState.heightOracle.textHeight>>1,h=Zm(t,{x:f,y:a+d*s},!1,s);return me.cursor(h.pos,h.assoc,void 0,o)}function fc(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||n||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function U2(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=fc(t,i.from,0);o!=i.from&&(s=me.cursor(o,-1))}else{let o=fc(t,i.from,-1),a=fc(t,i.to,1);(o!=i.from||a!=i.to)&&(s=me.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?me.create(n,e.mainIndex):e}function Wh(t,e,n){let r=fc(t.state.facet(cu).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:me.cursor(r,r<n.from?1:-1)}class Xi{constructor(e,n){this.pos=e,this.assoc=n}}function Zm(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:a}=e,l=a-s,c;for(;;){if(l<0)return new Xi(0,1);if(l>t.viewState.docHeight)return new Xi(t.state.doc.length,-1);if(c=t.elementAtHeight(l),r==null)break;if(c.type==Qr.Text){if(r<0?c.to<t.viewport.from:c.from>t.viewport.to)break;let d=t.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=t.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(t.viewport.from>=c.to||t.viewport.to<=c.from){if(n)return null;if(c.type==Qr.Text){let f=UL(t,i,c,o,a);return new Xi(f,f==c.from?1:-1)}}if(c.type!=Qr.Text)return l<(c.top+c.bottom)/2?new Xi(c.from,1):new Xi(c.to,-1);let u=t.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=t.docView.lineAt(c.from,-2)),new eM(t,o,a,t.textDirectionAt(c.from)).scanTile(u,c.from)}class eM{constructor(e,n,r,i){this.view=e,this.x=n,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,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Vi.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Vi.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){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 v=r+Math.floor(Math.random()*h);for(let O=0;O<h;O++){if(!s.has(v)){m=v;break t}v++,v==i&&(v=r)}break e}s.add(m);let p=n(m);if(p)for(let v=0;v<p.length;v++){let O=p[v],b=0;if(O.bottom<this.y)(!a||a.bottom<O.bottom)&&(a=O),b=1;else if(O.top>this.y)(!l||l.top>O.top)&&(l=O),b=-1;else{let w=O.left>this.x?this.x-O.left:O.right<this.x?this.x-O.right:0,S=Math.abs(w);S<u&&(c=m,u=S,f=O),w&&(b=w<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,n)}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,n){let r=[];for(let s=0;s<e.length;s=Xn(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,a=r[s+1]-n;return Cc(e.dom,o,a).getClientRects()});return i.after?new Xi(r[i.i+1],-1):new Xi(r[i.i],1)}scanTile(e,n){if(!e.length)return new Xi(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let r=[n];for(let a=0,l=n;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:Cc(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 Xi(r[i.i+1],-1):new Xi(o,1)}}const Kl="￿";class tM{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(Pt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Kl}readRange(e,n){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==n){o?.breakAfter&&!a&&r!=this.view.contentDOM&&this.lineBreak();break}let l=$n.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:Ff(i))||Ff(a)&&(i.nodeName!="BR"||o?.isWidget())&&this.text.length>s)&&!rM(a,n)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(r,s<0?n.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 n=$n.get(e),r=n&&n.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,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(nM(e,r.node,r.offset)?n:0))}}function nM(t,e,n){for(;;){if(!e||n<Ss(e))return!1;if(e==t)return!0;n=ro(e)+1,e=e.parentNode}}function rM(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=$n.get(t);if(!r?.isWidget())return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i?.length)return!1}return!0}class Cy{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class iM{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=G2(e.docView.tile,n,r,0))){let a=s||o?[]:oM(e),l=new tM(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=aM(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!Dm(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||!Dm(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(me.range(c,l)):this.newSel=me.single(c,l)}}}function G2(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<t.children.length;l++){let f=t.children[l],d=c+f.length;if(c<e&&d>n)return G2(f,e,n,c);if(d>=e&&i==-1&&(i=l,s=c),c>n&&f.dom.parentNode==t.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?r+t.length:a,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function H2(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.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=K2(t.state.doc.sliceString(o,a,Kl),e.text,l-o,c);u&&(Le.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Kl+Kl&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:It.of(e.text.slice(u.from,u.toB).split(Kl))})}else r&&(!t.hasFocus&&t.state.facet(hs)||Uf(r,i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(Le.mac||Le.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=me.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:It.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:t.state.doc.lineAt(i.from).to<i.to&&t.docView.lineHasWidget(i.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:t.state.toText(t.inputState.insertingText)}:Le.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
152
+ `&&t.lineWrapping&&(r&&(r=me.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:It.of([" "])}),n)return tO(t,n,r,s);if(r&&!Uf(r,i)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=U2(t.state.facet(cu).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function tO(t,e,n,r=-1){if(Le.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Le.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Na(t.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)&&Na(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Na(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=sM(t,e,n));return t.state.facet(N2).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function sM(t,e,n){let r,i=t.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=fc(i.facet(cu).map(f=>f(t)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:me.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&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.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(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),f,d=n&&Y2(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-m}}else f=t.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,v=p-u.length;if(t.state.sliceDoc(v,p)!=u||p>=f.from&&v<=f.to)return{range:m};let O=i.changes({from:v,to:p,insert:e.insert}),b=m.to-s.to;return{changes:O,range:c?me.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):m.map(O)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function K2(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function oM(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new Cy(n,r)),(i!=n||s!=r)&&e.push(new Cy(i,s))),e}function aM(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?me.single(n+e,r+e):null}function Uf(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class lM{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&&kM(e.contentDOM.ownerDocument)}handleEvent(e){!gM(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,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=cM(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[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"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}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&&ex.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 n;return Le.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=J2.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||uM.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Na(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n: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 Ty(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Zr(n.state,i)}}}function cM(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){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&&n(a).handlers.push(Ty(r.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(Ty(r.value,l))}}for(let r in Pi)n(r).handlers.push(Pi[r]);for(let r in fi)n(r).observers.push(fi[r]);return e}const J2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],uM="dthko",ex=[16,17,18,20,91,92,224,225],Tu=6;function Pu(t){return Math.max(0,t)*.7+8}function fM(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class dM{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=dL(e.contentDOM),this.atoms=e.state.facet(cu).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=n.shiftKey,this.multiple=e.state.facet(Pt.allowMultipleSelections)&&hM(e,n),this.dragging=mM(e,n)&&rx(n)==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&&fM(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=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=eO(this.view);e.clientX-l.left<=i+Tu?n=-Pu(i-e.clientX):e.clientX+l.right>=o-Tu&&(n=Pu(e.clientX-o)),e.clientY-l.top<=s+Tu?r=-Pu(s-e.clientY):e.clientY+l.bottom>=a-Tu&&(r=Pu(e.clientY-a)),this.setScrollSpeed(n,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,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=U2(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function hM(t,e){let n=t.state.facet(M2);return n.length?n[0](e):Le.mac?e.metaKey:e.ctrlKey}function pM(t,e){let n=t.state.facet(q2);return n.length?n[0](e):Le.mac?!e.altKey:!e.ctrlKey}function mM(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Ac(t.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 gM(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=$n.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Pi=Object.create(null),fi=Object.create(null),tx=Le.ie&&Le.ie_version<15||Le.ios&&Le.webkit_version<604;function vM(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nx(t,n.value)},50)}function rh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function nx(t,e){e=rh(t.state,Gv,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(Fm!=null&&n.selection.ranges.every(l=>l.empty)&&Fm==s.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:me.cursor(c.from+f.length)}})}else o?r=n.changeByRange(l=>{let c=s.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:me.cursor(l.from+c.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}fi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Pi.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);fi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};fi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Pi.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(R2))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=bM(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new dM(t,e,n,r)),r&&t.observer.ignore(()=>{S2(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function Py(t,e,n,r){if(r==1)return me.cursor(e,n);if(r==2)return YL(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,me.range(o,a)}}const OM=Le.ie&&Le.ie_version<=11;let Ey=null,$y=0,Qy=0;function rx(t){if(!OM)return t.detail;let e=Ey,n=Qy;return Ey=t,Qy=Date.now(),$y=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?($y+1)%3:1}function bM(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=rx(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,a){let l=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=Py(t,l.pos,l.assoc,r);if(n.pos!=l.pos&&!o){let f=Py(t,n.pos,n.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?me.range(d,h):me.range(h,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=yM(i,l.pos))?c:a?i.addRange(u):me.create([u])}}}function yM(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return me.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Pi.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=me.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",rh(t.state,Hv,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Pi.dragend=t=>(t.inputState.draggedContent=null,!1);function Ly(t,e,n,r){if(n=rh(t.state,Gv,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&pM(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Pi.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&Ly(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.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(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Ly(t,e,r,!0),!0}return!1};Pi.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tx?null:e.clipboardData;return n?(nx(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(vM(t),!1)};function wM(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.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(),t.focus()},50)}function _M(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:rh(t,Hv,e.join(t.lineBreak)),ranges:n,linewise:r}}let Fm=null;Pi.copy=Pi.cut=(t,e)=>{if(!cc(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=_M(t.state);if(!n&&!i)return!1;Fm=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=tx?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(wM(t,n),!1)};const ix=Es.define();function sx(t,e){let n=[];for(let r of t.facet(I2)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:ix.of(!0)}):null}function ox(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=sx(t.state,e);n?t.dispatch(n):t.update([])}},10)}fi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ox(t)};fi.blur=t=>{t.observer.clearSelectionRange(),ox(t)};fi.compositionstart=fi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};fi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Le.chrome&&Le.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};fi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Pi.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return tO(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let i;if(Le.chrome&&Le.android&&(i=J2.find(s=>s.inputType==e.inputType))&&(t.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&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Le.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Le.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>fi.compositionend(t,e),20),!1};const My=new Set;function kM(t){My.has(t)||(My.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const qy=["pre-wrap","normal","pre-line","break-spaces"];let el=!1;function Ry(){el=!1}class xM{constructor(e){this.lineWrapping=e,this.doc=It.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-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 qy.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let a=qy.indexOf(e)>-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=n,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 SM{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class yi{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Qr.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 Wo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new yi(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var rn=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(rn||(rn={}));const bf=.001;class hr{constructor(e,n,r=2){this.length=e,this.height=n,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)>bf&&(el=!0),this.height=e)}replace(e,n,r){return hr.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,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,rn.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:s.lineAt(c,rn.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,rn.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let m=nO.build(r.setDoc(o),e,u,f);s=Gf(s,s.replace(l,c,m))}return s.updateHeight(r,0)}static empty(){return new Ir(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,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[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new CM(hr.of(e.slice(0,n)),o,hr.of(e.slice(r)))}}function Gf(t,e){return t==e?t:(t.constructor!=e.constructor&&(el=!0),e)}hr.prototype.size=1;const AM=ft.replace({});class ax extends hr{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new yi(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new yi(i,0,r,this.spaceAbove,AM):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,rn.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ir extends ax{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new yi(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Ir||i instanceof Gn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Gn?i=new Ir(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):hr.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&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 Gn extends hr{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+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,n,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new yi(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}=n.doc.line(s+c);return new yi(u,f,r+a*c,a,0)}}lineAt(e,n,r,i,s){if(n==rn.ByHeight)return this.blockAt(e,r,i,s);if(n==rn.ByPosNoHeight){let{from:h,to:m}=r.doc.lineAt(e);return new yi(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 yi(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=n;){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 yi(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof Gn?r[r.length-1]=new Gn(s.length+i):r.push(null,new Gn(i-1))}if(e>0){let s=r[0];s instanceof Gn?r[0]=new Gn(e+s.length):r.unshift(new Gn(e-1),null)}return hr.of(r)}decomposeLeft(e,n){n.push(new Gn(e-1),null)}decomposeRight(e,n){n.push(null,new Gn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&o.push(new Gn(i.from-n-1).updateHeight(e,n));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)>=bf&&(l=-2);let h=new Ir(u,f,d);h.outdated=!1,o.push(h),a+=u+1}a<=s&&o.push(null,new Gn(s-a).updateHeight(e,a));let c=hr.of(o);return(l<0||Math.abs(c.height-this.height)>=bf||Math.abs(l-this.heightMetrics(e,n).perLine)>=bf)&&(el=!0),Gf(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class CM extends hr{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(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,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=n==rn.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==rn.ByPosNoHeight?rn.ByPosNoHeight:rn.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,n,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,n,r,i,s,o),n>=l&&this.right.forEachLine(e,n,r,a,l,o);else{let c=this.lineAt(l,rn.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-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&&Dy(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),Dy(s,a)}return hr.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?hr.of(this.break?[e,null,n]:[e,n]):(this.left=Gf(this.left,e),this.right=Gf(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return i&&i.from<=n+s.length&&i.more?l=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,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 Dy(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Gn&&(r=t[e+1])instanceof Gn&&t.splice(e-1,3,new Gn(n.length+1+r.length))}const TM=5;class nO{constructor(e,n){this.pos=e,this.oracle=n,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,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ir?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ir(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||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=n-e;r.block?this.addBlock(new ax(o,i,r)):(o||s||i>=TM)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);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:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,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 Ir(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new Gn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ir)return e;let n=new Ir(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ir)&&!this.isCovered?this.nodes.push(new Ir(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ir&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new nO(r,e);return $t.spans(n,r,i,s,0),s.finish(r)}}function PM(t,e,n){let r=new EM;return $t.compare(t,e,n,r,0),r.changes}class EM{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Da(e,n,this.changes,5)}}function $M(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.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==t.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-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function QM(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function LM(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Yh{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return ft.replace({widget:new MM(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class MM extends ou{constructor(e,n){super(),this.size=e,this.vertical=n}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 Ny{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=Iy,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=bn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Kv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new xM(n),this.stateDeco=By(e),this.heightMap=hr.empty().applyChanges(this.stateDeco,It.empty,this.heightOracle.setDoc(e.doc),[new ti(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=ft.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Eu(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?Iy:new rO(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(Jl(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=By(this.state);let i=e.changedRanges,s=ti.extendWithRanges(i,PM(r,this.stateDeco,e?e.changes:Dn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Ry(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||el)&&(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;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));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),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(SL)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?bn.RTL:bn.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,a=n.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:S,scaleY:_}=x2(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||_>.005&&Math.abs(this.scaleY-_)>.005)&&(this.scaleX=S,this.scaleY=_,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=A2(e.scrollDOM);let m=(this.printing?LM:$M)(n,this.paddingTop),p=m.top-this.pixelViewport.top,v=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget&&!QM(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 S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:_,charWidth:x,textHeight:C}=e.docView.measureTextSize();o=_>0&&i.refresh(s,_,x,C,Math.max(5,b/x),S),o&&(e.docView.minWidth=0,c|=16)}p>0&&v>0?u=Math.max(p,v):p<0&&v<0&&(u=Math.min(p,v)),Ry();for(let _ of this.viewports){let x=_.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(_);this.heightMap=(o?hr.empty().applyChanges(this.stateDeco,It.empty,this.heightOracle,[new ti(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new SM(_.from,x))}el&&(c|=2)}let w=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||w)&&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,n){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 Eu(i.lineAt(o-r*1e3,rn.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,rn.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,rn.ByPos,s,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new Eu(i.lineAt(d-1e3/2,rn.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,rn.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Eu(this.heightMap.lineAt(r,rn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,rn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,rn.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,rn.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Yh(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){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 O of p)if(O>u&&O<f){l(u,O-10,d,h),l(O+10,f,d,h);return}let v=RM(e,O=>O.from>=d.from&&O.to<=d.to&&Math.abs(O.from-u)<s&&Math.abs(O.to-f)<s&&!p.some(b=>O.from<b&&O.to>b));if(!v){if(f<d.to&&n&&r&&n.visibleRanges.some(w=>w.from<=f&&w.to>=f)){let w=n.moveToLineBoundary(me.cursor(f),!1,!0).head;w>u&&(f=w)}let O=this.gapSize(d,u,f,h),b=r||O<2e6?O:2e6;v=new Yh(u,f,O,b)}a.push(v)},c=u=>{if(u.length<o||u.type!=Qr.Text)return;let f=qM(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,v,O;if(d!=null){let b=Qu(f,d),w=((this.visibleBottom-this.visibleTop)/2+p)/u.height;v=b-w,O=b+w}else v=(this.visibleTop-u.top-p)/u.height,O=(this.visibleBottom-u.top+p)/u.height;h=$u(f,v),m=$u(f,O)}else{let p=f.total*this.heightOracle.charWidth,v=i*this.heightOracle.charWidth,O=0;if(p>2e6)for(let x of e)x.from>=u.from&&x.from<u.to&&x.size!=x.displaySize&&x.from*this.heightOracle.charWidth+O<this.pixelViewport.left&&(O=x.size-x.displaySize);let b=this.pixelViewport.left+O,w=this.pixelViewport.right+O,S,_;if(d!=null){let x=Qu(f,d),C=((w-b)/2+v)/p;S=x-C,_=x+C}else S=(b-v)/p,_=(w+v)/p;h=$u(f,S),m=$u(f,_)}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,n,r,i){let s=Qu(i,r)-Qu(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Yh.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ft.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];$t.spans(n,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(n=>n.from<=e&&n.to>=e)||Jl(this.heightMap.lineAt(e,rn.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(n=>n.top<=e&&n.bottom>=e)||Jl(this.heightMap.lineAt(this.scaler.fromDOM(e),rn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Jl(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 Eu{constructor(e,n){this.from=e,this.to=n}}function qM(t,e,n){let r=[],i=t,s=0;return $t.spans(n,t,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 $u({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function Qu(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function RM(t,e){for(let n of t)if(e(n))return n}const Iy={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function By(t){let e=t.facet(eh).filter(r=>typeof r!="function"),n=t.facet(Jv).filter(r=>typeof r!="function");return n.length&&e.push($t.join(n)),e}class rO{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,rn.ByPos,e,0,0).top,u=n.lineAt(l,rn.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)/(n.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 n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]: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 n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]: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 rO?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Jl(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new yi(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Jl(i,e)):t._content)}const Lu=Ne.define({combine:t=>t.join(" ")}),Xm=Ne.define({combine:t=>t.indexOf(!0)>-1}),Vm=to.newName(),lx=to.newName(),cx=to.newName(),ux={"&light":"."+lx,"&dark":"."+cx};function Wm(t,e,n){return new to(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const DM=Wm("."+Vm,{"&":{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"}},ux),NM={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Uh=Le.ie&&Le.ie_version<=11;class IM{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new hL,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(n=>{for(let r of n)this.queue.push(r);(Le.ie&&Le.ie_version<=11||Le.ios&&e.composing)&&n.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 jM(e),e.state.facet(hs)&&(e.contentDOM.editContext=this.editContext.editContext)),Uh&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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 n;((n=this.view.docView)===null||n===void 0?void 0:n.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(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.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(n=>{n.length>0&&n[n.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((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(hs)?r.root.activeElement!=this.dom:!cc(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Le.ie&&Le.ie_version<=11||Le.android&&Le.chrome)&&!r.state.selection.main.empty&&i.focusNode&&uc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Ac(e.root);if(!n)return!1;let r=Le.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&BM(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=cc(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&mL(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)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,NM),Uh&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Uh&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){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&&Na(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,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 n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&cc(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 iM(this.view,e,n,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 n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=H2(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!Uf(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=jy(n,e.previousSibling||e.target.previousSibling,-1),i=jy(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.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(hs)!=e.state.facet(hs)&&(e.view.contentDOM.editContext=e.state.facet(hs)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.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 jy(t,e,n){for(;e;){let r=$n.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function zy(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return uc(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function BM(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return zy(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?zy(t,n):null}class jM{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=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=K2(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=me.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));Uf(d,i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:It.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:It.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);tO(e,f,me.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(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.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)}n.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(ft.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:z2.of(ft.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)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ac(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=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,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,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}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=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||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+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 n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.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 n;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||pL(e.parent)||document,this.viewState=new Ny(e.state||Pt.create(e)),e.scrollTo&&e.scrollTo.is(Cu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Aa).map(i=>new Zh(i));for(let i of this.plugins)i.update(this);this.observer=new IM(this),this.inputState=new lM(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Sy(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof En?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!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(ix))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=sx(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(Pt.phrases)!=this.state.facet(Pt.phrases))return this.setState(s);i=Vf.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 Ia(h.empty?h:me.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(Cu)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Hf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Hl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Lu)!=i.state.facet(Lu)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(jm))try{d(i)}catch(h){Zr(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!H2(this,u)&&c.force&&Na(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 n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Ny(e),this.plugins=e.facet(Aa).map(r=>new Zh(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Sy(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Aa),r=e.state.facet(Aa);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new Zh(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);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){Zr(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 n=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(A2(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 Zr(this.state,m),Zy}}),f=Vf.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=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]!=Zy)try{let m=c[h];m.write&&m.write(u[h],this)}catch(m){Zr(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(n&&!n.empty)for(let a of this.state.facet(jm))a(n)}get themeClasses(){return Vm+" "+(this.state.facet(Xm)?cx:lx)+" "+this.state.facet(Lu)}updateAttrs(){let e=Fy(this,Z2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(hs)?"true":"false",class:"cm-content",style:`${Le.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Fy(this,Kv,n);let r=this.observer.ignore(()=>{let i=by(this.contentDOM,this.contentAttrs,n),s=by(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Pe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Hl);let e=this.state.facet(Pe.cspNonce);to.mount(this.root,this.styleModules.concat(DM).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 n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.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,n,r){return Wh(this,e,Ay(this,e,n,r))}moveByGroup(e,n){return Wh(this,e,Ay(this,e,n,r=>KL(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return me.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return HL(this,e,n,r)}moveVertically(e,n,r){return Wh(this,e,JL(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=Zm(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),Zm(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Vi.find(s,e-i.from,-1,n)];return Xf(r,o.dir==bn.LTR==n>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(B2)||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>zM)return Q2(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||$2(s.isolates,r=_y(this,e))))return s.order;r||(r=_y(this,e));let i=_L(e.text,n,r);return this.bidiCache.push(new Hf(e.from,e.to,n,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(()=>{S2(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,n={}){return Cu.of(new Ia(typeof e=="number"?me.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Cu.of(new Ia(me.cursor(r.from),"start","start",r.top-e,n,!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 mr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return mr.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=to.newName(),i=[Lu.of(r),Hl.of(Wm(`.${r}`,e))];return n&&n.dark&&i.push(Xm.of(!0)),i}static baseTheme(e){return co.lowest(Hl.of(Wm("."+Vm,e,ux)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&$n.get(r)||$n.get(e);return((n=i?.root)===null||n===void 0?void 0:n.view)||null}}Pe.styleModule=Hl;Pe.inputHandler=N2;Pe.clipboardInputFilter=Gv;Pe.clipboardOutputFilter=Hv;Pe.scrollHandler=j2;Pe.focusChangeEffect=I2;Pe.perLineTextDirection=B2;Pe.exceptionSink=D2;Pe.updateListener=jm;Pe.editable=hs;Pe.mouseSelectionStyle=R2;Pe.dragMovesSelection=q2;Pe.clickAddsSelectionRange=M2;Pe.decorations=eh;Pe.blockWrappers=F2;Pe.outerDecorations=Jv;Pe.atomicRanges=cu;Pe.bidiIsolatedRanges=X2;Pe.scrollMargins=V2;Pe.darkTheme=Xm;Pe.cspNonce=Ne.define({combine:t=>t.length?t[0]:""});Pe.contentAttributes=Kv;Pe.editorAttributes=Z2;Pe.lineWrapping=Pe.contentAttributes.of({class:"cm-lineWrapping"});Pe.announce=Qt.define();const zM=4096,Zy={};class Hf{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.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&&!n.touchesRange(o.from,o.to)&&r.push(new Hf(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function Fy(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&Wv(o,n)}return n}const ZM=Le.mac?"mac":Le.windows?"win":Le.linux?"linux":"key";function FM(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<n.length-1;++l){const c=n[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 Mu(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const XM=co.default(Pe.domEventHandlers({keydown(t,e){return dx(fx(e.state),t,e,"editor")}})),na=Ne.define({enables:XM}),Xy=new WeakMap;function fx(t){let e=t.facet(na),n=Xy.get(e);return n||Xy.set(e,n=YM(e.reduce((r,i)=>r.concat(i),[]))),n}function VM(t,e,n){return dx(fx(t.state),e,t,n)}let Zs=null;const WM=4e3;function YM(t,e=ZM){let n=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=n[o]||(n[o]=Object.create(null)),m=a.split(/ (?!$)/).map(O=>FM(O,e));for(let O=1;O<m.length;O++){let b=m.slice(0,O).join(" ");i(b,!0),h[b]||(h[b]={preventDefault:!0,stopPropagation:!1,run:[w=>{let S=Zs={view:w,prefix:b,scope:o};return setTimeout(()=>{Zs==S&&(Zs=null)},WM),!0}]})}let p=m.join(" ");i(p,!1);let v=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&&v.run.push(l),c&&(v.preventDefault=!0),u&&(v.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[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,Ym))}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 n}let Ym=null;function dx(t,e,n,r){Ym=e;let i=sL(e),s=Is(i,0),o=ko(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;Zs&&Zs.view==n&&Zs.scope==r&&(a=Zs.prefix+" ",ex.indexOf(e.keyCode)<0&&(c=!0,Zs=null));let f=new Set,d=v=>{if(v){for(let O of v.run)if(!f.has(O)&&(f.add(O),O(n)))return v.stopPropagation&&(u=!0),!0;v.preventDefault&&(v.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],m,p;return h&&(d(h[a+Mu(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=no[e.keyCode])&&m!=i?(d(h[a+Mu(m,e,!0)])||e.shiftKey&&(p=xc[e.keyCode])!=i&&p!=m&&d(h[a+Mu(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+Mu(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Ym=null,l}function UM(){return HM}const GM=ft.line({class:"cm-activeLine"}),HM=mr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(GM.range(i.from)),e=i.from)}return ft.set(n)}},{decorations:t=>t.decorations}),qu="-10000px";class KM{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){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=n?[]: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]=n[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 n&&(a.forEach((l,c)=>n[c]=l),n.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function JM(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Gh=Ne.define({combine:t=>{var e,n,r;return{position:Le.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||JM}}}),Vy=new WeakMap,hx=mr.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Gh);this.position=e.position,this.parent=e.parent,this.classes=t.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 KM(t,px,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.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 t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(Gh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!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);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=qu,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Le.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=eO(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(Gh).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,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=t.pos[a],d=t.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){u.style.top=qu;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,p=d.right-d.left,v=(e=Vy.get(c))!==null&&e!==void 0?e:d.bottom-d.top,O=c.offset||tq,b=this.view.textDirection==bn.LTR,w=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)+O.x,r.right-p)):Math.min(Math.max(r.left,f.left-p+(h?14:0)-O.x),r.right-p),S=this.above[a];!l.strictSide&&(S?f.top-v-m-O.y<r.top:f.bottom+v+m+O.y>r.bottom)&&S==r.bottom-f.bottom>f.top-r.top&&(S=this.above[a]=!S);let _=(S?f.top-r.top:r.bottom-f.bottom)-m;if(_<v&&c.resize!==!1){if(_<this.view.defaultLineHeight){u.style.top=qu;continue}Vy.set(c,v),u.style.height=(v=_)/s+"px"}else u.style.height&&(u.style.height="");let x=S?f.top-v-m-O.y:f.bottom+m+O.y,C=w+p;if(c.overlap!==!0)for(let A of o)A.left<C&&A.right>w&&A.top<x+v&&A.bottom>x&&(x=S?A.top-v-2-m:A.bottom+m+2);if(this.position=="absolute"?(u.style.top=(x-t.parent.top)/s+"px",Wy(u,(w-t.parent.left)/i)):(u.style.top=x/s+"px",Wy(u,w/i)),h){let A=f.left+(b?O.x:-O.x)-(w+14-7);h.style.left=A/i+"px"}c.overlap!==!0&&o.push({left:w,top:x,right:C,bottom:x+v}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),c.positioned&&c.positioned(t.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 t of this.manager.tooltipViews)t.dom.style.top=qu}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Wy(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const eq=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"}}}),tq={x:0,y:0},px=Ne.define({enables:[hx,eq]});function mx(t,e){let n=t.plugin(hx);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const Yy=Ne.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function gx(t,e){let n=t.plugin(vx),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const vx=mr.fromClass(class{constructor(t){this.input=t.state.facet(Kf),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Yy);this.top=new Ru(t,!0,e.topContainer),this.bottom=new Ru(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Yy);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ru(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ru(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Kf);if(n!=this.input){let r=n.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),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(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Pe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Ru{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.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 n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Uy(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Uy(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 Uy(t){let e=t.nextSibling;return t.remove(),e}const Kf=Ne.define({enables:vx});function nq(t,e){let n,r=new Promise(o=>n=o),i=o=>rq(o,e,n);t.state.field(Hh,!1)?t.dispatch({effects:Ox.of(i)}):t.dispatch({effects:Qt.appendConfig.of(Hh.init(()=>[i]))});let s=bx.of(i);return{close:s,result:r.then(o=>((t.win.queueMicrotask||(l=>t.win.setTimeout(l,10)))(()=>{t.state.field(Hh).indexOf(i)>-1&&t.dispatch({effects:s})}),o))}}const Hh=di.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(Ox)?t=[n.value].concat(t):n.is(bx)&&(t=t.filter(r=>r!=n.value));return t},provide:t=>Kf.computeN([t],e=>e.field(t))}),Ox=Qt.define(),bx=Qt.define();function rq(t,e,n){let r=e.content?e.content(t,()=>o(null)):null;if(!r){if(r=zn("form"),e.input){let a=zn("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),r.appendChild(zn("label",(e.label||"")+": ",a))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(zn("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=zn("div",r,zn("button",{onclick:()=>o(null),"aria-label":t.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)&&t.focus(),n(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 io extends eo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}io.prototype.elementClass="";io.prototype.toDOM=void 0;io.prototype.mapMode=dr.TrackBefore;io.prototype.startSide=io.prototype.endSide=-1;io.prototype.point=!0;const yf=Ne.define(),iq=Ne.define(),wf=Ne.define(),Gy=Ne.define({combine:t=>t.some(e=>e)});function sq(t){return[oq]}const oq=mr.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.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=t.state.facet(wf).map(e=>new Ky(t,e)),this.fixed=!t.state.facet(Gy);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),t.scrollDOM.insertBefore(this.dom,t.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(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.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(Gy)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=$t.iter(this.view.state.facet(yf),this.view.viewport.from),r=[],i=this.gutters.map(s=>new aq(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==Qr.Text&&o){Um(n,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==Qr.Text){Um(n,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();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(wf),n=t.state.facet(wf),r=t.docChanged||t.heightChanged||t.viewportChanged||!$t.eq(t.startState.facet(yf),t.state.facet(yf),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new Ky(this.view,s)):(this.gutters[o].update(t),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 t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Pe.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==bn.LTR?{left:r,right:i}:{right:r,left:i}})});function Hy(t){return Array.isArray(t)?t:[t]}function Um(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class aq{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=$t.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let a=new yx(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=n.bottom,this.i++}line(e,n,r){let i=[];Um(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(iq)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Ky{constructor(e,n){this.view=e,this.config=n,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 n.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);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Hy(n.markers(e)),n.initialSpacer&&(this.spacer=new yx(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Hy(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!$t.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class yx{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lq(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[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=n}destroy(){this.setMarkers(null,[])}}function lq(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const cq=Ne.define(),uq=Ne.define(),Ca=Ne.define({combine(t){return su(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Kh extends io{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Jh(t,e){return t.state.facet(Ca).formatNumber(e,t.state)}const fq=wf.compute([Ca],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(cq)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Kh(Jh(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(uq)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Ca)!=e.state.facet(Ca),initialSpacer(e){return new Kh(Jh(e,Jy(e.state.doc.lines)))},updateSpacer(e,n){let r=Jh(n.view,Jy(n.view.state.doc.lines));return r==e.number?e:new Kh(r)},domEventHandlers:t.facet(Ca).domEventHandlers,side:"before"}));function dq(t={}){return[Ca.of(t),sq(),fq]}function Jy(t){let e=9;for(;e<t;)e=e*10+9;return e}const hq=new class extends io{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},pq=yf.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(hq.range(i)))}return $t.of(e)});function mq(){return pq}const wx=1024;let gq=0;class ni{constructor(e,n){this.from=e,this.to=n}}class et{constructor(e={}){this.id=gq++,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)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}et.closedBy=new et({deserialize:t=>t.split(" ")});et.openedBy=new et({deserialize:t=>t.split(" ")});et.group=new et({deserialize:t=>t.split(" ")});et.isolate=new et({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});et.contextHash=new et({perNode:!0});et.lookAhead=new et({perNode:!0});et.mounted=new et({perNode:!0});class Ba{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[et.mounted.id]}}const vq=Object.create(null);class Ln{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):vq,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Ln(e.name||"",n,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");n[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 n=this.prop(et.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(et.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}Ln.none=new Ln("",Object.create(null),0,8);class yl{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];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}}n.push(i?new Ln(r.name,i,r.id,r.flags):r)}return new yl(n)}}const Du=new WeakMap,e1=new WeakMap;var Zt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Zt||(Zt={}));class mt{constructor(e,n,r,i,s){if(this.type=e,this.children=n,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=Ba.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Jf(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Du.get(this)||this.topNode,s=new Jf(i);return s.moveTo(e,n),Du.set(this,s._tree),s}get topNode(){return new ar(this,0,0,null)}resolve(e,n=0){let r=Tc(Du.get(this)||this.topNode,e,n,!1);return Du.set(this,r),r}resolveInner(e,n=0){let r=Tc(e1.get(this)||this.topNode,e,n,!0);return e1.set(this,r),r}resolveStack(e,n=0){return yq(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&Zt.IncludeAnonymous)>0;for(let l=this.cursor(o|Zt.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||n(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 n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:oO(Ln.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new mt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new mt(Ln.none,n,r,i)))}static build(e){return wq(e)}}mt.empty=new mt(Ln.none,[],[],0);class iO{constructor(e,n){this.buffer=e,this.index=n}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 iO(this.buffer,this.index)}}class so{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Ln.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],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,n,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(_x(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){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 so(s,o,this.set)}}function _x(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Tc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof ar&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:Zt.IgnoreOverlays;if(r)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof ar&&o.index<0&&((i=a.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class kx{cursor(e=0){return new Jf(this,e)}getChild(e,n=null,r=null){let i=t1(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return t1(this,e,n,r)}resolve(e,n=0){return Tc(this,e,n,!1)}resolveInner(e,n=0){return Tc(this,e,n,!0)}matchContext(e){return Gm(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class ar extends kx{constructor(e,n,r,i){super(),this._tree=e,this.from=n,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,n,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+o.from,d;if(!(!(s&Zt.EnterBracketed&&u instanceof mt&&(d=Ba.get(u))&&!d.overlay&&d.bracketed&&r>=f&&r<=f+u.length)&&!_x(i,r,f,f+u.length))){if(u instanceof so){if(s&Zt.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,n,r-f,i);if(h>-1)return new Wi(new Oq(o,u,e,f),null,h)}else if(s&Zt.IncludeAnonymous||!u.type.isAnonymous||sO(u)){let h;if(!(s&Zt.IgnoreMounts)&&(h=Ba.get(u))&&!h.overlay)return new ar(h.tree,f,e,o);let m=new ar(u,f,e,o);return s&Zt.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(n<0?u.children.length-1:0,n,r,i,s)}}}if(s&Zt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<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,n,r=0){let i;if(!(r&Zt.IgnoreOverlays)&&(i=Ba.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Zt.EnterBracketed&&i.bracketed;for(let{from:a,to:l}of i.overlay)if((n>0||o?a<=s:a<s)&&(n<0||o?l>=s:l>s))return new ar(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,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 t1(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!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 Gm(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Oq{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Wi extends kx{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,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new Wi(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,n,r=0){if(r&Zt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Wi(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,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Wi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Wi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{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)),n.push(0)}return new mt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function xx(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof ar&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new bq(i,n)}class bq{constructor(e,n){this.heads=e,this.node=n}get next(){return xx(this.heads)}}function yq(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof ar?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=Ba.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new ar(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(Tc(a,e,n,!1))}}return i?xx(i):r}class Jf{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Zt.EnterBracketed,e instanceof ar)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,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||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 ar?(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,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-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,n,r=this.mode){return this.buffer?r&Zt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Zt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Zt.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:n}=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(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.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 n,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:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&Zt.IncludeAnonymous||a instanceof so||!a.type.isAnonymous||sO(a))return!1}return!0}move(e,n){if(n&&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,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=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;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new Wi(this.buffer,n,this.stack[i]);return this.bufferNode=new Wi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){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&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Gm(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return Gm(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function sO(t){return t.children.some(e=>e instanceof so||!e.type.isAnonymous||sO(e))}function wq(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=wx,reused:s=[],minRepeatType:o=r.types.length}=t,a=Array.isArray(n)?new iO(n,n.length):n,l=r.types,c=0,u=0;function f(_,x,C,A,y,k){let{id:P,start:T,end:E,size:Q}=a,$=u,L=c;if(Q<0)if(a.next(),Q==-1){let ae=s[P];C.push(ae),A.push(T-_);return}else if(Q==-3){c=P;return}else if(Q==-4){u=P;return}else throw new RangeError(`Unrecognized record size: ${Q}`);let N=l[P],Z,Y,ne=T-_;if(E-T<=i&&(Y=v(a.pos-x,y))){let ae=new Uint16Array(Y.size-Y.skip),ie=a.pos-Y.size,K=ae.length;for(;a.pos>ie;)K=O(Y.start,ae,K);Z=new so(ae,E-Y.start,r),ne=Y.start-_}else{let ae=a.pos-Q;a.next();let ie=[],K=[],he=P>=o?P:-1,fe=0,j=E;for(;a.pos>ae;)he>=0&&a.id==he&&a.size>=0?(a.end<=j-i&&(m(ie,K,T,fe,a.end,j,he,$,L),fe=ie.length,j=a.end),a.next()):k>2500?d(T,ae,ie,K):f(T,ae,ie,K,he,k+1);if(he>=0&&fe>0&&fe<ie.length&&m(ie,K,T,fe,T,j,he,$,L),ie.reverse(),K.reverse(),he>-1&&fe>0){let U=h(N,L);Z=oO(N,ie,K,0,ie.length,0,E-T,U,U)}else Z=p(N,ie,K,E-T,$-E,L)}C.push(Z),A.push(ne)}function d(_,x,C,A){let y=[],k=0,P=-1;for(;a.pos>x;){let{id:T,start:E,end:Q,size:$}=a;if($>4)a.next();else{if(P>-1&&E<P)break;P<0&&(P=Q-i),y.push(T,E,Q),k++,a.next()}}if(k){let T=new Uint16Array(k*4),E=y[y.length-2];for(let Q=y.length-3,$=0;Q>=0;Q-=3)T[$++]=y[Q],T[$++]=y[Q+1]-E,T[$++]=y[Q+2]-E,T[$++]=$;C.push(new so(T,y[2]-E,r)),A.push(E-_)}}function h(_,x){return(C,A,y)=>{let k=0,P=C.length-1,T,E;if(P>=0&&(T=C[P])instanceof mt){if(!P&&T.type==_&&T.length==y)return T;(E=T.prop(et.lookAhead))&&(k=A[P]+T.length+E)}return p(_,C,A,y,k,x)}}function m(_,x,C,A,y,k,P,T,E){let Q=[],$=[];for(;_.length>A;)Q.push(_.pop()),$.push(x.pop()+C-y);_.push(p(r.types[P],Q,$,k-y,T-k,E)),x.push(y-C)}function p(_,x,C,A,y,k,P){if(k){let T=[et.contextHash,k];P=P?[T].concat(P):[T]}if(y>25){let T=[et.lookAhead,y];P=P?[T].concat(P):[T]}return new mt(_,x,C,A,P)}function v(_,x){let C=a.fork(),A=0,y=0,k=0,P=C.end-i,T={size:0,start:0,skip:0};e:for(let E=C.pos-_;C.pos>E;){let Q=C.size;if(C.id==x&&Q>=0){T.size=A,T.start=y,T.skip=k,k+=4,A+=4,C.next();continue}let $=C.pos-Q;if(Q<0||$<E||C.start<P)break;let L=C.id>=o?4:0,N=C.start;for(C.next();C.pos>$;){if(C.size<0)if(C.size==-3||C.size==-4)L+=4;else break e;else C.id>=o&&(L+=4);C.next()}y=N,A+=Q,k+=L}return(x<0||A==_)&&(T.size=A,T.start=y,T.skip=k),T.size>4?T:void 0}function O(_,x,C){let{id:A,start:y,end:k,size:P}=a;if(a.next(),P>=0&&A<o){let T=C;if(P>4){let E=a.pos-(P-4);for(;a.pos>E;)C=O(_,x,C)}x[--C]=T,x[--C]=k-_,x[--C]=y-_,x[--C]=A}else P==-3?c=A:P==-4&&(u=A);return C}let b=[],w=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,b,w,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:b.length?w[0]+b[0].length:0;return new mt(l[t.topID],b.reverse(),w.reverse(),S)}const n1=new WeakMap;function _f(t,e){if(!t.isAnonymous||e instanceof so||e.type!=t)return 1;let n=n1.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof mt)){n=1;break}n+=_f(t,r)}n1.set(e,n)}return n}function oO(t,e,n,r,i,s,o,a,l){let c=0;for(let m=r;m<i;m++)c+=_f(t,e[m]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(m,p,v,O,b){for(let w=v;w<O;){let S=w,_=p[w],x=_f(t,m[w]);for(w++;w<O;w++){let C=_f(t,m[w]);if(x+C>=u)break;x+=C}if(w==S+1){if(x>u){let C=m[S];h(C.children,C.positions,0,C.children.length,p[S]+b);continue}f.push(m[S])}else{let C=p[w-1]+m[w-1].length-_;f.push(oO(t,m,p,S,w,_,C,null,l))}d.push(_+b-s)}}return h(e,n,r,i,0),(a||l)(f,d,o)}class Sx{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Wi?this.setBuffer(e.context.buffer,e.index,n):e instanceof ar&&this.map.set(e.tree,n)}get(e){return e instanceof Wi?this.getBuffer(e.context.buffer,e.index):e instanceof ar?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class _s{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,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,n=[],r=!1){let i=[new _s(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.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<n.length?n[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 _s(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 ih{startParse(e,n,r){return typeof e=="string"&&(e=new _q(e)),r=r?r.length?r.map(i=>new ni(i.from,i.to)):[new ni(0,0)]:[new ni(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}}class _q{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function Ax(t){return(e,n,r,i)=>new xq(e,t,n,r,i)}class r1{constructor(e,n,r,i,s,o){this.parser=e,this.parse=n,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function i1(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class kq{constructor(e,n,r,i,s,o,a,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const Hm=new et({perNode:!0});class xq{constructor(e,n,r,i,s){this.nest=n,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 mt(r.type,r.children,r.positions,r.length,r.propValues.concat([[Hm,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[et.mounted.id]=new Ba(n,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 n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new Cq(this.fragments),n=null,r=null,i=new Jf(new ar(this.baseTree,this.ranges[0].from,0,null),Zt.IncludeAnonymous|Zt.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(n){let c=n.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&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(o=Sq(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||(Aq(i),n&&n.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new kq(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,n);else{let u=a1(this.ranges,s.overlay||(i.from<i.to?[new ni(i.from,i.to)]:[]));u.length&&i1(u),(u.length||!s.overlay)&&this.inner.push(new r1(s.parser,u.length?s.parser.startParse(this.input,l1(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new ni(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(n&&(l=n.predicate(i))&&(l===!0&&(l=new ni(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=a1(this.ranges,n.ranges);c.length&&(i1(c),this.inner.splice(n.index,0,new r1(n.parser,n.parser.startParse(this.input,l1(n.mounts,c),c),n.ranges.map(u=>new ni(u.from-n.start,u.to-n.start)),n.bracketed,n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function Sq(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function s1(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function Aq(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,f,d,h,m,p){let v=n[p],O=[],b=[];s1(o,u,v,O,b,h);let w=a[v+1],S=a[v+2];l.push(O.length);let _=p?c(v+4,a[v+3],o.set.types[a[v]],w,S-w,p-1):e.toTree();return O.push(_),b.push(w-h),s1(o,a[v+3],f,O,b,h),new mt(d,O,b,m)}i.children[s]=c(0,a.length,Ln.none,0,o.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new ar(f,d+t.from,u,t._tree))}}class o1{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Zt.IncludeAnonymous|Zt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Zt.IgnoreOverlays|Zt.ExcludeBuffers)||n.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 n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof mt)n=n.children[0];else break}return!1}}let Cq=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(Hm))!==null&&n!==void 0?n:r.to,this.inner=new o1(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 n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(Hm))!==null&&e!==void 0?e:n.to,this.inner=new o1(n.tree,-n.offset)}}findMounts(e,n){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(et.mounted);if(o&&o.parser==n)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 a1(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,a=t[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(n||(r=n=e.slice()),l.from<o?(n[s]=new ni(l.from,o),l.to>a&&n.splice(s+1,0,new ni(a,l.to))):l.to>a?n[s--]=new ni(a,l.to):n.splice(s--,1))}}return r}function Tq(t,e,n,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:o?t[i].to:t[i].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new ni(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 l1(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){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 ni(d.from+r,d.to+r)),f=Tq(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&&n.push(new _s(h,p,i.tree,-o,s.from>=h||s.openStart,s.to<=p||s.openEnd)),m)break;h=f[d].to}}else n.push(new _s(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let Pq=0,Zi=class Km{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=Pq++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Km&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let i=new Km(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new ed(e);return r=>r.modified.indexOf(n)>-1?r:ed.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}},Eq=0;class ed{constructor(e){this.name=e,this.instances=[],this.id=Eq++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&$q(n,a.modified));if(r)return r;let i=[],s=new Zi(e.name,i,e,n);for(let a of n)a.instances.push(s);let o=Qq(n);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(ed.get(a,l));return s}}function $q(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Qq(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function wl(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.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 Cx.add(e)}const Cx=new et({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new Pc(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class Pc{constructor(e,n,r,i){this.tags=e,this.mode=n,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 Tx(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[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=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function Lq(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Mq(t,e,n,r=0,i=t.length){let s=new qq(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class qq{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=n)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=i,u=Rq(e)||Pc.empty,f=Lq(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(et.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),m=this.highlighters.filter(v=>!v.scope||v.scope(d.tree.type)),p=e.firstChild();for(let v=0,O=a;;v++){let b=v<d.overlay.length?d.overlay[v]:null,w=b?b.from+a:l,S=Math.max(n,O),_=Math.min(r,w);if(S<_&&p)for(;e.from<_&&(this.highlightRange(e,S,_,i,s),this.startSpan(Math.min(_,e.to),c),!(e.to>=w||!e.nextSibling())););if(!b||w>r)break;O=b.to+a,O>n&&(this.highlightRange(h.cursor(),Math.max(n,b.from+a),Math.min(r,O),"",m),this.startSpan(Math.min(r,O),c))}p&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function Rq(t){let e=t.type.prop(Cx);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Se=Zi.define,Nu=Se(),Bs=Se(),c1=Se(Bs),u1=Se(Bs),js=Se(),Iu=Se(js),ep=Se(js),zi=Se(),ho=Se(zi),Di=Se(),Ni=Se(),Jm=Se(),Ql=Se(Jm),Bu=Se(),I={comment:Nu,lineComment:Se(Nu),blockComment:Se(Nu),docComment:Se(Nu),name:Bs,variableName:Se(Bs),typeName:c1,tagName:Se(c1),propertyName:u1,attributeName:Se(u1),className:Se(Bs),labelName:Se(Bs),namespace:Se(Bs),macroName:Se(Bs),literal:js,string:Iu,docString:Se(Iu),character:Se(Iu),attributeValue:Se(Iu),number:ep,integer:Se(ep),float:Se(ep),bool:Se(js),regexp:Se(js),escape:Se(js),color:Se(js),url:Se(js),keyword:Di,self:Se(Di),null:Se(Di),atom:Se(Di),unit:Se(Di),modifier:Se(Di),operatorKeyword:Se(Di),controlKeyword:Se(Di),definitionKeyword:Se(Di),moduleKeyword:Se(Di),operator:Ni,derefOperator:Se(Ni),arithmeticOperator:Se(Ni),logicOperator:Se(Ni),bitwiseOperator:Se(Ni),compareOperator:Se(Ni),updateOperator:Se(Ni),definitionOperator:Se(Ni),typeOperator:Se(Ni),controlOperator:Se(Ni),punctuation:Jm,separator:Se(Jm),bracket:Ql,angleBracket:Se(Ql),squareBracket:Se(Ql),paren:Se(Ql),brace:Se(Ql),content:zi,heading:ho,heading1:Se(ho),heading2:Se(ho),heading3:Se(ho),heading4:Se(ho),heading5:Se(ho),heading6:Se(ho),contentSeparator:Se(zi),list:Se(zi),quote:Se(zi),emphasis:Se(zi),strong:Se(zi),link:Se(zi),monospace:Se(zi),strikethrough:Se(zi),inserted:Se(),deleted:Se(),changed:Se(),invalid:Se(),meta:Bu,documentMeta:Se(Bu),annotation:Se(Bu),processingInstruction:Se(Bu),definition:Zi.defineModifier("definition"),constant:Zi.defineModifier("constant"),function:Zi.defineModifier("function"),standard:Zi.defineModifier("standard"),local:Zi.defineModifier("local"),special:Zi.defineModifier("special")};for(let t in I){let e=I[t];e instanceof Zi&&(e.name=t)}Tx([{tag:I.link,class:"tok-link"},{tag:I.heading,class:"tok-heading"},{tag:I.emphasis,class:"tok-emphasis"},{tag:I.strong,class:"tok-strong"},{tag:I.keyword,class:"tok-keyword"},{tag:I.atom,class:"tok-atom"},{tag:I.bool,class:"tok-bool"},{tag:I.url,class:"tok-url"},{tag:I.labelName,class:"tok-labelName"},{tag:I.inserted,class:"tok-inserted"},{tag:I.deleted,class:"tok-deleted"},{tag:I.literal,class:"tok-literal"},{tag:I.string,class:"tok-string"},{tag:I.number,class:"tok-number"},{tag:[I.regexp,I.escape,I.special(I.string)],class:"tok-string2"},{tag:I.variableName,class:"tok-variableName"},{tag:I.local(I.variableName),class:"tok-variableName tok-local"},{tag:I.definition(I.variableName),class:"tok-variableName tok-definition"},{tag:I.special(I.variableName),class:"tok-variableName2"},{tag:I.definition(I.propertyName),class:"tok-propertyName tok-definition"},{tag:I.typeName,class:"tok-typeName"},{tag:I.namespace,class:"tok-namespace"},{tag:I.className,class:"tok-className"},{tag:I.macroName,class:"tok-macroName"},{tag:I.propertyName,class:"tok-propertyName"},{tag:I.operator,class:"tok-operator"},{tag:I.comment,class:"tok-comment"},{tag:I.meta,class:"tok-meta"},{tag:I.invalid,class:"tok-invalid"},{tag:I.punctuation,class:"tok-punctuation"}]);var tp;const Xs=new et;function sh(t){return Ne.define({combine:t?e=>e.concat(t):void 0})}const aO=new et;class Fr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Pt.prototype.hasOwnProperty("tree")||Object.defineProperty(Pt.prototype,"tree",{get(){return wn(this)}}),this.parser=n,this.extension=[rl.of(this),Pt.languageData.of((s,o,a)=>{let l=f1(s,o,a),c=l.type.prop(Xs);if(!c)return[];let u=s.facet(c),f=l.type.prop(aO);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,n,r=-1){return f1(e,n,r).type.prop(Xs)==this.data}findRegions(e){let n=e.facet(rl);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Xs)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(et.mounted);if(a){if(a.tree.prop(Xs)==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 mt&&i(c,s.positions[l]+o)}};return i(wn(e),0),r}get allowsNesting(){return!0}}Fr.setState=Qt.define();function f1(t,e,n){let r=t.facet(rl),i=wn(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,Zt.ExcludeBuffers|Zt.EnterBracketed))s.type.isTop&&(i=s);return i}class tl extends Fr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=sh(e.languageData);return new tl(n,e.parser.configure({props:[Xs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new tl(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function wn(t){let e=t.field(Fr.state,!1);return e?e.tree:mt.empty}class Dq{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,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Ll=null;class Go{constructor(e,n,r=[],i,s,o,a,l){this.parser=e,this.state=n,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,n,r){return new Go(e,n,[],mt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Dq(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=mt.empty&&this.isDone(n??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()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(_s.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<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(_s.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ll;Ll=this;try{return e()}finally{Ll=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=d1(e,n.from,n.to);return e}changes(e,n){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=_s.applyChanges(r,l),i=mt.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 Go(this.parser,n,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 n=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=d1(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends ih{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=Ll;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 mt(Ln.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ll}}function d1(t,e,n){return _s.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class nl{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=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),n.viewport.to);return n.work(20,r)||n.takeTree(),new nl(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Go.create(e.facet(rl).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new nl(r)}}Fr.state=di.define({create:nl.init,update(t,e){for(let n of e.effects)if(n.is(Fr.setState))return n.value;return e.startState.facet(rl)!=e.state.facet(rl)?nl.init(e.state):t.apply(e)}});let Px=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Px=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const np=typeof navigator<"u"&&(!((tp=navigator.scheduling)===null||tp===void 0)&&tp.isInputPending)?()=>navigator.scheduling.isInputPending():null,Nq=mr.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 n=this.view.state.field(Fr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Fr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=Px(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Fr.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!np?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>np&&np()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Fr.setState.of(new nl(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(n=>Zr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),rl=Ne.define({combine(t){return t.length?t[0]:null},enables:t=>[Fr.state,Nq,Pe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class il{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class ee{constructor(e,n,r,i,s,o=void 0){this.name=e,this.alias=n,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:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new ee(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(s=>s==n))return i;if(r)for(let i of e)for(let s of i.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return i}return null}}const Iq=Ne.define(),uu=Ne.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ho(t){let e=t.facet(uu);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function td(t,e){let n="",r=t.tabSize,i=t.facet(uu)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function Ex(t,e){t instanceof Pt&&(t=new oh(t));for(let r of t.state.facet(Iq)){let i=r(t,e);if(i!==void 0)return i}let n=wn(t.state);return n.length>=e?Bq(t,n,e):null}class oh{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ho(e)}lineAt(e,n=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}:(n<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,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),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,n=e.length){return xs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),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 _l=new et;function Bq(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);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 $x(r,t,n)}function $x(t,e,n){for(let r=t;r;r=r.next){let i=zq(r.node);if(i)return i(lO.create(e,n,r))}return 0}function jq(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function zq(t){let e=t.type.prop(_l);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(et.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>Qx(o,!0,1,void 0,s&&!jq(o)?i.from:void 0)}return t.parent==null?Zq:null}function Zq(){return 0}class lO extends oh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new lO(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Fq(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return $x(this.context.next,this.base,this.pos)}}function Fq(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Xq(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=n.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(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function Vq({closing:t,align:e=!0,units:n=1}){return r=>Qx(r,e,n,t)}function Qx(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=e?Xq(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const Wq=t=>t.baseIndent;function kf({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const Yq=Ne.define(),fu=new et;function Lx(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}class kl{constructor(e,n){this.specs=e;let r;function i(a){let l=to.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Fr?a=>a.prop(Xs)==o.data:o?a=>a==o:void 0,this.style=Tx(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new to(r):null,this.themeType=n.themeType}static define(e,n){return new kl(e,n||{})}}const eg=Ne.define(),Mx=Ne.define({combine(t){return t.length?[t[0]]:null}});function rp(t){let e=t.facet(eg);return e.length?e:t.facet(Mx)}function Ec(t,e){let n=[Gq],r;return t instanceof kl&&(t.module&&n.push(Pe.styleModule.of(t.module)),r=t.themeType),e?.fallback?n.push(Mx.of(t)):r?n.push(eg.computeN([Pe.darkTheme],i=>i.facet(Pe.darkTheme)==(r=="dark")?[t]:[])):n.push(eg.of(t)),n}class Uq{constructor(e){this.markCache=Object.create(null),this.tree=wn(e.state),this.decorations=this.buildDeco(e,rp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=wn(e.state),r=rp(e.state),i=r!=rp(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return ft.none;let r=new Vo;for(let{from:i,to:s}of e.visibleRanges)Mq(this.tree,n,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=ft.mark({class:l})))},i,s);return r.finish()}}const Gq=co.high(mr.fromClass(Uq,{decorations:t=>t.decorations})),qx=kl.define([{tag:I.meta,color:"#404740"},{tag:I.link,textDecoration:"underline"},{tag:I.heading,textDecoration:"underline",fontWeight:"bold"},{tag:I.emphasis,fontStyle:"italic"},{tag:I.strong,fontWeight:"bold"},{tag:I.strikethrough,textDecoration:"line-through"},{tag:I.keyword,color:"#708"},{tag:[I.atom,I.bool,I.url,I.contentSeparator,I.labelName],color:"#219"},{tag:[I.literal,I.inserted],color:"#164"},{tag:[I.string,I.deleted],color:"#a11"},{tag:[I.regexp,I.escape,I.special(I.string)],color:"#e40"},{tag:I.definition(I.variableName),color:"#00f"},{tag:I.local(I.variableName),color:"#30a"},{tag:[I.typeName,I.namespace],color:"#085"},{tag:I.className,color:"#167"},{tag:[I.special(I.variableName),I.macroName],color:"#256"},{tag:I.definition(I.propertyName),color:"#00c"},{tag:I.comment,color:"#940"},{tag:I.invalid,color:"#f00"}]),Hq=1e4,Kq="()[]{}",Rx=new et;function tg(t,e,n){let r=t.prop(e<0?et.openedBy:et.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function ng(t){let e=t.type.prop(Rx);return e?e(t.node):t}function Ta(t,e,n,r={}){let i=r.maxScanDistance||Hq,s=r.brackets||Kq,o=wn(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=tg(l.type,n,s);if(c&&l.from<l.to){let u=ng(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return Jq(t,e,n,l,u,c,s)}}return eR(t,e,n,o,a.type,i,s)}function Jq(t,e,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=ng(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(tg(u.type,n,o))c++;else if(tg(u.type,-n,o)){if(c==0){let f=ng(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function eR(t,e,n,r,i,s,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;n<0&&(d+=h.length);let m=e+d*n;for(let p=n>0?0:h.length-1,v=n>0?h.length:-1;p!=v;p+=n){let O=o.indexOf(h[p]);if(!(O<0||r.resolveInner(m+p,1).type!=i))if(O%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:m+p,to:m+p+1},matched:O>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}function h1(t,e,n,r=0,i=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=i;for(let o=r;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class Dx{constructor(e,n,r,i){this.string=e,this.tabSize=n,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 n=this.string.charAt(this.pos),r;if(typeof e=="string"?r=n==e:r=n&&(e instanceof RegExp?e.test(n):e(n)),r)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}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 n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=h1(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:h1(this.string,null,this.tabSize)}match(e,n,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)?(n!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&n!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function tR(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||nR,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||fO,mergeTokens:t.mergeTokens!==!1}}function nR(t){if(typeof t!="object")return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const p1=new WeakMap;class cO extends Fr{constructor(e){let n=sh(e.languageData),r=tR(e),i,s=new class extends ih{createParse(o,a,l){return new iR(i,o,a,l)}};super(n,s,[],e.name),this.topNode=aR(n,this),i=this,this.streamParser=r,this.stateAfter=new et({perNode:!0}),this.tokenTable=e.tokenTable?new jx(r.tokenTable):oR}static define(e){return new cO(e)}getIndent(e){let n,{overrideIndentation:r}=e.options;r&&(n=p1.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let i=uO(this,e.node.tree,e.node.from,e.node.from,n??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 Dx(l.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-l.from;)Ix(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&&n==null&&p1.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function uO(t,e,n,r,i){let s=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],c=a instanceof mt&&l<i&&uO(t,a,l,r,i);if(c)return c}return null}function Nx(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;!i&&n==0&&e.type==t.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 mt){if(!(l=Nx(t,a,n-o,r-o,i)))break;return i?new mt(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function rR(t,e,n,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=n&&a>n&&uO(t,s.tree,0-s.offset,n,a),c;if(l&&l.pos<=r&&(c=Nx(t,s.tree,n+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:c}}return{state:t.streamParser.startState(i?Ho(i):4),tree:mt.empty}}let iR=class{constructor(e,n,r,i){this.lang=e,this.input=n,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=Go.get(),o=i[0].from,{state:a,tree:l}=rR(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(Ho(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Go.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(n,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>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
154
+ `&&(n="");else{let r=n.indexOf(`
155
+ `);r>-1&&(n=n.slice(0,r))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),r=e+n.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(n=n.slice(0,s-(r-n.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,a=this.lineAfter(o);n+=a,r=o+a.length}return{line:n,end:r}}skipGapsTo(e,n,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+n;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-i}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(n,i,1),n+=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]==n?this.chunk[o+2]=r:this.chunk.push(e,n,r,s),i}parseLine(e){let{line:n,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new Dx(n,e?e.state.tabSize:4,e?Ho(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=Ix(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=mt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:sR,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new mt(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 mt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function Ix(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let i=t(e,n);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const fO=Object.create(null),$c=[Ln.none],sR=new yl($c),m1=[],g1=Object.create(null),Bx=Object.create(null);for(let[t,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"]])Bx[t]=zx(fO,e);class jx{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Bx)}resolve(e){return e?this.table[e]||(this.table[e]=zx(this.extra,e)):0}}const oR=new jx(fO);function ip(t,e){m1.indexOf(t)>-1||(m1.push(t),console.warn(e))}function zx(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||I[c];u?typeof u=="function"?l.length?l=l.map(u):ip(c,`Modifier ${c} used at start of tag`):l.length?ip(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:ip(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),s=g1[i];if(s)return s.id;let o=g1[i]=Ln.define({id:$c.length,name:r,props:[wl({[r]:n})]});return $c.push(o),o.id}function aR(t,e){let n=Ln.define({id:$c.length,name:"Document",props:[Xs.add(()=>t),_l.add(()=>r=>e.getIndent(r))],top:!0});return $c.push(n),n}bn.RTL,bn.LTR;const lR=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=hO(t.state,n.from);return r.line?cR(t):r.block?fR(t):!1};function dO(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const cR=dO(pR,0),uR=dO(Zx,0),fR=dO((t,e)=>Zx(t,e,hR(e)),0);function hO(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ml=50;function dR(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-Ml,r),o=t.sliceDoc(i,i+Ml),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+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*Ml?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+Ml),f=t.sliceDoc(i-Ml,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,m=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(m,m+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(m-1))?1:0}}:null}function hR(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.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 Zx(t,e,n=e.selection.ranges){let r=n.map(s=>hO(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>dR(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=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 pR(t,e,n=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of n){let a=r.length,l=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=hO(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(t!=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(t!=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 rg=Es.define(),mR=Es.define(),gR=Ne.define(),Fx=Ne.define({combine(t){return su(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),Xx=di.define({create(){return Yi.empty},update(t,e){let n=e.state.facet(Fx),r=e.annotation(rg);if(r){let l=Tr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=nd(u,u.length,n.minDepth,l):u=Yx(u,e.startState.selection),new Yi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(mR);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(En.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Tr.fromTransaction(e),o=e.annotation(En.time),a=e.annotation(En.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Yi(t.done.map(Tr.fromJSON),t.undone.map(Tr.fromJSON))}});function pO(t={}){return[Xx,Fx.of(t),Pe.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?Vx:e.inputType=="historyRedo"?ig:null;return r?(e.preventDefault(),r(n)):!1}})]}function ah(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(Xx,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const Vx=ah(0,!1),ig=ah(1,!1),vR=ah(0,!0),OR=ah(1,!0);class Tr{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new Tr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.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 Tr(e.changes&&Dn.fromJSON(e.changes),[],e.mapped&&Hi.fromJSON(e.mapped),e.startSelection&&me.fromJSON(e.startSelection),e.selectionsAfter.map(me.fromJSON))}static fromTransaction(e,n){let r=ri;for(let i of e.startState.facet(gR)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new Tr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ri)}static selection(e){return new Tr(void 0,ri,void 0,void 0,e)}}function nd(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function bR(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&o<=u&&(r=!0)}}),r}function yR(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function Wx(t,e){return t.length?e.length?t.concat(e):t:e}const ri=[],wR=200;function Yx(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-wR));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),nd(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Tr.selection([e])]}function _R(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function sp(t,e){if(!t.length)return t;let n=t.length,r=ri;for(;n;){let i=kR(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Tr.selection(r)]:ri}function kR(t,e,n){let r=Wx(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ri,n);if(!t.changes)return Tr.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new Tr(i,Qt.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const xR=/^(input\.type|delete)($|\.)/;class Yi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Yi(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||xR.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,bR(a.changes,e.changes))||r=="input.type.compose")?o=nd(o,o.length-1,i.minDepth,new Tr(e.changes.compose(a.changes),Wx(Qt.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,ri)):o=nd(o,o.length,i.minDepth,e),new Yi(o,ri,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:ri;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&yR(s[s.length-1],e)?this:new Yi(Yx(this.done,e),this.undone,n,r)}addMapping(e){return new Yi(sp(this.done,e),sp(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,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):n.selection);if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:rg.of({side:e,rest:_R(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?ri:i.slice(0,i.length-1);return s.mapped&&(a=sp(a,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:rg.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Yi.empty=new Yi(ri,ri);const mO=[{key:"Mod-z",run:Vx,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:ig,preventDefault:!0},{linux:"Ctrl-Shift-z",run:ig,preventDefault:!0},{key:"Mod-u",run:vR,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:OR,preventDefault:!0}];function xl(t,e){return me.create(t.ranges.map(e),t.mainIndex)}function Li(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Mi({state:t,dispatch:e},n){let r=xl(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Li(t,r)),!0)}function lh(t,e){return me.cursor(e?t.to:t.from)}function Ux(t,e){return Mi(t,n=>n.empty?t.moveByChar(n,e):lh(n,e))}function lr(t){return t.textDirectionAt(t.state.selection.main.head)==bn.LTR}const Gx=t=>Ux(t,!lr(t)),Hx=t=>Ux(t,lr(t));function Kx(t,e){return Mi(t,n=>n.empty?t.moveByGroup(n,e):lh(n,e))}const SR=t=>Kx(t,!lr(t)),AR=t=>Kx(t,lr(t));function CR(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function ch(t,e,n){let r=wn(t).resolveInner(e.head),i=n?et.closedBy:et.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;CR(t,c,i)?r=c:l=n?c.to:c.from}let s=r.type.prop(i),o,a;return s&&(o=n?Ta(t,r.from,1):Ta(t,r.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?r.to:r.from,me.cursor(a,n?-1:1)}const TR=t=>Mi(t,e=>ch(t.state,e,!lr(t))),PR=t=>Mi(t,e=>ch(t.state,e,lr(t)));function Jx(t,e){return Mi(t,n=>{if(!n.empty)return lh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const eS=t=>Jx(t,!1),tS=t=>Jx(t,!0);function nS(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(Pe.scrollMargins)){let o=s(t);o?.top&&(n=Math.max(o?.top,n)),o?.bottom&&(r=Math.max(o?.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function rS(t,e){let n=nS(t),{state:r}=t,i=xl(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):lh(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<c&&(s=Pe.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return t.dispatch(Li(r,i),{effects:s}),!0}const v1=t=>rS(t,!1),sg=t=>rS(t,!0);function uo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=me.cursor(r.from+s))}return i}const ER=t=>Mi(t,e=>uo(t,e,!0)),$R=t=>Mi(t,e=>uo(t,e,!1)),QR=t=>Mi(t,e=>uo(t,e,!lr(t))),LR=t=>Mi(t,e=>uo(t,e,lr(t))),MR=t=>Mi(t,e=>me.cursor(t.lineBlockAt(e.head).from,1)),qR=t=>Mi(t,e=>me.cursor(t.lineBlockAt(e.head).to,-1));function RR(t,e,n){let r=!1,i=xl(t.selection,s=>{let o=Ta(t,s.head,-1)||Ta(t,s.head,1)||s.head>0&&Ta(t,s.head-1,1)||s.head<t.doc.length&&Ta(t,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 me.cursor(a)});return r?(e(Li(t,i)),!0):!1}const DR=({state:t,dispatch:e})=>RR(t,e);function hi(t,e){let n=xl(t.state.selection,r=>{let i=e(r);return me.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Li(t.state,n)),!0)}function iS(t,e){return hi(t,n=>t.moveByChar(n,e))}const sS=t=>iS(t,!lr(t)),oS=t=>iS(t,lr(t));function aS(t,e){return hi(t,n=>t.moveByGroup(n,e))}const NR=t=>aS(t,!lr(t)),IR=t=>aS(t,lr(t)),BR=t=>hi(t,e=>ch(t.state,e,!lr(t))),jR=t=>hi(t,e=>ch(t.state,e,lr(t)));function lS(t,e){return hi(t,n=>t.moveVertically(n,e))}const cS=t=>lS(t,!1),uS=t=>lS(t,!0);function fS(t,e){return hi(t,n=>t.moveVertically(n,e,nS(t).height))}const O1=t=>fS(t,!1),b1=t=>fS(t,!0),zR=t=>hi(t,e=>uo(t,e,!0)),ZR=t=>hi(t,e=>uo(t,e,!1)),FR=t=>hi(t,e=>uo(t,e,!lr(t))),XR=t=>hi(t,e=>uo(t,e,lr(t))),VR=t=>hi(t,e=>me.cursor(t.lineBlockAt(e.head).from)),WR=t=>hi(t,e=>me.cursor(t.lineBlockAt(e.head).to)),y1=({state:t,dispatch:e})=>(e(Li(t,{anchor:0})),!0),w1=({state:t,dispatch:e})=>(e(Li(t,{anchor:t.doc.length})),!0),_1=({state:t,dispatch:e})=>(e(Li(t,{anchor:t.selection.main.anchor,head:0})),!0),k1=({state:t,dispatch:e})=>(e(Li(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),YR=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),UR=({state:t,dispatch:e})=>{let n=uh(t).map(({from:r,to:i})=>me.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:me.create(n),userEvent:"select"})),!0},GR=({state:t,dispatch:e})=>{let n=xl(t.selection,r=>{let i=wn(t),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 me.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Li(t,n)),!0)};function dS(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let a=s;;){let l=t.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:(t.dispatch(Li(n,me.create(i,i.length-1))),!0)}const HR=t=>dS(t,!1),KR=t=>dS(t,!0),JR=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=me.create([n.main]):n.main.empty||(r=me.create([me.cursor(n.main.head)])),r?(e(Li(t,r)),!0):!1};function du(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(n="delete.backward",l=ju(t,l,!1)):l>o&&(n="delete.forward",l=ju(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=ju(t,o,!1),a=ju(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:me.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Pe.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ju(t,e,n){if(t instanceof Pe)for(let r of t.state.facet(Pe.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const hS=(t,e,n)=>du(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),a,l;if(n&&!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=xs(a,s.tabSize),u=c%Ho(s)||Ho(s);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)i--;l=i}else l=Xn(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=Xn(o.text,l-o.from,!1,!1)+o.from);return l}),og=t=>hS(t,!1,!0),pS=t=>hS(t,!0,!1),mS=(t,e)=>du(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Xn(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!=n.head)&&(a=u),r=l}return r}),gS=t=>mS(t,!1),eD=t=>mS(t,!0),tD=t=>du(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),nD=t=>du(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),rD=t=>du(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),iD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:It.of(["",""])},range:me.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},sD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:Xn(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:Xn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(o,i))},range:me.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function uh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=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]});n=s.number+1}return e}function vS(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of uh(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)i.push(me.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)i.push(me.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:me.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const oD=({state:t,dispatch:e})=>vS(t,e,!1),aD=({state:t,dispatch:e})=>vS(t,e,!0);function OS(t,e,n){if(t.readOnly)return!1;let r=[];for(let s of uh(t))n?r.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):r.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let i=t.changes(r);return e(t.update({changes:i,selection:t.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const lD=({state:t,dispatch:e})=>OS(t,e,!1),cD=({state:t,dispatch:e})=>OS(t,e,!0),uD=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(uh(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=xl(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function fD(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=wn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(et.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const x1=bS(!1),dD=bS(!0);function bS(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!t&&s==o&&fD(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new oh(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=Ex(c,s);for(u==null&&(u=xs(/^\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=["",td(e,u)];return l&&f.push(td(e,c.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:It.of(f)},range:me.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function gO(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=t.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),o=a.to+1}let s=t.changes(i);return{changes:i,range:me.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const hD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new oh(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=gO(t,(s,o,a)=>{let l=Ex(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=td(t,l);(c!=u||a.from<s.from+c.length)&&(n[s.from]=l,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},yS=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(gO(t,(n,r)=>{r.push({from:n.from,insert:t.facet(uu)})}),{userEvent:"input.indent"})),!0),wS=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(gO(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=xs(i,t.tabSize),o=0,a=td(t,Math.max(0,s-Ho(t)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),pD=t=>(t.setTabFocusMode(),!0),mD=[{key:"Ctrl-b",run:Gx,shift:sS,preventDefault:!0},{key:"Ctrl-f",run:Hx,shift:oS},{key:"Ctrl-p",run:eS,shift:cS},{key:"Ctrl-n",run:tS,shift:uS},{key:"Ctrl-a",run:MR,shift:VR},{key:"Ctrl-e",run:qR,shift:WR},{key:"Ctrl-d",run:pS},{key:"Ctrl-h",run:og},{key:"Ctrl-k",run:tD},{key:"Ctrl-Alt-h",run:gS},{key:"Ctrl-o",run:iD},{key:"Ctrl-t",run:sD},{key:"Ctrl-v",run:sg}],gD=[{key:"ArrowLeft",run:Gx,shift:sS,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:SR,shift:NR,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:QR,shift:FR,preventDefault:!0},{key:"ArrowRight",run:Hx,shift:oS,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:AR,shift:IR,preventDefault:!0},{mac:"Cmd-ArrowRight",run:LR,shift:XR,preventDefault:!0},{key:"ArrowUp",run:eS,shift:cS,preventDefault:!0},{mac:"Cmd-ArrowUp",run:y1,shift:_1},{mac:"Ctrl-ArrowUp",run:v1,shift:O1},{key:"ArrowDown",run:tS,shift:uS,preventDefault:!0},{mac:"Cmd-ArrowDown",run:w1,shift:k1},{mac:"Ctrl-ArrowDown",run:sg,shift:b1},{key:"PageUp",run:v1,shift:O1},{key:"PageDown",run:sg,shift:b1},{key:"Home",run:$R,shift:ZR,preventDefault:!0},{key:"Mod-Home",run:y1,shift:_1},{key:"End",run:ER,shift:zR,preventDefault:!0},{key:"Mod-End",run:w1,shift:k1},{key:"Enter",run:x1,shift:x1},{key:"Mod-a",run:YR},{key:"Backspace",run:og,shift:og,preventDefault:!0},{key:"Delete",run:pS,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:gS,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:eD,preventDefault:!0},{mac:"Mod-Backspace",run:nD,preventDefault:!0},{mac:"Mod-Delete",run:rD,preventDefault:!0}].concat(mD.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),vO=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:TR,shift:BR},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:PR,shift:jR},{key:"Alt-ArrowUp",run:oD},{key:"Shift-Alt-ArrowUp",run:lD},{key:"Alt-ArrowDown",run:aD},{key:"Shift-Alt-ArrowDown",run:cD},{key:"Mod-Alt-ArrowUp",run:HR},{key:"Mod-Alt-ArrowDown",run:KR},{key:"Escape",run:JR},{key:"Mod-Enter",run:dD},{key:"Alt-l",mac:"Ctrl-l",run:UR},{key:"Mod-i",run:GR,preventDefault:!0},{key:"Mod-[",run:wS},{key:"Mod-]",run:yS},{key:"Mod-Alt-\\",run:hD},{key:"Shift-Mod-k",run:uD},{key:"Shift-Mod-\\",run:DR},{key:"Mod-/",run:lR},{key:"Alt-A",run:uR},{key:"Ctrl-m",mac:"Shift-Alt-m",run:pD}].concat(gD),vD={key:"Tab",run:yS,shift:wS};class OO{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=wn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(kS(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function S1(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function OD(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=S1(e)+S1(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function _S(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:OD(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function bD(t,e){return n=>{for(let r=wn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class A1{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function No(t){return t.selection.main.from}function kS(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const bO=Es.define();function yD(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:me.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const C1=new WeakMap;function wD(t){if(!Array.isArray(t))return t;let e=C1.get(t);return e||C1.set(t,e=_S(t)),e}const rd=Qt.define(),Qc=Qt.define();class _D{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=Is(e,n),i=ko(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(Is(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let b=Is(e,0),w=ko(b),S=w==e.length?0:-100;if(b!=n[0])if(b==r[0])S+=-200;else return null;return this.ret(S,[0,w])}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=n.length,c=0;if(a<0){for(let b=0,w=Math.min(e.length,200);b<w&&c<l;){let S=Is(e,b);(S==n[c]||S==r[c])&&(i[c++]=b),b+=ko(S)}if(c<l)return null}let u=0,f=0,d=!1,h=0,m=-1,p=-1,v=/[a-z]/.test(e),O=!0;for(let b=0,w=Math.min(e.length,200),S=0;b<w&&f<l;){let _=Is(e,b);a<0&&(u<l&&_==n[u]&&(s[u++]=b),h<l&&(_==n[h]||_==r[h]?(h==0&&(m=b),p=b+1,h++):h=0));let x,C=_<255?_>=48&&_<=57||_>=97&&_<=122?2:_>=65&&_<=90?1:0:(x=a2(_))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!b||C==1&&v||S==0&&C!=0)&&(n[f]==_||r[f]==_&&(d=!0)?o[f++]=b:o.length&&(O=!1)),S=C,b+=ko(_)}return f==l&&o[0]==0&&O?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+(O?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let a=o+(this.astral?ko(Is(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 kD{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 n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Fn=Ne.define({combine(t){return su(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:xD,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>T1(e(r),n(r)),optionClass:(e,n)=>r=>T1(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function T1(t,e){return t?e?t+" "+e:t:e}function xD(t,e,n,r,i,s){let o=t.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(n.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=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let v=(e.bottom-e.top)/s.offsetHeight,O=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/v}px; max-width: ${f/O}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function SD(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.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(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function op(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class AD{constructor(e,n,r){this.view=e,this.stateField=n,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(n),{options:s,selected:o}=i.open,a=e.state.facet(Fn);this.optionContent=SD(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=op(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(n).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(Fn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Qc.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;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=op(s.length,o,e.state.facet(Fn).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=op(n.options.length,n.selected,this.view.state.facet(Fn).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.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=>Zr(this.view.state,a,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){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 n=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"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&TD(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=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,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Fn).positionInfo(this.view,n,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,n,r){const i=document.createElement("ul");i.id=n,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=n+"-"+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 CD(t,e){return n=>new AD(n,t,e)}function TD(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function P1(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function PD(t,e){let n=[],r=null,i=null,s=u=>{n.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(Fn);for(let u of t)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)s(new A1(d,u.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,m=o.filterStrict?new kD(d):new _D(d);for(let p of u.result.options)if(h=m.match(p.label)){let v=p.displayLabel?f?f(p,h.matched):[]:h.matched,O=h.score+(p.boost||0);if(s(new A1(p,u.source,v,O)),typeof p.section=="object"&&p.section.rank==="dynamic"){let{name:b}=p.section;i||(i=Object.create(null)),i[b]=Math.max(O,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 n){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 n.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):P1(u.completion)>P1(l)&&(a[a.length-1]=u),l=u.completion}return a}class Pa{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Pa(this.options,E1(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let a=PD(e,n);if(!a.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Fn).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 Pa(a,E1(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:qD,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new Pa(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Pa(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class id{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new id(LD,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Fn),s=(r.override||n.languageDataAt("autocomplete",No(n)).map(wD)).map(l=>(this.active.find(u=>u.source==l)||new ii(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(yO));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!ED(s,this.active)||a?o=Pa.build(s,n,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 ii(l.source,0):l));for(let l of e.effects)l.is(SS)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new id(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?$D:QD}}function ED(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const $D={"aria-autocomplete":"list"},QD={};function E1(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const LD=[];function xS(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(bO);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ii{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=xS(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ii(i.source,0)),r&4&&i.state==0&&(i=new ii(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(rd))i=new ii(i.source,1,s.value);else if(s.is(Qc))i=new ii(i.source,0);else if(s.is(yO))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(No(e.state))}}class ja extends ii{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&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=No(e.state);if(a>o||!i||n&2&&(No(e.startState)==this.from||a<this.limit))return new ii(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return MD(i.validFor,e.state,s,o)?new ja(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new OO(e.state,a,!1)))?new ja(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:No(e.state)):new ii(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ja(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ii(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function MD(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):kS(t,!0).test(i)}const yO=Qt.define({map(t,e){return t.map(n=>n.map(e))}}),SS=Qt.define(),Ar=di.define({create(){return id.start()},update(t,e){return t.update(e)},provide:t=>[px.from(t,e=>e.tooltip),Pe.contentAttributes.from(t,e=>e.attrs)]});function wO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Ar).active.find(i=>i.source==e.source);return r instanceof ja?(typeof n=="string"?t.dispatch({...yD(t.state,n,r.from,r.to),annotations:bO.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const qD=CD(Ar,wO);function zu(t,e="option"){return n=>{let r=n.state.field(Ar,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Fn).interactionDelay)return!1;let i=1,s;e=="page"&&(s=mx(n,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*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:SS.of(a)}),!0}}const RD=t=>{let e=t.state.field(Ar,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Fn).interactionDelay?!1:wO(t,e.open.options[e.open.selected])},dc=t=>t.state.field(Ar,!1)?(t.dispatch({effects:rd.of(!0)}),!0):!1,DD=t=>{let e=t.state.field(Ar,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Qc.of(null)}),!0)};class ND{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const ID=50,BD=1e3,jD=mr.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Ar).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Ar),n=t.state.facet(Fn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Ar)==e)return;let r=t.transactions.some(s=>{let o=xS(s,n);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&&t.docChanged||o.updates.length+t.transactions.length>ID&&Date.now()-o.time>BD){for(let a of o.context.abortListeners)try{a()}catch(l){Zr(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(rd)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.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 t.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:t}=this.view,e=t.field(Ar);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Fn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=No(e),r=new OO(e,n,t.explicit,this.view),i=new ND(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Qc.of(null)}),Zr(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Fn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Fn),r=this.view.state.field(Ar);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=No(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),c=new ja(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:a);for(let u of s.updates)c=c.update(u,n);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 ii(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:yO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Ar,!1);if(e&&e.tooltip&&this.view.state.facet(Fn).closeOnBlur){let n=e.open&&mx(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Qc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:rd.of(!1)}),20),this.composing=0}}}),zD=typeof navigator=="object"&&/Win/.test(navigator.platform),ZD=co.highest(Pe.domEventHandlers({keydown(t,e){let n=e.state.field(Ar,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(zD&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&wO(e,r),!1}})),AS=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 FD{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class _O{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,dr.TrackDel),r=e.mapPos(this.to,1,dr.TrackDel);return n==null||r==null?null:new _O(this.field,n,r)}}class kO{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),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(uu);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new _O(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],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<n.length;f++)(a!=null?n[f].seq==a:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(a==null||n[f].seq!=null&&n[f].seq<a);)f++;n.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 FD(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 kO(r,i)}}let XD=ft.widget({widget:new class extends ou{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),VD=ft.mark({class:"cm-snippetField"});class Sl{constructor(e,n){this.ranges=e,this.active=n,this.deco=ft.set(e.map(r=>(r.from==r.to?XD:VD).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Sl(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const hu=Qt.define({map(t,e){return t&&t.map(e)}}),WD=Qt.define(),Lc=di.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(hu))return n.value;if(n.is(WD)&&t)return new Sl(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Pe.decorations.from(t,e=>e?e.deco:ft.none)});function xO(t,e){return me.create(t.filter(n=>n.field==e).map(n=>me.range(n.from,n.to)))}function YD(t){let e=kO.parse(t);return(n,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:It.of(o)},scrollIntoView:!0,annotations:r?[bO.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 Sl(a,0),f=c.effects=[hu.of(u)];n.state.field(Lc,!1)===void 0&&f.push(Qt.appendConfig.of([Lc,JD,e3,AS]))}n.dispatch(n.state.update(c))}}function CS(t){return({state:e,dispatch:n})=>{let r=e.field(Lc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:xO(r.ranges,i),effects:hu.of(s?null:new Sl(r.ranges,i)),scrollIntoView:!0})),!0}}const UD=({state:t,dispatch:e})=>t.field(Lc,!1)?(e(t.update({effects:hu.of(null)})),!0):!1,GD=CS(1),HD=CS(-1),KD=[{key:"Tab",run:GD,shift:HD},{key:"Escape",run:UD}],$1=Ne.define({combine(t){return t.length?t[0]:KD}}),JD=co.highest(na.compute([$1],t=>t.facet($1)));function wr(t,e){return{...e,apply:YD(t)}}const e3=Pe.domEventHandlers({mousedown(t,e){let n=e.state.field(Lc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:xO(n.ranges,i.field),effects:hu.of(n.ranges.some(s=>s.field>i.field)?new Sl(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),TS=new class extends eo{};TS.startSide=1;TS.endSide=-1;function ag(t={}){return[ZD,Ar,Fn.of(t),jD,n3,AS]}const t3=[{key:"Ctrl-Space",run:dc},{mac:"Alt-`",run:dc},{mac:"Alt-i",run:dc},{key:"Escape",run:DD},{key:"ArrowDown",run:zu(!0)},{key:"ArrowUp",run:zu(!1)},{key:"PageDown",run:zu(!0,"page")},{key:"PageUp",run:zu(!1,"page")},{key:"Enter",run:RD}],n3=co.highest(na.computeN([Fn],t=>t.facet(Fn).defaultKeymap?[t3]:[]));class sd{static create(e,n,r,i,s){let o=i+(i<<8)+e+(n<<4)|0;return new sd(e,n,r,o,s,[],[])}constructor(e,n,r,i,s,o,a){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=a,this.hashProp=[[et.contextHash,i]]}addChild(e,n){e.prop(et.contextHash)!=this.hash&&(e=new mt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new mt(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,s,o)=>new mt(Ln.none,i,s,o,this.hashProp)})}}var we;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(we||(we={}));class r3{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class i3{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 hc(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,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function Q1(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==we.OrderedList?CO:AO)(n,e,!1);return r>0&&(t.type!=we.BulletList||SO(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const PS={[we.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Tt(we.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(pi(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[we.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[we.OrderedList]:Q1,[we.BulletList]:Q1,[we.Document](){return!0}};function pi(t){return t==32||t==9||t==10||t==13}function hc(t,e=0){for(;e<t.length&&pi(t.charCodeAt(e));)e++;return e}function L1(t,e,n){for(;e>n&&pi(t.charCodeAt(e-1));)e--;return e}function ES(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function $S(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function SO(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)r++;else if(!pi(s))return-1}return n&&t.next==45&&MS(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(NS.SetextHeading)>-1||r<3?-1:1}function QS(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function AO(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||pi(t.text.charCodeAt(t.pos+1)))&&(!n||QS(e,we.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function CO(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!pi(t.text.charCodeAt(r+1))||n&&!QS(e,we.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function LS(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function MS(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&pi(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const lg=/^[ \t]*$/,qS=/-->/,RS=/\?>/,cg=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,qS],[/^\s*<\?/,RS],[/^\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,lg],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,lg]];function DS(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,s=cg.length-(n?1:0);i<s;i++)if(cg[i][0].test(r))return i;return-1}function M1(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function Ms(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==we.CodeText?t[r].to=n:t.push(Tt(we.CodeText,e,n))}const Zu={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,s=t.lineStart+e.text.length,o=[],a=[];for(Ms(o,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){Ms(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<n)break;{if(a.length){for(let c of a)c.type==we.CodeText?Ms(o,c.from,c.to):o.push(c);a=[]}Ms(o,t.lineStart-1,t.lineStart);for(let c of e.markers)o.push(c);s=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<s&&Ms(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=we.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-i).finish(we.CodeBlock,s-i),i),!0},FencedCode(t,e){let n=ES(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,s=n-e.pos,o=e.skipSpace(n),a=L1(e.text,e.text.length,o),l=[Tt(we.CodeMark,r,r+s)];o<a&&l.push(Tt(we.CodeInfo,t.lineStart+o,t.lineStart+a));for(let c=!0,u=!0,f=!1;t.nextLine()&&e.depth>=t.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&&Ms(l,t.lineStart-1,t.lineStart),l.push(Tt(we.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{f=!0,c||(Ms(l,t.lineStart-1,t.lineStart),u=!1);for(let p of e.markers)l.push(p);let h=t.lineStart+e.basePos,m=t.lineStart+e.text.length;h<m&&(Ms(l,h,m),u=!1)}}return t.addNode(t.buffer.writeElements(l,-r).finish(we.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=$S(e);return n<0?!1:(t.startContext(we.Blockquote,e.pos),t.addNode(we.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(SO(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(we.HorizontalRule,n),!0},BulletList(t,e){let n=AO(e,t,!1);if(n<0)return!1;t.block.type!=we.BulletList&&t.startContext(we.BulletList,e.basePos,e.next);let r=M1(e,e.pos+1);return t.startContext(we.ListItem,e.basePos,r-e.baseIndent),t.addNode(we.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=CO(e,t,!1);if(n<0)return!1;t.block.type!=we.OrderedList&&t.startContext(we.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=M1(e,e.pos+n);return t.startContext(we.ListItem,e.basePos,r-e.baseIndent),t.addNode(we.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=LS(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,s=L1(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!pi(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(we.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,o),i+n+1),-i);o<e.text.length&&a.write(we.HeaderMark,o-r,s-r);let l=a.finish(we.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let n=DS(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=cg[n][1],s=[],o=i!=lg;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&t.nextLine();let a=i==qS?we.CommentBlock:i==RS?we.ProcessingInstructionBlock:we.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class s3{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
156
+ `+n.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&hc(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,Tt(we.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(WS(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Tt(we.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(XS(e,hc(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=hc(e,this.pos),r=0;if(n>this.pos){let i=VS(e,n,this.start);if(i){let s=ap(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=ap(e,this.pos)),r>0&&r<e.length?r:-1}else return ap(e,this.pos)}}}function ap(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!pi(n))return-1}return e}class o3{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:MS(n),s=n.next;if(i<0)return!1;let o=Tt(we.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Tt(s==61?we.SetextHeading1:we.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const NS={LinkReference(t,e){return e.content.charCodeAt(0)==91?new s3(e):null},SetextHeading(){return new o3}},a3=[(t,e)=>LS(e)>=0,(t,e)=>ES(e)>=0,(t,e)=>$S(e)>=0,(t,e)=>AO(e,t,!0)>=0,(t,e)=>CO(e,t,!0)>=0,(t,e)=>SO(e,t,!0)>=0,(t,e)=>DS(e,t,!0)>=0],l3={text:"",end:0};class c3{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new i3,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=sd.create(we.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new d3(r,n):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 n=new r3(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.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,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
157
+ `+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),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 n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=YS(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 n=l3;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+o,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);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 "+we[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 n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
158
+ `?"":n;else{let i=n.indexOf(`
159
+ `);r=i<0?n:n.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,n,r=0){this.block=sd.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new mt(this.parser.nodeSet.types[e],sl,sl,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(fg(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}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?IS(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 n=fg(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(we.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?Tt(this.parser.getNodeType(e),n,r,i):new zS(e,n)}get buffer(){return new jS(this.parser.nodeSet)}}function IS(t,e,n,r,i){let s=t[e].to,o=[],a=[],l=n.from+r;function c(u,f){for(;f?u>=s:u>s;){let d=t[e+1].from-s;r+=d,u+=d,e++,s=t[e].to}}for(let u=n.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=IS(t,e,u,r,i),c(u.to+r,!1)):d=u.toTree(),o.push(d),a.push(f-l)}return c(n.to+r,!1),new mt(n.type,o,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}class fh extends ih{constructor(e,n,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=n,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,n,r){let i=new c3(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=ug(e);if(!n)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(ql(n.defineNodes)){i=Object.assign({},i);let d=r.types.slice(),h;for(let m of n.defineNodes){let{name:p,block:v,composite:O,style:b}=typeof m=="string"?{name:m}:m;if(d.some(_=>_.name==p))continue;O&&(i[d.length]=(_,x,C)=>O(x,C,_.value));let w=d.length,S=O?["Block","BlockContext"]:v?w>=we.ATXHeading1&&w<=we.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(Ln.define({id:w,name:p,props:S&&[[et.group,S]]})),b&&(h||(h={}),Array.isArray(b)||b instanceof Zi?h[p]=b:Object.assign(h,b))}r=new yl(d),h&&(r=r.extend(wl(h)))}if(ql(n.props)&&(r=r.extend(...n.props)),ql(n.remove))for(let d of n.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(ql(n.parseBlock))for(let d of n.parseBlock){let h=a.indexOf(d.name);if(h>-1)s[h]=d.parse,o[h]=d.leaf;else{let m=d.before?Fu(a,d.before):d.after?Fu(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(ql(n.parseInline))for(let d of n.parseInline){let h=c.indexOf(d.name);if(h>-1)l[h]=d.parse;else{let m=d.before?Fu(c,d.before):d.after?Fu(c,d.after)+1:c.length-1;l.splice(m,0,d.parse),c.splice(m,0,d.name)}}return n.wrap&&(f=f.concat(n.wrap)),new fh(r,s,o,a,u,i,l,c,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new TO(this,e,n);e:for(let i=n;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 ql(t){return t!=null&&t.length>0}function ug(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=ug(t[0]);if(t.length==1)return e;let n=ug(t.slice(1));if(!n||!e)return e||n;let r=(o,a)=>(o||sl).concat(a||sl),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function Fu(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let BS=[Ln.none];for(let t=1,e;e=we[t];t++)BS[t]=Ln.define({id:t,name:e,props:t>=we.Escape?[]:[[et.group,t in PS?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const sl=[];class jS{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return mt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let Mc=class{constructor(e,n,r,i=sl){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new jS(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class zS{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return sl}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Tt(t,e,n,r){return new Mc(t,e,n,r)}const ZS={resolve:"Emphasis",mark:"EmphasisMark"},FS={resolve:"Emphasis",mark:"EmphasisMark"},So={},od={};class Br{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const q1="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let qc=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{qc=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const lp={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<q1.length;i++)if(q1.charCodeAt(i)==r)return t.append(Tt(we.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(Tt(we.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(Tt(we.InlineCode,n,r+1,[Tt(we.CodeMark,n,n+i),Tt(we.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.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 t.append(Tt(we.Autolink,n,n+1+i[0].length,[Tt(we.LinkMark,n,n+1),Tt(we.URL,n+1,n+i[0].length),Tt(we.LinkMark,n+i[0].length,n+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(Tt(we.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(Tt(we.ProcessingInstruction,n,n+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?t.append(Tt(we.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=qc.test(i),a=qc.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 t.append(new Br(e==95?ZS:FS,n,r,(d?1:0)|(h?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Tt(we.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(Tt(we.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Br(So,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Br(od,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof Br&&(i.type==So||i.type==od)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=u3(t,s,i.type==So?we.Link:we.Image,i.from,n+1);if(i.type==So)for(let a=0;a<r;a++){let l=t.parts[a];l instanceof Br&&l.type==So&&(l.side=0)}return o.to}}return-1}};function u3(t,e,n,r,i){let{text:s}=t,o=t.char(i),a=i;if(e.unshift(Tt(we.LinkMark,r,r+(n==we.Image?2:1))),e.push(Tt(we.LinkMark,i-1,i)),o==40){let l=t.skipSpace(i+1),c=XS(s,l-t.offset,t.offset),u;c&&(l=t.skipSpace(c.to),l!=c.to&&(u=VS(s,l-t.offset,t.offset),u&&(l=t.skipSpace(u.to)))),t.char(l)==41&&(e.push(Tt(we.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(Tt(we.LinkMark,l,a)))}else if(o==91){let l=WS(s,i-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return Tt(n,r,a,e)}function XS(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return Tt(we.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(pi(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?Tt(we.URL,e+n,s+n):s==t.length?null:!1}}function VS(t,e,n){let r=t.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<t.length;s++){let a=t.charCodeAt(s);if(o)o=!1;else{if(a==i)return Tt(we.LinkTitle,e+n,s+1+n);a==92&&(o=!0)}}return null}function WS(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let a=t.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:Tt(we.LinkLabel,e+n,s+1+n);if(r&&!pi(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class TO{constructor(e,n,r){this.parser=e,this.text=n,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,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new Br(e,n,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Br&&(n.type==So||n.type==od))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 Br&&i.type.resolve&&i.side&2))continue;let s=i.type==ZS||i.type==FS,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let p=this.parts[l];if(p instanceof Br&&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 Mc&&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 Br(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=d?new Br(i.type,d,i.to,i.side):null)?this.parts.splice(r,0,h):this.parts[r]=h}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Mc&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof Br&&r.type==e&&r.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Br?n:null}skipSpace(e){return hc(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?Tt(this.parser.getNodeType(e),n,r,i):new zS(e,n)}}TO.linkStart=So;TO.imageStart=od;function fg(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof Mc&&(n[r]=new Mc(s.type,s.from,s.to,fg(s.children,[i])))}else n.splice(r++,0,i)}return n}const f3=[we.CodeBlock,we.ListItem,we.OrderedList,we.BulletList];let d3=class{constructor(e,n){this.fragments=e,this.input=n,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,n){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<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(et.contextHash)==e}takeNodes(e){let n=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(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let u=YS(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,u);else{let f=new mt(e.parser.nodeSet.types[we.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,u)}if(n.type.is("Block")&&(f3.indexOf(n.type.id)<0?(o=n.to-r,a=e.block.children.length):(o=l,a=c),l=n.to-r,c=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function YS(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const h3=wl({"Blockquote/...":I.quote,HorizontalRule:I.contentSeparator,"ATXHeading1/... SetextHeading1/...":I.heading1,"ATXHeading2/... SetextHeading2/...":I.heading2,"ATXHeading3/...":I.heading3,"ATXHeading4/...":I.heading4,"ATXHeading5/...":I.heading5,"ATXHeading6/...":I.heading6,"Comment CommentBlock":I.comment,Escape:I.escape,Entity:I.character,"Emphasis/...":I.emphasis,"StrongEmphasis/...":I.strong,"Link/... Image/...":I.link,"OrderedList/... BulletList/...":I.list,"BlockQuote/...":I.quote,"InlineCode CodeText":I.monospace,"URL Autolink":I.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":I.processingInstruction,"CodeInfo LinkLabel":I.labelName,LinkTitle:I.string,Paragraph:I.content}),p3=new fh(new yl(BS).extend(h3),Object.keys(Zu).map(t=>Zu[t]),Object.keys(Zu).map(t=>NS[t]),Object.keys(Zu),a3,PS,Object.keys(lp).map(t=>lp[t]),Object.keys(lp),[]);function m3(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function g3(t){let{codeParser:e,htmlParser:n}=t;return{wrap:Ax((i,s)=>{let o=i.type.id;if(e&&(o==we.CodeBlock||o==we.FencedCode)){let a="";if(o==we.FencedCode){let c=i.node.getChild(we.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==we.CodeText,bracketed:o==we.FencedCode}}else if(n&&(o==we.HTMLBlock||o==we.HTMLTag||o==we.CommentBlock))return{parser:n,overlay:m3(i.node,i.from,i.to)};return null})}}const v3={resolve:"Strikethrough",mark:"StrikethroughMark"},O3={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":I.strikethrough}},{name:"StrikethroughMark",style:I.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=qc.test(r),l=qc.test(i);return t.addDelimiter(v3,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function pc(t,e,n=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(t.elt("TableCell",i+a,i+l,t.parser.parseInline(e.slice(a,l),i+a)))};for(let f=n;f<e.length;f++){let d=e.charCodeAt(f);d==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(t.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 R1(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const US=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class D1{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&US.test(i=n.text.slice(n.pos))){let s=[];pc(e,r.content,0,s,r.start)==pc(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];pc(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const b3={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":I.heading}},"TableRow",{name:"TableCell",style:I.content},{name:"TableDelimiter",style:I.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return R1(e.content,0)?new D1:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof D1)||!R1(e.text,e.basePos))return!1;let r=t.peekLine();return US.test(r)&&pc(t,e.text,e.basePos)==pc(t,r,e.basePos)},before:"SetextHeading"}]};class y3{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const w3={defineNodes:[{name:"Task",block:!0,style:I.list},{name:"TaskMarker",style:I.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new y3:null},after:"SetextHeading"}]},N1=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,I1=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,_3=/[\w-]+\.[\w-]+($|\/)/,B1=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,j1=/\/[a-zA-Z\d@.]+/gy;function z1(t,e,n,r){let i=0;for(let s=e;s<n;s++)t[s]==r&&i++;return i}function k3(t,e){I1.lastIndex=e;let n=I1.exec(t);if(!n||_3.exec(n[0])[0].indexOf("_")>-1)return-1;let r=e+n[0].length;for(;;){let i=t[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&z1(t,e,r,")")>z1(t,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,r))))r=e+s.index;else break}return r}function Z1(t,e){B1.lastIndex=e;let n=B1.exec(t);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:e+n[0].length-(r=="."?1:0)}const x3={parseInline:[{name:"Autolink",parse(t,e,n){let r=n-t.offset;if(r&&/\w/.test(t.text[r-1]))return-1;N1.lastIndex=r;let i=N1.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=k3(t.text,r+i[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(r,s));s=r+o[0].length}}else i[3]?s=Z1(t.text,r):(s=Z1(t.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(j1.lastIndex=s,i=j1.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},S3=[b3,w3,O3,x3];function GS(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==t)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(n,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),pi(l))break}return-1}}const A3={defineNodes:[{name:"Superscript",style:I.special(I.content)},{name:"SuperscriptMark",style:I.processingInstruction}],parseInline:[{name:"Superscript",parse:GS(94,"Superscript","SuperscriptMark")}]},C3={defineNodes:[{name:"Subscript",style:I.special(I.content)},{name:"SubscriptMark",style:I.processingInstruction}],parseInline:[{name:"Subscript",parse:GS(126,"Subscript","SubscriptMark")}]},T3={defineNodes:[{name:"Emoji",style:I.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]};var F1={};class ad{constructor(e,n,r,i,s,o,a,l,c,u=0,f){this.p=e,this.stack=n,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,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new ad(e,[],n,r,r,0,[],0,i?new X1(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;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&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.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,n,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(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,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]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,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||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,a?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){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(n,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,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new ad(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new P3(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((a,l)=>l&1&&a==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[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(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&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;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.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 n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}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 n=new X1(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}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 X1{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class P3{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=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],n,!0);this.state=i}}class ld{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new ld(e,n,n-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 ld(this.stack,this.pos,this.index)}}function ec(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.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}n?n[i++]=s:n=new e(s)}return n}class xf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const V1=new xf;class E3{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=V1,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){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(;n<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 n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);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,n=0){let r=n?this.resolveOffset(n,-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,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>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,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=V1,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,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class za{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;HS(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}za.prototype.contextual=za.prototype.fallback=za.prototype.extend=!1;class cd{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?ec(e):e}token(e,n){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(HS(this.data,e,n,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))}}cd.prototype.contextual=za.prototype.fallback=za.prototype.extend=!1;class Yr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function HS(t,e,n,r,i,s){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&t[o])!=0;){let c=t[o+1];for(let h=o+3;h<c;h+=2)if((t[h+1]&a)>0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||$3(m,e.token.value,i,s))){e.acceptToken(m);break}}let u=e.next,f=0,d=t[o+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){o=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,m=c+h+(h<<1),p=t[m],v=t[m+1]||65536;if(u<p)d=h;else if(u>=v)f=h+1;else{o=t[m+2],e.advance();continue e}}break}}function W1(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function $3(t,e,n,r){let i=W1(n,r,e);return i<0||W1(n,r,t)<i}const qr=typeof process<"u"&&F1&&/\bparse\b/.test(F1.LOG);let cp=null;function Y1(t,e,n){let r=t.cursor(Zt.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Q3{constructor(e,n){this.fragments=e,this.nodeSet=n,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?Y1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Y1(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 n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof mt){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(et.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class L3{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new xf)}getActions(e){let n=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=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new xf,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new xf,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.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,n,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++]=n,this.actions[i++]=r,i}addActions(e,n,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=us(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(us(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(us(a,c+1),n,r,i))}return i}}class M3{constructor(e,n,r,i){this.parser=e,this.input=n,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 E3(n,i),this.tokens=new L3(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[ad.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new Q3(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=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>n)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&&R3(i);if(o)return qr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw qr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);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 qr&&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>n)&&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,n,r){let i=e.pos,{parser:s}=this,o=qr?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(et.contextHash)||0)==u))return e.useNode(f,d),qr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof mt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof mt&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),qr&&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),qr&&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?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return U1(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],c=n[(o<<1)+1],u=qr?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),qr&&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()&&(qr&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)qr&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))qr&&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),qr&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),U1(a,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),mt.build({buffer:ld.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 n=(cp||(cp=new WeakMap)).get(e);return n||cp.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function U1(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class q3{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const up=t=>t;class KS{constructor(e){this.start=e.start,this.shift=e.shift||up,this.reduce=e.reduce||up,this.reuse=e.reuse||up,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ol extends ih{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.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=et[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 yl(n.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=wx;let o=ec(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(G1),this.states=ec(e.states,Uint32Array),this.data=ec(e.stateData),this.goto=ec(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new za(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,n,r){let i=new M3(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+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,n){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=us(r,s+2)];else{if(r[s+1]==2)return us(r,s+2);break}if(o==n||o==0)return us(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(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=us(this.data,s+2);else break;i=n(us(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=us(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ol.prototype),this);if(e.props&&(n.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}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.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 n.specializers[i]=G1(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}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 n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new q3(e,r,i)}static deserialize(e){return new ol(e)}}function us(t,e){return t[e]|t[e+1]<<16}function R3(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function G1(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const D3=55,N3=1,I3=56,B3=2,j3=57,z3=3,H1=4,Z3=5,PO=6,JS=7,eA=8,tA=9,nA=10,F3=11,X3=12,V3=13,fp=58,W3=14,Y3=15,K1=59,rA=21,U3=23,iA=24,G3=25,dg=27,sA=28,H3=29,K3=32,J3=35,eN=37,tN=38,nN=0,rN=1,iN={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},sN={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},J1={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 oN(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let e0=null,t0=null,n0=0;function hg(t,e){let n=t.pos+e;if(n0==n&&t0==t)return e0;let r=t.peek(e),i="";for(;oN(r);)i+=String.fromCharCode(r),r=t.peek(++e);return t0=t,n0=n,e0=i?i.toLowerCase():r==aN||r==lN?void 0:null}const oA=60,ud=62,EO=47,aN=63,lN=33,cN=45;function r0(t,e){this.name=t,this.parent=e}const uN=[PO,nA,JS,eA,tA],fN=new KS({start:null,shift(t,e,n,r){return uN.indexOf(e)>-1?new r0(hg(r,1)||"",t):t},reduce(t,e){return e==rA&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==PO||i==eN?new r0(hg(r,1)||"",t):t},strict:!1}),dN=new Yr((t,e)=>{if(t.next!=oA){t.next<0&&e.context&&t.acceptToken(fp);return}t.advance();let n=t.next==EO;n&&t.advance();let r=hg(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?Y3:W3);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(F3);if(i&&sN[i])return t.acceptToken(fp,-2);if(e.dialectEnabled(nN))return t.acceptToken(X3);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(V3)}else{if(r=="script")return t.acceptToken(JS);if(r=="style")return t.acceptToken(eA);if(r=="textarea")return t.acceptToken(tA);if(iN.hasOwnProperty(r))return t.acceptToken(nA);i&&J1[i]&&J1[i][r]?t.acceptToken(fp,-1):t.acceptToken(PO)}},{contextual:!0}),hN=new Yr(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(K1);break}if(t.next==cN)e++;else if(t.next==ud&&e>=2){n>=3&&t.acceptToken(K1,-2);break}else e=0;t.advance()}});function pN(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const mN=new Yr((t,e)=>{if(t.next==EO&&t.peek(1)==ud){let n=e.dialectEnabled(rN)||pN(e.context);t.acceptToken(n?Z3:H1,2)}else t.next==ud&&t.acceptToken(H1,1)});function $O(t,e,n){let r=2+t.length;return new Yr(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==oA||s==1&&i.next==EO||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==ud){a>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const gN=$O("script",D3,N3),vN=$O("style",I3,B3),ON=$O("textarea",j3,z3),bN=wl({"Text RawText IncompleteTag IncompleteCloseTag":I.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":I.angleBracket,TagName:I.tagName,"MismatchedCloseTag/TagName":[I.tagName,I.invalid],AttributeName:I.attributeName,"AttributeValue UnquotedAttributeValue":I.attributeValue,Is:I.definitionOperator,"EntityReference CharacterReference":I.character,Comment:I.blockComment,ProcessingInst:I.processingInstruction,DoctypeDecl:I.documentMeta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seTag 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:fN,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,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[bN],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}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*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!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:[gN,vN,ON,mN,dN,hN,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function aA(t,e){let n=Object.create(null);for(let r of t.getChildren(iA)){let i=r.getChild(G3),s=r.getChild(dg)||r.getChild(sA);i&&(n[e.read(i.from,i.to)]=s?s.type.id==dg?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function i0(t,e){let n=t.getChild(U3);return n?e.read(n.from,n.to):" "}function dp(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=aA(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function lA(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let a of t)(a.tag=="script"?n: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 Ax((a,l)=>{let c=a.type.id;if(c==H3)return dp(a,l,n);if(c==K3)return dp(a,l,r);if(c==J3)return dp(a,l,i);if(c==rA&&s.length){let u=a.node,f=u.firstChild,d=f&&i0(f,l),h;if(d){for(let m of s)if(m.tag==d&&(!m.attrs||m.attrs(h||(h=aA(f,l))))){let p=u.lastChild,v=p.type.id==tN?p.from:u.to;if(v>f.to)return{parser:m.parser,overlay:[{from:f.to,to:v}]}}}}if(o&&c==iA){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!=i0(u.parent,l))continue;let m=u.lastChild;if(m.type.id==dg){let p=m.from+1,v=m.lastChild,O=m.to-(v&&v.isError?0:1);if(O>p)return{parser:h.parser,overlay:[{from:p,to:O}],bracketed:!0}}else if(m.type.id==sA)return{parser:h.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}const wN=122,s0=1,_N=123,kN=124,cA=2,xN=125,SN=3,AN=4,uA=[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],CN=58,TN=40,fA=95,PN=91,Sf=45,EN=46,$N=35,QN=37,LN=38,MN=92,qN=10,RN=42;function Rc(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function QO(t){return t>=48&&t<=57}function o0(t){return QO(t)||t>=97&&t<=102||t>=65&&t<=70}const dA=(t,e,n)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(Rc(l)||l==Sf||l==fA||s&&QO(l))!s&&(l!=Sf||a>0)&&(s=!0),o===a&&l==Sf&&o++,r.advance();else if(l==MN&&r.peek(1)!=qN){if(r.advance(),o0(r.next)){do r.advance();while(o0(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(cA)?e:l==TN?n:t);break}}},DN=new Yr(dA(_N,cA,kN)),NN=new Yr(dA(xN,SN,AN)),IN=new Yr(t=>{if(uA.includes(t.peek(-1))){let{next:e}=t;(Rc(e)||e==fA||e==$N||e==EN||e==RN||e==PN||e==CN&&Rc(t.peek(1))||e==Sf||e==LN)&&t.acceptToken(wN)}}),BN=new Yr(t=>{if(!uA.includes(t.peek(-1))){let{next:e}=t;if(e==QN&&(t.advance(),t.acceptToken(s0)),Rc(e)){do t.advance();while(Rc(t.next)||QO(t.next));t.acceptToken(s0)}}}),jN=wl({"AtKeyword import charset namespace keyframes media supports":I.definitionKeyword,"from to selector":I.keyword,NamespaceName:I.namespace,KeyframeName:I.labelName,KeyframeRangeName:I.operatorKeyword,TagName:I.tagName,ClassName:I.className,PseudoClassName:I.constant(I.className),IdName:I.labelName,"FeatureName PropertyName":I.propertyName,AttributeName:I.attributeName,NumberLiteral:I.number,KeywordQuery:I.keyword,UnaryQueryOp:I.operatorKeyword,"CallTag ValueName":I.atom,VariableName:I.variableName,Callee:I.operatorKeyword,Unit:I.unit,"UniversalSelector NestingSelector":I.definitionOperator,"MatchOp CompareOp":I.compareOperator,"ChildOp SiblingOp, LogicOp":I.logicOperator,BinOp:I.arithmeticOperator,Important:I.modifier,Comment:I.blockComment,ColorLiteral:I.color,"ParenthesizedContent StringLiteral":I.string,":":I.punctuation,"PseudoOp #":I.derefOperator,"; ,":I.separator,"( )":I.paren,"[ ]":I.squareBracket,"{ }":I.brace}),zN={__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},ZN={__proto__:null,or:98,and:98,not:106,only:106,layer:170},FN={__proto__:null,selector:112,layer:166},XN={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},VN={__proto__:null,to:207},WN=ol.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'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#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#{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:[jN],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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;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}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:[IN,BN,DN,NN,1,2,3,4,new cd("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:t=>zN[t]||-1},{term:125,get:t=>ZN[t]||-1},{term:4,get:t=>FN[t]||-1},{term:25,get:t=>XN[t]||-1},{term:123,get:t=>VN[t]||-1}],tokenPrec:1963});let hp=null;function pp(){if(!hp&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));hp=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return hp||[]}const a0=["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(t=>({type:"class",label:t})),l0=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),YN=["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(t=>({type:"type",label:t})),UN=["@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(t=>({type:"keyword",label:t})),os=/^(\w[\w-]*|-\w[\w-]*|)$/,GN=/^-(-[\w-]*)?$/;function HN(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return r?.name!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const c0=new Sx,KN=["Declaration"];function JN(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function hA(t,e,n){if(e.to-e.from>4096){let r=c0.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Zt.IncludeAnonymous);if(o.firstChild())do for(let a of hA(t,o.node,n))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return c0.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(KN)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const pA=t=>e=>{let{state:n,pos:r}=e,i=wn(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.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:pp(),validFor:os};if(i.name=="ValueName")return{from:i.from,options:l0,validFor:os};if(i.name=="PseudoClassName")return{from:i.from,options:a0,validFor:os};if(t(i)||(e.explicit||s)&&HN(i,n.doc))return{from:t(i)||s?i.from:r,options:hA(n.doc,JN(i),t),validFor:GN};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:pp(),validFor:os};return{from:i.from,options:YN,validFor:os}}if(i.name=="AtKeyword")return{from:i.from,options:UN,validFor:os};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:a0,validFor:os}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:l0,validFor:os}:o.name=="Block"||o.name=="Styles"?{from:r,options:pp(),validFor:os}:null},mA=pA(t=>t.name=="VariableName"),Dc=tl.define({name:"css",parser:WN.configure({props:[_l.add({Declaration:kf()}),fu.add({"Block KeyframeList":Lx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function gA(){return new il(Dc,Dc.data.of({autocomplete:mA}))}const eI=Object.freeze(Object.defineProperty({__proto__:null,css:gA,cssCompletionSource:mA,cssLanguage:Dc,defineCSSCompletionSource:pA},Symbol.toStringTag,{value:"Module"})),tI=316,nI=317,u0=1,rI=2,iI=3,sI=4,oI=318,aI=320,lI=321,cI=5,uI=6,fI=0,pg=[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],vA=125,dI=59,mg=47,hI=42,pI=43,mI=45,gI=60,vI=44,OI=63,bI=46,yI=91,wI=new KS({start:!1,shift(t,e){return e==cI||e==uI||e==aI?t:e==lI},strict:!1}),_I=new Yr((t,e)=>{let{next:n}=t;(n==vA||n==-1||e.context)&&t.acceptToken(oI)},{contextual:!0,fallback:!0}),kI=new Yr((t,e)=>{let{next:n}=t,r;pg.indexOf(n)>-1||n==mg&&((r=t.peek(1))==mg||r==hI)||n!=vA&&n!=dI&&n!=-1&&!e.context&&t.acceptToken(tI)},{contextual:!0}),xI=new Yr((t,e)=>{t.next==yI&&!e.context&&t.acceptToken(nI)},{contextual:!0}),SI=new Yr((t,e)=>{let{next:n}=t;if(n==pI||n==mI){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(u0);t.acceptToken(r?u0:rI)}}else n==OI&&t.peek(1)==bI&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(iI))},{contextual:!0});function mp(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const AI=new Yr((t,e)=>{if(t.next!=gI||!e.dialectEnabled(fI)||(t.advance(),t.next==mg))return;let n=0;for(;pg.indexOf(t.next)>-1;)t.advance(),n++;if(mp(t.next,!0)){for(t.advance(),n++;mp(t.next,!1);)t.advance(),n++;for(;pg.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==vI)return;for(let r=0;;r++){if(r==7){if(!mp(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(sI,-n)}),CI=wl({"get set async static":I.modifier,"for while do if else switch try catch finally return throw break continue default case defer":I.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":I.operatorKeyword,"let var const using function class extends":I.definitionKeyword,"import export from":I.moduleKeyword,"with debugger new":I.keyword,TemplateString:I.special(I.string),super:I.atom,BooleanLiteral:I.bool,this:I.self,null:I.null,Star:I.modifier,VariableName:I.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":I.function(I.variableName),VariableDefinition:I.definition(I.variableName),Label:I.labelName,PropertyName:I.propertyName,PrivatePropertyName:I.special(I.propertyName),"CallExpression/MemberExpression/PropertyName":I.function(I.propertyName),"FunctionDeclaration/VariableDefinition":I.function(I.definition(I.variableName)),"ClassDeclaration/VariableDefinition":I.definition(I.className),"NewExpression/VariableName":I.className,PropertyDefinition:I.definition(I.propertyName),PrivatePropertyDefinition:I.definition(I.special(I.propertyName)),UpdateOp:I.updateOperator,"LineComment Hashbang":I.lineComment,BlockComment:I.blockComment,Number:I.number,String:I.string,Escape:I.escape,ArithOp:I.arithmeticOperator,LogicOp:I.logicOperator,BitOp:I.bitwiseOperator,CompareOp:I.compareOperator,RegExp:I.regexp,Equals:I.definitionOperator,Arrow:I.function(I.punctuation),": Spread":I.punctuation,"( )":I.paren,"[ ]":I.squareBracket,"{ }":I.brace,"InterpolationStart InterpolationEnd":I.special(I.brace),".":I.derefOperator,", ;":I.separator,"@":I.meta,TypeName:I.typeName,TypeDefinition:I.definition(I.typeName),"type enum interface implements namespace module declare":I.definitionKeyword,"abstract global Privacy readonly override":I.modifier,"is keyof unique infer asserts":I.operatorKeyword,JSXAttributeValue:I.attributeValue,JSXText:I.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":I.angleBracket,"JSXIdentifier JSXNameSpacedName":I.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":I.attributeName,"JSXBuiltin/JSXIdentifier":I.standard(I.tagName)}),TI={__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},PI={__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},EI={__proto__:null,"<":193},$I=ol.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'#Ep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+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName 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:wI,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:[CI],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!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||-1},{term:95,get:t=>EI[t]||-1}],tokenPrec:15201}),LO=[wr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),wr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),wr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),wr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),wr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),wr(`try {
161
+ \${}
162
+ } catch (\${error}) {
163
+ \${}
164
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),wr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),wr(`if (\${}) {
165
+ \${}
166
+ } else {
167
+ \${}
168
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),wr(`class \${name} {
169
+ constructor(\${params}) {
170
+ \${}
171
+ }
172
+ }`,{label:"class",detail:"definition",type:"keyword"}),wr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),wr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],OA=LO.concat([wr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),wr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),wr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),f0=new Sx,bA=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Rl(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const QI=["FunctionDeclaration"],LI={FunctionDeclaration:Rl("function"),ClassDeclaration:Rl("class"),ClassExpression:()=>!0,EnumDeclaration:Rl("constant"),TypeAliasDeclaration:Rl("type"),NamespaceDeclaration:Rl("namespace"),VariableDefinition(t,e){t.matchContext(QI)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function yA(t,e){let n=f0.get(e);if(n)return n;let r=[],i=!0;function s(o,a){let l=t.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(Zt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=LI[o.name];if(a&&a(o,s)||bA.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of yA(t,o.node))r.push(a);return!1}}),f0.set(e,r),r}const fd=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,MO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function wA(t){let e=wn(t.state).resolveInner(t.pos,-1);if(MO.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&fd.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)bA.has(i.name)&&(r=r.concat(yA(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:fd}}function gp(t,e,n){var r;let i=[];for(;;){let s=e.firstChild,o;if(s?.name=="VariableName")return i.push(t(s)),{path:i.reverse(),name:n};if(s?.name=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(t(o)),e=s;else return null}}function _A(t){let e=r=>t.state.doc.sliceString(r.from,r.to),n=wn(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?gp(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?gp(e,n.parent,""):MO.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&fd.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?gp(e,n,""):t.explicit?{path:[],name:""}:null}function MI(t,e){let n=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let a;try{a=t[o]}catch{continue}n.push({label:o,type:typeof a=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(t);if(!s)return n;t=s}}function qI(t){let e=new Map;return n=>{let r=_A(n);if(!r)return null;let i=t;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=MI(i,!r.path.length)),{from:n.pos-r.name.length,options:s,validFor:fd}}}const li=tl.define({name:"javascript",parser:$I.configure({props:[_l.add({IfStatement:kf({except:/^\s*({|else\b)/}),TryStatement:kf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Wq,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Vq({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":kf({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),fu.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Lx,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),kA={test:t=>/^JSX/.test(t.name),facet:sh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},qO=li.configure({dialect:"ts"},"typescript"),RO=li.configure({dialect:"jsx",props:[aO.add(t=>t.isTop?[kA]:void 0)]}),DO=li.configure({dialect:"jsx ts",props:[aO.add(t=>t.isTop?[kA]:void 0)]},"typescript");let xA=t=>({label:t,type:"keyword"});const SA="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(xA),RI=SA.concat(["declare","implements","private","protected","public"].map(xA));function AA(t={}){let e=t.jsx?t.typescript?DO:RO:t.typescript?qO:li,n=t.typescript?OA.concat(RI):LO.concat(SA);return new il(e,[li.data.of({autocomplete:bD(MO,_S(n))}),li.data.of({autocomplete:wA}),t.jsx?CA:[]])}function DI(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function d0(t,e,n=t.length){for(let r=e?.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const NI=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),CA=Pe.inputHandler.of((t,e,n,r,i)=>{if((NI?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!li.isActiveAt(t.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=d0(o.doc,m.firstChild,u))||((c=m.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${d}>`;return{range:me.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(r==">"){let h=DI(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=d0(o.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function II(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,r)=>{var i;!((i=n.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),n=>{let{state:r}=n,i=[];for(let{from:s,to:o}of li.findRegions(r)){let a=r.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let c of t.verify(r.sliceDoc(s,o),e))i.push(BI(c,r.doc,l))}return i}}function h0(t,e,n,r){return n.line(t+r.line).from+e+(t==1?r.col-1:-1)}function BI(t,e,n){let r=h0(t.line,t.column,e,n),i={from:r,to:t.endLine!=null&&t.endColumn!=1?h0(t.endLine,t.endColumn,e,n):r,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,a=s[0]+n.pos-r,l=s[1]+n.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 Xu=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:CA,completionPath:_A,esLint:II,javascript:AA,javascriptLanguage:li,jsxLanguage:RO,localCompletionSource:wA,scopeCompletionSource:qI,snippets:LO,tsxLanguage:DO,typescriptLanguage:qO,typescriptSnippets:OA},Symbol.toStringTag,{value:"Module"})),Dl=["_blank","_self","_top","_parent"],vp=["ascii","utf-8","utf-16","latin1","latin1"],Op=["get","post","put","delete"],bp=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Rr=["true","false"],Fe={},jI={a:{attrs:{href:null,ping:null,type:null,media:null,target:Dl,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:Dl}},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:bp,formmethod:Op,formnovalidate:["novalidate"],formtarget:Dl,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":vp,autocomplete:["on","off"],enctype:bp,method:Op,novalidate:["novalidate"],target:Dl}},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:bp,formmethod:Op,formnovalidate:["novalidate"],formtarget:Dl,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:vp,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:vp}},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},TA={accesskey:null,class:null,contenteditable:Rr,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:Rr,autocorrect:Rr,autocapitalize:Rr,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":Rr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Rr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Rr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Rr,"aria-hidden":Rr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Rr,"aria-multiselectable":Rr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Rr,"aria-relevant":null,"aria-required":Rr,"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},PA="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(t=>"on"+t);for(let t of PA)TA[t]=null;class Nc{constructor(e,n){this.tags={...jI,...e},this.globalAttrs={...TA,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Nc.default=new Nc;function al(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function ll(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function EA(t,e,n){let r=n.tags[al(t,ll(e))];return r?.children||n.allTags}function NO(t,e){let n=[];for(let r=ll(e);r&&!r.type.isTop;r=ll(r.parent)){let i=al(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const $A=/^[:\-\.\w\u00b7-\uffff]*$/;function p0(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=ll(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:EA(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(NO(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function m0(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:NO(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:$A}}function zI(t,e,n,r){let i=[],s=0;for(let o of EA(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of NO(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function ZI(t,e,n,r,i){let s=ll(n),o=s?e.tags[al(t.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:$A}}function FI(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=ll(n),d=f?e.tags[al(t.doc,f)]:null;u=d?.attrs&&d.attrs[c]}if(u){let f=t.sliceDoc(r,i).toLowerCase(),d='"',h='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=t.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 QA(t,e){let{state:n,pos:r}=e,i=wn(n).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)?m0(n,i,i.from,r):p0(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?p0(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?m0(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?ZI(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?FI(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?zI(n,t,i,r):null}function LA(t){return QA(Nc.default,t)}function MA(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Nc(e,n):Nc.default;return i=>QA(r,i)}const XI=li.parser.configure({top:"SingleExpression"}),qA=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:qO.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:RO.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:DO.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:XI},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:li.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Dc.parser}],RA=[{name:"style",parser:Dc.parser.configure({top:"Styles"})}].concat(PA.map(t=>({name:t,parser:li.parser}))),DA=tl.define({name:"html",parser:yN.configure({props:[_l.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),fu.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),Rx.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),mc=DA.configure({wrap:lA(qA,RA)});function NA(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=lA((t.nestedLanguages||[]).concat(qA),(t.nestedAttributes||[]).concat(RA)));let r=n?DA.configure({wrap:n,dialect:e}):e?mc.configure({dialect:e}):mc;return new il(r,[mc.data.of({autocomplete:MA(t)}),t.autoCloseTags!==!1?IA:[],AA().support,gA().support])}const g0=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),IA=Pe.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!mc.isActiveAt(t.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 v=m.parent;if(((u=(c=v.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=al(o.doc,v.parent,h))&&!g0.has(p)){let O=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`</${p}>`;return{range:l,changes:{from:h,to:O,insert:b}}}}else if(d&&r=="/"&&m.name=="IncompleteCloseTag"){let v=m.parent;if(m.from==h-2&&((f=v.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(p=al(o.doc,v,h))&&!g0.has(p)){let O=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`${p}>`;return{range:me.cursor(h+b.length,-1),changes:{from:h,to:O,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),VI=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:IA,html:NA,htmlCompletionSource:LA,htmlCompletionSourceWith:MA,htmlLanguage:mc},Symbol.toStringTag,{value:"Module"})),BA=sh({commentTokens:{block:{open:"<!--",close:"-->"}}}),jA=new et,zA=p3.configure({props:[fu.add(t=>!t.is("Block")||t.is("Document")||gg(t)!=null||WI(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),jA.add(gg),_l.add({Document:()=>null}),Xs.add({Document:BA})]});function gg(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function WI(t){return t.name=="OrderedList"||t.name=="BulletList"}function YI(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=gg(r.type))!=null&&i<=e)break;n=r}return n.to}const UI=Yq.of((t,e,n)=>{for(let r=wn(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(jA);if(i==null)continue;let s=YI(r,i);if(s>n)return{from:n,to:s}}return null});function IO(t){return new Fr(BA,t,[],"markdown")}const ZA=IO(zA),GI=zA.configure([S3,C3,A3,T3,{props:[fu.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Ic=IO(GI);function HI(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=ee.matchLanguageName(t,n,!0),r instanceof ee)return r.support?r.support.language.parser:Go.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class yp{constructor(e,n,r,i,s,o,a){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!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+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+XA(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function FA(t,e){let n=[],r=[];for(let i=t;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let s=n[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 yp(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 yp(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 yp(s.parent,l,l+u,o[1],c,f,s))}}return r}function XA(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function wp(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let a=XA(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;n.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 BO(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(uu)!=" ")return t;let r=xs(t,4,n),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(n)}const VA=(t={})=>({state:e,dispatch:n})=>{let r=wn(e),{doc:i}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!Ic.isActiveAt(e,a.from,-1)&&!Ic.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,c=i.lineAt(l),u=FA(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 O=f.node.firstChild,b=f.node.getChild("ListItem","ListItem");if(O.to>=l||b&&b.to<l||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||t.nonTightLists===!1){let w=u.length>1?u[u.length-2]:null,S,_="";w&&w.item?(S=c.from+w.from,_=w.marker(i,1)):S=c.from+(w?w.to:0);let x=[{from:S,to:l,insert:_}];return f.node.name=="OrderedList"&&wp(f.item,i,x,-2),w&&w.node.name=="OrderedList"&&wp(w.item,i,x),{range:me.cursor(S+_.length),changes:x}}else{let w=O0(u,e,c);return{range:me.cursor(l+w.length+1),changes:{from:c.from,insert:w+e.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let O=i.lineAt(c.from-1),b=/>\s*$/.exec(O.text);if(b&&b.index==f.from){let w=e.changes([{from:O.from+b.index,to:O.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(w),changes:w}}}let h=[];f.node.name=="OrderedList"&&wp(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 O=0,b=u.length-1;O<=b;O++)p+=O==b&&!m?u[O].marker(i,1):u[O].blank(O<b?xs(c.text,4,u[O+1].from)-p.length:null);let v=l;for(;v>c.from&&/\s/.test(c.text.charAt(v-c.from-1));)v--;return p=BO(p,e),KI(f.node,e.doc)&&(p=O0(u,e,c)+e.lineBreak+p),h.push({from:v,to:l,insert:e.lineBreak+p}),{range:me.cursor(v+p.length+1),changes:h}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},WA=VA();function v0(t){return t.name=="QuoteMark"||t.name=="ListMark"}function KI(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,r=t.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(n.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function O0(t,e,n){let r="";for(let i=0,s=t.length-2;i<=s;i++)r+=t[i].blank(i<s?xs(n.text,4,t[i+1].from)-r.length:null,i<s);return BO(r,e)}function JI(t,e){let n=t.resolveInner(e,-1),r=e;v0(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(v0(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const YA=({state:t,dispatch:e})=>{let n=wn(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Ic.isActiveAt(t,s.from)){let l=a.lineAt(o),c=FA(JI(n,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:me.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(xs(l.text,4,u.to)-xs(l.text,4,u.from));return d==l.from&&(h=BO(h,t)),{range:me.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<o)return{range:me.cursor(d),changes:{from:d,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},UA=[{key:"Enter",run:WA},{key:"Backspace",run:YA}],GA=NA({matchClosingTags:!1});function cl(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=ZA,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=GA}=t;if(!(i instanceof fh))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],c=[a.support,UI],u;o&&c.push(HA),n instanceof il?(c.push(n.support),u=n.language):n&&(u=n);let f=e||u?HI(e,u):void 0;l.push(g3({codeParser:f,htmlParser:a.language.parser})),r&&c.push(co.high(na.of(UA)));let d=IO(i.configure(l));return s&&c.push(d.data.of({autocomplete:e4})),new il(d,c)}function e4(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=wn(e).resolveInner(n,-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:n-r[0].length,to:n,options:t4(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let _p=null;function t4(){if(_p)return _p;let t=LA(new OO(Pt.create({extensions:GA}),0,!0));return _p=t?t.options:[]}const n4=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,HA=Pe.domEventHandlers({paste:(t,e)=>{var n;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Ic.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||n4.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)}}),r4=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:ZA,deleteMarkupBackward:YA,insertNewlineContinueMarkup:WA,insertNewlineContinueMarkupCommand:VA,markdown:cl,markdownKeymap:UA,markdownLanguage:Ic,pasteURLAsLink:HA},Symbol.toStringTag,{value:"Module"})),b0=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ul{constructor(e,n,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(b0(a)):b0,this.query=this.normalize(n)}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 Is(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 n=a2(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=ko(e);let i=this.normalize(n);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<n.length&&n.charCodeAt(s)==a&&o++}}}match(e,n,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:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(ul.prototype[Symbol.iterator]=function(){return this});const KA={from:-1,to:-1,match:/.*/.exec("")},jO="gm"+(/x/.unicode==null?"":"u");class JA{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=KA,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new eC(e,n,r,i,s);this.re=new RegExp(n,jO+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=dd(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 n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=dd(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,n)))return this.value={from:r,to:i,match:n},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 kp=new WeakMap;class Za{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=kp.get(e);if(!i||i.from>=r||i.to<=n){let a=new Za(n,e.sliceString(n,r));return kp.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),kp.set(e,new Za(o,s)),new Za(n,s.slice(n-o,r-o))}}class eC{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=KA,this.matchPos=dd(e,i),this.re=new RegExp(n,jO+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=Za.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,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=dd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Za.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(JA.prototype[Symbol.iterator]=eC.prototype[Symbol.iterator]=function(){return this});function i4(t){try{return new RegExp(t,jO),!0}catch{return!1}}function dd(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const s4=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:i}=nq(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.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 v=h/100;l&&(v=v*(l=="-"?-1:1)+a.number/e.doc.lines),h=Math.round(e.doc.lines*v)}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=me.cursor(m.from+Math.max(0,Math.min(d,m.length)));t.dispatch({effects:[r,Pe.scrollIntoView(p.from,{y:"center"})],selection:p})}),!0},o4={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},a4=Ne.define({combine(t){return su(t,o4,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function tC(t){return[d4,f4]}const l4=ft.mark({class:"cm-selectionMatch"}),c4=ft.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function y0(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Tn.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Tn.Word)}function u4(t,e,n,r){return t(e.sliceDoc(n,n+1))==Tn.Word&&t(e.sliceDoc(r-1,r))==Tn.Word}const f4=mr.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(a4),{state:n}=t,r=n.selection;if(r.ranges.length>1)return ft.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return ft.none;let l=n.wordAt(i.head);if(!l)return ft.none;o=n.charCategorizer(i.head),s=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return ft.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(y0(o,n,i.from,i.to)&&u4(o,n,i.from,i.to)))return ft.none}else if(s=n.sliceDoc(i.from,i.to),!s)return ft.none}let a=[];for(let l of t.visibleRanges){let c=new ul(n.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||y0(o,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(c4.range(u,f)):(u>=i.to||f<=i.from)&&a.push(l4.range(u,f)),a.length>e.maxMatches))return ft.none}}return ft.set(a)}},{decorations:t=>t.decorations}),d4=Pe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),h4=({state:t,dispatch:e})=>{let{selection:n}=t,r=me.create(n.ranges.map(i=>t.wordAt(i.head)||me.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function p4(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,a=new ul(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new ul(t.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=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const m4=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return h4({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=p4(t,r);return i?(e(t.update({selection:t.selection.addRange(me.range(i.from,i.to),!1),effects:Pe.scrollIntoView(i.to)})),!0):!1},Al=Ne.define({combine(t){return su(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new T4(e),scrollToMatch:e=>Pe.scrollIntoView(e)})}});class nC{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||i4(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,(n,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 w4(this):new O4(this)}getCursor(e,n=0,r){let i=e.doc?e:Pt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Oa(this,i,n,r):va(this,i,n,r)}}class rC{constructor(e){this.spec=e}}function g4(t,e,n){return(r,i,s,o)=>{if(n&&!n(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 t(a,e,r,i)}}function va(t,e,n,r){let i;return t.wholeWord&&(i=v4(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=g4(t.test,e,i)),new ul(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:s=>s.toLowerCase(),i)}function v4(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(hd(i,n-s))!=Tn.Word||e(pd(i,n-s))!=Tn.Word)&&(e(pd(i,r-s))!=Tn.Word||e(hd(i,r-s))!=Tn.Word))}class O4 extends rC{constructor(e){super(e)}nextMatch(e,n,r){let i=va(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);i=va(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=va(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=va(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=va(this.spec,e,Math.max(0,n-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 b4(t,e,n){return(r,i,s)=>(!n||n(r,i,s))&&t(s[0],e,r,i)}function Oa(t,e,n,r){let i;return t.wholeWord&&(i=y4(e.charCategorizer(e.selection.main.head))),t.test&&(i=b4(t.test,e,i)),new JA(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},n,r)}function hd(t,e){return t.slice(Xn(t,e,!1),e)}function pd(t,e){return t.slice(e,Xn(t,e))}function y4(t){return(e,n,r)=>!r[0].length||(t(hd(r.input,r.index))!=Tn.Word||t(pd(r.input,r.index))!=Tn.Word)&&(t(pd(r.input,r.index+r[0].length))!=Tn.Word||t(hd(r.input,r.index+r[0].length))!=Tn.Word)}class w4 extends rC{nextMatch(e,n,r){let i=Oa(this.spec,e,r,e.doc.length).next();return i.done&&(i=Oa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Oa(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,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 n})}matchAll(e,n){let r=Oa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Oa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Bc=Qt.define(),zO=Qt.define(),Hs=di.define({create(t){return new xp(vg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Bc)?t=new xp(n.value.create(),t.panel):n.is(zO)&&(t=new xp(t.query,n.value?ZO:null));return t},provide:t=>Kf.from(t,e=>e.panel)});class xp{constructor(e,n){this.query=e,this.panel=n}}const _4=ft.mark({class:"cm-searchMatch"}),k4=ft.mark({class:"cm-searchMatch cm-searchMatch-selected"}),x4=mr.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Hs))}update(t){let e=t.state.field(Hs);(e!=t.startState.field(Hs)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ft.none;let{view:n}=this,r=new Vo;for(let i=0,s=n.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;t.highlight(n.state,a,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?k4:_4)})}return r.finish()}},{decorations:t=>t.decorations});function pu(t){return e=>{let n=e.state.field(Hs,!1);return n&&n.query.spec.valid?t(e,n):oC(e)}}const md=pu((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=me.single(r.from,r.to),s=t.state.facet(Al);return t.dispatch({selection:i,effects:[FO(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),sC(t),!0}),gd=pu((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=me.single(i.from,i.to),o=t.state.facet(Al);return t.dispatch({selection:s,effects:[FO(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),sC(t),!0}),S4=pu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:me.create(n.map(r=>me.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),A4=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let a=new ul(t.doc,t.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(me.range(a.value.from,a.value.to))}return e(t.update({selection:me.create(s,o),userEvent:"select.search.matches"})),!0},w0=pu((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==r&&o.to==i&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(Pe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=t.state.changes(a);return o&&(l=me.single(o.from,o.to).map(f),u.push(FO(t,o)),u.push(n.facet(Al).scrollToMatch(l.main,t))),t.dispatch({changes:f,selection:l,effects:u,userEvent:"input.replace"}),!0}),C4=pu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Pe.announce.of(r),userEvent:"input.replace.all"}),!0});function ZO(t){return t.state.facet(Al).createPanel(t)}function vg(t,e){var n,r,i,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(Al);return new nC({search:((n=e?.literal)!==null&&n!==void 0?n: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 iC(t){let e=gx(t,ZO);return e&&e.dom.querySelector("[main-field]")}function sC(t){let e=iC(t);e&&e==t.root.activeElement&&e.select()}const oC=t=>{let e=t.state.field(Hs,!1);if(e&&e.panel){let n=iC(t);if(n&&n!=t.root.activeElement){let r=vg(t.state,e.query.spec);r.valid&&t.dispatch({effects:Bc.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[zO.of(!0),e?Bc.of(vg(t.state,e.query.spec)):Qt.appendConfig.of(E4)]});return!0},aC=t=>{let e=t.state.field(Hs,!1);if(!e||!e.panel)return!1;let n=gx(t,ZO);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:zO.of(!1)}),!0},lC=[{key:"Mod-f",run:oC,scope:"editor search-panel"},{key:"F3",run:md,shift:gd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:md,shift:gd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:aC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:A4},{key:"Mod-Alt-g",run:s4},{key:"Mod-d",run:m4,preventDefault:!0}];class T4{constructor(e){this.view=e;let n=this.query=e.state.field(Hs).query.spec;this.commit=this.commit.bind(this),this.searchField=zn("input",{value:n.search,placeholder:Dr(e,"Find"),"aria-label":Dr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zn("input",{value:n.replace,placeholder:Dr(e,"Replace"),"aria-label":Dr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zn("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=zn("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=zn("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return zn("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=zn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>md(e),[Dr(e,"next")]),r("prev",()=>gd(e),[Dr(e,"previous")]),r("select",()=>S4(e),[Dr(e,"all")]),zn("label",null,[this.caseField,Dr(e,"match case")]),zn("label",null,[this.reField,Dr(e,"regexp")]),zn("label",null,[this.wordField,Dr(e,"by word")]),...e.state.readOnly?[]:[zn("br"),this.replaceField,r("replace",()=>w0(e),[Dr(e,"replace")]),r("replaceAll",()=>C4(e),[Dr(e,"replace all")])],zn("button",{name:"close",onclick:()=>aC(e),"aria-label":Dr(e,"close"),type:"button"},["×"])])}commit(){let e=new nC({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:Bc.of(e)}))}keydown(e){VM(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?gd:md)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),w0(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Bc)&&!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(Al).top}}function Dr(t,e){return t.state.phrase(e)}const Vu=30,Wu=/[\s\.,:;?!]/;function FO(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-Vu),o=Math.min(i,n+Vu),a=t.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<Vu;l++)if(!Wu.test(a[l+1])&&Wu.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-Vu;l--)if(!Wu.test(a[l-1])&&Wu.test(a[l])){a=a.slice(0,l);break}}return Pe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const P4=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"}}),E4=[Hs,co.low(x4),P4];function $4(t){return t.replace(/\$\{\d+\|([^,}]+)[^}]*\}/g,"$1").replace(/\$\{\d+:([^}]*)}/g,"$1").replace(/\$\d+/g,"")}function Q4(t){if(t.snippet&&t.snippet.length>0)return t.snippet.map($4).join(`
174
+ `);const e=[];for(const[r,i]of Object.entries(t.attributes))if(i.required){const s=i.values?.[0]??"";e.push(`${r}="${s}"`)}const n=e.length>0?" "+e.join(" "):"";return t.selfClosing?`{% ${t.name}${n} /%}`:`{% ${t.name}${n} %}
175
+
176
+ {% /${t.name} %}`}function Og(t){return e=>{const n=e.matchBefore(/\/\w*/);if(!n||n.from>0&&e.state.doc.sliceString(n.from-1,n.from).trim()!=="")return null;const r=t();if(r.length===0)return null;const i=n.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=Q4(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 L4(t,e){const n=t.slice(Math.max(0,e-500),e),r=n.lastIndexOf("%}"),i=n.lastIndexOf("{%");if(i===-1||r!==-1&&r>i)return null;const s=n.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=n.lastIndexOf('="');return{tagName:a,attrName:c[1],valueStart:Math.max(0,e-500)+u+2}}return{tagName:a}}function M4(t,e,n){const r=n.design;if(!r?.contexts)return[];const i=Object.keys(r.contexts);return t==="sandbox"&&e==="context"||t==="design-context"&&e==="scope"?i:[]}function bg(t,e){return n=>{const r=n.state.doc.toString(),i=n.pos,s=L4(r,i);if(!s)return null;const o=t(),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?M4(s.tagName,s.attrName,e()):[];return m.length?{from:s.valueStart,options:m.map(p=>({label:p,type:"variable"})),filter:!0}:null}const c=n.matchBefore(/\w*/);if(!c||!n.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 q4=ft.mark({class:"cm-markdoc-tag"}),_0=ft.mark({class:"cm-markdoc-bracket"}),R4=ft.mark({class:"cm-markdoc-name"}),k0=/\{%\s*(\/?)(\w[\w-]*)((?:\s+[^%]*)?)(\/?)\s*%\}/g;function x0(t){const e=[];for(const{from:r,to:i}of t.visibleRanges){const s=t.state.doc.sliceString(r,i);k0.lastIndex=0;let o;for(;(o=k0.exec(s))!==null;){const a=r+o.index,l=a+o[0].length;e.push({from:a,to:l,deco:q4}),e.push({from:a,to:a+2,deco:_0}),e.push({from:l-2,to:l,deco:_0});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:R4})}}e.sort((r,i)=>r.from-i.from||r.to-i.to);const n=new Vo;for(const r of e)n.add(r.from,r.to,r.deco);return n.finish()}const D4=mr.fromClass(class{decorations;constructor(t){this.decorations=x0(t)}update(t){(t.docChanged||t.viewportChanged)&&(this.decorations=x0(t.view))}},{decorations:t=>t.decorations});function jc(){return D4}const N4=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}),cC=kl.define([{tag:I.heading1,color:"#0369a1",fontWeight:"bold",fontSize:"1.4em"},{tag:I.heading2,color:"#0369a1",fontWeight:"bold",fontSize:"1.2em"},{tag:I.heading3,color:"#0369a1",fontWeight:"bold",fontSize:"1.1em"},{tag:I.heading,color:"#0369a1",fontWeight:"bold"},{tag:I.emphasis,color:"#9333ea",fontStyle:"italic"},{tag:I.strong,color:"#9333ea",fontWeight:"bold"},{tag:I.link,color:"#0ea5e9",textDecoration:"underline"},{tag:I.url,color:"#0ea5e9"},{tag:I.quote,color:"#64748b"},{tag:I.monospace,color:"#16a34a"},{tag:I.processingInstruction,color:"#d97706"},{tag:I.meta,color:"#94a3b8"},{tag:I.comment,color:"#94a3b8"},{tag:I.punctuation,color:"#94a3b8"}]);var I4=W('<div class="md-editor__empty svelte-12tkyig"><span class="md-editor__empty-text svelte-12tkyig">Select a file to edit</span></div>'),B4=W("<div></div> <!>",1);function uC(t,e){dt(e,!0);let n,r;hn(()=>{if(!n)return;const c=Pt.create({doc:Er(()=>X.bodyContent),extensions:[dq(),mq(),UM(),pO(),cl(),N4,Ec(cC),tC(),na.of([...vO,...mO,...lC,{key:"Mod-/",run:u=>(dc(u),!0)}]),Pe.updateListener.of(u=>{u.docChanged&&X.updateBody(u.state.doc.toString())}),Pe.lineWrapping,jc(),ag({override:[Og(()=>X.runes),bg(()=>X.runes,()=>X.aggregated)],icons:!1})]});return r=new Pe({state:c,parent:n}),()=>{r?.destroy()}}),hn(()=>{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=B4(),s=tt(i);let o;ln(s,c=>n=c,()=>n);var a=D(s,2);{var l=c=>{var u=I4();z(c,u)};le(a,c=>{X.currentPath||c(l)})}ce(()=>o=je(s,1,"md-editor svelte-12tkyig",null,o,{hidden:!X.currentPath})),z(t,i),ht()}function j4(t){let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n)>>>0;return e.toString(36)}function as(t,e){const n=j4(t),r=e.get(n)??0;return e.set(n,r+1),r===0?`blk_${n}`:`blk_${n}_${r}`}const zc=/^\{%\s+(\w[\w-]*)((?:\s+\w[\w-]*(?:="[^"]*"|=[\w.-]+)?)*)\s*(\/?)\s*%\}/;function fC(t){return new RegExp(`^\\{%\\s+/${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}`)}function vd(t){const e={},n=/(\w[\w-]*)(?:="([^"]*)"|=([\w.-]+))?/g;let r;for(;(r=n.exec(t))!==null;)e[r[1]]=r[2]??r[3]??"true";return e}function z4(t){return t!==""&&!isNaN(Number(t))}function Af(t){const e=[];for(const[n,r]of Object.entries(t))r==="true"?e.push(n):r==="false"||z4(r)?e.push(`${n}=${r}`):e.push(`${n}="${r}"`);return e.length>0?" "+e.join(" "):""}function dC(t){const e=t.split(`
177
+ `),n=[],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 v=e.slice(m,i).join(`
178
+ `);n.push({id:as(v,r),type:"fence",source:v,startLine:m,endLine:i,language:h,code:p.join(`
179
+ `)});continue}const a=zc.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
+ `);n.push({id:as(m,r),type:"rune",source:m,startLine:h,endLine:i,runeName:u,selfClosing:!0,attributes:vd(f),innerContent:""})}else{i++;const m=fC(u),p=[];let v=1;for(;i<e.length;){const b=e[i].trimStart(),w=zc.exec(b);if(w&&w[1]===u&&w[3]!=="/"&&v++,m.test(b)&&(v--,v===0))break;p.push(e[i]),i++}i<e.length&&i++;const O=e.slice(h,i).join(`
181
+ `);n.push({id:as(O,r),type:"rune",source:O,startLine:h,endLine:i,runeName:u,selfClosing:!1,attributes:vd(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
+ `);n.push({id:as(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
+ `);n.push({id:as(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
+ `);n.push({id:as(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()!==""&&!Od(e[i]));)i++;const f=e.slice(u,i).join(`
186
+ `);n.push({id:as(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
+ `);n.push({id:as(d,r),type:"list",source:d,startLine:f,endLine:i,ordered:u});continue}{const u=i;for(;i<e.length&&e[i].trim()!==""&&!Od(e[i]);)i++;const f=e.slice(u,i).join(`
188
+ `);n.push({id:as(f,r),type:"paragraph",source:f,startLine:u,endLine:i})}}return n}function Od(t){const e=t.trimStart();return!!(e.startsWith("#")||e.startsWith("```")||e.startsWith("~~~")||zc.test(e)||/^(---+|___+|\*\*\*+)\s*$/.test(e)||e.startsWith(">")||/^(\d+\.|[-*+])\s/.test(e)||/^!\[.*\]\(.*\)\s*$/.test(e))}function XO(t){if(!t.trim())return[];const e=t.split(`
189
+ `),n=[];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++,n.push({type:"fence",label:f?`Code (${f})`:"Code",source:e.slice(d,r).join(`
191
+ `),fenceLanguage:f,fenceCode:m});continue}const o=zc.exec(s);if(o){const l=o[1],c=o[2]??"",u=o[3]==="/",f=r;if(u)r++,n.push({type:"rune",label:l,source:e.slice(f,r).join(`
192
+ `),runeName:l,selfClosing:!0,attributes:vd(c),innerContent:"",children:[]});else{r++;const d=fC(l),h=[];let m=1;for(;r<e.length;){const v=e[r].trimStart(),O=zc.exec(v);if(O&&O[1]===l&&O[3]!=="/"&&m++,d.test(v)&&(m--,m===0))break;h.push(e[r]),r++}r<e.length&&r++;const p=h.join(`
193
+ `);n.push({type:"rune",label:l,source:e.slice(f,r).join(`
194
+ `),runeName:l,selfClosing:!1,attributes:vd(c),innerContent:p,children:XO(p)})}continue}const a=s.match(/^(#{1,6})\s+(.*)/);if(a){const l=a[1].length,c=a[2];r++,n.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++,n.push({type:"hr",label:"Divider",source:e.slice(r-1,r).join(`
196
+ `)});continue}if(/^!\[.*\]\(.*\)\s*$/.test(s)){r++,n.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()!==""&&!Od(e[r]));)r++;const c=e.slice(l,r).join(`
198
+ `);n.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}n.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()!==""&&!Od(e[r]);)r++;const c=e.slice(l,r).join(`
200
+ `),u=c.length>40?c.slice(0,40)+"…":c;n.push({type:"paragraph",label:u,source:c})}}return n}function Yu(t,e,n){const r=t.indexOf(e);return r===-1?t:t.slice(0,r)+n+t.slice(r+e.length)}function hC(t){switch(t.includes("|")?t.split("|")[0]:t){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 Z4(t,e,n,r){const{field:i,fields:s}=fo(e,n,r);if(!i||i.filled)return t;const o=i.template||hC(i.match);return e.type==="delimited"&&r?H4(t,e,r,n,s,o):e.type==="sequence"?pC(t,e.fields,n,o):t}function F4(t,e,n,r){const{field:i}=fo(e,n,r);if(!i||!i.filled||i.nodes.length===0)return t;let s=t;for(let o=i.nodes.length-1;o>=0;o--){const a=i.nodes[o].source;s=VO(s,a)}return s=s.replace(/\n{3,}/g,`
203
+
204
+ `),s}function X4(t,e,n,r){const{field:i}=fo(e,n,r);if(!i||!i.filled||i.nodes.length===0)return t;const s=i.template||"- New item",o=i.nodes[i.nodes.length-1],a=t.indexOf(o.source);if(a===-1)return t;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 t.slice(0,c)+`
205
+ `+l+t.slice(c)}function V4(t,e,n,r,i){const{field:s}=fo(e,n,i);if(!s||!s.filled||s.nodes.length===0)return t;const o=s.nodes[0],a=dh(o.source);if(r<0||r>=a.length)return t;if(a.length===1)return VO(t,o.source);const c=a.filter((f,d)=>d!==r).join(`
206
+
207
+ `),u=t.indexOf(o.source);return u===-1?t:t.slice(0,u)+c+t.slice(u+o.source.length)}function W4(t,e,n,r,i,s){if(r===i)return t;const{field:o}=fo(e,n,s);if(!o||!o.filled||o.nodes.length===0)return t;const a=o.nodes[0],l=dh(a.source);if(r<0||r>=l.length||i<0||i>=l.length)return t;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=t.indexOf(a.source);return h===-1?t:t.slice(0,h)+d+t.slice(h+a.source.length)}function Y4(t,e,n,r){const{field:i}=fo(e,n,r);if(!i||!i.filled||i.nodes.length===0)return t;const s=i.template||hC(i.match),o=i.nodes[i.nodes.length-1],a=t.indexOf(o.source);if(a===-1)return t;const l=a+o.source.length;return t.slice(0,l)+`
209
+
210
+ `+s+t.slice(l)}function U4(t,e,n,r,i){const{field:s}=fo(e,n,i);if(!s||!s.filled||s.nodes.length===0||r<0||r>=s.nodes.length)return t;const o=s.nodes[r].source;let a=VO(t,o);return a=a.replace(/\n{3,}/g,`
211
+
212
+ `),a}function G4(t,e,n,r,i,s){if(r===i)return t;const{field:o}=fo(e,n,s);if(!o||!o.filled||o.nodes.length===0||r<0||r>=o.nodes.length||i<0||i>=o.nodes.length)return t;const l=[...o.nodes.map(v=>v.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=t.indexOf(u),h=t.indexOf(f);if(d===-1||h===-1)return t;const m=h+f.length,p=l.join(`
213
+
214
+ `);return t.slice(0,d)+p+t.slice(m)}function dh(t){const e=t.split(`
215
+ `),n=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(n.push(r.join(`
216
+ `)),r=[i]):r.push(i);return r.length>0&&n.push(r.join(`
217
+ `)),n}function fo(t,e,n){if(t.type==="sequence")return{field:t.fields.find(i=>i.name===e)??null,fields:t.fields};if(t.type==="delimited"&&n){const r=t.zones.find(s=>s.name===n);return r?{field:r.fields.find(s=>s.name===e)??null,fields:r.fields}:{field:null,fields:null}}return{field:null,fields:null}}function VO(t,e){const n=t.indexOf(e);if(n===-1)return t;let r=n,i=n+e.length;for(;r>0&&t[r-1]===`
218
+ `;)r--;for(r>0&&r++;i<t.length&&t[i]===`
219
+ `;)i++;return t.slice(0,r)+t.slice(i)}function pC(t,e,n,r){const i=e.findIndex(a=>a.name===n);if(i===-1)return t;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=t.indexOf(s.source);if(a!==-1){const l=a+s.source.length;return t.slice(0,l)+`
220
+
221
+ `+r+t.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=t.indexOf(l.source);if(c!==-1)return t.slice(0,c)+r+`
222
+
223
+ `+t.slice(c)}const o=t.trimEnd();return o+(o?`
224
+
225
+ `:"")+r}function H4(t,e,n,r,i,s){const o=e.zones.findIndex(p=>p.name===n);if(o===-1)return t;const a=t.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=t.trimEnd(),v=o-l.length;let O="";for(let b=0;b<v;b++)O+=`
227
+
228
+ ---`;return p+O+`
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=pC(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 yg(t){return t.map(e=>e.source).join(`
235
+
236
+ `)}function ir(t){const e=Af(t.attributes);if(t.selfClosing)return`{% ${t.runeName}${e} /%}`;const n=t.innerContent.trim();return n?`{% ${t.runeName}${e} %}
237
+ ${n}
238
+ {% /${t.runeName} %}`:`{% ${t.runeName}${e} %}
239
+
240
+ {% /${t.runeName} %}`}function wg(t){return"#".repeat(t.level)+" "+t.text}function bd(t){return"```"+t.language+`
241
+ `+t.code+"\n```"}function K4(t){const e=new Map;for(const n of t){e.set(n.name,n);for(const r of n.aliases)e.set(r,n)}return e}function J4(t,e){const n=t.split(`
242
+ `),r=new RegExp(`^\\{%\\s+${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b.*%\\}\\s*$`),i=new RegExp(`^\\{%\\s+/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}\\s*$`);let s=0,o=n.length;return r.test(n[0].trim())&&(s=1),o>s&&i.test(n[o-1].trim())&&(o-=1),n.slice(s,o).join(`
243
+ `).trim()}function WO(t){switch(t.type){case"prose":return"Prose";case"heading":return`H${t.level}`;case"rune":return t.runeName;case"fence":{const e=t.language;return e?`Code (${e})`:"Code"}case"list":return t.ordered?"Ordered List":"List";case"quote":return"Blockquote";case"hr":return"Divider";case"image":return"Image";case"paragraph":return"Paragraph";default:return t.type}}function S0(t){const e=[];let n=[];function r(){if(n.length===0)return;const i=n.map(s=>s.source).join(`
244
+
245
+ `);e.push({id:`prose_${n[0].id}`,type:"prose",children:[...n],source:i,startLine:n[0].startLine,endLine:n[n.length-1].endLine}),n=[]}for(const i of t)i.type==="rune"?(r(),e.push(i)):n.push(i);return r(),e}var eB=Object.create,hh=Object.defineProperty,tB=Object.getOwnPropertyDescriptor,nB=Object.getOwnPropertyNames,rB=Object.getPrototypeOf,iB=Object.prototype.hasOwnProperty,mC=t=>hh(t,"__esModule",{value:!0}),Me=(t,e)=>function(){return e||(0,t[Object.keys(t)[0]])((e={exports:{}}).exports,e),e.exports},gC=(t,e)=>{mC(t);for(var n in e)hh(t,n,{get:e[n],enumerable:!0})},sB=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nB(e))!iB.call(t,r)&&r!=="default"&&hh(t,r,{get:()=>e[r],enumerable:!(n=tB(e,r))||n.enumerable});return t},ph=t=>sB(mC(hh(t!=null?eB(rB(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),vC=Me({"src/grammar/tag.js"(t,e){function n(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)}n(r,Error),r.buildMessage=function(s,o,a){var l={literal:function(p){return'"'+u(p.text)+'"'},class:function(p){var v=p.parts.map(function(O){return Array.isArray(O)?f(O[0])+"-"+f(O[1]):f(O)});return"["+(p.inverted?"^":"")+v+"]"},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(v){return"\\x0"+c(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+c(v)})}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(v){return"\\x0"+c(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+c(v)})}function d(p){return l[p.type](p)}function h(p){var v=p.map(d),O,b;if(v.sort(),v.length>0){for(O=1,b=1;O<v.length;O++)v[O-1]!==v[O]&&(v[b]=v[O],b++);v.length=b}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.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=")",v=",",O="[",b="]",w="null",S="true",_="false",x="{",C="}",A=":",y='"',k="\\",P="n",T="r",E="t",Q=/^[$@]/,$=/^[0-9]/,L=/^[^\0-\x1F"\\]/,N=/^[a-zA-Z0-9_\-]/,Z=/^[ \n\t]/,Y=Mn("/",!1),ne=qn("tag name"),ae=qn("class"),ie=qn("id"),K=Mn("=",!1),he=Mn("(",!1),fe=Mn(")",!1),j=Mn(",",!1),U=qn("variable"),ue=qn("null"),ke=qn("boolean"),Ce=Mn("[",!1),ve=Mn("]",!1),Ee=Mn("{",!1),rt=Mn("}",!1),Ke=Mn(":",!1),Ye=qn("number"),Ve=qn("string"),ze=qn("identifier"),Bt=qn("whitespace"),In=function(M){return{type:"variable",meta:{variable:M}}},tr=function(M){return{type:"annotation",meta:{attributes:M}}},bt=function(M,V){return V},Wt=function(M,V,G,oe){V&&(G=G||[],G.unshift({type:"attribute",name:"primary",value:V}));const[be,Ie]=oe?["tag",0]:["tag_open",1];return{type:be,nesting:Ie,meta:{tag:M,attributes:G}}},mn=function(M){return{type:"tag_close",nesting:-1,meta:{tag:M}}},Wn=function(M,V){return M?[M,...V]:[]},xe=function(M){return M},Yn=function(M){return M},Lt=function(M){return M},Jt=function(M){return M},_n=function(M){return{type:"class",name:M,value:!0}},se=function(M){return{type:"attribute",name:"id",value:M}},Oe=function(M,V){return{type:"attribute",name:M,value:V}},_e=function(M,V,G){return V?[V,...G]:[]},Ae=function(M,V){let G={};for(let[oe,{name:be,value:Ie}]of V.entries())G[be||oe]=Ie;return new tE(M,G)},Qe=function(M){return M},yt=function(M,V){return{name:M,value:V}},ct=function(M){return M},Ue=function(M,V,G){return M==="@"?[V,...G]:new eE([V,...G])},wt=function(){return null},pt=function(){return!0},at=function(){return!1},_t=function(M,V){return[M,...V]},xn=function(M){return M||[]},jt=function(M,V){return Object.assign(M,...V)},en=function(M){return M||{}},gt=function(M,V){return M==="$$mdtype"?{}:{[M]:V}},Ut=function(){return parseFloat(qi())},Bn=function(M){return M.join("")},nr=function(){return`
246
+ `},gr=function(){return"\r"},cn=function(){return" "},Mt=function(M){return M},F=0,Ze=0,un=[{line:1,column:1}],Sn=[],We=0,vr;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 qi(){return s.substring(Ze,F)}function Mn(M,V){return{type:"literal",text:M,ignoreCase:V}}function ns(){return{type:"end"}}function qn(M){return{type:"other",description:M}}function $s(M){var V=un[M],G;if(V)return V;for(G=M-1;!un[G];)G--;for(V=un[G],V={line:V.line,column:V.column};G<M;)s.charCodeAt(G)===10?(V.line++,V.column=1):V.column++,G++;return un[M]=V,V}var rs=typeof o.filename=="string"&&o.filename.length>0;function Or(M,V){var G={};rs&&(G.filename=o.filename);var oe=$s(M);G.start={offset:M,line:oe.line,column:oe.column};var be=$s(V);return G.end={offset:V,line:be.line,column:be.column},G}function H(){Sn.push({pos:F,variants:[]})}function te(M){var V=Sn[Sn.length-1];F<V.pos||(F>V.pos&&(V.pos=F,V.variants=[]),V.variants.push(M))}function de(M,V,G){return new r(r.buildMessage(M,V,G),M,V,G)}function ye(){var M=Sn[0],V=M.pos;return de(M.variants,V<s.length?s.charAt(V):null,V<s.length?Or(V,V+1):Or(V,V))}function $e(){var M;return M=Je(),M===a&&(M=Ge(),M===a&&(M=He(),M===a&&(M=it()))),M}function Je(){var M,V;return M=F,V=Tb(),V===a&&(V=Mr()),V!==a&&(Ze=M,V=In(V)),M=V,M}function Ge(){var M,V,G,oe;if(M=F,V=lt(),V!==a){for(G=[],oe=kt();oe!==a;)G.push(oe),oe=kt();Ze=M,M=tr(V)}else F=M,M=a;return M}function He(){var M,V,G,oe,be,Ie,vt,br=function(Qs){We===0&&te(Qs)};if(M=F,V=qt(),V!==a){for(G=[],oe=kt();oe!==a;)G.push(oe),oe=kt();for(oe=F,be=oa(),be!==a?(Ie=kt(),Ie===a&&(Ie=null),Ze=oe,oe=bt(V,be)):(F=oe,oe=a),oe===a&&(oe=null),be=lt(),be===a&&(be=null),Ie=[],vt=kt();vt!==a;)Ie.push(vt),vt=kt();br(Y),s.charCodeAt(F)===47?(vt=u,F++):vt=a,vt===a&&(vt=null),Ze=M,M=Wt(V,oe,be,vt)}else F=M,M=a;return M}function it(){var M,V,G,oe=function(be){We===0&&te(be)};return M=F,oe(Y),s.charCodeAt(F)===47?(V=u,F++):V=a,V!==a?(G=qt(),G!==a?(Ze=M,M=mn(G)):(F=M,M=a)):(F=M,M=a),M}function qt(){var M,V=function(G){We===0&&te(G)};return V(ne),We++,M=is(),We--,M}function lt(){var M,V,G,oe;if(M=F,V=fn(),V!==a){for(G=[],oe=Pn();oe!==a;)G.push(oe),oe=Pn();Ze=M,M=Wn(V,G)}else F=M,M=a;return M}function Pn(){var M,V,G;if(M=F,V=[],G=kt(),G!==a)for(;G!==a;)V.push(G),G=kt();else V=a;return V!==a?(G=fn(),G!==a?(Ze=M,M=xe(G)):(F=M,M=a)):(F=M,M=a),M}function fn(){var M,V;return M=F,V=jn(),V!==a&&(Ze=M,V=Yn(V)),M=V,M===a&&(M=F,V=ut(),V!==a&&(Ze=M,V=Lt(V)),M=V,M===a&&(M=F,V=Ur(),V!==a&&(Ze=M,V=Jt(V)),M=V)),M}function ut(){var M,V,G,oe=function(be){We===0&&te(be)};return oe(ae),We++,M=F,s.charCodeAt(F)===46?(V=f,F++):V=a,V!==a?(G=is(),G!==a?(Ze=M,M=_n(G)):(F=M,M=a)):(F=M,M=a),We--,M}function jn(){var M,V,G,oe=function(be){We===0&&te(be)};return oe(ie),We++,M=F,s.charCodeAt(F)===35?(V=d,F++):V=a,V!==a?(G=is(),G!==a?(Ze=M,M=se(G)):(F=M,M=a)):(F=M,M=a),We--,M}function Ur(){var M,V,G,oe,be=function(Ie){We===0&&te(Ie)};return M=F,V=is(),V!==a?(be(K),s.charCodeAt(F)===61?(G=h,F++):G=a,G!==a?(oe=oa(),oe!==a?(Ze=M,M=Oe(V,oe)):(F=M,M=a)):(F=M,M=a)):(F=M,M=a),M}function Mr(){var M,V,G,oe,be,Ie,vt,br,Qs=function(nE){We===0&&te(nE)};if(M=F,V=is(),V!==a)if(Qs(he),s.charCodeAt(F)===40?(G=m,F++):G=a,G!==a){for(oe=[],be=kt();be!==a;)oe.push(be),be=kt();for(be=F,Ie=ia(),Ie===a&&(Ie=null),vt=[],br=sa();br!==a;)vt.push(br),br=sa();Ze=be,be=_e(V,Ie,vt),Qs(fe),s.charCodeAt(F)===41?(Ie=p,F++):Ie=a,Ie!==a?(Ze=M,M=Ae(V,be)):(F=M,M=a)}else F=M,M=a;else F=M,M=a;return M}function ia(){var M,V,G,oe,be=function(Ie){We===0&&te(Ie)};return M=F,V=F,G=is(),G!==a?(be(K),s.charCodeAt(F)===61?(oe=h,F++):oe=a,oe!==a?(Ze=V,V=Qe(G)):(F=V,V=a)):(F=V,V=a),V===a&&(V=null),G=oa(),G!==a?(Ze=M,M=yt(V,G)):(F=M,M=a),M}function sa(){var M,V,G,oe,be,Ie=function(vt){We===0&&te(vt)};for(M=F,V=[],G=kt();G!==a;)V.push(G),G=kt();if(Ie(j),s.charCodeAt(F)===44?(G=v,F++):G=a,G!==a){for(oe=[],be=kt();be!==a;)oe.push(be),be=kt();be=ia(),be!==a?(Ze=M,M=ct(be)):(F=M,M=a)}else F=M,M=a;return M}function on(){var M,V,G,oe=function(be){We===0&&te(be)};for(M=F,V=[],G=kt();G!==a;)V.push(G),G=kt();return oe(j),s.charCodeAt(F)===44?(G=v,F++):G=a,G!==a?(V=[V,G],M=V):(F=M,M=a),M===a&&(M=null),M}function Tb(){var M,V,G,oe,be,Ie=function(vt){We===0&&te(vt)};if(Ie(U),We++,M=F,Q.test(s.charAt(F))?(V=s.charAt(F),F++):V=a,V!==a)if(G=is(),G!==a){for(oe=[],be=Pb();be!==a;)oe.push(be),be=Pb();Ze=M,M=Ue(V,G,oe)}else F=M,M=a;else F=M,M=a;return We--,M}function Pb(){var M,V,G,oe;return M=F,s.charCodeAt(F)===46?(V=f,F++):V=a,V!==a?(G=is(),G!==a?(Ze=M,M=Qe(G)):(F=M,M=a)):(F=M,M=a),M===a&&(M=F,s.charCodeAt(F)===91?(V=O,F++):V=a,V!==a?(G=Lb(),G===a&&(G=Ch()),G!==a?(s.charCodeAt(F)===93?(oe=b,F++):oe=a,oe!==a?(Ze=M,M=ct(G)):(F=M,M=a)):(F=M,M=a)):(F=M,M=a)),M}function oa(){var M;return M=UP(),M===a&&(M=GP(),M===a&&(M=Ch(),M===a&&(M=Lb(),M===a&&(M=HP(),M===a&&(M=KP(),M===a&&(M=Mr(),M===a&&(M=Tb()))))))),M}function UP(){var M,V,G=function(oe){We===0&&te(oe)};return G(ue),We++,M=F,s.substr(F,4)===w?(V=w,F+=4):V=a,V!==a&&(Ze=M,V=wt()),M=V,We--,M}function GP(){var M,V,G=function(oe){We===0&&te(oe)};return G(ke),We++,M=F,s.substr(F,4)===S?(V=S,F+=4):V=a,V!==a&&(Ze=M,V=pt()),M=V,M===a&&(M=F,s.substr(F,5)===_?(V=_,F+=5):V=a,V!==a&&(Ze=M,V=at()),M=V),We--,M}function HP(){var M,V,G,oe,be,Ie,vt,br=function(Qs){We===0&&te(Qs)};if(M=F,br(Ce),s.charCodeAt(F)===91?(V=O,F++):V=a,V!==a){for(G=[],oe=kt();oe!==a;)G.push(oe),oe=kt();if(oe=F,be=oa(),be!==a){for(Ie=[],vt=Eb();vt!==a;)Ie.push(vt),vt=Eb();vt=on(),Ze=oe,oe=_t(be,Ie)}else F=oe,oe=a;for(oe===a&&(oe=null),be=[],Ie=kt();Ie!==a;)be.push(Ie),Ie=kt();br(ve),s.charCodeAt(F)===93?(Ie=b,F++):Ie=a,Ie!==a?(Ze=M,M=xn(oe)):(F=M,M=a)}else F=M,M=a;return M}function Eb(){var M,V,G,oe,be,Ie=function(vt){We===0&&te(vt)};for(M=F,V=[],G=kt();G!==a;)V.push(G),G=kt();if(Ie(j),s.charCodeAt(F)===44?(G=v,F++):G=a,G!==a){for(oe=[],be=kt();be!==a;)oe.push(be),be=kt();be=oa(),be!==a?(Ze=M,M=ct(be)):(F=M,M=a)}else F=M,M=a;return M}function KP(){var M,V,G,oe,be,Ie,vt,br=function(Qs){We===0&&te(Qs)};if(M=F,br(Ee),s.charCodeAt(F)===123?(V=x,F++):V=a,V!==a){for(G=[],oe=kt();oe!==a;)G.push(oe),oe=kt();if(oe=F,be=Qb(),be!==a){for(Ie=[],vt=$b();vt!==a;)Ie.push(vt),vt=$b();vt=on(),Ze=oe,oe=jt(be,Ie)}else F=oe,oe=a;for(oe===a&&(oe=null),be=[],Ie=kt();Ie!==a;)be.push(Ie),Ie=kt();br(rt),s.charCodeAt(F)===125?(Ie=C,F++):Ie=a,Ie!==a?(Ze=M,M=en(oe)):(F=M,M=a)}else F=M,M=a;return M}function $b(){var M,V,G,oe,be,Ie=function(vt){We===0&&te(vt)};for(M=F,V=[],G=kt();G!==a;)V.push(G),G=kt();if(Ie(j),s.charCodeAt(F)===44?(G=v,F++):G=a,G!==a){for(oe=[],be=kt();be!==a;)oe.push(be),be=kt();be=Qb(),be!==a?(Ze=M,M=xe(be)):(F=M,M=a)}else F=M,M=a;return M}function Qb(){var M,V,G,oe,be,Ie=function(vt){We===0&&te(vt)};if(M=F,V=is(),V===a&&(V=Ch()),V!==a)if(Ie(Ke),s.charCodeAt(F)===58?(G=A,F++):G=a,G!==a){for(oe=[],be=kt();be!==a;)oe.push(be),be=kt();be=oa(),be!==a?(Ze=M,M=gt(V,be)):(F=M,M=a)}else F=M,M=a;else F=M,M=a;return M}function Lb(){var M,V,G,oe,be,Ie,vt=function(br){We===0&&te(br)};if(vt(Ye),We++,M=F,s.charCodeAt(F)===45&&F++,V=[],$.test(s.charAt(F))?(G=s.charAt(F),F++):G=a,G!==a)for(;G!==a;)V.push(G),$.test(s.charAt(F))?(G=s.charAt(F),F++):G=a;else V=a;if(V!==a){if(G=F,s.charCodeAt(F)===46?(oe=f,F++):oe=a,oe!==a){if(be=[],$.test(s.charAt(F))?(Ie=s.charAt(F),F++):Ie=a,Ie!==a)for(;Ie!==a;)be.push(Ie),$.test(s.charAt(F))?(Ie=s.charAt(F),F++):Ie=a;else be=a;be!==a?(oe=[oe,be],G=oe):(F=G,G=a)}else F=G,G=a;G===a&&(G=null),Ze=M,M=Ut()}else F=M,M=a;return We--,M}function Ch(){var M,V,G,oe,be=function(Ie){We===0&&te(Ie)};if(be(Ve),We++,M=F,s.charCodeAt(F)===34?(V=y,F++):V=a,V!==a){for(G=[],oe=Mb();oe!==a;)G.push(oe),oe=Mb();s.charCodeAt(F)===34?(oe=y,F++):oe=a,oe!==a?(Ze=M,M=Bn(G)):(F=M,M=a)}else F=M,M=a;return We--,M}function Mb(){var M;return L.test(s.charAt(F))?(M=s.charAt(F),F++):M=a,M===a&&(M=JP()),M}function JP(){var M,V,G,oe;return M=F,s.charCodeAt(F)===92?(V=k,F++):V=a,V!==a?(s.charCodeAt(F)===34?(G=y,F++):G=a,G===a&&(s.charCodeAt(F)===92?(G=k,F++):G=a,G===a&&(G=F,s.charCodeAt(F)===110?(oe=P,F++):oe=a,oe!==a&&(Ze=G,oe=nr()),G=oe,G===a&&(G=F,s.charCodeAt(F)===114?(oe=T,F++):oe=a,oe!==a&&(Ze=G,oe=gr()),G=oe,G===a&&(G=F,s.charCodeAt(F)===116?(oe=E,F++):oe=a,oe!==a&&(Ze=G,oe=cn()),G=oe)))),G!==a?(Ze=M,M=Mt(G)):(F=M,M=a)):(F=M,M=a),M}function is(){var M,V,G,oe=function(be){We===0&&te(be)};if(oe(ze),We++,M=F,V=[],N.test(s.charAt(F))?(G=s.charAt(F),F++):G=a,G!==a)for(;G!==a;)V.push(G),N.test(s.charAt(F))?(G=s.charAt(F),F++):G=a;else V=a;return V!==a?M=s.substring(M,F):M=V,We--,M}function kt(){var M,V=function(G){We===0&&te(G)};return V(Bt),We++,Z.test(s.charAt(F))?(M=s.charAt(F),F++):M=a,We--,M}const{Variable:eE,Function:tE}=o;if(H(),vr=c(),vr!==a&&F===s.length)return vr;throw vr!==a&&F<s.length&&te(ns()),ye()}e.exports={SyntaxError:r,parse:i}}}),oB=Me({"node_modules/entities/lib/maps/entities.json"(t,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:"‌"}}}),OC=Me({"node_modules/markdown-it/lib/common/entities.js"(t,e){e.exports=oB()}}),YO=Me({"node_modules/uc.micro/categories/P/regex.js"(t,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]/}}),aB=Me({"node_modules/mdurl/encode.js"(t,e){var n={};function r(s){var o,a,l=n[s];if(l)return l;for(l=n[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}}),lB=Me({"node_modules/mdurl/decode.js"(t,e){var n={};function r(s){var o,a,l=n[s];if(l)return l;for(l=n[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,v="";for(c=0,u=l.length;c<u;c+=3){if(f=parseInt(l.slice(c+1,c+3),16),f<128){v+=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?v+="��":v+=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?v+="���":v+=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?v+="����":(p-=65536,v+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),c+=9;continue}v+="�"}return v})}i.defaultChars=";/?:@&=+$,#",i.componentChars="",e.exports=i}}),cB=Me({"node_modules/mdurl/format.js"(t,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}}}),uB=Me({"node_modules/mdurl/parse.js"(t,e){function n(){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 v(O,b){if(O&&O instanceof n)return O;var w=new n;return w.parse(O,b),w}n.prototype.parse=function(O,b){var w,S,_,x,C,A=O;if(A=A.trim(),!b&&O.split("#").length===1){var y=s.exec(A);if(y)return this.pathname=y[1],y[2]&&(this.search=y[2]),this}var k=r.exec(A);if(k&&(k=k[0],_=k.toLowerCase(),this.protocol=k,A=A.substr(k.length)),(b||k||A.match(/^\/\/[^@\/]+@[^@\/]+/))&&(C=A.substr(0,2)==="//",C&&!(k&&m[k])&&(A=A.substr(2),this.slashes=!0)),!m[k]&&(C||k&&!p[k])){var P=-1;for(w=0;w<u.length;w++)x=A.indexOf(u[w]),x!==-1&&(P===-1||x<P)&&(P=x);var T,E;for(P===-1?E=A.lastIndexOf("@"):E=A.lastIndexOf("@",P),E!==-1&&(T=A.slice(0,E),A=A.slice(E+1),this.auth=T),P=-1,w=0;w<c.length;w++)x=A.indexOf(c[w]),x!==-1&&(P===-1||x<P)&&(P=x);P===-1&&(P=A.length),A[P-1]===":"&&P--;var Q=A.slice(0,P);A=A.slice(P),this.parseHost(Q),this.hostname=this.hostname||"";var $=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!$){var L=this.hostname.split(/\./);for(w=0,S=L.length;w<S;w++){var N=L[w];if(N&&!N.match(d)){for(var Z="",Y=0,ne=N.length;Y<ne;Y++)N.charCodeAt(Y)>127?Z+="x":Z+=N[Y];if(!Z.match(d)){var ae=L.slice(0,w),ie=L.slice(w+1),K=N.match(h);K&&(ae.push(K[1]),ie.unshift(K[2])),ie.length&&(A=ie.join(".")+A),this.hostname=ae.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var he=A.indexOf("#");he!==-1&&(this.hash=A.substr(he),A=A.slice(0,he));var fe=A.indexOf("?");return fe!==-1&&(this.search=A.substr(fe),A=A.slice(0,fe)),A&&(this.pathname=A),p[_]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(O){var b=i.exec(O);b&&(b=b[0],b!==":"&&(this.port=b.substr(1)),O=O.substr(0,O.length-b.length)),O&&(this.hostname=O)},e.exports=v}}),bC=Me({"node_modules/mdurl/index.js"(t,e){e.exports.encode=aB(),e.exports.decode=lB(),e.exports.format=cB(),e.exports.parse=uB()}}),yC=Me({"node_modules/uc.micro/properties/Any/regex.js"(t,e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/}}),wC=Me({"node_modules/uc.micro/categories/Cc/regex.js"(t,e){e.exports=/[\0-\x1F\x7F-\x9F]/}}),fB=Me({"node_modules/uc.micro/categories/Cf/regex.js"(t,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]/}}),_C=Me({"node_modules/uc.micro/categories/Z/regex.js"(t,e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/}}),dB=Me({"node_modules/uc.micro/index.js"(t){t.Any=yC(),t.Cc=wC(),t.Cf=fB(),t.P=YO(),t.Z=_C()}}),Xt=Me({"node_modules/markdown-it/lib/common/utils.js"(t){function e(Q){return Object.prototype.toString.call(Q)}function n(Q){return e(Q)==="[object String]"}var r=Object.prototype.hasOwnProperty;function i(Q,$){return r.call(Q,$)}function s(Q){var $=Array.prototype.slice.call(arguments,1);return $.forEach(function(L){if(L){if(typeof L!="object")throw new TypeError(L+"must be object");Object.keys(L).forEach(function(N){Q[N]=L[N]})}}),Q}function o(Q,$,L){return[].concat(Q.slice(0,$),L,Q.slice($+1))}function a(Q){return!(Q>=55296&&Q<=57343||Q>=64976&&Q<=65007||(Q&65535)===65535||(Q&65535)===65534||Q>=0&&Q<=8||Q===11||Q>=14&&Q<=31||Q>=127&&Q<=159||Q>1114111)}function l(Q){if(Q>65535){Q-=65536;var $=55296+(Q>>10),L=56320+(Q&1023);return String.fromCharCode($,L)}return String.fromCharCode(Q)}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=OC();function m(Q,$){var L=0;return i(h,$)?h[$]:$.charCodeAt(0)===35&&d.test($)&&(L=$[1].toLowerCase()==="x"?parseInt($.slice(2),16):parseInt($.slice(1),10),a(L))?l(L):Q}function p(Q){return Q.indexOf("\\")<0?Q:Q.replace(c,"$1")}function v(Q){return Q.indexOf("\\")<0&&Q.indexOf("&")<0?Q:Q.replace(f,function($,L,N){return L||m($,N)})}var O=/[&<>"]/,b=/[&<>"]/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function S(Q){return w[Q]}function _(Q){return O.test(Q)?Q.replace(b,S):Q}var x=/[.?*+^$[\]\\(){}|-]/g;function C(Q){return Q.replace(x,"\\$&")}function A(Q){switch(Q){case 9:case 32:return!0}return!1}function y(Q){if(Q>=8192&&Q<=8202)return!0;switch(Q){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=YO();function P(Q){return k.test(Q)}function T(Q){switch(Q){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 E(Q){return Q=Q.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(Q=Q.replace(/ẞ/g,"ß")),Q.toLowerCase().toUpperCase()}t.lib={},t.lib.mdurl=bC(),t.lib.ucmicro=dB(),t.assign=s,t.isString=n,t.has=i,t.unescapeMd=p,t.unescapeAll=v,t.isValidEntityCode=a,t.fromCodePoint=l,t.escapeHtml=_,t.arrayReplaceAt=o,t.isSpace=A,t.isWhiteSpace=y,t.isMdAsciiPunct=T,t.isPunctChar=P,t.escapeRE=C,t.normalizeReference=E}}),hB=Me({"node_modules/markdown-it/lib/helpers/parse_link_label.js"(t,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}}}),pB=Me({"node_modules/markdown-it/lib/helpers/parse_link_destination.js"(t,e){var n=Xt().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=n(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=n(i.slice(u,s)),f.lines=c,f.pos=s,f.ok=!0),f}}}),mB=Me({"node_modules/markdown-it/lib/helpers/parse_link_title.js"(t,e){var n=Xt().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=n(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}}}),gB=Me({"node_modules/markdown-it/lib/helpers/index.js"(t){t.parseLinkLabel=hB(),t.parseLinkDestination=pB(),t.parseLinkTitle=mB()}}),vB=Me({"node_modules/markdown-it/lib/renderer.js"(t,e){var n=Xt().assign,r=Xt().unescapeAll,i=Xt().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="",v,O,b,w,S;return h&&(b=h.split(/(\s+)/g),m=b[0],p=b.slice(2).join("")),c.highlight?v=c.highlight(d.content,m,p)||i(d.content):v=i(d.content),v.indexOf("<pre")===0?v+`
250
+ `:h?(O=d.attrIndex("class"),w=d.attrs?d.attrs.slice():[],O<0?w.push(["class",c.langPrefix+m]):(w[O]=w[O].slice(),w[O][1]+=" "+c.langPrefix+m),S={attrs:w},"<pre><code"+f.renderAttrs(S)+">"+v+`</code></pre>
251
+ `):"<pre><code"+f.renderAttrs(d)+">"+v+`</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=n({},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}}),UO=Me({"node_modules/markdown-it/lib/ruler.js"(t,e){function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(r){for(var i=0;i<this.__rules__.length;i++)if(this.__rules__[i].name===r)return i;return-1},n.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))})})},n.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},n.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},n.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},n.prototype.push=function(r,i,s){var o=s||{};this.__rules__.push({name:r,enabled:!0,fn:i,alt:o.alt||[]}),this.__cache__=null},n.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},n.prototype.enableOnly=function(r,i){Array.isArray(r)||(r=[r]),this.__rules__.forEach(function(s){s.enabled=!1}),this.enable(r,i)},n.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},n.prototype.getRules=function(r){return this.__cache__===null&&this.__compile__(),this.__cache__[r]||[]},e.exports=n}}),OB=Me({"node_modules/markdown-it/lib/rules_core/normalize.js"(t,e){var n=/\r\n?|\n/g,r=/\0/g;e.exports=function(s){var o;o=s.src.replace(n,`
261
+ `),o=o.replace(r,"�"),s.src=o}}}),bB=Me({"node_modules/markdown-it/lib/rules_core/block.js"(t,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)}}}),yB=Me({"node_modules/markdown-it/lib/rules_core/inline.js"(t,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)}}}),wB=Me({"node_modules/markdown-it/lib/rules_core/linkify.js"(t,e){var n=Xt().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,v,O,b,w,S,_,x,C=o.tokens,A;if(o.md.options.linkify){for(l=0,c=C.length;l<c;l++)if(!(C[l].type!=="inline"||!o.md.linkify.pretest(C[l].content)))for(u=C[l].children,w=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)&&w>0&&w--,i(d.content)&&w++),!(w>0)&&d.type==="text"&&o.md.linkify.test(d.content)){for(p=d.content,A=o.md.linkify.match(p),h=[],b=d.level,O=0,m=0;m<A.length;m++)S=A[m].url,_=o.md.normalizeLink(S),o.md.validateLink(_)&&(x=A[m].text,A[m].schema?A[m].schema==="mailto:"&&!/^mailto:/i.test(x)?x=o.md.normalizeLinkText("mailto:"+x).replace(/^mailto:/,""):x=o.md.normalizeLinkText(x):x=o.md.normalizeLinkText("http://"+x).replace(/^http:\/\//,""),v=A[m].index,v>O&&(f=new o.Token("text","",0),f.content=p.slice(O,v),f.level=b,h.push(f)),f=new o.Token("link_open","a",1),f.attrs=[["href",_]],f.level=b++,f.markup="linkify",f.info="auto",h.push(f),f=new o.Token("text","",0),f.content=x,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),O=A[m].lastIndex);O<p.length&&(f=new o.Token("text","",0),f.content=p.slice(O),f.level=b,h.push(f)),C[l].children=u=n(u,a,h)}}}}}}),_B=Me({"node_modules/markdown-it/lib/rules_core/replacements.js"(t,e){var n=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,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&&n.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),n.test(u.tokens[f].content)&&l(u.tokens[f].children))}}}),kB=Me({"node_modules/markdown-it/lib/rules_core/smartquotes.js"(t,e){var n=Xt().isWhiteSpace,r=Xt().isPunctChar,i=Xt().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,v,O,b,w,S,_,x,C,A,y,k,P,T,E,Q,$,L;for(Q=[],d=0;d<u.length;d++){for(h=u[d],b=u[d].level,T=Q.length-1;T>=0&&!(Q[T].level<=b);T--);if(Q.length=T+1,h.type==="text"){m=h.content,v=0,O=m.length;e:for(;v<O&&(o.lastIndex=v,p=o.exec(m),!!p);){if(k=P=!0,v=p.index+1,E=p[0]==="'",S=32,p.index-1>=0)S=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){S=u[T].content.charCodeAt(u[T].content.length-1);break}if(_=32,v<O)_=m.charCodeAt(v);else for(T=d+1;T<u.length&&!(u[T].type==="softbreak"||u[T].type==="hardbreak");T++)if(u[T].content){_=u[T].content.charCodeAt(0);break}if(x=i(S)||r(String.fromCharCode(S)),C=i(_)||r(String.fromCharCode(_)),A=n(S),y=n(_),y?k=!1:C&&(A||x||(k=!1)),A?P=!1:x&&(y||C||(P=!1)),_===34&&p[0]==='"'&&S>=48&&S<=57&&(P=k=!1),k&&P&&(k=x,P=C),!k&&!P){E&&(h.content=l(h.content,p.index,a));continue}if(P){for(T=Q.length-1;T>=0&&(w=Q[T],!(Q[T].level<b));T--)if(w.single===E&&Q[T].level===b){w=Q[T],E?($=f.md.options.quotes[2],L=f.md.options.quotes[3]):($=f.md.options.quotes[0],L=f.md.options.quotes[1]),h.content=l(h.content,p.index,L),u[w.token].content=l(u[w.token].content,w.pos,$),v+=L.length-1,w.token===d&&(v+=$.length-1),m=h.content,O=m.length,Q.length=T;continue e}}k?Q.push({token:d,pos:p.index,single:E,level:b}):P&&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)}}}),GO=Me({"node_modules/markdown-it/lib/token.js"(t,e){function n(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}n.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},n.prototype.attrPush=function(i){this.attrs?this.attrs.push(i):this.attrs=[i]},n.prototype.attrSet=function(i,s){var o=this.attrIndex(i),a=[i,s];o<0?this.attrPush(a):this.attrs[o]=a},n.prototype.attrGet=function(i){var s=this.attrIndex(i),o=null;return s>=0&&(o=this.attrs[s][1]),o},n.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=n}}),xB=Me({"node_modules/markdown-it/lib/rules_core/state_core.js"(t,e){var n=GO();function r(i,s,o){this.src=i,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=s}r.prototype.Token=n,e.exports=r}}),SB=Me({"node_modules/markdown-it/lib/parser_core.js"(t,e){var n=UO(),r=[["normalize",OB()],["block",bB()],["inline",yB()],["linkify",wB()],["replacements",_B()],["smartquotes",kB()]];function i(){this.ruler=new n;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=xB(),e.exports=i}}),AB=Me({"node_modules/markdown-it/lib/rules_block/table.js"(t,e){var n=Xt().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,v,O,b,w,S,_,x,C,A,y,k,P;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]||(P=o.src.charCodeAt(d++),P!==124&&P!==45&&P!==58&&!n(P))||k===45&&n(P))return!1;for(;d<o.eMarks[p];){if(u=o.src.charCodeAt(d),u!==124&&u!==45&&u!==58&&!n(u))return!1;d++}for(f=r(o,a+1),v=f.split("|"),w=[],h=0;h<v.length;h++){if(S=v[h].trim(),!S){if(h===0||h===v.length-1)continue;return!1}if(!/^:?-+:?$/.test(S))return!1;S.charCodeAt(S.length-1)===58?w.push(S.charCodeAt(0)===58?"center":"right"):S.charCodeAt(0)===58?w.push("left"):w.push("")}if(f=r(o,a).trim(),f.indexOf("|")===-1||!o.md.options.allowIndentation&&o.sCount[a]-o.blkIndent>=4||(v=i(f),v.length&&v[0]===""&&v.shift(),v.length&&v[v.length-1]===""&&v.pop(),O=v.length,O===0||O!==w.length))return!1;if(c)return!0;for(C=o.parentType,o.parentType="table",y=o.md.block.ruler.getRules("blockquote"),b=o.push("table_open","table",1),b.map=_=[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<v.length;h++)b=o.push("th_open","th",1),w[h]&&(b.attrs=[["style","text-align:"+w[h]]]),b=o.push("inline","",0),b.content=v[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=y.length;h<m;h++)if(y[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(v=i(f),v.length&&v[0]===""&&v.shift(),v.length&&v[v.length-1]===""&&v.pop(),p===a+2&&(b=o.push("tbody_open","tbody",1),b.map=x=[a+2,0]),b=o.push("tr_open","tr",1),b.map=[p,p+1],h=0;h<O;h++)b=o.push("td_open","td",1),w[h]&&(b.attrs=[["style","text-align:"+w[h]]]),b=o.push("inline","",0),b.content=v[h]?v[h].trim():"",b.children=[],b=o.push("td_close","td",-1);b=o.push("tr_close","tr",-1)}return x&&(b=o.push("tbody_close","tbody",-1),x[1]=p),b=o.push("table_close","table",-1),_[1]=p,o.parentType=C,o.line=p,!0}}}),CB=Me({"node_modules/markdown-it/lib/rules_block/code.js"(t,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}}}),TB=Me({"node_modules/markdown-it/lib/rules_block/fence.js"(t,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],v=r.eMarks[i];if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4||p+3>v||(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,v),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],v=r.eMarks[u],p<v&&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<v)))){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}}}),PB=Me({"node_modules/markdown-it/lib/rules_block/blockquote.js"(t,e){var n=Xt().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d,h,m,p,v,O,b,w,S,_,x,C,A,y,k,P,T=i.lineMax,E=i.bMarks[s]+i.tShift[s],Q=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||i.src.charCodeAt(E++)!==62)return!1;if(a)return!0;for(f=v=i.sCount[s]+1,i.src.charCodeAt(E)===32?(E++,f++,v++,l=!1,C=!0):i.src.charCodeAt(E)===9?(C=!0,(i.bsCount[s]+v)%4===3?(E++,f++,v++,l=!1):l=!0):C=!1,O=[i.bMarks[s]],i.bMarks[s]=E;E<Q&&(c=i.src.charCodeAt(E),n(c));){c===9?v+=4-(v+i.bsCount[s]+(l?1:0))%4:v++;E++}for(b=[i.bsCount[s]],i.bsCount[s]=i.sCount[s]+1+(C?1:0),h=E>=Q,_=[i.sCount[s]],i.sCount[s]=v-f,x=[i.tShift[s]],i.tShift[s]=E-i.bMarks[s],y=i.md.block.ruler.getRules("blockquote"),S=i.parentType,i.parentType="blockquote",p=s+1;p<o&&(P=i.sCount[p]<i.blkIndent,E=i.bMarks[p]+i.tShift[p],Q=i.eMarks[p],!(E>=Q));p++){if(i.src.charCodeAt(E++)===62&&!P){for(f=v=i.sCount[p]+1,i.src.charCodeAt(E)===32?(E++,f++,v++,l=!1,C=!0):i.src.charCodeAt(E)===9?(C=!0,(i.bsCount[p]+v)%4===3?(E++,f++,v++,l=!1):l=!0):C=!1,O.push(i.bMarks[p]),i.bMarks[p]=E;E<Q&&(c=i.src.charCodeAt(E),n(c));){c===9?v+=4-(v+i.bsCount[p]+(l?1:0))%4:v++;E++}h=E>=Q,b.push(i.bsCount[p]),i.bsCount[p]=i.sCount[p]+1+(C?1:0),_.push(i.sCount[p]),i.sCount[p]=v-f,x.push(i.tShift[p]),i.tShift[p]=E-i.bMarks[p];continue}if(h)break;for(A=!1,u=0,d=y.length;u<d;u++)if(y[u](i,p,o,!0)){A=!0;break}if(A){i.lineMax=p,i.blkIndent!==0&&(O.push(i.bMarks[p]),b.push(i.bsCount[p]),x.push(i.tShift[p]),_.push(i.sCount[p]),i.sCount[p]-=i.blkIndent);break}O.push(i.bMarks[p]),b.push(i.bsCount[p]),x.push(i.tShift[p]),_.push(i.sCount[p]),i.sCount[p]=-1}for(w=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=S,m[1]=i.line,u=0;u<x.length;u++)i.bMarks[u+s]=O[u],i.tShift[u+s]=x[u],i.sCount[u+s]=_[u],i.bsCount[u+s]=b[u];return i.blkIndent=w,!0}}}),EB=Me({"node_modules/markdown-it/lib/rules_block/hr.js"(t,e){var n=Xt().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&&!n(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)}}}),$B=Me({"node_modules/markdown-it/lib/rules_block/list.js"(t,e){var n=Xt().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),!n(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),!n(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,v,O,b,w,S,_,x,C,A,y,k,P,T,E,Q,$,L,N,Z,Y,ne,ae,ie,K=!1,he=!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&&(K=!0),(N=i(a,l))>=0){if(O=!0,Y=a.bMarks[l]+a.tShift[l],C=Number(a.src.slice(Y,N-1)),K&&C!==1)return!1}else if((N=r(a,l))>=0)O=!1;else return!1;if(K&&a.skipSpaces(N)>=a.eMarks[l])return!1;if(x=a.src.charCodeAt(N-1),u)return!0;for(_=a.tokens.length,O?(ie=a.push("ordered_list_open","ol",1),C!==1&&(ie.attrs=[["start",C]])):ie=a.push("bullet_list_open","ul",1),ie.map=S=[l,0],ie.markup=String.fromCharCode(x),y=l,Z=!1,ae=a.md.block.ruler.getRules("list"),T=a.parentType,a.parentType="list";y<c;){for(L=N,A=a.eMarks[y],v=k=a.sCount[y]+N-(a.bMarks[l]+a.tShift[l]);L<A;){if(f=a.src.charCodeAt(L),f===9)k+=4-(k+a.bsCount[y])%4;else if(f===32)k++;else break;L++}if(d=L,d>=A?p=1:p=k-v,!a.md.options.allowIndentation&&p>4&&(p=1),m=v+p,ie=a.push("list_item_open","li",1),ie.markup=String.fromCharCode(x),ie.map=b=[l,0],O&&(ie.info=a.src.slice(Y,N-1)),$=a.tight,Q=a.tShift[l],E=a.sCount[l],P=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||Z)&&(he=!1),Z=a.line-l>1&&a.isEmpty(a.line-1),a.blkIndent=a.listIndent,a.listIndent=P,a.tShift[l]=Q,a.sCount[l]=E,a.tight=$,ie=a.push("list_item_close","li",-1),ie.markup=String.fromCharCode(x),y=l=a.line,b[1]=y,d=a.bMarks[l],y>=c||a.sCount[y]<a.blkIndent||!a.md.options.allowIndentation&&a.sCount[l]-a.blkIndent>=4)break;for(ne=!1,h=0,w=ae.length;h<w;h++)if(ae[h](a,y,c,!0)){ne=!0;break}if(ne)break;if(O){if(N=i(a,y),N<0)break;Y=a.bMarks[y]+a.tShift[y]}else if(N=r(a,y),N<0)break;if(x!==a.src.charCodeAt(N-1))break}return O?ie=a.push("ordered_list_close","ol",-1):ie=a.push("bullet_list_close","ul",-1),ie.markup=String.fromCharCode(x),S[1]=y,a.line=y,a.parentType=T,he&&s(a,_),!0}}}),QB=Me({"node_modules/markdown-it/lib/rules_block/reference.js"(t,e){var n=Xt().normalizeReference,r=Xt().isSpace;e.exports=function(s,o,a,l){var c,u,f,d,h,m,p,v,O,b,w,S,_,x,C,A,y=0,k=s.bMarks[o]+s.tShift[o],P=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<P;)if(s.src.charCodeAt(k)===93&&s.src.charCodeAt(k-1)!==92){if(k+1===P||s.src.charCodeAt(k+1)!==58)return!1;break}for(d=s.lineMax,C=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(x=!1,m=0,p=C.length;m<p;m++)if(C[m](s,T,d,!0)){x=!0;break}if(x)break}for(_=s.getLines(o,T,s.blkIndent,!1).trim(),P=_.length,k=1;k<P;k++){if(c=_.charCodeAt(k),c===91)return!1;if(c===93){O=k;break}else c===10?y++:c===92&&(k++,k<P&&_.charCodeAt(k)===10&&y++)}if(O<0||_.charCodeAt(O+1)!==58)return!1;for(k=O+2;k<P;k++)if(c=_.charCodeAt(k),c===10)y++;else if(!r(c))break;if(w=s.md.helpers.parseLinkDestination(_,k,P),!w.ok||(h=s.md.normalizeLink(w.str),!s.md.validateLink(h)))return!1;for(k=w.pos,y+=w.lines,u=k,f=y,S=k;k<P;k++)if(c=_.charCodeAt(k),c===10)y++;else if(!r(c))break;for(w=s.md.helpers.parseLinkTitle(_,k,P),k<P&&S!==k&&w.ok?(A=w.str,k=w.pos,y+=w.lines):(A="",k=u,y=f);k<P&&(c=_.charCodeAt(k),!!r(c));)k++;if(k<P&&_.charCodeAt(k)!==10&&A)for(A="",k=u,y=f;k<P&&(c=_.charCodeAt(k),!!r(c));)k++;return k<P&&_.charCodeAt(k)!==10||(v=n(_.slice(1,O)),!v)?!1:(l||(typeof s.env.references>"u"&&(s.env.references={}),typeof s.env.references[v]>"u"&&(s.env.references[v]={title:A,href:h}),s.parentType=b,s.line=o+y+1),!0)}}}),LB=Me({"node_modules/markdown-it/lib/common/html_blocks.js"(t,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"]}}),kC=Me({"node_modules/markdown-it/lib/common/html_re.js"(t,e){var n="[a-zA-Z_:][a-zA-Z0-9:._-]*",r="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",s='"[^"]*"',o="(?:"+r+"|"+i+"|"+s+")",a="(?:\\s+"+n+"(?:\\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}}),MB=Me({"node_modules/markdown-it/lib/rules_block/html_block.js"(t,e){var n=LB(),r=kC().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("^</?("+n.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}}}),qB=Me({"node_modules/markdown-it/lib/rules_block/heading.js"(t,e){var n=Xt().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&&!n(l)?!1:(a||(h=i.skipSpacesBack(h,d),u=i.skipCharsBack(h,35,d),u>d&&n(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)}}}),RB=Me({"node_modules/markdown-it/lib/rules_block/lheading.js"(t,e){e.exports=function(r,i,s){var o,a,l,c,u,f,d,h,m,p=i+1,v,O=r.md.block.ruler.getRules("paragraph");if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4)return!1;for(v=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=O.length;l<c;l++)if(O[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=v,!0):!1}}}),DB=Me({"node_modules/markdown-it/lib/rules_block/paragraph.js"(t,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}}}),NB=Me({"node_modules/markdown-it/lib/rules_block/state_block.js"(t,e){var n=GO(),r=Xt().isSpace;function i(s,o,a,l){var c,u,f,d,h,m,p,v;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,v=!1,f=d=m=p=0,h=u.length;d<h;d++){if(c=u.charCodeAt(d),!v)if(r(c)){m++,c===9?p+=4-p%4:p++;continue}else v=!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),v=!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 n(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,v,O=o;if(o>=a)return"";for(p=new Array(a-o),u=0;O<a;O++,u++){for(f=0,v=h=this.bMarks[O],O+1<a||c?m=this.eMarks[O]+1:m=this.eMarks[O];h<m&&f<l;){if(d=this.src.charCodeAt(h),r(d))d===9?f+=4-(f+this.bsCount[O])%4:f++;else if(h-v<this.tShift[O])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=n,e.exports=i}}),IB=Me({"node_modules/markdown-it/lib/parser_block.js"(t,e){var n=UO(),r=[["table",AB(),["paragraph","reference"]],["code",CB()],["fence",TB(),["paragraph","reference","blockquote","list"]],["blockquote",PB(),["paragraph","reference","blockquote","list"]],["hr",EB(),["paragraph","reference","blockquote","list"]],["list",$B(),["paragraph","reference","blockquote"]],["reference",QB()],["html_block",MB(),["paragraph","reference","blockquote"]],["heading",qB(),["paragraph","reference","blockquote"]],["lheading",RB()],["paragraph",DB()]];function i(){this.ruler=new n;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=NB(),e.exports=i}}),BB=Me({"node_modules/markdown-it/lib/rules_inline/text.js"(t,e){function n(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&&!n(i.src.charCodeAt(o));)o++;return o===i.pos?!1:(s||(i.pending+=i.src.slice(i.pos,o)),i.pos=o,!0)}}}),jB=Me({"node_modules/markdown-it/lib/rules_inline/newline.js"(t,e){var n=Xt().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&&n(i.src.charCodeAt(c));)c++;return i.pos=c,!0}}}),zB=Me({"node_modules/markdown-it/lib/rules_inline/escape.js"(t,e){var n=Xt().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),!!n(l));)c++;return o.pos=c,!0}}return a||(o.pending+="\\"),o.pos++,!0}}}),ZB=Me({"node_modules/markdown-it/lib/rules_inline/backticks.js"(t,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}}}),A0=Me({"node_modules/markdown-it/lib/rules_inline/strikethrough.js"(t,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 n(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(n(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)}}}),C0=Me({"node_modules/markdown-it/lib/rules_inline/emphasis.js"(t,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 n(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(n(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)}}}),FB=Me({"node_modules/markdown-it/lib/rules_inline/link.js"(t,e){var n=Xt().normalizeReference,r=Xt().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,m,p,v="",O="",b=s.pos,w=s.posMax,S=s.pos,_=!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<w&&s.src.charCodeAt(d)===40){for(_=!1,d++;d<w&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(d>=w)return!1;if(S=d,h=s.md.helpers.parseLinkDestination(s.src,d,s.posMax),h.ok){for(v=s.md.normalizeLink(h.str),s.md.validateLink(v)?d=h.pos:v="",S=d;d<w&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(h=s.md.helpers.parseLinkTitle(s.src,d,s.posMax),d<w&&S!==d&&h.ok)for(O=h.str,d=h.pos;d<w&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);}(d>=w||s.src.charCodeAt(d)!==41)&&(_=!0),d++}if(_){if(typeof s.env.references>"u")return!1;if(d<w&&s.src.charCodeAt(d)===91?(S=d+1,d=s.md.helpers.parseLinkLabel(s,d),d>=0?c=s.src.slice(S,d++):d=u+1):d=u+1,c||(c=s.src.slice(f,u)),m=s.env.references[n(c)],!m)return s.pos=b,!1;v=m.href,O=m.title}return o||(s.pos=f,s.posMax=u,p=s.push("link_open","a",1),p.attrs=a=[["href",v]],O&&a.push(["title",O]),s.md.inline.tokenize(s),p=s.push("link_close","a",-1)),s.pos=d,s.posMax=w,!0}}}),XB=Me({"node_modules/markdown-it/lib/rules_inline/image.js"(t,e){var n=Xt().normalizeReference,r=Xt().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,m,p,v,O,b,w,S="",_=s.pos,x=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<x&&s.src.charCodeAt(h)===40){for(h++;h<x&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(h>=x)return!1;for(w=h,p=s.md.helpers.parseLinkDestination(s.src,h,s.posMax),p.ok&&(S=s.md.normalizeLink(p.str),s.md.validateLink(S)?h=p.pos:S=""),w=h;h<x&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(p=s.md.helpers.parseLinkTitle(s.src,h,s.posMax),h<x&&w!==h&&p.ok)for(v=p.str,h=p.pos;h<x&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);else v="";if(h>=x||s.src.charCodeAt(h)!==41)return s.pos=_,!1;h++}else{if(typeof s.env.references>"u")return!1;if(h<x&&s.src.charCodeAt(h)===91?(w=h+1,h=s.md.helpers.parseLinkLabel(s,h),h>=0?u=s.src.slice(w,h++):h=f+1):h=f+1,u||(u=s.src.slice(d,f)),m=s.env.references[n(u)],!m)return s.pos=_,!1;S=m.href,v=m.title}return o||(c=s.src.slice(d,f),s.md.inline.parse(c,s.md,s.env,b=[]),O=s.push("image","img",0),O.attrs=a=[["src",S],["alt",""]],O.children=b,O.content=c,v&&a.push(["title",v])),s.pos=h,s.posMax=x,!0}}}),VB=Me({"node_modules/markdown-it/lib/rules_inline/autolink.js"(t,e){var n=/^([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):n.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}}}),WB=Me({"node_modules/markdown-it/lib/rules_inline/html_inline.js"(t,e){var n=kC().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(n),!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)}}}),YB=Me({"node_modules/markdown-it/lib/rules_inline/entity.js"(t,e){var n=OC(),r=Xt().has,i=Xt().isValidEntityCode,s=Xt().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(n,h[1]))return u||(c.pending+=n[h[1]]),c.pos+=h[0].length,!0}return u||(c.pending+="&"),c.pos++,!0}}}),UB=Me({"node_modules/markdown-it/lib/rules_inline/balance_pairs.js"(t,e){function n(r,i){var s,o,a,l,c,u,f,d,h={},m=i.length;if(m){var p=0,v=-2,O=[];for(s=0;s<m;s++)if(a=i[s],O.push(0),(i[p].marker!==a.marker||v!==a.token-1)&&(p=s),v=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-O[p]-1,u=o;o>c;o-=O[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?O[o-1]+1:0,O[s]=s-o+d,O[o]=d,a.open=!1,l.end=s,l.close=!1,u=-1,v=-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(n(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)}}}),GB=Me({"node_modules/markdown-it/lib/rules_inline/text_collapse.js"(t,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)}}}),HB=Me({"node_modules/markdown-it/lib/rules_inline/state_inline.js"(t,e){var n=GO(),r=Xt().isWhiteSpace,i=Xt().isPunctChar,s=Xt().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 n("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 n(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,v,O,b,w=!0,S=!0,_=this.posMax,x=this.src.charCodeAt(a);for(u=a>0?this.src.charCodeAt(a-1):32;c<_&&this.src.charCodeAt(c)===x;)c++;return d=c-a,f=c<_?this.src.charCodeAt(c):32,v=s(u)||i(String.fromCharCode(u)),b=s(f)||i(String.fromCharCode(f)),p=r(u),O=r(f),O?w=!1:b&&(p||v||(w=!1)),p?S=!1:v&&(O||b||(S=!1)),l?(h=w,m=S):(h=w&&(!S||v),m=S&&(!w||b)),{can_open:h,can_close:m,length:d}},o.prototype.Token=n,e.exports=o}}),KB=Me({"node_modules/markdown-it/lib/parser_inline.js"(t,e){var n=UO(),r=[["text",BB()],["newline",jB()],["escape",zB()],["backticks",ZB()],["strikethrough",A0().tokenize],["emphasis",C0().tokenize],["link",FB()],["image",XB()],["autolink",VB()],["html_inline",WB()],["entity",YB()]],i=[["balance_pairs",UB()],["strikethrough",A0().postProcess],["emphasis",C0().postProcess],["text_collapse",GB()]];function s(){var o;for(this.ruler=new n,o=0;o<r.length;o++)this.ruler.push(r[o][0],r[o][1]);for(this.ruler2=new n,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=HB(),e.exports=s}}),JB=Me({"node_modules/linkify-it/lib/re.js"(t,e){e.exports=function(n){var r={};r.src_Any=yC().source,r.src_Cc=wC().source,r.src_Z=_C().source,r.src_P=YO().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+"|[.]).|"+(n&&n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+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}}}),ej=Me({"node_modules/linkify-it/index.js"(t,e){function n(_){var x=Array.prototype.slice.call(arguments,1);return x.forEach(function(C){C&&Object.keys(C).forEach(function(A){_[A]=C[A]})}),_}function r(_){return Object.prototype.toString.call(_)}function i(_){return r(_)==="[object String]"}function s(_){return r(_)==="[object Object]"}function o(_){return r(_)==="[object RegExp]"}function a(_){return r(_)==="[object Function]"}function l(_){return _.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function u(_){return Object.keys(_||{}).reduce(function(x,C){return x||c.hasOwnProperty(C)},!1)}var f={"http:":{validate:function(_,x,C){var A=_.slice(x);return C.re.http||(C.re.http=new RegExp("^\\/\\/"+C.re.src_auth+C.re.src_host_port_strict+C.re.src_path,"i")),C.re.http.test(A)?A.match(C.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(_,x,C){var A=_.slice(x);return C.re.no_http||(C.re.no_http=new RegExp("^"+C.re.src_auth+"(?:localhost|(?:(?:"+C.re.src_domain+")\\.)+"+C.re.src_domain_root+")"+C.re.src_port+C.re.src_host_terminator+C.re.src_path,"i")),C.re.no_http.test(A)?x>=3&&_[x-3]===":"||x>=3&&_[x-3]==="/"?0:A.match(C.re.no_http)[0].length:0}},"mailto:":{validate:function(_,x,C){var A=_.slice(x);return C.re.mailto||(C.re.mailto=new RegExp("^"+C.re.src_email_name+"@"+C.re.src_host_strict,"i")),C.re.mailto.test(A)?A.match(C.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(_){_.__index__=-1,_.__text_cache__=""}function p(_){return function(x,C){var A=x.slice(C);return _.test(A)?A.match(_)[0].length:0}}function v(){return function(_,x){x.normalize(_)}}function O(_){var x=_.re=JB()(_.__opts__),C=_.__tlds__.slice();_.onCompile(),_.__tlds_replaced__||C.push(d),C.push(x.src_xn),x.src_tlds=C.join("|");function A(T){return T.replace("%TLDS%",x.src_tlds)}x.email_fuzzy=RegExp(A(x.tpl_email_fuzzy),"i"),x.link_fuzzy=RegExp(A(x.tpl_link_fuzzy),"i"),x.link_no_ip_fuzzy=RegExp(A(x.tpl_link_no_ip_fuzzy),"i"),x.host_fuzzy_test=RegExp(A(x.tpl_host_fuzzy_test),"i");var y=[];_.__compiled__={};function k(T,E){throw new Error('(LinkifyIt) Invalid schema "'+T+'": '+E)}Object.keys(_.__schemas__).forEach(function(T){var E=_.__schemas__[T];if(E!==null){var Q={validate:null,link:null};if(_.__compiled__[T]=Q,s(E)){o(E.validate)?Q.validate=p(E.validate):a(E.validate)?Q.validate=E.validate:k(T,E),a(E.normalize)?Q.normalize=E.normalize:E.normalize?k(T,E):Q.normalize=v();return}if(i(E)){y.push(T);return}k(T,E)}}),y.forEach(function(T){_.__compiled__[_.__schemas__[T]]&&(_.__compiled__[T].validate=_.__compiled__[_.__schemas__[T]].validate,_.__compiled__[T].normalize=_.__compiled__[_.__schemas__[T]].normalize)}),_.__compiled__[""]={validate:null,normalize:v()};var P=Object.keys(_.__compiled__).filter(function(T){return T.length>0&&_.__compiled__[T]}).map(l).join("|");_.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+x.src_ZPCc+"))("+P+")","i"),_.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+x.src_ZPCc+"))("+P+")","ig"),_.re.pretest=RegExp("("+_.re.schema_test.source+")|("+_.re.host_fuzzy_test.source+")|@","i"),m(_)}function b(_,x){var C=_.__index__,A=_.__last_index__,y=_.__text_cache__.slice(C,A);this.schema=_.__schema__.toLowerCase(),this.index=C+x,this.lastIndex=A+x,this.raw=y,this.text=y,this.url=y}function w(_,x){var C=new b(_,x);return _.__compiled__[C.schema].normalize(C,_),C}function S(_,x){if(!(this instanceof S))return new S(_,x);x||u(_)&&(x=_,_={}),this.__opts__=n({},c,x),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},f,_),this.__compiled__={},this.__tlds__=h,this.__tlds_replaced__=!1,this.re={},O(this)}S.prototype.add=function(x,C){return this.__schemas__[x]=C,O(this),this},S.prototype.set=function(x){return this.__opts__=n(this.__opts__,x),this},S.prototype.test=function(x){if(this.__text_cache__=x,this.__index__=-1,!x.length)return!1;var C,A,y,k,P,T,E,Q,$;if(this.re.schema_test.test(x)){for(E=this.re.schema_search,E.lastIndex=0;(C=E.exec(x))!==null;)if(k=this.testSchemaAt(x,C[2],E.lastIndex),k){this.__schema__=C[2],this.__index__=C.index+C[1].length,this.__last_index__=C.index+C[0].length+k;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(Q=x.search(this.re.host_fuzzy_test),Q>=0&&(this.__index__<0||Q<this.__index__)&&(A=x.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(P=A.index+A[1].length,(this.__index__<0||P<this.__index__)&&(this.__schema__="",this.__index__=P,this.__last_index__=A.index+A[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&($=x.indexOf("@"),$>=0&&(y=x.match(this.re.email_fuzzy))!==null&&(P=y.index+y[1].length,T=y.index+y[0].length,(this.__index__<0||P<this.__index__||P===this.__index__&&T>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=P,this.__last_index__=T))),this.__index__>=0},S.prototype.pretest=function(x){return this.re.pretest.test(x)},S.prototype.testSchemaAt=function(x,C,A){return this.__compiled__[C.toLowerCase()]?this.__compiled__[C.toLowerCase()].validate(x,A,this):0},S.prototype.match=function(x){var C=0,A=[];this.__index__>=0&&this.__text_cache__===x&&(A.push(w(this,C)),C=this.__last_index__);for(var y=C?x.slice(C):x;this.test(y);)A.push(w(this,C)),y=y.slice(this.__last_index__),C+=this.__last_index__;return A.length?A:null},S.prototype.tlds=function(x,C){return x=Array.isArray(x)?x:[x],C?(this.__tlds__=this.__tlds__.concat(x).sort().filter(function(A,y,k){return A!==k[y-1]}).reverse(),O(this),this):(this.__tlds__=x.slice(),this.__tlds_replaced__=!0,O(this),this)},S.prototype.normalize=function(x){x.schema||(x.url="http://"+x.url),x.schema==="mailto:"&&!/^mailto:/i.test(x.url)&&(x.url="mailto:"+x.url)},S.prototype.onCompile=function(){},e.exports=S}}),tj=Me({"node_modules/punycode/punycode.js"(t,e){var n=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,v=Math.floor,O=String.fromCharCode;function b($){throw new RangeError(m[$])}function w($,L){const N=[];let Z=$.length;for(;Z--;)N[Z]=L($[Z]);return N}function S($,L){const N=$.split("@");let Z="";N.length>1&&(Z=N[0]+"@",$=N[1]),$=$.replace(h,".");const Y=$.split("."),ne=w(Y,L).join(".");return Z+ne}function _($){const L=[];let N=0;const Z=$.length;for(;N<Z;){const Y=$.charCodeAt(N++);if(Y>=55296&&Y<=56319&&N<Z){const ne=$.charCodeAt(N++);(ne&64512)==56320?L.push(((Y&1023)<<10)+(ne&1023)+65536):(L.push(Y),N--)}else L.push(Y)}return L}var x=$=>String.fromCodePoint(...$),C=function($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:r},A=function($,L){return $+22+75*($<26)-((L!=0)<<5)},y=function($,L,N){let Z=0;for($=N?v($/a):$>>1,$+=v($/L);$>p*s>>1;Z+=r)$=v($/p);return v(Z+(p+1)*$/($+o))},k=function($){const L=[],N=$.length;let Z=0,Y=c,ne=l,ae=$.lastIndexOf(u);ae<0&&(ae=0);for(let ie=0;ie<ae;++ie)$.charCodeAt(ie)>=128&&b("not-basic"),L.push($.charCodeAt(ie));for(let ie=ae>0?ae+1:0;ie<N;){let K=Z;for(let fe=1,j=r;;j+=r){ie>=N&&b("invalid-input");const U=C($.charCodeAt(ie++));(U>=r||U>v((n-Z)/fe))&&b("overflow"),Z+=U*fe;const ue=j<=ne?i:j>=ne+s?s:j-ne;if(U<ue)break;const ke=r-ue;fe>v(n/ke)&&b("overflow"),fe*=ke}const he=L.length+1;ne=y(Z-K,he,K==0),v(Z/he)>n-Y&&b("overflow"),Y+=v(Z/he),Z%=he,L.splice(Z++,0,Y)}return String.fromCodePoint(...L)},P=function($){const L=[];$=_($);let N=$.length,Z=c,Y=0,ne=l;for(const K of $)K<128&&L.push(O(K));let ae=L.length,ie=ae;for(ae&&L.push(u);ie<N;){let K=n;for(const fe of $)fe>=Z&&fe<K&&(K=fe);const he=ie+1;K-Z>v((n-Y)/he)&&b("overflow"),Y+=(K-Z)*he,Z=K;for(const fe of $)if(fe<Z&&++Y>n&&b("overflow"),fe==Z){let j=Y;for(let U=r;;U+=r){const ue=U<=ne?i:U>=ne+s?s:U-ne;if(j<ue)break;const ke=j-ue,Ce=r-ue;L.push(O(A(ue+ke%Ce,0))),j=v(ke/Ce)}L.push(O(A(j,0))),ne=y(Y,he,ie==ae),Y=0,++ie}++Y,++Z}return L.join("")},T=function($){return S($,function(L){return f.test(L)?k(L.slice(4).toLowerCase()):L})},E=function($){return S($,function(L){return d.test(L)?"xn--"+P(L):L})},Q={version:"2.1.0",ucs2:{decode:_,encode:x},decode:k,encode:P,toASCII:E,toUnicode:T};e.exports=Q}}),nj=Me({"node_modules/markdown-it/lib/presets/default.js"(t,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:{}}}}}),rj=Me({"node_modules/markdown-it/lib/presets/zero.js"(t,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"]}}}}}),ij=Me({"node_modules/markdown-it/lib/presets/commonmark.js"(t,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"]}}}}}),xC=Me({"node_modules/markdown-it/lib/index.js"(t,e){var n=Xt(),r=gB(),i=vB(),s=SB(),o=IB(),a=KB(),l=ej(),c=bC(),u=tj(),f={default:nj(),zero:rj(),commonmark:ij()},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function m(w){var S=w.trim().toLowerCase();return d.test(S)?!!h.test(S):!0}var p=["http:","https:","mailto:"];function v(w){var S=c.parse(w,!0);if(S.hostname&&(!S.protocol||p.indexOf(S.protocol)>=0))try{S.hostname=u.toASCII(S.hostname)}catch{}return c.encode(c.format(S))}function O(w){var S=c.parse(w,!0);if(S.hostname&&(!S.protocol||p.indexOf(S.protocol)>=0))try{S.hostname=u.toUnicode(S.hostname)}catch{}return c.decode(c.format(S),c.decode.defaultChars+"%")}function b(w,S){if(!(this instanceof b))return new b(w,S);S||n.isString(w)||(S=w||{},w="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=v,this.normalizeLinkText=O,this.utils=n,this.helpers=n.assign({},r),this.options={},this.configure(w),S&&this.set(S)}b.prototype.set=function(w){return n.assign(this.options,w),this},b.prototype.configure=function(w){var S=this,_;if(n.isString(w)&&(_=w,w=f[_],!w))throw new Error('Wrong `markdown-it` preset "'+_+'", check name');if(!w)throw new Error("Wrong `markdown-it` preset, can't be empty");return w.options&&S.set(w.options),w.components&&Object.keys(w.components).forEach(function(x){w.components[x].rules&&S[x].ruler.enableOnly(w.components[x].rules),w.components[x].rules2&&S[x].ruler2.enableOnly(w.components[x].rules2)}),this},b.prototype.enable=function(w,S){var _=[];Array.isArray(w)||(w=[w]),["core","block","inline"].forEach(function(C){_=_.concat(this[C].ruler.enable(w,!0))},this),_=_.concat(this.inline.ruler2.enable(w,!0));var x=w.filter(function(C){return _.indexOf(C)<0});if(x.length&&!S)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+x);return this},b.prototype.disable=function(w,S){var _=[];Array.isArray(w)||(w=[w]),["core","block","inline"].forEach(function(C){_=_.concat(this[C].ruler.disable(w,!0))},this),_=_.concat(this.inline.ruler2.disable(w,!0));var x=w.filter(function(C){return _.indexOf(C)<0});if(x.length&&!S)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+x);return this},b.prototype.use=function(w){var S=[this].concat(Array.prototype.slice.call(arguments,1));return w.apply(w,S),this},b.prototype.parse=function(w,S){if(typeof w!="string")throw new Error("Input data should be a String");var _=new this.core.State(w,this,S);return this.core.process(_),_.tokens},b.prototype.render=function(w,S){return S=S||{},this.renderer.render(this.parse(w,S),this.options,S)},b.prototype.parseInline=function(w,S){var _=new this.core.State(w,this,S);return _.inlineMode=!0,this.core.process(_),_.tokens},b.prototype.renderInline=function(w,S){return S=S||{},this.renderer.render(this.parseInline(w,S),this.options,S)},e.exports=b}}),sj=Me({"node_modules/markdown-it/index.js"(t,e){e.exports=xC()}}),SC={};gC(SC,{getAstValues:()=>_g,isAst:()=>HO,isFunction:()=>oj,isVariable:()=>aj,resolve:()=>Zc});function HO(t){return!!t?.$$mdtype}function oj(t){return t?.$$mdtype==="Function"}function aj(t){return t?.$$mdtype==="Variable"}function*_g(t){if(!(t==null||typeof t!="object")){if(Array.isArray(t))for(const e of t)yield*_g(e);if(HO(t)&&(yield t),Object.getPrototypeOf(t)===Object.prototype)for(const e of Object.values(t))yield*_g(e)}}function Zc(t,e={}){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>Zc(r,e));if(HO(t)&&t?.resolve instanceof Function)return t.resolve(e);if(Object.getPrototypeOf(t)!==Object.prototype)return t;const n={};for(const[r,i]of Object.entries(t))n[r]=Zc(i,e);return n}var Ei=class{constructor(e="div",n={},r=[]){this.$$mdtype="Tag",this.name=e,this.attributes=n,this.children=r}};Ei.isTag=t=>t?.$$mdtype==="Tag";var lj=class{validate(t,e,n){return typeof t=="string"||typeof t=="object"?[]:[{id:"attribute-type-invalid",level:"error",message:`Attribute '${n}' must be type 'string | object'`}]}transform(t){if(!t||typeof t=="string")return t;const e=[];for(const[n,r]of Object.entries(t??{}))r&&e.push(n);return e.join(" ")}},cj=class{validate(t){return typeof t=="string"&&t.match(/^[a-zA-Z]/)?[]:[{id:"attribute-value-invalid",level:"error",message:"The 'id' attribute must start with a letter"}]}},T0=ph(vC()),mh=class{constructor(t=[]){this.$$mdtype="Variable",this.path=t}resolve({variables:t}={}){return t instanceof Function?t(this.path):this.path.reduce((e={},n)=>e[n],t)}},gh=class{constructor(t,e){this.$$mdtype="Function",this.name=t,this.parameters=e}resolve(t={}){const e=t?.functions?.[this.name];if(!e)return null;const n=Zc(this.parameters,t);return e.transform?.(n,t)}},P0;(function(t){t[t.normal=0]="normal",t[t.string=1]="string",t[t.escape=2]="escape"})(P0||(P0={}));var pr="{%",Ki="%}",uj=/^[a-zA-Z0-9_-]+$/;function yd(t){return typeof t=="string"&&uj.test(t)}function Io(t){return t&&typeof t=="object"&&typeof t.then=="function"}function vh(t,e=0){let n=0;for(let r=e;r<t.length;r++){const i=t[r];switch(n){case 1:switch(i){case'"':n=0;break;case"\\":n=2;break}break;case 2:n=1;break;case 0:if(i==='"')n=1;else if(t.startsWith(Ki,r))return r}}return null}function fj(t,e,n){try{return(0,T0.parse)(t,{Variable:mh,Function:gh})}catch(r){if(!(r instanceof T0.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a={start:{line:e,character:s.offset+n},end:{line:e+1,character:o.offset+n}};return{type:"error",meta:{error:{message:i,location:a}}}}}function AC(t,e=0){let n=e+1;const r=[];let i=0;for(let s=0;s<t.length;s++){if(t[s]===`
263
+ `){n++;continue}if(!t.startsWith(pr,s))continue;const o=vh(t,s);if(o==null){s=s+pr.length;continue}const a=t.slice(s,o+Ki.length),l=t.slice(s+pr.length,o),c=t.lastIndexOf(`
264
+ `,s),u=t.indexOf(`
265
+ `,o),f=t.slice(c,u),d=fj(l.trim(),n,s-c),h=f.trim()===a?c:s,m=t.slice(i,h);r.push({type:"text",start:i,end:s-1,content:m}),r.push({map:[n,n+1],position:{start:s-c,end:s-c+a.length},start:s,end:s+a.length-1,info:a,...d}),i=o+Ki.length,s=i-1}return r.push({type:"text",start:i,end:t.length-1,content:t.slice(i)}),r}var KO={class:{type:lj,render:!0},id:{type:cj,render:!0}},tc={findSchema(t,{nodes:e={},tags:n={}}={}){return t.tag?n[t.tag]:e[t.type]},attributes(t,e={}){const n=this.findSchema(t,e)??{},r={},i={...KO,...n.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=t.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(n.slots)for(const[s,o]of Object.entries(n.slots)){if(o.render===!1)continue;const a=typeof o.render=="string"?o.render:s;t.slots[s]&&(r[a]=this.node(t.slots[s],e))}return r},children(t,e={}){const n=t.children.flatMap(r=>this.node(r,e));return n.some(Io)?Promise.all(n):n},node(t,e={}){const n=this.findSchema(t,e)??{};if(n&&n.transform instanceof Function)return n.transform(t,e);const r=this.children(t,e);if(!n||!n.render)return r;const i=this.attributes(t,e);return Io(i)||Io(r)?Promise.all([i,r]).then(s=>new Ei(n.render,...s)):new Ei(n.render,i,r)}},Oh=class{constructor(e="node",n={},r=[],i){this.$$mdtype="Node",this.errors=[],this.lines=[],this.inline=!1,this.attributes=n,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 Oh,this,{children:this.children.map(n=>n.resolve(e)),attributes:Zc(this.attributes,e),slots:Object.fromEntries(Object.entries(this.slots).map(([n,r])=>[n,r.resolve(e)]))})}findSchema(e={}){return tc.findSchema(this,e)}transformAttributes(e={}){return tc.attributes(this,e)}transformChildren(e){return tc.children(this,e)}transform(e){return tc.node(this,e)}},CC={Function:gh,Node:Oh,Variable:mh};function dj(t,e){if(!e)return e;const n=CC[e.$$mdtype];return n?Object.assign(new n,e):e}function hj(t){return JSON.parse(t,dj)}var Lr={...CC,...SC,fromJSON:hj},Rn=" ",kg=", ",Dt=`
266
+ `,pj=".",E0="-",mj=80,gj=["strong","em","s"],vj=(t,e)=>Math.max(t,e),Sp=(t,e=2)=>({...t,indent:(t.indent||0)+e});function*yr(t,e){for(const n of t.children)yield*fs(n,e)}function*Uu(t){yield[...t].join("").trim()}function*Ap(t){yield`| ${t.join(" | ")} |`}function wd(t){if(t!==void 0)return Lr.isAst(t)?_d(t):t===null?"null":Array.isArray(t)?"["+t.map(wd).join(kg)+"]":typeof t=="object"?"{"+Object.entries(t).map(([e,n])=>`${yd(e)?e:`"${e}"`}: ${wd(n)}`).join(kg)+"}":JSON.stringify(t)}function xg(t){const e=wd(t.value);if(e!==void 0)return t.name==="primary"?e:t.name==="id"&&typeof t.value=="string"&&yd(t.value)?"#"+t.value:t.type==="class"&&yd(t.name)?"."+t.name:`${t.name}=${e}`}function*Oj(t){for(const[e,n]of Object.entries(t.attributes))if(e==="class"&&typeof n=="object"&&!Lr.isAst(n))for(const r of Object.keys(n))yield xg({type:"class",name:r,value:n});else yield xg({type:"attribute",name:e,value:n})}function*Nl(t){t.annotations.length&&(yield pr+Rn,yield t.annotations.map(xg).join(Rn),yield Rn+Ki)}function*bj(t){yield"$",yield t.path.map((e,n)=>n===0?e:yd(e)?"."+e:typeof e=="number"?`[${e}]`:`["${e}"]`).join("")}function*yj(t){yield t.name,yield"(",yield Object.values(t.parameters).map(wd).join(kg),yield")"}function*$0(t){let e;do{const{value:n,done:r}=t.next();if(r)return;e=n.trimStart()}while(!e.length);yield e,yield*t}function*Gu(t,e){yield t.replace(e,"\\$&").replace(new RegExp(" ","g"),"&nbsp;")}function*wj(t,e={}){const n={...e,parent:t},r=Rn.repeat(n.indent||0);switch(t.type){case"document":{t.attributes.frontmatter&&t.attributes.frontmatter.length&&(yield"---"+Dt+t.attributes.frontmatter+Dt+"---"+Dt+Dt),yield*$0(yr(t,n));break}case"heading":{yield Dt,yield r,yield"#".repeat(t.attributes.level||1),yield Rn,yield*$0(yr(t,n)),yield*Nl(t),yield Dt;break}case"paragraph":{yield Dt,yield*yr(t,n),yield*Nl(t),yield Dt;break}case"inline":{yield r,yield*yr(t,n);break}case"image":{yield"!",yield"[",yield*fs(t.attributes.alt,n),yield"]",yield"(",yield*typeof t.attributes.src=="string"?Gu(t.attributes.src,/[()]/):fs(t.attributes.src,n),t.attributes.title&&(yield Rn+`"${t.attributes.title}"`),yield")";break}case"link":{yield"[",yield*yr(t,n),yield"]",yield"(",yield*typeof t.attributes.href=="string"?Gu(t.attributes.href,/[()]/g):fs(t.attributes.href,n),t.attributes.title&&(yield Rn+`"${t.attributes.title}"`),yield")";break}case"text":{const{content:i}=t.attributes;Lr.isAst(i)?(yield pr+Rn,yield*fs(i,n),yield Rn+Ki):e.parent&&gj.includes(e.parent.type)?yield*Gu(i,/[*_~]/g):yield*Gu(i,/^[*>#]/);break}case"blockquote":{const i=">"+Rn;yield t.children.map(s=>_d(s,n).trimStart()).map(s=>Dt+r+i+s).join(r+i);break}case"hr":{yield Dt,yield r,yield"---",yield Dt;break}case"fence":{yield Dt,yield r;const s=(t.attributes.content.match(/`{3,}/g)||[]).map(a=>a.length).reduce(vj,0),o="`".repeat(s?s+1:3);yield o,t.attributes.language&&(yield t.attributes.language),t.annotations.length&&(yield Rn),yield*Nl(t),yield Dt,yield r,yield t.attributes.content.split(Dt).join(Dt+r),yield o,yield Dt;break}case"tag":{t.inline||(yield Dt,yield r);const i=pr+Rn,s=[...Oj(t)].filter(c=>c!==void 0),o=[i+t.tag,...s],a=o.join(Rn),l=a.length+i.length*2>(e.maxTagOpeningWidth||mj);yield(!t.inline&&l?o.join(Dt+Rn.repeat(i.length)+r):a)+Rn+(t.children.length?"":"/")+Ki,t.children.length&&(yield*yr(t,n.allowIndentation?Sp(n):n),t.inline||(yield r),yield pr+Rn+"/"+t.tag+Rn+Ki),t.inline||(yield Dt);break}case"list":{const i=t.children.some(s=>s.children.some(o=>o.type==="paragraph"));for(let s=0;s<t.children.length;s++){const o=t.attributes.ordered?`${s===0?t.attributes.start??"1":"1"}${t.attributes.marker??pj}`:t.attributes.marker??E0;let a=_d(t.children[s],Sp(n,o.length+1));(!i||s===t.children.length-1)&&(a=a.trim()),yield Dt+r+o+" "+a}yield Dt;break}case"item":{for(let i=0;i<t.children.length;i++)yield*fs(t.children[i],n),i===0&&(yield*Nl(t));break}case"strong":{yield t.attributes.marker??"**",yield*Uu(yr(t,n)),yield t.attributes.marker??"**";break}case"em":{yield t.attributes.marker??"*",yield*Uu(yr(t,n)),yield t.attributes.marker??"*";break}case"code":{yield"`",yield*Uu(fs(t.attributes.content,n)),yield"`";break}case"s":{yield"~~",yield*Uu(yr(t,n)),yield"~~";break}case"hardbreak":{yield"\\"+Dt,yield r;break}case"softbreak":{yield Dt,yield r;break}case"table":{const i=[...yr(t,Sp(n))];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 Dt,yield o);else{s!==0&&(yield Dt,yield r+"---");for(const a of o)yield Dt+r+E0+" "+a}}yield Dt}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 Dt,yield*Ap(o.map((l,c)=>l+Rn.repeat(s[c]-l.length))),yield Dt,yield*Ap(o.map((l,c)=>"-".repeat(s[c]))),yield Dt;for(const l of a)yield*Ap(l.map((c,u)=>c+Rn.repeat(s[u]-c.length))),yield Dt}break}case"thead":{const[i]=[...yr(t,n)];yield i||[];break}case"tr":{yield[...yr(t,n)];break}case"td":case"th":{yield[...yr(t,n),...Nl(t)].join("").trim();break}case"tbody":{yield*yr(t,n);break}case"comment":{yield"<!-- "+t.attributes.content+` -->
267
+ `;break}}}function*fs(t,e={}){switch(typeof t){case"undefined":break;case"boolean":case"number":case"string":{yield t.toString();break}case"object":{if(t===null)break;if(Array.isArray(t)){for(const n of t)yield*fs(n,e);break}switch(t.$$mdtype){case"Function":{yield*yj(t);break}case"Node":yield*wj(t,e);break;case"Variable":{yield*bj(t);break}default:throw new Error(`Unimplemented: "${t.$$mdtype}"`)}break}}}function _d(t,e){let n="";for(const r of fs(t,e))n+=r;return n.trimStart()}function mu(t){return t!==!1&&t!==void 0&&t!==null}function _j(t){const e=[{condition:t.attributes.primary,children:[]}];for(const n of t.children)n.type==="tag"&&n.tag==="else"?e.push({condition:"primary"in n.attributes?n.attributes.primary:!0,children:[]}):e[e.length-1].children.push(n);return e}var kj={attributes:{primary:{type:Object,render:!1}},transform(t,e){const n=_j(t);for(const{condition:r,children:i}of n)if(mu(r)){const s=i.flatMap(o=>o.transform(e));return s.some(Io)?Promise.all(s).then(o=>o.flat()):s}return[]}},xj={selfClosing:!0,attributes:{primary:{type:Object,render:!1}}},Sj={transform(t){return Object.values(t).every(e=>mu(e))}},Aj={transform(t){return Object.values(t).find(e=>mu(e))!==void 0}},Cj={parameters:{0:{required:!0}},transform(t){return!mu(t[0])}},Tj={transform(t){const e=Object.values(t);return e.every(n=>n===e[0])}},Pj={transform(t){return JSON.stringify(t[0],null,2)}},Ej={transform(t){return t[0]===void 0?t[1]:t[0]}},TC={and:Sj,or:Aj,not:Cj,equals:Tj,default:Ej,debug:Pj};function Cp(t,e="td"){t.type="tr",t.attributes={};for(const n of t.children)n.type=e;return t}function $j(t){for(const e of t.walk()){if(e.type!=="tag"||e.tag!=="table")continue;const[n,...r]=e.children;if(!n||n.type==="table")continue;const i=new Lr.Node("table",e.attributes,[new Lr.Node("thead"),new Lr.Node("tbody")]),[s,o]=i.children;n.type==="list"&&s.push(Cp(n,"th"));for(const a of r){if(a.type==="list")Cp(a);else if(a.type==="tag"&&a.tag==="if"){const l=[];for(const c of a.children)c.type!=="hr"&&(c.type==="list"&&Cp(c),l.push(c));a.children=l}else continue;o.push(a)}e.children=[i]}}var PC=[$j],Q0={ordered_list:"list",bullet_list:"list",code_inline:"code",list_item:"item",variable:"text"};function L0(t,e){for(const n of e){t.annotations.push(n);const{name:r,value:i,type:s}=n;s==="attribute"?(t.attributes[r]!==void 0&&t.errors.push({id:"duplicate-attribute",level:"warning",message:`Attribute '${r}' already set`}),t.attributes[r]=i):s==="class"&&(t.attributes.class?t.attributes.class[r]=i:t.attributes.class={[r]:i})}}function Qj(t,e){switch(e){case"heading":return{level:Number(t.tag.replace("h",""))};case"list":{const n=t.attrs?Object.fromEntries(t.attrs):void 0,r=t.type.startsWith("ordered");return r&&n?.start?{ordered:!0,start:n.start,marker:t.markup}:{ordered:r,marker:t.markup}}case"link":{const n=Object.fromEntries(t.attrs);return n.title?{href:n.href,title:n.title}:{href:n.href}}case"image":{const n=Object.fromEntries(t.attrs);return n.title?{alt:t.content,src:n.src,title:n.title}:{alt:t.content,src:n.src}}case"em":case"strong":return{marker:t.markup};case"text":case"code":case"comment":return{content:(t.meta||{}).variable||t.content};case"fence":{const[n]=t.info.split(" ",1);return n===""||n===pr?{content:t.content}:{content:t.content,language:n}}case"td":case"th":{if(t.attrs){const n=Object.fromEntries(t.attrs);let r;if(n.style&&(n.style.includes("left")?r="left":n.style.includes("center")?r="center":n.style.includes("right")&&(r="right")),r)return{align:r}}return{}}default:return{}}}function EC(t,e,n,r,i,s){if(t.type==="frontmatter"){e[0].attributes.frontmatter=t.content;return}if(t.hidden||t.type==="text"&&t.content==="")return;const o=t.errors||[],a=e[e.length-1],{tag:l,attributes:c,error:u}=t.meta||{};if(t.type==="annotation")return s?L0(s,c):a.errors.push({id:"no-inline-annotations",level:"error",message:`Can't apply inline annotations to '${a.type}'`});let f=t.type.replace(/_(open|close)$/,"");if(Q0[f]&&(f=Q0[f]),f==="error"){const{message:v,location:O}=u;o.push({id:"parse-error",level:"critical",message:v,location:O})}if(t.nesting<0){if(a.type===f&&a.tag===l)return a.lines&&t.map&&a.lines.push(...t.map),e.pop();o.push({id:"missing-opening",level:"critical",message:`Node '${f}' is missing opening`})}const d=Qj(t,f),h=new Oh(f,d,void 0,l||void 0),{position:m={}}=t;if(h.errors=o,i!==!1&&(h.lines=t.map||a.lines||[],h.location={file:n,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)&&L0(h,c),r&&l==="slot"&&typeof h.attributes.primary=="string"?a.slots[h.attributes.primary]=h:a.push(h),t.nesting>0&&e.push(h),!Array.isArray(t.children))return;if(h.type==="inline"&&(s=a),e.push(h),!(f==="image"))for(const v of t.children)EC(v,e,n,r,i,s);e.pop()}function Lj(t,e){const n=new Oh("document"),r=[n];typeof e=="string"&&(e={file:e});for(const i of t)EC(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 PC)i(n);return n}var JO={};gC(JO,{blockquote:()=>Ij,code:()=>ez,comment:()=>iz,document:()=>Mj,em:()=>Gj,error:()=>sz,fence:()=>Nj,hardbreak:()=>nz,heading:()=>qj,hr:()=>zj,image:()=>Dj,inline:()=>Kj,item:()=>Bj,link:()=>Jj,list:()=>jj,node:()=>oz,paragraph:()=>Rj,s:()=>Hj,softbreak:()=>rz,strong:()=>Uj,table:()=>Zj,tbody:()=>Wj,td:()=>Fj,text:()=>tz,th:()=>Xj,thead:()=>Yj,tr:()=>Vj});var Mj={render:"article",children:["heading","paragraph","image","table","tag","fence","blockquote","comment","list","hr"],attributes:{frontmatter:{render:!1}}},qj={children:["inline"],attributes:{level:{type:Number,render:!1,required:!0}},transform(t,e){return new Ei(`h${t.attributes.level}`,t.transformAttributes(e),t.transformChildren(e))}},Rj={render:"p",children:["inline"]},Dj={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String}}},Nj={render:"pre",attributes:{content:{type:String,render:!1,required:!0},language:{type:String,render:"data-language"},process:{type:Boolean,render:!1,default:!0}},transform(t,e){const n=t.transformAttributes(e),r=t.children.length?t.transformChildren(e):[t.attributes.content];return new Ei("pre",n,r)}},Ij={render:"blockquote",children:["heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},Bj={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},jj={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(t,e){return new Ei(t.attributes.ordered?"ol":"ul",t.transformAttributes(e),t.transformChildren(e))}},zj={render:"hr"},Zj={render:"table"},Fj={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"}}},Xj={render:"th",attributes:{width:{type:String},align:{type:String},colspan:{type:Number,render:"colSpan"},rowspan:{type:Number,render:"rowSpan"}}},Vj={render:"tr",children:["th","td"]},Wj={render:"tbody",children:["tr","tag"]},Yj={render:"thead",children:["tr"]},Uj={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},Gj={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},Hj={render:"s",children:["strong","em","link","code","text","tag"]},Kj={children:["strong","em","s","code","text","tag","link","image","hardbreak","softbreak","comment"]},Jj={render:"a",children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}}},ez={render:"code",attributes:{content:{type:String,render:!1,required:!0}},transform(t,e){const n=t.transformAttributes(e);return new Ei("code",n,[t.attributes.content])}},tz={attributes:{content:{type:String,required:!0}},transform(t){return t.attributes.content}},nz={render:"br"},rz={transform(){return" "}},iz={attributes:{content:{type:String,required:!0}}},sz={},oz={},az=ph(sj()),{escapeHtml:M0}=(0,az.default)().utils,lz=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Cf(t){if(typeof t=="string"||typeof t=="number")return M0(String(t));if(Array.isArray(t))return t.map(Cf).join("");if(t===null||typeof t!="object"||!Ei.isTag(t))return"";const{name:e,attributes:n,children:r=[]}=t;if(!e)return Cf(r);let i=`<${e}`;for(const[s,o]of Object.entries(n??{}))i+=` ${s.toLowerCase()}="${M0(String(o))}"`;return i+=">",lz.has(e)||(r.length&&(i+=Cf(r)),i+=`</${e}>`),i}function cz(t,e){return typeof t!="string"||t[0]!==t[0].toUpperCase()?t:e instanceof Function?e(t):e[t]}function uz(t,e,{components:n={}}={}){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"||!Ei.isTag(s))return s;const{name:o,attributes:{class:a,...l}={},children:c=[]}=s;return a&&(l.className=a),e.createElement(cz(o,n),Object.keys(l).length==0?null:r(l),...c.map(i))}return i(t)}function fz(t,e){return typeof t!="string"?"Fragment":t[0]!==t[0].toUpperCase()?t:e instanceof Function?e(t):e[t]}function q0(t){return t.map(eb).join(", ")}function Sg(t){return t==null||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(n=>Sg(n)).join(", ")}]`:t.$$mdtype==="Tag"?eb(t):typeof t!="object"?JSON.stringify(t):`{${Object.entries(t).map(([n,r])=>[JSON.stringify(n),Sg(r)].join(": ")).join(", ")}}`}function eb(t){if(Array.isArray(t))return`React.createElement(React.Fragment, null, ${q0(t)})`;if(t===null||typeof t!="object"||!Ei.isTag(t))return JSON.stringify(t);const{name:e,attributes:{class:n,...r}={},children:i=[]}=t;return n&&(r.className=n),`React.createElement(
268
+ tagName(${JSON.stringify(e)}, components),
269
+ ${Object.keys(r).length==0?"null":Sg(r)},
270
+ ${q0(i)})`}function dz(t){return`
271
+ (({components = {}} = {}) => {
272
+ ${fz}
273
+ return ${eb(t)};
274
+ })
275
+ `}var hz={html:Cf,react:uz,reactStatic:dz},pz=class{validate(t,e){const{partials:n={}}=e;return n[t]?[]:[{id:"attribute-value-invalid",level:"error",message:`Partial \`${t}\` not found. The 'file' attribute must be set in \`config.partials\``}]}},mz={inline:!1,selfClosing:!0,attributes:{file:{type:pz,render:!1,required:!0},variables:{type:Object,render:!1}},transform(t,e){const{partials:n={}}=e,{file:r,variables:i}=t.attributes,s=n[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)}},gz={children:["table"],inline:!1},vz={attributes:{primary:{type:String,required:!0}}},$C={else:xj,if:kj,partial:mz,slot:vz,table:gz},Oz=ph(xC()),kd=ph(vC());function QC(t,e,n){try{const{type:r,meta:i,nesting:s=0}=(0,kd.parse)(e,{Variable:mh,Function:gh}),o=t.push(r,"",s);return o.info=e,o.meta=i,t.delimiters||(t.delimiters=[]),o}catch(r){if(!(r instanceof kd.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a=n?{start:{offset:s.offset+n},end:{offset:o.offset+n}}:null,l=t.push("error","",0);return l.meta={error:{message:i,location:a}},l}}function bz(t,e,n,r){const i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(!t.src.startsWith(pr,i))return!1;const o=vh(t.src,i),a=t.src.slice(0,s).trim().length;if(!o||o<a-Ki.length)return!1;const l=i+pr.length,c=t.src.slice(l,o).trim(),u=t.src.slice(i,o+Ki.length).split(`
276
+ `).length;if(c[0]==="$")return!1;if(r)return!0;const f=QC(t,c,l);return f.map=[e,e+u],t.line+=u,!0}function yz(t,e){if(!t.src.startsWith(pr,t.pos))return!1;const n=vh(t.src,t.pos);if(!n)return!1;const r=t.src.slice(t.pos+pr.length,n);return e||QC(t,r.trim()),t.pos=n+Ki.length,!0}function wz(t){let e;for(e of t.tokens)if(e.type==="fence"){if(e.info.includes(pr)){const n=e.info.indexOf(pr),r=vh(e.info,n),i=e.info.slice(n+pr.length,r);try{const{meta:s}=(0,kd.parse)(i.trim(),{Variable:mh,Function:gh});e.meta=s}catch(s){if(!(s instanceof kd.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(n=>n.name==="process"&&!n.value)||(e.children=AC(e.content,e.map[0]))}}function _z(t){t.block.ruler.before("paragraph","annotations",bz,{alt:["paragraph","blockquote"]}),t.inline.ruler.push("containers",yz),t.core.ruler.push("annotations",wz)}var LC="---";function MC(t,e){return t.src.slice(t.bMarks[e],t.eMarks[e]).trim()}function kz(t,e){for(let n=1;n<e;n++)if(MC(t,n)===LC)return n}function xz(t,e,n,r){if(e!=0||MC(t,0)!=LC)return!1;const i=kz(t,n);if(!i)return!1;if(r)return!0;const s=t.push("frontmatter","",0);return s.content=t.src.slice(t.eMarks[0],t.bMarks[i]).trim(),s.map=[0,i],s.hidden=!0,t.line=i+1,!0}function Sz(t){t.block.ruler.before("hr","frontmatter",xz)}var xd="<!--",Ag="-->";function Az(t,e,n,r){const i=t.bMarks[e]+t.tShift[e];if(!t.src.startsWith(xd,i))return!1;const s=t.src.indexOf(Ag,i);if(!s)return!1;if(r)return!0;const o=t.src.slice(i+xd.length,s),a=o.split(`
277
+ `).length,l=t.push("comment","",0);return l.content=o.trim(),l.map=[e,e+a],t.line+=a,!0}function Cz(t,e){if(!t.src.startsWith(xd,t.pos))return!1;const n=t.src.indexOf(Ag,t.pos);if(!n)return!1;if(e)return!0;const r=t.src.slice(t.pos+xd.length,n),i=t.push("comment","",0);return i.content=r.trim(),t.pos=n+Ag.length,!0}function Tz(t){t.block.ruler.before("table","comment",Az,{alt:["paragraph"]}),t.inline.ruler.push("comment",Cz)}var qC=class{constructor(t={}){this.parser=new Oz.default(t),this.parser.use(_z,"annotations",{}),this.parser.use(Sz,"frontmatter",{}),this.parser.disable(["lheading","code"]),t.allowComments&&this.parser.use(Tz,"comments",{})}tokenize(t){return this.parser.parse(t.toString(),{})}},Pz={String,Number,Array,Object,Boolean};function tb(t,e,n,r){if(!t)return!0;if(Lr.isFunction(e)&&n.validation?.validateFunctions){const i=n.functions?.[e.name];return i?.returns?Array.isArray(i.returns)?i.returns.find(s=>s===t)!==void 0:i.returns===t:!0}if(Lr.isAst(e))return!0;if(Array.isArray(t))return t.some(i=>tb(i,e,n,r));if(typeof t=="string"&&(t=Pz[t]),typeof t=="function"){const i=new t;if(i.validate)return i.validate(e,n,r)}return e!=null&&e.constructor===t}function nb(t){return typeof t=="string"?t:Array.isArray(t)?t.map(nb).join(" | "):t.name}function Ez(t,e){const n=e.functions?.[t.name],r=[];if(!n)return[{id:"function-undefined",level:"critical",message:`Undefined function: '${t.name}'`}];if(n.validate&&r.push(...n.validate(t,e)),n.parameters)for(const[i,s]of Object.entries(t.parameters)){const o=n.parameters?.[i];if(!o){r.push({id:"parameter-undefined",level:"error",message:`Invalid parameter: '${i}'`});continue}if(!(Lr.isAst(s)&&!Lr.isFunction(s))&&o.type){const a=tb(o.type,s,e,i);a===!1?r.push({id:"parameter-type-invalid",level:"error",message:`Parameter '${i}' of '${t.name}' must be type of '${nb(o.type)}'`}):Array.isArray(a)&&r.push(...a)}}for(const[i,{required:s}]of Object.entries(n.parameters??{}))s&&t.parameters[i]===void 0&&r.push({id:"parameter-missing-required",level:"error",message:`Missing required parameter: '${i}'`});return r}function $z(t,e){return t.length<=e?JSON.stringify(t):`[${t.slice(0,e).map(r=>JSON.stringify(r)).join(",")}, ... ${t.length-e} more]`}function RC(t,e){const n=t.findSchema(e),r=[...t.errors||[]];if(!n)return r.push({id:t.tag?"tag-undefined":"node-undefined",level:"critical",message:t.tag?`Undefined tag: '${t.tag}'`:`Undefined node: '${t.type}'`}),r;n.inline!=null&&t.inline!==n.inline&&r.push({id:"tag-placement-invalid",level:"critical",message:`'${t.tag}' tag should be ${n.inline?"inline":"block"}`}),n.selfClosing&&t.children.length>0&&r.push({id:"tag-selfclosing-has-children",level:"critical",message:`'${t.tag}' tag should be self-closing`});const i={...KO,...n.attributes};for(const s of Object.keys(t.slots))n.slots?.[s]||r.push({id:"slot-undefined",level:"error",message:`Invalid slot: '${s}'`});for(let[s,o]of Object.entries(t.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(Lr.isAst(o))if(Lr.isFunction(o)&&e.validation?.validateFunctions)r.push(...Ez(o,e));else if(Lr.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=tb(l,o,e,s);f===!1&&r.push({id:"attribute-type-invalid",level:u||"error",message:`Attribute '${s}' must be type of '${nb(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 ${$z(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&&t.attributes[s]===void 0&&r.push({id:"attribute-missing-required",level:"error",message:`Missing required attribute: '${s}'`});if(n.slots)for(const[s,{required:o}]of Object.entries(n.slots))o&&t.slots[s]===void 0&&r.push({id:"slot-missing-required",level:"error",message:`Missing required slot: '${s}'`});for(const{type:s}of t.children)n.children&&s!=="error"&&!n.children.includes(s)&&r.push({id:"child-invalid",level:"warning",message:`Can't nest '${s}' in '${t.tag||t.type}'`});if(n.validate){const s=n.validate(t,e);if(Io(s))return s.then(o=>r.concat(o));r.push(...s)}return r}function*DC(t,e=[]){yield[t,e];for(const n of[...Object.values(t.slots),...t.children])yield*DC(n,[...e,t])}function Qz(t,e){const n=[...DC(t)].map(([r,i])=>{const{type:s,lines:o,location:a}=r,l={...e,validation:{...e.validation,parents:i}},c=RC(r,l);return Io(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 n.some(Io)?Promise.all(n).then(r=>r.flat()):n.flat()}var Lz=new qC;function NC(t={}){return{...t,tags:{...$C,...t.tags},nodes:{...JO,...t.nodes},functions:{...TC,...t.functions}}}function IC(t,e){return typeof t=="string"&&(t=Lz.tokenize(t)),Lj(t,e)}function BC(t,e){return Array.isArray(t)?t.flatMap(n=>n.resolve(e)):t.resolve(e)}function jC(t,e){const n=NC(e),r=BC(t,n);return Array.isArray(r)?r.flatMap(i=>i.transform(n)):r.transform(n)}function zC(t,e){const n=NC(e);return Qz(t,n)}function Mz(t,e={},...n){return{name:t,attributes:e,children:n}}var B=class{constructor(t){this.parse=IC,this.resolve=e=>BC(e,this.config),this.transform=e=>jC(e,this.config),this.validate=e=>zC(e,this.config),this.config=t}};B.nodes=JO;B.tags=$C;B.functions=TC;B.globalAttributes=KO;B.renderers=hz;B.transforms=PC;B.Ast=Lr;B.Tag=Ei;B.Tokenizer=qC;B.parseTags=AC;B.transformer=tc;B.validator=RC;B.parse=IC;B.transform=jC;B.validate=zC;B.createElement=Mz;B.truthy=mu;B.format=_d;function qz(t){if(!t)return"";const n=B.parse(t);if(!n.children?.length)return Sd(t);const r=n.children[0];return r?.children?.length?ba(r.children):Sd(t)}function ba(t){return t.map(Rz).join("")}function Rz(t){switch(t.type){case"text":return Sd(t.attributes.content??"");case"strong":return`<strong>${ba(t.children)}</strong>`;case"em":return`<em>${ba(t.children)}</em>`;case"s":return`<s>${ba(t.children)}</s>`;case"code":return`<code>${Sd(t.attributes.content??"")}</code>`;case"link":{const e=t.attributes.href??"",n=t.attributes.title,r=n?` title="${R0(n)}"`:"";return`<a href="${R0(e)}"${r}>${ba(t.children)}</a>`}case"hardbreak":return" ";case"softbreak":return" ";default:return t.children?.length?ba(t.children):""}}function Dz(t){return wo(t.childNodes)}function wo(t){const e=[];for(const n of t)e.push(Bz(n));return e.join("")}const Nz=3,Iz=1;function Bz(t){if(t.nodeType===Nz)return jz(t.textContent??"");if(t.nodeType!==Iz)return"";const e=t;switch(e.tagName){case"STRONG":case"B":return`**${wo(e.childNodes)}**`;case"EM":case"I":return`*${wo(e.childNodes)}*`;case"S":case"STRIKE":case"DEL":return`~~${wo(e.childNodes)}~~`;case"CODE":return`\`${e.textContent??""}\``;case"A":{const r=e.getAttribute("href")??"";return`[${wo(e.childNodes)}](${r})`}case"BR":return" ";case"DIV":case"P":case"SPAN":return wo(e.childNodes);default:return wo(e.childNodes)}}function Si(t){return t.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 Sd(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function R0(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function jz(t){return t.replace(/([\\*_`~\[\]])/g,"\\$1")}function D0(t){for(const e of Array.from(t.querySelectorAll("b"))){const n=document.createElement("strong");n.innerHTML=e.innerHTML,e.replaceWith(n)}for(const e of Array.from(t.querySelectorAll("i"))){const n=document.createElement("em");n.innerHTML=e.innerHTML,e.replaceWith(n)}for(const e of Array.from(t.querySelectorAll("span[style]"))){const n=e.style,r=e.parentNode;if(r)if(n.fontWeight==="bold"||parseInt(n.fontWeight)>=700){const i=document.createElement("strong");i.innerHTML=e.innerHTML,e.replaceWith(i)}else if(n.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(t.querySelectorAll("div, p"))){const n=e.parentNode;if(!(!n||e===t)){for(e.previousSibling&&n.insertBefore(document.createTextNode(" "),e);e.firstChild;)n.insertBefore(e.firstChild,e);e.remove()}}}function zz(t){const e=t.trim(),n=e.match(/^(#{1,6}\s+)(.*)/);if(n)return{text:n[2],prefix:n[1]};const r=e.match(/^(>\s*)(.*)/);return r?{text:r[2],prefix:r[1]}:{text:e,prefix:""}}function Ji(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function ZC(t,e,n){const r=XO(t),i=Ji(n);for(const s of r){const{text:o,prefix:a}=zz(s.source),l=Si(o);if(Ji(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=Si(c);if(Ji(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=Fz(s.source,e,i);if(o)return o}for(const s of r)if(s.children){const o=ZC(s.innerContent??"",e,n);if(o)return o}return null}function Zz(t){const e=t.split(`
279
+ `),n=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(n.push(r.join(`
280
+ `)),r=[i]):r.push(i);return r.length>0&&n.push(r.join(`
281
+ `)),n}function Fz(t,e,n){const r=Zz(t);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=Si(u);if(Ji(f)===n)return{dataName:e,text:f,source:o,sourcePrefix:c,inlineSource:u}}const l=o.match(/^([-*+]\s+.*?)\*\*(.+?)\*\*(.*)/);if(l){const[,c,u]=l;if(Ji(u)===n)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=Si(u);if(c.length>0&&Ji(f)===n){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]:"",v=h?d.indexOf(h):0,O=d.slice(0,v)+p;return{dataName:e,text:f,source:d,sourcePrefix:O,inlineSource:u}}}}return null}function Xz(t,e,n){const r=e.sourcePrefix+n,i=t.indexOf(e.source);return i===-1?t:t.slice(0,i)+r+t.slice(i+e.source.length)}function Vz(t,e,n){const r=Ji(e),i=t.split(`
284
+ `);for(const s of i){const o=s.match(/^(\s*[-*+]\s+)\[([^\]]*)\]\(([^)]*)\)\s*$/);if(!o)continue;const[,a,l,c]=o;if(Ji(l)===r||c===n)return{source:s,listPrefix:a,text:l,href:c}}return null}function Wz(t,e,n,r){const i=`${e.listPrefix}[${n}](${r})`,s=t.indexOf(e.source);return s===-1?t:t.slice(0,s)+i+t.slice(s+e.source.length)}function Yz(t,e){const n=Ji(e),r=/^((`{3,})(\w*)[^\n]*\n)([\s\S]*?)\n\2\s*$/gm;let i;for(;(i=r.exec(t))!==null;){const[s,o,a,l,c]=i;if(Ji(c)===n)return{source:s,code:c,language:l||"",opener:o.trimEnd(),delimiter:a}}return null}function Uz(t,e,n){const r=e.opener+`
285
+ `+n+`
286
+ `+e.delimiter,i=t.indexOf(e.source);return i===-1?t:t.slice(0,i)+r+t.slice(i+e.source.length)}function Gz(t,e,n){const i=e.opener.slice(e.delimiter.length).replace(/^\w*/,"").trim(),o=e.delimiter+n+(i?" "+i:"")+`
287
+ `+e.code+`
288
+ `+e.delimiter,a=t.indexOf(e.source);return a===-1?t:t.slice(0,a)+o+t.slice(a+e.source.length)}function Hz(t,e){const n=t.split(`
289
+ `);for(const r of n){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 Kz(t,e,n,r){const i=`![${n}](${r})`,s=t.indexOf(e.source);return s===-1?t:t.slice(0,s)+i+t.slice(s+e.source.length)}function Jz(t,e){const n=/\{%\s*icon\s+[^%]*name=["']([^"']+)["'][^%]*\/%\}/g;let r;for(;(r=n.exec(t))!==null;){const[i,s]=r;if(s===e)return{source:i,name:s}}return null}function e8(t,e,n){const r=e.source.replace(/name=["'][^"']+["']/,`name="${n}"`),i=t.indexOf(e.source);return i===-1?t:t.slice(0,i)+r+t.slice(i+e.source.length)}function t8(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tp,N0;function n8(){if(N0)return Tp;N0=1;function t(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 n(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),t(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(t(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 t(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];t(a),a.length>0&&(s===void 0?s=a:s+="/"+a)}return s===void 0?".":r.normalize(s)},relative:function(s,o){if(t(s),t(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 v=s.charCodeAt(a+p),O=o.charCodeAt(u+p);if(v!==O)break;v===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(t(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');t(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){t(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 n("/",s)},parse:function(s){t(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,Tp=r,Tp}var r8=n8();const i8=t8(r8);var Pp={},Ep={},I0;function rb(){return I0||(I0=1,(function(t){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",n=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+e+"]["+n+"]*",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")};t.isExist=function(a){return typeof a<"u"},t.isEmptyObject=function(a){return Object.keys(a).length===0},t.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]]}},t.getValue=function(a){return t.isExist(a)?a:""},t.isName=o,t.getAllMatches=s,t.nameRegexp=r})(Ep)),Ep}var B0;function FC(){if(B0)return Pp;B0=1;const t=rb(),e={allowBooleanAttributes:!1,unpairedTags:[]};Pp.validate=function(O,b){b=Object.assign({},e,b);const w=[];let S=!1,_=!1;O[0]==="\uFEFF"&&(O=O.substr(1));for(let x=0;x<O.length;x++)if(O[x]==="<"&&O[x+1]==="?"){if(x+=2,x=r(O,x),x.err)return x}else if(O[x]==="<"){let C=x;if(x++,O[x]==="!"){x=i(O,x);continue}else{let A=!1;O[x]==="/"&&(A=!0,x++);let y="";for(;x<O.length&&O[x]!==">"&&O[x]!==" "&&O[x]!==" "&&O[x]!==`
290
+ `&&O[x]!=="\r";x++)y+=O[x];if(y=y.trim(),y[y.length-1]==="/"&&(y=y.substring(0,y.length-1),x--),!m(y)){let T;return y.trim().length===0?T="Invalid space after '<'.":T="Tag '"+y+"' is an invalid name.",d("InvalidTag",T,p(O,x))}const k=a(O,x);if(k===!1)return d("InvalidAttr","Attributes for '"+y+"' have open quote.",p(O,x));let P=k.value;if(x=k.index,P[P.length-1]==="/"){const T=x-P.length;P=P.substring(0,P.length-1);const E=c(P,b);if(E===!0)S=!0;else return d(E.err.code,E.err.msg,p(O,T+E.err.line))}else if(A)if(k.tagClosed){if(P.trim().length>0)return d("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",p(O,C));if(w.length===0)return d("InvalidTag","Closing tag '"+y+"' has not been opened.",p(O,C));{const T=w.pop();if(y!==T.tagName){let E=p(O,T.tagStartPos);return d("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+y+"'.",p(O,C))}w.length==0&&(_=!0)}}else return d("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",p(O,x));else{const T=c(P,b);if(T!==!0)return d(T.err.code,T.err.msg,p(O,x-P.length+T.err.line));if(_===!0)return d("InvalidXml","Multiple possible root nodes found.",p(O,x));b.unpairedTags.indexOf(y)!==-1||w.push({tagName:y,tagStartPos:C}),S=!0}for(x++;x<O.length;x++)if(O[x]==="<")if(O[x+1]==="!"){x++,x=i(O,x);continue}else if(O[x+1]==="?"){if(x=r(O,++x),x.err)return x}else break;else if(O[x]==="&"){const T=f(O,x);if(T==-1)return d("InvalidChar","char '&' is not expected.",p(O,x));x=T}else if(_===!0&&!n(O[x]))return d("InvalidXml","Extra text at the end",p(O,x));O[x]==="<"&&x--}}else{if(n(O[x]))continue;return d("InvalidChar","char '"+O[x]+"' is not expected.",p(O,x))}if(S){if(w.length==1)return d("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",p(O,w[0].tagStartPos));if(w.length>0)return d("InvalidXml","Invalid '"+JSON.stringify(w.map(x=>x.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return d("InvalidXml","Start tag expected.",1);return!0};function n(O){return O===" "||O===" "||O===`
291
+ `||O==="\r"}function r(O,b){const w=b;for(;b<O.length;b++)if(O[b]=="?"||O[b]==" "){const S=O.substr(w,b-w);if(b>5&&S==="xml")return d("InvalidXml","XML declaration allowed only at the start of the document.",p(O,b));if(O[b]=="?"&&O[b+1]==">"){b++;break}else continue}return b}function i(O,b){if(O.length>b+5&&O[b+1]==="-"&&O[b+2]==="-"){for(b+=3;b<O.length;b++)if(O[b]==="-"&&O[b+1]==="-"&&O[b+2]===">"){b+=2;break}}else if(O.length>b+8&&O[b+1]==="D"&&O[b+2]==="O"&&O[b+3]==="C"&&O[b+4]==="T"&&O[b+5]==="Y"&&O[b+6]==="P"&&O[b+7]==="E"){let w=1;for(b+=8;b<O.length;b++)if(O[b]==="<")w++;else if(O[b]===">"&&(w--,w===0))break}else if(O.length>b+9&&O[b+1]==="["&&O[b+2]==="C"&&O[b+3]==="D"&&O[b+4]==="A"&&O[b+5]==="T"&&O[b+6]==="A"&&O[b+7]==="["){for(b+=8;b<O.length;b++)if(O[b]==="]"&&O[b+1]==="]"&&O[b+2]===">"){b+=2;break}}return b}const s='"',o="'";function a(O,b){let w="",S="",_=!1;for(;b<O.length;b++){if(O[b]===s||O[b]===o)S===""?S=O[b]:S!==O[b]||(S="");else if(O[b]===">"&&S===""){_=!0;break}w+=O[b]}return S!==""?!1:{value:w,index:b,tagClosed:_}}const l=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(O,b){const w=t.getAllMatches(O,l),S={};for(let _=0;_<w.length;_++){if(w[_][1].length===0)return d("InvalidAttr","Attribute '"+w[_][2]+"' has no space in starting.",v(w[_]));if(w[_][3]!==void 0&&w[_][4]===void 0)return d("InvalidAttr","Attribute '"+w[_][2]+"' is without value.",v(w[_]));if(w[_][3]===void 0&&!b.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+w[_][2]+"' is not allowed.",v(w[_]));const x=w[_][2];if(!h(x))return d("InvalidAttr","Attribute '"+x+"' is an invalid name.",v(w[_]));if(!S.hasOwnProperty(x))S[x]=1;else return d("InvalidAttr","Attribute '"+x+"' is repeated.",v(w[_]))}return!0}function u(O,b){let w=/\d/;for(O[b]==="x"&&(b++,w=/[\da-fA-F]/);b<O.length;b++){if(O[b]===";")return b;if(!O[b].match(w))break}return-1}function f(O,b){if(b++,O[b]===";")return-1;if(O[b]==="#")return b++,u(O,b);let w=0;for(;b<O.length;b++,w++)if(!(O[b].match(/\w/)&&w<20)){if(O[b]===";")break;return-1}return b}function d(O,b,w){return{err:{code:O,msg:b,line:w.line||w,col:w.col}}}function h(O){return t.isName(O)}function m(O){return t.isName(O)}function p(O,b){const w=O.substring(0,b).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function v(O){return O.startIndex+O[1].length}return Pp}var Hu={},j0;function s8(){if(j0)return Hu;j0=1;const t={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(n,r){return r},attributeValueProcessor:function(n,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(n,r,i){return n}},e=function(n){return Object.assign({},t,n)};return Hu.buildOptions=e,Hu.defaultOptions=t,Hu}var $p,z0;function o8(){if(z0)return $p;z0=1;class t{constructor(n){this.tagname=n,this.child=[],this[":@"]={}}add(n,r){n==="__proto__"&&(n="#__proto__"),this.child.push({[n]:r})}addChild(n){n.tagname==="__proto__"&&(n.tagname="#__proto__"),n[":@"]&&Object.keys(n[":@"]).length>0?this.child.push({[n.tagname]:n.child,":@":n[":@"]}):this.child.push({[n.tagname]:n.child})}}return $p=t,$p}var Qp,Z0;function a8(){if(Z0)return Qp;Z0=1;const t=rb();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 v,O;[v,O,u]=n(c,u+1),O.indexOf("&")===-1&&(f[l(v)]={regx:RegExp(`&${v};`,"g"),val:O})}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 n(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(t.isName(c))return c;throw new Error(`Invalid entity name ${c}`)}return Qp=e,Qp}var Lp,F0;function l8(){if(F0)return Lp;F0=1;const t=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function r(o,a={}){if(a=Object.assign({},n,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&&t.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 Lp=r,Lp}var Mp,X0;function XC(){if(X0)return Mp;X0=1;function t(e){return typeof e=="function"?e:Array.isArray(e)?n=>{for(const r of e)if(typeof r=="string"&&n===r||r instanceof RegExp&&r.test(n))return!0}:()=>!1}return Mp=t,Mp}var qp,V0;function c8(){if(V0)return qp;V0=1;const t=rb(),e=o8(),n=a8(),r=l8(),i=XC();class s{constructor(x){this.options=x,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:(C,A)=>String.fromCharCode(Number.parseInt(A,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(C,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=w,this.saveTextToParentTag=m,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}function o(_){const x=Object.keys(_);for(let C=0;C<x.length;C++){const A=x[C];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:_[A]}}}function a(_,x,C,A,y,k,P){if(_!==void 0&&(this.options.trimValues&&!A&&(_=_.trim()),_.length>0)){P||(_=this.replaceEntitiesValue(_));const T=this.options.tagValueProcessor(x,_,C,y,k);return T==null?_:typeof T!=typeof _||T!==_?T:this.options.trimValues?S(_,this.options.parseTagValue,this.options.numberParseOptions):_.trim()===_?S(_,this.options.parseTagValue,this.options.numberParseOptions):_}}function l(_){if(this.options.removeNSPrefix){const x=_.split(":"),C=_.charAt(0)==="/"?"/":"";if(x[0]==="xmlns")return"";x.length===2&&(_=C+x[1])}return _}const c=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function u(_,x,C){if(this.options.ignoreAttributes!==!0&&typeof _=="string"){const A=t.getAllMatches(_,c),y=A.length,k={};for(let P=0;P<y;P++){const T=this.resolveNameSpace(A[P][1]);if(this.ignoreAttributesFn(T,x))continue;let E=A[P][4],Q=this.options.attributeNamePrefix+T;if(T.length)if(this.options.transformAttributeName&&(Q=this.options.transformAttributeName(Q)),Q==="__proto__"&&(Q="#__proto__"),E!==void 0){this.options.trimValues&&(E=E.trim()),E=this.replaceEntitiesValue(E);const $=this.options.attributeValueProcessor(T,E,x);$==null?k[Q]=E:typeof $!=typeof E||$!==E?k[Q]=$:k[Q]=S(E,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(k[Q]=!0)}if(!Object.keys(k).length)return;if(this.options.attributesGroupName){const P={};return P[this.options.attributesGroupName]=k,P}return k}}const f=function(_){_=_.replace(/\r\n?/g,`
292
+ `);const x=new e("!xml");let C=x,A="",y="";for(let k=0;k<_.length;k++)if(_[k]==="<")if(_[k+1]==="/"){const T=O(_,">",k,"Closing Tag is not closed.");let E=_.substring(k+2,T).trim();if(this.options.removeNSPrefix){const L=E.indexOf(":");L!==-1&&(E=E.substr(L+1))}this.options.transformTagName&&(E=this.options.transformTagName(E)),C&&(A=this.saveTextToParentTag(A,C,y));const Q=y.substring(y.lastIndexOf(".")+1);if(E&&this.options.unpairedTags.indexOf(E)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${E}>`);let $=0;Q&&this.options.unpairedTags.indexOf(Q)!==-1?($=y.lastIndexOf(".",y.lastIndexOf(".")-1),this.tagsNodeStack.pop()):$=y.lastIndexOf("."),y=y.substring(0,$),C=this.tagsNodeStack.pop(),A="",k=T}else if(_[k+1]==="?"){let T=b(_,k,!1,"?>");if(!T)throw new Error("Pi Tag is not closed.");if(A=this.saveTextToParentTag(A,C,y),!(this.options.ignoreDeclaration&&T.tagName==="?xml"||this.options.ignorePiTags)){const E=new e(T.tagName);E.add(this.options.textNodeName,""),T.tagName!==T.tagExp&&T.attrExpPresent&&(E[":@"]=this.buildAttributesMap(T.tagExp,y,T.tagName)),this.addChild(C,E,y)}k=T.closeIndex+1}else if(_.substr(k+1,3)==="!--"){const T=O(_,"-->",k+4,"Comment is not closed.");if(this.options.commentPropName){const E=_.substring(k+4,T-2);A=this.saveTextToParentTag(A,C,y),C.add(this.options.commentPropName,[{[this.options.textNodeName]:E}])}k=T}else if(_.substr(k+1,2)==="!D"){const T=n(_,k);this.docTypeEntities=T.entities,k=T.i}else if(_.substr(k+1,2)==="!["){const T=O(_,"]]>",k,"CDATA is not closed.")-2,E=_.substring(k+9,T);A=this.saveTextToParentTag(A,C,y);let Q=this.parseTextData(E,C.tagname,y,!0,!1,!0,!0);Q==null&&(Q=""),this.options.cdataPropName?C.add(this.options.cdataPropName,[{[this.options.textNodeName]:E}]):C.add(this.options.textNodeName,Q),k=T+2}else{let T=b(_,k,this.options.removeNSPrefix),E=T.tagName;const Q=T.rawTagName;let $=T.tagExp,L=T.attrExpPresent,N=T.closeIndex;this.options.transformTagName&&(E=this.options.transformTagName(E)),C&&A&&C.tagname!=="!xml"&&(A=this.saveTextToParentTag(A,C,y,!1));const Z=C;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(C=this.tagsNodeStack.pop(),y=y.substring(0,y.lastIndexOf("."))),E!==x.tagname&&(y+=y?"."+E:E),this.isItStopNode(this.options.stopNodes,y,E)){let Y="";if($.length>0&&$.lastIndexOf("/")===$.length-1)E[E.length-1]==="/"?(E=E.substr(0,E.length-1),y=y.substr(0,y.length-1),$=E):$=$.substr(0,$.length-1),k=T.closeIndex;else if(this.options.unpairedTags.indexOf(E)!==-1)k=T.closeIndex;else{const ae=this.readStopNodeData(_,Q,N+1);if(!ae)throw new Error(`Unexpected end of ${Q}`);k=ae.i,Y=ae.tagContent}const ne=new e(E);E!==$&&L&&(ne[":@"]=this.buildAttributesMap($,y,E)),Y&&(Y=this.parseTextData(Y,E,y,!0,L,!0,!0)),y=y.substr(0,y.lastIndexOf(".")),ne.add(this.options.textNodeName,Y),this.addChild(C,ne,y)}else{if($.length>0&&$.lastIndexOf("/")===$.length-1){E[E.length-1]==="/"?(E=E.substr(0,E.length-1),y=y.substr(0,y.length-1),$=E):$=$.substr(0,$.length-1),this.options.transformTagName&&(E=this.options.transformTagName(E));const Y=new e(E);E!==$&&L&&(Y[":@"]=this.buildAttributesMap($,y,E)),this.addChild(C,Y,y),y=y.substr(0,y.lastIndexOf("."))}else{const Y=new e(E);this.tagsNodeStack.push(C),E!==$&&L&&(Y[":@"]=this.buildAttributesMap($,y,E)),this.addChild(C,Y,y),C=Y}A="",k=N}}else A+=_[k];return x.child};function d(_,x,C){const A=this.options.updateTag(x.tagname,C,x[":@"]);A===!1||(typeof A=="string"&&(x.tagname=A),_.addChild(x))}const h=function(_){if(this.options.processEntities){for(let x in this.docTypeEntities){const C=this.docTypeEntities[x];_=_.replace(C.regx,C.val)}for(let x in this.lastEntities){const C=this.lastEntities[x];_=_.replace(C.regex,C.val)}if(this.options.htmlEntities)for(let x in this.htmlEntities){const C=this.htmlEntities[x];_=_.replace(C.regex,C.val)}_=_.replace(this.ampEntity.regex,this.ampEntity.val)}return _};function m(_,x,C,A){return _&&(A===void 0&&(A=Object.keys(x.child).length===0),_=this.parseTextData(_,x.tagname,C,!1,x[":@"]?Object.keys(x[":@"]).length!==0:!1,A),_!==void 0&&_!==""&&x.add(this.options.textNodeName,_),_=""),_}function p(_,x,C){const A="*."+C;for(const y in _){const k=_[y];if(A===k||x===k)return!0}return!1}function v(_,x,C=">"){let A,y="";for(let k=x;k<_.length;k++){let P=_[k];if(A)P===A&&(A="");else if(P==='"'||P==="'")A=P;else if(P===C[0])if(C[1]){if(_[k+1]===C[1])return{data:y,index:k}}else return{data:y,index:k};else P===" "&&(P=" ");y+=P}}function O(_,x,C,A){const y=_.indexOf(x,C);if(y===-1)throw new Error(A);return y+x.length-1}function b(_,x,C,A=">"){const y=v(_,x+1,A);if(!y)return;let k=y.data;const P=y.index,T=k.search(/\s/);let E=k,Q=!0;T!==-1&&(E=k.substring(0,T),k=k.substring(T+1).trimStart());const $=E;if(C){const L=E.indexOf(":");L!==-1&&(E=E.substr(L+1),Q=E!==y.data.substr(L+1))}return{tagName:E,tagExp:k,closeIndex:P,attrExpPresent:Q,rawTagName:$}}function w(_,x,C){const A=C;let y=1;for(;C<_.length;C++)if(_[C]==="<")if(_[C+1]==="/"){const k=O(_,">",C,`${x} is not closed`);if(_.substring(C+2,k).trim()===x&&(y--,y===0))return{tagContent:_.substring(A,C),i:k};C=k}else if(_[C+1]==="?")C=O(_,"?>",C+1,"StopNode is not closed.");else if(_.substr(C+1,3)==="!--")C=O(_,"-->",C+3,"StopNode is not closed.");else if(_.substr(C+1,2)==="![")C=O(_,"]]>",C,"StopNode is not closed.")-2;else{const k=b(_,C,">");k&&((k&&k.tagName)===x&&k.tagExp[k.tagExp.length-1]!=="/"&&y++,C=k.closeIndex)}}function S(_,x,C){if(x&&typeof _=="string"){const A=_.trim();return A==="true"?!0:A==="false"?!1:r(_,C)}else return t.isExist(_)?_:""}return qp=s,qp}var Rp={},W0;function u8(){if(W0)return Rp;W0=1;function t(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=n(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 n(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 Rp.prettify=t,Rp}var Dp,Y0;function f8(){if(Y0)return Dp;Y0=1;const{buildOptions:t}=s8(),e=c8(),{prettify:n}=u8(),r=FC();class i{constructor(o){this.externalEntities={},this.options=t(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:n(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 Dp=i,Dp}var Np,U0;function d8(){if(U0)return Np;U0=1;const t=`
293
+ `;function e(a,l){let c="";return l.format&&l.indentBy.length>0&&(c=t),n(a,l,"",c)}function n(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 v="";if(c.length===0?v=p:v=`${c}.${p}`,p===l.textNodeName){let _=m[p];s(v,l)||(_=l.tagValueProcessor(p,_),_=o(_,l)),d&&(f+=u),f+=_,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 _=i(m[":@"],l),x=p==="?xml"?"":u;let C=m[p][0][l.textNodeName];C=C.length!==0?" "+C:"",f+=x+`<${p}${C}${_}?>`,d=!0;continue}let O=u;O!==""&&(O+=l.indentBy);const b=i(m[":@"],l),w=u+`<${p}${b}`,S=n(m[p],l,v,O);l.unpairedTags.indexOf(p)!==-1?l.suppressUnpairedNode?f+=w+">":f+=w+"/>":(!S||S.length===0)&&l.suppressEmptyNode?f+=w+"/>":S&&S.endsWith(">")?f+=w+`>${S}${u}</${p}>`:(f+=w+">",S&&u!==""&&(S.includes("/>")||S.includes("</"))?f+=u+l.indentBy+S+u:f+=S,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 Np=e,Np}var Ip,G0;function h8(){if(G0)return Ip;G0=1;const t=d8(),e=XC(),n={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({},n,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?t(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="",v="";for(let O=0;O<m;O++){const b=a[h][O];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 w=this.j2x(b,l+1,c.concat(h));p+=w.val,this.options.attributesGroupName&&b.hasOwnProperty(this.options.attributesGroupName)&&(v+=w.attrStr)}else p+=this.processTextOrObjNode(b,h,l,c);else if(this.options.oneListGroup){let w=this.options.tagValueProcessor(h,b);w=this.replaceEntitiesValue(w),p+=w}else p+=this.buildTextValNode(b,h,"",l)}this.options.oneListGroup&&(p=this.buildObjectNode(p,h,v,l)),f+=p}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const m=Object.keys(a[h]),p=m.length;for(let v=0;v<p;v++)u+=this.buildAttrPairStr(m[v],""+a[h][m[v]])}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 Ip=r,Ip}var Bp,H0;function p8(){if(H0)return Bp;H0=1;const t=FC(),e=f8(),n=h8();return Bp={XMLParser:e,XMLValidator:t,XMLBuilder:n},Bp}var m8=p8();const g8="RFTO",v8="RFTC";function O8(t){return t.includes("")?t.replaceAll(g8,"{%").replaceAll(v8,"%}"):t}const{Tag:jp}=B;function b8(t,e){const n=t.match(/^<svg\s([^>]*)>/);if(!n)return new jp("span",{class:"rf-icon","data-icon":e});const i={...K0(n[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(t))!==null;){const c=l[1],u=K0(l[2]);s.push(new jp(c,u))}return new jp("svg",i,s)}function K0(t){const e={},n=/([\w-]+)="([^"]*)"/g;let r;for(;(r=n.exec(t))!==null;)e[r[1]]=r[2];return e}const{Tag:y8}=B;function w8(t){const e=t.indexOf("/");return e===-1?{group:"global",name:t}:{group:t.substring(0,e),name:t.substring(e+1)}}function VC(t,e,n={}){const{group:r,name:i}=w8(t),o=e.variables?.__icons?.[r]?.[i];if(o){const l=b8(o,t);return n.size&&(l.attributes.width=n.size,l.attributes.height=n.size),n.label&&(l.attributes.role="img",l.attributes["aria-label"]=n.label),{tag:l,found:!0}}const a={class:"rf-icon","data-icon":t};return n.size&&(a.style=`width:${n.size};height:${n.size}`),n.label&&(a.role="img",a["aria-label"]=n.label),{tag:new y8("span",a),found:!1}}const{Tag:gs}=B,Cg={cover:{w:1600,h:900},square:{w:1e3,h:1e3},portrait:{w:750,h:1e3},wide:{w:2400,h:1e3},banner:{w:1800,h:600},avatar:{w:1e3,h:1e3,round:!0},thumbnail:{w:800,h:600}},J0=Object.keys(Cg),WC="cover",dn=t=>Math.round(t);function _8(t,e={}){const n=Cg[t]?t:WC,r=Cg[n],{w:i,h:s}=r,o=r.round?x8(i,s):k8(i,s),a={class:"rf-placeholder","data-shape":n,viewBox:`0 0 ${i} ${s}`,preserveAspectRatio:"xMidYMid slice",width:"100%",fill:"none"};return e.label?(a.role="img",a["aria-label"]=e.label):a["aria-hidden"]="true",new gs("svg",a,o)}function k8(t,e){const n=dn(Math.min(t,e)*.008),r=dn(Math.min(t,e)*.1),i=`M0 ${dn(e*.72)} Q ${dn(t*.28)} ${dn(e*.55)} ${dn(t*.5)} ${dn(e*.7)} T ${t} ${dn(e*.64)} L ${t} ${e} L 0 ${e} Z`;return[new gs("rect",{x:0,y:0,width:t,height:e,fill:"var(--rf-color-surface)"}),new gs("circle",{cx:dn(t*.76),cy:dn(e*.3),r,fill:"var(--rf-color-border)"}),new gs("path",{d:i,fill:"var(--rf-color-muted)"}),new gs("rect",{x:dn(n/2),y:dn(n/2),width:dn(t-n),height:dn(e-n),fill:"none",stroke:"var(--rf-color-border)","stroke-width":n})]}function x8(t,e){const n=dn(t/2),r=dn(e/2),i=dn(Math.min(t,e)*.02),s=dn(t/2-i),o=dn(t*.16),a=dn(e*.42),l=`M ${dn(t*.24)} ${e} Q ${n} ${dn(e*.6)} ${dn(t*.76)} ${e} Z`;return[new gs("circle",{cx:n,cy:r,r:dn(t/2),fill:"var(--rf-color-surface)"}),new gs("path",{d:l,fill:"var(--rf-color-muted)"}),new gs("circle",{cx:n,cy:a,r:o,fill:"var(--rf-color-muted)"}),new gs("circle",{cx:n,cy:r,r:s,fill:"none",stroke:"var(--rf-color-border)","stroke-width":i})]}const{Tag:TJ}=B,YC=new Map;function UC(t,e){YC.set(t.toLowerCase(),e)}const S8=/^([a-zA-Z][a-zA-Z0-9+.-]*):(.*)$/s;function A8(t,e){const n=S8.exec(t);if(!n)return null;const r=YC.get(n[1].toLowerCase());return r?r(n[2],e):null}UC("icon",(t,e)=>{const{tag:n,found:r}=VC(t,e.config,{label:e.alt});return r||console.warn(`[refrakt] icon: unknown icon name "${t}" — falling back to a neutral glyph.`),n});UC("placeholder",(t,e)=>(t&&!J0.includes(t)&&console.warn(`[refrakt] placeholder: unknown shape "${t}" — falling back to "${WC}". Known shapes: ${J0.join(", ")}.`),_8(t,{label:e.alt})));function C8(t,e){if(typeof e=="function")return e(t);const n=typeof e=="string"?{node:e}:e;return!(n.node&&t.type!==n.node||n.descendant&&!Array.from(t.walk()).some(r=>r.type===n.descendant)||n.descendantTag&&!Array.from(t.walk()).some(r=>r.type==="tag"&&r.tag===n.descendantTag))}const{Ast:ew}=B;function*GC(t){yield t;for(const e of t.children)B.Tag.isTag(e)?yield*GC(e):yield e}function T8(t){return t.toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").trim().replace(/[\s-]+/g,"-").replace(/^-+|-+$/g,"")}function HC(t){let e="";for(const n of t)typeof n=="string"?e+=n:B.Tag.isTag(n)&&(e+=HC(n.children??[]));return e}function ib(t){const e=t?.level,n=t?.include;return r=>{const i=e??r.find(c=>c.type==="heading")?.attributes.level;if(!i)return r;let s;const o=new ew.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 ew.Node("item",{},[u])),s=c;else if(s===void 0)a.push(u);else if(!n||n.some(f=>C8(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]}}const{dirname:KC,join:JC,isAbsolute:P8}=i8,{Tag:Ai}=B,E8={children:["inline"],attributes:{level:{type:"Number",required:!0,render:!1},property:{type:String,required:!1}},transform(t,e){const n=t.transformAttributes(e),r=t.transformChildren(e);return(!n.id||typeof n.id!="string")&&(n.id=T8(HC(r))),new Ai(`h${t.attributes.level}`,n,r)}},$8={children:["inline"],attributes:{property:{type:String,required:!1}},render:"p"},Q8={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(t,e){const n=t.attributes.language||"shell",r={"data-language":n},i={"data-language":n},s=t.attributes.source;typeof s=="string"&&s.length>0&&(r["data-source"]=s,i["data-source"]=s);const o=t.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}`}}}t.attributes.linenumbers===!0&&(r["data-linenumbers"]="true",i["data-linenumbers"]="true");const a=t.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(t.attributes))c.startsWith("data-")&&(r[c]=u,i[c]=u);const l=new Ai("pre",r,[new Ai("code",i,[O8(t.attributes.content)])]);return new Ai("div",{class:"rf-codeblock"},[l])}},L8={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(t,e){return new Ai(t.attributes.ordered?"ol":"ul",t.transformAttributes(e),t.transformChildren(e))}},M8={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"],attributes:{property:{type:String,required:!1},typeof:{type:String,required:!1}}},q8={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},R8={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},D8={attributes:{content:{type:String,required:!0},property:{type:String,required:!1}},transform(t,e){const n=t.transformAttributes(e);return n.property?new Ai("span",{"data-field":n.property},[t.attributes.content]):t.attributes.content}},eT={children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}},render:"a",transform(t,e){const{urls:n,path:r}=e.variables||{},i=r?KC(r):"/";let s=t.attributes;const o=i!=="/"?JC(i,t.attributes.href):t.attributes.href;if(o in(n||{})){const a=n[o];s={...s,href:a}}return new Ai(this.render,s,t.transformChildren(e))}},N8=B.nodes.hardbreak,I8={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String},property:{type:String}},transform(t,e){const n=t.transformAttributes(e),r=A8(t.attributes.src,{alt:typeof n.alt=="string"?n.alt:void 0,title:typeof n.title=="string"?n.title:void 0,property:typeof n.property=="string"?n.property:void 0,config:e});if(r)return n.property&&(r.attributes["data-field"]=n.property),r;const i=e.variables?.svg||[];let s=t.attributes.src;!P8(s)&&e.variables?.path&&(s=JC("/",KC(e.variables.path),s));const o=i.find(a=>a._id===s);if(o){let l=new m8.XMLParser({ignoreAttributes:!1}).parse(o.content);const c=Tg("svg",l.svg);return n.property&&(c.attributes["data-field"]=n.property),c.attributes.xmlns=void 0,c}return new Ai(this.render,n,t.transformChildren(e))}},B8={children:["thead","tbody","tr"],attributes:{},transform(t,e){const n=new Ai("table",t.transformAttributes(e),t.transformChildren(e));return new Ai("div",{class:"rf-table-wrapper"},[n])}},j8={...B.nodes.td,attributes:{...B.nodes.td.attributes??{},"data-value":{type:String}}};function Tg(t,e){if(Array.isArray(e))return e.map(i=>Tg(t,i));let n=[],r={};for(const[i,s]of Object.entries(e))i.startsWith("@_")?r[i.slice(2)]=s:i==="#text"?n.push(s):n.push(Tg(i,s));return new Ai(t,r,n)}const{Tag:PJ}=B,{Ast:Tf}=B;function z8(t){let e,n;return{filtered:t.filter(i=>i.type==="tag"&&i.tag==="tint"?(e=i,!1):i.type==="tag"&&i.tag==="bg"?(n=i,!1):!0),tintNode:e,bgNode:n}}function Fc(t,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(n=>Fc(t,n));if(e.startsWith("heading:")){const n=parseInt(e.slice(8),10);return t.type==="heading"&&t.attributes?.level===n}if(e==="list:ordered")return t.type==="list"&&t.attributes?.ordered===!0;if(e==="list:unordered")return t.type==="list"&&t.attributes?.ordered!==!0;if(e.startsWith("tag:")){const n=e.slice(4);return t.type==="tag"&&t.tag===n}return e==="image"?t.type==="image"||tT(t)!==null:t.type===e}function tT(t){if(t.type!=="paragraph")return null;const n=(t.children??[]).flatMap(r=>r.type==="inline"?r.children??[]:[r]).filter(r=>!(r.type==="text"&&String(r.attributes?.content??"").trim()==="")&&r.type!=="softbreak");return n.length===1&&n[0].type==="image"?n[0]:null}function Ea(t,e){const n={};let r=0;for(const i of e){if(r>=t.length)continue;const s=t[r];if(Fc(s,i.match)){const o=i.match==="image"?a=>tT(a)??a:a=>a;if(i.greedy){const a=[];for(;r<t.length&&Fc(t[r],i.match);)a.push(o(t[r])),r++;n[i.name]=a}else n[i.name]=o(s),r++;if(i.itemModel)if(i.emitTag){const a=i.greedy?n[i.name]:[n[i.name]],l=[];for(const c of a){if(!c||c.type!=="list")continue;const u=Pg(c,i.itemModel),f=c.children??[];for(let d=0;d<u.length;d++){const h={},m=i.emitAttributes;if(m)for(const[v,O]of Object.entries(m))if(O.startsWith("$")){const b=O.slice(1).split("|");h[v]=b.map(w=>u[d][w.trim()]).find(w=>w!=null&&w!=="")??""}else h[v]=O;const p=f[d]?.children?.slice(1)??[];l.push(new Tf.Node("tag",h,p,i.emitTag))}}n[i.name]=l}else{const a=n[i.name];a&&typeof a=="object"&&"type"in a&&(n[`${i.name}Data`]=Pg(a,i.itemModel))}}else i.optional||r++}return n}function Z8(t,e){const n=[[]];for(const i of t)Fc(i,e.delimiter)?n.push([]):n[n.length-1].push(i);if(e.dynamicZones&&e.zoneModel)return{zones:n.map(i=>Xc(i,e.zoneModel))};const r={};if(e.zones){const i=n.length===1?e.zones.findIndex(s=>s.primary):-1;for(let s=0;s<e.zones.length;s++){const o=e.zones[s];let a;i>=0?a=s===i?n[0]:[]:a=s<n.length?n[s]:[],r[o.name]=Ea(a,o.fields)}}return r}function tw(t){const e=[];for(const n of t.walk())n.type==="text"&&n.attributes?.content&&e.push(n.attributes.content);return e.join(" ")}function nw(t,e){const n={};let r=t;for(const i of e.fields)if(i.pattern==="remainder")n[i.name]=r.trim(),r="";else{const s=r.match(i.pattern);s?(n[i.name]=(s[1]||s[0]).trim(),r=r.slice(s[0].length)):i.optional||(n[i.name]=r.trim())}return n}function F8(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function X8(t,e,n){const r=t.toLowerCase().trim(),i=[];for(const[s,o]of Object.entries(e)){if(s.toLowerCase()===r)return{canonicalName:s,definition:o};if(o.alias?.some(a=>a.toLowerCase()===r))return{canonicalName:s,definition:o};if(o.i18nAliases){for(const a of i)if(o.i18nAliases[a]?.some(l=>l.toLowerCase()===r))return{canonicalName:s,definition:o}}}}function V8(t,e,n){const r=e.sectionHeading;let i;if(r.includes(":"))i=parseInt(r.split(":")[1],10);else{const u=t.filter(f=>f.type==="heading");if(u.length>=2){const f=u[0].attributes?.level,d=u[1].attributes?.level;f!==void 0&&d!==void 0&&d>f?i=u.filter(m=>m.attributes?.level===d).length>=2?d:f:i=f}else i=u[0]?.attributes?.level}if(i===void 0){if(e.implicitSection&&e.emitTag){const f=e.fields?Ea([],e.fields):{},d=new Tf.Node("tag",{...e.implicitSection.attributes??{}},t,e.emitTag);return{...f,sections:[d]}}return{...e.fields?Ea(t,e.fields):{},sections:[]}}const s=[],o=[];let a=null;for(const u of t)u.type==="heading"&&u.attributes?.level===i?(a&&o.push(a),a={headingNode:u,body:[]}):a?a.body.push(u):s.push(u);if(a&&o.push(a),o.length===0&&e.implicitSection&&e.emitTag){const u=e.fields?Ea([],e.fields):{},f=new Tf.Node("tag",{...e.implicitSection.attributes??{}},t,e.emitTag);return{...u,sections:[f]}}const l=e.fields?Ea(s,e.fields):{};if(e.emitTag){const u=o.map(f=>{const d=tw(f.headingNode),h=e.headingExtract?nw(d,e.headingExtract):{},m={};if(e.emitAttributes)for(const[p,v]of Object.entries(e.emitAttributes))v==="$heading"?m[p]=d:v.startsWith("$")?m[p]=h[v.slice(1)]??"":m[p]=v;return new Tf.Node("tag",m,f.body,e.emitTag)});return{...l,sections:u}}const c=o.map(u=>{const f=tw(u.headingNode),d=e.headingExtract?nw(f,e.headingExtract):{},h=e.knownSections?X8(f,e.knownSections):void 0,m=h?.definition.model??e.sectionModel,p=Xc(u.body,m),v=h?h.definition.canonicalSlug??F8(h.canonicalName):void 0;return{$heading:f,$headingNode:u.headingNode,...h?{$canonicalName:h.canonicalName}:{},...v?{$canonicalSlug:v}:{},...Object.fromEntries(Object.entries(d).map(([O,b])=>[`$${O}`,b])),...p}});return{...l,sections:c}}function W8(t,e,n){if("hasChild"in t)return e.some(r=>Fc(r,t.hasChild));if("in"in t){const r=String(n[t.attribute]??"");return t.in.includes(r)}return"exists"in t?n[t.attribute]!=null&&n[t.attribute]!=="":!1}function Y8(t){return"when"in t&&Array.isArray(t.when)}function U8(t){if(t.type==="text")return t.attributes?.content??"";const e=[];for(const n of t.walk())n.type==="text"&&n.attributes?.content&&e.push(n.attributes.content);return e.join("")}function G8(t,e){if(t.type===e)return t;if(t.type==="link"&&e!=="link"){for(const n of t.children??[])if(n.type===e)return n}if((t.type==="strong"||t.type==="em")&&e!==t.type){for(const n of t.children??[])if(n.type===e)return n}return null}function Pg(t,e){return(t.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?Pg(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=G8(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]=U8(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 Xc(t,e,n,r){if(Y8(e)){for(const i of e.when)if(W8(i.condition,t,n??{}))return Xc(t,i.model,n);return Xc(t,e.default,n)}switch(e.type){case"sequence":return Ea(t,e.fields);case"sections":return V8(t,e);case"delimited":return Z8(t,e);case"custom":return{children:e.processChildren(t,n??{})};default:return{}}}function H8(t,e,n,r){const{filtered:i,tintNode:s,bgNode:o}=z8(t);return{content:Xc(i,e,n),tintNode:s,bgNode:o}}const K8=new Map;function J8(t,e){K8.set(t,e)}const e6=new WeakMap,t6=new Set(["tint","tint-mode","bg","width","reading","dropcap","spacing","inset","elevation","prominence","reveal","stagger","frame","frame-aspect","frame-displace","frame-displace-mode","frame-offset","frame-oversize","frame-place","frame-anchor","frame-overflow","frame-shadow","substrate","substrate-size","substrate-opacity","substrate-fill","substrate-target","bg-gradient","bg-from","bg-to","bg-via","bg-gradient-type","scrim","scrim-type","scrim-strength","scrim-blur","scrim-tone"]);function As(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Kt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&t.$$mdtype==="Tag"}function At(t,e={},n=[]){return{$$mdtype:"Tag",name:t,attributes:e,children:n}}function n6(t,e){const n=As(e);return t.children.find(r=>Kt(r)&&r.name==="meta"&&r.attributes["data-field"]===n)}function bh(t){for(const e of t){if(!Kt(e))continue;if(e.attributes?.["data-section"]==="media")return e;const n=e.children?bh(e.children):void 0;if(n)return n}}function sb(t,e){for(const n of t){if(!Kt(n))continue;if(n.attributes?.["data-name"]===e)return n;const r=n.children?sb(n.children,e):void 0;if(r)return r}}function Ot(t,e,n){return n6(t,e)?.attributes.content??n}function r6(t){const e=t.attributes?.["data-rune-fields"];if(typeof e!="string"||e.length===0)return{};try{const n=JSON.parse(e);return n&&typeof n=="object"&&!Array.isArray(n)?n:{}}catch{return{}}}function Lo(t,e,n){const i=r6(t)[e];if(i!=null&&typeof i!="object")return typeof i=="string"?i:String(i);const s=As(e),o=(t.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 i6={none:"0",tight:"var(--rf-spacing-sm)",default:"var(--rf-spacing-md)",loose:"var(--rf-spacing-xl)"};function s6(t){return i6[t]??t}function o6(t){return t.split(/\s+/).map(e=>`${e}fr`).join(" ")}const zp={none:"0",sm:"var(--rf-spacing-sm)",md:"var(--rf-spacing-md)",lg:"var(--rf-spacing-lg)",xl:"var(--rf-spacing-xl)","2xl":"var(--rf-spacing-section)","3xl":"var(--rf-spacing-section-loose)","4xl":"var(--rf-spacing-section-breathe)"};function a6(t){const e=zp[t];return e===void 0?(console.warn(`[refrakt] Unknown offset "${t}" — expected one of ${Object.keys(zp).join(", ")}. Falling back to "none".`),zp.none):e}const l6={top:"start",center:"center",bottom:"end",stretch:"stretch",baseline:"baseline"};function rw(t){return l6[t]??t}const c6={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 u6(t){return c6[t]??{x:"center",y:"center"}}const ob=["block","modifiers","sections","mediaSlots","frameTarget","universalAttributes","provides"];[...ob];function f6(t,e=ob){return e.filter(n=>n in t)}function d6(t){return`may not override the identity field "${t}" — it is rune identity, not theme configuration (ADR-028)`}const iw=new Set;function h6(t){iw.has(t.path)||(iw.add(t.path),console.warn(`[refrakt] ${t.message}`))}function p6(t,e,n={}){if(!t)return e;const r=n.guardIdentity?m6(e,n):e,i={...t,...r};if((t.metaFields||e.metaFields)&&(i.metaFields={...t.metaFields,...e.metaFields}),t.blocks||e.blocks){const s={...t.blocks};if(e.blocks)for(const[o,a]of Object.entries(e.blocks))s[o]=a;i.blocks=s}if((t.layout||e.layout)&&(i.layout={...t.layout,...e.layout}),t.variants||e.variants){const s={...t.variants};if(e.variants)for(const[o,a]of Object.entries(e.variants))s[o]={...s[o],...a};i.variants=s}return i}function m6(t,e){const n=f6(t,ob);if(n.length===0)return t;const r=e.runeName??"<rune>",i=e.onViolation??h6,s={...t};for(const o of n){delete s[o];const a=`runes.${r}.${o}`;i({path:a,rune:r,field:o,message:`${a}: theme overrides ${d6(o)}. The override is ignored; the rune's own declaration stands.`})}return s}const nT=["fine","ui","prose"];function rT(t){return typeof t=="string"&&nT.includes(t)?t:void 0}function iT(t){return rT(t.authorAttr)??t.runeDefault??t.regionDefault??"ui"}const yh="ui",Eg={fine:{dropcap:!1},ui:{dropcap:!1},prose:{dropcap:!0}},sT="en";function g6(t){return typeof t=="string"&&t.trim()!==""?t.trim():sT}function v6(t,e={}){return{locale:g6(t),strings:e}}function ab(t,e,n){const r=t.strings[e];return typeof r=="string"?r:n}class O6{seen=new Set;emit(e){if(e.dedupeKey!==void 0){const n=`${e.code}\0${e.dedupeKey}`;if(this.seen.has(n))return;this.seen.add(n)}e.severity==="error"?console.error(e.message):console.warn(e.message)}reset(){this.seen.clear()}}function b6(t){const e=new Map;for(const s of t){if(e.has(s.name))throw new Error(`[refrakt] duplicate facet "${s.name}" in the registry`);e.set(s.name,s)}const n=[],r=new Map,i=(s,o)=>{const a=r.get(s.name);if(a!=="done"){if(a==="visiting")throw new Error(`[refrakt] facet dependency cycle: ${[...o,s.name].join(" → ")}`);r.set(s.name,"visiting");for(const l of s.after??[]){const c=e.get(l);if(!c)throw new Error(`[refrakt] facet "${s.name}" declares after: "${l}", which is not a registered facet`);i(c,[...o,s.name])}r.set(s.name,"done"),n.push(s)}};for(const s of t)i(s,[]);return n}function oT(t,e){return{...t,axis:n=>e.axes[n]??e.state[n]}}const y6=()=>({axes:{},state:{},classes:[],dataAttrs:{},styles:[],consumes:[],stripAttrs:[],layers:[],absorbs:[],warnings:[],carry:new Map});function w6(t,e,n){const r=y6(),i=oT(e,r);for(const s of t){if(s.appliesTo&&!s.appliesTo(i))continue;const o=s.resolve(i);if(o&&(o.axes&&Object.assign(r.axes,o.axes),o.state&&Object.assign(r.state,o.state),o.classes&&r.classes.push(...o.classes),o.dataAttrs&&Object.assign(r.dataAttrs,o.dataAttrs),o.styles&&r.styles.push(...o.styles),o.consumes&&r.consumes.push(...o.consumes),o.stripAttrs&&r.stripAttrs.push(...o.stripAttrs),o.layers&&r.layers.push(...o.layers),o.absorbs&&r.absorbs.push(...o.absorbs),o.carry!==void 0&&r.carry.set(s.name,o.carry),o.warnings)){r.warnings.push(...o.warnings);for(const a of o.warnings)n.emit(a)}}return r}function _6(t,e,n,r,i){const s=oT(e,n);for(const o of t){if(!o.postAssemble||o.appliesTo&&!o.appliesTo(s))continue;const a=o.postAssemble(s,r,n.carry.get(o.name));if(a){n.warnings.push(...a);for(const l of a)i.emit(l)}}}const k6=["sunken","flush","flat","raised","floating","overlay"],x6={none:"flat",sm:"raised",md:"raised",lg:"floating"},S6={name:"elevation",attributes:["elevation"],resolve(t){const e=t.tag.attributes?.elevation??t.config.defaultElevation;if(typeof e!="string"||e==="")return null;const n=x6[e];return n?{axes:{elevation:n},warnings:[{code:"elevation-deprecated-alias",message:`[refrakt] elevation="${e}" is deprecated (SPEC-107) — use "${n}". The alias will be removed in a future minor.`}]}:{axes:{elevation:e}}}},A6={axis:"elevation",contract:{description:"The chrome/depth ladder (SPEC-107). The skin maps each rung to a chrome bundle by attribute, so there is no BEM class.",source:"attribute",inputs:["elevation"],values:k6,dataAttributes:["data-elevation"],condition:"emitted only when the author sets it or the rune declares `defaultElevation`"},describeForRune:t=>t.defaultElevation?{default:t.defaultElevation}:null},C6=["quiet","normal","prominent","display"],T6=new Set(["header","preamble","title","description"]);function aT(t){return!!t&&Object.values(t).some(e=>T6.has(e))}const P6={name:"prominence",attributes:["prominence"],appliesTo:t=>!!(t.tag.attributes?.prominence??t.config.defaultProminence),resolve(t){const e=t.tag.attributes?.prominence??t.config.defaultProminence;return aT(t.config.sections)?{axes:{prominence:String(e)}}:{warnings:[{code:"prominence-unsupported",message:`[refrakt] prominence is not supported on "${t.rune}" — it applies only to runes with a page-section header. Ignored.`}]}}},E6={axis:"prominence",contract:{description:"Header emphasis (SPEC-107). Scales a rune's page-section header; the skin maps it to a type register by attribute, so there is no BEM class.",source:"attribute",inputs:["prominence"],values:C6,dataAttributes:["data-prominence"],condition:"requires a page-section header — a `sections` role of header, preamble, title or description. Dropped with a warning otherwise."},describeForRune:t=>aT(t.sections)?t.defaultProminence?{default:t.defaultProminence}:null:"this rune has no page-section header"},$6={name:"content-place",after:["modifiers"],appliesTo:t=>!!(t.axis("content-place")??t.tag.attributes?.["content-place"]),resolve(t){const e=t.axis("content-place");if(!e)return{warnings:[{code:"content-place-undeclared",message:`[refrakt] \`content-place\` on \`${t.rune}\` has nothing to anchor — the rune declares no \`content-place\` modifier, so the value is never read. Ignored.`,dedupeKey:t.rune}]};if(t.axis("media-position")!=="cover")return{warnings:[{code:"content-place-outside-cover",message:`[refrakt] \`content-place\` on \`${t.rune}\` is only active in \`media-position="cover"\` — it anchors the overlay, and there's no overlay outside cover. Ignored.`,dedupeKey:t.rune}]};if(e==="auto")return null;const[n,r]=e.trim().split(/\s+/),i=[];return n&&i.push(["--cover-place-block",n]),r&&i.push(["--cover-place-inline",r]),n==="start"?i.push(["--cover-scrim-dir","to bottom"]):n==="center"&&(i.push(["--cover-scrim-image","radial-gradient(ellipse farthest-side at center, rgb(0 0 0 / 0.55) 40%, transparent 100%)"]),i.push(["--cover-scrim-mask","radial-gradient(ellipse farthest-side at center, #000 50%, transparent 100%)"])),{styles:i}}},Q6={axis:"content-place",contract:{description:"The cover overlay anchor (SPEC-089): a 2-axis logical placement (block × inline) that also steers the default scrim so it follows the content edge.",source:"meta",inputs:["content-place"],customProperties:["--cover-place-block","--cover-place-inline","--cover-scrim-dir","--cover-scrim-image","--cover-scrim-mask"],condition:"active only when `media-position` resolves to `cover`; `auto` emits nothing and is left to the CSS container query. `--cover-scrim-dir` here is overridden by an explicit `scrim` edge, which the `cover` axis declares later."},describeForRune:t=>t.modifiers?.["content-place"]?null:"this rune declares no `content-place` modifier"},L6={top:"to top",bottom:"to bottom",left:"to left",right:"to right"},lT=["scrim","scrim-type","scrim-blur","scrim-tone"],sw="scrim-strength",M6={name:"cover",after:["modifiers","content-place","tint"],appliesTo:t=>t.axis("media-position")==="cover",resolve(t){const e={state:{cover:"true"},consumes:[...lT],dataAttrs:{},styles:[]},n=Ot(t.tag,"scrim");n==="none"&&(e.dataAttrs["data-scrim"]="none");const r=Ot(t.tag,"scrim-type");if(r&&n!=="none"&&(e.dataAttrs["data-scrim-type"]=r,r==="frost")){const o=Ot(t.tag,"scrim-blur");o&&(e.dataAttrs["data-scrim-blur"]=o)}const i=L6[n??""];return i&&e.styles.push(["--cover-scrim-dir",i]),Ot(t.tag,sw)!==void 0&&(e.consumes.push(sw),n!=="none"&&(e.warnings=[{code:"scrim-strength-in-cover",message:`[refrakt] \`scrim-strength\` is not honoured in cover mode — on \`${t.rune}\` the scrim is rendered by the media well, which has no strength control. Ignored.`,dedupeKey:t.rune}])),e},postAssemble(t,e){if(Ot(t.tag,"scrim")==="none"||t.config.rootAttributes?.["data-cover-scope"]==="header"||t.axis("color-scheme"))return;const r=sb(e,"content");r&&(r.attributes={...r.attributes,"data-color-scheme":Ot(t.tag,"scrim-tone")??"dark"})}},q6={axis:"cover",contract:{description:'Cover-mode chrome (SPEC-089): with `media-position="cover"` the media fills the surface and the content sits over it, so the scrim is rerouted from the background layer to the media well.',source:"meta",inputs:lT,dataAttributes:["data-scrim","data-scrim-type","data-scrim-blur"],customProperties:["--cover-scrim-dir"],target:'the rune root, except `data-color-scheme`, which is scoped to the `[data-name="content"]` overlay so only text on the darkened media flips',condition:"active only when `media-position` resolves to `cover`"},describeForRune:t=>t.modifiers?.["media-position"]?null:"this rune declares no `media-position` modifier, so it cannot enter cover mode"};function cT(t,e){if(t.attributes={...t.attributes,...e.dataAttrs},e.styles.length){const n=e.styles.map(([i,s])=>`${i}: ${s}`).join("; "),r=t.attributes.style?String(t.attributes.style):"";t.attributes.style=r?`${r}; ${n}`:n}}function wh(t){return t?Object.values(t).includes("media"):!1}const R6=["frame-aspect","frame-displace","frame-displace-mode","frame-offset","frame-oversize","frame-place","frame-anchor","frame-overflow","frame-shadow"];function D6(t,e,n){const r=[],i=u=>{const f=Ot(t,u);return f!=null&&r.push(u),f??void 0},s=i("frame");let o={};if(s&&e[s]){let u=e[s];u.extends&&e[u.extends]&&(u={...e[u.extends],...u}),o={...u},delete o.extends}const a={aspect:i("frame-aspect"),displace:i("frame-displace"),displaceMode:i("frame-displace-mode"),offset:i("frame-offset"),oversize:i("frame-oversize"),place:i("frame-place"),anchor:i("frame-anchor"),overflow:i("frame-overflow"),shadow:i("frame-shadow")};for(const[u,f]of Object.entries(a))f!==void 0&&(o[u]=f);if(r.length===0)return null;o.displace&&!o.displaceMode&&n==="bleed"&&(o.displaceMode="bleed");const l={},c=[];if(s&&(l["data-frame"]=s),o.displace&&(l["data-displace"]=o.displace),o.displaceMode&&(l["data-displace-mode"]=o.displaceMode),o.shadow&&(l["data-frame-shadow"]=o.shadow),o.overflow==="bleed"&&(l["data-frame-overflow"]="bleed"),o.aspect&&c.push(["--frame-aspect",o.aspect]),o.offset&&c.push(["--frame-offset",a6(o.offset)]),o.oversize&&c.push(["--frame-oversize",o.oversize]),o.anchor&&c.push(["--frame-anchor",o.anchor]),o.place){const{x:u,y:f}=u6(o.place);c.push(["--frame-place-x",u],["--frame-place-y",f])}return{dataAttrs:l,styles:c,consumes:r}}const ow=t=>({code:"frame-no-target",message:`[refrakt] \`frame\` on \`${t}\` has no frame target — set \`frameTarget\` or give the rune a media section. Frame chrome ignored.`,dedupeKey:t}),N6={name:"frame",resolve(t){const e=D6(t.tag,t.theme.frames,t.config.guestFit);if(!e)return null;const n=[];let r=t.config.frameTarget??(wh(t.config.sections)?"media":null);return r||n.push(ow(t.rune)),e.dataAttrs["data-frame-overflow"]==="bleed"&&t.config.guestFit!=="bleed"&&(delete e.dataAttrs["data-frame-overflow"],n.push({code:"frame-overflow-on-clip-host",message:`[refrakt] \`frame-overflow="bleed"\` has no effect on \`${t.rune}\` — a clip host crops its media guest. Use it on a bleed host (hero, feature), or drop it.`,dedupeKey:t.rune})),{consumes:e.consumes,...r==="self"?{dataAttrs:e.dataAttrs,styles:e.styles}:{},...n.length?{warnings:n}:{},carry:{chrome:e,target:r}}},postAssemble(t,e,n){const{chrome:r,target:i}=n??{};if(!r||i!=="media")return;const s=bh(e);if(!s)return[ow(t.rune)];cT(s,r)}},I6={axis:"frame",contract:{description:"Surface chrome (SPEC-086): a named preset from the theme registry with inline `frame-*` overrides layered on top.",source:"meta",inputs:["frame",...R6],dataAttributes:["data-frame","data-displace","data-displace-mode","data-frame-shadow","data-frame-overflow"],customProperties:["--frame-aspect","--frame-offset","--frame-oversize","--frame-anchor","--frame-place-x","--frame-place-y"],condition:'lands on the surface named by `frameTarget`, defaulting to the media zone when the rune declares one. With no target the metas are still consumed but the chrome is dropped with a warning. `data-frame-overflow="bleed"` is stripped with a warning on a clip host.'},describeForRune:t=>{const e=t.frameTarget??(wh(t.sections)?"media":null);return e?{target:e==="self"?"the rune root":'[data-section="media"]'}:"this rune declares neither a `frameTarget` nor a media section"}},aw={sm:"12px",md:"16px",lg:"24px"},lw={sm:"0.25",md:"0.5",lg:"0.85"};function B6(t){const e=[],n=u=>{const f=Ot(t,u);return f!=null&&e.push(u),f??void 0},r=n("substrate"),i=n("substrate-size"),s=n("substrate-opacity"),o=n("substrate-fill"),a=n("substrate-target");if(!r)return null;const l={"data-substrate":r};o&&(l["data-substrate-fill"]=o);const c=[];return i&&aw[i]&&c.push(["--substrate-cell",aw[i]]),s&&lw[s]&&c.push(["--substrate-opacity",lw[s]]),{chrome:{dataAttrs:l,styles:c,consumes:e},targetOverride:a}}const cw=t=>({code:"substrate-no-media",message:`[refrakt] \`substrate-target="media"\` on \`${t}\` has no media section — substrate ignored.`,dedupeKey:t}),j6={name:"substrate",resolve(t){const e=B6(t.tag);if(!e)return null;const{chrome:n,targetOverride:r}=e;let i=r==="self"||r==="media"?r:t.config.substrateTarget??"self";const s=[];return i==="media"&&!wh(t.config.sections)&&(s.push(cw(t.rune)),i=null),{consumes:n.consumes,...i==="self"?{dataAttrs:n.dataAttrs,styles:n.styles}:{},...s.length?{warnings:s}:{},carry:{chrome:n,target:i}}},postAssemble(t,e,n){const{chrome:r,target:i}=n??{};if(!r||i!=="media")return;const s=bh(e);if(!s)return[cw(t.rune)];cT(s,r)}},z6={axis:"substrate",contract:{description:"Generated pattern fills (SPEC-087). Markers only — the engine sets the attributes and cell/opacity custom properties, CSS draws the pattern.",source:"meta",inputs:["substrate","substrate-size","substrate-opacity","substrate-fill","substrate-target"],dataAttributes:["data-substrate","data-substrate-fill"],customProperties:["--substrate-cell","--substrate-opacity"],condition:'defaults to the rune root. `substrate-target="media"` moves it to the media zone, and is dropped with a warning on a rune with no media section. The facets are inert without a `substrate` pattern.'},describeForRune:t=>t.substrateTarget!=="media"?null:wh(t.sections)?{target:'[data-section="media"]'}:"this rune targets the media zone but declares no media section"},uT=["bg","surface","text","muted","primary","border"],Z6={name:"tint",appliesTo:t=>!!(Ot(t.tag,"tint")||Ot(t.tag,"tint-mode")),resolve(t){const e=Ot(t.tag,"tint"),n=Ot(t.tag,"tint-mode"),r={},i={};let s=n;const o=e&&e!=="custom"?t.theme.tints[e]:void 0;if(o){for(const[f,d]of Object.entries(o.light??{}))d&&(r[f]=d);for(const[f,d]of Object.entries(o.dark??{}))d&&(i[f]=d);!s&&o.lockMode&&(s=o.lockMode)}const a=["tint","tint-mode"];for(const f of uT){const d=Ot(t.tag,`tint-${f}`);d&&(r[f]=d,a.push(`tint-${f}`));const h=Ot(t.tag,`tint-dark-${f}`);h&&(i[f]=h,a.push(`tint-dark-${f}`))}const l=Object.keys(r).length>0,c={};(e||l)&&(c["data-tint"]=e||"custom"),s&&s!=="auto"&&(c["data-color-scheme"]=s),Object.keys(i).length>0&&(c["data-tint-dark"]="");const u=[];for(const[f,d]of Object.entries(r))u.push([`--tint-${f}`,d]);for(const[f,d]of Object.entries(i))u.push([`--tint-dark-${f}`,d]);return{consumes:a,dataAttrs:c,styles:u,...l||o?{classes:[`${t.block}--tinted`]}:{},...c["data-color-scheme"]?{state:{"color-scheme":c["data-color-scheme"]}}:{}}}},F6={axis:"tint",contract:{description:"Per-rune colour override (SPEC-053): a named tint from the theme registry, with inline per-token overrides layered on top.",source:"meta",inputs:["tint","tint-mode","tint-{token}","tint-dark-{token}"],tokens:uT,selectors:[".{block}--tinted"],dataAttributes:["data-tint","data-color-scheme","data-tint-dark"],customProperties:["--tint-{token}","--tint-dark-{token}"],condition:"the `--tinted` class only when colour tokens actually resolve — a bare `tint-mode` locks the colour scheme without tinting anything"},describeForRune:(t,e)=>({selectors:[`.${e}--tinted`]})},X6={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tr":"to top right","to-br":"to bottom right","to-bl":"to bottom left","to-tl":"to top left"},uw={sm:"0.3",md:"0.55",lg:"0.8"},Zp={sm:"4px",md:"8px",lg:"16px"},V6=/^[a-z][a-z0-9-]*$/,fT=["bg-preset","bg-src","bg-video","bg-overlay","bg-blur","bg-position","bg-fit","bg-opacity","bg-fixed","bg-gradient","bg-from","bg-via","bg-to","bg-gradient-type","bg-overlay-opacity","scrim","scrim-type","scrim-strength","scrim-blur","scrim-tone"];function W6(t){if(t==="transparent")return"transparent";const e=t.indexOf("/");if(e>0&&e<t.length-1){const n=t.slice(0,e),r=t.slice(e+1).replace(/%$/,""),i=parseFloat(r);if(Number.isFinite(i)){const s=i>1?i/100:i;if(s>=0&&s<=1)return`color-mix(in srgb, var(--rf-color-${n}) ${s*100}%, transparent)`}}return`var(--rf-color-${t})`}function fw(t){const e=t.stops.filter(i=>!!i).map(W6);if(e.length<2)return null;const n=t.type??"linear";return n==="radial"?`radial-gradient(${e.join(", ")})`:n==="conic"?`conic-gradient(${e.join(", ")})`:`linear-gradient(${X6[t.direction??"to-b"]??"to bottom"}, ${e.join(", ")})`}function dw(t,e){if(!t||!e[t])return;const n=e[t];if(n.extends&&e[n.extends]){const r=e[n.extends];return{...r,params:{...r.params,...n.params},style:{...r.style,...n.style}}}return n}const Y6={name:"bg",after:["cover","tint"],resolve(t){const{tag:e}=t,n=t.theme.backgrounds,r=(e.children??[]).find(E=>Kt(E)&&E.attributes?.["data-bg-guest"]!==void 0)??null,i=Ot(e,"bg-preset"),s=Ot(e,"bg-src"),o=Ot(e,"bg-video"),a=Ot(e,"bg-gradient"),l=Ot(e,"bg-from"),c=Ot(e,"bg-via"),u=Ot(e,"bg-to"),f=Ot(e,"bg-gradient-type"),d=dw(i,n)?.gradient;let h=null;if(a||l||c||u||f){const E=[l,c,u].filter(Q=>!!Q);h=fw({type:f??d?.type,direction:a??d?.direction,stops:E.length>=2?E:d?.stops??E})}else d&&(h=fw(d));const m=Ot(e,"scrim"),p=Ot(e,"bg-overlay"),v=t.axis("cover")==="true",O=m&&m!=="none"&&!v;if(!(i||s||o||h||O||p||r))return null;const b=dw(i,n)?.style??{},w=[];for(const[E,Q]of Object.entries(b))w.push(`${E}: ${Q}`);s?w.push(`--bg-image: url(${s})`):h&&w.push(`--bg-image: ${h}`);const S=Ot(e,"bg-position"),_=Ot(e,"bg-blur"),x=Ot(e,"bg-fit"),C=Ot(e,"bg-opacity");S&&w.push(`--bg-position: ${S}`),_&&w.push(`--bg-blur: ${Zp[_]??_}`),x&&w.push(`--bg-fit: ${x}`),C&&w.push(`--bg-opacity: ${C}`);const A={"data-name":"bg"};i&&(A["data-bg-preset"]=i),w.length&&(A.style=w.join("; ")),Ot(e,"bg-fixed")&&(A["data-bg-fixed"]="");const y=[],k=[],P={},T={};if(o&&y.push(At("video",{"data-name":"bg-video",autoplay:"",muted:"",loop:"",playsinline:"",src:o,...w.length?{style:w.filter(E=>!E.startsWith("--bg-image")).join("; ")}:{}})),r&&y.push(r),p){const E=Ot(e,"bg-overlay-opacity"),Q={"data-name":"bg-overlay"};if(p==="dark"||p==="light")Q["data-bg-overlay"]=p,E&&(Q.style=`opacity: ${E}`);else if(V6.test(p)){const $=[`background: var(--rf-color-${p})`];E&&$.push(`opacity: ${E}`),Q.style=$.join("; ")}else k.push({code:"raw-css-overlay",message:`[refrakt] raw-CSS \`overlay\` on \`${t.rune}\` is deprecated (SPEC-088) — use \`overlay="dark|light|<token>"\` for a flat wash or \`scrim\` for a legibility gradient. The raw passthrough will be removed in a future minor.`,dedupeKey:t.rune}),Q.style=`background: ${p}`;y.push(At("div",Q))}if(O){const E=Ot(e,"scrim-type")??"gradient",Q=Ot(e,"scrim-tone")??"dark",$={"data-name":"scrim","data-scrim":E,"data-scrim-tone":Q,"data-scrim-dir":m};if(E==="frost"){const L=Ot(e,"scrim-blur")??"md";$.style=`--scrim-blur: ${Zp[L]??Zp.md}`}else{const L=Ot(e,"scrim-strength")??"md";$.style=`--scrim-strength: ${uw[L]??uw.md}`}y.push(At("div",$)),t.axis("color-scheme")||(P["data-color-scheme"]=Q,T["color-scheme"]=Q)}return P["data-bg"]="",{classes:[`${t.block}--has-bg`],dataAttrs:P,consumes:fT,layers:[{placement:"before-content",element:At("div",A,y)}],...r?{absorbs:[r]}:{},...Object.keys(T).length?{state:T}:{},...k.length?{warnings:k}:{}}}},U6={axis:"bg",contract:{description:"The background layer (SPEC-088): image, video, gradient, flat overlay wash and legibility scrim, in a single injected layer behind the rune's content.",source:"meta",inputs:fT,selectors:[".{block}--has-bg"],dataAttributes:["data-bg","data-color-scheme"],customProperties:["--bg-image","--bg-position","--bg-blur","--bg-fit","--bg-opacity","--scrim-strength","--scrim-blur"],elements:['[data-name="bg"]','[data-name="bg-video"]','[data-name="bg-overlay"]','[data-name="scrim"]'],condition:"the layer is raised only when a preset, image, video, gradient, overlay, scrim or `{% bg %}` sandbox guest resolves. In cover mode the scrim is routed to the media well instead, and `data-color-scheme` yields to a scheme a tint already claimed."},describeForRune:(t,e)=>({selectors:[`.${e}--has-bg`]})},G6={name:"width",attributes:["width"],resolve(t){const e=t.tag.attributes?.width??t.config.defaultWidth;return!e||e==="content"?null:{axes:{width:e},classes:[`${t.block}--${e}`]}}},H6={name:"content-measure",resolve:t=>t.config.contentMeasure==="anchored"?{axes:{"content-measure":"anchored"}}:null},K6={name:"spacing",attributes:["spacing"],resolve(t){const e=t.tag.attributes?.spacing;return!e||e==="default"?null:{axes:{spacing:e},classes:[`${t.block}--spacing-${e}`]}}},J6={name:"inset",attributes:["inset"],resolve(t){const e=t.tag.attributes?.inset;return!e||e==="default"?null:{axes:{inset:e},classes:[`${t.block}--inset-${e}`]}}},e9={axis:"width",contract:{description:"The track a block rune occupies.",source:"attribute",inputs:["width"],dataAttributes:["data-width"],classPattern:".{block}--{value}",condition:"suppressed at the `content` default"},describeForRune:t=>t.defaultWidth?{default:t.defaultWidth}:null},t9={axis:"content-measure",contract:{description:"A page-section rune anchors its content to the text measure when bled to the `wide` track; only the surface and background widen.",source:"config",inputs:["contentMeasure"],values:["anchored"],dataAttributes:["data-content-measure"],condition:'not author-facing — emitted only when the rune declares `contentMeasure: "anchored"`'},describeForRune:t=>t.contentMeasure==="anchored"?{default:"anchored"}:null},n9={axis:"spacing",contract:{description:"Block-level rhythm override.",source:"attribute",inputs:["spacing"],dataAttributes:["data-spacing"],classPattern:".{block}--spacing-{value}",condition:"suppressed at the `default` value"},describeForRune:()=>null},r9={axis:"inset",contract:{description:"Internal padding override.",source:"attribute",inputs:["inset"],dataAttributes:["data-inset"],classPattern:".{block}--inset-{value}",condition:"suppressed at the `default` value"},describeForRune:()=>null},i9=["full","compact","minimal"],s9={name:"density",attributes:["density"],resolve:t=>({state:{density:String(t.tag.attributes?.density??t.parentConfig?.childDensity??t.config.defaultDensity??"full")}})},o9={axis:"density",contract:{description:"How tightly a rune packs its content (SPEC-025).",source:"attribute",inputs:["density"],values:i9,default:"full",dataAttributes:["data-density"],condition:"always present on the rune root; resolution is author ▸ the parent rune's `childDensity` ▸ this rune's `defaultDensity` ▸ `full`"},describeForRune:t=>t.defaultDensity?{default:t.defaultDensity}:null},lb="prose";function _h(t){return t.provides?.includes(lb)??!1}const kh="this rune declares no prose body",a9={name:"reading",resolve(t){const e=iT({authorAttr:t.tag.attributes?.reading,runeDefault:t.config.defaultReading});if(!_h(t.config)){const n=rT(t.tag.attributes?.reading);return n?{warnings:[{code:"reading-without-prose",message:`[refrakt] reading="${n}" on "${t.rune}" has nothing to apply to — ${kh}, so no element carries an editorial register. Ignored.`,dedupeKey:`${t.rune}:${n}`}]}:null}return{state:{reading:e}}}},l9={name:"dropcap",after:["reading"],appliesTo:t=>!!t.tag.attributes?.dropcap,resolve(t){if(!_h(t.config))return{warnings:[{code:"dropcap-without-prose",message:`[refrakt] dropcap on "${t.rune}" has nothing to apply to — ${kh}. Ignored.`,dedupeKey:t.rune}]};const e=t.axis("reading")??yh;return Eg[e]?.dropcap===!0?{state:{dropcap:"true"}}:{warnings:[{code:"dropcap-off-register",message:`[refrakt] dropcap is honoured only on a prose body — ignored on "${t.rune}" (reading="${e}").`}]}}},c9={axis:"reading",contract:{description:"Editorial register for body text (SPEC-108). The author picks the register; the theme owns the magnitude.",source:"attribute",inputs:["reading"],values:nT,default:yh,dataAttributes:["data-reading"],target:'[data-section="body"]',condition:"suppressed at the `ui` default, so unmarked bodies carry no attribute"},requires:lb,describeForRune:t=>_h(t)?t.defaultReading?{default:t.defaultReading}:null:kh},u9={axis:"dropcap",contract:{description:"Per-instance drop-cap opt-in (SPEC-108).",source:"attribute",inputs:["dropcap"],dataAttributes:["data-dropcap"],target:'[data-section="body"]',condition:"honoured only when the resolved reading register enables it (`prose`); dropped with a warning otherwise"},requires:lb,describeForRune:t=>_h(t)?null:kh};function dT(t,e,n){for(let r=0;r<t.length;r++){const i=t[r];if(!Kt(i))continue;if(i.attributes?.["data-field"]===e||i.attributes?.["data-name"]===e){const o=i.attributes?.style?String(i.attributes.style):"",a=`--rf-reveal-index: ${n.n}`;t[r]={...i,attributes:{...i.attributes,style:o?`${o}; ${a}`:a}},n.n++}else i.children.length>0&&dT(i.children,e,n)}}const f9={name:"motion",attributes:["reveal","stagger"],resolve(t){const e=t.tag.attributes?.reveal,n=!!t.tag.attributes?.stagger;if(!e&&!n)return null;const r={};return e&&(r.reveal=String(e)),n&&(r.stagger=""),{axes:r,...n?{carry:!0}:{}}},postAssemble(t,e,n){n!==!0||!t.config.staggerItems||dT(e,t.config.staggerItems,{n:0})}},d9={axis:"motion",contract:{description:"Scroll-reveal entrance (SPEC-105). The author declares the character, the theme owns the choreography, a behaviour owns the timing.",source:"attribute",inputs:["reveal","stagger"],dataAttributes:["data-reveal","data-stagger"],customProperties:["--rf-reveal-index"],condition:"`--rf-reveal-index` is stamped on the cascade items named by the rune's `staggerItems`; without `staggerItems`, `stagger` marks the root and nothing else"},describeForRune:t=>t.staggerItems?{target:`[data-name="${t.staggerItems}"], [data-field="${t.staggerItems}"]`}:null};function h9(t,e,n){const r=t.fields[e];return r!=null&&typeof r!="object"?r:Ot(t.tag,e,n)}const p9={name:"modifiers",resolve(t){if(!t.config.modifiers)return null;const e={},n=[],r={},i=[];for(const[s,o]of Object.entries(t.config.modifiers)){o.source==="attribute"&&i.push(s);const a=o.source==="meta"?h9(t,s,o.default):t.tag.attributes[s]??o.default;if(a){if(e[s]=a,o.noBemClass||n.push(`${t.block}--${a}`),o.valueMap){const l=o.valueMap[a]??a;if(o.mapTarget){const c=o.mapTarget.startsWith("data-")?o.mapTarget:`data-${o.mapTarget}`;r[c]=l}else e[s]=l}}else a===""&&(e[s]="")}return{...Object.keys(e).length?{axes:e}:{},...n.length?{classes:n}:{},...Object.keys(r).length?{dataAttrs:r}:{},...i.length?{stripAttrs:i}:{}}}},m9={name:"context-modifiers",resolve(t){const e=t.parentRune?t.config.contextModifiers?.[t.parentRune]:void 0;return e?{classes:[`${t.block}--${e}`]}:null}},g9={name:"static-modifiers",resolve(t){const e=t.config.staticModifiers;return e?.length?{classes:e.map(n=>`${t.block}--${n}`)}:null}},v9={inline:"this rune is inline — the block-level universal axes have nothing to act on",configurator:"this rune supplies axis values to its parent rather than carrying its own",none:"this rune declares no universal attributes"};function O9(t){for(const e of Object.values(t.contract))Array.isArray(e)&&Object.freeze(e);return Object.freeze(t.contract),Object.freeze(t)}const b9=[F6,e9,t9,n9,r9,o9,c9,u9,A6,E6,d9,Q6,q6,I6,z6,U6].map(O9),hT=[p9,m9,g9,Z6,G6,H6,K6,J6,s9,a9,l9,S6,P6,f9,$6,M6,N6,j6,Y6],y9=new Set(hT.flatMap(t=>[...t.attributes??[]])),hw=b6(hT),Vc={duration(t){const e=t.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);if(!e)return t;const n=[];return e[1]&&n.push(`${e[1]}h`),e[2]&&n.push(`${e[2]}m`),e[3]&&n.push(`${e[3]}s`),n.join(" ")||t},uppercase:t=>t.toUpperCase(),capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1)};function w9(t){const e=t.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);if(!e)return null;const n={};return e[1]&&(n.hours=parseInt(e[1],10)),e[2]&&(n.minutes=parseInt(e[2],10)),e[3]&&(n.seconds=parseInt(e[3],10)),n}function _9(t,e){const n=Vc.duration(t);if(!e||e.locale===sT)return n;const r=Intl.DurationFormat;if(typeof r!="function")return n;const i=w9(t);if(!i)return n;try{return new r(e.locale,{style:"short"}).format(i)}catch{return n}}function k9(t){const{prefix:e,runes:n,icons:r={},tints:i={},backgrounds:s={},frames:o={}}=t,a=v6(t.locale,t.strings),l=new Map(Object.keys(n).map(f=>[As(f),f])),c=new O6;function u(f,d){if(f==null||typeof f=="string"||typeof f=="number")return f;if(Array.isArray(f))return f.map(v=>u(v,d));if(!Kt(f))return f;const h=f.attributes?.["data-i18n"];if(h){const{["data-i18n"]:v,...O}=f.attributes,b=f.children.find(w=>typeof w=="string")??"";return{...f,attributes:O,children:[ab(a,h,b)]}}const m=f.attributes?.["data-rune"],p=m?l.get(m):void 0;if(p)return Q9(f,n[p],e,r,i,s,o,n,l,u,a,c,d);if(f.name==="li"){const v=L9(f);if(v)return{...v,children:v.children.map(O=>u(O,d))}}return{...f,children:f.children.map(v=>u(v,d))}}return f=>u(f)}function x9(t){if(typeof t!="string"||t.length===0)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function S9(t,e,n,r){const i=e[n];return i!=null&&typeof i!="object"?i:Ot(t,n,r)}function A9(t,e,n){if(!t.variants)return t;let r=t;for(const[i,s]of Object.entries(t.variants)){const o=t.modifiers?.[i];if(!o)continue;const a=o.source==="attribute"?e.attributes[i]??o.default:S9(e,n,i,o.default);a&&s[a]&&(r=p6(r,s[a]))}return r}const C9=sb;function T9(t){const e=[],n=r=>{if(Kt(r)){r.name==="rf-sandbox"&&e.push(r);for(const i of r.children??[])n(i)}};return n(t),e}function P9(t,e,n){const r=i=>{if(!Kt(i))return;const s=i.attributes?.["data-rune"];if(s){const o=n.get(s);if(o&&e[o]?.interactive)return s}for(const o of i.children??[]){const a=r(o);if(a)return a}};for(const i of t.children??[]){const s=r(i);if(s)return s}}function E9(t,e){return{code:"interactive-guest-in-link",dedupeKey:`interactive-guest:${t}:${e}`,message:`[refrakt] interactive guest \`${e}\` in a linked \`${t}\` — its controls are inert under the whole-tile link. Drop \`href\` or the interactivity.`}}function $9(t,e){return{code:"non-eager-cover-sandbox",dedupeKey:`cover-sandbox:${t}:${e}`,message:`[refrakt] \`activation="${e}"\` on a sandbox serving as a \`${t}\` cover backdrop — the backdrop is inert (pointer-events: none), so the poster/Run affordance is unreachable. Drop \`activation\` (eager is the background mode).`}}function Q9(t,e,n,r,i,s,o,a,l,c,u,f,d){const h=`${n}-${e.block}`,m=t.attributes?.["data-rune"];if(e.requiresParent&&e.requiresParent!=="*"){const j=As(e.requiresParent);d!==j&&f.emit(V9(m??e.block,e.requiresParent,d))}const p=x9(t.attributes["data-rune-fields"]);e=A9(e,t,p);const v=[],O={},b=d?l.get(d):void 0,w={tag:t,config:e,block:h,rune:m??h,parentRune:d,parentConfig:b?a[b]:void 0,fields:p,theme:{tints:i,backgrounds:s,frames:o}},S=w6(hw,w,f);Object.assign(O,S.axes),v.push(...S.classes);const _=S.state.reading??yh,x=S.state.dropcap==="true",C=S.state.density??"full",A=S.state.cover==="true",y={};for(const[j,U]of Object.entries(O)){const ue=j.replace(/([A-Z])/g,"-$1").toLowerCase();y[`data-${ue}`]=U}Object.assign(y,S.dataAttrs);const k=t.attributes.class||"",P=[h,...v,k].filter(Boolean).join(" ");let T=S.absorbs.length?t.children.filter(j=>!S.absorbs.includes(j)):t.children;if(e.autoLabel&&(T=pT(T,e.autoLabel)),e.blocks||e.layout)T=Z9(e,h,T,O,u,f);else if(e.structure){const j=[],U=[];for(const[ue,ke]of Object.entries(e.structure)){const Ce=Pf(ke,ue,O,r,u,e);Ce&&(ke.before?j.push(Ce):U.push(Ce))}if(e.contentWrapper){const ue=At(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},T);T=[...j,ue,...U]}else(j.length||U.length)&&(T=[...j,...T,...U])}else e.contentWrapper&&(T=[At(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},T)]);const E=S.layers.filter(j=>j.placement==="before-content").map(j=>j.element);E.length&&(T=[...E,...T]);let Q=T.map(j=>Kt(j)?c(cb(j,h,e.sections,e.mediaSlots,e.guestFit,_,x),m):c(j,m));e.projection&&(Q=M9(Q,e.projection,h,e.sections,e.mediaSlots,e.guestFit,_,x));const $=!!C9(Q,"link");if($||A){const j=bh(Q);if(j){if(j.attributes={...j.attributes,"data-guest-posture":"presentational"},$){const U=P9(j,a,l);U&&f.emit(E9(m??e.block,U))}if(A)for(const U of T9(j)){(U.attributes?.["data-height"]??"auto")==="auto"&&(U.attributes={...U.attributes,"data-height":"fill"});const ue=U.attributes?.["data-activation"];(ue==="visible"||ue==="click")&&f.emit($9(m??e.block,String(ue)))}}}const L=e.modifiers?new Set(Object.keys(e.modifiers).map(j=>As(j))):void 0,N=new Set(S.consumes),Z=Q.filter(j=>{if(!Kt(j))return!0;const U=j;if(U.name!=="meta"||!U.attributes["data-field"])return!0;const ue=U.attributes["data-field"];return!(L?.has(ue)||N.has(ue))});if(e.sequence){const j=e.sequenceDirection?O[e.sequenceDirection.fromModifier]??e.sequenceDirection.default:void 0;mT(Z,e.sequence,j)}let Y=t.attributes.style||"";const ne=[];if(e.styles)for(const[j,U]of Object.entries(e.styles)){const ue=O[j];ue&&(typeof U=="string"?ne.push(`${U}: ${ue}`):U.transform?ne.push(`${U.prop}: ${U.transform(ue)}`):U.template?ne.push(`${U.prop}: ${U.template.replace("{}",ue)}`):ne.push(`${U.prop}: ${ue}`))}for(const[j,U]of S.styles)ne.push(`${j}: ${U}`);_6(hw,w,S,Z,f),ne.length&&(Y=Y?`${Y}; ${ne.join("; ")}`:ne.join("; "));const{"data-rune":ae,"data-rune-fields":ie,...K}=t.attributes,he=Object.fromEntries(Object.entries(K).filter(([j])=>!y9.has(j)&&!S.stripAttrs.includes(j))),fe={...t,attributes:{...he,...y,class:P,"data-rune":m,"data-density":C,...e.rootAttributes||{},...Y?{style:Y}:{}},children:Z};return e.postTransform?e.postTransform(fe,{modifiers:O,parentType:d,fields:p}):fe}function pT(t,e){return t.map(n=>{if(!Kt(n))return n;const r=e[n.name]??e[n.attributes?.["data-field"]],i=r&&!n.attributes["data-name"]?{...n,attributes:{...n.attributes,"data-name":r}}:n;return i.children.length===0?i:{...i,children:pT(i.children,e)}})}function cb(t,e,n,r,i,s,o){const a=t.attributes["data-name"];if(a){const l=`${e}__${a}`,c=t.attributes.class||"",u=t.children.map(h=>Kt(h)?cb(h,e,n,r,i,s,o):h),f=n?.[a],d=r?.[a];return{...t,attributes:{...t.attributes,class:[l,c].filter(Boolean).join(" "),...f?{"data-section":f}:{},...f==="body"&&s&&s!==yh?{"data-reading":s}:{},...f==="body"&&o?{"data-dropcap":"true"}:{},...d?{"data-media":d}:{},...f==="media"?{"data-guest-fit":i??"clip"}:{}},children:u}}return t}const pw=/^\[(x|X|>|\s|-)\]\s*/,mw={x:"checked",X:"checked"," ":"unchecked",">":"active","-":"skipped"};function L9(t){const e=t.children;if(e.length===0)return null;const n=e[0];if(typeof n=="string"){const r=n.match(pw);if(!r)return null;const i=mw[r[1]]??"unchecked",s=n.slice(r[0].length);return{...t,attributes:{...t.attributes,"data-checked":i},children:[s,...e.slice(1)]}}if(Kt(n)&&n.name==="p"&&n.children.length>0){const r=n.children[0];if(typeof r=="string"){const i=r.match(pw);if(!i)return null;const s=mw[i[1]]??"unchecked",o=r.slice(i[0].length),a={...n,children:[o,...n.children.slice(1)]};return{...t,attributes:{...t.attributes,"data-checked":s},children:[a,...e.slice(1)]}}}return null}function mT(t,e,n){for(let r=0;r<t.length;r++){const i=t[r];if(Kt(i))if(i.name==="ol"){const s={...i.attributes,"data-sequence":e};n&&(s["data-sequence-direction"]=n),t[r]={...i,attributes:s}}else i.children.length>0&&mT(i.children,e,n)}}function gT(t,e){const n=t.findIndex(r=>Kt(r)&&r.attributes?.["data-name"]===e);if(n!==-1){const r=t[n],i=[...t.slice(0,n),...t.slice(n+1)];return{element:r,rest:i}}for(let r=0;r<t.length;r++){const i=t[r];if(!Kt(i))continue;const s=i;if(s.attributes?.["data-name"]!=="preamble")continue;const o=gT(s.children,e);if(!o)continue;const a=[...t];return o.rest.length===0?a.splice(r,1):a[r]={...s,children:o.rest},{element:o.element,rest:a}}return null}function vT(t,e){for(const n of t){if(!Kt(n))continue;const r=n;if(r.attributes?.["data-name"]===e)return r;const i=vT(r.children,e);if(i)return i}return null}function OT(t,e,n,r){return t.map(i=>{if(!Kt(i))return i;const s=i;if(s.attributes?.["data-name"]===e){const a=r==="prepend"?[n,...s.children]:[...s.children,n];return{...s,children:a}}const o=OT(s.children,e,n,r);return o!==s.children?{...s,children:o}:i})}function M9(t,e,n,r,i,s,o,a){let l=[...t];if(e.hide){const c=new Set(e.hide);l=l.filter(u=>{if(!Kt(u))return!0;const f=u.attributes?.["data-name"];return!f||!c.has(f)})}if(e.group)for(const[c,u]of Object.entries(e.group)){const f=new Set(u.members),d=[];let h=-1;for(let m=l.length-1;m>=0;m--){const p=l[m];if(!Kt(p))continue;const v=p.attributes?.["data-name"];v&&f.has(v)&&(d.unshift(p),(h===-1||m<h)&&(h=m),l.splice(m,1))}if(d.length>0){let m=At(u.tag,{"data-name":c},d);m=cb(m,n,r,i,s,o,a),l.splice(h,0,m)}}if(e.relocate)for(const[c,u]of Object.entries(e.relocate)){const f=gT(l,c);if(!f)continue;l=f.rest,vT(l,u.into)&&(l=OT(l,u.into,f.element,u.position??"append"))}return l}function gu(t,e,n,r,i){if(r===void 0)return;if(!t)return r;const s=i??`${e?.scope??"core"}.${e?.block??""}.${n}`;return ab(t,s,r)}function xh(t,e,n){if(!t||!n||e?.i18nEnums?.[n]===void 0)return n;const r=`${e.scope??"core"}.${e.block??""}.${n}`;return ab(t,r,n)}function Pf(t,e,n,r,i,s){if(t.condition&&!n[t.condition]||t.conditionAny&&!t.conditionAny.some(u=>n[u]))return null;const o=t.ref??e;if(t.repeat){const u=parseInt(n[t.repeat.count]??"",10);if(!u||u<0||isNaN(u))return At(t.tag,{"data-name":o},[]);const f=t.repeat.max??10,d=Math.min(u,f),h=t.repeat.filled?parseInt(n[t.repeat.filled]??"0",10):0,m=Math.max(0,Math.min(h,d)),p=[];for(let v=0;v<d;v++){const O=v<m;if(O&&t.repeat.filledElement){const b=Pf(t.repeat.filledElement,t.repeat.filledElement.ref??"",n,r,i,s);b&&p.push(b)}else{const b=Pf(t.repeat.element,t.repeat.element.ref??"",n,r,i,s);b&&(t.repeat.filled?p.push({...b,attributes:{...b.attributes,"data-filled":O?"true":"false"}}):p.push(b))}}return At(t.tag,{"data-name":o},p)}const a={};if(t.attrs)for(const[u,f]of Object.entries(t.attrs))typeof f=="string"?a[u]=f:"fromModifier"in f&&(a[u]=n[f.fromModifier]??"");const l={"data-name":o,...a};if(t.metaType&&(l["data-meta-type"]=t.metaType),t.sentimentMap&&t.metaText){const u=n[t.metaText];if(u){const f=t.sentimentMap[u];f&&(l["data-meta-sentiment"]=f)}}if(t.icon)return At(t.tag,l,[]);if(t.metaText){const u=n[t.metaText]??"";let f=xh(i,s,u);if(f===u&&t.transform&&Vc[t.transform]&&(f=Vc[t.transform](f)),t.label){const d={"data-meta-label":""};t.labelHidden&&(d["data-meta-label-hidden"]="");const h=gu(i,s,t.ref??e,t.label,t.i18nKey)??t.label,m=At("span",d,[h]);let p=f;t.textPrefix&&(p=t.textPrefix+p),t.textSuffix&&(p=p+t.textSuffix);const v=At("span",{"data-meta-value":""},[p]);return At(t.tag,l,[m,v])}return t.textPrefix&&(f=t.textPrefix+f),t.textSuffix&&(f=f+t.textSuffix),At(t.tag,l,[f])}const c=[];if(t.children)for(const u of t.children)if(typeof u=="string")c.push(u);else{const f=Pf(u,u.ref??"",n,r,i,s);f&&c.push(f)}return At(t.tag,l,c)}function q9(t,e,n,r){const i=e[t];if(!i)return null;if(i.condition){const l=n[i.condition];if(!(i.renderWhenEmpty?l!==void 0:!!l))return null}let s=n[t]??"";if(!s&&i.condition&&!i.renderWhenEmpty)return null;i.transform==="duration"?s=_9(s,r):i.transform&&Vc[i.transform]&&(s=Vc[i.transform](s));const o=i.href?n[i.href]??"":void 0;if(i.href&&!o)return null;const a=i.rating?n[i.rating.total??""]||"5":void 0;return{name:t,value:s,field:i,href:o,ratingTotal:a}}function bT(t,e={includeLabel:!0},n,r){const{field:i,value:s}=t,o={class:"rf-badge"};if(i.metaType&&(o["data-meta-type"]=i.metaType),i.sentimentMap){const u=i.sentimentMap[s];u&&(o["data-meta-sentiment"]=u)}const a=i.tag??"span",l={...o};a==="time"&&s&&(l.datetime=s);const c=xh(n,r,s);if(e.includeLabel&&i.label){const u=gu(n,r,t.name,i.label,i.i18nKey)??i.label;return At(a,l,[At("span",{"data-meta-label":""},[u]),At("span",{"data-meta-value":""},[c])])}return At(a,l,[c])}function R9(t,e,n){const{field:r,value:i}=t,s={};r.metaType&&(s["data-meta-type"]=r.metaType);const o=r.tag??"span";return o==="time"&&i&&(s.datetime=i),At(o,s,[xh(e,n,i)])}function yT(t){const e=t.field.splitOn;return!e||!t.value?[t.value].filter(Boolean):t.value.split(e).map(n=>n.trim()).filter(Boolean)}const D9=new Set(["status","category","tag"]);function wT(t){return t.metaType!==void 0&&D9.has(t.metaType)}function N9(t,e,n){const r=gu(e,n,t.name,t.field.label,t.field.i18nKey)??t.value;return At("a",{href:t.href??"","data-meta-type":"link"},[r])}function I9(t){const e=Math.max(0,parseInt(t.value,10)||0),n=Math.max(0,parseInt(t.ratingTotal??"5",10)||5),r=[];for(let i=0;i<n;i++)r.push(At("span",{"data-filled":i<e?"true":"false"},[]));return At("span",{"data-meta-type":"rating"},r)}function B9(t,e,n){const r=t.field.icon.group,i={};t.field.metaType&&(i["data-meta-type"]=t.field.metaType);const s=gu(e,n,t.name,t.field.label,t.field.i18nKey)??xh(e,n,t.value);return At(t.field.tag??"span",i,[At("span",{"data-icon-group":r,"data-icon":t.value},[]),At("span",{"data-meta-value":""},[s])])}function $g(t,e=!1,n,r){return t.field.href?N9(t,n,r):t.field.rating?I9(t):t.field.icon?B9(t,n,r):wT(t.field)?bT(t,{includeLabel:e},n,r):R9(t,n,r)}function j9(t,e,n,r,i){if(e.length===0)return null;const s=[];for(const{resolved:a,align:l}of e){const c=a.field.splitOn&&a.value?yT(a).map(u=>$g({...a,value:u},!1,r,i)):[$g(a,!1,r,i)];l==="end"&&c.length>0&&(c[0]={...c[0],attributes:{...c[0].attributes,"data-align":"end"}}),s.push(...c)}const o={"data-name":t,"data-zone":t,"data-zone-layout":"bar"};return n===!1&&(o["data-wrap"]="false"),At("div",o,s)}function z9(t,e,n,r){if(e.length===0)return null;const i=e.map(s=>{const o=gu(n,r,s.name,s.field.label??s.name,s.field.i18nKey)??s.name,a=At("dt",{"data-meta-label":""},[o]);let l;if(s.field.splitOn&&s.value){const c=yT(s).map(u=>$g({...s,value:u},!1,n,r));l=At("dd",{"data-multi-value":""},c)}else if(wT(s.field))l=At("dd",{},[bT(s,{includeLabel:!1},n,r)]);else{const c={};s.field.metaType&&(c["data-meta-type"]=s.field.metaType);const u=s.field.tag==="time"&&s.value?At("time",{datetime:s.value},[s.value]):s.value;l=At("dd",c,[u])}return At("div",{"data-name":"row","data-field":s.name},[a,l])});return At("dl",{"data-name":t,"data-zone":t,"data-zone-layout":"definition-list"},i)}function Z9(t,e,n,r,i,s){const o=t.blocks??{},a=t.layout??{},l=t.metaFields??{},c=h=>{const m=o[h];if(!m)return null;const p=[];for(const v of m.fields){const O=typeof v=="string"?v:v.field,b=typeof v=="string"?void 0:v.align,w=q9(O,l,r,i);w&&p.push({resolved:w,align:b})}return p.length===0?null:m.layout==="bar"?j9(h,p,m.wrap??!0,i,t):z9(h,p.map(v=>v.resolved),i,t)};if(Object.keys(a).length===0)return n;const u={layout:a,renderBlock:c,warnings:s},f=a.root;if(f){const h=Array.isArray(f)?f:f.children,m=Qg(n),p=new Set,v=Ad(h,m,p,u,["root"]),O=n.filter(b=>!(Kt(b)&&b.attributes["data-name"]&&p.has(b.attributes["data-name"])));return[...v,...O]}let d=n;for(const[h,m]of Object.entries(a)){const p=Array.isArray(m)?m:m.children;d=W9(d,h,v=>{const O=Qg(v),b=new Set,w=Ad(p,O,b,u,[h]),S=v.filter(_=>!(Kt(_)&&_.attributes["data-name"]&&b.has(_.attributes["data-name"])));return[...w,...S]})}return d}function F9(t){return{code:"layout-cycle",dedupeKey:`layout-cycle:${t}`,message:`[refrakt] layout reference cycle at "${t}" — skipping to break the loop.`}}const X9=new Set(["accordion-item","tab","tab-panel","breadcrumb-item","juxtapose-panel","bento-cell","definition","step","tier","map-pin","itinerary-day","itinerary-stop"]);function V9(t,e,n){const r=n?`nested directly in \`${n}\``:"at the top level";return{code:"requires-parent",dedupeKey:`requires-parent:${t}<${n??""}`,severity:X9.has(t)?"error":"warn",message:`[refrakt] \`${t}\` requires parent \`${As(e)}\` — found ${r}.`}}function Qg(t){const e=new Map;for(const n of t)Kt(n)&&n.attributes["data-name"]&&e.set(n.attributes["data-name"],n);return e}function Ad(t,e,n,r,i){const s=[];for(const o of t){if(n.has(o))continue;if(i.includes(o)){r.warnings.emit(F9(o));continue}const a=r.layout[o];if(a&&!Array.isArray(a)&&a.tag){n.add(o);const u=Ad(a.children,e,n,r,[...i,o]);s.push(At(a.tag,{"data-name":o,...a.attrs??{}},u));continue}if(a){const u=e.get(o);if(u){n.add(o);const f=Array.isArray(a)?a:a.children,d=Qg(u.children),h=new Set,m=Ad(f,d,h,r,[...i,o]),p=u.children.filter(v=>!(Kt(v)&&v.attributes["data-name"]&&h.has(v.attributes["data-name"])));s.push({...u,children:[...m,...p]});continue}}const l=r.renderBlock(o);if(l){n.add(o),s.push(l);continue}const c=e.get(o);if(c){n.add(o),s.push(c);continue}}return s}function W9(t,e,n){let r=!1;const i=s=>s.map(o=>r||!Kt(o)?o:o.attributes["data-name"]===e?(r=!0,{...o,children:n(o.children)}):{...o,children:i(o.children)});return i(t)}const Y9={"layout.openMenu":"Open menu","layout.closeMenu":"Close menu","layout.search":"Search","layout.menu":"Menu","layout.plan":"Plan","layout.toggleNavigation":"Toggle navigation","layout.navigationMenu":"Navigation menu","layout.pageNavigation":"Page navigation","layout.planNavigation":"Plan navigation","layout.toggleColorTheme":"Toggle color theme","layout.jumpToSection":"Jump to section"};new Map(Object.entries(Y9).map(([t,e])=>[e,t]));const U9=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),G9=new Set(["$$mdtype"]);function _T(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function H9(t){const e=[];for(const[n,r]of Object.entries(t))if(!G9.has(n)&&!(r==null||r===!1)){if(r===!0){e.push(n);continue}e.push(`${n}="${_T(String(r))}"`)}return e.length?" "+e.join(" "):""}function K9(t,e){return nc(t)}function nc(t){if(t==null)return"";if(typeof t=="string")return _T(t);if(typeof t=="number")return String(t);if(Array.isArray(t))return t.map(nc).join("");if(!Kt(t))return"";const e=t.name;if(!e)return t.children.map(nc).join("");const n=H9(t.attributes);if(U9.has(e))return`<${e}${n} />`;const i=t.attributes?.["data-codeblock"]||t.attributes?.["data-raw-html"]?t.children.map(s=>typeof s=="string"?s:nc(s)).join(""):t.children.map(nc).join("");return`<${e}${n}>${i}</${e}>`}function J9(t,e,n,r){if(!t)return null;const i=t.endsWith("/")?t.slice(0,-1):t,s=e&&e.length>0?e:"main",o=n.split("/").map(l=>encodeURIComponent(l)).join("/"),a=r?`#${eZ(r)}`:"";return`${i}/blob/${s}/${o}${a}`}function eZ(t){const e=t.trim(),n=e.indexOf("-");if(n<0)return`L${e}`;const r=e.slice(0,n).trim(),i=e.slice(n+1).trim();return i?`L${r}-L${i}`:`L${r}`}const{Tag:EJ}=B,gw={tint:["tint","tint-mode"],bg:["bg","bg-gradient","bg-from","bg-to","bg-via","bg-gradient-type","scrim","scrim-type","scrim-strength","scrim-blur","scrim-tone"],width:["width"],spacing:["spacing"],inset:["inset"],elevation:["elevation"],prominence:["prominence"],reading:["reading"],dropcap:["dropcap"],motion:["reveal","stagger"],frame:["frame","frame-aspect","frame-displace","frame-displace-mode","frame-offset","frame-oversize","frame-place","frame-anchor","frame-overflow","frame-shadow"],substrate:["substrate","substrate-size","substrate-opacity","substrate-fill","substrate-target"]},tZ=v9;function nZ(t={}){const e=t.posture??"auto";if(e!=="auto"){const s=tZ[e];return{available:new Set,unavailable:new Map(Object.keys(gw).map(o=>[o,s]))}}const n={block:"",sections:t.structure?.sections,mediaSlots:t.structure?.mediaSlots,frameTarget:t.structure?.frameTarget,provides:t.structure?.provides,modifiers:Object.fromEntries([...t.declaredAttributes??[]].map(s=>[s,{source:"attribute"}]))},r=new Map;for(const s of b9){const o=s.describeForRune(n,"");typeof o=="string"&&r.set(s.axis,o)}const i=new Set;for(const[s,o]of Object.entries(gw))if(!r.has(s))for(const a of o)i.add(a);return{available:i,unavailable:r}}class Re{constructor(e){this.nodes=e,this.offset=0}static fromData(e,n){return new Re([new B.Tag(n,{},[e])])}wrap(e,n={}){return new Re([new B.Tag(e,n,this.nodes)])}tag(e){const n=this.nodes.filter(r=>B.Tag.isTag(r)&&r.name===e);return new Re(n)}tags(...e){const n=this.nodes.filter(r=>B.Tag.isTag(r)&&e.includes(r.name));return new Re(n)}headings(){return this.tags("h1","h2","h3","h4","h5","h6")}typeof(e){return new Re(this.nodes.filter(n=>B.Tag.isTag(n)&&n.attributes["data-rune"]===As(e)))}concat(...e){const n=e.map(r=>r instanceof Re?r.nodes:r).flat();return new Re([...this.nodes,...n])}flatten(){const e=this.nodes.map(n=>B.Tag.isTag(n)?Array.from(GC(n)):n).flat();return new Re(e)}limit(e){return new Re(this.nodes.slice(0,e))}slice(e,n){return new Re(this.nodes.slice(e,n))}toArray(){return this.nodes}count(){return this.nodes.length}next(){return this.nodes[this.offset++]}}function qe(t){const e=t.rune,n=t.typeof??t.schemaOrgType;if(t.properties&&t.refs){const c=new Set(Object.keys(t.properties)),u=Object.keys(t.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(t.schema??{})){if(c===void 0)continue;const u=c instanceof Re?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(t.properties??{})){if(u===void 0)continue;const f=u instanceof Re?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"]=As(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(t.refs||{})){if(u===void 0)continue;(u instanceof Re?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(t.schema??{})){if(u===void 0)continue;(u instanceof Re?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(t.children)?t.children:[t.children]).filter(c=>!o.has(c)&&!s.has(c));return new B.Tag(t.tag,{id:t.id,"data-field":t.property?As(t.property):t.property,"data-rune":e,typeof:n,class:t.class,...Object.keys(i).length>0?{"data-rune-fields":JSON.stringify(i)}:{}},a)}function rZ(t){const e=n=>{if(Array.isArray(n)){n.forEach(e);return}if(!B.Tag.isTag(n))return;const r=n;delete r.attributes.typeof,delete r.attributes.property,(r.children??[]).forEach(e)};return e(t),t}function iZ(t){return t.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*>/gi,"")}function sZ(t){let e=t.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 oZ(t){return t.replace(/(\s(?:href|src|action|formaction|xlink:href)\s*=\s*)(["'])\s*javascript:[^"']*\2/gi,"$1$2$2")}function aZ(t){let e=t.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 lZ(t,e){if(e.trust==="trusted"||e.allowJs)return t;let n=iZ(t);return n=sZ(n),n=oZ(n),n=aZ(n),n}const cZ=new WeakMap,Lg=new WeakMap;function ra(t,e){Lg.set(t,{...Lg.get(t),universalAttributes:e})}function nt(t){return Array.isArray(t)?t:t!=null?[t]:[]}const uZ={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"},reading:{type:String,required:!1,matches:["fine","ui","prose"],description:"Reading register for this block’s body (SPEC-108): fine | ui | prose. The theme owns the editorial treatment."},dropcap:{type:Boolean,required:!1,description:"Style the opening letter of a prose body as a drop cap (SPEC-108). Honoured only when the body reads as prose; ignored otherwise."},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"},elevation:{type:String,required:!1,matches:["sunken","flush","flat","raised","floating","overlay","none","sm","md","lg"],description:"Surface depth on the SPEC-107 ladder (sunken→overlay); none/sm/md/lg are deprecated aliases"},prominence:{type:String,required:!1,matches:["quiet","normal","prominent","display"],description:"Section-header emphasis (only on page-section-header family runes)"},reveal:{type:String,required:!1,matches:["none","fade","slide","scale","blur"],description:"Scroll-reveal entrance character (none|fade|slide|scale|blur); the theme owns the choreography"},stagger:{type:Boolean,required:!1,description:"Cascade this block's items in as it reveals (no-op on single-child runes)"},frame:{type:String,required:!1,description:"Named frame preset presenting this block's media surface"},"frame-aspect":{type:String,required:!1,description:'Aspect ratio of the framed media, e.g. "16/9"'},"frame-displace":{type:String,required:!1,matches:["top","bottom","end","bottom-end","top-end","both"],description:"Edge/corner the framed guest moves toward"},"frame-displace-mode":{type:String,required:!1,matches:["peek","bleed"],description:"How displacement renders: `peek` (default) translates the guest visually inside its frame target; `bleed` uses negative margin on the media zone so following layout pulls up — extends past a section like a hero without leaving a gap above"},"frame-offset":{type:String,required:!1,matches:["none","sm","md","lg","xl","2xl","3xl","4xl"],description:"Displacement distance (non-linear named scale: sm…xl ride the block-spacing tokens, 2xl/3xl/4xl step up to section-spacing for bleed-mode displacements that clear a section edge)"},"frame-oversize":{type:String,required:!1,description:"How far the guest exceeds its slot (scale factor)"},"frame-place":{type:String,required:!1,description:'Guest-box alignment in the slot (e.g. "left top")'},"frame-anchor":{type:String,required:!1,description:"Crop focal point when the guest is cut (object-position)"},"frame-overflow":{type:String,required:!1,matches:["clip","bleed"],description:"How the frame handles a guest whose content is wider than it: `clip` (default) keeps it inside the rounded frame; `bleed` runs an overflowing guest out to the layout edge on a narrow viewport so it reads as cropped by the screen (a bleed host only — hero/feature)"},"frame-shadow":{type:String,required:!1,matches:["none","sm","md","lg"],description:"Silhouette drop-shadow strength for the framed media"},substrate:{type:String,required:!1,matches:["dots","grid","lines","cross","checker","none"],description:"Generated surface pattern"},"substrate-size":{type:String,required:!1,matches:["sm","md","lg"],description:"Pattern cell size"},"substrate-opacity":{type:String,required:!1,matches:["sm","md","lg"],description:"Pattern ink strength"},"substrate-fill":{type:String,required:!1,matches:["inherit","inset"],description:"Surface fill the pattern sits on (full colour stays with tint)"},"substrate-target":{type:String,required:!1,matches:["self","media"],description:"Which surface the pattern fills (overrides the rune/theme default)"},"bg-gradient":{type:String,required:!1,matches:["to-t","to-b","to-l","to-r","to-tr","to-br","to-bl","to-tl"],description:"Gradient direction (bounded named set)"},"bg-from":{type:String,required:!1,description:"Gradient start colour — a semantic token name (→ var(--rf-color-*))"},"bg-to":{type:String,required:!1,description:"Gradient end colour — a semantic token name"},"bg-via":{type:String,required:!1,description:"Optional middle gradient stop — a semantic token name"},"bg-gradient-type":{type:String,required:!1,matches:["linear","radial","conic"],description:"Gradient type"},scrim:{type:String,required:!1,matches:["top","bottom","left","right","none"],description:'Scrim direction (heaviest edge); presence turns the scrim on, "none" opts out of the default cover scrim'},"scrim-type":{type:String,required:!1,matches:["gradient","frost"],description:"Scrim treatment: gradient (default) or frost (backdrop blur)"},"scrim-strength":{type:String,required:!1,matches:["sm","md","lg"],description:"Gradient scrim strength"},"scrim-blur":{type:String,required:!1,matches:["none","sm","md","lg"],description:"Frost scrim blur amount"},"scrim-tone":{type:String,required:!1,matches:["dark","light"],description:"Whether the scrim darkens (for light text) or lightens (for dark text)"}},fZ=["bg-gradient","bg-from","bg-to","bg-via","bg-gradient-type","scrim","scrim-type","scrim-strength","scrim-blur","scrim-tone"],dZ=["frame-aspect","frame-displace","frame-displace-mode","frame-offset","frame-oversize","frame-place","frame-anchor","frame-overflow","frame-shadow"],hZ=["substrate-size","substrate-opacity","substrate-fill","substrate-target"];function pZ(t,e){if(!B.Tag.isTag(t))return t;const n=[];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"&&n.push(s)}const r=i=>n.some(s=>B.Tag.isTag(s)&&s.attributes["data-field"]===i);return e.tint&&!r("tint")&&n.push(new B.Tag("meta",{"data-field":"tint",content:e.tint})),e["tint-mode"]&&e["tint-mode"]!=="auto"&&!r("tint-mode")&&n.push(new B.Tag("meta",{"data-field":"tint-mode",content:e["tint-mode"]})),n.length===0||(t.children=[...t.children,...n]),t}function kT(t){const e=Array.isArray(t)?t:[t];for(const n of e){if(!B.Tag.isTag(n))continue;if(n.name==="rf-sandbox")return n;const r=kT(n.children);if(r)return r}}function vw(t){return new B.Tag(t.name,{...t.attributes,"data-bg-guest":"","data-guest-posture":"backdrop","data-height":"fill","data-activation":"eager"},t.children)}const Ow=new WeakMap;function mZ(t,e,n){const r=`${t.src}\0${t.framework??""}\0${t.dependencies??""}`;let i=Ow.get(n);i||(i=new Map,Ow.set(n,i));const s=i.get(r);if(s)return vw(s);const o={src:t.src};t.framework&&(o.framework=t.framework),t.dependencies&&(o.dependencies=t.dependencies);const a=new B.Ast.Node("tag",o,[],"sandbox"),l=kT(B.transform(a,e));if(l)return i.set(r,l),vw(l)}function gZ(t,e){if(!B.Tag.isTag(t))return t;const n=[],r=[];if(e.bgNode){const s=B.transform(e.bgNode,e.config);if(B.Tag.isTag(s))for(const o of s.children)B.Tag.isTag(o)&&(o.name==="meta"?n.push(o):o.attributes["data-bg-guest"]!==void 0&&r.push(o))}const i=n.some(s=>B.Tag.isTag(s)&&s.attributes["data-field"]==="bg-preset");if(e.bg&&!i&&n.push(new B.Tag("meta",{"data-field":"bg-preset",content:e.bg})),e.bg&&r.length===0){const s=e.config?.variables?.__backgrounds,o=s?.[e.bg];if(o&&s){const a=o.extends?s[o.extends]:void 0,l=o.sandbox||a?.sandbox?{...a?.sandbox,...o.sandbox}:void 0;if(l?.src){const c=mZ(l,e.config,s);c&&r.push(c)}}}return n.length===0&&r.length===0||(t.children=[...t.children,...n,...r]),t}function vZ(t,e){if(!B.Tag.isTag(t))return t;const n=i=>t.children.some(s=>B.Tag.isTag(s)&&s.name==="meta"&&s.attributes["data-field"]===i),r=[];e.frame&&!n("frame")&&r.push(new B.Tag("meta",{"data-field":"frame",content:String(e.frame)}));for(const i of dZ){const s=e[i];s!=null&&s!==""&&!n(i)&&r.push(new B.Tag("meta",{"data-field":i,content:String(s)}))}return r.length===0||(t.children=[...t.children,...r]),t}function OZ(t,e){if(!B.Tag.isTag(t))return t;const n=i=>t.children.some(s=>B.Tag.isTag(s)&&s.name==="meta"&&s.attributes["data-field"]===i),r=[];for(const i of fZ){const s=e[i];s!=null&&s!==""&&!n(i)&&r.push(new B.Tag("meta",{"data-field":i,content:String(s)}))}return r.length===0||(t.children=[...t.children,...r]),t}function bZ(t,e){if(!B.Tag.isTag(t))return t;const n=i=>t.children.some(s=>B.Tag.isTag(s)&&s.name==="meta"&&s.attributes["data-field"]===i),r=[];e.substrate&&!n("substrate")&&r.push(new B.Tag("meta",{"data-field":"substrate",content:String(e.substrate)}));for(const i of hZ){const s=e[i];s!=null&&s!==""&&!n(i)&&r.push(new B.Tag("meta",{"data-field":i,content:String(s)}))}return r.length===0||(t.children=[...t.children,...r]),t}function Xe(t){const e={};t.base&&Object.assign(e,t.base),t.attributes&&Object.assign(e,t.attributes);const{available:n}=nZ({posture:t.universalAttributes,structure:{...t.sections&&{sections:t.sections},...t.mediaSlots&&{mediaSlots:t.mediaSlots},...t.frameTarget&&{frameTarget:t.frameTarget},...t.provides&&{provides:t.provides}},declaredAttributes:Object.keys(e)});for(const[s,o]of Object.entries(uZ))n.has(s)&&(e[s]=o);t.deferBody&&(e["__deferred-body"]={type:String,required:!1});const r=t.deprecations;if(r){for(const[s,o]of Object.entries(r))if(!e[s]){const a=e[o.newName];e[s]={type:a?.type??String,required:!1,deprecated:!0}}}const i={attributes:e,...t.selfClosing!=null&&{selfClosing:t.selfClosing},transform:(s,o)=>{if(r){for(const[p,v]of Object.entries(r))if(s.attributes[p]!==void 0&&s.attributes[v.newName]===void 0){const O=v.transform?v.transform(s.attributes[p],s.attributes):s.attributes[p];O!==void 0&&(s.attributes[v.newName]=O)}}const a=s.transformAttributes(o),l=typeof t.contentModel=="function"?t.contentModel(a):t.contentModel,{content:c,tintNode:u,bgNode:f}=H8(s.children,l,a),d=t.transform(c,a,o,s),h={tintNode:u,bgNode:f,tint:a.tint,"tint-mode":a["tint-mode"],bg:a.bg,config:o},m=gZ(pZ(d,h),h);return B.Tag.isTag(m)&&(a.width&&(m.attributes.width=a.width),a.spacing&&(m.attributes.spacing=a.spacing),a.inset&&(m.attributes.inset=a.inset),a.elevation&&(m.attributes.elevation=a.elevation),a.prominence&&(m.attributes.prominence=a.prominence),a.reveal&&(m.attributes.reveal=a.reveal),a.stagger&&(m.attributes.stagger=a.stagger),a.reading&&(m.attributes.reading=a.reading),a.dropcap&&(m.attributes.dropcap=a.dropcap)),OZ(bZ(vZ(m,a),a),a)}};return r&&(i.validate=s=>{const o=[];for(const[a,l]of Object.entries(r))s.attributes[a]!==void 0&&o.push({id:"deprecated-attribute",level:"warning",message:`Attribute "${a}" is deprecated. Use "${l.newName}" instead.`});return o}),t.deferBody&&(i.deferBody=!0),cZ.set(i,t.contentModel),Lg.set(i,{...t.sections&&{sections:t.sections},...t.mediaSlots&&{mediaSlots:t.mediaSlots},...t.frameTarget&&{frameTarget:t.frameTarget},universalAttributes:t.universalAttributes??"auto",...t.provides&&{provides:t.provides}}),t.base&&e6.set(i,t.base),i}class yZ{validate(e,n,r){return typeof e!="string"?[{id:"attribute-type-invalid",level:"error",message:`Attribute '${r}' is not a string`}]:[]}}class wZ extends yZ{transform(e){return e?e.split(" ").map(n=>n.trim()):[]}}const{Tag:_Z}=B,kZ=["row","column","dense","row dense","column dense"];function xZ(t,e){return!t||t.length===0?e.map(n=>({colspan:1,rowspan:void 0,children:n})):t.map((n,r)=>{const[i,s]=n.split(":");return{colspan:parseInt(i),rowspan:s?parseInt(s):void 0,children:e[r]}}).filter(n=>n.children!==void 0)}function SZ(t){const e=t.items.map(({children:r,colspan:i,rowspan:s})=>r.wrap("div",{"data-colspan":i,"data-rowspan":s}).toArray()).flat(),n={"data-layout":"grid","data-columns":t.columns,"data-rows":t.rows,"data-flow":t.flow};return new _Z("div",n,e)}const{Tag:qs}=B,AZ=["columns","auto","masonry"],CZ=Xe({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:kZ.slice(),description:"Direction items fill the grid"},spans:{type:wZ,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:(t,e)=>{if(typeof t=="string"&&AZ.includes(t)){e.mode=t;return}return t}}},transform(t,e,n){const i=(t.zones??[]).map(p=>new Re(B.transform(nt(p.content),n))),s=SZ({items:xZ(e.spans,i),rows:e.rows,columns:e.columns,flow:e.flow}),o=e.ratio?new qs("meta",{content:e.ratio}):void 0,a=e.gap&&e.gap!=="default"?new qs("meta",{content:e.gap}):void 0,l=e.valign?new qs("meta",{content:e.valign}):void 0,c=e.collapse?new qs("meta",{content:e.collapse}):void 0,u=e.mode&&e.mode!=="columns"?new qs("meta",{content:e.mode}):void 0,f=e.min?new qs("meta",{content:e.min}):void 0,d=e.aspect?new qs("meta",{content:e.aspect}):void 0,h=e.stack?new qs("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 Re(s.children).tag("div")}})}}),{Tag:Il}=B,TZ={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 PZ(t){return TZ[t]||t.charAt(0).toUpperCase()+t.slice(1)}function EZ(t){if(!t)return"";const e=t.endsWith("/")?t.slice(0,-1):t,n=e.lastIndexOf("/");return n>=0?e.slice(n+1):e}function $Z(t,e){if(!t)return"";const n=EZ(t);return n?e?`${n}:${e}`:n:""}const QZ=["scroll","wrap","hide"],xT={topbar:"header"},LZ=Xe({sections:xT,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:QZ.slice(),description:"How overflowing code is handled"}},contentModel:{type:"sequence",fields:[{name:"panels",match:"fence",greedy:!0}]},transform(t,e,n){const r=e.labels?.split(",").map(p=>p.trim())??[],i={},s=[];if(e.title!==void 0){const p=new Il("meta",{content:e.title});i.title=p,s.push(p)}const o=e.overflow;if(o&&o!=="scroll"){const p=new Il("meta",{content:o});i.overflow=p,s.push(p)}const a=nt(t.panels);if(a.length===1&&r.length===0){const p=B.transform(a[0],n);return s.push(p),qe({rune:"code-group",tag:"section",properties:i,refs:{},children:s})}const c=[],u=[];for(const p of a){const v=p.attributes.language||"shell",O=typeof p.attributes.label=="string"?p.attributes.label:"",b=$Z(typeof p.attributes.source=="string"?p.attributes.source:void 0,typeof p.attributes.lines=="string"?p.attributes.lines:void 0),w=r[c.length]||O||b||PZ(v),S=new Il("span",{},[w]);c.push(new Il("button",{"data-name":"tab",role:"tab"},[S]));const _=B.transform(p,n);u.push(new Il("div",{role:"tabpanel"},[_]))}const f=new Re(c),d=new Re(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})}}),MZ=Xe({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(t,e){throw new Error('{% snippet %} reached the transform phase unresolved.\n\nIf this file is pulled in with {% partial %}: use {% include %} instead. Markdoc expands partials during the transform, which is after the preprocess phase that resolves `snippet` — so a `snippet` tag inside a partial never gets read. {% include file="..." /%} pastes the file before preprocess, so `snippet` and `data` inside it resolve. Both runes read the same `_partials/` directory and file roots, so only the call site changes.\n\nIf you are building a custom pipeline: registered `preprocess` hooks must run before `Markdoc.transform` (snippet pre-resolves to a Markdoc `fence` node; see SPEC-062 § Composition).')}}),qZ=Xe({attributes:{src:{type:String,required:!0,description:"Path to the source file, relative to the project root (sandboxed)."},format:{type:String,required:!1,matches:["csv","tsv","json","ndjson"],description:"Source format. Inferred from the file extension; override for ambiguity."},delimiter:{type:String,required:!1,description:"Override the field separator (CSV/TSV)."},header:{type:Boolean,required:!1,description:"CSV/TSV: whether the first row is the header (default true). false synthesizes col1…"},root:{type:String,required:!1,description:"JSON: dotted path / JSON Pointer to the array or map within the document."},orient:{type:String,required:!1,matches:["records","values","index"],description:"JSON: how each element maps to a row. records/values auto-detected; index is explicit."},"key-column":{type:String,required:!1,description:"JSON: when orient=index, the header for the synthesized key column."},columns:{type:String,required:!1,description:`Select + order + rename: "name as Product, revenue as 'Revenue ($)'".`},where:{type:String,required:!1,description:"Filter rows with the field:value grammar (SPEC-070)."},sort:{type:String,required:!1,description:'Sort by a column; "-" prefix for descending.'},limit:{type:Number,required:!1,description:"Maximum number of rows."},offset:{type:Number,required:!1,description:"Skip this many rows before limiting."},headers:{type:String,required:!1,description:'Header labels for a `---`-delimited body, e.g. "Attribute, Type". Setting it makes the body one table ROW — cells separated by `---` — instead of a run of blocks, so cells can carry emphasis, links, runes and {% if %}. Requires a body.'},numeric:{type:String,required:!1,description:"Comma-separated columns to force to numeric typing (emits data-value)."},text:{type:String,required:!1,description:"Comma-separated columns to force to text typing."}},contentModel:{type:"sequence",fields:[]},transform(t,e){throw new Error('{% data %} reached the transform phase unresolved.\n\nIf this file is pulled in with {% partial %}: use {% include %} instead. Markdoc expands partials during the transform, which is after the preprocess phase that resolves `data` — so a `data` tag inside a partial never gets read. {% include file="..." /%} pastes the file before preprocess, so `data` and `snippet` inside it resolve. Both runes read the same `_partials/` directory and file roots, so only the call site changes.\n\nIf you are building a custom pipeline: registered `preprocess` hooks must run before `Markdoc.transform` (data pre-resolves to a Markdoc `table` node; see SPEC-103 § Architecture).')}}),RZ=Xe({attributes:{file:{type:String,required:!0,description:'Partial to paste, by the same key `{% partial %}` uses — a path under the site\'s `_partials/` (e.g. "attrs.md") or a namespaced file root ("shared:attrs.md").'},variables:{type:Object,required:!1,description:'Bindings substituted into the pasted AST at paste time, e.g. variables={q: "rune:card"} makes `$q` inside the file that string. Unlike `partial`, this is substitution rather than a transform-time scope, so bound values reach preprocessor attributes such as `{% data where=$q %}`.'}},contentModel:{type:"sequence",fields:[]},transform(t,e){throw new Error("{% include %} reached the transform phase unresolved — its preprocess hook was not wired through. Ensure the content pipeline runs registered `preprocess` hooks before `Markdoc.transform` (include pastes its file's AST; see SPEC-129).")}}),{Tag:DZ}=B,ST={inline:!0,attributes:{},transform(t,e){const n=t.transformChildren(e);return new DZ("code",{"data-rune":"code"},n)}};ra(ST,"inline");const{Tag:NZ}=B,IZ=["caution","check","note","warning"],AT={header:"header"},BZ=Xe({sections:AT,attributes:{type:{type:String,matches:IZ.slice(),errorLevel:"critical",description:"Visual style: caution, check, note, or warning"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new NZ("meta",{content:e.type??"note"}),s=new Re(B.transform(nt(t.body),n)).wrap("div");return qe({rune:"hint",tag:"section",property:"contentSection",properties:{hintType:r},refs:{body:s.tag("div")},children:[r,s.next()]})}}),CT={"media-position":{type:String,required:!1,matches:["top","bottom","start","end","cover"],description:"Where the media zone sits relative to the content: above (top), below (bottom), or beside (start/end)"},"media-ratio":{type:String,required:!1,matches:["1/3","2/5","1/2","3/5","2/3"],description:"Media zone’s share of the row width when media is beside content (start/end)"},valign:{type:String,required:!1,matches:["top","center","bottom","stretch"],description:"Cross-axis alignment when media is beside content (start/end); applies to the shorter zone"},collapse:{type:String,required:!1,matches:["sm","md","lg","never"],description:"Breakpoint at which side-by-side layouts collapse to a single stacked column"}};J8(CT,{name:"split layout",description:"Layout controls shared by media+content runes — `media-position`, `media-ratio`, `valign`, `collapse`."});const jZ=CT;Xe({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=t.body?Array.isArray(t.body)?t.body:[t.body]:[],i=new Re(B.transform(r,{...n,nodes:{...n.nodes,text:{transform(s){return new B.Tag("span",{},[s.attributes.content])}}}}));return new B.Tag("li",{},i.toArray())}});function zZ(t){const e=t["media-position"]||"top",n=t["media-ratio"],r=t.valign,i=t.collapse,s=e==="start"||e==="end",o=new B.Tag("meta",{content:e}),a=s&&n?new B.Tag("meta",{content:n}):void 0,l=s&&r?new B.Tag("meta",{content:r}):void 0,c=i?new B.Tag("meta",{content:i}):void 0,u=[o];return a&&u.push(a),l&&u.push(l),c&&u.push(c),{metas:{mediaPosition:o,mediaRatio:a,valign:l,collapse:c},children:u}}function ZZ(t){const e=[[]];for(const n of t)n.type==="hr"?e.push([]):e[e.length-1].push(n);return e.length===1?{media:[],body:e[0],footer:[]}:e.length===2?{media:e[0],body:e[1],footer:[]}:{media:e[0],body:e.slice(1,-1).flat(),footer:e[e.length-1]}}function TT(t){return B.Tag.isTag(t)&&t.name==="svg"&&/\b(rf-placeholder|rf-icon)\b/.test(String(t.attributes?.class??""))}function Wc(t){return B.Tag.isTag(t)&&(t.name==="img"||t.name==="video"||TT(t))}function FZ(t){for(const e of t.toArray()){if(Wc(e))return e;if(B.Tag.isTag(e)&&e.name==="p"){const n=e.children.find(r=>Wc(r));if(n)return n}}}function XZ(t){return t.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"]||TT(e.children[0]))?e.children[0]:e)}function Cl(t){const e=t.nodes,n=c=>B.Tag.isTag(c)&&/^h[1-6]$/.test(c.name),r=c=>B.Tag.isTag(c)&&c.name==="p",i=e.findIndex(n);if(i===-1)return{eyebrow:void 0,headline:void 0,image:t.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&&n(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:t.tag("img").limit(1),blurb:l!==-1?e[l]:void 0}}const{Ast:PT,Tag:VZ}=B,WZ=Xe({attributes:{name:{type:String,required:!0},image:{type:String,required:!1}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){let r=new Re([]);e.image&&(r=r.concat(B.transform(new PT.Node("image",{src:e.image}),n))),r=r.concat(new VZ("span",{},[e.name??""]));const i=new Re(B.transform(nt(t.body),n)),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 YZ(t){const e=ib()(t),n=e.length-1;if(!e[n]||e[n].type!=="list")return t;const r=e[n].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 PT.Node("tag",{name:a,image:o?o.attributes.src:void 0},i.children.slice(1),"tab")});return e.splice(n,1,...r),e}const ET={preamble:"preamble",headline:"title",blurb:"description"},UZ=Xe({sections:ET,attributes:{},contentModel:()=>({type:"custom",processChildren:t=>YZ(t),description:"Converts headings at the specified level to tab tags, extracting tab name and optional image from heading content."}),transform(t,e,n){const r=nt(t.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 Re(B.transform(i,n)),a=new Re(B.transform(s,n)),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:{...Cl(o),tabs:u,panels:f},children:d})}}),$T="__nav-auto",QT="auto";function ub(t){return B.Tag.isTag(t)&&(t.name==="ul"||t.name==="ol")}const GZ=Xe({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Re(B.transform(nt(t.body),{...n,nodes:{...n.nodes,text:{transform(v){return new B.Tag("span",{"data-field":"slug"},[v.attributes.content])}}}})),i=r.tag("a").toArray(),s=r.tag("span"),o=r.tag("ul"),a=r.toArray().filter(v=>B.Tag.isTag(v)&&v.attributes?.["data-rune"]==="badge"),l=r.tag("p").toArray(),c=[],u=[];for(const v of l)v.children.some(b=>B.Tag.isTag(b)&&b.name==="a")?c.push(v):u.push(v);const f=c.flatMap(v=>v.children.filter(O=>B.Tag.isTag(O)&&O.name==="a")),d=[...i,...f],h=u.flatMap(v=>v.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 v=m?d.map(b=>({...b,children:[...b.children??[],m]})):d,O=[];if(a.length>0){for(const b of a)b.attributes["data-name"]="badge";O.push(...a)}return qe({rune:"nav-item",tag:"li",properties:m?{description:m}:{},children:[...v,...O]})}const p=[];if(s.count()>0&&p.push(...s.toArray()),m&&p.push(m),a.length>0){for(const v of a)v.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 HZ(t){const e=[],n=[];let r=null;const i=()=>{r&&(n.push(r),r=null)};for(const s of t){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(),n.push({kind:"column-break"});continue}if(!r){B.Tag.isTag(s)&&ub(s)&&e.push(...s.children.filter(o=>B.Tag.isTag(o)&&o.name==="li"));continue}r.children.push(s)}return i(),{topLevel:e,sequence:n}}function KZ(t){const e=u=>B.Tag.isTag(u)?u.name==="ul"||u.name==="ol"?!0:!!u.attributes?.["data-rune"]:!1,n=u=>B.Tag.isTag(u)&&!e(u);let r=-1,i=-1;t.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(n(t[u])){s=u;break}for(let u=t.length-1;u>i;u--)if(n(t[u])){o=u;break}}else{const u=[];t.forEach((f,d)=>{n(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?t[s]:void 0,l=o!==void 0?t[o]:void 0,c=[];return t.forEach((u,f)=>{f===s||f===o||c.push(u)}),{intro:a,body:c,footer:l}}function JZ(t){const{intro:e,body:n,footer:r}=KZ(t.children),i=[];for(const a of n)B.Tag.isTag(a)&&ub(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(...n),r&&s.push(new B.Tag("div",{"data-name":"footer"},[r]));const o=[t.heading];return s.length>0&&o.push(new B.Tag("div",{"data-name":"panel"},s)),qe({rune:"nav-group",tag:"section",properties:{title:t.heading,item:i},children:o})}function eF(t){const e=[];let n=[];for(const r of t)r.kind==="column-break"?(n.length>0&&e.push(n),n=[]):n.push(r);return n.length>0&&e.push(n),e}const tF=Xe({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:t=>ib({level:1})(t),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(t,e,n){const r=!!e.collapsible,i=n.variables?.__sourcePath,s=v=>{if(e.layout&&(v.attributes.layout=e.layout),i&&(v.attributes["data-source-path"]=i),e.auto&&(v.attributes["data-auto"]="true"),r){v.attributes["data-collapsible"]="true";const O=v.attributes.class??"";v.attributes.class=[O,"rf-nav--collapsible"].filter(Boolean).join(" "),typeof e.defaultOpen=="string"&&e.defaultOpen.trim()&&(v.attributes["data-default-open"]=e.defaultOpen.trim())}return v},o=v=>e.layout==="menubar"?[new B.Tag("button",{"data-name":"trigger",type:"button","aria-label":"Toggle navigation","aria-expanded":"false"},[]),...v]:v;if(e.auto){const v=new B.Tag("meta",{"data-field":$T,content:"true"});return s(qe({rune:"nav",tag:"nav",properties:{group:[],item:[]},children:o([v])}))}const a=new Re(B.transform(nt(t.children),{...n,nodes:{...n.nodes,item:GZ,list:{transform(v,O){return new B.Tag("ul",{},v.transformChildren(O))}}}}));if(e.layout==="strip"){const v=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:v},children:a.toArray()}))}const{topLevel:l,sequence:c}=HZ(a.toArray()),u=c.filter(v=>v.kind==="group"),f=u.length>0,d=c.some(v=>v.kind==="column-break");if(!f){if(e.layout==="columns"&&d){const O=[];let b=[];const w=()=>{b.length>0&&(O.push([new B.Tag("ul",{},b)]),b=[])};for(const x of a.toArray()){if(B.Tag.isTag(x)&&x.name==="hr"){w();continue}B.Tag.isTag(x)&&ub(x)&&b.push(...x.children.filter(C=>B.Tag.isTag(C)&&C.name==="li"))}w();const S=O.map(x=>new B.Tag("div",{"data-name":"column"},x)),_=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:_},children:o(S)}))}const v=a.flatten().tag("li");return s(qe({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:v},children:o(a.toArray())}))}const h=u.map(JZ);if(r)for(const v of h)v.attributes["data-collapsed"]=QT;const m=l.length>0?new B.Tag("div",{"data-name":"top-level"},[new B.Tag("ul",{},l)]):null,p=h.flatMap(v=>{const O=[],b=w=>{if(B.Tag.isTag(w)){if(w.name==="li"){O.push(w);return}for(const S of w.children)b(S)}};for(const w of v.children)b(w);return O});if(e.layout==="columns"&&d){const v=eF(c),O=new Map(u.map((w,S)=>[w,h[S]])),b=v.map(w=>new B.Tag("div",{"data-name":"column"},w.map(S=>O.get(S)).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:nF}=B,rF=["replace","prepend","append"],iF=Xe({attributes:{name:{type:String,required:!0,description:"Name of the layout region to fill"},mode:{type:String,required:!1,matches:rF.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(t,e,n){const r=B.transform(nt(t.body),n);return new nF("div",{"data-region":e.name,"data-mode":e.mode},r)}}),{Tag:sF}=B,oF=Xe({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(t,e,n){const r=B.transform(nt(t.body),n);return new sF("div",{"data-layout-def":!0,"data-extends":e.extends},r)}}),{Tag:aF}=B,lF=Xe({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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.summary||"Details",s=new aF("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:po}=B,Mg="data-drawer-title-auto",cF=["right","left","top","bottom"],uF=["sm","md","lg"];function fF(t){const e=t.findIndex(n=>n.type==="hr");return e<0?{body:t,footer:null}:{body:t.slice(0,e),footer:t.slice(e+1)}}const LT={header:"header",body:"body",footer:"footer"},dF=Xe({sections:LT,provides:["prose"],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:cF.slice(),description:'Edge the panel slides from when enhanced. Defaults to "right".'},size:{type:String,required:!1,matches:uF.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(t,e,n){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 po(`h${a}`,{},[i]):new po("h3",{[Mg]:"true"},[i]):void 0,c=new po("button",{type:"button","aria-label":"Close",hidden:!0},["×"]),u=[];l&&u.push(l),u.push(c);const f=new po("header",{},u),d=fF(nt(t.body)),h=new Re(B.transform(d.body,n)).wrap("div"),m=d.footer!==null?new Re(B.transform(d.footer,n)).wrap("footer"):null,p={side:new po("meta",{content:s}),size:new po("meta",{content:o})};e.shortcut&&(p.shortcut=new po("meta",{content:e.shortcut}));const v=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 v.attributes["data-drawer-id"]=r,v}}),{Tag:Ku}=B,hF=["small","medium","large","full"],pF=["left","center","right"],MT={caption:"description"},qT="self",mF=Xe({sections:MT,frameTarget:qT,attributes:{size:{type:String,required:!1,matches:hF.slice(),description:"Display width of the figure"},align:{type:String,required:!1,matches:pF.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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=r.flatten().toArray().filter(f=>Wc(f)),s=r.tag("p").toArray().filter(f=>{const d=(f.children||[]).filter(h=>B.Tag.isTag(h));return!(d.length===1&&Wc(d[0]))}),o=e.caption||void 0,a=o?new Ku("figcaption",{},[o]):s.length>0?new Ku("figcaption",{},[s[0]]):void 0,l=e.size?new Ku("meta",{content:e.size}):void 0,c=e.align?new Ku("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})}}),bw={grid:"grid",carousel:"carousel"};function gF(t,...e){return[...t,...e]}const{Tag:mo}=B,vF=Xe({attributes:{layout:{type:String,required:!1,matches:gF([bw.grid,bw.carousel],"masonry"),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"},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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.layout??"grid",s=e.columns??3,o=e.lightbox??!0,a=e.caption??"",c=r.flatten().toArray().filter(O=>Wc(O)).map(O=>{const b=O.attributes?.alt||O.attributes?.["aria-label"]||"",w=[O];return b&&w.push(new mo("figcaption",{},[b])),new mo("figure",{"data-name":"item"},w)}),u=new mo("meta",{content:i}),f=new mo("meta",{content:String(o)}),d=s!==3?new mo("meta",{content:String(s)}):void 0,h=a?new mo("figcaption",{},[a]):void 0,m=new mo("div",{"data-name":"items"},c),v=[...[u,f,d].filter(Boolean),m];return h&&v.push(h),qe({rune:"gallery",schemaOrgType:"ImageGallery",tag:"figure",properties:{layout:u,lightbox:f,...d?{columns:d}:{},...h?{caption:h}:{}},children:v})}}),{Tag:Fp}=B,RT={body:"body"},OF=Xe({sections:RT,provides:["prose"],attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Fp("summary",{},[e.name??""]),i=new Re(B.transform(nt(t.body),n)).wrap("div"),s=i.tag("div");for(const o of s.nodes)Fp.isTag(o)&&(o.attributes.typeof="Answer",o.children=[new Fp("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()]})}}),DT={preamble:"preamble",headline:"title",blurb:"description"},bF=Xe({sections:DT,attributes:{multiple:{type:Boolean,required:!1,description:"Allow multiple panels to be open at once"},schema:{type:String,required:!1,matches:["none"],description:'Set to "none" to emit no schema.org markup. Use it when the panels are not a FAQ — a list of definitions, say — so the page does not publish fabricated Question entries. Suppresses the items too, not just the container.'}},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(t,e,n){const r=new Re(B.transform(nt(t.header),n)),i=[...nt(t.items),...nt(t.sections)],s=new Re(B.transform(i,n)),o=s.tag("details").typeof("AccordionItem"),a=o.wrap("div");if(o.count()===0&&r.count()===0)return null;const l=e.schema==="none";l&&rZ(s.nodes);const c=r.count()>0?[r.wrap("header").next(),a.next()]:[a.next()];return qe({rune:"accordion",...l?{}:{schemaOrgType:"FAQPage",schema:{mainEntity:o}},tag:"section",property:"contentSection",properties:{item:o},refs:{...Cl(r),items:a},children:c})}}),{Tag:Bl}=B,yF=Xe({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(t,e,n){const r=n.variables?.headings||[],i=e.depth+1,o=r.filter(u=>u.level>=2&&u.level<=i).map(u=>new Bl("li",{"data-level":u.level},[new Bl("a",{href:`#${u.id}`},[u.text])])),a=new Bl("ul",{},o),l=new Bl("meta",{content:e.depth}),c=new Bl("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:ua}=B,wF=["16:9","4:3","1:1","auto"];function _F(t){try{const e=new URL(t),n=e.hostname.replace("www.","");if(n==="youtube.com"||n==="youtu.be"){let r="";return n==="youtu.be"?r=e.pathname.slice(1):r=e.searchParams.get("v")||"",{provider:"youtube",embedUrl:r?`https://www.youtube-nocookie.com/embed/${r}`:t,type:"video"}}if(n==="vimeo.com")return{provider:"vimeo",embedUrl:`https://player.vimeo.com/video/${e.pathname.slice(1)}`,type:"video"};if(n==="twitter.com"||n==="x.com")return{provider:"twitter",embedUrl:t,type:"tweet"};if(n==="codepen.io")return{provider:"codepen",embedUrl:t.replace("/pen/","/embed/"),type:"codepen"};if(n==="open.spotify.com")return{provider:"spotify",embedUrl:t.replace("open.spotify.com/","open.spotify.com/embed/"),type:"spotify"}}catch{}return{provider:"generic",embedUrl:t,type:"generic"}}const kF=Xe({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:wF.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(t,e,n){const r=e.url??"",i=_F(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 ua("meta",{content:r}),f=new ua("meta",{content:e.title??""}),d=new ua("meta",{content:i.embedUrl}),h=new ua("meta",{content:i.provider}),m=new Re(B.transform(nt(t.fallback),n)).wrap("div"),p=m.tag("div"),v=[u,f,d];let O;if(i.embedUrl){const b=new ua("iframe",{src:i.embedUrl,title:o,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",loading:"lazy"},[]);O=new ua("div",{style:`padding-bottom: ${c}%`},[b]),v.push(O)}return v.push(m.next()),qe({rune:"embed",schemaOrgType:"VideoObject",tag:"figure",properties:{provider:h},refs:{...O?{wrapper:O}:{},fallback:p},schema:{name:f,contentUrl:u,embedUrl:d},children:v})}}),{Tag:gi}=B,NT="__breadcrumb-auto",xF=Xe({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:t=>t.auto?{type:"sequence",fields:[]}:{type:"sequence",fields:[{name:"list",match:"list",optional:!0,greedy:!0}]},transform(t,e,n){const r=new gi("meta",{content:e.separator});if(e.auto){const l=new gi("meta",{"data-field":NT,content:"true"}),c=new gi("ol",{},[]);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:c},children:[r,l,c]})}const i=new Re(B.transform(nt(t.list),n)),s=[];let o=0;for(const l of i.toArray())if(gi.isTag(l)&&(l.name==="ul"||l.name==="ol")){for(const c of l.children)if(gi.isTag(c)&&c.name==="li"){o++;const u=new gi("meta",{content:o}),f=c.children.find(d=>gi.isTag(d)&&d.name==="a");if(f){const d=new gi("span",{hidden:!0},f.children),h=new gi("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 gi("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 gi("ol",{},s);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:a},schema:{itemListElement:s},children:[r,a]})}}),{Tag:Ii}=B,qg="__pagination-auto",SF=Xe({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(t,e,n){if(e.auto){const i=new Ii("meta",{"data-field":qg,content:"true"}),s=e.scope?new Ii("meta",{"data-field":"scope",content:String(e.scope)}):null,o=e["prev-label"]?new Ii("meta",{"data-field":"prev-label",content:String(e["prev-label"])}):null,a=e["next-label"]?new Ii("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 Ii("a",{href:s,"data-direction":"prev","data-name":"prev"},[new Ii("span",{"data-name":"marker"},["←"]),new Ii("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 Ii("a",{href:s,"data-direction":"next","data-name":"next"},[new Ii("span",{"data-name":"label"},[o]),new Ii("span",{"data-name":"marker"},["→"])]))}return qe({rune:"pagination",tag:"nav",children:r})}}),{Ast:Rg,Tag:gn}=B,AF=/^(.+)\s*:\s*([€$£¥]?\s*[\d].*)$/;function CF(t){const e=t.replace(/[€$£¥\s]/g,"").replace(/,/g,""),n=e.match(/^([\d.]+)\s*[-–]\s*([\d.]+)/);if(n)return(parseFloat(n[1])+parseFloat(n[2]))/2;const r=parseFloat(e);return isNaN(r)?0:r}const TF={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 PF(t,e,n,r){if(r&&r!=="en"&&n&&/^[A-Za-z]{3}$/.test(n))try{return new Intl.NumberFormat(r,{style:"currency",currency:n.toUpperCase()}).format(t)}catch{}const i=(t%1===0?String(t):t.toFixed(2)).split(".");return i[0]=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e+i.join(".")}function EF(t){let e=0;const n=t.match(/(\d+)\s*day/i),r=t.match(/(\d+)\s*week/i),i=t.match(/(\d+)\s*month/i);if(n&&(e+=parseInt(n[1])),r&&(e+=parseInt(r[1])*7),i&&(e+=parseInt(i[1])*30),e===0){const s=parseInt(t);isNaN(s)||(e=s)}return e}function yw(t,e){try{const n=JSON.parse(String(t.attributes["data-rune-fields"]??"{}"));if(n[e]!==void 0&&n[e]!==null)return String(n[e])}catch{}return""}const $F=/^(.+?)\s*\((?:estimate|est\.?)\)\s*$/i,QF=/^~(.+?)~$/;function LF(t){const e=[];let n=!1;for(const o of t.walk())o.type==="text"&&o.attributes.content&&e.push(o.attributes.content),o.type==="s"&&(n=!0);const r=e.join(" ").trim(),i=r.match($F);if(i)return{label:i[1].trim(),estimate:!0};const s=r.match(QF);return s?{label:s[1].trim(),estimate:!0}:n?{label:r,estimate:!0}:{label:r,estimate:!1}}const MF=Xe({attributes:{description:{type:String,required:!1,description:"Line item description"},amount:{type:String,required:!1,description:"Line item amount"}},contentModel:{type:"sequence",fields:[]},transform(t,e){const n=new gn("span",{},[e.description??""]),r=new gn("span",{},[e.amount??""]);return qe({rune:"budget-line-item",tag:"li",properties:{description:n,amount:r},children:[n,r]})}});function qF(t){const e=[];for(const n of t)if(n.type==="list")for(const r of n.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(AF);o?e.push(new Rg.Node("tag",{description:o[1].trim(),amount:o[2].trim()},[],"budget-line-item")):e.push(new Rg.Node("tag",{description:s,amount:""},[],"budget-line-item"))}else e.push(n);return e}function RF(t){let e=0;for(const n of t)n.type==="tag"&&n.tag==="budget-line-item"&&n.attributes.amount&&(e+=CF(n.attributes.amount));return e}const DF=Xe({attributes:{label:{type:String,required:!0},estimate:{type:Boolean,required:!1}},contentModel:{type:"custom",processChildren:qF,description:'Converts list items into budget-line-item tags with "Description: $Amount" pattern.'},transform(t,e,n){const r=nt(t.children),i=RF(r),s=new Re(B.transform(r,n)),o=new gn("meta",{content:e.label??""}),a=new gn("meta",{content:e.estimate?"estimate":"false"}),l=new gn("meta",{content:String(i)}),c=s.tag("li").typeof("BudgetLineItem"),u=new gn("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]})}}),NF=["detailed","summary"];function IF(t){const e=t,n=e.reduce((l,c,u)=>(c.type==="heading"&&l.push({idx:u,level:c.attributes.level}),l),[]);let r=[],i=e;n.length>=2&&n[0].level<n[1].level&&(r=e.slice(0,n[1].idx),i=e.slice(n[1].idx));const s=ib()(i),o=s.length-1;if(!s[o]||s[o].type!=="list")return t;const a=s[o].children.map(l=>{const c=l.children[0],{label:u,estimate:f}=LF(c);return new Rg.Node("tag",{label:u,estimate:f},l.children.slice(1),"budget-category")});return s.splice(o,1,...a),[...r,...s]}const IT={preamble:"preamble",headline:"title",footer:"footer"},BF=Xe({sections:IT,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:NF.slice(),description:"Display style: detailed line items or summary"}},contentModel:{type:"custom",processChildren:IF,description:'Converts headings into budget-category tags with estimate parsing, where list items become budget-line-items with "Description: $Amount" pattern.'},transform(t,e,n){const r=nt(t.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 Re(B.transform(i,n)),a=new Re(B.transform(s,n)),l=Cl(o),c=e.currency??"USD",u=e.duration??"",f=e.showPerDay??!0,d=e.variant??"detailed",h=TF[c.toUpperCase()]||c+" ",m=n?.variables?.locale??void 0,p=L=>PF(L,h,c,m),v=new gn("meta",{content:c}),O=new gn("meta",{content:u}),b=new gn("meta",{content:String(f)}),w=new gn("meta",{content:d}),S=a.tag("div").typeof("BudgetCategory"),_=S.toArray();let x=0;for(const L of _){if(!B.Tag.isTag(L))continue;const N=yw(L,"label"),Z=parseFloat(yw(L,"subtotal"))||0;x+=Z;const Y=new gn("div",{class:"rf-budget-category__header"},[new gn("span",{class:"rf-budget-category__label"},[N]),new gn("span",{class:"rf-budget-category__subtotal"},[p(Z)])]);L.children=[Y,...L.children]}const C=new gn("div",{},_),A=u?EF(u):0,y=!!u&&f&&A>0,k=y?x/A:0,P=[new gn("div",{class:"rf-budget__total"},[new gn("span",{class:"rf-budget__total-label","data-i18n":"core.budget.total"},["Total"]),new gn("span",{class:"rf-budget__total-amount"},[p(x)])])];y&&P.push(new gn("div",{class:"rf-budget__per-day"},[new gn("span",{class:"rf-budget__per-day-label","data-i18n":"core.budget.perDay"},["Per day"]),new gn("span",{class:"rf-budget__per-day-amount"},[p(k)])]));const T=new gn("div",{class:"rf-budget__footer"},P),E=new gn("meta",{content:String(x)}),Q=new gn("meta",{content:String(k)}),$=[v,O,b,w,...o.toArray(),C,T];return qe({rune:"budget",schemaOrgType:"ItemList",tag:"section",property:"contentSection",properties:{currency:v,duration:O,showPerDay:b,variant:w,category:S,total:E,...y?{perDay:Q}:{}},refs:{...l,categories:C},children:$})}}),{Tag:ls}=B,jF=["side-by-side","stacked"],zF=Xe({attributes:{layout:{type:String,required:!1,matches:jF.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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.layout??"side-by-side",s=e.labels??"",o=e.title??"",a=new ls("meta",{content:i}),l=[],c=s?s.split(",").map(m=>m.trim()):[];let u=0;for(const m of r.toArray()){let p;if(ls.isTag(m)&&m.name==="pre")p=m;else if(ls.isTag(m)&&m.name==="div"&&m.attributes.class==="rf-codeblock"){const v=m.children.find(O=>ls.isTag(O)&&O.name==="pre");v&&(p=v)}if(p&&ls.isTag(p)){const v=c[u]||p.attributes["data-language"]||`Panel ${u+1}`,O=new ls("span",{"data-label":!0},[v]);l.push(new ls("div",{"data-panel":!0},[O,m])),u++}}const f=new ls("div",{"data-panels":!0},l),d=o?[new ls("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:Bi}=B,BT={table:"body"},ZF=Xe({sections:BT,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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=new Bi("meta",{content:e.sortable??""}),s=new Bi("meta",{content:String(e.searchable??!1)}),o=new Bi("meta",{content:String(e.pageSize??0)}),a=new Bi("meta",{content:e.defaultSort??""});let l;const c=r.tag("table");if(c.count()>0)l=c.next();else{const f=r.toArray().find(h=>Bi.isTag(h)&&h.name==="div"&&h.attributes.class==="rf-table-wrapper"),d=f&&Bi.isTag(f)?f.children.find(h=>Bi.isTag(h)&&h.name==="table"):void 0;l=d&&Bi.isTag(d)?d:new Bi("table",{},[])}const u=new Bi("div",{},[l]);return qe({rune:"data-table",schemaOrgType:"Dataset",tag:"div",properties:{sortable:i,searchable:s,pageSize:o,defaultSort:a},refs:{scroll:u,table:l},children:[i,s,o,a,u]})}}),{Tag:kn}=B,FF=["unified","split","inline"];function XF(t,e){const n=t.split(`
296
+ `),r=e.split(`
297
+ `),i=n.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]=n[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&&n[a-1]===r[l-1]?(c.push({type:"equal",text:n[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:n[a-1]}),a--);return c.reverse(),c}function VF(t){const e=[],n=[];let r=1,i=1,s=0;for(;s<t.length;)if(t[s].type==="equal")e.push({hunk:t[s],num:r++}),n.push({hunk:t[s],num:i++}),s++;else{const o=[],a=[];for(;s<t.length&&t[s].type==="remove";)o.push(t[s]),s++;for(;s<t.length&&t[s].type==="add";)a.push(t[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),n.push(c<a.length?{hunk:a[c],num:i++}:null)}return{before:e,after:n}}function WF(t){const e=[];let n=1,r=1;for(const i of t)i.type==="equal"?(e.push({hunk:i,beforeNum:n,afterNum:r}),n++,r++):i.type==="remove"?(e.push({hunk:i,beforeNum:n,afterNum:null}),n++):i.type==="add"&&(e.push({hunk:i,beforeNum:null,afterNum:r}),r++);return e}function YF(t,e,n=0,r=0){const s=WF(t).map(({hunk:o,beforeNum:a,afterNum:l})=>new kn("span",{"data-name":"line","data-line-status":o.type},[new kn("span",{"data-name":"gutter-num","data-side":"before"},[a!=null?String(a+n):""]),new kn("span",{"data-name":"gutter-num","data-side":"after"},[l!=null?String(l+r):""]),new kn("span",{"data-name":"line-content",...e?{"data-language":e}:{}},[o.text])]));return[new kn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new kn("div",{"data-name":"rows"},s)])]}function UF(t,e,n=0,r=0){const{before:i,after:s}=VF(t);function o(a,l,c){return a.map(u=>{const f=u?u.hunk.type:"empty";return new kn("span",{"data-name":"line","data-line-status":f},[new kn("span",{"data-name":"gutter-num","data-side":l},[u?String(u.num+c):""]),new kn("span",{"data-name":"line-content",...u&&e?{"data-language":e}:{}},[u?u.hunk.text:""])])})}return[new kn("div",{"data-name":"split-container"},[new kn("div",{"data-name":"panel"},[new kn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new kn("div",{"data-name":"rows"},o(i,"before",n))])]),new kn("div",{"data-name":"panel"},[new kn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new kn("div",{"data-name":"rows"},o(s,"after",r))])])])]}function ww(t){if(typeof t!="string"||t.length===0)return 0;const e=/^(\d+)/.exec(t.trim());if(!e)return 0;const n=Number(e[1]);return Number.isFinite(n)&&n>0?n-1:0}function GF(t,e,n){if(t)return[new kn("div",{"data-name":"header"},[t])];if(e&&n)return e===n?[new kn("div",{"data-name":"header"},[e])]:[new kn("div",{"data-name":"header"},[`${e} → ${n}`])];const r=e||n;return r?[new kn("div",{"data-name":"header"},[r])]:[]}const HF=Xe({attributes:{mode:{type:String,required:!1,matches:FF.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(t,e){const n=e.mode??"unified",r=e.language??"",i=e.title??"",s=new kn("meta",{content:n}),o=new kn("meta",{content:r}),a=nt(t.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?ww(a[0].attributes.lines):0,m=a.length>1?ww(a[1].attributes.lines):0,p=XF(l,c),v=n==="split"?UF(p,u,h,m):YF(p,u,h,m),O=GF(i,f,d),b=qe({rune:"diff",tag:"div",properties:{mode:s,language:o},children:[s,o,...O,...v]});return b.attributes["data-code-host"]=!0,b}}),{Tag:fa}=B,KF=["bar","line","pie","area"];function JF(t){for(const e of t)if(B.Tag.isTag(e)){if(e.name==="table")return e;if(e.name==="div"){const n=e.children.find(r=>B.Tag.isTag(r)&&r.name==="table");if(n&&B.Tag.isTag(n))return n}}}const e7=Xe({attributes:{type:{type:String,required:!1,matches:KF.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"},"tick-count":{type:Number,required:!1,description:"Approximate number of Y-axis ticks (default 5). Ignored when tick-step is set."},"tick-step":{type:Number,required:!1,description:"Explicit unit-span between Y-axis ticks (e.g. 10, 0.5). Overrides tick-count."},"label-angle":{type:String,required:!1,description:'X-axis label rotation: "auto" (default) rotates -45° when slots are crowded, "0" forces horizontal, or any explicit degree (e.g. "-45", "-90").'}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=B.transform(nt(t.body),n),i=e.type??"bar",s=e.title??"",o=e.stacked??!1,a=e["tick-count"],l=e["tick-step"],c=e["label-angle"],u=JF(r),f=u?[u]:r;u&&(u.attributes["data-name"]="data",s&&(u.children=[new fa("caption",{},[s]),...u.children]));const d=new fa("meta",{content:i}),h=new fa("meta",{content:String(o)}),m=a!=null?new fa("meta",{content:String(a)}):void 0,p=l!=null?new fa("meta",{content:String(l)}):void 0,v=c!=null&&c!==""?new fa("meta",{content:String(c)}):void 0,O=qe({rune:"chart",tag:"figure",properties:{type:d,stacked:h,...m?{"tick-count":m}:{},...p?{"tick-step":p}:{},...v?{"label-angle":v}:{}},children:f});return O.name="rf-chart",O}}),{Tag:da}=B,t7=["mermaid","plantuml","ascii"],n7=Xe({attributes:{language:{type:String,required:!1,matches:t7.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(t,e){const n=e.language??"mermaid",r=e.title??"",s=nt(t.source)[0]?.attributes?.content||"",o=new da("meta",{content:n}),a=[];let l;r&&(l=new da("figcaption",{},[r]),a.push(l));let c;const u=[];s&&(c=new da("pre",{},[new da("code",{},[s])]),u.push(c));const f=new da("div",{},u);a.push(f),s&&a.push(new da("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:r7}=B,i7=["sidenote","footnote","tooltip"],jT={body:"body"},s7=Xe({sections:jT,provides:["prose"],attributes:{variant:{type:String,required:!1,matches:i7.slice(),description:"Display style: sidenote, footnote, or tooltip"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new r7("meta",{content:e.variant??"sidenote"}),s=new Re(B.transform(nt(t.body),n)).wrap("div");return qe({rune:"sidenote",tag:"aside",properties:{variant:r},refs:{body:s},children:[r,s.next()]})}}),{Ast:Ju,Tag:_w}=B,o7=Xe({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(t,e,n){const r=new _w("span",{},[e.speaker??""]),i=new _w("meta",{content:e.align??"left"}),s=new Re(B.transform(nt(t.body),n)).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 a7(t,e){const n=e.speakers?String(e.speakers).split(",").map(s=>s.trim()):[],r=[];let i=0;for(const s of t)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&&n.length>0&&(o=n[i%n.length],c)){const f=new Ju.Node("strong",{},[new Ju.Node("text",{content:`${o}:`},[])]),d=new Ju.Node("text",{content:" "},[]);c.children=[f,d,...c.children]}const u=i%2===0?"left":"right";r.push(new Ju.Node("tag",{speaker:o,align:u},s.children,"conversation-message")),i++}else r.push(s);return r}const l7=Xe({attributes:{speakers:{type:String,required:!1,description:"Comma-separated speaker names for alternating messages"}},contentModel:{type:"custom",processChildren:(t,e)=>a7(t,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(t,e,n){const i=new Re(B.transform(nt(t.children),n)).tag("div").typeof("ConversationMessage"),s=i.wrap("div");return qe({rune:"conversation",tag:"div",properties:{message:i},refs:{messages:s},children:[s.next()]})}}),{Tag:zT}=B,c7=["click","scroll","auto"],u7=Xe({attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new zT("span",{},[e.name??""]),i=new Re(B.transform(nt(t.body),n)).wrap("div");return qe({rune:"reveal-step",tag:"div",properties:{name:r},refs:{body:i.tag("div")},children:[r,i.next()]})}}),ZT={preamble:"preamble",headline:"title",blurb:"description"},f7=Xe({sections:ZT,attributes:{mode:{type:String,required:!1,matches:c7.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(t,e,n){const r=new Re(B.transform(nt(t.header),n)),i=[...nt(t.items),...nt(t.sections)],s=new Re(B.transform(i,n)),o=new zT("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:{...Cl(r),steps:l},children:c})}}),{Tag:d7}=B,h7=["start","center","end"],FT={preamble:"preamble",headline:"title",blurb:"description"},p7=Xe({sections:FT,attributes:{align:{type:String,required:!1,matches:h7.slice(),description:"Header alignment: start (default), center, or end"}},contentModel:{type:"sequence",fields:[{name:"eyebrow",match:"paragraph",optional:!0},{name:"headline",match:"heading",optional:!0},{name:"blurb",match:"paragraph",optional:!0},{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=[t.eyebrow,t.headline,t.blurb].filter(Boolean),i=new Re(B.transform(r,n)),s=new Re(B.transform(nt(t.body),n)).wrap("div"),o=e.align||"start",a=new d7("meta",{content:o}),l=i.count()>0?[i.wrap("header").next()]:[],c=[a,...l,s.next()];return qe({rune:"section",tag:"section",property:"contentSection",properties:{align:a},refs:{...Cl(i),body:s},children:c})}}),{Tag:jl}=B,m7=["slider","toggle","fade","auto"],g7=["horizontal","vertical"],v7=Xe({attributes:{variant:{type:String,required:!1,matches:m7.slice(),description:"Interaction mode: slider, toggle, fade, or auto"},orientation:{type:String,required:!1,matches:g7.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(t,e,n){const r=t.zones??[],i=e.labels?e.labels.split(",").map(d=>d.trim()):[],s=r.map((d,h)=>{const p=new Re(XZ(B.transform(nt(d.body),n))).wrap("div"),v=i[h],O=v?new jl("span",{},[v]):void 0;return qe({rune:"juxtapose-panel",tag:"div",properties:{},refs:{...O?{name:O}:{},body:p.tag("div")},children:[...O?[O]:[],p.next()]})}),o=new Re(s).tag("div").typeof("JuxtaposePanel"),a=o.wrap("div"),l=new jl("meta",{content:e.variant??"slider"}),c=new jl("meta",{content:e.orientation??"vertical"}),u=new jl("meta",{content:String(e.position??50)}),f=new jl("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:O7}=B,b7=Xe({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Re(B.transform(nt(t.body),n)).wrap("div");return qe({rune:"annotate-note",tag:"aside",properties:{},refs:{body:r.tag("div")},children:[r.next()]})}}),y7=["margin","tooltip","inline"],XT={body:"body"},w7=Xe({sections:XT,provides:["prose"],attributes:{variant:{type:String,required:!1,matches:y7.slice(),description:"Annotation display style: margin, tooltip, or inline"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=new O7("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:go,Tag:Gt}=B,_7=["stacked","inline","compact"],k7=["GET","POST"],x7=[[["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 S7(t){const e=t.toLowerCase();for(const[n,r]of x7)if(n.some(i=>e.includes(i)))return r;return"text"}function A7(t){const e=t.match(/^(.+?)\s*\(([^)]+)\)\s*$/);if(!e)return{name:t.trim(),optional:!1,placeholder:""};const n=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:n,optional:i,placeholder:o}}function vo(t){return Array.from(t.walk()).filter(e=>e.type==="text").map(e=>e.attributes.content).join("")}function C7(t){if(t.type!=="paragraph")return!1;const e=Array.from(t.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 T7(t){const e=/\(multiple\)/i.test(t)||/select all/i.test(t),n=/\(radio\)/i.test(t),r=/\(optional\)/i.test(t);return{label:t.replace(/\s*\(multiple\)/gi,"").replace(/\s*\(radio\)/gi,"").replace(/\s*\(optional\)/gi,"").trim(),multiple:e,radio:n,optional:r}}const P7=Xe({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(t,e){const n=e.name??"",r=e.fieldType??"text",i=e.required??!0,s=e.placeholder??"",o=e.options??"",a=`field-${n.toLowerCase().replace(/\s+/g,"-")}`,l=o?o.split(",").map(m=>m.trim()).filter(Boolean):[];if(r==="submit")return new Gt("button",{type:"submit","data-name":"submit"},[n]);if(r==="separator")return new Gt("hr",{"data-name":"separator"},[]);if(r==="help")return new Gt("p",{"data-name":"help"},[n]);if(r==="description")return new Gt("p",{"data-name":"text"},[n]);if(r==="group")return new Gt("fieldset",{class:"rf-form-fieldset"},[new Gt("legend",{},[n])]);if(r==="radio"||r==="checkbox"){const m=[n];i&&m.push(new Gt("span",{"data-name":"required","aria-hidden":"true"},["*"]));const p=l.map((O,b)=>new Gt("label",{class:"rf-form-choice"},[new Gt("input",{type:r,name:a,value:O,...i&&r==="radio"&&b===0?{required:""}:{}},[]),new Gt("span",{},[O])])),v=new Gt("meta",{"data-field":"field-type",content:r});return new Gt("fieldset",{"data-rune":"form-field",class:"rf-form-choice-group"},[v,new Gt("legend",{},m),...p])}const c=[n];i&&c.push(new Gt("span",{"data-name":"required","aria-hidden":"true"},["*"]));const u=new Gt("label",{for:a},c);let f;r==="textarea"?f=new Gt("textarea",{id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{},rows:"4"},[]):r==="select"?f=new Gt("select",{id:a,name:a,...i?{required:""}:{}},[new Gt("option",{value:"",disabled:"",selected:""},["Select an option"]),...l.map(m=>new Gt("option",{value:m},[m]))]):f=new Gt("input",{type:r,id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{}},[]);const d=new Gt("div",{},[u,f]),h=new Gt("meta",{content:r});return qe({rune:"form-field",tag:"div",properties:{fieldType:h},refs:{body:d},children:[h,d]})}});function E7(t){const e=[];let n=null,r=-1;for(let s=t.length-1;s>=0;s--)if(C7(t[s])){r=s;break}const i=()=>{if(n){const s=vo(n);e.push(new go.Node("tag",{name:s,fieldType:"help",required:!1,placeholder:"",options:""},[],"form-field")),n=null}};for(let s=0;s<t.length;s++){const o=t[s];if(o.type==="heading"){i();const a=vo(o);e.push(new go.Node("tag",{name:a,fieldType:"group",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="list"&&n){const a=vo(n),l=T7(a),c=[];for(const f of o.children)f.type==="item"&&c.push(vo(f));let u;l.multiple?u="checkbox":l.radio||c.length<=4?u="radio":u="select",e.push(new go.Node("tag",{name:l.label,fieldType:u,required:!l.optional,placeholder:"",options:c.join(",")},[],"form-field")),n=null}else if(o.type==="list"){i();for(const a of o.children)if(a.type==="item"){const l=vo(a),c=A7(l),u=S7(c.name);e.push(new go.Node("tag",{name:c.name,fieldType:u,required:!c.optional,placeholder:c.placeholder,options:""},[],"form-field"))}}else if(o.type==="blockquote")i(),n=o;else if(s===r){i();const a=vo(o);e.push(new go.Node("tag",{name:a,fieldType:"submit",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="hr")i(),e.push(new go.Node("tag",{name:"",fieldType:"separator",required:!1,placeholder:"",options:""},[],"form-field"));else if(o.type==="paragraph"){i();const a=vo(o);e.push(new go.Node("tag",{name:a,fieldType:"description",required:!1,placeholder:"",options:""},[],"form-field"))}else i(),e.push(o)}return i(),e}const VT={body:"body"},$7=Xe({sections:VT,attributes:{action:{type:String,required:!0,description:"URL the form submits to"},method:{type:String,required:!1,matches:k7.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:_7.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:t=>E7(t),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(t,e,n){const r=new Re(B.transform(nt(t.children),n)),i=new Gt("meta",{content:e.action??""}),s=new Gt("meta",{content:e.method??"POST"}),o=new Gt("meta",{content:e.success??""}),a=new Gt("meta",{content:e.error??""}),l=new Gt("meta",{content:e.variant??"stacked"}),c=new Gt("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()]})}}),Q7={".html":"html",".css":"css",".js":"js",".svg":"svg",".glsl-vert":"glsl-vert",".glsl-frag":"glsl-frag"};function L7(t,e){return t.endsWith("/")?t+e:t+"/"+e}function M7(t){if(t.endsWith(".glsl-vert"))return"glsl-vert";if(t.endsWith(".glsl-frag"))return"glsl-frag";const e=t.lastIndexOf(".");if(e===-1)return null;const n=t.slice(e);return Q7[n]??null}function q7(t,e,n,r,i){const s=[],o=[];if(i&&!i(t))return{content:"",panels:[],errors:[`Sandbox src directory not found: "${e}"`],warnings:[]};const a=r(t);if(a.length===0)return{content:"",panels:[],errors:[],warnings:[`Sandbox src directory "${e}" contains no .html, .css, or .js files`]};const l=[];for(const y of a.sort()){const k=M7(y);if(!k)continue;const P=n(L7(t,y));P!=null&&l.push({name:y,role:k,content:P})}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 y of l){const k=c.get(y.role)??[];k.push(y),c.set(y.role,k)}const u=c.get("html")??[];let f;u.length>1?(f=u.find(y=>y.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(y=>y.content).join(`
298
+ `),m=c.get("js")??[];let p=m.map(y=>y.content).join(`
299
+ `);const O=(c.get("svg")??[]).map(y=>y.content).join(`
300
+ `),b=(c.get("glsl-vert")??[])[0],w=(c.get("glsl-frag")??[])[0];let S="";b&&(S+=`const VERTEX_SHADER = \`${kw(b.content)}\`;
301
+ `),w&&(S+=`const FRAGMENT_SHADER = \`${kw(w.content)}\`;
302
+ `),S&&(p=S+p);const _=(f?.content??"")+(O?`
303
+ `+O:""),x=[];_&&x.push(`<div data-source="HTML">
304
+ ${_}
305
+ </div>`),h&&x.push(`<style data-source="CSS">
306
+ ${h}
307
+ </style>`),p&&x.push(`<script data-source="JavaScript">
308
+ ${p}
309
+ <\/script>`);const C=x.join(`
310
+ `),A=[];if(f&&A.push({label:"HTML",language:"html",content:_,origin:`${e}/${f.name}`}),h){const y=d.map(k=>`${e}/${k.name}`).join(", ");A.push({label:"CSS",language:"css",content:h,origin:y})}if(p){const y=[];b&&y.push(`${e}/${b.name}`),w&&y.push(`${e}/${w.name}`),y.push(...m.map(k=>`${e}/${k.name}`)),A.push({label:"JavaScript",language:"javascript",content:p,origin:y.join(", ")})}return{content:C,panels:A,errors:s,warnings:o}}function R7(t,e){const n=ha(t,"div","HTML"),r=ha(t,"style","CSS"),i=ha(t,"script","JavaScript"),s=ha(e,"div","HTML"),o=ha(e,"style","CSS"),a=ha(e,"script","JavaScript"),l=Xp(n,s),c=Xp(r,o),u=Xp(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 ha(t,e,n){const r=new RegExp(`<${e}[^>]*data-source="${n}"[^>]*>([\\s\\S]*?)</${e}>`,"i");return t.match(r)?.[1]?.trim()??""}function Xp(t,e){return t&&e?t+`
318
+ `+e:t||e}function kw(t){return t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}const{Tag:ef}=B;function xw(t){const e=t.split(`
319
+ `),n=e.filter(i=>i.trim().length>0).map(i=>i.match(/^(\s*)/)?.[0].length??0),r=n.length>0?Math.min(...n):0;return r>0?e.map(i=>i.slice(r)).join(`
320
+ `):t}function Sw(t){const e=[],n=/<(\w+)\b([^>]*?)\bdata-source(?:="([^"]*)")?([^>]*)>([\s\S]*?)<\/\1>/g;let r;for(;(r=n.exec(t))!==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=xw(l.trim());else{const d=(s+a).replace(/\s{2,}/g," ").trim(),h=d?` ${d}`:"",m=xw(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 Aw(t,e){const n=e.variables?.__source;if(typeof n=="string"&&t.lines?.length>=2){const r=n.split(`
323
+ `),i=t.lines[0]+1,s=t.lines[t.lines.length-1]-1;return r.slice(i,s).join(`
324
+ `).trim()}return""}const D7=Xe({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,String],required:!1,description:'Height of the sandbox iframe: pixels, "fill" (host owns height), or auto'},context:{type:String,required:!1,description:"Shared context scope for multiple sandboxes"},activation:{type:String,required:!1,matches:["eager","visible","click"],description:"When to mount the iframe: eager (default) | visible | click"},poster:{type:String,required:!1,description:"Poster image URL shown until a non-eager sandbox activates"},data:{type:String,required:!1,description:'Registry query (SPEC-070 field-match, e.g. "type:page") bound into the iframe as window.RF_DATA'},"data-fields":{type:String,required:!1,description:"Comma-separated entity data fields to project into the payload"},"data-shape":{type:String,required:!1,description:"Payload shape: flat (default) | tree (nest by parentUrl) | graph (nodes + SPEC-072 edges)"},"data-limit":{type:Number,required:!1,description:"Max records in the payload (default 500)"}},contentModel:{type:"sequence",fields:[]},transform(t,e,n,r){const i=e.src??"",s=e.framework??"",o=e.dependencies??"",a=e.label??"",l=e.height,c=e.data??"",u=e["data-fields"]??"",f=e["data-shape"]??"",d=e["data-limit"],h=e.activation==="visible"||e.activation==="click"?e.activation:"",m=e.poster??"";let p="",v=[];const O=n.variables?.__sandboxFiles,b=n.variables?.__sandboxExamplesDir;if(i&&O&&b!==void 0){const y=b?b.endsWith("/")?b+i:b+"/"+i:i,k=q7(y,i,T=>O.read(T),T=>O.list(T),T=>O.exists(T));k.errors.length>0?(p=`<div data-source="HTML"><pre style="color:red;padding:1rem">${k.errors.join(`
325
+ `)}</pre></div>`,v=[]):(p=k.content,v=k.panels.map(T=>({label:T.label,language:T.language,content:T.content,origin:T.origin})));const P=Aw(r,n);P&&(p=R7(p,P),v=Sw(p))}else p=Aw(r,n),v=Sw(p);const w=n.variables?.__securityPolicy??{trust:"trusted",allowJs:!0,sandboxOrigin:void 0},S=lZ(p,w),_=S?new ef("pre",{"data-language":"html"},[new ef("code",{"data-language":"html"},[S])]):void 0,x=v.filter(y=>y.origin).map(y=>`${y.label} ${y.origin}`),C=[];_&&C.push(new ef("template",{"data-content":"fallback"},[_])),C.push(new ef("template",{"data-content":"source"},[S]));const A=qe({rune:"sandbox",tag:"div",children:C});return A.name="rf-sandbox",Object.assign(A.attributes,{"data-source-content":S,...s?{"data-framework":s}:{},...o?{"data-dependencies":o}:{},...a?{"data-label":a}:{},"data-height":typeof l=="number"?String(l):l==="fill"?"fill":typeof l=="string"&&/^\d+$/.test(l)?l:"auto",...x.length>0?{"data-source-origins":x.join(`
326
+ `)}:{},"data-security-mode":w.trust,"data-allow-js":w.allowJs?"true":"false",...w.sandboxOrigin?{"data-sandbox-origin":w.sandboxOrigin}:{},...h?{"data-activation":h,...m?{"data-poster":m}:{}}:{},...c?{"data-rf-query":c,...u?{"data-rf-fields":u}:{},...f?{"data-rf-shape":f}:{},...d!=null?{"data-rf-limit":String(d)}:{}}:{}}),A}}),WT={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(t,e){const n=t.attributes.name,r=t.attributes.size;return VC(n,e,{size:r}).tag}};ra(WT,"inline");const{Tag:Cw}=B,N7=["left","center","right"],I7=["default","accent","editorial"],YT={body:"body"},B7=Xe({sections:YT,provides:["prose"],attributes:{align:{type:String,required:!1,matches:N7.slice(),description:"Text alignment of the quote"},variant:{type:String,required:!1,matches:I7.slice(),description:"Visual style of the quote block"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=new Cw("meta",{content:e.align??"center"}),s=new Cw("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:Vp}=B,j7=["left","center","right","justify"],UT={body:"body"},z7=Xe({sections:UT,provides:["prose"],attributes:{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:j7.slice(),description:"Text alignment"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.columns??1,s=e.lead??!1,o=e.align??"left",a=i>1?new Vp("meta",{content:String(i)}):void 0,l=s?new Vp("meta",{content:"lead"}):void 0,c=o!=="left"?new Vp("meta",{content:o}):void 0,u=r.wrap("div"),f=[];return a&&f.push(a),l&&f.push(l),c&&f.push(c),f.push(u.next()),qe({rune:"text-block",tag:"div",properties:{...a?{columns:a}:{},...l?{lead:l}:{},...c?{align:c}:{}},refs:{body:u.tag("div")},children:f})}}),{Tag:zl}=B,Z7=["left","right"],F7=["1:2","1:1","2:1"],GT={body:"body",media:"media"},HT={media:"cover"},X7=Xe({sections:GT,provides:["prose"],mediaSlots:HT,attributes:{align:{type:String,required:!1,matches:Z7.slice(),description:"Side the media appears on"},ratio:{type:String,required:!1,matches:F7.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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.align??"left",s=e.ratio??"1:1",o=e.wrap??!1,a=new zl("meta",{content:i}),l=new zl("meta",{content:s}),c=o?new zl("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 zl("div",{},u),h=new zl("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:pa}=B,V7=["background","surface","primary","secondary","accent","border"],W7=/^\s*(\w+)\s*:\s*(.+)\s*$/;function Tw(t){const e=[];for(const n of t.walk())n.type==="text"&&n.attributes.content&&e.push(n.attributes.content);return e.join(" ").trim()}function Y7(t){const e={},n={};let r="light";for(const i of t){if(i.type==="heading"){const s=Tw(i).toLowerCase();s==="dark"?r="dark":s==="light"&&(r="light");continue}if(i.type==="list")for(const s of i.children){const a=Tw(s).match(W7);if(a){const l=a[1].toLowerCase(),c=a[2].trim();V7.includes(l)&&(r==="dark"?n[l]=c:e[l]=c)}}}return{light:e,dark:n}}const KT={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(t,e){const n=t.transformAttributes(e).preset,r=t.transformAttributes(e).mode,{light:i,dark:s}=Y7(t.children),o=[];n?o.push(new pa("meta",{"data-field":"tint",content:n})):(Object.keys(i).length>0||Object.keys(s).length>0)&&o.push(new pa("meta",{"data-field":"tint",content:"custom"})),r&&r!=="auto"&&o.push(new pa("meta",{"data-field":"tint-mode",content:r}));for(const[a,l]of Object.entries(i))o.push(new pa("meta",{"data-field":`tint-${a}`,content:l}));for(const[a,l]of Object.entries(s))o.push(new pa("meta",{"data-field":`tint-dark-${a}`,content:l}));return new pa("div",{"data-tint-source":!0},o)}};ra(KT,"configurator");const{Tag:Pw}=B,U7=["none","soft","hard","elevated"],G7=["none","top","bottom","both","end","bottom-end","top-end"],H7={soft:"sm",hard:"md",elevated:"lg"},Ew=new Set;function Zl(t,e){Ew.has(t)||(Ew.add(t),console.warn(`[refrakt] showcase \`${t}\` is deprecated (SPEC-086) — use \`${e}\`. The alias will be removed in a future minor.`))}const JT={viewport:"body"},eP="self",K7=Xe({sections:JT,frameTarget:eP,attributes:{shadow:{type:String,required:!1,matches:U7.slice(),description:"Shadow style around the showcase content"},bleed:{type:String,required:!1,matches:G7.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(t,e,n){const r=new Re(B.transform(nt(t.body),n)),i=e.shadow??"none",s=e.bleed??"none",o=e.offset??"",a=e.aspect??"",l=e.place??"",c={},u=[],f=(h,m)=>{const p=new Pw("meta",{content:m});c[h]=p,u.push(p)};i&&i!=="none"&&(Zl("shadow","frame-shadow"),f("frame-shadow",H7[i]??i)),s&&s!=="none"&&(Zl("bleed","frame-displace"),f("frame-displace",s)),o&&(Zl("offset","frame-offset"),f("frame-offset",o)),a&&(Zl("aspect","frame-aspect"),f("frame-aspect",a)),l&&(Zl("place","frame-place"),f("frame-place",l));const d=new Pw("div",{},r.toArray());return u.push(d),qe({rune:"showcase",tag:"div",properties:c,refs:{viewport:d},children:u})}}),{Tag:rr}=B,J7=new Set(["video","audio","figure"]);function tP(t){for(const e of t){if(!B.Tag.isTag(e))continue;const n=e.attributes?.["data-rune"];if(e.name==="rf-sandbox"||n||J7.has(e.name))return e;const r=tP(e.children);if(r)return r}}function eX(t){return t.name==="rf-sandbox"?"sandbox":String(t.attributes?.["data-rune"]??t.name)}const nP={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:"Flat wash over the background: none | dark | light | a token name (raw CSS is deprecated)"},"overlay-opacity":{type:String,required:!1,description:"Opacity of a token-coloured overlay wash (0 to 1)"},gradient:{type:String,required:!1,matches:["to-t","to-b","to-l","to-r","to-tr","to-br","to-bl","to-tl"],description:"Gradient direction (token-driven fill)"},from:{type:String,required:!1,description:"Gradient start colour — semantic token name"},to:{type:String,required:!1,description:"Gradient end colour — semantic token name"},via:{type:String,required:!1,description:"Optional middle gradient stop — semantic token name"},"gradient-type":{type:String,required:!1,matches:["linear","radial","conic"],description:"Gradient type: linear (default), radial, conic"},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(t,e){const n=t.transformAttributes(e),r=[];n.preset&&r.push(new rr("meta",{"data-field":"bg-preset",content:n.preset})),n.src&&r.push(new rr("meta",{"data-field":"bg-src",content:n.src})),n.video&&r.push(new rr("meta",{"data-field":"bg-video",content:n.video})),n.overlay&&n.overlay!=="none"&&r.push(new rr("meta",{"data-field":"bg-overlay",content:n.overlay})),n["overlay-opacity"]&&r.push(new rr("meta",{"data-field":"bg-overlay-opacity",content:n["overlay-opacity"]})),n.gradient&&r.push(new rr("meta",{"data-field":"bg-gradient",content:n.gradient})),n.from&&r.push(new rr("meta",{"data-field":"bg-from",content:n.from})),n.to&&r.push(new rr("meta",{"data-field":"bg-to",content:n.to})),n.via&&r.push(new rr("meta",{"data-field":"bg-via",content:n.via})),n["gradient-type"]&&r.push(new rr("meta",{"data-field":"bg-gradient-type",content:n["gradient-type"]})),n.blur&&n.blur!=="none"&&r.push(new rr("meta",{"data-field":"bg-blur",content:n.blur})),n.position&&n.position!=="center"&&r.push(new rr("meta",{"data-field":"bg-position",content:n.position})),n.fit&&n.fit!=="cover"&&r.push(new rr("meta",{"data-field":"bg-fit",content:n.fit})),n.opacity&&n.opacity!=="1"&&r.push(new rr("meta",{"data-field":"bg-opacity",content:n.opacity})),n.fixed&&r.push(new rr("meta",{"data-field":"bg-fixed",content:"true"}));const i=[];if(t.children?.length){const o=t.children.map(l=>B.transform(l,e)).flat().filter(Boolean),a=tP(o);if(a){const l=eX(a);l!=="sandbox"?console.warn(`[refrakt] bg backdrop guest must be presentational (a sandbox); "${l}" carries content chrome — place it in the media zone as a positioned guest, or use \`bg video="…"\` for a bare video backdrop.`):(a.attributes={...a.attributes,"data-bg-guest":"","data-guest-posture":"backdrop","data-height":"fill","data-activation":"eager"},i.push(a))}}return new rr("div",{"data-bg-source":!0},[...r,...i])}};ra(nP,"configurator");const{Tag:ma}=B,tX=["date-desc","date-asc","title-asc","title-desc"],nX=["list","grid","compact"],rP={preamble:"preamble",headline:"title",blurb:"description",content:"body"},rX=Xe({sections:rP,provides:["prose"],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:tX.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:nX.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(t,e,n){const r=[t.headline,t.blurb].filter(Boolean),i=new Re(B.transform(r,n)),s=new ma("meta",{content:e.folder}),o=new ma("meta",{content:e.sort||"date-desc"}),a=new ma("meta",{content:e.filter||""}),l=new ma("meta",{content:e.limit!=null?String(e.limit):""}),c=new ma("meta",{content:e.layout||"list"}),u=new ma("div",{},[]),f=Cl(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:iX}=B,fb="xref",iP={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(t,e){const n=t.attributes.primary,r=t.attributes.label,i=t.attributes.type,s=t.attributes.preview,o={"data-rune":fb,"data-xref-id":n};return r&&(o["data-xref-label"]=r),i&&(o["data-xref-type"]=i),s&&(o["data-xref-preview"]=s),new iX("span",o,[r||n])}};ra(iP,"inline");const{Tag:sX}=B,db="expand-pending",sP={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(t,e){const n=t.attributes.primary,r=t.attributes.level,i=t.attributes.type,s=t.attributes.canonical===!0,o=t.attributes.label,a={"data-rune":db,"data-expand-id":n};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 sX("div",a,[])}};ra(sP,"none");const{Ast:$J}=B,oX="__deferred-body";function hb(t){const e=t[oX];return typeof e=="string"&&e.length>0?e:void 0}function pb(t,e,n){const r=B.parse(t),i={...e??{},variables:{...e?.variables??{},...n}},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:$w}=B,oP="__collection-sentinel",aX=Xe({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:Number,required:!1,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(t,e){const n=(o,a)=>new $w("meta",{"data-field":o,content:a}),r=hb(e)??"",i=[n("collection-type",String(e.type??e.show??"")),n("collection-filter",String(e.filter??"")),n("collection-sort",String(e.sort??"")),n("collection-group",String(e.group??"")),n("collection-limit",String(e.limit??"")),n("collection-fields",String(e.fields??"")),n("collection-layout",String(e.layout??"list")),n("collection-group-display",String(e["group-display"]??"headings")),n("collection-empty",String(e.empty??"")),n(oP,"true")];r&&i.push(n("collection-body",r));const s=new $w("div",{"data-name":"items"},[]);return qe({rune:"collection",tag:"section",properties:{},refs:{items:s},children:[...i,s]})}}),{Tag:Qw}=B,aP="__relationships-sentinel",lX=Xe({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(t,e){const n=(l,c)=>new Qw("meta",{"data-field":l,content:c}),r=hb(e)??"",i=e.of,s=String(i&&typeof i=="object"?i.id??"":i??""),o=[n("relationships-of",s),n("relationships-kind",String(e.kind??"")),n("relationships-type",String(e.type??"")),n("relationships-group",String(e.group??"kind")),n("relationships-group-display",String(e["group-display"]??"headings")),n("relationships-sort",String(e.sort??"")),n("relationships-limit",String(e.limit??"")),n("relationships-fields",String(e.fields??"")),n("relationships-layout",String(e.layout??"list")),n("relationships-empty",String(e.empty??"")),n(aP,"true")];r&&o.push(n("relationships-body",r));const a=new Qw("div",{"data-name":"items"},[]);return qe({rune:"relationships",tag:"section",properties:{},refs:{items:a},children:[...o,a]})}}),{Tag:cX}=B,lP="__aggregate-sentinel",uX=Xe({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:Number,required:!1,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."},layout:{type:String,required:!1,default:"",matches:["chart"],description:"Render mode. Default: inline integer (no body) or body-zoned template. `chart` draws the grouped counts as an SVG via the `chart` rune's pipeline instead of a body."},"chart-type":{type:String,required:!1,default:"bar",matches:["bar","line","area","pie"],description:'Chart visualization type when layout="chart" (default bar).'},"chart-title":{type:String,required:!1,default:"",description:'Title for the chart (rendered as the data table caption) when layout="chart".'}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(t,e){const n=(a,l)=>new cX("meta",{"data-field":a,content:l}),r=hb(e)??"",i=r.length>0,s=String(e.layout??""),o=[n("aggregate-type",String(e.type??"")),n("aggregate-filter",String(e.filter??"")),n("aggregate-value",String(e.value??"")),n("aggregate-group",String(e.group??"")),n("aggregate-sort",String(e.sort??"")),n("aggregate-limit",String(e.limit??"")),n("aggregate-empty",String(e.empty??"")),n("aggregate-layout",s),n("aggregate-chart-type",String(e["chart-type"]??"bar")),n("aggregate-chart-title",String(e["chart-title"]??"")),n(lP,"true")];return r&&o.push(n("aggregate-body",r)),qe({rune:"aggregate",tag:i||s==="chart"?"section":"span",properties:{},children:o})}}),{Tag:Lw}=B,cP="__file-ref-sentinel",fX=Xe({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(t,e){const n=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=dX(n),a=(u,f)=>new Lw("meta",{"data-field":u,content:f}),l=[a("file-ref-path",n),a("file-ref-lines",r),a("file-ref-label",i),a("file-ref-preview",s),a(cP,"true")],c=new Lw("a",{},[i||o]);return qe({rune:"file-ref",tag:"span",properties:{},refs:{link:c},children:[...l,c]})}});function dX(t){if(!t)return"";const e=t.endsWith("/")?t.slice(0,-1):t,n=e.lastIndexOf("/");return n>=0?e.slice(n+1):e}const{Tag:Ci}=B,hX=/^h([1-6])$/;function pX(t,e){const n=t.attributes?.[e];return typeof n=="string"?n:void 0}function mX(t,e,n){for(const r of t){const i=[],s=new Set;Dg(r.renderable,o=>{const a=pX(o,"data-drawer-id");if(!a){n.error("drawer rune is missing required `id` attribute",r.url);return}s.has(a)&&n.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:gX(o),side:Lo(o,"side")??"right",size:Lo(o,"size")??"md",shortcut:Lo(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 Dg(t,e){if(Array.isArray(t)){for(const r of t)Dg(r,e);return}if(!Ci.isTag(t))return;const n=t;if(n.attributes?.["data-rune"]==="drawer"){e(n);return}if(n.children)for(const r of n.children)Dg(r,e)}function gX(t){const e=uP(t,"title");if(!e)return;const n=Ng(e);return n.length>0?n:void 0}function uP(t,e){if(t.attributes?.["data-name"]===e)return t;for(const n of t.children??[])if(Ci.isTag(n)){const r=uP(n,e);if(r)return r}}function Ng(t){return typeof t=="string"?t:Array.isArray(t)?t.map(Ng).join(""):Ci.isTag(t)?(t.children??[]).map(Ng).join(""):""}function vX(t){const e={lastHeadingLevel:0,mutated:!1},n=Ig(t,e);return e.mutated?n:t}function Ig(t,e){if(typeof t=="string"||typeof t=="number"||t==null)return t;if(Array.isArray(t)){let a=!1;const l=t.map(c=>{const u=Ig(c,e);return u!==c&&(a=!0),u});return a?l:t}if(!Ci.isTag(t))return t;const n=t,r=hX.exec(n.name);if(n.attributes?.[Mg]==="true"){const a=e.lastHeadingLevel===0?1:e.lastHeadingLevel,l=Math.min(6,Math.max(1,a+1));e.mutated=!0;const c={...n.attributes};return delete c[Mg],new Ci(`h${l}`,c,n.children)}if(r&&(e.lastHeadingLevel=Number(r[1])),!n.children||n.children.length===0)return n;let s=!1;const o=n.children.map(a=>{const l=Ig(a,e);return l!==a&&(s=!0),l});return s?new Ci(n.name,n.attributes,o):n}const mb="hoist-drawer",fP=new Map;function dP(t,e){fP.set(t,e)}function OX(t){const e={},n=t.attributes;if(!n)return e;for(const[r,i]of Object.entries(n))r.startsWith("data-")&&typeof i=="string"&&(e[r.slice(5)]=i);return e}function bX(t,e,n,r,i){const s=yX(t),o=new Map,l={payloads:o,seenIds:new Set,authorIds:s,drawerDepth:0,pageUrl:e,ctx:i,mutated:!1},c=Bg(t,l);if(o.size===0)return l.mutated?c:t;const u={pageUrl:e,registry:n,projectFiles: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=fP.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(Ci.isTag(c)){const d=c;return new Ci(d.name,d.attributes,[...d.children??[],...f])}return[c,...f]}function yX(t){const e=new Set,n=r=>{if(Array.isArray(r)){for(const s of r)n(s);return}if(!Ci.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??[])n(s)};return n(t),e}function Bg(t,e){if(Array.isArray(t)){let o=!1;const a=[];for(const l of t){const c=Bg(l,e);c!==l&&(o=!0),c!==Fl&&a.push(c)}return o?(e.mutated=!0,a):t}if(!Ci.isTag(t))return t;const n=t;if(n.name==="meta"&&n.attributes?.["data-field"]===mb){const o=OX(n),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),Fl):(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)),Fl):(e.ctx.warn("hoist drawer sentinel is missing required `data-target-id` attribute",e.pageUrl),Fl)}const r=n.attributes?.["data-rune"]==="drawer";if(r&&e.drawerDepth++,!n.children||n.children.length===0)return r&&e.drawerDepth--,n;let i=!1;const s=[];for(const o of n.children){const a=Bg(o,e);a!==o&&(i=!0),a!==Fl&&s.push(a)}return r&&e.drawerDepth--,i?(e.mutated=!0,new Ci(n.name,n.attributes,s)):n}const Fl=Symbol("hoist-strip");function wX(t,e){const n=t.toLowerCase().replace(/[^a-z0-9.]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!e)return n;const r=e.trim(),i=r.indexOf("-");if(i<0)return`${n}-L${r}`;const s=r.slice(0,i).trim(),o=r.slice(i+1).trim();return o?`${n}-L${s}-L${o}`:`${n}-L${s}`}function _X(t){if(t==null||t==="")return null;if(typeof t!="string")throw new ei(`snippet \`lines\` attribute must be a string, got ${typeof t}`);const e=t.trim();if(e.length===0)return null;if(/^\d+$/.test(e)){const a=Number(e);if(!Number.isFinite(a)||a<1)throw new ei(`snippet \`lines\` value "${t}" is not a positive integer`);return{start:a,end:a}}const n=/^(\d*)-(\d*)$/.exec(e);if(!n)throw new ei(`snippet \`lines\` value "${t}" is malformed; expected "N", "N-M", "N-", or "-M"`);const r=n[1],i=n[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 ei(`snippet \`lines\` start "${r}" is not a positive integer`);if(o!==void 0&&(!Number.isFinite(o)||o<1))throw new ei(`snippet \`lines\` end "${i}" is not a positive integer`);if(s!==void 0&&o!==void 0&&o<s)throw new ei(`snippet \`lines\` value "${t}" is inverted (end before start)`);return{start:s,end:o}}function kX(t,e){if(e===null)return{sliced:t,warnings:[]};const n=t.split(`
327
+ `),r=n.length,i=e.start??1;let s=e.end??r;const o=[];if(i>r)throw new ei(`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:n.slice(i-1,s).join(`
328
+ `),warnings:o}}function hP(t){const e=t.files.read(t.pathAttr);if(e===null){const s=t.referencingPage?`
329
+
330
+ Referenced from: ${t.referencingPage}`:"";throw new ei(`snippet path "${t.pathAttr}" cannot be resolved — the file is missing, not a regular file, or outside the project root.${s}`)}const n=_X(t.lines),{sliced:r,warnings:i}=kX(e,n);return{content:r,relativePath:t.pathAttr,warnings:i}}function xX(t){const e=t.files.read(t.relativePath);if(e===null)throw new ei(`source file "${t.relativePath}" cannot be resolved — it is missing, not a regular file, or outside the project root`);return e}class ei extends Error{constructor(e){super(e),this.name="SnippetSandboxError"}}const SX=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"}),Mw="text";function pP(t){if(typeof t!="string"||t.length===0)return Mw;let e;const n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),r=n>=0?t.slice(n+1):t,i=r.lastIndexOf(".");return i===-1?e="."+r.toLowerCase():i===0?e=r.toLowerCase():e=r.slice(i).toLowerCase(),SX[e]??Mw}const{Tag:cr}=B;function gb(t){return cr.isTag(t)}function tf(t,e){for(const n of t.children??[])if(gb(n)&&n.name==="meta"&&n.attributes["data-field"]===e)return String(n.attributes.content??"");return""}function AX(t){return(t.children??[]).some(e=>gb(e)&&e.name==="meta"&&e.attributes["data-field"]===cP)}function CX(t){return{path:tf(t,"file-ref-path"),lines:tf(t,"file-ref-lines"),label:tf(t,"file-ref-label"),preview:tf(t,"file-ref-preview")}}function mP(t){if(!t)return"";const e=t.endsWith("/")?t.slice(0,-1):t,n=e.lastIndexOf("/");return n>=0?e.slice(n+1):e}function TX(t,e,n,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(!gb(a))return a;const l=a;if(l.attributes?.["data-rune"]==="file-ref"&&AX(l))return PX(l,e,n,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 cr(l.name,l.attributes,u):l};return o(t)}function PX(t,e,n,r,i,s){const o=CX(t),a=o.label||mP(o.path)||o.path,l=wX(o.path,o.lines),c=o.preview==="drawer",u=J9(n,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 cr("a",f,[a])];if(c){const m=new cr("meta",{"data-field":mb,"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 cr(t.name,t.attributes,h)}function EX(t,e){const n=t.path,r=t.lines,i=t.title||mP(n),s=t["target-id"],o=t["github-url"];if(!n||!s)return e.ctx.warn("file-ref hoist payload missing required path or target-id",e.pageUrl),null;if(!e.projectFiles)return e.ctx.error(`file-ref hoist for "${n}" requires a file provider in the pipeline; none was threaded through. Drawer body will be empty.`,e.pageUrl),null;let a="",l="text";try{const w=hP({files:e.projectFiles,pathAttr:n,lines:r||void 0,referencingPage:e.pageUrl});a=w.content,l=pP(w.relativePath);for(const S of w.warnings)e.ctx.warn(`file-ref ${n}: ${S}`,e.pageUrl)}catch(w){const S=w instanceof ei?w.message:`file-ref ${n}: ${w instanceof Error?w.message:String(w)}`;return e.ctx.error(S,e.pageUrl),null}const c=new cr("pre",{"data-language":l,"data-codeblock":"true"},[new cr("code",{"data-language":l,"data-codeblock":"true"},[a])]),u=new cr("figure",{class:"rf-snippet","data-rune":"snippet","data-source-path":n,...r?{"data-lines":r}:{}},[c]),f=new cr("div",{"data-name":"body",class:"rf-drawer__body"},[u]),d=new cr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),h=new cr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),m=new cr("header",{"data-name":"header",class:"rf-drawer__header"},[d,h]),p=[];o&&p.push(new cr("a",{href:o,rel:"external noopener",target:"_blank"},["View source on GitHub →"]));const v=p.length>0?new cr("footer",{"data-name":"footer",class:"rf-drawer__footer"},p):null,O=[m,f];return v&&O.push(v),new cr("section",{id:`drawer-${s}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":s,"data-side":"right","data-size":"md"},O)}dP("file-ref",EX);const{Tag:Hr}=B;function $X(t){return Hr.isTag(t)}function QX(t,e,n,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(!$X(s))return s;const o=s;if(o.attributes?.["data-rune"]===fb&&o.attributes?.["data-xref-preview"]==="drawer")return LX(o,n,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 Hr(o.name,o.attributes,l):o};return i(t)}function LX(t,e,n,r){const i=t.attributes,s=String(i["data-xref-id"]??""),o=i["data-xref-label"];if(!s)return n.warn(`xref preview placeholder on ${r} has no entity id`,r),[t];const a=e?gP(e,s):void 0,l=o||(a?qw(a):s),c=a?qw(a):s,u=s,f=new Hr("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 Hr("meta",{"data-field":mb,"data-source":"xref","data-target-id":u,"data-title":c,"data-entity-id":s});return[f,d]}function gP(t,e){const n=t.getTypes?.()??[];for(const r of n){const i=t.getById(r,e);if(i)return i}}function qw(t){const e=t.data;return String(e.title??e.name??t.id)}function MX(t,e){const n=t["entity-id"]||t["target-id"],r=t["target-id"],i=t.title||n;if(!n||!r)return e.ctx.warn("xref hoist payload missing required entity-id or target-id",e.pageUrl),null;const s=e.registry?gP(e.registry,n):void 0,o=new Hr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),a=new Hr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),l=new Hr("header",{"data-name":"header",class:"rf-drawer__header"},[o,a]),u=[new Hr("div",{"data-rune":db,"data-expand-id":n},[])],f=new Hr("div",{"data-name":"body",class:"rf-drawer__body"},u),d=s?.sourceUrl??"",h=d?new Hr("footer",{"data-name":"footer",class:"rf-drawer__footer"},[new Hr("a",{href:d},["View full page →"])]):null,m=[l,f];return h&&m.push(h),new Hr("section",{id:`drawer-${r}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":r,"data-side":"right","data-size":"md"},m)}dP("xref",MX);const{Tag:Xl}=B,qX=["fraction","percent","none"],RX=["positive","caution","negative"];function jg(t){return typeof t=="string"?t:Array.isArray(t)?t.map(jg).join(""):B.Tag.isTag(t)?jg(t.children??[]):""}const DX=Xe({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:qX.slice(),description:"Readout: fraction (default with value/max), percent, or none."},sentiment:{type:String,required:!1,matches:RX.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(t,e,n){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=_=>Math.max(0,Math.min(100,_)),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 Re(B.transform(nt(t.body),n)).toArray(),h=jg(d).trim(),m=e.sentiment,p=m?new Xl("meta",{content:m}):void 0,v=new Xl("span",{},[]),O=new Xl("span",{},[v]),b={track:O,fill:v},w=p?[p]:[];if(d.length>0){const _=new Xl("span",{},d);b.label=_,w.push(_)}if(u){const _=new Xl("span",{},[u]);b.value=_,w.push(_)}w.push(O);const S=qe({rune:"progress",tag:"div",properties:p?{sentiment:p}:{},refs:b,children:w});return S.attributes.role="progressbar",S.attributes["aria-valuemin"]="0",a?(S.attributes["aria-valuenow"]=String(r),S.attributes["aria-valuemax"]=String(i)):(S.attributes["aria-valuenow"]=String(l),S.attributes["aria-valuemax"]="100"),h&&(S.attributes["aria-label"]=h),S.attributes.style=`--rf-progress: ${l}%`,S}}),{Tag:Oo}=B,vP={media:"media",body:"body"},NX=Xe({sections:vP,provides:["prose"],base:jZ,attributes:{href:{type:String,required:!1,default:"",description:"Optional link target; makes the whole card clickable."},"content-place":{type:String,required:!1,description:'Cover overlay anchor: "<block> <inline>" (e.g. "end start") or "auto"'},height:{type:String,required:!1,matches:["sm","md","lg","xl"],description:"Intrinsic card height (named scale) for cover / bg-only cards"},aspect:{type:String,required:!1,description:'Intrinsic card aspect ratio (e.g. "16/9", "3/4") for cover / bg-only cards'}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const{media:r,body:i,footer:s}=ZZ(nt(t.body)),{metas:o,children:a}=zZ(e),l=e["content-place"],c=e.height,u=e.aspect,f=l?new Oo("meta",{content:l}):void 0,d=c?new Oo("meta",{content:c}):void 0,h=u?new Oo("meta",{content:u}):void 0,m=[...a];if(f&&m.push(f),d&&m.push(d),h&&m.push(h),r.length>0){const k=new Re(B.transform(r,n)),P=FZ(k),T=P?[P]:k.toArray();m.push(new Oo("div",{"data-section":"media","data-name":"media"},T))}let p,v=i;i.length>=2&&i[0].type==="paragraph"&&i[1].type==="heading"&&(p=i[0],v=i.slice(1));let O;if(p){const P=new Re(B.transform([p],n)).toArray()[0];B.Tag.isTag(P)&&(O=P)}const w=new Re(B.transform(v,n)).toArray(),S=w.find(k=>B.Tag.isTag(k)&&/^h[1-6]$/.test(k.name)),_=new Oo("div",{"data-name":"body"},w);let x;if(s.length>0){const k=new Re(B.transform(s,n));x=new Oo("footer",{"data-name":"footer"},k.toArray())}O&&m.push(O),m.push(_),x&&m.push(x);let C;const A=String(e.href??"");A&&(C=new Oo("a",{"data-name":"link",href:A,"aria-hidden":"true",tabindex:"-1"},[]),m.push(C));const y={body:_};return S&&(y.title=S),O&&(y.eyebrow=O),x&&(y.footer=x),C&&(y.link=C),qe({rune:"card",tag:"div",properties:{"media-position":o.mediaPosition,"content-place":f,height:d,aspect:h},refs:y,children:m})}}),{Tag:IX}=B,BX=["positive","negative","caution","neutral"],jX=["status","category","quantity","temporal","tag","id"],OP={inline:!0,attributes:{sentiment:{type:String,required:!1,matches:BX.slice(),description:"Sentiment dimension: positive, negative, caution, neutral. Default: neutral."},type:{type:String,required:!1,matches:jX.slice(),description:"Meta-type dimension: status, category, quantity, temporal, tag, id. Default: tag."}},transform(t,e){const n=t.attributes.sentiment??"neutral",r=t.attributes.type??"tag",i={class:"rf-badge","data-rune":"badge","data-meta-sentiment":n,"data-meta-type":r},s=t.transformChildren(e);return new IX("span",i,s)}};ra(OP,"inline");const{Tag:Wp}=B;function zX(t){const e=t.findIndex(n=>n.type==="hr");return e<0?{left:t,right:[]}:{left:t.slice(0,e),right:t.slice(e+1)}}const ZX=Xe({attributes:{},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(t,e,n){const r=zX(nt(t.body)),i=B.transform(r.left,n),s=B.transform(r.right,n),o=new Wp("div",{},i),a=r.right.length>0?new Wp("div",{"data-align":"end"},s):null,l=a?[o,a]:[o];return new Wp("div",{"data-rune":"bar","data-zone-layout":"bar"},l)}}),{Ast:nf,Tag:bo}=B;function FX(t){const e=t.children??[];if(e.length===0)return null;let n,r;const i=e[0];if(i?.type==="inline")n=i,r=e.slice(1);else if(i?.type==="paragraph")n=i.children?.[0],r=e.slice(1);else return null;if(!n||n.type!=="inline")return null;const s=n.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 nf.Node("text",{content:c})],f=s.slice(1),d=(()=>{const p=f[0];if(p?.type==="text"&&typeof p.attributes?.content=="string"){const v=p.attributes.content.replace(/^\s+/,"");return v===""?f.slice(1):[new nf.Node("text",{content:v}),...f.slice(1)]}return f})(),h=d.length>0?[new nf.Node("inline",{},d)]:[],m=h.length>0?[new nf.Node("paragraph",{},h)]:[];return{term:u,rest:h,restBlocks:[...m,...r]}}const XX=Xe({attributes:{},contentModel:{type:"sequence",fields:[{name:"list",match:"list",optional:!1}]},transform(t,e,n){const i=nt(t.list).find(a=>a.type==="list");if(!i)return new bo("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=FX(a);let c,u;if(l){const f=B.transform(l.term,n),d=B.transform(l.restBlocks,n);c=new bo("dt",{"data-meta-label":""},f),u=new bo("dd",{},Rw(d))}else{const f=B.transform(a.children??[],n);c=new bo("dt",{"data-meta-label":""},[]),u=new bo("dd",{},Rw(f)),VX(a)}o.push(new bo("div",{"data-name":"row"},[c,u]))}return new bo("dl",{"data-rune":"deflist","data-zone-layout":"definition-list"},o)}});function Rw(t){if(t.length!==1)return t;const e=t[0];return!B.Tag.isTag(e)||e.name!=="p"?t:e.children}const Dw=new Set;function VX(t){const e=t.location??null,n=e?`${e.start?.line??"?"}:${e.start?.character??"?"}`:"unknown";Dw.has(n)||(Dw.add(n),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 WX{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 Be(t){return new WX(t)}function YX(t){const e={};for(const n of Object.values(t))for(const r of n.names)e[r]=n.schema;return e}const{Ast:UX}=B;class QJ extends UX.Node{constructor(e,n,r,i){super(e,n,r,i)}transform(e){return super.transform(e)}}[...t6];const GX=new Set(["id","type","sourceFile","sourceUrl"]);function HX(t){const e=[];let n="",r=!1;for(const i of t){if(i==='"'){r=!r;continue}if(!r&&/\s/.test(i)){n&&(e.push(n),n="");continue}n+=i}return n&&e.push(n),e}function fl(t){const e=[],n=new Map;if(!t||!t.trim())return{clauses:[],warnings:e};for(const r of HX(t)){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=n.get(s);a?a.push(o):n.set(s,[o])}return{clauses:[...n.entries()].map(([r,i])=>({field:r,values:i})),warnings:e}}function bP(t,e){return e==="url"?t.sourceUrl??t.data.url??"":GX.has(e)?t[e]:t.data[e]}function KX(t){const e=t.split("*").map(n=>n.replace(/[.+?^${}()|[\]\\]/g,"\\$&"));return new RegExp("^"+e.join(".*")+"$")}const JX=/^\/(.+)\/([gimsuy]*)$/,eV=/[\\^$.+?()[\]{}|]/;function yP(t,e){const n=e.match(JX);if(n&&(n[2].length>0||eV.test(n[1])))try{return new RegExp(n[1],n[2]).test(t)}catch{return t===e}return e.includes("*")?KX(e).test(t):t===e}function tV(t){if(Array.isArray(t))return t.map(n=>String(n??""));const e=String(t??"");return e.includes(",")?e.split(",").map(n=>n.trim()):[e]}function Sh(t,e){for(const n of e.clauses){const r=tV(bP(t,n.field));if(!n.values.some(s=>r.some(o=>yP(o,s))))return!1}return!0}function Fa(t){return String(t??"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}const{Tag:zs,Ast:nV}=B;function vb(t){if(!t)return{template:""};const e=B.parse(`
331
+ `+t),n=[[]];for(const s of e.children)s.type==="hr"?n.push([]):n[n.length-1].push(s);if(n.length===1)return{template:t};const r=s=>s.length?B.format(new nV.Node("document",{},s)):"",i=n.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 rV{constructor(e,n={}){this.matches=e,this.overrides=n}order(e,n){return this.overrides[e]?.[n]??this.matches[e]?.[n]}rank(e,n,r){const i=this.order(e,n);return i?i.indexOf(r):-1}}function Ob(t){const e={},n=t?.tags??{};for(const[r,i]of Object.entries(n)){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 rV(e,t?.orderings??{})}function wP(t){return t.sourceUrl||String(t.data.url??"")}function iV(t){const e=t.data;return String(e.title??e.name??t.id)}function Xr(t,e){const n=bP(t,e);return Array.isArray(n)?n.join(", "):String(n??"")}function _P(t,e){const n=wP(t),r=iV(t),i=`${e}__title`;return n?new zs("a",{class:i,href:n},[r]):new zs("span",{class:i},[r])}function sV(t){return t.id||String(t.data?.name??"")}function bb(t,e){const n=t.data?.status,r=n?e?.sentiments?.[t.type]?.status?.[n]??"":"";return{id:t.id,identifier:sV(t),type:t.type,url:wP(t),data:t.data,sentiment:r,mixed:e?.mixed??!1,group:e?.group??"",groupCount:e?.groupCount??0}}function oV(t,e,n){if(!e)return t;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&&t.some(o=>n.order(o.type,r));return[...t].sort((o,a)=>{if(s){const d=n.rank(o.type,r,Xr(o,r)),h=n.rank(a.type,r,Xr(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=Xr(o,r),c=Xr(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 kP(t,e){const n=new Map;for(const r of t){const i=e(r),s=n.get(i);s?s.push(r):n.set(i,[r])}return n}function zg(t,e,n){const r=kP(t,o=>Xr(o,e)||"(none)");if(!n||![...t].some(o=>n.order(o.type,e)))return r;const i=o=>{let a=1/0;for(const l of o){const c=n.rank(l.type,e,Xr(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 xP(t){const e=t.map(n=>new zs("details",{class:"rf-accordion-item","data-group":n.key},[new zs("summary",{class:"rf-accordion-item__header"},[new zs("span",{class:"rf-accordion-item__title"},[n.label]),new zs("span",{class:"rf-accordion-item__count"},[String(n.count)])]),new zs("div",{class:"rf-accordion-item__body"},n.nodes)]));return[new zs("div",{class:"rf-accordion"},e)]}function vs(t,e,n){const r=pb(t,e,n);return Array.isArray(r)?r:[r]}const{Tag:Nt,Ast:aV}=B;function Zg(t){return _P(t,"rf-collection")}function yb(t){return Nt.isTag(t)}function ji(t,e){for(const n of t.children??[])if(yb(n)&&n.name==="meta"&&n.attributes["data-field"]===e)return String(n.attributes.content??"");return""}function lV(t){return(t.children??[]).some(e=>yb(e)&&e.name==="meta"&&e.attributes["data-field"]===oP)}function cV(t){const e=ji(t,"collection-limit"),n=Number(e);return{types:ji(t,"collection-type").split(",").map(r=>r.trim()).filter(Boolean),filter:ji(t,"collection-filter"),sort:ji(t,"collection-sort"),group:ji(t,"collection-group"),groupDisplay:ji(t,"collection-group-display")||"headings",limit:e&&Number.isFinite(n)&&n>0?Math.floor(n):void 0,fields:ji(t,"collection-fields").split(",").map(r=>r.trim()).filter(Boolean),layout:ji(t,"collection-layout")||"list",bodySource:ji(t,"collection-body"),empty:ji(t,"collection-empty")}}function uV(t,e){const n=e.fields.map(r=>new Nt("span",{class:"rf-collection__field","data-field":r},[Xr(t,r)]));return e.layout==="list"?new Nt("div",{class:"rf-collection__item","data-entity-id":t.id},[Zg(t)]):new Nt("article",{class:"rf-collection__card","data-entity-id":t.id},[Zg(t),...n])}function fV(t,e,n){const r=B.parse(t),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`,n),s={label:a,cellNodes:[]},i.push({label:a,cellSource:""})}else s&&(s.cellNodes.push(o),i[i.length-1].cellSource=B.format(new aV.Node("document",{},s.cellNodes)));return i}function dV(t,e,n,r,i,s){const o=fV(e,r,i);if(!n)return r.error("collection — table column templates present but no embedConfig threaded through the pipeline",i),new Nt("table",{class:"rf-collection__table"},[]);const a=new Nt("thead",{},[new Nt("tr",{},o.map(c=>new Nt("th",{},[c.label])))]),l=t.map(c=>{const u=bb(c,s),f=o.map(d=>{const h=pb(d.cellSource,n,{item:u}),m=Array.isArray(h)?h:[h];return new Nt("td",{},m)});return new Nt("tr",{"data-entity-id":c.id},f)});return new Nt("table",{class:"rf-collection__table"},[a,new Nt("tbody",{},l)])}function hV(t,e){const n=[new Nt("th",{},["Title"]),...e.fields.map(s=>new Nt("th",{},[Fa(s)]))],r=new Nt("thead",{},[new Nt("tr",{},n)]),i=t.map(s=>{const o=[new Nt("td",{},[Zg(s)]),...e.fields.map(a=>new Nt("td",{"data-field":a},[Xr(s,a)]))];return new Nt("tr",{"data-entity-id":s.id},o)});return new Nt("table",{class:"rf-collection__table"},[r,new Nt("tbody",{},i)])}function pV(t,e,n,r,i,s){return n?t.map(o=>{const a=bb(o,s),l=pb(e,n,{item:a}),c=Array.isArray(l)?l:[l];return new Nt("div",{class:"rf-collection__item","data-entity-id":o.id,"data-block":""},c)}):(r.error("collection — body template present but no embedConfig threaded through the pipeline",i),[])}function rf(t,e,n,r){if(!e.group)return r(t);const i=zg(t,e.group,n);if(e.groupDisplay==="accordion")return xP([...i].map(([o,a])=>({key:o,label:o,count:a.length,nodes:r(a,{group:o,groupCount:a.length})})));const s=[];for(const[o,a]of i)s.push(new Nt("div",{class:"rf-collection__group","data-group":o},[new Nt("h3",{class:"rf-collection__group-title"},[o]),...r(a,{group:o,groupCount:a.length})]));return s}function mV(t,e,n,r,i,s){const o=cV(t);let a=[];for(const b of o.types)a.push(...e.getAll(b));if(o.filter){const b=fl(o.filter);for(const w of b.warnings)i.warn(`collection filter: ${w}`,s);a=a.filter(w=>Sh(w,b))}a=oV(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=vb(o.bodySource),f=u.template,d={...t.attributes,"data-type":o.types.join(","),"data-layout":o.layout},m={mixed:new Set(a.map(b=>b.type)).size>1&&o.group!=="type",sentiments:n?.sentiments};if(a.length===0){const b=[];return u.fallback&&n?b.push(new Nt("div",{"data-name":"empty",class:"rf-collection__empty"},vs(u.fallback,n,c))):o.empty&&b.push(new Nt("div",{"data-name":"empty",class:"rf-collection__empty"},[o.empty])),new Nt(t.name,d,b)}let p;o.layout==="table"&&f?p=rf(a,o,r,(b,w)=>[dV(b,f,n,i,s,{...m,...w})]):f?p=rf(a,o,r,(b,w)=>pV(b,f,n,i,s,{...m,...w})):o.layout==="table"?p=rf(a,o,r,b=>[hV(b,o)]):p=rf(a,o,r,b=>b.map(w=>uV(w,o)));const v=new Nt("div",{"data-name":"items",class:"rf-collection__items"},p),O=[];return u.preamble&&n&&O.push(new Nt("div",{"data-name":"preamble",class:"rf-collection__preamble"},vs(u.preamble,n,c))),new Nt(t.name,d,[...O,v])}function gV(t,e,n,r,i){const s=Ob(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!yb(a))return a;const l=a;return l.attributes?.["data-rune"]==="collection"&&lV(l)?mV(l,n,r,s,i,e):!l.children||l.children.length===0?l:new Nt(l.name,l.attributes,l.children.map(o))};return o(t)}const{Tag:xr}=B;function wb(t){return xr.isTag(t)}function vi(t,e){for(const n of t.children??[])if(wb(n)&&n.name==="meta"&&n.attributes["data-field"]===e)return String(n.attributes.content??"");return""}function vV(t){return(t.children??[]).some(e=>wb(e)&&e.name==="meta"&&e.attributes["data-field"]===aP)}function Yp(t){return t.split(",").map(e=>e.trim()).filter(Boolean)}function OV(t){const e=vi(t,"relationships-limit"),n=Number(e);return{of:vi(t,"relationships-of"),kinds:Yp(vi(t,"relationships-kind")),types:Yp(vi(t,"relationships-type")),group:vi(t,"relationships-group")||"kind",groupDisplay:vi(t,"relationships-group-display")||"headings",sort:vi(t,"relationships-sort"),limit:e&&Number.isFinite(n)&&n>0?Math.floor(n):void 0,fields:Yp(vi(t,"relationships-fields")),layout:vi(t,"relationships-layout")||"list",bodySource:vi(t,"relationships-body"),empty:vi(t,"relationships-empty")}}function bV(t,e,n){if(!e)return t;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.some(o=>n.order(o.target.type,r));return[...t].sort((o,a)=>{if(s){const u=n.rank(o.target.type,r,Xr(o.target,r)),f=n.rank(a.target.type,r,Xr(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=Xr(o.target,r),c=Xr(a.target,r);return l.localeCompare(c)*i})}function Nw(t){return _P(t,"rf-relationships")}function yV(t,e){const n=e.fields.map(i=>new xr("span",{class:"rf-relationships__field","data-field":i},[Xr(t.target,i)])),r={"data-entity-id":t.target.id,"data-kind":t.kind};return e.layout==="grid"?new xr("article",{class:"rf-relationships__card",...r},[Nw(t.target),...n]):new xr("div",{class:"rf-relationships__item",...r},[Nw(t.target),...n])}function Up(t,e,n,r){return t.map(i=>{if(n&&r){const s=vs(n,r,{item:bb(i.target),kind:i.kind});return new xr("div",{class:"rf-relationships__item","data-entity-id":i.target.id,"data-kind":i.kind,"data-block":""},s)}return yV(i,e)})}function wV(t,e,n,r,i,s){const o=OV(t);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=bV(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=vb(o.bodySource),f=u.template,d={...t.attributes,"data-of":o.of,"data-layout":o.layout};if(a.length===0){const v=[];return u.fallback&&n?v.push(new xr("div",{"data-name":"empty",class:"rf-relationships__empty"},vs(u.fallback,n,c))):o.empty&&v.push(new xr("div",{"data-name":"empty",class:"rf-relationships__empty"},[o.empty])),new xr(t.name,d,v)}let h;if(o.group==="none")h=Up(a,o,f,n);else{const v=o.group==="type"?b=>b.target.type:b=>b.kind,O=kP(a,v);if(o.groupDisplay==="accordion")h=xP([...O].map(([b,w])=>({key:b,label:Fa(b),count:w.length,nodes:Up(w,o,f,n)})));else{h=[];for(const[b,w]of O)h.push(new xr("div",{class:"rf-relationships__group","data-group":b},[new xr("h3",{class:"rf-relationships__group-title"},[Fa(b)]),...Up(w,o,f,n)]))}}const m=new xr("div",{"data-name":"items",class:"rf-relationships__items"},h),p=[];return u.preamble&&n&&p.push(new xr("div",{"data-name":"preamble",class:"rf-relationships__preamble"},vs(u.preamble,n,c))),new xr(t.name,d,[...p,m])}function _V(t,e,n,r,i){const s=Ob(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!wb(a))return a;const l=a;return l.attributes?.["data-rune"]==="relationships"&&vV(l)?wV(l,n,r,s,i,e):!l.children||l.children.length===0?l:new xr(l.name,l.attributes,l.children.map(o))};return o(t)}const{Tag:vn}=B;function _b(t){return vn.isTag(t)}function Oi(t,e){for(const n of t.children??[])if(_b(n)&&n.name==="meta"&&n.attributes["data-field"]===e)return String(n.attributes.content??"");return""}function kV(t){return(t.children??[]).some(e=>_b(e)&&e.name==="meta"&&e.attributes["data-field"]===lP)}function xV(t){const e=Oi(t,"aggregate-limit"),n=Number(e);return{types:Oi(t,"aggregate-type").split(",").map(r=>r.trim()).filter(Boolean),filter:Oi(t,"aggregate-filter"),value:Oi(t,"aggregate-value"),group:Oi(t,"aggregate-group"),sort:Oi(t,"aggregate-sort"),limit:e&&Number.isFinite(n)&&n>0?Math.floor(n):void 0,bodySource:Oi(t,"aggregate-body"),empty:Oi(t,"aggregate-empty"),layout:Oi(t,"aggregate-layout"),chartType:Oi(t,"aggregate-chart-type")||"bar",chartTitle:Oi(t,"aggregate-chart-title")}}function SV(t,e,n,r){const i=f=>new vn("td",{},[f]),s=f=>new vn("th",{},[f]),o=[Fa(e.group||"group"),"Count"];n&&o.push("Value");const a=new vn("tr",{},o.map(s)),l=t.map(([f,d])=>{const h=SP(r,d,e.group,f),p=[h?new vn("td",{"data-meta-sentiment":h},[Fa(f)]):i(Fa(f)),i(String(d.length))];return n&&p.push(i(String(Mo(d,n)))),new vn("tr",{},p)}),c=[];e.chartTitle&&c.push(new vn("caption",{},[e.chartTitle])),c.push(new vn("thead",{},[a])),c.push(new vn("tbody",{},l));const u=new vn("table",{"data-name":"data"},c);return new vn("rf-chart",{"data-rune":"chart","data-rune-fields":JSON.stringify({type:e.chartType,stacked:"false"}),"data-type":e.chartType,"data-stacked":"false"},[u])}function Cd(t,e){return e<=0?0:Math.round(t/e*100)}function Mo(t,e){return e?t.filter(n=>Sh(n,e)).length:t.length}function SP(t,e,n,r){const i=e[0]?.type??"";return t?.[i]?.[n]?.[r]??""}function Iw(t,e,n,r,i){if(!e)return t;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"?[...t].sort(([,a],[,l])=>(a.length-l.length)*o):s==="value"?[...t].sort(([,a],[,l])=>(Mo(a,i)-Mo(l,i))*o):s==="percent"?[...t].sort(([,a],[,l])=>{const c=Cd(Mo(a,i),a.length),u=Cd(Mo(l,i),l.length);return(c-u)*o}):[...t].sort(([a,l],[c,u])=>{const f=l[0]?.type??"",d=u[0]?.type??"",h=r.rank(f,n,a),m=r.rank(d,n,c),p=h>=0,v=m>=0;if(p&&v){if(h!==m)return(h-m)*o}else if(p!==v)return p?-1:1;return a.localeCompare(c)*o})}function AV(t,e,n,r,i,s){const o=xV(t);let a=[];for(const S of o.types)a.push(...e.getAll(S));if(o.filter){const S=fl(o.filter);for(const _ of S.warnings)i.warn(`aggregate filter: ${_}`,s);a=a.filter(_=>Sh(_,S))}const l=o.value?fl(o.value):null;if(l)for(const S of l.warnings)i.warn(`aggregate value: ${S}`,s);const c=a.length,u=Mo(a,l),f=o.value?Cd(u,c):100;if(o.layout==="chart"){if(c===0)return new vn("div",{"data-name":"empty",class:"rf-aggregate__empty"},o.empty?[o.empty]:[]);let S=[...zg(a,o.group,r).entries()];return S=Iw(S,o.sort,o.group,r,l),o.limit!==void 0&&S.length>o.limit&&(S=S.slice(0,o.limit)),SV(S,o,l,n?.sentiments)}if(!o.bodySource)return new vn(t.name,{...t.attributes,"data-aggregate":"count","data-count":String(c)},[String(c)]);const d=vb(o.bodySource),h=d.template,m={...t.attributes,"data-aggregate":"breakdown"};if(c===0){const S=[];if(d.fallback&&n){const _={item:{key:"",count:0,value:0,percent:0,total:0,shown:0}};S.push(new vn("div",{"data-name":"empty",class:"rf-aggregate__empty"},vs(d.fallback,n,_)))}else o.empty&&S.push(new vn("div",{"data-name":"empty",class:"rf-aggregate__empty"},[o.empty]));return new vn(t.name,m,S)}const p=[];if(d.preamble&&n){const S={item:{count:c,value:u,percent:f,total:c}};p.push(new vn("div",{"data-name":"preamble",class:"rf-aggregate__preamble"},vs(d.preamble,n,S)))}if(!o.group){const S=[...p];if(h&&n){const _={item:{key:"",count:c,value:u,percent:f,total:c,shown:1}};S.push(new vn("div",{"data-name":"items",class:"rf-aggregate__items"},vs(h,n,_)))}return new vn(t.name,m,S)}let v=[...zg(a,o.group,r).entries()];v=Iw(v,o.sort,o.group,r,l),o.limit!==void 0&&v.length>o.limit&&(v=v.slice(0,o.limit));const O=v.length,b=[];if(h&&n)for(const[S,_]of v){const x=_.length,C=Mo(_,l),A=o.value?Cd(C,x):100,y={item:{key:S,count:x,value:C,percent:A,total:c,shown:O,sentiment:SP(n?.sentiments,_,o.group,S)}},k=vs(h,n,y);b.push(new vn("div",{class:"rf-aggregate__group","data-group":S,"data-block":""},k))}const w=new vn("div",{"data-name":"items",class:"rf-aggregate__items"},b);return new vn(t.name,m,[...p,w])}function CV(t,e,n,r,i){const s=Ob(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!_b(a))return a;const l=a;return l.attributes?.["data-rune"]==="aggregate"&&kV(l)?AV(l,n,r,s,i,e):!l.children||l.children.length===0?l:new vn(l.name,l.attributes,l.children.map(o))};return o(t)}const{Tag:kb}=B,TV=500;function AP(t){return kb.isTag(t)}function PV(t){const e=String(t.attributes["data-rf-query"]??"").trim();if(!e)return null;const n=Number(t.attributes["data-rf-limit"]);return{expr:e,fields:String(t.attributes["data-rf-fields"]??"").split(",").map(r=>r.trim()).filter(Boolean),shape:String(t.attributes["data-rf-shape"]??"flat")||"flat",limit:Number.isFinite(n)&&n>0?Math.floor(n):void 0}}function EV(t,e){const n=t.data,r=String(t.sourceUrl??n.url??"");let i;if(e.length>0){i={};for(const s of e)i[s]=n[s]}else i={...n};return{id:t.id,type:t.type,url:r,data:i}}function Bw(t){return t.length>1&&t.endsWith("/")?t.slice(0,-1):t}function $V(t){const e=new Map;for(const r of t)e.set(Bw(r.url),{...r,children:[]});const n=[];for(const r of e.values()){const i=Bw(String(r.data.parentUrl??"")),s=i?e.get(i):void 0;s&&s!==r?s.children.push(r):n.push(r)}return n}function QV(t,e){if(!e.getRelated)return[];const n=new Set(t.map(i=>i.id)),r=[];for(const i of t)for(const s of e.getRelated(i.id))n.has(s.toId)&&r.push({from:s.fromId,to:s.toId,kind:s.kind});return r}function LV(t){return(t.children??[]).some(e=>AP(e)&&e.name==="template"&&e.attributes["data-content"]==="fallback")}function MV(t,e,n,r,i){const s=fl(e.expr);for(const h of s.warnings)r.warn(`sandbox data: ${h}`,i);const o=s.clauses.find(h=>h.field==="type"),a=o?o.values:[];if(a.length===0)return r.warn(`sandbox data="${e.expr}": no entity type — include a "type:<name>" clause`,i),t;let l=[];for(const h of a)l.push(...n.getAll(h));const c={clauses:s.clauses.filter(h=>h.field!=="type")};c.clauses.length>0&&(l=l.filter(h=>Sh(h,c)));let u=l.map(h=>EV(h,e.fields));const f=e.limit??TV;u.length>f&&(r.warn(`data-bound sandbox query "${e.expr}" yielded ${u.length} records, over the ${f} cap — truncated`,i),u=u.slice(0,f)),LV(t)||r.warn("data-bound sandbox has no fallback — provide a no-WebGL fallback (e.g. a {% collection %} with the same query) for accessibility",i);const d=e.shape==="tree"?{shape:"tree",tree:$V(u)}:e.shape==="graph"?{shape:"graph",nodes:u,edges:QV(u,n)}:{shape:"flat",records:u};return new kb(t.name,{...t.attributes,"data-rf-records":JSON.stringify(d)},t.children??[])}function Fg(t,e,n,r){if(Array.isArray(t))return t.map(o=>Fg(o,e,n,r));if(!AP(t))return t;const i=(t.children??[]).map(o=>Fg(o,e,n,r));let s=new kb(t.name,t.attributes,i);if(s.name==="rf-sandbox"&&s.attributes["data-rf-query"]){const o=PV(s);o&&(s=MV(s,o,e,n,r))}return s}const{Tag:qV}=B;function Xg(t){return t==null||typeof t=="string"||typeof t=="number"?t:qV.isTag(t)?{$$mdtype:"Tag",name:t.name,attributes:t.attributes,children:t.children.map(Xg)}:t}function RV(t){return Array.isArray(t)?t.map(Xg):Xg(t)}const{Tag:Td}=B;function DV(t,e,n,r){const i=r?[r]:t.getTypes();for(const s of i){const o=t.getById(s,e,n);if(o)return o}}function NV(t,e,n){const r=e.toLowerCase(),i=n?[n]:t.getTypes(),s=[];for(const o of i)for(const a of t.getAll(o)){const l=a.data.name??"",c=a.data.title??"";(l.toLowerCase()===r||c.toLowerCase()===r)&&s.push(a)}return s}function jw(t){const e=t.data.url||t.sourceUrl;if(!e)return;const n=t.data.headingId;return n?`${e}#${n}`:e}function zw(t,e,n){if(e)return e;if(n){const r=n.data.title,i=n.data.name,s=n.data.text;return r||i||s||t}return t}const CP=/\{([a-zA-Z_$][a-zA-Z0-9_$]*)\}/g;function IV(t){return t.split("/").map(encodeURIComponent).join("/")}function BV(t,e,n){return t.replace(CP,(r,i)=>{const s=i==="id"?e:n[i]??"";return IV(s)})}function jV(t,e,n){return t.replace(CP,(r,i)=>i==="id"?e:n[i]??"")}function zV(t,e){for(const n of e){const r=n.match.exec(t);if(!r)continue;const i=r.groups??{};return{url:BV(n.template,t,i),label:jV(n.label,t,i),type:n.type}}}function ZV(t,e){const n=t.indexOf("#");if(n<0)return t;const r=t.slice(0,n),i=t.slice(n),s=o=>o.endsWith("/")?o.slice(0,-1):o;return s(r)===s(e)?i:t}function FV(t,e,n,r){let i=DV(r.registry,t,r.pageUrl,n);if(!i){const c=NV(r.registry,t,n);if(c.length===1)i=c[0];else if(c.length>1){if(new Set(c.map(f=>jw(f)??f.sourceUrl??"")).size>1){const f=c.map(d=>`${d.type} "${d.data.title||d.data.name||d.id}" on ${d.sourceUrl??"(no URL)"}`).join(", ");r.ctx.warn(`xref "${t}" on ${r.pageUrl} — matches ${c.length} entities (${f}). Add type hint to disambiguate.`,r.pageUrl)}i=c[0]}}const s=i?jw(i):void 0;let o;if(i&&s)o={href:s,label:zw(t,e,i),type:i.type,source:"registry",targetType:i.type,entityId:i.id};else{const c=zV(t,r.patterns);c&&(o={href:c.url,label:zw(t,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 "${t}" on ${r.pageUrl} — entity not found`,r.pageUrl),{tag:new Td("span",{class:"rf-xref rf-xref--unresolved","data-xref-id":t},[e||t])};o.href===r.pageUrl&&r.ctx.info(`xref "${t}" on ${r.pageUrl} — references itself`,r.pageUrl);const a=ZV(o.href,r.pageUrl),l={class:`rf-xref rf-xref--${o.type}`,href:a,"data-xref-id":o.entityId??t,"data-xref-source":o.source};return o.targetType&&(l["data-target-type"]=o.targetType),{tag:new Td("a",l,[o.label])}}function XV(t,e,n,r,i){return Vg(t,{pageUrl:e,registry:n,patterns:r,ctx:i})}function Vg(t,e){if(!Td.isTag(t)){if(Array.isArray(t)){const i=t,s=i.map(o=>Vg(o,e));return s.every((o,a)=>o===i[a])?t:s}return t}const n=t;if(n.attributes?.["data-rune"]===fb){const i=n.attributes["data-xref-id"],s=n.attributes["data-xref-label"],o=n.attributes["data-xref-type"];return i?FV(i,s,o,e).tag:new Td("span",{class:"rf-xref rf-xref--unresolved"},[s||"?"])}const r=(n.children??[]).map(i=>Vg(i,e));return r.every((i,s)=>i===n.children[s])?n:{...n,children:r}}const{Ast:TP,Tag:Wg}=B;function sf(t,e){if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"&&"$$mdtype"in t){const n=t;if(n.$$mdtype==="Variable"&&Array.isArray(n.path)){let r=e;for(const i of n.path){if(r==null)return"";r=r[i]}return r==null?"":String(r)}}return""}const VV=new Set(["code-group","diff"]);function WV(t,e,n){if(!n.sandbox)return;let r=!1;return PP(t,e,n,n.sandbox,i=>{i&&(r=!0)}),r?t:void 0}function PP(t,e,n,r,i){if(t.children)for(let s=0;s<t.children.length;s++){const o=t.children[s];if(o.type==="tag"&&o.tag==="snippet"){t.children[s]=YV(o,e,n,r),i(!0);continue}PP(o,e,n,r,i)}}function Gp(t,e){return new TP.Node("fence",{content:`snippet error: ${e}
332
+ `,language:"text",source:t||"(unresolved)","data-snippet-error":e})}function YV(t,e,n,r){const i=sf(t.attributes.path,n.variables),s=t.attributes.lines!==void 0?sf(t.attributes.lines,n.variables):void 0,o=t.attributes.lang!==void 0?sf(t.attributes.lang,n.variables):void 0,a=t.attributes.linenumbers===!0,l=t.attributes.highlight!==void 0?sf(t.attributes.highlight,n.variables):void 0;if(!i){const d="snippet `path` attribute is required (and an unresolvable variable reference resolves to empty)";return n.error(d,e.url),Gp("",d)}let c;try{c=hP({files:r,pathAttr:i,lines:s||void 0,referencingPage:e.relativePath})}catch(d){if(d instanceof ei)return n.error(d.message,e.url),Gp(i,d.message);const h=d.message??String(d);return n.error(`snippet "${i}" failed unexpectedly: ${h}`,e.url),Gp(i,h)}for(const d of c.warnings)n.warn(d,e.url);const u=o&&o.length>0?o:pP(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 TP.Node("fence",f)}function UV(t,e,n){const r=Yg(t.renderable,!1);return r===t.renderable?t:{...t,renderable:r}}function Yg(t,e){if(Array.isArray(t)){let l=!1;const c=t.map(u=>{const f=Yg(u,e);return f!==u&&(l=!0),f});return l?c:t}if(!Wg.isTag(t))return t;const n=t,r=n.attributes?.["data-rune"],i=typeof r=="string"&&VV.has(r),s=e||i;if(n.name==="pre"&&n.attributes?.["data-source"]!==void 0&&!e)return GV(n);if(!n.children||n.children.length===0)return n;let o=!1;const a=n.children.map(l=>{const c=Yg(l,s);return c!==l&&(o=!0),c});return o?new Wg(n.name,n.attributes,a):n}function GV(t){const e=t.attributes,n=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":n};return r&&(i["data-lines"]=r),new Wg("figure",i,[t])}class Kn extends Error{constructor(e){super(e),this.name="DataSourceError"}}function HV(t){const e=t.lastIndexOf(".");if(e===-1)return null;switch(t.slice(e+1).toLowerCase()){case"csv":return"csv";case"tsv":return"tsv";case"json":return"json";case"ndjson":case"jsonl":return"ndjson";default:return null}}function KV(t,e){const n=[];let r=[],i="",s=!1,o=!1;const a=()=>{r.push(i),i=""},l=()=>{a(),n.push(r),r=[],o=!1};for(let c=0;c<t.length;c++){const u=t[c];if(s){u==='"'?t[c+1]==='"'?(i+='"',c++):s=!1:i+=u;continue}if(u==='"'){s=!0,o=!0;continue}if(u===e){a(),o=!0;continue}if(u==="\r"){o=!0;continue}if(u===`
333
+ `){l();continue}i+=u,o=!0}return(o||i.length>0||r.length>0)&&l(),n}function JV(t,e){const n=e.delimiter&&e.delimiter.length>0?e.delimiter:e.format==="tsv"?" ":",",r=KV(t,n).filter(c=>!(c.length===1&&c[0]===""));if(r.length===0)throw new Kn("source is empty (no rows)");const i=e.header!==!1;let s,o;if(i)s=r[0].map(c=>c.trim()),o=1;else{const c=r.reduce((u,f)=>Math.max(u,f.length),0);s=Array.from({length:c},(u,f)=>`col${f+1}`),o=0}const a=s.length,l=[];for(let c=o;c<r.length;c++){const u=r[c],f=[];for(let d=0;d<a;d++)f.push(u[d]??"");l.push(f)}return{headers:s,rows:l}}function Ug(t){return t==null?"":Array.isArray(t)?t.map(e=>e==null?"":String(e)).join(", "):typeof t=="object"?JSON.stringify(t):String(t)}function EP(t,e="",n={}){for(const[r,i]of Object.entries(t)){const s=e?`${e}.${r}`:r;i!==null&&typeof i=="object"&&!Array.isArray(i)?EP(i,s,n):n[s]=Ug(i)}return n}function Gg(t,e){const n=t.map(o=>EP(o)),r=new Set,i=[];e&&(i.push(e.header),r.add(e.header));for(const o of n)for(const a of Object.keys(o))r.has(a)||(r.add(a),i.push(a));const s=n.map((o,a)=>i.map((l,c)=>e&&c===0?e.values[a]:o[l]??""));return{headers:i,rows:s}}function eW(t,e){if(!e)return t;const n=e.startsWith("/")?e.slice(1).split("/").map(i=>i.replace(/~1/g,"/").replace(/~0/g,"~")):e.split(".");let r=t;for(const i of n){if(r===null||typeof r!="object")throw new Kn(`root path "${e}" does not resolve to a value`);r=r[i]}if(r===void 0)throw new Kn(`root path "${e}" not found in the document`);return r}function tW(t,e={}){let n;try{n=JSON.parse(t)}catch(o){throw new Kn(`invalid JSON — ${o.message}`)}const r=eW(n,e.root??"");let i=e.orient;if(!i)if(Array.isArray(r))i=Array.isArray(r[0])?"values":"records";else throw r&&typeof r=="object"?new Kn('source is an object map — set orient="index" (with key-column) to tabulate it'):new Kn("source is not an array or object of records");if(i==="values"){if(!Array.isArray(r)||r.length===0)throw new Kn('orient="values" expects a non-empty array of arrays');const[o,...a]=r,l=o.map(Ug),c=a.map(u=>l.map((f,d)=>Ug(u[d])));return{headers:l,rows:c}}if(i==="index"){if(!r||typeof r!="object"||Array.isArray(r))throw new Kn('orient="index" expects an object map ({ key: record, … })');const o=Object.entries(r),a=o.map(([,c])=>c&&typeof c=="object"&&!Array.isArray(c)?c:{value:c}),l=o.map(([c])=>c);return Gg(a,{header:e.keyColumn&&e.keyColumn.length>0?e.keyColumn:"key",values:l})}if(!Array.isArray(r))throw new Kn('orient="records" expects an array of objects');const s=r.map(o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{value:o});return Gg(s)}function nW(t){const e=[],n=t.split(`
334
+ `);for(let r=0;r<n.length;r++){const i=n[r].trim();if(i==="")continue;let s;try{s=JSON.parse(i)}catch(o){throw new Kn(`invalid NDJSON on line ${r+1} — ${o.message}`)}e.push(s&&typeof s=="object"&&!Array.isArray(s)?s:{value:s})}if(e.length===0)throw new Kn("source is empty (no NDJSON records)");return Gg(e)}function $a(t){const e=t.trim();if(e==="")return null;const n=e.replace(/[$£€¥₹]/g,"").replace(/,/g,"").replace(/\s/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(n))return null;const r=Number(n);return Number.isFinite(r)?r:null}function $P(t,e){return t.indexOf(e)}function QP(t){const e=rW(t,","),n=[];for(const r of e){const i=r.trim();if(i==="")continue;const s=/^(.*?)\s+as\s+(.+)$/i.exec(i);s?n.push({source:Hp(s[1].trim()),as:Hp(s[2].trim())}):n.push({source:Hp(i)})}return n}function rW(t,e){const n=[];let r="",i=null;for(const s of t){if(i){s===i?i=null:r+=s;continue}if(s==='"'||s==="'"){i=s;continue}if(s===e){n.push(r),r="";continue}r+=s}return n.push(r),n}function Hp(t){return t.length>=2&&(t[0]==='"'&&t[t.length-1]==='"'||t[0]==="'"&&t[t.length-1]==="'")?t.slice(1,-1):t}function iW(t,e){const n=fl(e);if(n.clauses.length===0)return{table:t,warnings:n.warnings};const r=new Map(t.headers.map((s,o)=>[s,o])),i=t.rows.filter(s=>n.clauses.every(o=>{const a=r.get(o.field),l=a===void 0?"":s[a]??"";return o.values.some(c=>yP(l,c))}));return{table:{headers:t.headers,rows:i},warnings:n.warnings}}function sW(t,e){if(!e||e.trim()==="")return{table:t,sources:[...t.headers]};const r=QP(e).map(a=>({sel:a,idx:$P(t.headers,a.source)})).filter(a=>a.idx!==-1);if(r.length===0)return{table:t,sources:[...t.headers]};const i=r.map(a=>a.sel.as??a.sel.source),s=r.map(a=>a.sel.source),o=t.rows.map(a=>r.map(l=>a[l.idx]??""));return{table:{headers:i,rows:o},sources:s}}function oW(t,e){if(!e||e.trim()==="")return t;const n=e.trim(),r=n.startsWith("-"),i=r?n.slice(1).trim():n,s=$P(t.headers,i);if(s===-1)return t;const o=t.rows.map(c=>c[s]??""),a=o.every(c=>c.trim()===""||$a(c)!==null)&&o.some(c=>$a(c)!==null),l=[...t.rows].sort((c,u)=>{const f=c[s]??"",d=u[s]??"";let h;if(a){const m=$a(f),p=$a(d);m===null&&p===null?h=0:m===null?h=1:p===null?h=-1:h=m-p}else h=f.localeCompare(d,void 0,{numeric:!0,sensitivity:"base"});return r?-h:h});return{headers:t.headers,rows:l}}function aW(t,e){const n=new Set(t.headers),r=t.headers.join(", "),i=[],s=(o,a)=>{a===""||n.has(a)||i.push(`\`${o}\` names a column the source does not have: "${a}". Available: ${r}.`)};for(const o of fl(e.where).clauses)s("where",o.field);if(e.sort&&e.sort.trim()!==""){const o=e.sort.trim();s("sort",(o.startsWith("-")?o.slice(1):o).trim())}if(e.columns&&e.columns.trim()!=="")for(const o of QP(e.columns))s("columns",o.source);return i}function lW(t,e,n){const r=n&&n>0?n:0;if(r===0&&(e===void 0||e<0))return t;const i=e!==void 0&&e>=0?r+e:void 0;return{headers:t.headers,rows:t.rows.slice(r,i)}}function cW(t,e={}){const n=new Set(e.numeric??[]),r=new Set(e.text??[]),i=e.sources,s=t.headers.map((a,l)=>{const c=i?.[l]??a;return r.has(a)||r.has(c)?"text":n.has(a)||n.has(c)||uW(t.rows,l)?"numeric":"text"}),o=t.rows.map(a=>a.map((l,c)=>({text:l,value:s[c]==="numeric"?$a(l):null})));return{headers:t.headers,columnTypes:s,rows:o}}function uW(t,e){let n=!1;for(const r of t){const i=r[e]??"";if(i.trim()!==""){if($a(i)===null)return!1;n=!0}}return n}const{Ast:Zn}=B;function Pd(t){return new Zn.Node("inline",{},[new Zn.Node("text",{content:t})])}function fW(t){const e=t.headers.map(s=>new Zn.Node("th",{},[Pd(s)])),n=new Zn.Node("thead",{},[new Zn.Node("tr",{},e)]),r=t.rows.map(s=>{const o=s.map((a,l)=>{const c=t.columnTypes[l]==="numeric"&&a.value!==null?{"data-value":String(a.value)}:{};return new Zn.Node("td",c,[Pd(a.text)])});return new Zn.Node("tr",{},o)}),i=new Zn.Node("tbody",{},r);return new Zn.Node("table",{},[n,i])}function dW(t){return t.length===1&&t[0].type==="paragraph"?t[0].children??[]:t}function hW(t,e){const n=t.map(o=>new Zn.Node("th",{},[Pd(o)])),r=new Zn.Node("thead",{},[new Zn.Node("tr",{},n)]),i=e.map(o=>new Zn.Node("tr",{},o.map(a=>new Zn.Node("td",{},dW(a))))),s=new Zn.Node("tbody",{},i);return new Zn.Node("table",{},[r,s])}function Qa(t){const e=new Zn.Node("paragraph",{},[Pd(t)]);return new Zn.Node("tag",{type:"caution"},[e],"hint")}const{Ast:xb}=B;function LP(t,e){if(t==null)return{ok:!1,why:"is empty"};if(typeof t=="string")return t===""?{ok:!1,why:"is empty"}:{ok:!0,value:t};if(typeof t=="number"||typeof t=="boolean")return{ok:!0,value:String(t)};if(typeof t=="object"&&"$$mdtype"in t){const n=t;if(n.$$mdtype==="Variable"&&Array.isArray(n.path)){const r=n.path.join(".");let i=e;for(const s of n.path){if(i==null){i=void 0;break}i=i[s]}return i==null?{ok:!1,why:`references \`$${r}\`, which is not defined here`}:{ok:!0,value:String(i)}}if(n.$$mdtype==="Function")return{ok:!1,why:`is a call to \`${n.name??"a function"}()\`, and \`data\` reads its attributes during preprocess — before functions are evaluated`}}return{ok:!1,why:"could not be read"}}function Kr(t,e){const n=LP(t,e);return n.ok?n.value:""}const pW=["src","format","delimiter","root","orient","key-column","columns","where","sort","numeric","text","headers"];function Kp(t){return t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}function mW(t,e,n){if(!n.sandbox)return;let r=!1;return Hg(t,e,n,n.sandbox,()=>{r=!0}),r?t:void 0}const gW=new Set(["chart","datatable"]);function Hg(t,e,n,r,i,s){if(t.children)for(let o=0;o<t.children.length;o++){const a=t.children[o];if(a.type==="tag"&&a.tag==="data"){let l=bW(a,e,n,r,s);if(l.length>0){const c=new xb.Node("document",{},l);Hg(c,e,n,r,i,s),l=c.children}t.children.splice(o,1,...l),o+=l.length-1,i();continue}Hg(a,e,n,r,i,a.tag??s)}}function Kg(t,e){const n={};for(const[s,o]of Object.entries(t.attributes??{}))n[s]=OW(o,e);const r=t.tag==="data"?(t.children??[]).map(MP):(t.children??[]).map(s=>Kg(s,e)),i=new xb.Node(t.type,n,r,t.tag);return t.lines&&(i.lines=t.lines),t.location&&(i.location=t.location),i.inline=t.inline,t.annotations?.length&&(i.annotations=t.annotations),i}function vW(t){const e=[[]];for(const n of t)n.type==="hr"?e.push([]):e[e.length-1].push(n);return e}function MP(t){const e=new xb.Node(t.type,{...t.attributes??{}},(t.children??[]).map(MP),t.tag);return t.lines&&(e.lines=t.lines),t.location&&(e.location=t.location),e.inline=t.inline,t.annotations?.length&&(e.annotations=t.annotations),e}function OW(t,e){if(t&&typeof t=="object"){const n=t;if(n.$$mdtype==="Variable"&&Array.isArray(n.path)&&n.path[0]==="row"){let r=e;for(const i of n.path.slice(1)){if(r==null)return"";r=r[i]}return r??""}}return t}function Zw(t){return t.rows.map(e=>{const n={};return e.forEach((r,i)=>{t.columnTypes[i]==="numeric"&&r.value!==null?n[t.headers[i]]=r.value:r.text==="true"||r.text==="false"?n[t.headers[i]]=r.text==="true":n[t.headers[i]]=r.text}),n})}function bW(t,e,n,r,i){const s=(t.children??[]).filter(o=>o.type!=="text"||String(o.attributes?.content??"").trim()!=="");if(s.length>0&&i&&gW.has(i)){const o=`a per-row body cannot be used inside {% ${i} %}, which consumes the table this rune would otherwise emit — remove the body, or move the {% data %} outside`;return n.error(`data: ${o}`,e.url),[Qa(`data error: ${o}`)]}return yW(t,e,n,r,s)}function yW(t,e,n,r,i){const s=t.attributes,o=[];for(const c of pW){if(!(c in s))continue;const u=LP(s[c],n.variables);u.ok||o.push(`\`${c}\` ${u.why}`)}if(o.length>0){const c=o.length===1?o[0]:`${o.length} attributes could not be read — ${o.join("; ")}`;return n.error(`data: ${c}`,e.url),[Qa(`data error: ${c}`)]}const a=Kr(s.src,n.variables),l=Kp(Kr(s.headers,n.variables));if(l.length>0&&i.length===0){const c="`headers` names the columns of a `---`-delimited body and needs one. For a bodyless table, select and rename source columns with `columns`.";return n.error(`data "${a||"(unresolved)"}": ${c}`,e.url),[Qa(`data error: ${c}`)]}if(!a){const c="data `src` attribute is required (and an unresolvable variable reference resolves to empty)";return n.error(c,e.url),[Qa(`data error: ${c}`)]}try{const c=r.read(a);if(c===null)throw new Kn(`source "${a}" cannot be resolved — the file is missing or outside the project root`);const u=wW(a,Kr(s.format,n.variables)),f=_W(c,u,s,n);if(f.rows.length===0)throw new Kn("source yielded no rows — check the file has data, and that `root` / `orient` point at the right place");const d=Kr(s.where,n.variables)||void 0,h=Kr(s.sort,n.variables)||void 0,m=Kr(s.columns,n.variables)||void 0;for(const A of aW(f,{where:d,sort:h,columns:m}))n.warn(`data "${a}": ${A}`,e.url);const{table:p,warnings:v}=iW(f,d);for(const A of v)n.warn(`data "${a}": ${A}`,e.url);const O=oW(p,h),{table:b,sources:w}=sW(O,m),S=lW(b,Fw(s.limit),Fw(s.offset));if(S.rows.length===0)return[];const _=Kp(Kr(s.numeric,n.variables)),x=Kp(Kr(s.text,n.variables)),C=cW(S,{numeric:_,text:x,sources:w});if(i.length===0)return[fW(C)];if(l.length>0){const A=vW(i);if(A.length!==l.length)throw new Kn(`\`headers\` names ${l.length} column${l.length===1?"":"s"} but the body has ${A.length} \`---\`-delimited cell${A.length===1?"":"s"}. Separate each cell with a \`---\` line; the counts must match.`);const y=Zw(C).map(k=>A.map(P=>P.map(T=>Kg(T,k))));return[hW(l,y)]}return(_.length>0||x.length>0)&&n.warn(`data "${a}": \`numeric\` / \`text\` set alongside a per-row body — they type the \`data-value\` attribute on table cells, and a body emits no cells. Numeric columns are still bound to \`$row\` as numbers.`,e.url),Zw(C).flatMap(A=>i.map(y=>Kg(y,A)))}catch(c){const u=c instanceof Kn?c.message:`unexpected failure — ${c instanceof Error?c.message:String(c)}`;return n.error(`data "${a}": ${u}`,e.url),[Qa(`data error: ${u}`)]}}function wW(t,e){if(e)return e;const n=HV(t);if(n)return n;throw new Kn(`could not infer format from "${t}" — add format="csv|tsv|json|ndjson"`)}function _W(t,e,n,r){switch(e){case"csv":case"tsv":return JV(t,{format:e,delimiter:Kr(n.delimiter,r.variables)||void 0,header:n.header===void 0?void 0:n.header!==!1});case"json":{const i=Kr(n.orient,r.variables);return tW(t,{root:Kr(n.root,r.variables)||void 0,orient:i||void 0,keyColumn:Kr(n["key-column"],r.variables)||void 0})}case"ndjson":return nW(t);default:throw new Kn(`unsupported format "${e}"`)}}function Fw(t){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()!==""){const e=Number(t);return Number.isFinite(e)?e:void 0}}const{Ast:qP}=B,Xw=16;function kW(t,e,n){const r=n.partials;if(!r)return;let i=!1;return Sb(t,e,n,r,()=>{i=!0},[]),i?t:void 0}function Sb(t,e,n,r,i,s){if(t.children)for(let o=0;o<t.children.length;o++){const a=t.children[o];if(a.type==="tag"&&a.tag==="include"){const l=xW(a,e,n,r,s);t.children.splice(o,1,...l),o+=l.length-1,i();continue}Sb(a,e,n,r,i,s)}}function of(t,e,n){return t.error(`include: ${n}`,e.url),[Qa(`include error: ${n}`)]}function xW(t,e,n,r,i){const s=RP(t.attributes?.file,n.variables);if(typeof s!="string"||s.length===0)return of(n,e,"the `file` attribute is required (an unresolvable variable reference resolves to empty)");if(i.includes(s))return of(n,e,`cycle — ${[...i,s].join(" → ")}`);if(i.length>=Xw)return of(n,e,`nested more than ${Xw} deep — ${[...i,s].join(" → ")}`);const o=r[s];if(!o||typeof o!="object"){const u=Object.keys(r).sort(),f=u.length>0?` Available: ${u.join(", ")}.`:" No partials are registered for this site.";return of(n,e,`"${s}" was not found in \`_partials/\` or any registered file root.${f}`)}const a=AW(t.attributes?.variables,n.variables),c=(o.children??[]).map(u=>Jg(u,a));if(c.length>0){const u=new qP.Node("document",{},c);return Sb(u,e,n,r,()=>{},[...i,s]),u.children}return c}function Jg(t,e){const n={};for(const[s,o]of Object.entries(t.attributes??{}))n[s]=SW(o,e);const r=(t.children??[]).map(s=>Jg(s,e)),i=new qP.Node(t.type,n,r,t.tag);return t.lines&&(i.lines=t.lines),t.location&&(i.location=t.location),i.inline=t.inline,t.annotations?.length&&(i.annotations=t.annotations),t.slots&&Object.keys(t.slots).length>0&&(i.slots=Object.fromEntries(Object.entries(t.slots).map(([s,o])=>[s,Jg(o,e)]))),i}function SW(t,e){if(!t||typeof t!="object")return t;const n=t;if(n.$$mdtype==="Variable"&&Array.isArray(n.path)&&n.path.length>0){const[r,...i]=n.path;if(!(r in e))return t;let s=e[r];for(const o of i){if(s==null)return"";s=s[o]}return s??""}return t}function AW(t,e){if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,i]of Object.entries(t))n[r]=RP(i,e);return n}function RP(t,e){if(t==null)return"";if(typeof t!="object")return t;const n=t;if(n.$$mdtype==="Variable"&&Array.isArray(n.path)){let r=e;for(const i of n.path){if(r==null)return"";r=r[i]}return r??""}return n.$$mdtype===void 0?t:""}const{Tag:Ko}=B,DP=/^h[1-6]$/,ev="data-outline-scope";function CW(t){const e=new Set;return rv(t,[],e),e.size>0&&iv(t,e),t}function TW(t){const e=[];return tv(t,!1,e),e}function tv(t,e,n){if(Array.isArray(t)){for(const o of t)tv(o,e,n);return}if(!Ko.isTag(t))return;const r=t,i=r.attributes;if(DP.test(r.name)){if(e)return;const o=Number(r.name.slice(1)),a=typeof i?.id=="string"?i.id:"",l=nv(r);a&&l&&n.push({level:o,text:l,id:a});return}const s=e||i&&typeof i[ev]=="string";if(!(!r.children||r.children.length===0))for(const o of r.children)tv(o,!!s,n)}function nv(t){return typeof t=="string"?t:typeof t=="number"?String(t):Array.isArray(t)?t.map(nv).join(""):Ko.isTag(t)?(t.children??[]).map(nv).join(""):""}function rv(t,e,n){if(Array.isArray(t)){for(const a of t)rv(a,e,n);return}if(!Ko.isTag(t))return;const r=t,i=r.attributes,s=i&&typeof i[ev]=="string"?i[ev]:void 0;if(DP.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}--`)&&(n.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)rv(a,o,n)}function iv(t,e){if(Array.isArray(t)){for(const i of t)iv(i,e);return}if(!Ko.isTag(t))return;const n=t;if(n.attributes?.["data-rune"]==="table-of-contents"){PW(n,e);return}if(n.children)for(const i of n.children)iv(i,e)}function PW(t,e){for(const n of t.children??[])sv(n,e)}function sv(t,e){if(Array.isArray(t)){for(const r of t)sv(r,e);return}if(!Ko.isTag(t))return;const n=t;(n.name==="ul"||n.name==="ol")&&(n.children=(n.children??[]).filter(r=>{if(!Ko.isTag(r))return!0;const i=r;return i.name!=="li"?!0:!NP(i,e)}));for(const r of n.children??[])sv(r,e)}function NP(t,e){for(const n of t.children??[]){if(!Ko.isTag(n))continue;const r=n;if(r.name==="a"){const i=r.attributes?.href;if(typeof i=="string"&&i.startsWith("#")&&e.has(i.slice(1)))return!0}if(NP(r,e))return!0}return!1}const{Tag:Yc}=B,EW=new Map;function $W(t,e,n,r,i,s){return Ed(t,{pageUrl:e,registry:n,patterns:r,embedConfig:i,ctx:s,parseCache:EW},[])}function Ed(t,e,n){if(Array.isArray(t)){let a=!1;const l=t.map(c=>{const u=Ed(c,e,n);return u!==c&&(a=!0),u});return a?l:t}if(!Yc.isTag(t))return t;const r=t;if(r.attributes?.["data-rune"]===db)return QW(r,e,n);if(!r.children||r.children.length===0)return r;let s=!1;const o=r.children.map(a=>{const l=Ed(a,e,n);return l!==a&&(s=!0),l});return s?new Yc(r.name,r.attributes,o):r}function QW(t,e,n){const r=t.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),Rs(i,"missing id attribute");const c=o!==void 0?Number(o):void 0,u=LW(e.registry,i,e.pageUrl,s);if(!u)return e.ctx.error(`expand "${i}" on ${e.pageUrl} — entity not found`,e.pageUrl),Rs(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),Rs(i,`entity type "${u.type}" does not support embedding`);if(n.some(w=>w.type===u.type&&w.id===u.id)){const w=[...n,{type:u.type,id:u.id}].map(S=>`${S.id} (${S.type})`).join(" → ");return e.ctx.error(`expand cycle detected on ${e.pageUrl}. Cycle: ${w}`,e.pageUrl),Rs(i,"cycle detected")}let f;if(u.embed)f=u.embed();else{const w=e.embedConfig?.projectFiles;if(!w)return e.ctx.error(`expand "${i}" — no file provider configured (embedConfig.projectFiles is unset)`,e.pageUrl),Rs(i,"no file provider configured");let S;try{S=RW(u.sourceFile,w,e.parseCache)}catch(_){const x=(_ instanceof ei,_.message);return e.ctx.error(`expand "${i}" — failed to read source file "${u.sourceFile}": ${x}`,e.pageUrl),Rs(i,x)}f=u.extract(S)}if(!f)return e.ctx.error(`expand "${i}" — extractor returned no content; the entity may be out-of-sync with the registry`,e.pageUrl),Rs(i,"extractor returned no content");let d=f;if(c!==void 0&&c!==1){const w=c-1,S=[];d=IP(f,w,S),S.length>0&&e.ctx.warn(`expand "${i}" at ${e.pageUrl} — heading demotion (level=${c}) would push ${S.length} heading(s) past H6. Clamped to H6: ${S.map(_=>`"${_}"`).join(", ")}`,e.pageUrl)}if(!e.embedConfig)return e.ctx.error(`expand "${i}" — no embedConfig threaded through the pipeline`,e.pageUrl),Rs(i,"no embed transform config");const h=[...n,{type:u.type,id:u.id}],m=B.transform(d,e.embedConfig),p=Ed(m,e,h),v=MW(u,e.patterns),O={"data-rune":"expand","data-entity-id":u.id,"data-entity-type":u.type,"data-source":"registry"};c===void 0&&(O["data-outline-scope"]=u.id),v&&(O["data-canonical-href"]=v);const b=[];if(Array.isArray(p)?b.push(...p):b.push(p),a){const w=l||qW(u),S={class:v?"rf-expand__canonical-link":"rf-expand__canonical-link rf-xref--unresolved"};v&&(S.href=v),b.push(new Yc("a",S,[w]))}return new Yc("section",O,b)}function LW(t,e,n,r){const i=r?[r]:t.getTypes();for(const o of i){const a=t.getById(o,e,n);if(a)return a}const s=e.toLowerCase();for(const o of i)for(const a of t.getAll(o)){const l=a.data.name??"",c=a.data.title??"";if(l.toLowerCase()===s||c.toLowerCase()===s)return a}}function MW(t,e){const n=t.sourceUrl,i=t.data.url||n;if(i){const s=t.data.headingId;return s?`${i}#${s}`:i}for(const s of e){const o=s.match.exec(t.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"?t.id:a[u]??"").split("/").map(encodeURIComponent).join("/"))}}function qW(t){const e=t.data.title,n=t.data.name;return e?`View ${t.type}: ${e}`:n?`View ${t.type}: ${n}`:`View ${t.type} ${t.id}`}function RW(t,e,n){const r=n.get(t);if(r)return r;const i=xX({files:e,relativePath:t}),s=B.parse(i);return n.set(t,s),s}function IP(t,e,n){if(t.type==="heading"){const i=t.attributes.level+e;if(i>6){const s=DW(t);n.push(s),t.attributes.level=6}else t.attributes.level=i}for(const r of t.children??[])IP(r,e,n);return t}function DW(t){const e=[];for(const n of t.walk())n.type==="text"&&typeof n.attributes.content=="string"&&e.push(n.attributes.content);return e.join("")}function Rs(t,e){return new Yc("section",{"data-rune":"expand","data-entity-id":t,"data-expand-error":e},[`expand "${t}" — ${e}`])}const{Tag:De}=B,Vl={header:"preamble",eyebrow:"eyebrow",headline:"headline",blurb:"blurb",image:"image"},NW={runes:{Accordion:{block:"accordion",defaultDensity:"full",sections:DT,autoLabel:Vl,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},AccordionItem:{block:"accordion-item",parent:"Accordion",requiresParent:"Accordion",rootAttributes:{"data-state":"closed"},autoLabel:{name:"header"},sections:RT,provides:["prose"],sectionRoleExceptions:{header:"The `header` slot is the <summary> disclosure control, not a page-section header. `header` would inherit the chrome-row rhythm (a 3rem margin under every summary); `title` would tighten every summary's line-height while leaving `prominence` inert anyway, since `.rf-accordion-item__header` pins the control's font size on purpose. The parent Accordion already holds `title`."},editHints:{header:"inline",body:"none"}},Details:{block:"details",defaultElevation:"flush",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:o6},valign:{prop:"--grid-valign",transform:rw},gap:{prop:"--grid-gap",transform:s6},min:"--grid-min",aspect:"--grid-aspect"},editHints:{cell:"none"}},CodeGroup:{block:"codegroup",interactive:!0,defaultDensity:"compact",defaultElevation:"flat",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:xT,rootAttributes:{"data-code-host":"true"},editHints:{panel:"code"}},PageSection:{block:"page-section"},TableOfContents:{block:"toc",defaultElevation:"flush"},Snippet:{block:"snippet"},Data:{block:"data"},Include:{block:"include"},Code:{block:"code",universalAttributes:"inline"},Expand:{block:"expand",universalAttributes:"none"},Badge:{block:"badge",universalAttributes:"inline"},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",modifiers:{"media-position":{source:"meta",default:"top",noBemClass:!0},"media-ratio":{source:"meta",noBemClass:!0},valign:{source:"meta",noBemClass:!0},collapse:{source:"meta",noBemClass:!0},"content-place":{source:"meta",noBemClass:!0},height:{source:"meta",noBemClass:!0},aspect:{source:"meta",noBemClass:!0}},sections:vP,provides:["prose"],layout:{root:["media","content"],content:{tag:"div",children:["eyebrow","body","footer"]}},variants:{"media-position":{cover:{staticModifiers:["cover"],rootAttributes:{"data-cover-scope":"full"}}}},styles:{valign:{prop:"--split-valign",transform:rw},aspect:"aspect-ratio"}},Embed:{block:"embed",defaultDensity:"compact",defaultElevation:"flat",modifiers:{provider:{source:"meta",default:"generic",noBemClass:!0}},editHints:{fallback:"none"}},Breadcrumb:{block:"breadcrumb",defaultDensity:"minimal",defaultElevation:"flush",editHints:{items:"none"},modifiers:{separator:{source:"meta",default:"/",noBemClass:!0}},styles:{separator:{prop:"--separator",template:'"{}"'}}},BreadcrumbItem:{block:"breadcrumb-item",parent:"Breadcrumb",requiresParent:"Breadcrumb"},Blog:{block:"blog",defaultDensity:"full",sections:rP,provides:["prose"],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:Vl,editHints:{headline:"inline",blurb:"inline"}},Budget:{block:"budget",defaultDensity:"full",defaultElevation:"flat",sections:IT,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",defaultElevation:"sunken",modifiers:{hintType:{source:"meta",default:"note"}},contextModifiers:{hero:"in-hero",feature:"in-feature"},sections:AT,i18nEnums:{note:"Note",warning:"Warning",caution:"Caution",check:"Check"},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:LT,provides:["prose"],editHints:{title:"inline",body:"none",close:"none",footer:"none"}},Figure:{block:"figure",defaultDensity:"compact",defaultElevation:"flat",frameTarget:qT,modifiers:{size:{source:"meta",default:"default"},align:{source:"meta",default:"center"}},sections:MT,editHints:{caption:"inline"}},Gallery:{block:"gallery",defaultDensity:"full",defaultElevation:"flat",childDensity:"compact",modifiers:{layout:{source:"meta",default:"grid"},lightbox:{source:"meta",default:"true",noBemClass:!0},columns:{source:"meta",noBemClass:!0}},styles:{columns:"--gallery-columns"},editHints:{items:"none"}},Sidenote:{block:"sidenote",defaultDensity:"full",defaultElevation:"flush",defaultReading:"fine",modifiers:{variant:{source:"meta",default:"sidenote"}},sections:jT,provides:["prose"],editHints:{body:"inline"}},Compare:{block:"compare",defaultDensity:"full",modifiers:{layout:{source:"meta",default:"side-by-side"}},editHints:{panels:"none"}},Conversation:{block:"conversation",defaultDensity:"compact",defaultElevation:"flush",editHints:{messages:"none"}},ConversationMessage:{block:"conversation-message",parent:"Conversation",modifiers:{align:{source:"meta",default:"left"}},editHints:{body:"inline"}},Annotate:{block:"annotate",defaultDensity:"full",defaultElevation:"flush",modifiers:{variant:{source:"meta",default:"margin"}},sections:XT,provides:["prose"],editHints:{body:"none",notes:"none"}},AnnotateNote:{block:"annotate-note",parent:"Annotate",editHints:{body:"inline"}},Nav:{block:"nav",defaultDensity:"compact",defaultElevation:"flush",modifiers:{layout:{source:"attribute"}},postTransform(t){return{...t,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(t){let e="";const n=t.children.filter(i=>Kt(i)&&i.name==="span"&&i.attributes["data-field"]==="slug"?(e=i.children.filter(s=>typeof s=="string").join(""),!1):!0);if(e)return n.unshift(e),{...t,attributes:{...t.attributes,"data-slug":e},children:n};const r=n.map(i=>{if(Kt(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{...t,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",defaultElevation:"sunken",modifiers:{type:{source:"meta",default:"bar",noBemClass:!0},stacked:{source:"meta",noBemClass:!0},"tick-count":{source:"meta",noBemClass:!0},"tick-step":{source:"meta",noBemClass:!0},"label-angle":{source:"meta",noBemClass:!0}},editHints:{data:"none"}},PullQuote:{block:"pullquote",defaultDensity:"compact",defaultElevation:"flush",defaultReading:"prose",modifiers:{align:{source:"meta",default:"center"},variant:{source:"meta",default:"default"}},sections:YT,provides:["prose"],editHints:{body:"inline"}},TextBlock:{block:"textblock",defaultDensity:"full",defaultElevation:"flush",defaultReading:"prose",modifiers:{columns:{source:"meta"},lead:{source:"meta"},align:{source:"meta",default:"left"}},sections:UT,provides:["prose"],editHints:{body:"none"}},MediaText:{block:"mediatext",defaultDensity:"full",modifiers:{align:{source:"meta",default:"left"},ratio:{source:"meta",default:"1:1"},wrap:{source:"meta"}},sections:GT,provides:["prose"],mediaSlots:HT,editHints:{media:"image",body:"none"}},Showcase:{block:"showcase",defaultDensity:"compact",childDensity:"compact",sections:JT,frameTarget:eP,contextModifiers:{"bento-cell":"in-bento-cell"},editHints:{viewport:"none"}},TabGroup:{block:"tabs",interactive:!0,defaultDensity:"full",sections:ET,autoLabel:Vl,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},Tab:{block:"tab",parent:"TabGroup",requiresParent:"TabGroup",rootAttributes:{"data-state":"inactive"},editHints:{name:"inline"}},TabPanel:{block:"tab-panel",parent:"TabGroup",requiresParent:"TabGroup",rootAttributes:{"data-state":"inactive"}},DataTable:{block:"datatable",interactive:!0,defaultDensity:"compact",defaultElevation:"sunken",sections:BT,modifiers:{searchable:{source:"meta",default:"false"},sortable:{source:"meta"},pageSize:{source:"meta",default:"0"},defaultSort:{source:"meta"}},editHints:{table:"none"}},Form:{block:"form",interactive:!0,defaultDensity:"full",defaultElevation:"flat",sections:VT,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",defaultElevation:"flat",modifiers:{mode:{source:"meta",default:"click"}},sections:ZT,autoLabel:Vl,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline",steps:"none"}},RevealStep:{block:"reveal-step",parent:"Reveal",rootAttributes:{"data-state":"closed"},editHints:{body:"none"}},Section:{block:"section",modifiers:{align:{source:"meta",default:"start"}},sections:FT,autoLabel:Vl,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline",body:"none"}},Juxtapose:{block:"juxtapose",interactive:!0,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",requiresParent:"Juxtapose",rootAttributes:{"data-state":"inactive"},editHints:{body:"none"}},Diagram:{block:"diagram",defaultDensity:"compact",defaultElevation:"sunken",editHints:{source:"code"},modifiers:{language:{source:"meta",default:"mermaid",noBemClass:!0}}},Tint:{block:"tint",parent:"*",universalAttributes:"configurator"},Bg:{block:"bg",parent:"*",universalAttributes:"configurator"},Region:{block:"region",parent:"Layout"},Sandbox:{block:"sandbox",interactive:!0,defaultDensity:"compact",editHints:{source:"code"}}}},IW=NW;function BW(t){const e=new Map;for(const r of t)e.set(r.url,{url:r.url,title:r.title,children:[]});const n={url:"/",title:"Root",children:[]};for(const r of t){const i=e.get(r.url);r.url==="/"?(n.title=r.title,n.children=i.children,e.set("/",n)):(e.get(r.parentUrl)??n).children.push(i)}return n}function jW(t){const e=new Map;for(const r of t)r.url!=="/"&&e.set(r.url,r.parentUrl);const n=new Map;for(const r of t){const i=[];let s=e.get(r.url);for(;s!==void 0;)i.unshift(s),s=e.get(s);n.set(r.url,i)}return n}function zW(t){if(t==="/"||!t.includes("/"))return"/";const e=t.endsWith("/")?t.slice(0,-1):t,n=e.lastIndexOf("/");return n<=0?"/":e.slice(0,n+1)}function ov(t,e,n,r,i){if(!De.isTag(t)){if(Array.isArray(t)){const a=t.map(l=>ov(l,e,n,r,i));return a.every((l,c)=>l===t[c])?t:a}return t}const s=t;if(s.attributes?.["data-rune"]==="breadcrumb"&&s.children?.some(l=>De.isTag(l)&&l.attributes?.["data-field"]===NT))return ZW(s,e,n,r,i);const o=(s.children??[]).map(a=>ov(a,e,n,r,i));return o.every((a,l)=>a===s.children[l])?s:{...s,children:o}}function ZW(t,e,n,r,i){const s=n.get(e);if(s===void 0)return i.warn(`Breadcrumb auto: page URL "${e}" not found in page registry`,e),t;const a=t.children?.find(m=>De.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 v=new De("span",{hidden:!0},[p.title]),O=new De("a",{href:m},[p.title]);l.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:v,url:O},children:[v,O]}))}const u=r.get(e)?.title??e,f=new De("span",{},[u]);l.push(qe({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:f},children:[f]}));const d=new De("meta",{content:a}),h=new De("ol",{},l);return qe({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:d},refs:{items:h},children:[d,h]})}function av(t,e,n,r){if(!De.isTag(t)){if(Array.isArray(t)){const o=t.map(a=>av(a,e,n,r));return o.every((a,l)=>a===t[l])?t:o}return t}const i=t;if(i.attributes?.["data-rune"]==="nav"&&i.children?.some(a=>De.isTag(a)&&a.attributes?.["data-field"]===$T))return FW(e,n,r,i);const s=(i.children??[]).map(o=>av(o,e,n,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function FW(t,e,n,r){const i=Array.from(e.values()).filter(c=>c.parentUrl===t&&c.url!==t);i.length===0&&n.warn(`Nav auto: page '${t}' has no registered child pages`,t);const s=i.map(c=>{const u=new De("span",{"data-field":"slug"},[c.title]),f=new De("a",{href:c.url},[u]);return qe({rune:"nav-item",tag:"li",properties:{slug:u},children:[f]})}),o=new De("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 gc(t){let e=t.trim();return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.endsWith("/index")&&(e=e.slice(0,-6)||"/"),e.toLowerCase()}function XW(t){const e=t.split("/").filter(Boolean);return e.pop(),e.length===0?"/":"/"+e.join("/")+"/"}function VW(t,e){if(t===e)return 0;if(t.length===0)return e.length;if(e.length===0)return t.length;const n=new Array(e.length+1),r=new Array(e.length+1);for(let i=0;i<=e.length;i++)n[i]=i;for(let i=1;i<=t.length;i++){r[0]=i;for(let s=1;s<=e.length;s++){const o=t[i-1]===e[s-1]?0:1;r[s]=Math.min(r[s-1]+1,n[s]+1,n[s-1]+o)}for(let s=0;s<=e.length;s++)n[s]=r[s]}return n[e.length]}function WW(t,e,n){const r=e.endsWith("/")?e:e+"/",i=t.toLowerCase(),s=[],o=[],a=(r+t).replace(/\/+/g,"/").toLowerCase();for(const c of n.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=VW(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 YW(t,e,n){if(t.startsWith("/"))return{ok:!0,url:t};const r=e.endsWith("/")?e:e+"/",i=(r+t).replace(/\/+/g,"/"),s=gc(i);for(const a of n.values())if(gc(a.url)===s)return{ok:!0,url:a.url};const o=WW(t.includes("/")?t.split("/").pop():t,r,n);return{ok:!1,reason:"not-found",attemptedUrl:i,suggestions:o}}function Vw(t,e){let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];)n++;return n}function Uc(t,e,n){const r=Array.from(e.values()).filter(i=>i.url.endsWith("/"+t)||i.url==="/"+t);return r.length===0?null:r.length===1?r[0].url:r.slice().sort((i,s)=>Vw(s.url,n)-Vw(i.url,n))[0].url}function Gc(t){const e=t.attributes?.["data-slug"];if(e)return String(e);const n=r=>{if(!De.isTag(r)){if(Array.isArray(r))for(const s of r){const o=n(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=n(s);if(o)return o}return null};return n(t)}function UW(t,e,n){const r=[],i=s=>{if(!De.isTag(s)){Array.isArray(s)&&s.forEach(i);return}const o=s;if(o.attributes?.["data-rune"]==="nav-item"){const a=Hc(o);if(a)r.push(a);else{const l=Gc(o);if(l){const c=Uc(l,e,n);c&&r.push(c)}}}(o.children??[]).forEach(i)};return(t.children??[]).forEach(i),r}function GW(t){const e=n=>{if(typeof n=="string")return n;if(!De.isTag(n)){if(Array.isArray(n))for(const i of n){const s=e(i);if(s)return s}return null}const r=n;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(t)??""}function HW(t,e){for(const n of e){if(!n)continue;if(t===n)return!0;const r=n.endsWith("/")?n:n+"/";if(t.startsWith(r))return!0}return!1}function Ef(t,e,n){if(!De.isTag(t)){if(Array.isArray(t)){const s=t.map(o=>Ef(o,e,n));return s.every((o,a)=>o===t[a])?t:s}return t}const r=t;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(!De.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"]!==QT)continue;const f=GW(u),d=f&&o.includes(f),h=UW(u,n,e),m=HW(e,h);u.attributes["data-collapsed"]=d||m?"false":"true"}const c=(r.children??[]).map(u=>Ef(u,e,n));return c.every((u,f)=>u===r.children[f])?r:{...r,children:c}}const i=(r.children??[]).map(s=>Ef(s,e,n));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function Ww(t,e,n){const r=e?.title??n??"",i=e?.description,s=e?.icon,o=e?.url??n??"",a=[];s&&a.push(new De("rf-icon",{name:s,"data-name":"icon",class:"rf-nav-item__icon"},[])),a.push(new De("span",{"data-name":"title",class:"rf-nav-item__title"},[r])),i&&a.push(new De("span",{"data-name":"description",class:"rf-nav-item__description"},[i]));const l=o?new De("a",{href:o,class:"rf-nav-item__link"},a):new De("span",{class:"rf-nav-item__link"},a);return{...t,children:[l]}}function Hc(t){const e=n=>{if(!De.isTag(n)){if(Array.isArray(n))for(const i of n){const s=e(i);if(s)return s}return null}const r=n;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(t)}function KW(t,e,n){const r=Hc(t);if(r){const s=/^[a-z]+:\/\//i.test(r);return{url:r,isExternal:s}}const i=Gc(t);if(i){const s=Uc(i,e,n);return s?{url:s,isExternal:!1}:null}return null}function JW(t,e){const n=(t.children??[]).map(r=>{if(!De.isTag(r))return r;const i=r;if(i.name!=="a")return r;const s=(i.children??[]).some(l=>De.isTag(l)&&l.attributes?.["data-name"]==="icon"),o=(i.children??[]).some(l=>De.isTag(l)&&l.attributes?.["data-name"]==="description"),a=[...i.children??[]];return e.icon&&!s&&a.unshift(new De("rf-icon",{name:e.icon,"data-name":"icon",class:"rf-nav-item__icon"},[])),e.description&&!o&&a.push(new De("span",{"data-name":"description",class:"rf-nav-item__description"},[e.description])),{...i,children:a}});return{...t,children:n}}function lv(t,e,n){if(!De.isTag(t)){if(Array.isArray(t)){const s=t.map(o=>lv(o,e,n));return s.every((o,a)=>o===t[a])?t:s}return t}const r=t;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(!De.isTag(u))return Array.isArray(u)?u.map(l):u;const f=u;if(f.attributes?.["data-rune"]==="nav-item"){const h=KW(f,n,e);if(!h)return f;if(o){if(h.isExternal)return Ww(f,null,h.url);const v=n.get(h.url),O=v?{url:v.url,title:v.title,description:v.description,icon:v.icon}:null;return Ww(f,O,h.url)}if(h.isExternal)return f;const m=n.get(h.url);if(!m)return f;const p={url:m.url,title:m.title,description:m.description,icon:m.icon};return JW(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=>lv(s,e,n));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function eY(t){return/^[a-z]+:\/\//i.test(t)||t.startsWith("mailto:")||t.startsWith("//")}function tY(t,e,n,r){const i=e?` in ${e}`:"",s=`Nav item \`${t}\`${i} cannot be resolved (no page at \`${n}\`).`;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+`
335
+ `+o.join(`
336
+ `)}function nY(t,e,n,r){const i=t.attributes?.["data-source-path"],s=XW(i??""),o=a=>{if(!De.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(Hc(l))return l;const f=Gc(l);if(!f)return l;const d=YW(f,s,e);if(!d.ok)return n.error(tY(f,i,d.attemptedUrl,d.suggestions),r),l;const m=e.get(d.url)?.title??f,p=new De("a",{href:d.url},[m]),v=(l.children??[]).filter(O=>{if(typeof O=="string")return!1;if(De.isTag(O)){const b=O;if(b.name==="span"&&b.attributes?.["data-field"]==="slug")return!1}return!0});return{...l,children:[p,...v]}}const c=(l.children??[]).map(o);return c.every((u,f)=>u===l.children[f])?l:{...l,children:c}};return o(t)}function cv(t,e,n,r){if(!De.isTag(t)){if(Array.isArray(t)){const o=t.map(a=>cv(a,e,n,r));return o.every((a,l)=>a===t[l])?t:o}return t}const i=t;if(i.attributes?.["data-rune"]==="nav")return nY(i,e,n,r);const s=(i.children??[]).map(o=>cv(o,e,n,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function rY(t,e){const n=gc(e),r=s=>{const o=[],a=f=>{if(!De.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);eY(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(gc(d)===n){l=f;break}let c=null,u=0;for(const{tag:f,href:d}of o){if(f===l)continue;const h=gc(d);if(h==="/"&&n==="/")continue;h!==n&&(n.startsWith(h+"/")||h==="/"&&n.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(!De.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(t),t}function iY(t,e,n){const r=[],i=s=>{if(!De.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(!De.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(!De.isTag(d)){Array.isArray(d)&&d.forEach(f);return}const h=d;if(h.attributes?.["data-rune"]==="nav-item"){const m=Hc(h);if(m)/^[a-z]+:\/\//i.test(m)||u.push(m);else{const p=Gc(h);if(p){const v=Uc(p,e,n);v&&u.push(v)}}}(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(!De.isTag(h)){Array.isArray(h)&&h.forEach(d);return}const m=h;if(m.attributes?.["data-rune"]==="nav-item"){const p=Hc(m);if(p)/^[a-z]+:\/\//i.test(p)||f.push(p);else{const v=Gc(m);if(v){const O=Uc(v,e,n);O&&f.push(O)}}}(m.children??[]).forEach(d)};(u.children??[]).forEach(d),f.length>0&&r.push(f)}}(o.children??[]).forEach(i)};return i(t),r}function sY(t,e,n){const r=e.get(t);if(!r)return[];const i=Array.from(e.values());let s;if(n==="section"){let o=t,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 oY(t,e,n){const r=t.indexOf(e);if(r===-1)return{prev:null,next:null};const i=r>0?t[r-1]:null,s=r<t.length-1?t[r+1]:null,o=a=>{if(!a)return null;const l=n.get(a);return l?{url:l.url,title:l.title}:{url:a,title:a}};return{prev:o(i),next:o(s)}}function Yw(t,e,n){const r=e==="prev"?"←":"→",i=n??t.title,s=e==="prev"?[new De("span",{"data-name":"marker"},[r]),new De("span",{"data-name":"label"},[i])]:[new De("span",{"data-name":"label"},[i]),new De("span",{"data-name":"marker"},[r])];return new De("a",{href:t.url,"data-direction":e,"data-name":e},s)}function uv(t,e,n,r){if(!De.isTag(t)){if(Array.isArray(t)){const o=t.map(a=>uv(a,e,n,r));return o.every((a,l)=>a===t[l])?t:o}return t}const i=t;if(i.attributes?.["data-rune"]==="pagination"){if((i.children??[]).some(l=>De.isTag(l)&&l.attributes?.["data-field"]===qg)){const l=(i.children??[]).find(C=>De.isTag(C)&&C.attributes?.["data-field"]==="scope"),u=String(l?l.attributes?.content??"":i.attributes?.["data-scope"]??"")==="section"?"section":"siblings",f=(i.children??[]).find(C=>De.isTag(C)&&C.attributes?.["data-field"]==="prev-label"),d=(i.children??[]).find(C=>De.isTag(C)&&C.attributes?.["data-field"]==="next-label"),h=f?String(f.attributes.content??""):void 0,m=d?String(d.attributes.content??""):void 0;if(Array.from(n.values()).some(C=>C.parentUrl===e&&C.url!==e))return{...i,children:[]};let v=null;const O=iY(r,n,e);for(const C of O)if(C.includes(e)){v=C;break}let b=null,w=null;if(v)({prev:b,next:w}=oY(v,e,n));else{const C=sY(e,n,u),A=C.findIndex(y=>y.url===e);A!==-1&&(b=A>0?C[A-1]:null,w=A<C.length-1?C[A+1]:null)}const S=[];b&&S.push(Yw(b,"prev",h)),w&&S.push(Yw(w,"next",m));const _=new Set([qg,"prev-label","next-label","scope"]),x=(i.children??[]).filter(C=>{if(!De.isTag(C)||C.name!=="meta")return!0;const A=C.attributes?.["data-field"];return!_.has(A)});return{...i,children:[...x,...S]}}const a=(i.children??[]).map(l=>{if(!De.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=Uc(c,n,e);if(u){const d=n.get(u)?.title??c,h=(l.children??[]).map(m=>De.isTag(m)&&m.attributes?.["data-name"]==="label"&&(m.children??[]).filter(v=>typeof v=="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=>uv(o,e,n,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function fv(t,e){if(De.isTag(t)){const n=e(t);if(n!==t)return n;const r=t.children.map(s=>fv(s,e));return r.some((s,o)=>s!==t.children[o])?new De(t.name,t.attributes,r):t}return Array.isArray(t)?t.map(n=>fv(n,e)):t}function aY(t){let e=t.trim();return e.startsWith("/")||(e="/"+e),e.endsWith("/")||(e+="/"),e}function lY(t,e){return t.startsWith(e)?t.slice(e.length).replace(/\/$/,"").split("/").filter(Boolean).length===1:!1}function cY(t){return!t||!t.trim()?[]:t.split(",").map(e=>{const n=e.indexOf(":");return n===-1?{field:e.trim(),value:""}:{field:e.slice(0,n).trim(),value:e.slice(n+1).trim()}})}function uY(t,e){for(const{field:n,value:r}of e){const i=t.frontmatter[n];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 fY(t,e){const n=[...t];switch(e){case"date-asc":n.sort((r,i)=>(r.date||"").localeCompare(i.date||""));break;case"title-asc":n.sort((r,i)=>r.title.localeCompare(i.title));break;case"title-desc":n.sort((r,i)=>i.title.localeCompare(r.title));break;default:n.sort((r,i)=>(i.date||"").localeCompare(r.date||""));break}return n}function dY(t){const n=[new De("h3",{},[new De("a",{href:t.url},[t.title])])];return t.date&&n.push(new De("time",{datetime:t.date},[t.date])),t.description&&n.push(new De("p",{},[t.description])),new De("article",{"data-name":"post"},n)}function hY(t,e,n,r){let i=!1;const s=fv(t,o=>{if(o.attributes["data-rune"]!=="blog")return o;const a=Lo(o,"folder")??"",l=Lo(o,"sort")||"date-desc",c=Lo(o,"filter")??"",u=Lo(o,"limit")??"",f=u?parseInt(u,10):void 0;if(!a)return n.warn("Blog rune missing folder attribute",r),o;const d=aY(a),h=cY(c);let m=e.filter(w=>!(w.draft||!lY(w.url,d)||h.length>0&&!uY(w,h)));m=fY(m,l),f&&f>0&&(m=m.slice(0,f));const p=o.children.find(w=>De.isTag(w)&&w.attributes["data-name"]==="posts");if(!De.isTag(p))return o;const v=m.map(dY);i=!0;const O=new De(p.name,p.attributes,v),b=o.children.map(w=>w===p?O:w);return new De(o.name,o.attributes,b)});return i?s:t}const pY=new Set(["layout","tint","tint-mode","tint-lock","slug","redirect","type","id"]);function mY(t={}){const e=t.xrefPatterns??[],n=t.embedConfig,r=t.repoUrl,i=t.repoBranch;return{preprocess(s,o,a){const l=kW(s,o,a),c=WV(s,o,a),u=mW(s,o,a);return l||c||u?s:void 0},register(s,o,a){for(const l of s){const c=zW(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);const f={};for(const[d,h]of Object.entries(l.frontmatter))pY.has(d)||(f[d]=h);o.register({type:"page",id:l.url,sourceUrl:l.url,data:{...f,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 d of l.headings){const h=`${l.url}#${d.id}`,m=o.getById("heading",h);m&&m.sourceUrl!==l.url&&a.warn(`Heading '${h}' already registered from '${m.sourceUrl}'`,l.url),o.register({type:"heading",id:h,sourceUrl:l.url,data:{level:d.level,text:d.text,headingId:d.id,url:l.url}})}}mX(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=BW(l),u=jW(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:n,repoUrl:r,repoBranch:i}},postProcess(s,o,a){const l=o.__core__;if(!l)return s;let c=ov(s.renderable,s.url,l.breadcrumbPaths,l.pagesByUrl,a);c=av(c,s.url,l.pagesByUrl,a),c=cv(c,l.pagesByUrl,a,s.url),c=Ef(c,s.url,l.pagesByUrl),c=lv(c,s.url,l.pagesByUrl),c=uv(c,s.url,l.pagesByUrl,c),c=rY(c,s.url),c=hY(c,l.allPosts,a,s.url),c=vX(c),c=TX(c,s.url,l.repoUrl,l.repoBranch,a),c=QX(c,s.url,l.registry,a),c=bX(c,s.url,l.registry,l.embedConfig?.projectFiles,a),c=$W(c,s.url,l.registry,l.xrefPatterns??[],l.embedConfig,a),c=gV(c,s.url,l.registry,l.embedConfig,a),c=_V(c,s.url,l.registry,l.embedConfig,a),c=CV(c,s.url,l.registry,l.embedConfig,a),c=Fg(c,l.registry,a,s.url),c=XV(c,s.url,l.registry,l.xrefPatterns??[],a);const u=UV(c===s.renderable?s:{...s,renderable:c});CW(u.renderable);const f=TW(u.renderable);return f.length>0||u.headings.length>0?{...u,headings:f}:u}}}mY();const gY={nav:Be({name:"nav",schema:tF,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:Be({name:"region",schema:iF,description:"Named content block within a layout definition",snippet:['{% region name="${1:header}" %}',"$0","{% /region %}"]}),layout:Be({name:"layout",schema:oF,description:"Layout definition containing named regions",category:"Site",snippet:["{% layout %}",'{% region name="${1:header}" %}',"$0","{% /region %}","{% /layout %}"]}),codegroup:Be({name:"codegroup",schema:LZ,description:"Tabbed code block with language tabs",typeName:"CodeGroup",category:"Code & Data",snippet:["{% codegroup %}","```${1:js}","$0","```","","```${2:ts}","","```","{% /codegroup %}"]}),grid:Be({name:"grid",aliases:["columns"],schema:CZ,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:Be({name:"hint",aliases:["callout","alert"],schema:BZ,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:Be({name:"tab",schema:WZ,description:"Individual tab within a tab group",typeName:"Tab"}),tabs:Be({name:"tabs",schema:UZ,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:Be({name:"details",schema:lF,description:"Collapsible disclosure block for supplementary content",typeName:"Details",category:"Content",snippet:['{% details summary="${1:Click to expand}" %}',"$0","{% /details %}"]}),drawer:Be({name:"drawer",schema:dF,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:Be({name:"figure",schema:mF,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:Be({name:"gallery",schema:vF,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:Be({name:"accordion",aliases:["faq"],schema:bF,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":Be({name:"accordion-item",schema:OF,description:"Individual accordion section",typeName:"AccordionItem",schemaOrgType:"Question"}),toc:Be({name:"toc",aliases:["table-of-contents"],schema:yF,description:"Auto-generated table of contents from document headings",typeName:"TableOfContents",category:"Site",snippet:["{% toc /%}"]}),embed:Be({name:"embed",schema:kF,description:"Embedded content from external services (YouTube, Twitter, CodePen, Spotify)",seoType:"VideoObject",typeName:"Embed",schemaOrgType:"VideoObject",category:"Content",snippet:['{% embed url="${1:https://}" /%}']}),breadcrumb:Be({name:"breadcrumb",schema:xF,description:"Navigation breadcrumb trail showing page hierarchy",seoType:"BreadcrumbList",typeName:"Breadcrumb",schemaOrgType:"BreadcrumbList",category:"Site",snippet:["{% breadcrumb /%}"]}),pagination:Be({name:"pagination",schema:SF,description:"Sequential prev/next links for ordered docs and tutorials",typeName:"Pagination",category:"Site",snippet:["{% pagination auto /%}"]}),budget:Be({name:"budget",schema:BF,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":Be({name:"budget-category",schema:DF,description:"Cost category within a budget containing line items",typeName:"BudgetCategory"}),"budget-line-item":Be({name:"budget-line-item",schema:MF,description:"Individual budget line item with description and amount",typeName:"BudgetLineItem"}),compare:Be({name:"compare",schema:zF,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:Be({name:"datatable",aliases:["data-table"],schema:ZF,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:Be({name:"diff",schema:HF,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:Be({name:"snippet",schema:MZ,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}" /%}']}),data:Be({name:"data",schema:qZ,description:"Ingest an external tabular source (CSV/TSV/JSON/NDJSON) and emit a Markdown table. Composes inside chart and datatable, and renders standalone, via pre-resolve (SPEC-103).",typeName:"Data",category:"Code & Data",snippet:['{% data src="${1:data/revenue.csv}" /%}']}),code:Be({name:"code",schema:ST,description:"Inline code span for dynamic content. Backticks are literal by definition, so a variable inside them never resolves; this renders the same `<code>` and does (WORK-551).",typeName:"Code",category:"Code & Data",snippet:["{% code %}${1:value}{% /code %}"]}),include:Be({name:"include",schema:RZ,description:"Paste a partial's AST into the page before the preprocess phase, so `data` and `snippet` inside it resolve — the case `{% partial %}` cannot serve. Reads the same `_partials/` and file roots (SPEC-129).",typeName:"Include",category:"Code & Data",snippet:['{% include file="${1:shared-block.md}" /%}']}),chart:Be({name:"chart",schema:e7,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:Be({name:"diagram",schema:n7,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:Be({name:"sidenote",aliases:["footnote","marginnote"],schema:s7,description:"Margin note or footnote displayed alongside the main content",typeName:"Sidenote",category:"Content",snippet:["{% sidenote %}","$0","{% /sidenote %}"]}),conversation:Be({name:"conversation",aliases:["dialogue","chat"],schema:l7,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":Be({name:"conversation-message",schema:o7,description:"Individual message within a conversation",typeName:"ConversationMessage"}),reveal:Be({name:"reveal",schema:f7,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":Be({name:"reveal-step",schema:u7,description:"Individual step within a reveal sequence",typeName:"RevealStep"}),section:Be({name:"section",schema:p7,description:"A generic page section: an eyebrow/headline/blurb header above arbitrary body content",typeName:"Section",category:"Layout",snippet:["{% section %}","Eyebrow","","## ${1:Section title}","","${2:A short supporting blurb.}","","${3:Body content — a bento, cards, anything.}","{% /section %}"]}),juxtapose:Be({name:"juxtapose",schema:v7,description:"Side-by-side comparison with interactive reveal (slider, toggle, fade, or auto)",typeName:"Juxtapose",category:"Layout"}),annotate:Be({name:"annotate",schema:w7,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:Be({name:"note",schema:b7,description:"Annotation note within an annotate block",typeName:"AnnotateNote"}),form:Be({name:"form",aliases:["contact-form"],schema:$7,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":Be({name:"form-field",schema:P7,description:"Individual form field with inferred type",typeName:"FormField"}),sandbox:Be({name:"sandbox",schema:D7,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:Be({name:"pullquote",aliases:["pull-quote"],schema:B7,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:Be({name:"textblock",aliases:["text-block","prose"],schema:z7,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:Be({name:"mediatext",aliases:["media-text"],schema:X7,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:Be({name:"icon",schema:WT,description:"Inline icon resolved by name from the theme icon registry. Self-closing.",category:"Content",snippet:['{% icon name="${1:icon-name}" /%}']}),tint:Be({name:"tint",schema:KT,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:Be({name:"showcase",schema:K7,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:Be({name:"bg",schema:nP,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:Be({name:"blog",schema:rX,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:Be({name:"xref",aliases:["ref"],schema:iP,description:"Inline cross-reference that resolves an entity by ID or name from the registry. Self-closing."}),expand:Be({name:"expand",schema:sP,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:Be({name:"badge",schema:OP,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:Be({name:"bar",schema:ZX,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:Be({name:"deflist",aliases:["definitions","terms"],schema:XX,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:Be({name:"collection",schema:aX,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:Be({name:"relationships",schema:lX,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:Be({name:"aggregate",schema:uX,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":Be({name:"file-ref",schema:fX,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:Be({name:"progress",schema:DX,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:Be({name:"card",schema:NX,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 %}"]})},Uw={...YX(gY),link:eT,...B.tags,if:{...B.tags.if,attributes:{primary:{render:!1}}},else:{...B.tags.else,attributes:{primary:{render:!1}}}},vY={heading:E8,paragraph:$8,fence:Q8,list:L8,item:M8,em:q8,strong:R8,text:D8,link:eT,hardbreak:N8,image:I8,table:B8,thead:B.nodes.thead,tbody:B.nodes.tbody,th:B.nodes.th,tr:B.nodes.tr,td:j8,error:B.nodes.error},OY=new Set(["nav","nav-group","nav-item"]);function bY(t,e,n){const r={...t.runes};for(const[i,s]of Object.entries(IW.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(n)for(const[i,s]of Object.entries(n))r[i]&&(r[i]={...r[i],styles:s});return{...t,runes:r}}function BP(t,e,n,r,i,s,o){const a=B.parse(t),l=bY(e,i,o),c=r?{...Uw,...r}:Uw,u=B.transform(a,{tags:c,nodes:vY,variables:{__source:t,__icons:l.icons}});let f=RV(u);s&&(f=dv(f,s));const d=jP(f);let m=k9(l)(f);return n&&(m=n(m)),{html:K9(m),isComponent:d}}function jP(t){return t==null||typeof t=="string"||typeof t=="number"?!1:Array.isArray(t)?t.some(jP):"attributes"in t&&t.attributes?.["data-rune"]?OY.has(t.attributes["data-rune"]):!1}function dv(t,e){if(t==null||typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>dv(r,e));const n=t;if(n.attributes?.["data-rune"]==="sandbox"){const i=e.design?.contexts??{},o=n.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{...n,children:[...n.children??[],l]}}}if(n.children?.length){const r=n.children.map(i=>dv(i,e));return{...n,children:r}}return n}function Gw(t){return t.hasAttribute("x-data")||t.hasAttribute("data-controller")}let yY=0;function oo(t){return`${t}-${++yY}`}const wY={"behavior.copy.copy":"Copy code","behavior.copy.copied":"Copied","behavior.gallery.lightbox":"Image lightbox","behavior.gallery.close":"Close lightbox","behavior.gallery.previous":"Previous image","behavior.gallery.next":"Next image","behavior.gallery.viewImage":"View image {n}","behavior.preview.preview":"Preview","behavior.preview.viewSource":"View source","behavior.preview.auto":"Auto","behavior.preview.light":"Light","behavior.preview.dark":"Dark","behavior.preview.systemPreference":"System preference","behavior.preview.lightMode":"Light mode","behavior.preview.darkMode":"Dark mode","behavior.preview.markdoc":"Markdoc","behavior.preview.rune":"Rune","behavior.preview.html":"HTML","behavior.reveal.continue":"Continue","behavior.reveal.startOver":"Start over","behavior.search.placeholder":"Search documentation...","behavior.search.noResults":"No results found.","behavior.search.unavailable":"Search is not available.","behavior.search.toNavigate":"to navigate","behavior.search.toSelect":"to select","behavior.search.esc":"Esc","behavior.datatable.filter":"Filter rows...","behavior.datatable.prev":"Prev","behavior.datatable.next":"Next","behavior.form.submitting":"Submitting...","behavior.form.success":"Form submitted successfully.","behavior.form.error":"Something went wrong. Please try again.","behavior.form.selectOption":"Select an option","behavior.juxtapose.slider":"Comparison slider","behavior.juxtapose.toggle":"Comparison toggle","behavior.juxtapose.panel":"Panel {n}","behavior.carousel.previous":"Previous","behavior.carousel.next":"Next","behavior.mobileMenu.open":"Open menu","behavior.mobileMenu.close":"Close menu","behavior.sectionNav.pageSections":"Page sections","behavior.audio.play":"Play","behavior.audio.pause":"Pause","behavior.audio.seek":"Seek","behavior.sandbox.content":"Sandboxed user content","behavior.map.moreInfo":"More info"};let Wl;function _Y(){if(Wl!==void 0)return Wl??{};if(Wl=null,typeof document>"u")return{};const t=document.getElementById("rf-strings");if(!t||!t.textContent)return{};try{const e=JSON.parse(t.textContent);e&&typeof e=="object"&&!Array.isArray(e)&&(Wl=e)}catch{}return Wl??{}}function zP(t,e){return e===void 0?t:t.replace(/\{n\}/g,String(e))}function zt(t,e){const n=_Y()[t]??wY[t]??t;return zP(n,e)}function dl(t,e,n,r){const i=t?.getAttribute(e);return i!=null?zP(i,r):zt(n,r)}const kY="http://www.w3.org/2000/svg",Hw='<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"/>',xY='<polyline points="20 6 9 17 4 12"/>';function Jp(t){const e=document.createElementNS(kY,"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=t,e}function SY(t){const e=t.getAttribute("data-copy-selector");if(e){const n=t.querySelectorAll(e);return Array.from(n).map(r=>r.textContent??"").join(`
337
+ `)}return t.textContent??""}function AY(t){const e=t.querySelectorAll("pre"),n=[];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";const o=dl(r,"data-i18n-copy","behavior.copy.copy"),a=dl(r,"data-i18n-copied","behavior.copy.copied");s.setAttribute("aria-label",o),s.appendChild(Jp(Hw));let l;const c=()=>{const f=SY(r);navigator.clipboard.writeText(f).then(()=>{s.innerHTML="",s.appendChild(Jp(xY)),s.setAttribute("aria-label",a),s.classList.add("rf-codeblock__copy--copied"),l&&clearTimeout(l),l=setTimeout(()=>{s.innerHTML="",s.appendChild(Jp(Hw)),s.setAttribute("aria-label",o),s.classList.remove("rf-codeblock__copy--copied")},2e3)})};s.addEventListener("click",c);const u=r.parentElement?.classList.contains("rf-codeblock")?r.parentElement:null;if(u)u.appendChild(s),n.push(()=>{s.removeEventListener("click",c),l&&clearTimeout(l),s.remove()});else{const f=document.createElement("div");f.className="rf-codeblock",r.parentNode?.insertBefore(f,r),f.appendChild(r),f.appendChild(s),n.push(()=>{s.removeEventListener("click",c),l&&clearTimeout(l),f.parentNode?.insertBefore(r,f),f.remove()})}}return()=>n.forEach(r=>r())}function Kw(t){const e=Array.from(t.querySelectorAll("details"));if(e.length===0)return()=>{};const n=t.hasAttribute("data-multiple"),r=[];for(const o of e){const a=o.querySelector("summary");if(!a)continue;const l=oo("rf-accordion-panel"),c=oo("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"),!n&&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 t.addEventListener("keydown",s),r.push(()=>t.removeEventListener("keydown",s)),()=>r.forEach(o=>o())}const hl=new Map,Jw=new WeakSet;function CY(t){let e=hl.get(t);return e||(e=new Map,hl.set(t,e)),e}function TY(t){const e=t.split("+").map(i=>i.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;const n=e[e.length-1];if(!n)return null;const r=new Set(e.slice(0,-1));return{key:n,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 PY(t,e){if(e.key.toLowerCase()!==t.key)return!1;const n=e.metaKey||e.ctrlKey,r=t.cmd||t.ctrl;return!(r&&!n||!r&&n||t.alt!==e.altKey||t.shift!==e.shiftKey)}function EY(t){const e=t.activeElement;if(!e)return!1;const n=e.tagName;return!!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||e.isContentEditable)}function $Y(t){const e=t.ownerDocument;if(!e||!e.defaultView)return()=>{};const n=e.defaultView,r=t instanceof n.HTMLDialogElement?t:QY(t);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?TY(o)??void 0:void 0,l=CY(e);if(l.has(i))return()=>{};if(a)for(const v of l.values())v.shortcut&&t_(v.shortcut)===t_(a)&&console.warn(`[refrakt drawer] shortcut "${o}" is registered by drawers "${v.id}" and "${i}"; the later one wins.`);l.set(i,{dialog:r,id:i,shortcut:a});const c=[],u=`#${i}`,f=v=>{v.preventDefault(),hv(r)},d=[];if(e.querySelectorAll('a[data-target-type="drawer"]').forEach(v=>{const O=v.getAttribute("href")??"";(O===u||O.endsWith(u))&&(v.addEventListener("click",f),d.push(v))}),c.push(()=>{for(const v of d)v.removeEventListener("click",f)}),s){const v=()=>$f(r);s.addEventListener("click",v),c.push(()=>s.removeEventListener("click",v))}const h=v=>{v.target===r&&$f(r)};r.addEventListener("click",h),c.push(()=>r.removeEventListener("click",h));const m=v=>{v.preventDefault(),$f(r)};r.addEventListener("cancel",m),c.push(()=>r.removeEventListener("cancel",m));const p=()=>{r.setAttribute("data-state","closed"),n.location.hash===u&&n.history.replaceState(null,"",n.location.pathname+n.location.search),e_(e)};return r.addEventListener("close",p),c.push(()=>r.removeEventListener("close",p)),n.location.hash===u&&n.queueMicrotask(()=>{r.open||hv(r)}),Jw.has(e)||(Jw.add(e),qY(e)),()=>{for(const v of c)v();l.delete(i),e_(e)}}function QY(t){const e=t.ownerDocument;if(!e)return null;const n=e.createElement("dialog");for(const r of Array.from(t.attributes))n.setAttribute(r.name,r.value);for(;t.firstChild;)n.appendChild(t.firstChild);return t.parentNode&&t.parentNode.replaceChild(n,t),n.setAttribute("data-state","closed"),n}function hv(t){const e=t.ownerDocument;if(!e||!e.defaultView)return;const n=e.defaultView,r=hl.get(e);if(r)for(const i of r.values())i.dialog!==t&&i.dialog.open&&i.dialog.close();if(!t.open)try{t.showModal()}catch{t.setAttribute("open","")}if(t.setAttribute("data-state","open"),MY(e),t.id){const i=`#${t.id}`;n.location.hash!==i&&n.history.replaceState(null,"",n.location.pathname+n.location.search+i)}}const LY=280;function $f(t){if(!t.open||t.getAttribute("data-state")==="closing")return;t.setAttribute("data-state","closing");let e=!1;const n=()=>{if(!e){e=!0,t.removeEventListener("animationend",r),i!==void 0&&clearTimeout(i);try{t.close()}catch{t.removeAttribute("open")}}},r=s=>{s.target===t&&(s.animationName&&!s.animationName.startsWith("rf-drawer-slide-out")||n())};t.addEventListener("animationend",r);const i=setTimeout(n,LY)}function MY(t){t.documentElement.classList.add("rf-drawer-open")}function e_(t){const e=hl.get(t);if(!e){t.documentElement.classList.remove("rf-drawer-open");return}for(const n of e.values())if(n.dialog.open)return;t.documentElement.classList.remove("rf-drawer-open")}function t_(t){const e=[];return(t.cmd||t.ctrl)&&e.push("mod"),t.alt&&e.push("alt"),t.shift&&e.push("shift"),e.push(t.key),e.join("+")}function qY(t){const e=t.defaultView;if(!e)return;const n=i=>{if(EY(t))return;const s=hl.get(t);if(!s)return;let o;for(const a of s.values())a.shortcut&&PY(a.shortcut,i)&&(o=a);o&&(i.preventDefault(),hv(o.dialog))};t.addEventListener("keydown",n);const r=()=>{const i=hl.get(t);if(i)for(const s of i.values())s.dialog.open&&e.location.hash!==`#${s.id}`&&$f(s.dialog)};e.addEventListener("popstate",r)}function n_(t){const e=t.querySelector('[data-name="tabs"]'),n=t.querySelector('[data-name="panels"]');if(!e||!n)return()=>{};const r=Array.from(e.children).filter(d=>d instanceof HTMLElement&&d.tagName==="BUTTON"),i=Array.from(n.children).filter(d=>d instanceof HTMLElement);if(r.length===0||i.length===0)return()=>{};const s=r.map(()=>oo("rf-tab")),o=i.map(()=>oo("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 RY(t){const e=t.querySelector('[data-name="steps"]')||t,n=Array.from(e.querySelectorAll('[data-rune="reveal-step"]'));if(n.length===0)return()=>{};let r=1;const i=document.createElement("button");i.className="rf-reveal__next",i.textContent=dl(t,"data-i18n-continue","behavior.reveal.continue");const s=document.createElement("button");s.className="rf-reveal__reset",s.textContent=dl(t,"data-i18n-start-over","behavior.reveal.startOver");function o(){for(let c=0;c<n.length;c++){const u=c<r;n[c].classList.toggle("rf-reveal-step--visible",u),n[c].classList.toggle("rf-reveal-step--hidden",!u),n[c].setAttribute("data-state",u?"open":"closed")}r<n.length?(i.parentNode||t.appendChild(i),s.remove()):n.length>1?(i.remove(),s.parentNode||t.appendChild(s)):(i.remove(),s.remove())}const a=()=>{r<n.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 n)c.classList.remove("rf-reveal-step--visible","rf-reveal-step--hidden"),c.removeAttribute("data-state")}}function DY(t){const e=t.querySelector("table");if(!e)return()=>{};const n=e.closest(".rf-datatable__scroll")??e,r=t.getAttribute("data-searchable")==="true",s=(t.getAttribute("data-sortable")||"").split(",").map(y=>y.trim()).filter(Boolean),o=parseInt(t.getAttribute("data-page-size")||"0",10),a=t.getAttribute("data-default-sort")||"",l=Array.from(e.querySelectorAll("th")),c=l.map(y=>y.textContent?.trim()||""),u=e.querySelectorAll("tbody tr"),f=Array.from(u.length>0?u:e.querySelectorAll("tr:not(:first-child)")).map(y=>{const k=Array.from(y.querySelectorAll("td"));return{el:y,cells:k.map(P=>P.textContent?.trim()||""),dataValues:k.map(P=>P.getAttribute("data-value"))}}),d=f.map(y=>y.el);let h="",m=a,p="asc",v=0;const O=[];let b=null,w=null;if(r){b=document.createElement("div"),b.className="rf-datatable__toolbar",w=document.createElement("input"),w.type="search",w.placeholder=zt("behavior.datatable.filter"),w.className="rf-datatable__input",b.appendChild(w),n.before(b);const y=()=>{h=w.value,v=0,A()};w.addEventListener("input",y),O.push(()=>w.removeEventListener("input",y))}for(const y of l){const k=y.textContent?.trim()||"";if(!s.includes(k))continue;y.style.cursor="pointer",y.style.userSelect="none";const P=()=>{m===k?p=p==="asc"?"desc":"asc":(m=k,p="asc"),v=0,A()};y.addEventListener("click",P),O.push(()=>{y.removeEventListener("click",P),y.style.cursor="",y.style.userSelect=""})}let S=null,_=null,x=null,C=null;if(o>0){S=document.createElement("div"),S.className="rf-datatable__pagination",_=document.createElement("button"),_.className="rf-datatable__page-btn",_.textContent=`← ${zt("behavior.datatable.prev")}`,C=document.createElement("span"),C.className="rf-datatable__page-info",x=document.createElement("button"),x.className="rf-datatable__page-btn",x.textContent=`${zt("behavior.datatable.next")} →`,S.appendChild(_),S.appendChild(C),S.appendChild(x),n.after(S);const y=()=>{v>0&&(v--,A())},k=()=>{v++,A()};_.addEventListener("click",y),x.addEventListener("click",k),O.push(()=>{_.removeEventListener("click",y),x.removeEventListener("click",k)})}function A(){let y=[...f];if(h){const Q=h.toLowerCase();y=y.filter($=>$.cells.some(L=>L.toLowerCase().includes(Q)))}if(m){const Q=c.indexOf(m);Q>=0&&y.sort(($,L)=>{const N=$.dataValues[Q],Z=L.dataValues[Q],Y=N!==null?Number(N):NaN,ne=Z!==null?Number(Z):NaN,ae=N!==null&&Z!==null&&!Number.isNaN(Y)&&!Number.isNaN(ne)?Y-ne:$.cells[Q].localeCompare(L.cells[Q],void 0,{numeric:!0});return p==="asc"?ae:-ae})}const k=y.length,P=o>0?Math.ceil(k/o):1;v>=P&&(v=Math.max(0,P-1));const T=o>0?y.slice(v*o,(v+1)*o):y,E=e.querySelector("tbody")||e;for(const Q of f)Q.el.style.display="none";for(const Q of T)Q.el.style.display="",E.appendChild(Q.el);for(const Q of l){const $=Q.textContent?.replace(/[▲▼]/g,"").trim()||"",L=Q.querySelector(".rf-datatable__sort-indicator");if(s.includes($))if(m===$)if(L)L.textContent=p==="asc"?" ▲":" ▼";else{const N=document.createElement("span");N.className="rf-datatable__sort-indicator",N.textContent=p==="asc"?" ▲":" ▼",Q.appendChild(N)}else L?.remove()}S&&_&&x&&C&&(_.disabled=v===0,x.disabled=v>=P-1,C.textContent=`${v+1} / ${P}`,P<=1?S.hidden=!0:S.hidden=!1)}return A(),()=>{O.forEach(k=>k()),b?.remove(),S?.remove();for(const k of l)k.querySelector(".rf-datatable__sort-indicator")?.remove();const y=e.querySelector("tbody")||e;for(const k of d)k.style.display="",y.appendChild(k)}}function NY(t){const e=t.tagName==="FORM"?t:t.querySelector("form");if(!e)return()=>{};const n=t.getAttribute("data-action")||e.getAttribute("action")||"",r=t.getAttribute("data-method")||e.getAttribute("method")||"POST",i=t.getAttribute("data-success")||zt("behavior.form.success"),s=t.getAttribute("data-error")||zt("behavior.form.error"),o=t.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(),!!n){c("submitting",zt("behavior.form.submitting"));try{const d=new FormData(e);(await fetch(n,{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 IY="http://www.w3.org/2000/svg";function af(t){const e=document.createElementNS(IY,"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=t,e}const ds={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"/>'},BY={mobile:ds.mobile,tablet:ds.tablet,desktop:ds.desktop},ga={mobile:{width:375,label:"375px"},tablet:{width:768,label:"768px"},desktop:{width:null,label:"Full"}};function jY(t){const e=t.getAttribute("data-theme")||"auto",r=(t.getAttribute("data-responsive")||"").split(",").map(L=>L.trim()).filter(L=>L in ga),i=r.length>0,s=t.querySelector('[data-name="source"]'),o=t.querySelector('[data-name="html-source"]'),a=t.querySelector('[data-name="themed-source"]'),l=Array.from(t.children).filter(L=>L!==s&&L!==o&&L!==a&&!L.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("div");p.className="rf-preview__toolbar-left",m.appendChild(p);const v=document.createElement("span");v.className="rf-preview__title",p.appendChild(v);const O=document.createElement("div");O.className="rf-preview__controls",m.appendChild(O);let b=null,w=null;if(c){const L=document.createElement("div");L.className="rf-preview__view-toggle",b=document.createElement("button"),b.className="rf-preview__toggle-btn rf-preview__toggle-btn--active",b.setAttribute("aria-label",zt("behavior.preview.preview")),b.setAttribute("title",zt("behavior.preview.preview")),b.appendChild(af(ds.eye)),w=document.createElement("button"),w.className="rf-preview__toggle-btn",w.setAttribute("aria-label",zt("behavior.preview.viewSource")),w.setAttribute("title",zt("behavior.preview.viewSource")),w.appendChild(af(ds.code)),L.appendChild(b),L.appendChild(w),p.appendChild(L);const N=()=>{u="preview",$()},Z=()=>{u="code",$()};b.addEventListener("click",N),w.addEventListener("click",Z),h.push(()=>{b.removeEventListener("click",N),w.removeEventListener("click",Z)})}const S=new Map;if(i){const L=document.createElement("div");L.className="rf-preview__viewport-toggle";for(const N of r){const Z=document.createElement("button");Z.className="rf-preview__toggle-btn",Z.setAttribute("aria-label",`${ga[N].label} viewport`),Z.setAttribute("title",ga[N].label),Z.appendChild(af(BY[N]||ds.desktop));const Y=()=>{d=N,$()};Z.addEventListener("click",Y),h.push(()=>Z.removeEventListener("click",Y)),L.appendChild(Z),S.set(N,Z)}O.appendChild(L)}const _=document.createElement("div");_.className="rf-preview__toggle";const x=[{mode:"auto",label:zt("behavior.preview.auto"),title:zt("behavior.preview.systemPreference"),icon:ds.desktop},{mode:"light",label:zt("behavior.preview.light"),title:zt("behavior.preview.lightMode"),icon:ds.sun},{mode:"dark",label:zt("behavior.preview.dark"),title:zt("behavior.preview.darkMode"),icon:ds.moon}],C=new Map;for(const L of x){const N=document.createElement("button");N.className="rf-preview__toggle-btn",N.setAttribute("aria-label",`${L.label} theme`),N.setAttribute("title",L.title),N.appendChild(af(L.icon));const Z=()=>{f=L.mode,$()};N.addEventListener("click",Z),h.push(()=>N.removeEventListener("click",Z)),_.appendChild(N),C.set(L.mode,N)}O.appendChild(_);const A=document.createElement("div");A.className="rf-preview__canvas";let y=null,k=null;if(i){y=document.createElement("div"),y.className="rf-preview__viewport-frame",k=document.createElement("span"),k.className="rf-preview__viewport-label",k.hidden=!0,y.appendChild(k);for(const L of l)y.appendChild(L);A.appendChild(y)}else for(const L of l)A.appendChild(L);const P=[];let T=null,E=null,Q="";if(c){if(T=document.createElement("div"),T.className="rf-preview__source",s){const L=document.createElement("div");L.appendChild(s),P.push({key:"markdoc",label:zt("behavior.preview.markdoc"),panel:L})}if(o){const L=document.createElement("div");L.appendChild(o),P.push({key:"rune",label:zt("behavior.preview.rune"),panel:L})}if(a){const L=document.createElement("div");L.appendChild(a),P.push({key:"html",label:zt("behavior.preview.html"),panel:L})}if(Q=P[0]?.key??"",P.length>1){const L=document.createElement("div");L.className="rf-preview__source-tabs",E=new Map;for(const N of P){const Z=document.createElement("button");Z.className="rf-preview__source-tab",N.key===Q&&Z.classList.add("rf-preview__source-tab--active"),Z.textContent=N.label;const Y=()=>{Q=N.key,$()};Z.addEventListener("click",Y),h.push(()=>Z.removeEventListener("click",Y)),L.appendChild(Z),E.set(N.key,Z)}T.appendChild(L)}for(const L of P)L.panel.hidden=L.key!==Q,T.appendChild(L.panel)}t.appendChild(m),T&&t.appendChild(T),t.appendChild(A);function $(){if(b&&w&&(b.classList.toggle("rf-preview__toggle-btn--active",u==="preview"),w.classList.toggle("rf-preview__toggle-btn--active",u==="code")),T&&(T.hidden=u!=="code"),A.hidden=u==="code"&&c,O.hidden=u==="code"&&c,E)for(const[N,Z]of E)Z.classList.toggle("rf-preview__source-tab--active",Q===N);for(const N of P)N.panel.hidden=N.key!==Q;for(const[N,Z]of S)Z.classList.toggle("rf-preview__toggle-btn--active",d===N);if(y){const N=d&&ga[d]?ga[d].width:null;y.classList.toggle("rf-preview__viewport-frame--constrained",!!N),y.style.maxWidth=N?`${N}px`:"",k&&(N&&d?(k.textContent=ga[d].label,k.hidden=!1):k.hidden=!0)}for(const[N,Z]of C)Z.classList.toggle("rf-preview__toggle-btn--active",f===N);const L=f==="auto"?void 0:f;L?A.setAttribute("data-color-scheme",L):A.removeAttribute("data-color-scheme");for(const N of A.querySelectorAll("rf-sandbox"))typeof N.setTheme=="function"&&N.setTheme(L||"auto")}return $(),()=>{h.forEach(L=>L()),s&&t.appendChild(s),o&&t.appendChild(o),a&&t.appendChild(a);for(const L of Array.from(y?.children??A.children))L!==k&&t.appendChild(L);m.remove(),A.remove(),T?.remove()}}function zY(t){if(!t.parentElement?.matches('[data-section="media"]'))return()=>{};if(t.getAttribute("data-fit")==="none")return()=>{};const e=t.querySelector(".rf-mockup__frame");if(!e)return()=>{};const n=()=>{const i=parseFloat(getComputedStyle(e).getPropertyValue("--mockup-device-width")),s=getComputedStyle(t),o=(parseFloat(s.paddingLeft)||0)+(parseFloat(s.paddingRight)||0),a=t.clientWidth-o,l=i>0&&a>0?a/i:1;e.style.setProperty("--mockup-fit-scale",String(l))};n();const r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect(),e.style.removeProperty("--mockup-fit-scale")}}function ZY(t){const e=t.querySelectorAll("[data-scrollspy]"),n=[];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);n.push(()=>{l.disconnect(),a?.removeAttribute("data-active")})}return()=>n.forEach(r=>r())}const FY='[data-reveal]:not([data-reveal="none"])';function XY(t){const e=Array.from(t.querySelectorAll(FY));if(e.length===0)return()=>{};if((t instanceof Document?t.documentElement:t.ownerDocument?.documentElement??t).setAttribute("data-animate",""),typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches||typeof IntersectionObserver>"u"){for(const s of e)s.setAttribute("data-in-view","");return()=>{}}const i=new IntersectionObserver((s,o)=>{for(const a of s)a.isIntersecting&&(a.target.setAttribute("data-in-view",""),o.unobserve(a.target))},{rootMargin:"0px 0px -10% 0px"});for(const s of e)i.observe(s);return()=>i.disconnect()}function VY(t){const e=t.querySelectorAll("[data-version-switcher]"),n=[];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),n.push(()=>i.removeEventListener("change",s))}return()=>n.forEach(r=>r())}function WY(t){const e=[];if(t.getAttribute("data-lightbox")==="true"){const n=YY(t);n&&e.push(n)}return()=>e.forEach(n=>n())}function YY(t){const e=Array.from(t.querySelectorAll('[data-name="item"]'));if(e.length===0)return;let n=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"),n=document.createElement("div"),n.className="rf-gallery__lightbox",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-label",zt("behavior.gallery.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",zt("behavior.gallery.close")),m.textContent="×";const p=document.createElement("button");p.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--prev",p.setAttribute("aria-label",zt("behavior.gallery.previous")),p.textContent="‹";const v=document.createElement("button");v.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--next",v.setAttribute("aria-label",zt("behavior.gallery.next")),v.textContent="›",n.appendChild(h),n.appendChild(m),e.length>1&&(n.appendChild(p),n.appendChild(v)),m.addEventListener("click",l),p.addEventListener("click",()=>a(-1)),v.addEventListener("click",()=>a(1)),n.addEventListener("click",O=>{O.target===n&&l()}),document.body.appendChild(n),document.addEventListener("keydown",c),m.focus()}function a(d){if(!n)return;e[r]?.removeAttribute("data-state"),r=(r+d+e.length)%e.length,e[r]?.setAttribute("data-state","selected");const h=n.querySelector("img");h&&(h.src=i(e[r]),h.alt=s(e[r]))}function l(){n&&(e[r]?.removeAttribute("data-state"),document.removeEventListener("keydown",c),n.remove(),n=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)||zt("behavior.gallery.viewImage",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 UY(t){const e=t.querySelector('[data-name="items"]');if(!e)return;const n=Array.from(e.children);if(n.length===0)return;const r=e.parentElement??t;let i;const s=getComputedStyle(r).position;if(s==="static"||s===""){const d=r.style.position;r.style.position="relative",i=()=>{r.style.position=d}}const o=document.createElement("button");o.className="rf-carousel__nav rf-carousel__nav--prev",o.setAttribute("aria-label",dl(t,"data-i18n-previous","behavior.carousel.previous")),o.textContent="‹";const a=document.createElement("button");a.className="rf-carousel__nav rf-carousel__nav--next",a.setAttribute("aria-label",dl(t,"data-i18n-next","behavior.carousel.next")),a.textContent="›",r.appendChild(o),r.appendChild(a);function l(d){const h=n[0];if(!h)return;const m=parseFloat(getComputedStyle(e).columnGap),p=h.offsetWidth+(Number.isFinite(m)?m:0);e.scrollBy({left:d*p,behavior:"smooth"})}const c=()=>l(-1),u=()=>l(1);o.addEventListener("click",c),a.addEventListener("click",u);const f=d=>{d.key==="ArrowLeft"&&(d.preventDefault(),l(-1)),d.key==="ArrowRight"&&(d.preventDefault(),l(1))};return t.setAttribute("tabindex","0"),t.addEventListener("keydown",f),()=>{o.removeEventListener("click",c),a.removeEventListener("click",u),t.removeEventListener("keydown",f),o.remove(),a.remove(),t.removeAttribute("tabindex"),i?.()}}function GY(t){switch(t.getAttribute("data-variant")||"slider"){case"toggle":return JY(t);case"fade":return eU(t);case"auto":return tU(t);default:return KY(t)}}function Ah(t){const e=t.querySelector('[data-name="panels"]')||t;return Array.from(e.querySelectorAll(':scope > [data-rune="juxtapose-panel"]'))}function HY(t){return t.querySelector('[data-name="name"]')?.textContent?.trim()||""}function KY(t){const e=Ah(t);if(e.length<2)return()=>{};const r=(t.getAttribute("data-orientation")||"vertical")==="horizontal",i=t.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 v of e)for(const O of v.querySelectorAll('iframe[loading="lazy"]'))O.loading="eager";const s=document.createElement("div");s.className="rf-juxtapose__divider",s.setAttribute("role","slider"),s.setAttribute("aria-label",zt("behavior.juxtapose.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(v){const O=Math.max(0,Math.min(100,v));t.style.setProperty("--jx-position",String(O)),s.setAttribute("aria-valuenow",String(Math.round(O))),r?(e[0].style.clipPath=`inset(0 0 ${100-O}% 0)`,s.style.top=`${O}%`,s.style.left=""):(e[0].style.clipPath=`inset(0 ${100-O}% 0 0)`,s.style.left=`${O}%`,s.style.top="")}const l=parseFloat(t.style.getPropertyValue("--jx-position"))||50;a(l);let c=!1;function u(v){const O=i.getBoundingClientRect();return r?(v.clientY-O.top)/O.height*100:(v.clientX-O.left)/O.width*100}const f=v=>{c=!0,s.setPointerCapture(v.pointerId),a(u(v)),v.preventDefault()},d=v=>{c&&a(u(v))},h=v=>{c&&(c=!1,s.releasePointerCapture(v.pointerId))},m=v=>{v.target===s||s.contains(v.target)||(c=!0,s.setPointerCapture(v.pointerId),a(u(v)))};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=v=>{const O=parseFloat(t.style.getPropertyValue("--jx-position"))||50,b=v.shiftKey?10:2,w=r?["ArrowUp"]:["ArrowLeft"],S=r?["ArrowDown"]:["ArrowRight"];w.includes(v.key)?(a(O-b),v.preventDefault()):S.includes(v.key)?(a(O+b),v.preventDefault()):v.key==="Home"?(a(0),v.preventDefault()):v.key==="End"&&(a(100),v.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 v of e)v.style.position="",v.style.inset="",v.style.zIndex="",v.style.clipPath="",v.style.willChange=""}}function JY(t){const e=Ah(t);if(e.length<2)return()=>{};let n=0;const r=document.createElement("div");r.className="rf-juxtapose__toggle-bar",r.setAttribute("role","radiogroup"),r.setAttribute("aria-label",zt("behavior.juxtapose.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=HY(l)||zt("behavior.juxtapose.panel",c+1),r.appendChild(u),u}),s=t.querySelector('[data-name="panels"]');s?s.parentNode.insertBefore(r,s):t.insertBefore(r,t.firstChild);function o(){e.forEach((l,c)=>{const u=c===n;l.hidden=!u,l.setAttribute("data-state",u?"active":"inactive")}),i.forEach((l,c)=>{const u=c===n;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&&(n=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 eU(t){const e=Ah(t);if(e.length<2)return()=>{};const n=t.querySelector('[data-name="panels"]');if(!n)return()=>{};const r=parseInt(t.style.getPropertyValue("--jx-duration")||"1000",10);n.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 n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",o),n.addEventListener("click",a),n.setAttribute("aria-live","polite"),()=>{n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",o),n.removeEventListener("click",a),n.removeAttribute("aria-live"),n.style.position="";for(const l of e)l.style.position="",l.style.inset="",l.style.zIndex="",l.style.opacity="",l.style.transition=""}}function tU(t){const e=Ah(t);if(e.length<2)return()=>{};const r=(t.getAttribute("data-orientation")||"vertical")==="horizontal",i=t.querySelector('[data-name="panels"]');if(!i)return()=>{};const s=parseFloat(t.style.getPropertyValue("--jx-position"))||50,o=parseInt(t.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){t.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 v=p-d,O=Math.min(v/o,1),b=1-Math.pow(1-O,3);a(h+(s-h)*b),O<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(t),()=>{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 nU(t){if(t.getAttribute("data-collapsible")!=="true")return()=>{};const e=Array.from(t.querySelectorAll('[data-rune="nav-group"]'));if(e.length===0)return()=>{};const n=[];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||oo("rf-nav-trigger"),a=s.id||oo("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",v),clearTimeout(O)},v=b=>{b.target!==s||b.propertyName!=="height"||p()};s.addEventListener("transitionend",v);const O=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),n.push(()=>{i.removeEventListener("click",u),i.removeEventListener("keydown",f)})}return()=>n.forEach(r=>r())}function rU(t){if(t.getAttribute("data-layout")!=="menubar")return()=>{};const e=[],n=Array.from(t.querySelectorAll('[data-rune="nav-group"]')),r=new Map,i=new Map;for(const f of n){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||oo("rf-nav-trigger"),p=h.id||oo("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=O=>{O.preventDefault(),a(f)},p=O=>{switch(O.key){case"Enter":case" ":O.preventDefault(),a(f);break;case"ArrowDown":{O.preventDefault(),o(f),h.querySelector("a, button, [tabindex]")?.focus();break}case"ArrowRight":case"ArrowLeft":{O.preventDefault();const b=Array.from(r.keys()),w=b.indexOf(f);if(w===-1)break;const S=O.key==="ArrowRight"?b[(w+1)%b.length]:b[(w-1+b.length)%b.length];r.get(S)?.focus(),f.getAttribute("data-open")==="true"&&o(S);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 v=O=>{const b=Array.from(h.querySelectorAll("a, button")),w=document.activeElement,S=w?b.indexOf(w):-1;switch(O.key){case"ArrowDown":O.preventDefault(),b[Math.min(S+1,b.length-1)]?.focus();break;case"ArrowUp":O.preventDefault(),S<=0?d.focus():b[S-1]?.focus();break;case"Escape":O.preventDefault(),s(),d.focus();break}};h.addEventListener("keydown",v),e.push(()=>h.removeEventListener("keydown",v))}const l=f=>{t.contains(f.target)||s()},c=f=>{const d=f.relatedTarget;(!d||!t.contains(d))&&s()};document.addEventListener("click",l),t.addEventListener("focusout",c),e.push(()=>document.removeEventListener("click",l)),e.push(()=>t.removeEventListener("focusout",c));const u=t.querySelector(':scope > [data-name="trigger"]');if(u){const f=d=>{d.preventDefault();const h=t.getAttribute("data-open")==="true";t.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 Ab=typeof HTMLElement<"u"?HTMLElement:class{};function ZP(t,e){const n=t.querySelector(`[data-content="${e}"]`);return n?n instanceof HTMLTemplateElement?n.content.textContent||n.textContent||"":n.textContent||"":""}function iU(){const t=document.documentElement.dataset.theme;return t==="dark"?!0:t==="light"?!1:matchMedia("(prefers-color-scheme: dark)").matches}function sU(t){const e=s=>Math.round(Math.max(0,Math.min(255,s))).toString(16).padStart(2,"0"),n=(s,o,a,l)=>{let c="#"+e(s)+e(o)+e(a);return l!==void 0&&l<1&&(c+=e(l*255)),c},r=t.match(/rgba?\(([^)]+)\)/i);if(r){const[s,o,a,l]=r[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);return[s,o,a].some(Number.isNaN)?null:n(s,o,a,l)}const i=t.match(/color\(srgb\s+([^)]+)\)/i);if(i){const[s,o,a,l]=i[1].split(/[\s/]+/).filter(Boolean).map(parseFloat);return[s,o,a].some(Number.isNaN)?null:n(s*255,o*255,a*255,l)}return null}class oU extends Ab{themeObserver;mediaQuery;mediaListener;source="";container=null;language="mermaid";connectedCallback(){requestAnimationFrame(()=>this.tryRender())}disconnectedCallback(){this.themeObserver?.disconnect(),this.mediaQuery&&this.mediaListener&&this.mediaQuery.removeEventListener("change",this.mediaListener)}tryRender(e=0){if(this.language=this.dataset.language||"mermaid",this.source=ZP(this,"source"),this.container=this.querySelector(".rf-diagram__container"),!!this.container){if(!this.source){e<3&&requestAnimationFrame(()=>this.tryRender(e+1));return}this.language==="mermaid"?(this.renderMermaid(),this.watchThemeChanges()):this.language==="ascii"&&(this.container.textContent=this.source,this.container.style.fontFamily="var(--rf-font-mono)",this.container.style.whiteSpace="pre")}}watchThemeChanges(){this.themeObserver?.disconnect(),this.themeObserver=new MutationObserver(()=>this.renderMermaid()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-color-scheme"],subtree:!0}),this.mediaQuery||(this.mediaQuery=matchMedia("(prefers-color-scheme: dark)"),this.mediaListener=()=>{document.documentElement.dataset.theme||this.renderMermaid()},this.mediaQuery.addEventListener("change",this.mediaListener))}async renderMermaid(){if(!(!this.container||!this.source))try{const n=(await import("https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs")).default,r=getComputedStyle(this.container),i=iU(),s=document.createElement("span");s.style.cssText="position:absolute;width:0;height:0;visibility:hidden",this.container.appendChild(s);const o=(c,u)=>(s.style.color="",s.style.color=`var(${c}, ${u})`,sU(getComputedStyle(s).color)??u);n.initialize({startOnLoad:!1,theme:i?"dark":"base",themeVariables:{darkMode:i,primaryColor:o("--rf-color-surface","#fbfaf7"),primaryTextColor:o("--rf-color-text","#1c1a17"),primaryBorderColor:o("--rf-color-border","#e2e0dd"),secondaryColor:o("--rf-color-surface-hover","#ecebe8"),secondaryTextColor:o("--rf-color-text","#1c1a17"),secondaryBorderColor:o("--rf-color-border","#e2e0dd"),tertiaryColor:o("--rf-color-info-bg","#e8edf4"),tertiaryTextColor:o("--rf-color-text","#1c1a17"),tertiaryBorderColor:o("--rf-color-info-border","#c5d2e0"),lineColor:o("--rf-color-muted","#6b6661"),textColor:o("--rf-color-text","#1c1a17"),mainBkg:o("--rf-color-surface","#fbfaf7"),nodeBorder:o("--rf-color-border","#e2e0dd"),clusterBkg:o("--rf-color-surface","#fbfaf7"),clusterBorder:o("--rf-color-border","#e2e0dd"),edgeLabelBackground:o("--rf-color-surface","#fbfaf7"),fontSize:"14px",fontFamily:r.getPropertyValue("--rf-font-sans").trim()||"system-ui, sans-serif"}}),s.remove();const a="mermaid-"+Math.random().toString(36).slice(2),{svg:l}=await n.render(a,this.source);this.container.innerHTML=l,this.dataset.rendered=""}catch{}}}const lf={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"}},r_={openstreetmap:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',mapbox:'&copy; <a href="https://www.mapbox.com/">Mapbox</a>'},em=new Map;async function tm(t){if(em.has(t))return em.get(t);try{const e=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(t)}&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 em.set(t,i),i}}catch{}return null}class aU extends Ab{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=[],n=this.querySelector("ol");if(!n)return e;for(const r of n.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 n=this.getRootNode(),r=n instanceof ShadowRoot?n:document.head;if(!n.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 y=await tm(A.address);if(y)return{...A,lat:y[0],lng:y[1]}}if(A.name){const y=await tm(A.name);if(y)return{...A,lat:y[0],lng:y[1]}}return null}))).filter(A=>A!==null&&A.lat!==0&&A.lng!==0);if(p.length===0)return;let v=this.querySelector(".rf-map__container");v||(v=document.createElement("div"),v.className="rf-map__container",this.prepend(v));const O=v.querySelector(".rf-map__fallback");O&&O.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 tm(o)||[p[0].lat,p[0].lng]}else{const A=p.map(k=>k.lat),y=p.map(k=>k.lng);b=[(Math.min(...A)+Math.max(...A))/2,(Math.min(...y)+Math.max(...y))/2]}const w=a?parseInt(a):13,S=s.map(v,{zoomControl:u,dragging:u,scrollWheelZoom:u,doubleClickZoom:u,touchZoom:u}).setView(b,w);if(c==="mapbox"){const A=lf.mapbox[l]||lf.mapbox.street;s.tileLayer(`https://api.mapbox.com/styles/v1/mapbox/${A}/tiles/256/{z}/{x}/{y}@2x?access_token=${h}`,{attribution:r_.mapbox,tileSize:512,zoomOffset:-1}).addTo(S)}else{const A=lf.openstreetmap[l]||lf.openstreetmap.street;s.tileLayer(A,{attribution:r_.openstreetmap}).addTo(S)}const _=new Map;for(const A of p){const y=A.group||"";_.has(y)||_.set(y,[]),_.get(y).push(A)}const x=[],C={};for(const[A,y]of _){const k=y.map(P=>{const T=s.marker([P.lat,P.lng]);let E="";return P.name&&(E+=`<strong>${P.name}</strong>`),P.description&&(E+=`<br><em>${P.description}</em>`),P.address&&(E+=`<br><small>${P.address}</small>`),P.url&&(E+=`<br><a href="${P.url}" target="_blank" rel="noopener">${zt("behavior.map.moreInfo")}</a>`),E&&T.bindPopup(E),T});if(A){const P=s.layerGroup(k).addTo(S);C[A]=P}else k.forEach(P=>P.addTo(S));x.push(...k)}if(Object.keys(C).length>0&&s.control.layers(null,C).addTo(S),f&&p.length>1){const A=p.map(y=>[y.lat,y.lng]);s.polyline(A,{color:"var(--rf-color-primary, #3b82f6)",weight:3,opacity:.7,dashArray:"8, 8"}).addTo(S)}if(d&&x.length>0)try{const A="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster-src.js",y="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[y,k])if(!n.querySelector(`link[href="${T}"]`)){const E=document.createElement("link");E.rel="stylesheet",E.href=T,r.appendChild(E)}await new Promise((T,E)=>{const Q=document.createElement("script");Q.src=A,Q.onload=()=>T(),Q.onerror=E,document.head.appendChild(Q)});const P=s.markerClusterGroup();x.forEach(T=>{T.remove(),P.addLayer(T)}),S.addLayer(P)}catch{}if(!o&&!a&&p.length>1){const A=s.latLngBounds(p.map(y=>[y.lat,y.lng]));S.fitBounds(A,{padding:[30,30]})}this.mapInstance=S}catch(n){console.warn("Map rune: Leaflet failed to load",n)}finally{this.initializing=!1}}}}class wi{static pages=[];static currentUrl="";static designTokens=null;static theme="auto";static themeListeners=[];static onThemeChange(e){return wi.themeListeners.push(e),()=>{wi.themeListeners=wi.themeListeners.filter(n=>n!==e)}}static setTheme(e){wi.theme=e;for(const n of wi.themeListeners)n(e)}}const cf={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">']},i_={heading:"sans-serif",body:"sans-serif",mono:"monospace",display:"sans-serif",caption:"sans-serif"};function lU(t,e){return e?t>0:t>24}class cU extends Ab{iframe=null;messageHandler=null;_overflowing=!1;themeCleanup=null;ancestorObserver=null;_activation="eager";_poster="";_activated=!1;_io=null;_backdrop=!1;_onScreen=!1;_visHandler=null;_content="";_framework="";_dependencies="";_label="Sandbox";_heightAttr="auto";_tokens=null;_localScheme=null;_rfData="";_untrusted=!1;_allowJs=!0;_sandboxOrigin="";connectedCallback(){this._content=this.dataset.sourceContent||ZP(this,"source"),this._rfData=this.dataset.rfRecords||"",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||"";const e=this.dataset.activation;this._activation=e==="visible"||e==="click"?e:"eager",this._poster=this.dataset.poster||"",this._localScheme=this.getAttribute("data-color-scheme");const n=this.dataset.designTokens;if(this._tokens=n?JSON.parse(n):wi.designTokens,this._backdrop=this.dataset.guestPosture==="backdrop",this._backdrop){this.initBackdrop();return}if(this._activation!=="eager"){this.renderPoster();return}this.activate()}effectiveTheme(){const e=this._localScheme?null:this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme");return this._localScheme||e||wi.theme}activate(){if(!this._activated&&(this._activated=!0,this._io&&!this._backdrop&&(this._io.disconnect(),this._io=null),this.buildIframe(this.effectiveTheme()),!this._localScheme)){this.themeCleanup=wi.onThemeChange(n=>{this.closest("[data-color-scheme]")||this.setTheme(n)}),this.ancestorObserver=new MutationObserver(()=>{const r=this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme");this.setTheme(r||wi.theme)});let e=this.parentElement;for(;e;)this.ancestorObserver.observe(e,{attributes:!0,attributeFilter:["data-color-scheme"]}),e=e.parentElement}}renderPoster(){const e=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,n=document.createElement("div");if(n.className="rf-sandbox__poster",this._heightAttr==="fill"?n.style.height="100%":this._heightAttr!=="auto"&&(n.style.height=`${parseInt(this._heightAttr,10)}px`),this._poster){const i=document.createElement("img");i.className="rf-sandbox__poster-image",i.src=this._poster,i.alt="",i.loading="lazy",n.appendChild(i)}const r=document.createElement("button");r.type="button",r.className="rf-sandbox__activate",r.textContent=`Run ${this._label}`,r.setAttribute("aria-label",`Run ${this._label} sandbox`),r.addEventListener("click",()=>this.activate(),{once:!0}),n.appendChild(r),this.replaceChildren(n),this._activation==="visible"&&!e&&typeof IntersectionObserver<"u"&&(this._io=new IntersectionObserver(i=>{i.some(s=>s.isIntersecting)&&this.activate()},{rootMargin:"200px"}),this._io.observe(this))}initBackdrop(){if(!(typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)){if(this._visHandler=()=>{document.hidden?this.suspend():this._onScreen&&this.activate()},document.addEventListener("visibilitychange",this._visHandler),typeof IntersectionObserver>"u"){this._onScreen=!0,this.activate();return}this._io=new IntersectionObserver(n=>{this._onScreen=n.some(r=>r.isIntersecting),this._onScreen&&!document.hidden?this.activate():this.suspend()},{rootMargin:"200px"}),this._io.observe(this)}}suspend(){this._activated&&(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?.remove(),this.iframe=null,this._activated=!1)}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._io&&(this._io.disconnect(),this._io=null),this._visHandler&&(document.removeEventListener("visibilitychange",this._visHandler),this._visHandler=null),this.iframe=null}buildIframe(e){const n=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 a=new URLSearchParams({framework:this._framework,dependencies:this._dependencies,theme:e||"auto",height:this._heightAttr});this.iframe.src=`${this._sandboxOrigin.replace(/\/$/,"")}/render?${a.toString()}`;const l=c=>{c.data?.type==="rf-sandbox-ready"&&c.source===this.iframe?.contentWindow&&(this.iframe.contentWindow.postMessage({type:"rf-sandbox-content",content:this._content,tokens:this._tokens},this._sandboxOrigin),window.removeEventListener("message",l))};window.addEventListener("message",l)}else this.iframe.srcdoc=this.buildSrcdoc(this._content,this._framework,this._dependencies,this._tokens,e,this._rfData);this.iframe.title=this._label,this.iframe.setAttribute("frameborder","0"),this.iframe.loading="lazy";const i=this._heightAttr==="fill"?"100%":n||(this._heightAttr!=="auto"?parseInt(this._heightAttr)+"px":"150px");this.iframe.style.cssText=`width: 100%; border: none; height: ${i};`;const s=this._untrusted?this.buildUntrustedBanner():null;this.messageHandler&&window.removeEventListener("message",this.messageHandler);const o=this._heightAttr==="auto";this.messageHandler=a=>{a.data?.type!=="rf-sandbox-resize"||a.source!==this.iframe?.contentWindow||(o&&(this.iframe.style.height=a.data.height+"px"),this.updateOverflow(a.data.scrollWidth))},window.addEventListener("message",this.messageHandler),s?this.replaceChildren(s,this.iframe):this.replaceChildren(this.iframe)}updateOverflow(e){if(!this.iframe||typeof e!="number")return;const n=e-this.iframe.clientWidth;this._overflowing=lU(n,this._overflowing),this.toggleAttribute("data-overflowing",this._overflowing)}buildUntrustedBanner(){const e=document.createElement("div");return e.className="rf-sandbox__untrusted-banner",e.setAttribute("role","note"),e.setAttribute("aria-label",zt("behavior.sandbox.content")),e.textContent="Sandboxed user content — do not enter sensitive information.",e}setTheme(e){this._localScheme||this._activated&&this.buildIframe(e)}buildSrcdoc(e,n,r,i,s,o){const a=this.buildDependencyTags(n,r,i),l=o?`<script type="application/json" id="rf-data">${o.replace(/<\//g,"<\\/")}<\/script>
338
+ <script>window.RF_DATA = Object.freeze(JSON.parse(document.getElementById('rf-data').textContent));<\/script>`:"";s=s||wi.theme;const c=s==="dark"?' class="dark" data-theme="dark" style="color-scheme:dark"':s==="light"?' data-theme="light" style="color-scheme:light"':"",u=s==="dark"?' class="dark"':"",f=s==="dark"||s==="light"?` data-theme="${s}"`:"",d=e.replace(/\s*data-source(?:="[^"]*")?/g,""),h=this.buildCspMetaTag();return`<!DOCTYPE html>
339
+ <html${c}>
340
+ <head>${h?`
341
+ ${h}`:""}
342
+ <meta charset="utf-8">
343
+ <meta name="viewport" content="width=device-width, initial-scale=1">
344
+ ${a}
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
+ ${l?l+`
350
+ `:""}</head>
351
+ <body${u}${f}>
352
+ ${d}
353
+ <script>
354
+ var ro = new ResizeObserver(function() {
355
+ parent.postMessage({ type: 'rf-sandbox-resize', height: document.body.scrollHeight, scrollWidth: document.body.scrollWidth }, '*');
356
+ });
357
+ ro.observe(document.body);
358
+ <\/script>
359
+ <script>
360
+ // The Tailwind CDN may ignore darkMode:"class" config and generate
361
+ // @media (prefers-color-scheme: dark) rules instead. On desktop this
362
+ // works via parent color-scheme propagation; on mobile it doesn't.
363
+ // Fix: when theme is forced (not auto), rewrite the media-query rules:
364
+ // - dark: duplicate as .dark ancestor selectors, remove originals
365
+ // - light: just remove originals (prevents OS dark from leaking in)
366
+ // - auto: leave untouched (media query follows OS preference)
367
+ var forcedTheme = document.body.getAttribute('data-theme');
368
+ function patchDarkCSS() {
369
+ if (!forcedTheme) return; // auto — leave media queries intact
370
+ try {
371
+ for (var i = 0; i < document.styleSheets.length; i++) {
372
+ var sheet = document.styleSheets[i], rules;
373
+ try { rules = sheet.cssRules; } catch(e) { continue; }
374
+ for (var j = rules.length - 1; j >= 0; j--) {
375
+ var r = rules[j];
376
+ if (r instanceof CSSMediaRule && r.conditionText === '(prefers-color-scheme: dark)') {
377
+ if (forcedTheme === 'dark') {
378
+ for (var k = 0; k < r.cssRules.length; k++) {
379
+ var inner = r.cssRules[k];
380
+ if (inner.cssText) {
381
+ sheet.insertRule('.dark ' + inner.cssText, rules.length);
382
+ }
383
+ }
384
+ }
385
+ // Remove original media query rule — for dark, the .dark
386
+ // ancestor selectors replace it; for light, removing it
387
+ // prevents OS dark preference from leaking in.
388
+ sheet.deleteRule(j);
389
+ }
390
+ }
391
+ }
392
+ } catch(e) {}
393
+ }
394
+ // Run after Tailwind CDN generates CSS (deferred to after current task)
395
+ if (document.readyState === 'loading') {
396
+ document.addEventListener('DOMContentLoaded', function() { setTimeout(patchDarkCSS, 0); });
397
+ } else {
398
+ setTimeout(patchDarkCSS, 0);
399
+ }
400
+ // Also re-patch when Tailwind re-generates (MutationObserver on style tags)
401
+ new MutationObserver(function(mutations) {
402
+ for (var m = 0; m < mutations.length; m++) {
403
+ for (var n = 0; n < mutations[m].addedNodes.length; n++) {
404
+ if (mutations[m].addedNodes[n].nodeName === 'STYLE') { setTimeout(patchDarkCSS, 0); return; }
405
+ }
406
+ }
407
+ }).observe(document.head, { childList: true });
408
+ <\/script>${!s||s==="auto"?`
409
+ <script>if(window.matchMedia('(prefers-color-scheme:dark)').matches){document.body.classList.add('dark');document.body.setAttribute('data-theme','dark')}<\/script>`:""}
410
+ </body>
411
+ </html>`}buildCspMetaTag(){if(!this._untrusted)return"";const e=new Set,n=l=>{try{const c=new URL(l);e.add(`${c.protocol}//${c.host}`)}catch{}};if(this._framework&&cf[this._framework])for(const l of cf[this._framework]){const c=l.match(/(?:src|href)="([^"]+)"/);c&&n(c[1])}if(this._dependencies)for(const l of this._dependencies.split(",").map(c=>c.trim()).filter(Boolean))n(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,n,r){const i=[];if(r&&i.push(this.buildDesignTokenTags(r)),e&&cf[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(...cf[e]);if(n)for(const s of n.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(`
412
+ `)}buildDesignTokenTags(e){const n=[];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`;n.push('<link rel="preconnect" href="https://fonts.googleapis.com">'),n.push('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>'),n.push(`<link href="${s}" rel="stylesheet">`)}const r=[];if(e.fonts)for(const i of e.fonts){const s=i_[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 {
413
+ ${r.join(`
414
+ `)}
415
+ }`];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); }")}n.push(`<style>
416
+ ${i.join(`
417
+ `)}
418
+ </style>`)}return n.join(`
419
+ `)}buildTailwindTokenConfig(e){const n={};if(e.fonts){n.fontFamily={};for(const r of e.fonts){const i=i_[r.role]||"sans-serif";n.fontFamily[r.role]=[`'${r.family}'`,i]}}if(e.colors){n.colors={};for(const r of e.colors){const i=r.name.toLowerCase().replace(/\s+/g,"-");n.colors[i]=r.value}}if(e.radii){n.borderRadius={};for(const r of e.radii){const i=r.name.toLowerCase().replace(/\s+/g,"-");n.borderRadius[i]=r.value}}return Object.keys(n).length===0?"":`<script>tailwind.config = { darkMode: "class", theme: { extend: ${JSON.stringify(n)} } }<\/script>`}}function uU(t){const e=[],n=nU(t);n&&e.push(n);const r=rU(t);return r&&e.push(r),()=>e.forEach(i=>i?.())}const fU={accordion:Kw,"accordion-item":Kw,"tab-group":n_,"code-group":n_,reveal:RY,"data-table":DY,form:NY,preview:jY,mockup:zY,gallery:WY,juxtapose:GY,nav:uU,drawer:$Y},dU={carousel:UY};function FP(t=document,e){const n=[];t.querySelectorAll("[data-rune]").forEach(a=>{const l=a.getAttribute("data-rune");if(Gw(a)||a.closest('[data-guest-posture="presentational"]'))return;const c=fU[l];if(c){const u=c(a);u&&n.push(u)}}),t.querySelectorAll("[data-layout]").forEach(a=>{if(Gw(a)||a.closest('[data-guest-posture="presentational"]'))return;const l=a.getAttribute("data-layout"),c=dU[l];if(c){const u=c(a);u&&n.push(u)}});const r=AY(t);n.push(r);const i=ZY(t);n.push(i);const s=XY(t);n.push(s);const o=VY(t);return n.push(o),()=>n.forEach(a=>a())}var hU=W('<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>'),pU=W('<div class="block-card__inline-preview svelte-15i1bgj"></div>'),mU=W('<div class="block-card svelte-15i1bgj"><!> <!></div>');function gU(t,e){dt(e,!0);let n=xt(e,"highlightCss",3,""),r=xt(e,"highlightTransform",3,null),i=xt(e,"communityTags",3,null),s=xt(e,"communityPostTransforms",3,null),o=xt(e,"communityStyles",3,null),a=xt(e,"aggregated",19,()=>({})),l=xt(e,"dragHandle",3,!0),c=xt(e,"readOnly",3,!1),u=J(void 0),f=null,d,h=null;function m(C){return C.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function p(C){const A=new Map;for(const[y,k]of Object.entries(C.runes))A.set(m(y),k);return A}function v(C,A,y){let k=C,P=null,T=null;for(;k&&k!==A;)k.hasAttribute("data-name")&&!P&&(P=k),k.hasAttribute("data-rune")&&!T&&(T=k),k=k.parentElement;if(P){const E=P.getAttribute("data-name");let Q=P.parentElement,$;for(;Q&&Q!==A;){const N=Q.getAttribute("data-rune");if(N){$=y.get(N);break}Q=Q.parentElement}const L=$?.editHints?.[E];if(L&&L!=="none")return{type:"section",el:P,dataName:E,editType:L}}return T?{type:"rune",el:T}:null}function O(C,A){let y=null,k=null;const P=75,T=document.createElement("div");T.className="rf-edit-tooltip",C.appendChild(T);function E($,L){T.textContent=$,T.style.left=`${L.clientX+12}px`,T.style.top=`${L.clientY+12}px`,T.classList.add("rf-tooltip-visible")}function Q(){T.classList.remove("rf-tooltip-visible")}C.addEventListener("mouseover",$=>{const L=v($.target,C,A),N=L?.el??null;if(k!==null&&(clearTimeout(k),k=null),N!==y)if(N&&y&&y.contains(N))y.classList.remove("rf-editable-hover"),y=N,y.classList.add("rf-editable-hover");else if(y&&N&&N.contains(y)){const Z=y;k=setTimeout(()=>{y===Z&&(Z.classList.remove("rf-editable-hover"),y=N,y.classList.add("rf-editable-hover")),k=null},P);return}else y?.classList.remove("rf-editable-hover"),y=N,y?.classList.add("rf-editable-hover");if(L){const Z=L.type==="section"?L.dataName:L.el.getAttribute("data-rune")??"";E(Z,$)}else Q()}),C.addEventListener("mousemove",$=>{T.classList.contains("rf-tooltip-visible")&&(T.style.left=`${$.clientX+12}px`,T.style.top=`${$.clientY+12}px`)}),C.addEventListener("mouseout",$=>{const L=$.relatedTarget;if(y&&(!L||!y.contains(L))){k!==null&&clearTimeout(k);const N=y;k=setTimeout(()=>{N.classList.remove("rf-editable-hover"),y===N&&(y=null),k=null},P),Q()}}),C.addEventListener("click",$=>{Q();const L=v($.target,C,A);if(L)if($.preventDefault(),$.stopPropagation(),L.type==="section"){const{el:N,dataName:Z,editType:Y}=L,ne=N.getBoundingClientRect(),ae=Y==="link"?N.querySelector("a"):null,ie=Y==="image"?N.querySelector("img"):null,K=Y==="code"?N.querySelector("code"):null,he=Y==="icon"?N.hasAttribute("data-icon")?N:N.querySelector("[data-icon]"):null;e.onsectionclick?.({dataName:Z,text:(K??N).textContent?.trim()??"",rect:ne,editType:Y,href:ae?.getAttribute("href")??ie?.getAttribute("src")??void 0,iconName:he?.getAttribute("data-icon")??void 0})}else{const N=$,Z=Array.from(C.querySelectorAll("[data-rune]"));let Y;Z.length>1&&L.el!==Z[0]&&(Y=Z.indexOf(L.el)-1),e.onruneclick?.({x:N.clientX,y:N.clientY,nestedRuneIndex:Y})}})}hn(()=>{if(!g(u)||!e.themeConfig)return;f||(f=g(u).attachShadow({mode:"open"}));const C=e.block.source,A=e.themeConfig,y=e.themeCss,k=n()||"",P=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:T,isComponent:E}=BP(C,A,P,i()??void 0,s()??void 0,a(),o()??void 0);if(E)f.innerHTML=`<style>
420
+ :host { display: block; padding: 0.75rem 1.5rem; }
421
+ .placeholder { display: flex; align-items: center; gap: 0.5rem; color: #888; font-family: system-ui, sans-serif; font-size: 13px; }
422
+ .placeholder svg { opacity: 0.5; }
423
+ </style>
424
+ <div class="placeholder">
425
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
426
+ <rect x="2" y="2" width="12" height="12" rx="2" />
427
+ <path d="M6 6l4 4M10 6l-4 4" />
428
+ </svg>
429
+ Interactive component — see full preview
430
+ </div>`;else{const Q=y.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${Q}
431
+ ${k}
432
+ :host { display: block; }
433
+ .rf-preview-wrapper {
434
+ font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
435
+ color: var(--rf-color-text, #1a1a2e);
436
+ line-height: 1.6;
437
+ --rf-content-max: calc(100% - 6rem);
438
+ --rf-content-gutter: 1.5rem;
439
+ }
440
+ .rf-preview-wrapper > article {
441
+ display: grid;
442
+ grid-template-columns:
443
+ [full-start] 1fr
444
+ [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
445
+ [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
446
+ [content-end] minmax(0, var(--rf-wide-inset, 8rem))
447
+ [wide-end] 1fr
448
+ [full-end];
449
+ }
450
+ .rf-preview-wrapper > article > * { grid-column: content; }
451
+ .rf-preview-wrapper > article > [data-width="wide"] { grid-column: wide; }
452
+ .rf-preview-wrapper > article > [data-width="full"],
453
+ .rf-preview-wrapper > article > :is([data-tint], [data-color-scheme]):not([data-width]) {
454
+ grid-column: full;
455
+ padding-inline: max(var(--rf-content-gutter, 1.5rem), calc((100% - var(--rf-content-max)) / 2));
456
+ }
457
+ /* Base: invisible outline + transition (persists on remove for fade-out) */
458
+ [data-name] {
459
+ outline: 2px dashed transparent;
460
+ outline-offset: 4px;
461
+ border-radius: 4px;
462
+ transition: outline-color 150ms ease;
463
+ }
464
+ [data-rune] {
465
+ outline: 2px dashed transparent;
466
+ outline-offset: 4px;
467
+ border-radius: 4px;
468
+ transition: outline-color 150ms ease;
469
+ }
470
+ /* Editable section hover affordance */
471
+ [data-name].rf-editable-hover {
472
+ outline-color: rgba(59, 130, 246, 0.5);
473
+ }
474
+ [data-name].rf-editable-hover,
475
+ [data-name].rf-editable-hover * {
476
+ cursor: text !important;
477
+ }
478
+ /* Rune root hover affordance — opens block edit panel */
479
+ [data-rune].rf-editable-hover {
480
+ outline-color: rgba(59, 130, 246, 0.3);
481
+ }
482
+ [data-rune].rf-editable-hover,
483
+ [data-rune].rf-editable-hover * {
484
+ cursor: pointer !important;
485
+ }
486
+ /* Hover tooltip */
487
+ .rf-edit-tooltip {
488
+ position: fixed;
489
+ padding: 2px 8px;
490
+ font-family: system-ui, -apple-system, sans-serif;
491
+ font-size: 11px;
492
+ font-weight: 600;
493
+ line-height: 1.4;
494
+ color: #fff;
495
+ background: rgba(30, 41, 59, 0.9);
496
+ border-radius: 4px;
497
+ pointer-events: none;
498
+ z-index: 10000;
499
+ white-space: nowrap;
500
+ opacity: 0;
501
+ transition: opacity 120ms ease;
502
+ }
503
+ .rf-edit-tooltip.rf-tooltip-visible {
504
+ opacity: 1;
505
+ }
506
+ </style>
507
+ <div class="rf-preview-wrapper">${T}</div>`;const $=f.querySelector(".rf-preview-wrapper");$&&(h=FP($),$.addEventListener("click",L=>{L.target.closest("a")&&L.preventDefault()},!0),!c()&&(e.onsectionclick||e.onruneclick)&&e.block.type==="rune"&&O($,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=mU(),w=R(b);{var S=C=>{var A=hU();z(C,A)};le(w,C=>{l()&&C(S)})}var _=D(w,2);{var x=C=>{var A=pU();ln(A,y=>q(u,y),()=>g(u)),z(C,A)};le(_,C=>{e.themeConfig&&C(x)})}ce(()=>St(b,"draggable",l()?"true":"false")),st("dragstart",b,function(...C){e.ondragstart?.apply(this,C)}),st("dragover",b,function(...C){e.ondragover?.apply(this,C)}),st("drop",b,function(...C){e.ondrop?.apply(this,C)}),z(t,b),ht()}var vU=W('<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>'),OU=W('<div class="prose-card__preview svelte-1oewfd6"></div>'),bU=W('<div class="prose-card svelte-1oewfd6"><!> <!></div>');function yU(t,e){dt(e,!0);let n=xt(e,"highlightCss",3,""),r=xt(e,"highlightTransform",3,null),i=xt(e,"communityTags",3,null),s=xt(e,"communityPostTransforms",3,null),o=xt(e,"communityStyles",3,null),a=xt(e,"aggregated",19,()=>({})),l=xt(e,"dragHandle",3,!0),c=xt(e,"readOnly",3,!1),u=J(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(y){return y.startsWith("H")&&y.length===2?`h${y[1]}`:{P:"paragraph",PRE:"code",UL:"list",OL:"list",BLOCKQUOTE:"quote",HR:"divider",TABLE:"table"}[y]??y.toLowerCase()}function v(y,k){let P=y;for(;P&&P!==k;){if(m.has(P.tagName))return P;P=P.parentElement}return null}function O(y){const k=(y.textContent??"").trim(),P=y.tagName;for(let T=0;T<e.block.children.length;T++){const E=e.block.children[T];if(P.startsWith("H")&&P.length===2&&E.type==="heading"){const Q=Si(E.text??"").trim();if(k===Q)return T}else if(P==="P"&&E.type==="paragraph"){const Q=Si(E.source).trim();if(k===Q)return T}else if(P==="PRE"&&E.type==="fence"){const $=(y.querySelector("code")??y).textContent?.trim()??"",L=(E.code??"").trim();if($===L)return T}else if((P==="UL"||P==="OL")&&E.type==="list"){const Q=E.source.replace(/^[-*+\d.]+\s*/gm,"").trim();if(k.includes(Q.slice(0,30))||Q.includes(k.slice(0,30)))return T}else if(P==="BLOCKQUOTE"&&E.type==="quote"){const Q=E.source.replace(/^>\s*/gm,"").trim();if(k===Q)return T}else if(P==="HR"&&E.type==="hr")return T}return-1}function b(y){let k=null,P=null;const T=75,E=document.createElement("div");E.className="rf-edit-tooltip",y.appendChild(E);function Q(L,N){E.textContent=L,E.style.left=`${N.clientX+12}px`,E.style.top=`${N.clientY+12}px`,E.classList.add("rf-tooltip-visible")}function $(){E.classList.remove("rf-tooltip-visible")}y.addEventListener("mouseover",L=>{const N=v(L.target,y);P!==null&&(clearTimeout(P),P=null),N===k||(k?.classList.remove("rf-editable-hover"),k=N,k?.classList.add("rf-editable-hover")),N?(y.classList.remove("rf-block-hover"),Q(p(N.tagName),L)):e.onblockclick?(y.classList.add("rf-block-hover"),Q("prose",L)):$()}),y.addEventListener("mousemove",L=>{E.classList.contains("rf-tooltip-visible")&&(E.style.left=`${L.clientX+12}px`,E.style.top=`${L.clientY+12}px`)}),y.addEventListener("mouseout",L=>{const N=L.relatedTarget;if(y.classList.remove("rf-block-hover"),k&&(!N||!k.contains(N))){P!==null&&clearTimeout(P);const Z=k;P=setTimeout(()=>{Z.classList.remove("rf-editable-hover"),k===Z&&(k=null),P=null},T),$()}}),y.addEventListener("click",L=>{$();const N=v(L.target,y);if(!N){e.onblockclick?.({x:L.clientX,y:L.clientY});return}L.preventDefault(),L.stopPropagation();const Z=O(N);if(Z===-1)return;const Y=e.block.children[Z],ne=N.getBoundingClientRect();N.tagName;const ae={elementType:Y.type,text:(N.textContent??"").trim(),rect:ne,childIndex:Z};Y.type==="heading"?ae.headingLevel=Y.level:Y.type==="fence"&&(ae.fenceLanguage=Y.language??"",ae.fenceCode=Y.code??""),e.onsectionclick?.(ae)})}const w=`
508
+ /* Wrapper: inset border on dead-space hover */
509
+ .rf-preview-wrapper {
510
+ transition: box-shadow 150ms ease;
511
+ cursor: pointer;
512
+ }
513
+ .rf-preview-wrapper.rf-block-hover {
514
+ box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.5);
515
+ border-radius: 4px;
516
+ }
517
+ /* Block-level elements: invisible outline + transition */
518
+ h1, h2, h3, h4, h5, h6, p, pre, ul, ol, blockquote, hr, table {
519
+ outline: 2px dashed transparent;
520
+ outline-offset: 4px;
521
+ border-radius: 4px;
522
+ transition: outline-color 150ms ease;
523
+ }
524
+ /* Hover affordance */
525
+ .rf-editable-hover {
526
+ outline-color: rgba(59, 130, 246, 0.5);
527
+ }
528
+ .rf-editable-hover, .rf-editable-hover * {
529
+ cursor: text !important;
530
+ }
531
+ /* Hover tooltip */
532
+ .rf-edit-tooltip {
533
+ position: fixed;
534
+ padding: 2px 8px;
535
+ font-family: system-ui, -apple-system, sans-serif;
536
+ font-size: 11px;
537
+ font-weight: 600;
538
+ line-height: 1.4;
539
+ color: #fff;
540
+ background: rgba(30, 41, 59, 0.9);
541
+ border-radius: 4px;
542
+ pointer-events: none;
543
+ z-index: 10000;
544
+ white-space: nowrap;
545
+ opacity: 0;
546
+ transition: opacity 120ms ease;
547
+ }
548
+ .rf-edit-tooltip.rf-tooltip-visible {
549
+ opacity: 1;
550
+ }
551
+ `;hn(()=>{if(!g(u)||!e.themeConfig)return;(!f||f.host!==g(u))&&(f=g(u).attachShadow({mode:"open"}));const y=e.block.source,k=e.themeConfig,P=e.themeCss,T=n()||"",E=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:Q}=BP(y,k,E,i()??void 0,s()??void 0,a(),o()??void 0),$=P.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${$}
552
+ ${T}
553
+ :host { display: block; }
554
+ .rf-preview-wrapper {
555
+ font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
556
+ color: var(--rf-color-text, #1a1a2e);
557
+ line-height: 1.6;
558
+ --rf-content-max: calc(100% - 6rem);
559
+ --rf-content-gutter: 1.5rem;
560
+ }
561
+ .rf-preview-wrapper > article {
562
+ display: grid;
563
+ grid-template-columns:
564
+ [full-start] 1fr
565
+ [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
566
+ [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
567
+ [content-end] minmax(0, var(--rf-wide-inset, 8rem))
568
+ [wide-end] 1fr
569
+ [full-end];
570
+ }
571
+ .rf-preview-wrapper > article > * { grid-column: content; }
572
+ ${!c()&&e.onsectionclick?w:""}
573
+ </style>
574
+ <div class="rf-preview-wrapper">${Q}</div>`;const L=f.querySelector(".rf-preview-wrapper");L&&(h=FP(L),L.addEventListener("click",N=>{N.target.closest("a")&&N.preventDefault()},!0),!c()&&e.onsectionclick&&b(L))}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 S=bU(),_=R(S);{var x=y=>{var k=vU();z(y,k)};le(_,y=>{l()&&y(x)})}var C=D(_,2);{var A=y=>{var k=OU();ln(k,P=>q(u,P),()=>g(u)),z(y,k)};le(C,y=>{e.themeConfig&&y(A)})}ce(()=>St(S,"draggable",l()?"true":"false")),st("dragstart",S,function(...y){e.ondragstart?.apply(this,y)}),st("dragover",S,function(...y){e.ondragover?.apply(this,y)}),st("drop",S,function(...y){e.ondrop?.apply(this,y)}),z(t,S),ht()}function pv(t,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(n=>pv(t,n));if(e.startsWith("heading:")){const n=parseInt(e.slice(8),10);return t.type==="heading"&&t.headingLevel===n}if(e==="list:ordered")return t.type==="list"&&t.listOrdered===!0;if(e==="list:unordered")return t.type==="list"&&t.listOrdered!==!0;if(e.startsWith("tag:")){const n=e.slice(4);return t.type==="rune"&&t.runeName===n}return e==="blockquote"?t.type==="quote":t.type===e}function nm(t,e){const n=[];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<t.length&&pv(t[r],i.match);)s.nodes.push(t[r]),r++;s.filled=s.nodes.length>0}else r<t.length&&pv(t[r],i.match)&&(s.nodes.push(t[r]),s.filled=!0,r++);n.push(s)}return n}function wU(t,e){switch(e.type){case"sequence":return{type:"sequence",fields:nm(t,e.fields)};case"delimited":{const n=[],r=[[]];for(const i of t)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]??[];n.push({name:s.name,fields:nm(o,s.fields)})}else if(e.dynamicZones&&e.zoneModel)for(let i=0;i<r.length;i++)n.push({name:`zone-${i+1}`,fields:nm(r[i],e.zoneModel.fields)});return{type:"delimited",delimiter:e.delimiter,zones:n}}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 _U=W('<span class="rune-attrs__required svelte-ong743">*</span>'),kU=W('<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>'),xU=W('<button type="button"> </button>'),SU=Ps('<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>'),AU=Ps('<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>'),CU=W('<button type="button"><span class="rune-attrs__option-label svelte-ong743"> </span> <!></button>'),TU=W('<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>'),PU=W('<div class="rune-attrs__enum svelte-ong743"><button type="button"> </button> <!></div>'),EU=W('<input class="rune-attrs__inline-input svelte-ong743"/>'),$U=W('<button type="button"> </button>'),QU=W('<div class="rune-attrs__row svelte-ong743"><span class="rune-attrs__label svelte-ong743"> <!> <!></span> <!></div>'),LU=W('<span class="rune-attrs__empty svelte-ong743">No attributes</span>'),MU=W('<div class="rune-attrs svelte-ong743"><!> <!></div>');function s_(t,e){dt(e,!0);const n=new Set(["ratio","align","gap","collapse"]),r=new Set(Object.values(Eg).flatMap(y=>Object.keys(y)));let i=ge(()=>iT({authorAttr:e.attributes.reading,runeDefault:e.runeInfo.defaultReading}));function s(y){return r.has(y)?!Eg[g(i)]?.[y]:!1}function o(y,k){const P={...e.attributes};k===""||k===void 0?delete P[y]:P[y]=k,e.onchange(P)}function a(y){return y.replace(/-/g," ").replace(/\b\w/g,k=>k.toUpperCase())}function l(y){if(!n.has(y)||!("layout"in e.runeInfo.attributes))return!1;const k=e.attributes.layout??"";return k!=="split"&&k!=="split-reverse"}let c=ge(()=>Object.entries(e.runeInfo.attributes).filter(([y])=>!l(y)&&!s(y)).sort(([,y],[,k])=>y.required===k.required?0:y.required?-1:1)),u=J(null),f;function d(y){q(u,g(u)===y?null:y,!0)}function h(y,k){o(y,k),q(u,null)}function m(y){g(u)&&f&&!f.contains(y.target)&&q(u,null)}function p(y){y.key==="Escape"&&g(u)&&(q(u,null),y.stopPropagation())}let v=J(null),O=J("");function b(y,k){q(v,y,!0),q(O,k,!0)}function w(y){o(y,g(O)),q(v,null)}function S(y,k){y.key==="Enter"?w(k):y.key==="Escape"&&(q(v,null),y.stopPropagation())}var _=MU();st("mousedown",Zo,m),st("keydown",Zo,p);var x=R(_);Ct(x,17,()=>g(c),([y,k])=>y,(y,k)=>{var P=ge(()=>Kc(g(k),2));let T=()=>g(P)[0],E=()=>g(P)[1];const Q=ge(()=>e.attributes[T()]??"");var $=QU(),L=R($),N=R(L),Z=D(N);{var Y=U=>{var ue=_U();z(U,ue)};le(Z,U=>{E().required&&U(Y)})}var ne=D(Z,2);{var ae=U=>{var ue=kU();ce(()=>St(ue,"data-tooltip",E().description)),z(U,ue)};le(ne,U=>{E().description&&U(ae)})}var ie=D(L,2);{var K=U=>{var ue=xU();let ke;ue.__click=()=>o(T(),g(Q)==="true"?"":"true");var Ce=R(ue);ce(()=>{ke=je(ue,1,"rune-attrs__value svelte-ong743",null,ke,{active:g(Q)==="true"}),Te(Ce,g(Q)==="true"?"Yes":"No")}),z(U,ue)},he=U=>{var ue=PU(),ke=R(ue);let Ce;ke.__click=()=>d(T());var ve=R(ke),Ee=D(ke,2);{var rt=Ke=>{var Ye=TU(),Ve=R(Ye);let ze;Ve.__click=()=>h(T(),"");var Bt=D(R(Ve),2);{var In=bt=>{var Wt=SU();z(bt,Wt)};le(Bt,bt=>{g(Q)||bt(In)})}var tr=D(Ve,2);Ct(tr,17,()=>E().values,Yt,(bt,Wt)=>{var mn=CU();let Wn;mn.__click=()=>h(T(),g(Wt));var xe=R(mn),Yn=R(xe),Lt=D(xe,2);{var Jt=_n=>{var se=AU();z(_n,se)};le(Lt,_n=>{g(Q)===g(Wt)&&_n(Jt)})}ce(()=>{Wn=je(mn,1,"rune-attrs__option svelte-ong743",null,Wn,{selected:g(Q)===g(Wt)}),Te(Yn,g(Wt))}),z(bt,mn)}),ce(()=>ze=je(Ve,1,"rune-attrs__option svelte-ong743",null,ze,{selected:!g(Q)})),z(Ke,Ye)};le(Ee,Ke=>{g(u)===T()&&Ke(rt)})}ce(()=>{Ce=je(ke,1,"rune-attrs__value svelte-ong743",null,Ce,{active:!!g(Q),open:g(u)===T()}),Te(ve,g(Q)||"default")}),z(U,ue)},fe=U=>{var ue=EU();ue.__keydown=ke=>S(ke,T()),ks(ue),ce(()=>St(ue,"type",E().type==="Number"?"number":"text")),st("blur",ue,()=>w(T())),Qn(ue,()=>g(O),ke=>q(O,ke)),z(U,ue)},j=U=>{var ue=$U();let ke;ue.__click=()=>b(T(),g(Q));var Ce=R(ue);ce(()=>{ke=je(ue,1,"rune-attrs__value svelte-ong743",null,ke,{active:!!g(Q)}),Te(Ce,g(Q)||(E().required?"required":"default"))}),z(U,ue)};le(ie,U=>{E().type==="Boolean"?U(K):E().values&&E().values.length>0?U(he,1):g(v)===T()?U(fe,2):U(j,!1)})}ce(U=>Te(N,`${U??""} `),[()=>a(T())]),z(y,$)});var C=D(x,2);{var A=y=>{var k=LU();z(y,k)};le(C,y=>{g(c).length===0&&y(A)})}ln(_,y=>f=y,()=>f),z(t,_),ht()}Vt(["click","keydown"]);var qU=W('<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>'),RU=W('<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>'),DU=W('<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>'),NU=W('<div class="tree-node svelte-16z33d"><!></div> <!>',1),IU=W("<!> <!>",1);function XP(t,e){dt(e,!0);let n=xt(e,"isRootActive",3,!1),r=xt(e,"depth",3,0),i=xt(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=IU(),c=tt(l);{var u=d=>{var h=qU(),m=R(h);let p;m.__click=function(...b){e.onrootclick?.apply(this,b)};var v=D(R(m),4),O=R(v);ce(()=>{p=je(m,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,p,{active:n()}),Te(O,e.rootLabel)}),z(d,h)};le(c,d=>{e.rootLabel&&e.onrootclick&&d(u)})}var f=D(c,2);Ct(f,17,()=>e.nodes,Yt,(d,h,m)=>{const p=ge(()=>[...i(),m]),v=ge(()=>g(h).type==="rune"),O=ge(()=>s(g(p))),b=ge(()=>o(g(p))&&!g(O)),w=ge(()=>g(v)&&!g(h).selfClosing&&g(h).children&&g(h).children.length>0);var S=NU(),_=tt(S),x=R(_);{var C=P=>{var T=RU();let E;T.__click=()=>e.onselect(g(p));var Q=R(T),$=R(Q),L=D(Q,4),N=R(L);ce(()=>{E=je(T,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,E,{active:g(O),ancestor:g(b)}),Te($,g(w)?"▾":"▸"),Te(N,g(h).label)}),z(P,T)},A=P=>{var T=DU();let E;T.__click=()=>e.onselect(g(p));var Q=R(T),$=R(Q),L=D(Q,2),N=R(L);ce(()=>{E=je(T,1,"tree-node__btn tree-node__btn--content svelte-16z33d",null,E,{active:g(O)}),St($,"d",a[g(h).type]??"M2 4h12M2 8h12M2 12h8"),Te(N,g(h).label)}),z(P,T)};le(x,P=>{g(v)?P(C):P(A,!1)})}var y=D(_,2);{var k=P=>{var T=an(),E=tt(T);{let Q=ge(()=>r()+1);XP(E,{get nodes(){return g(h).children},get activePath(){return e.activePath},get onselect(){return e.onselect},get depth(){return g(Q)},get pathPrefix(){return g(p)}})}z(P,T)};le(y,P=>{g(w)&&g(h).children&&P(k)})}ce(()=>$r(_,`padding-left: ${(r()+(e.rootLabel?1:0))*16}px`)),z(d,S)}),z(t,l),ht()}Vt(["click"]);var BU=W('<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>'),jU=W('<button type="button" class="cm-tree__preview-line cm-tree__preview-line--clickable svelte-1d9gzqq"> </button>'),zU=W('<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>'),ZU=W('<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>'),FU=W('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),XU=W('<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>'),VU=W('<!> <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),WU=W('<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>'),YU=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),UU=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),GU=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),HU=W('<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),KU=W('<div class="cm-tree__fields svelte-1d9gzqq"></div>'),JU=W('<div class="cm-tree__delimiter svelte-1d9gzqq"><span class="cm-tree__delimiter-line svelte-1d9gzqq"></span></div>'),eG=W('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),tG=W('<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>'),nG=W('<!> <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),rG=W('<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>'),iG=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),sG=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),oG=W('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),aG=W('<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),lG=W('<!> <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),cG=W('<div class="cm-tree__description svelte-1d9gzqq"> </div>'),uG=W('<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 fG(t,e){dt(e,!0);const n=(T,E=ss,Q=ss,$=ss)=>{var L=an(),N=tt(L);Ct(N,17,E,Yt,(Z,Y)=>{var ne=an(),ae=tt(ne);{var ie=he=>{var fe=BU();fe.__click=()=>e.onnavigaterune(Q(),g(Y).nodeIndex,$());var j=D(R(fe));ce(()=>Te(j,` ${g(Y).text??""}`)),z(he,fe)},K=he=>{var fe=jU();fe.__click=U=>e.oneditfield(Q(),U.currentTarget.getBoundingClientRect(),$(),g(Y).nodeIndex);var j=R(fe);ce(()=>Te(j,g(Y).text)),z(he,fe)};le(ae,he=>{g(Y).type==="rune"&&g(Y).nodeIndex!==void 0?he(ie):he(K,!1)})}z(Z,ne)}),z(T,L)},r=(T,E=ss,Q=ss,$=ss)=>{var L=an(),N=tt(L);Ct(N,17,E,Yt,(Z,Y)=>{var ne=zU();let ae;var ie=D(R(ne),2);ie.__click=fe=>{fe.stopPropagation(),e.oneditlistitem(Q(),g(Y).index,fe.currentTarget.getBoundingClientRect(),$())};var K=R(ie),he=D(ie,2);he.__click=()=>e.onremovelistitem(Q(),g(Y).index,$()),ce(()=>{ae=je(ne,1,"cm-tree__preview-item svelte-1d9gzqq",null,ae,{"cm-tree__preview-item--drag-over":g(o)===Q()&&g(a)===$()&&g(c)===g(Y).index&&g(l)!==g(Y).index,"cm-tree__preview-item--dragging":g(o)===Q()&&g(a)===$()&&g(l)===g(Y).index}),Te(K,g(Y).text)}),st("dragstart",ne,fe=>u(fe,Q(),g(Y).index,$())),st("dragover",ne,fe=>f(fe,g(Y).index)),st("drop",ne,fe=>d(fe,g(Y).index)),st("dragend",ne,h),z(Z,ne)}),z(T,L)},i=(T,E=ss,Q=ss,$=ss)=>{var L=an(),N=tt(L);Ct(N,17,E,Yt,(Z,Y)=>{var ne=ZU();let ae;var ie=D(R(ne),2);ie.__click=fe=>{fe.stopPropagation(),e.oneditfield(Q(),fe.currentTarget.getBoundingClientRect(),$(),g(Y).index)};var K=R(ie),he=D(ie,2);he.__click=()=>e.onremovelistitem(Q(),g(Y).index,$()),ce(()=>{ae=je(ne,1,"cm-tree__preview-item svelte-1d9gzqq",null,ae,{"cm-tree__preview-item--drag-over":g(o)===Q()&&g(a)===$()&&g(c)===g(Y).index&&g(l)!==g(Y).index,"cm-tree__preview-item--dragging":g(o)===Q()&&g(a)===$()&&g(l)===g(Y).index}),Te(K,g(Y).text)}),st("dragstart",ne,fe=>u(fe,Q(),g(Y).index,$())),st("dragover",ne,fe=>f(fe,g(Y).index)),st("drop",ne,fe=>d(fe,g(Y).index)),st("dragend",ne,h),z(Z,ne)}),z(T,L)};let s=xt(e,"selectedField",3,null),o=J(null),a=J(void 0),l=J(null),c=J(null);function u(T,E,Q,$){q(o,E,!0),q(a,$,!0),q(l,Q,!0),q(c,Q,!0),T.dataTransfer&&(T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("text/plain",String(Q)))}function f(T,E){g(l)!==null&&(T.preventDefault(),T.dataTransfer&&(T.dataTransfer.dropEffect="move"),q(c,E,!0))}function d(T,E){T.preventDefault(),g(l)!==null&&g(l)!==E&&g(o)!==null&&e.onreorderlistitem(g(o),g(l),E,g(a)),q(o,null),q(a,void 0),q(l,null),q(c,null)}function h(){q(o,null),q(a,void 0),q(l,null),q(c,null)}function m(T){return T==="list"||T.startsWith("list:")}function p(T){return T.greedy&&T.filled&&T.match!=="any"}function v(T){return T.nodes.map((E,Q)=>{let $;if(E.type==="fence")$=E.fenceLanguage?`[${E.fenceLanguage}]`:"[code]";else if(E.type==="heading"&&E.headingText)$=E.headingText;else if(E.type==="rune"&&E.runeName)$=E.runeName;else if(E.type==="image")$="[image]";else{const L=E.source.replace(/\n/g," ").trim();$=L.length>50?L.slice(0,47)+"...":L}return{text:$.length>50?$.slice(0,47)+"...":$,index:Q}})}function O(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 E=[];for(const Q of T){if(Q.type!=="list")continue;const $=dh(Q.source);for(let L=0;L<$.length;L++){const Z=$[L].split(`
575
+ `)[0].replace(/^[-*+]\s+|^\d+\.\s+/,"").trim();Z&&E.push({text:Z.length>50?Z.slice(0,47)+"...":Z,index:L})}}return E}function w(T){const E=[];for(let Q=0;Q<T.length;Q++){const $=T[Q];if($.type==="heading"&&$.headingText)E.push({text:$.headingText,type:"text",nodeIndex:Q});else if($.type==="paragraph"){const L=$.source.replace(/\n/g," ").trim();E.push({text:L.length>60?L.slice(0,57)+"...":L,type:"text",nodeIndex:Q})}else if($.type==="rune"&&$.runeName)E.push({text:$.runeName,type:"rune",nodeIndex:Q});else if($.type==="fence"){const L=$.fenceLanguage?`[${$.fenceLanguage}]`:"[code]";E.push({text:L,type:"text",nodeIndex:Q})}else if($.type==="list"){const L=$.source.split(`
576
+ `).filter(N=>N.match(/^[-*\d.]\s/)).map(N=>N.replace(/^[-*\d.]+\s+/,"").trim()).filter(Boolean);for(const N of L.slice(0,3))E.push({text:N.length>50?N.slice(0,47)+"...":N,type:"text"});L.length>3&&E.push({text:`... +${L.length-3} more`,type:"text"})}else if($.type==="image")E.push({text:"[image]",type:"text",nodeIndex:Q});else{const L=$.source.replace(/\n/g," ").trim();L&&E.push({text:L.length>50?L.slice(0,47)+"...":L,type:"text",nodeIndex:Q})}}return E}var S=uG(),_=R(S),x=D(R(_),2),C=R(x),A=D(_,2);{var y=T=>{var E=KU();Ct(E,21,()=>e.structure.fields,Yt,(Q,$)=>{const L=ge(()=>w(g($).nodes)),N=ge(()=>m(g($).match)?b(g($).nodes):[]),Z=ge(()=>p(g($))?v(g($)):[]);var Y=HU(),ne=tt(Y);let ae;ne.__click=()=>e.onfieldselect(g($).name);var ie=R(ne),K=R(ie),he=D(ie,2),fe=R(he),j=D(he,2);{var U=Ve=>{var ze=FU();z(Ve,ze)};le(j,Ve=>{!g($).optional&&!g($).filled&&Ve(U)})}var ue=D(j,4);{var ke=Ve=>{var ze=VU(),Bt=tt(ze);{var In=Wt=>{var mn=XU();mn.__click=Wn=>{Wn.stopPropagation(),e.onappenditem(g($).name)},ce(()=>St(mn,"title",`Add item to ${g($).name??""}`)),z(Wt,mn)},tr=ge(()=>m(g($).match)||p(g($)));le(Bt,Wt=>{g(tr)&&Wt(In)})}var bt=D(Bt,2);bt.__click=Wt=>{Wt.stopPropagation(),e.onremovefield(g($).name)},ce(()=>St(bt,"title",`Remove ${g($).name??""}`)),z(Ve,ze)},Ce=Ve=>{var ze=WU();ze.__click=Bt=>{Bt.stopPropagation(),e.onaddfield(g($).name)},ce(()=>St(ze,"title",`Add ${g($).name??""}`)),z(Ve,ze)};le(ue,Ve=>{g($).filled?Ve(ke):Ve(Ce,!1)})}var ve=D(ne,2);{var Ee=Ve=>{var ze=YU(),Bt=R(ze);r(Bt,()=>g(N),()=>g($).name),z(Ve,ze)},rt=ge(()=>g($).filled&&m(g($).match)&&g(N).length>0),Ke=Ve=>{var ze=UU(),Bt=R(ze);i(Bt,()=>g(Z),()=>g($).name),z(Ve,ze)},Ye=Ve=>{var ze=GU(),Bt=R(ze);n(Bt,()=>g(L),()=>g($).name),z(Ve,ze)};le(ve,Ve=>{g(rt)?Ve(Ee):g($).filled&&g(Z).length>0?Ve(Ke,1):g($).filled&&g(L).length>0&&Ve(Ye,2)})}ce(Ve=>{ae=je(ne,1,"cm-tree__field svelte-1d9gzqq",null,ae,{"cm-tree__field--filled":g($).filled,"cm-tree__field--empty":!g($).filled,"cm-tree__field--required":!g($).optional&&!g($).filled,"cm-tree__field--selected":s()===g($).name}),St(K,"d",Ve),Te(fe,g($).name)},[()=>O(g($).match)]),z(Q,Y)}),z(T,E)},k=T=>{var E=an(),Q=tt(E);Ct(Q,17,()=>e.structure.zones,Yt,($,L,N)=>{var Z=lG(),Y=tt(Z);{var ne=fe=>{var j=JU();z(fe,j)};le(Y,fe=>{N>0&&fe(ne)})}var ae=D(Y,2),ie=R(ae),K=R(ie),he=D(ie,2);Ct(he,21,()=>g(L).fields,Yt,(fe,j)=>{const U=ge(()=>w(g(j).nodes)),ue=ge(()=>m(g(j).match)?b(g(j).nodes):[]),ke=ge(()=>p(g(j))?v(g(j)):[]);var Ce=aG(),ve=tt(Ce);let Ee;ve.__click=()=>e.onfieldselect(g(j).name,g(L).name);var rt=R(ve),Ke=R(rt),Ye=D(rt,2),Ve=R(Ye),ze=D(Ye,2);{var Bt=Lt=>{var Jt=eG();z(Lt,Jt)};le(ze,Lt=>{!g(j).optional&&!g(j).filled&&Lt(Bt)})}var In=D(ze,4);{var tr=Lt=>{var Jt=nG(),_n=tt(Jt);{var se=Ae=>{var Qe=tG();Qe.__click=yt=>{yt.stopPropagation(),e.onappenditem(g(j).name,g(L).name)},ce(()=>St(Qe,"title",`Add item to ${g(j).name??""}`)),z(Ae,Qe)},Oe=ge(()=>m(g(j).match)||p(g(j)));le(_n,Ae=>{g(Oe)&&Ae(se)})}var _e=D(_n,2);_e.__click=Ae=>{Ae.stopPropagation(),e.onremovefield(g(j).name,g(L).name)},ce(()=>St(_e,"title",`Remove ${g(j).name??""}`)),z(Lt,Jt)},bt=Lt=>{var Jt=rG();Jt.__click=_n=>{_n.stopPropagation(),e.onaddfield(g(j).name,g(L).name)},ce(()=>St(Jt,"title",`Add ${g(j).name??""}`)),z(Lt,Jt)};le(In,Lt=>{g(j).filled?Lt(tr):Lt(bt,!1)})}var Wt=D(ve,2);{var mn=Lt=>{var Jt=iG(),_n=R(Jt);r(_n,()=>g(ue),()=>g(j).name,()=>g(L).name),z(Lt,Jt)},Wn=ge(()=>g(j).filled&&m(g(j).match)&&g(ue).length>0),xe=Lt=>{var Jt=sG(),_n=R(Jt);i(_n,()=>g(ke),()=>g(j).name,()=>g(L).name),z(Lt,Jt)},Yn=Lt=>{var Jt=oG(),_n=R(Jt);n(_n,()=>g(U),()=>g(j).name,()=>g(L).name),z(Lt,Jt)};le(Wt,Lt=>{g(Wn)?Lt(mn):g(j).filled&&g(ke).length>0?Lt(xe,1):g(j).filled&&g(U).length>0&&Lt(Yn,2)})}ce(Lt=>{Ee=je(ve,1,"cm-tree__field svelte-1d9gzqq",null,Ee,{"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(L).name}.${g(j).name}`}),St(Ke,"d",Lt),Te(Ve,g(j).name)},[()=>O(g(j).match)]),z(fe,Ce)}),ce(()=>Te(K,g(L).name)),z($,Z)}),z(T,E)},P=T=>{var E=cG(),Q=R(E);ce(()=>Te(Q,e.structure.description)),z(T,E)};le(A,T=>{e.structure.type==="sequence"?T(y):e.structure.type==="delimited"?T(k,1):(e.structure.type==="sections"||e.structure.type==="custom")&&T(P,2)})}ce(()=>Te(C,e.rootLabel)),z(t,S),ht()}Vt(["click"]);function pe(t){return new il(cO.define(t))}function Ds(t){return re(()=>import("./index-C6O8opFI.js"),[]).then(e=>e.sql({dialect:e[t]}))}const VP=[ee.of({name:"C",extensions:["c","h","ino"],load(){return re(()=>import("./index-CGfziSaO.js"),[]).then(t=>t.cpp())}}),ee.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return re(()=>import("./index-CGfziSaO.js"),[]).then(t=>t.cpp())}}),ee.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ds("Cassandra")}}),ee.of({name:"CSS",extensions:["css"],load(){return re(()=>Promise.resolve().then(()=>eI),void 0).then(t=>t.css())}}),ee.of({name:"Go",extensions:["go"],load(){return re(()=>import("./index-BEzsLLEi.js"),[]).then(t=>t.go())}}),ee.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return re(()=>Promise.resolve().then(()=>VI),void 0).then(t=>t.html())}}),ee.of({name:"Java",extensions:["java"],load(){return re(()=>import("./index-C3621cGO.js"),[]).then(t=>t.java())}}),ee.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return re(()=>Promise.resolve().then(()=>Xu),void 0).then(t=>t.javascript())}}),ee.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return re(()=>import("./index-BbKNPcZu.js"),[]).then(t=>t.jinja())}}),ee.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return re(()=>import("./index-DyjCpEtL.js"),[]).then(t=>t.json())}}),ee.of({name:"JSX",extensions:["jsx"],load(){return re(()=>Promise.resolve().then(()=>Xu),void 0).then(t=>t.javascript({jsx:!0}))}}),ee.of({name:"LESS",extensions:["less"],load(){return re(()=>import("./index-DcwpakCF.js"),[]).then(t=>t.less())}}),ee.of({name:"Liquid",extensions:["liquid"],load(){return re(()=>import("./index-BgoT2u0j.js"),[]).then(t=>t.liquid())}}),ee.of({name:"MariaDB SQL",load(){return Ds("MariaSQL")}}),ee.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return re(()=>Promise.resolve().then(()=>r4),void 0).then(t=>t.markdown())}}),ee.of({name:"MS SQL",load(){return Ds("MSSQL")}}),ee.of({name:"MySQL",load(){return Ds("MySQL")}}),ee.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return re(()=>import("./index-ojg7U5eP.js"),[]).then(t=>t.php())}}),ee.of({name:"PLSQL",extensions:["pls"],load(){return Ds("PLSQL")}}),ee.of({name:"PostgreSQL",load(){return Ds("PostgreSQL")}}),ee.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return re(()=>import("./index-MRvFn3Sl.js"),[]).then(t=>t.python())}}),ee.of({name:"Rust",extensions:["rs"],load(){return re(()=>import("./index-Cnibris1.js"),[]).then(t=>t.rust())}}),ee.of({name:"Sass",extensions:["sass"],load(){return re(()=>import("./index-CiVwGhFG.js"),[]).then(t=>t.sass({indented:!0}))}}),ee.of({name:"SCSS",extensions:["scss"],load(){return re(()=>import("./index-CiVwGhFG.js"),[]).then(t=>t.sass())}}),ee.of({name:"SQL",extensions:["sql"],load(){return Ds("StandardSQL")}}),ee.of({name:"SQLite",load(){return Ds("SQLite")}}),ee.of({name:"TSX",extensions:["tsx"],load(){return re(()=>Promise.resolve().then(()=>Xu),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),ee.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return re(()=>Promise.resolve().then(()=>Xu),void 0).then(t=>t.javascript({typescript:!0}))}}),ee.of({name:"WebAssembly",extensions:["wat","wast"],load(){return re(()=>import("./index-BRNcz3ZN.js"),[]).then(t=>t.wast())}}),ee.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return re(()=>import("./index-xzyBNgk5.js"),[]).then(t=>t.xml())}}),ee.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return re(()=>import("./index-BhvgBV4C.js"),[]).then(t=>t.yaml())}}),ee.of({name:"APL",extensions:["dyalog","apl"],load(){return re(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>pe(t.apl))}}),ee.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return re(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>pe(t.asciiArmor))}}),ee.of({name:"ASN.1",extensions:["asn","asn1"],load(){return re(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>pe(t.asn1({})))}}),ee.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return re(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>pe(t.asterisk))}}),ee.of({name:"Brainfuck",extensions:["b","bf"],load(){return re(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>pe(t.brainfuck))}}),ee.of({name:"Cobol",extensions:["cob","cpy"],load(){return re(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>pe(t.cobol))}}),ee.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.csharp))}}),ee.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>pe(t.clojure))}}),ee.of({name:"ClojureScript",extensions:["cljs"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>pe(t.clojure))}}),ee.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return re(()=>import("./css-BnMrqG3P.js"),[]).then(t=>pe(t.gss))}}),ee.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return re(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>pe(t.cmake))}}),ee.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return re(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>pe(t.coffeeScript))}}),ee.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return re(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>pe(t.commonLisp))}}),ee.of({name:"Cypher",extensions:["cyp","cypher"],load(){return re(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>pe(t.cypher))}}),ee.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return re(()=>import("./python-BuPzkPfP.js"),[]).then(t=>pe(t.cython))}}),ee.of({name:"Crystal",extensions:["cr"],load(){return re(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>pe(t.crystal))}}),ee.of({name:"D",extensions:["d"],load(){return re(()=>import("./d-pRatUO7H.js"),[]).then(t=>pe(t.d))}}),ee.of({name:"Dart",extensions:["dart"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.dart))}}),ee.of({name:"diff",extensions:["diff","patch"],load(){return re(()=>import("./diff-DbItnlRl.js"),[]).then(t=>pe(t.diff))}}),ee.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return re(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(t=>pe(t.dockerFile))}}),ee.of({name:"DTD",extensions:["dtd"],load(){return re(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>pe(t.dtd))}}),ee.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return re(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>pe(t.dylan))}}),ee.of({name:"EBNF",load(){return re(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>pe(t.ebnf))}}),ee.of({name:"ECL",extensions:["ecl"],load(){return re(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>pe(t.ecl))}}),ee.of({name:"edn",extensions:["edn"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>pe(t.clojure))}}),ee.of({name:"Eiffel",extensions:["e"],load(){return re(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>pe(t.eiffel))}}),ee.of({name:"Elm",extensions:["elm"],load(){return re(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>pe(t.elm))}}),ee.of({name:"Erlang",extensions:["erl"],load(){return re(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>pe(t.erlang))}}),ee.of({name:"Esper",load(){return re(()=>import("./sql-D0XecflT.js"),[]).then(t=>pe(t.esper))}}),ee.of({name:"Factor",extensions:["factor"],load(){return re(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(t=>pe(t.factor))}}),ee.of({name:"FCL",load(){return re(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>pe(t.fcl))}}),ee.of({name:"Forth",extensions:["forth","fth","4th"],load(){return re(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>pe(t.forth))}}),ee.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return re(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>pe(t.fortran))}}),ee.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>pe(t.fSharp))}}),ee.of({name:"Gas",extensions:["s"],load(){return re(()=>import("./gas-Bneqetm1.js"),[]).then(t=>pe(t.gas))}}),ee.of({name:"Gherkin",extensions:["feature"],load(){return re(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>pe(t.gherkin))}}),ee.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return re(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>pe(t.groovy))}}),ee.of({name:"Haskell",extensions:["hs"],load(){return re(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>pe(t.haskell))}}),ee.of({name:"Haxe",extensions:["hx"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>pe(t.haxe))}}),ee.of({name:"HXML",extensions:["hxml"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>pe(t.hxml))}}),ee.of({name:"HTTP",load(){return re(()=>import("./http-DBlCnlav.js"),[]).then(t=>pe(t.http))}}),ee.of({name:"IDL",extensions:["pro"],load(){return re(()=>import("./idl-BEugSyMb.js"),[]).then(t=>pe(t.idl))}}),ee.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return re(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>pe(t.jsonld))}}),ee.of({name:"Julia",extensions:["jl"],load(){return re(()=>import("./julia-DuME0IfC.js"),[]).then(t=>pe(t.julia))}}),ee.of({name:"Kotlin",extensions:["kt","kts"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.kotlin))}}),ee.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return re(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>pe(t.liveScript))}}),ee.of({name:"Lua",extensions:["lua"],load(){return re(()=>import("./lua-BgMRiT3U.js"),[]).then(t=>pe(t.lua))}}),ee.of({name:"mIRC",extensions:["mrc"],load(){return re(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>pe(t.mirc))}}),ee.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return re(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>pe(t.mathematica))}}),ee.of({name:"Modelica",extensions:["mo"],load(){return re(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>pe(t.modelica))}}),ee.of({name:"MUMPS",extensions:["mps"],load(){return re(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>pe(t.mumps))}}),ee.of({name:"Mbox",extensions:["mbox"],load(){return re(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>pe(t.mbox))}}),ee.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return re(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>pe(t.nginx))}}),ee.of({name:"NSIS",extensions:["nsh","nsi"],load(){return re(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([3,1])).then(t=>pe(t.nsis))}}),ee.of({name:"NTriples",extensions:["nt","nq"],load(){return re(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>pe(t.ntriples))}}),ee.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.objectiveC))}}),ee.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.objectiveCpp))}}),ee.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>pe(t.oCaml))}}),ee.of({name:"Octave",extensions:["m"],load(){return re(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>pe(t.octave))}}),ee.of({name:"Oz",extensions:["oz"],load(){return re(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>pe(t.oz))}}),ee.of({name:"Pascal",extensions:["p","pas"],load(){return re(()=>import("./pascal--L3eBynH.js"),[]).then(t=>pe(t.pascal))}}),ee.of({name:"Perl",extensions:["pl","pm"],load(){return re(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>pe(t.perl))}}),ee.of({name:"Pig",extensions:["pig"],load(){return re(()=>import("./pig-CevX1Tat.js"),[]).then(t=>pe(t.pig))}}),ee.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return re(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>pe(t.powerShell))}}),ee.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return re(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>pe(t.properties))}}),ee.of({name:"ProtoBuf",extensions:["proto"],load(){return re(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>pe(t.protobuf))}}),ee.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return re(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([4,5])).then(t=>pe(t.pug))}}),ee.of({name:"Puppet",extensions:["pp"],load(){return re(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>pe(t.puppet))}}),ee.of({name:"Q",extensions:["q"],load(){return re(()=>import("./q-pXgVlZs6.js"),[]).then(t=>pe(t.q))}}),ee.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return re(()=>import("./r-B6wPVr8A.js"),[]).then(t=>pe(t.r))}}),ee.of({name:"RPM Changes",load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>pe(t.rpmChanges))}}),ee.of({name:"RPM Spec",extensions:["spec"],load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>pe(t.rpmSpec))}}),ee.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return re(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>pe(t.ruby))}}),ee.of({name:"SAS",extensions:["sas"],load(){return re(()=>import("./sas-B4kiWyti.js"),[]).then(t=>pe(t.sas))}}),ee.of({name:"Scala",extensions:["scala"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.scala))}}),ee.of({name:"Scheme",extensions:["scm","ss"],load(){return re(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>pe(t.scheme))}}),ee.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return re(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>pe(t.shell))}}),ee.of({name:"Sieve",extensions:["siv","sieve"],load(){return re(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>pe(t.sieve))}}),ee.of({name:"Smalltalk",extensions:["st"],load(){return re(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>pe(t.smalltalk))}}),ee.of({name:"Solr",load(){return re(()=>import("./solr-DehyRSwq.js"),[]).then(t=>pe(t.solr))}}),ee.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>pe(t.sml))}}),ee.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return re(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>pe(t.sparql))}}),ee.of({name:"Spreadsheet",alias:["excel","formula"],load(){return re(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>pe(t.spreadsheet))}}),ee.of({name:"Squirrel",extensions:["nut"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(t=>pe(t.squirrel))}}),ee.of({name:"Stylus",extensions:["styl"],load(){return re(()=>import("./stylus-B533Al4x.js"),[]).then(t=>pe(t.stylus))}}),ee.of({name:"Swift",extensions:["swift"],load(){return re(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>pe(t.swift))}}),ee.of({name:"sTeX",load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>pe(t.stex))}}),ee.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>pe(t.stex))}}),ee.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>pe(t.verilog))}}),ee.of({name:"Tcl",extensions:["tcl"],load(){return re(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>pe(t.tcl))}}),ee.of({name:"Textile",extensions:["textile"],load(){return re(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>pe(t.textile))}}),ee.of({name:"TiddlyWiki",load(){return re(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>pe(t.tiddlyWiki))}}),ee.of({name:"Tiki wiki",load(){return re(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>pe(t.tiki))}}),ee.of({name:"TOML",extensions:["toml"],load(){return re(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>pe(t.toml))}}),ee.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return re(()=>import("./troff-wAsdV37c.js"),[]).then(t=>pe(t.troff))}}),ee.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return re(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>pe(t.ttcn))}}),ee.of({name:"TTCN_CFG",extensions:["cfg"],load(){return re(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>pe(t.ttcnCfg))}}),ee.of({name:"Turtle",extensions:["ttl"],load(){return re(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>pe(t.turtle))}}),ee.of({name:"Web IDL",extensions:["webidl"],load(){return re(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>pe(t.webIDL))}}),ee.of({name:"VB.NET",extensions:["vb"],load(){return re(()=>import("./vb-CmGdzxic.js"),[]).then(t=>pe(t.vb))}}),ee.of({name:"VBScript",extensions:["vbs"],load(){return re(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>pe(t.vbScript))}}),ee.of({name:"Velocity",extensions:["vtl"],load(){return re(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>pe(t.velocity))}}),ee.of({name:"Verilog",extensions:["v"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>pe(t.verilog))}}),ee.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return re(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>pe(t.vhdl))}}),ee.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return re(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>pe(t.xQuery))}}),ee.of({name:"Yacas",extensions:["ys"],load(){return re(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>pe(t.yacas))}}),ee.of({name:"Z80",extensions:["z80"],load(){return re(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>pe(t.z80))}}),ee.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>pe(t.mscgen))}}),ee.of({name:"Xù",extensions:["xu"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>pe(t.xu))}}),ee.of({name:"MsGenny",extensions:["msgenny"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>pe(t.msgenny))}}),ee.of({name:"Vue",extensions:["vue"],load(){return re(()=>import("./index-DNGu9cr1.js"),[]).then(t=>t.vue())}}),ee.of({name:"Angular Template",load(){return re(()=>import("./index-B9evDjiY.js"),[]).then(t=>t.angular())}})];var dG=W('<div class="inline-editor svelte-1ewoogg"></div>');function _o(t,e){dt(e,!0);let n,r=J(void 0),i="";const s=new ws,o=new ws,a=new ws,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});hn(()=>{if(!n)return;const u=!!Er(()=>e.language)?.trim(),f=Pt.create({doc:Er(()=>e.content),extensions:[s.of(cl()),o.of(u?[]:jc()),a.of(u?[]:ag({override:[Og(e.runes),bg(e.runes,e.aggregated)],icons:!1})),pO(),l,Ec(cC),Ec(qx),tC(),na.of([...vO,...mO,...lC,{key:"Mod-/",run:h=>(dc(h),!0)}]),Pe.updateListener.of(h=>{h.docChanged&&(i=h.state.doc.toString(),e.onchange(i))}),Pe.lineWrapping]}),d=new Pe({state:f,parent:n});return q(r,d,!0),()=>{q(r,void 0),d.destroy()}}),hn(()=>{const u=g(r);if(!u)return;const f=e.language?.trim();if(!f){u.dispatch({effects:[s.reconfigure(cl()),o.reconfigure(jc()),a.reconfigure(ag({override:[Og(e.runes),bg(e.runes,e.aggregated)],icons:!1}))]});return}u.dispatch({effects:[o.reconfigure([]),a.reconfigure([])]});const d=ee.matchLanguageName(VP,f,!0);d&&d.load().then(h=>{g(r)===u&&u.dispatch({effects:s.reconfigure(h)})})}),hn(()=>{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=dG();ln(c,u=>n=u,()=>n),z(t,c),ht()}var hG=W('<span class="edit-panel__category svelte-1t8cclf"> </span>'),pG=Ps('<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),mG=Ps('<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),gG=Ps('<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),vG=W('<button type="button"><!></button>'),OG=W('<div class="edit-panel__tabs svelte-1t8cclf"></div>'),bG=W('<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>'),yG=W('<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>'),wG=W('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">No settings for this element</span></div>'),_G=W('<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>'),kG=W('<div class="edit-panel__unknown svelte-1t8cclf"><span class="edit-panel__unknown-label svelte-1t8cclf"> </span> <!></div>'),xG=W('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),SG=W('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),AG=W('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),CG=W('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),TG=W('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">Edit heading text in Settings</span></div>'),PG=W('<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>'),EG=W('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),$G=W('<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>'),QG=W('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),LG=W('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),MG=W("<!> <!> <!>",1),qG=W('<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>'),RG=W('<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),DG=W('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),NG=W('<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>'),IG=W('<div class="edit-panel__body svelte-1t8cclf"><!></div>'),BG=W('<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 jG(t,e){dt(e,!0);let n=xt(e,"aggregated",19,()=>({})),r=xt(e,"initialRuneIndex",3,null),i=ge(()=>WO(e.block)),s=ge(()=>e.block.type==="rune"?e.runeMap.get(e.block.runeName)??null:null),o=ge(()=>g(s)?.category??null),a=J(Ht([])),l=ge(()=>{if(e.block.type!=="rune")return[];const se=e.block;return se.selfClosing||!se.innerContent.trim()?[]:XO(se.innerContent)}),c=ge(()=>g(l).some(se=>se.type==="rune")),u=ge(()=>g(O)?.type==="rune"&&g(b)?g(b):g(s)),f=ge(()=>g(O)?.type==="rune"&&g(O).children?g(O).children:g(l)),d=ge(()=>g(u)?.contentModel!=null),h=ge(()=>g(u)?.contentModel?wU(g(f),g(u).contentModel):null),m=J(null);function p(se,Oe){let _e=0;function Ae(Qe,yt){for(let ct=0;ct<Qe.length;ct++)if(Qe[ct].type==="rune"){if(_e===Oe)return[...yt,ct];_e++;const Ue=Ae(Qe[ct].children??[],[...yt,ct]);if(Ue)return Ue}return null}return Ae(se,[])}hn(()=>{if(r()!=null&&g(l).length>0){const se=p(g(l),r());se&&q(a,se,!0)}});function v(se,Oe){if(Oe.length===0)return null;const[_e,...Ae]=Oe,Qe=se[_e];return Qe?Ae.length===0?Qe:v(Qe.children??[],Ae):null}let O=ge(()=>v(g(l),g(a))),b=ge(()=>g(O)?.runeName?e.runeMap.get(g(O).runeName)??null:null),w=ge(()=>g(O)!=null&&g(O).type!=="rune"),S=ge(()=>g(O)?g(O).type==="rune"?g(O).runeName??g(i):g(O).type:g(i)),_=J("settings"),x=ge(()=>{if(e.block.type!=="rune")return[];const se=e.block,Oe=["settings"];return(g(d)||!g(O)&&g(c))&&Oe.push("structure"),se.selfClosing||Oe.push("content"),Oe});hn(()=>{g(_)==="structure"&&!g(x).includes("structure")&&q(_,"settings")});function C(se){q(a,se,!0);const Oe=v(g(l),se);Oe&&Oe.type!=="rune"&&q(_,"content")}function A(){q(a,[],!0)}function y(se,Oe){q(m,Oe?`${Oe}.${se}`:se,!0)}function k(se){const Oe=e.block;if(g(O)?.type==="rune"&&g(O).innerContent!==void 0){const _e=se(g(O).innerContent);if(_e===g(O).innerContent)return;const Ae=Af(g(O).attributes??{}),Qe=_e.trim(),yt=Qe?`{% ${g(O).runeName}${Ae} %}
577
+ ${Qe}
578
+ {% /${g(O).runeName} %}`:`{% ${g(O).runeName}${Ae} %}
579
+
580
+ {% /${g(O).runeName} %}`,ct=Yu(Oe.innerContent,g(O).source,yt),Ue={...Oe,innerContent:ct,source:""};Ue.source=ir(Ue),e.onupdate(Ue)}else{const _e=se(Oe.innerContent);if(_e===Oe.innerContent)return;const Ae={...Oe,innerContent:_e,source:""};Ae.source=ir(Ae),e.onupdate(Ae)}}function P(se,Oe){g(h)&&k(_e=>Z4(_e,g(h),se,Oe))}function T(se,Oe){g(h)&&k(_e=>F4(_e,g(h),se,Oe))}function E(se,Oe){return g(h)?g(h).type==="sequence"?g(h).fields.find(_e=>_e.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 Q(se){return se.greedy&&se.match!=="any"}function $(se,Oe){if(!g(h))return;const _e=E(se,Oe);_e&&Q(_e)?k(Ae=>Y4(Ae,g(h),se,Oe)):k(Ae=>X4(Ae,g(h),se,Oe))}function L(se,Oe,_e){if(!g(h))return;const Ae=E(se,_e);Ae&&Q(Ae)?k(Qe=>U4(Qe,g(h),se,Oe,_e)):k(Qe=>V4(Qe,g(h),se,Oe,_e))}function N(se,Oe,_e,Ae){if(!g(h))return;const Qe=E(se,Ae);Qe&&Q(Qe)?k(yt=>G4(yt,g(h),se,Oe,_e,Ae)):k(yt=>W4(yt,g(h),se,Oe,_e,Ae))}function Z(se,Oe,_e,Ae){if(!g(h))return;let Qe;if(g(h).type==="sequence"?Qe=g(h).fields.find(jt=>jt.name===se):g(h).type==="delimited"&&_e&&(Qe=g(h).zones.find(en=>en.name===_e)?.fields.find(en=>en.name===se)),!Qe||!Qe.filled)return;const yt=Ae??0;if(yt>=Qe.nodes.length||Ae===void 0&&Qe.nodes.length!==1)return;const ct=Qe.nodes[yt],Ue=ct.source;if(ct.type==="fence"&&e.oneditcode){const jt=ct.fenceCode??"",en=ct.fenceLanguage??"",gt=Ue.split(`
581
+ `)[0],Ut=gt.match(/^(`{3,}|~{3,})/),Bn=Ut?Ut[1]:"```",nr={source:Ue,code:jt,language:en,opener:gt,delimiter:Bn};e.oneditcode(jt,en,Oe,nr);return}if(!e.oneditfield)return;const wt=Ue.trim();let pt="",at=wt;const _t=wt.match(/^(#{1,6}\s+)(.*)/);if(_t)pt=_t[1],at=_t[2];else{const jt=wt.match(/^(>\s*)(.*)/);jt&&(pt=jt[1],at=jt[2])}const xn={dataName:se,text:Si(at),source:Ue,sourcePrefix:pt,inlineSource:at};e.oneditfield(se,at,Oe,xn)}function Y(se,Oe,_e,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(jt=>jt.name===Ae)?.fields.find(jt=>jt.name===se)),!Qe||!Qe.filled||Qe.nodes.length===0)return;const yt=Qe.nodes[0],ct=dh(yt.source);if(Oe<0||Oe>=ct.length)return;const Ue=ct[Oe],wt=Ue.match(/^([-*+]\s+|\d+\.\s+)/),pt=wt?wt[1]:"",at=wt?Ue.slice(pt.length):Ue,_t={dataName:`${se}[${Oe}]`,text:Si(at),source:Ue,sourcePrefix:pt,inlineSource:at};e.oneditfield(`${se}[${Oe}]`,at,_e,_t)}function ne(se,Oe,_e){if(!g(h))return;let Ae;if(g(h).type==="sequence"?Ae=g(h).fields.find(Ue=>Ue.name===se):g(h).type==="delimited"&&_e&&(Ae=g(h).zones.find(wt=>wt.name===_e)?.fields.find(wt=>wt.name===se)),!Ae||Oe<0||Oe>=Ae.nodes.length)return;const Qe=Ae.nodes[Oe];if(Qe.type!=="rune")return;const ct=g(f).findIndex(Ue=>Ue.source===Qe.source);ct!==-1&&(g(O)?.type==="rune"?q(a,[...g(a),ct],!0):q(a,[ct],!0),q(_,"settings"))}function ae(se){const _e={...e.block,text:se,source:""};_e.source=wg(_e),e.onupdate(_e)}function ie(se){const _e={...e.block,level:se,source:""};_e.source=wg(_e),e.onupdate(_e)}function K(se){const _e={...e.block,attributes:se,source:""};_e.source=ir(_e),e.onupdate(_e)}function he(se){const _e={...e.block,innerContent:se,source:""};_e.source=ir(_e),e.onupdate(_e)}function fe(se){if(!g(O)||!g(O).runeName)return;const Oe=g(O).source,_e=Af(se);let Ae;if(g(O).selfClosing)Ae=`{% ${g(O).runeName}${_e} /%}`;else{const Ue=(g(O).innerContent??"").trim();Ae=Ue?`{% ${g(O).runeName}${_e} %}
582
+ ${Ue}
583
+ {% /${g(O).runeName} %}`:`{% ${g(O).runeName}${_e} %}
584
+
585
+ {% /${g(O).runeName} %}`}const Qe=e.block,yt=Yu(Qe.innerContent,Oe,Ae),ct={...Qe,innerContent:yt,source:""};ct.source=ir(ct),e.onupdate(ct)}function j(se){if(!g(O)||!g(O).runeName)return;const Oe=g(O).source,_e=Af(g(O).attributes??{}),Ae=se.trim(),Qe=Ae?`{% ${g(O).runeName}${_e} %}
586
+ ${Ae}
587
+ {% /${g(O).runeName} %}`:`{% ${g(O).runeName}${_e} %}
588
+
589
+ {% /${g(O).runeName} %}`,yt=e.block,ct=Yu(yt.innerContent,Oe,Qe),Ue={...yt,innerContent:ct,source:""};Ue.source=ir(Ue),e.onupdate(Ue)}function U(se){const _e={...e.block,code:se,source:""};_e.source=bd(_e),e.onupdate(_e)}function ue(se){const _e={...e.block,language:se,source:""};_e.source=bd(_e),e.onupdate(_e)}function ke(se){e.onupdate({...e.block,source:se})}function Ce(se){if(!g(O))return;const Oe=e.block,_e=Yu(Oe.innerContent,g(O).source,se),Ae={...Oe,innerContent:_e,source:""};Ae.source=ir(Ae),e.onupdate(Ae)}function ve(se){g(O)&&Ce(`${"#".repeat(se)} ${g(O).headingText??""}`)}function Ee(se){g(O)&&Ce(`${"#".repeat(g(O).headingLevel??1)} ${se}`)}function rt(se){if(!g(O))return;const Oe=g(O).fenceCode??"";Ce(`\`\`\`${se}
590
+ ${Oe}
591
+ \`\`\``)}function Ke(se){if(!g(O))return;const Oe=g(O).fenceLanguage??"";Ce(`\`\`\`${Oe}
592
+ ${se}
593
+ \`\`\``)}function Ye(se){Ce(se)}var Ve=BG(),ze=R(Ve),Bt=R(ze),In=R(Bt),tr=R(In),bt=D(In,2);{var Wt=se=>{var Oe=hG(),_e=R(Oe);ce(()=>Te(_e,g(o))),z(se,Oe)};le(bt,se=>{!g(w)&&g(o)&&se(Wt)})}var mn=D(bt,4);mn.__click=function(...se){e.onremove?.apply(this,se)};var Wn=D(mn,2);Wn.__click=function(...se){e.onclose?.apply(this,se)};var xe=D(Bt,2);{var Yn=se=>{var Oe=OG();Ct(Oe,21,()=>g(x),Yt,(_e,Ae)=>{var Qe=vG();let yt;Qe.__click=()=>q(_,g(Ae),!0);var ct=R(Qe);{var Ue=at=>{var _t=pG();z(at,_t)},wt=at=>{var _t=mG();z(at,_t)},pt=at=>{var _t=gG();z(at,_t)};le(ct,at=>{g(Ae)==="settings"?at(Ue):g(Ae)==="structure"?at(wt,1):g(Ae)==="content"&&at(pt,2)})}ce(()=>yt=je(Qe,1,"edit-panel__tab svelte-1t8cclf",null,yt,{active:g(_)===g(Ae)})),z(_e,Qe)}),z(se,Oe)};le(xe,se=>{e.block.type==="rune"&&g(x).length>1&&se(Yn)})}var Lt=D(ze,2);{var Jt=se=>{const Oe=ge(()=>e.block);var _e=MG(),Ae=tt(_e);{var Qe=pt=>{var at=xG(),_t=R(at);{var xn=gt=>{var Ut=an(),Bn=tt(Ut);{var nr=Mt=>{var F=bG(),Ze=R(F),un=D(R(Ze),2);un.__change=Or=>ve(Number(Or.target.value));var Sn=R(un);Sn.value=Sn.__value="1";var We=D(Sn);We.value=We.__value="2";var vr=D(We);vr.value=vr.__value="3";var qi=D(vr);qi.value=qi.__value="4";var Mn=D(qi);Mn.value=Mn.__value="5";var ns=D(Mn);ns.value=ns.__value="6";var qn;qf(un);var $s=D(Ze,2),rs=D(R($s),2);rs.__input=Or=>Ee(Or.target.value),ce(Or=>{qn!==(qn=Or)&&(un.value=(un.__value=Or)??"",Oc(un,Or)),sn(rs,g(O).headingText??"")},[()=>String(g(O).headingLevel??1)]),z(Mt,F)},gr=Mt=>{var F=yG(),Ze=R(F),un=D(R(Ze),2);un.__input=Sn=>rt(Sn.target.value),ce(()=>sn(un,g(O).fenceLanguage??"")),z(Mt,F)},cn=Mt=>{var F=wG();z(Mt,F)};le(Bn,Mt=>{g(O).type==="heading"?Mt(nr):g(O).type==="fence"?Mt(gr,1):Mt(cn,!1)})}z(gt,Ut)},jt=gt=>{{let Ut=ge(()=>g(O).attributes??{});s_(gt,{get runeInfo(){return g(b)},get attributes(){return g(Ut)},onchange:fe})}},en=gt=>{var Ut=an(),Bn=tt(Ut);{var nr=cn=>{s_(cn,{get runeInfo(){return g(s)},get attributes(){return g(Oe).attributes},onchange:K})},gr=cn=>{var Mt=kG(),F=R(Mt),Ze=R(F),un=D(F,2);Ct(un,17,()=>Object.entries(g(Oe).attributes),Yt,(Sn,We)=>{var vr=ge(()=>Kc(g(We),2));let qi=()=>g(vr)[0],Mn=()=>g(vr)[1];var ns=_G(),qn=R(ns),$s=R(qn),rs=D(qn,2);rs.__input=Or=>{const H={...g(Oe).attributes,[qi()]:Or.target.value};K(H)},ce(()=>{Te($s,qi()),sn(rs,Mn())}),z(Sn,ns)}),ce(()=>Te(Ze,`Unknown rune: ${g(Oe).runeName??""}`)),z(cn,Mt)};le(Bn,cn=>{g(s)?cn(nr):cn(gr,!1)})}z(gt,Ut)};le(_t,gt=>{g(w)&&g(O)?gt(xn):g(O)&&g(b)?gt(jt,1):g(O)||gt(en,2)})}z(pt,at)};le(Ae,pt=>{g(_)==="settings"&&pt(Qe)})}var yt=D(Ae,2);{var ct=pt=>{var at=SG(),_t=R(at);{var xn=en=>{{let gt=ge(()=>g(O)?.runeName??g(Oe).runeName);fG(en,{get structure(){return g(h)},get rootLabel(){return g(gt)},onaddfield:P,onremovefield:T,onappenditem:$,onremovelistitem:L,onreorderlistitem:N,oneditfield:Z,oneditlistitem:Y,onnavigaterune:ne,onfieldselect:y,get selectedField(){return g(m)}})}},jt=en=>{{let gt=ge(()=>g(a).length===0);XP(en,{get nodes(){return g(l)},get activePath(){return g(a)},onselect:C,get rootLabel(){return g(Oe).runeName},onrootclick:A,get isRootActive(){return g(gt)}})}};le(_t,en=>{g(d)&&g(h)?en(xn):!g(O)&&g(c)&&en(jt,1)})}z(pt,at)};le(yt,pt=>{g(_)==="structure"&&pt(ct)})}var Ue=D(yt,2);{var wt=pt=>{var at=LG(),_t=R(at);{var xn=gt=>{var Ut=an(),Bn=tt(Ut);{var nr=F=>{var Ze=AG(),un=R(Ze);{let Sn=ge(()=>g(O).fenceCode??"");_o(un,{get content(){return g(Sn)},onchange:Ke,get language(){return g(O).fenceLanguage},get runes(){return e.runes},aggregated:()=>n()})}z(F,Ze)},gr=F=>{var Ze=CG(),un=R(Ze);_o(un,{get content(){return g(O).source},onchange:Ye,get runes(){return e.runes},aggregated:()=>n()}),z(F,Ze)},cn=F=>{var Ze=TG();z(F,Ze)},Mt=F=>{var Ze=PG(),un=R(Ze),Sn=D(R(un),2);Sn.__input=We=>Ye(We.target.value),ce(We=>{sn(Sn,g(O).source),St(Sn,"rows",We)},[()=>Math.max(4,g(O).source.split(`
594
+ `).length)]),z(F,Ze)};le(Bn,F=>{g(O).type==="fence"?F(nr):g(O).type==="paragraph"?F(gr,1):g(O).type==="heading"?F(cn,2):F(Mt,!1)})}z(gt,Ut)},jt=gt=>{var Ut=an(),Bn=tt(Ut);{var nr=cn=>{var Mt=EG(),F=R(Mt);_o(F,{get content(){return g(O).innerContent},onchange:j,get runes(){return e.runes},aggregated:()=>n()}),z(cn,Mt)},gr=cn=>{var Mt=$G();z(cn,Mt)};le(Bn,cn=>{!g(O).selfClosing&&g(O).innerContent!==void 0?cn(nr):cn(gr,!1)})}z(gt,Ut)},en=gt=>{var Ut=QG(),Bn=R(Ut);_o(Bn,{get content(){return g(Oe).innerContent},onchange:he,get runes(){return e.runes},aggregated:()=>n()}),z(gt,Ut)};le(_t,gt=>{g(w)&&g(O)?gt(xn):g(O)&&g(b)?gt(jt,1):g(O)||gt(en,2)})}z(pt,at)};le(Ue,pt=>{g(_)==="content"&&!g(Oe).selfClosing&&pt(wt)})}z(se,_e)},_n=se=>{var Oe=IG(),_e=R(Oe);{var Ae=Ue=>{const wt=ge(()=>e.block);var pt=qG(),at=R(pt),_t=D(R(at),2);_t.__change=Mt=>ie(Number(Mt.target.value));var xn=R(_t);xn.value=xn.__value="1";var jt=D(xn);jt.value=jt.__value="2";var en=D(jt);en.value=en.__value="3";var gt=D(en);gt.value=gt.__value="4";var Ut=D(gt);Ut.value=Ut.__value="5";var Bn=D(Ut);Bn.value=Bn.__value="6";var nr;qf(_t);var gr=D(at,2),cn=D(R(gr),2);cn.__input=Mt=>ae(Mt.target.value),ce(Mt=>{nr!==(nr=Mt)&&(_t.value=(_t.__value=Mt)??"",Oc(_t,Mt)),sn(cn,g(wt).text)},[()=>String(g(wt).level)]),z(Ue,pt)},Qe=Ue=>{const wt=ge(()=>e.block);var pt=RG(),at=tt(pt),_t=R(at),xn=D(R(_t),2);xn.__input=gt=>ue(gt.target.value);var jt=D(at,2),en=R(jt);_o(en,{get content(){return g(wt).code},onchange:U,get language(){return g(wt).language},get runes(){return e.runes},aggregated:()=>n()}),ce(()=>sn(xn,g(wt).language)),z(Ue,pt)},yt=Ue=>{var wt=DG(),pt=R(wt);_o(pt,{get content(){return e.block.source},onchange:ke,get runes(){return e.runes},aggregated:()=>n()}),z(Ue,wt)},ct=Ue=>{var wt=NG(),pt=R(wt),at=D(R(pt),2);at.__input=_t=>ke(_t.target.value),ce(_t=>{sn(at,e.block.source),St(at,"rows",_t)},[()=>Math.max(4,e.block.source.split(`
595
+ `).length)]),z(Ue,wt)};le(_e,Ue=>{e.block.type==="heading"?Ue(Ae):e.block.type==="fence"?Ue(Qe,1):e.block.type==="paragraph"?Ue(yt,2):Ue(ct,!1)})}z(se,Oe)};le(Lt,se=>{e.block.type==="rune"?se(Jt):se(_n,!1)})}ce(()=>Te(tr,g(S))),z(t,Ve),ht()}Vt(["click","change","input"]);var zG=W('<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>'),ZG=W('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="structure-list svelte-1lv3l5p"></div></div>'),FG=W('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="edit-panel__content-editor svelte-1lv3l5p"><!></div></div>'),XG=W('<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 VG(t,e){dt(e,!0);let n=xt(e,"aggregated",19,()=>({})),r=J("structure");function i($){switch($.type){case"heading":return $.text;case"paragraph":return $.source.length>60?$.source.slice(0,60)+"...":$.source;case"fence":{const L=$,N=L.language?`${L.language}: `:"",Z=L.code.split(`
596
+ `)[0]??"";return N+(Z.length>50?Z.slice(0,50)+"...":Z)}case"list":return $.source.split(`
597
+ `)[0]??"";case"quote":return $.source.replace(/^>\s*/gm,"").split(`
598
+ `)[0]??"";case"hr":return"---";case"image":return $.source;default:return $.source.split(`
599
+ `)[0]??""}}function s($){switch($.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=J(null),a=J(null);function l($,L){q(o,L,!0),$.dataTransfer&&($.dataTransfer.effectAllowed="move",$.dataTransfer.setData("text/plain",String(L)))}function c($,L){$.preventDefault(),$.dataTransfer&&($.dataTransfer.dropEffect="move"),q(a,L,!0)}function u($,L){$.preventDefault(),g(o)!==null&&g(o)!==L&&d(g(o),L),q(o,null),q(a,null)}function f(){q(o,null),q(a,null)}function d($,L){const N=[...e.block.children],[Z]=N.splice($,1);N.splice(L,0,Z);const Y=yg(N);e.onupdate({...e.block,children:N,source:Y})}function h($){const L=e.block.children.filter((Z,Y)=>Y!==$);if(L.length===0){e.onremove();return}const N=yg(L);e.onupdate({...e.block,children:L,source:N})}function m($){if(!$.trim()){e.onremove();return}const L=dC($);e.onupdate({...e.block,children:L,source:$})}var p=XG(),v=R(p),O=R(v),b=D(R(O),2),w=R(b),S=D(b,4);S.__click=function(...$){e.onremove?.apply(this,$)};var _=D(S,2);_.__click=function(...$){e.onclose?.apply(this,$)};var x=D(O,2),C=R(x);let A;C.__click=()=>q(r,"structure");var y=D(C,2);let k;y.__click=()=>q(r,"content");var P=D(v,2);{var T=$=>{var L=ZG(),N=R(L);Ct(N,23,()=>e.block.children,Z=>Z.id,(Z,Y,ne)=>{var ae=zG();let ie;var K=D(R(ae),2),he=R(K),fe=R(he);J_(fe,()=>s(g(Y)),!0);var j=D(K,2),U=R(j),ue=R(U),ke=D(U,2),Ce=R(ke),ve=D(j,2);ve.__click=()=>h(g(ne)),ce((Ee,rt)=>{ie=je(ae,1,"structure-item svelte-1lv3l5p",null,ie,{"drag-source":g(o)===g(ne),"drag-over":g(a)===g(ne)&&g(o)!==g(ne)}),Te(ue,Ee),Te(Ce,rt)},[()=>WO(g(Y)),()=>i(g(Y))]),st("dragstart",ae,Ee=>l(Ee,g(ne))),st("dragover",ae,Ee=>c(Ee,g(ne))),st("drop",ae,Ee=>u(Ee,g(ne))),st("dragend",ae,f),z(Z,ae)}),z($,L)};le(P,$=>{g(r)==="structure"&&$(T)})}var E=D(P,2);{var Q=$=>{var L=FG(),N=R(L),Z=R(N);_o(Z,{get content(){return e.block.source},onchange:m,get runes(){return e.runes},aggregated:()=>n()}),z($,L)};le(E,$=>{g(r)==="content"&&$(Q)})}ce(()=>{Te(w,`${e.block.children.length??""} block${e.block.children.length!==1?"s":""}`),A=je(C,1,"edit-panel__tab svelte-1lv3l5p",null,A,{active:g(r)==="structure"}),k=je(y,1,"edit-panel__tab svelte-1lv3l5p",null,k,{active:g(r)==="content"})}),z(t,p),ht()}Vt(["click"]);var WG=W('<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>'),YG=W('<div class="edit-panel__custom-section svelte-1wxsk8w"><span class="edit-panel__section-label svelte-1wxsk8w">Custom fields</span> <!></div>'),UG=W('<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 GG(t,e){dt(e,!0);const n=new Set(["title","description","tags","draft","order","date","author","slug"]);let r=J(""),i=ge(()=>Object.entries(X.frontmatter).filter(([K])=>!n.has(K)));function s(K,he){X.updateFrontmatterField(K,he)}function o(){const K=g(r).trim();!K||K in X.frontmatter||(X.updateFrontmatterField(K,""),q(r,""))}function a(K){X.updateFrontmatterField(K,void 0)}var l=UG(),c=R(l),u=D(R(c),4);u.__click=function(...K){e.onclose?.apply(this,K)};var f=D(c,2),d=R(f),h=R(d),m=D(R(h),2);m.__input=K=>s("title",K.target.value);var p=D(h,2),v=D(R(p),2);v.__input=K=>s("description",K.target.value),St(v,"rows",2);var O=D(p,2),b=D(R(O),2);b.__input=K=>s("slug",K.target.value);var w=D(O,2),S=R(w),_=D(R(S),2);_.__input=K=>s("author",K.target.value);var x=D(S,2),C=D(R(x),2);C.__input=K=>s("date",K.target.value);var A=D(w,2),y=R(A),k=D(R(y),2);k.__input=K=>{const he=K.target.value;s("order",he===""?void 0:Number(he))};var P=D(y,2),T=D(R(P),2);let E;T.__click=()=>s("draft",X.frontmatter.draft===!0?void 0:!0),T.__keydown=K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),s("draft",X.frontmatter.draft===!0?void 0:!0))};var Q=D(R(T),2),$=R(Q),L=D(A,2),N=D(R(L),2);{let K=ge(()=>X.frontmatter.tags??[]);Jk(N,{get tags(){return g(K)},onchange:he=>s("tags",he)})}var Z=D(L,2);{var Y=K=>{var he=YG(),fe=D(R(he),2);Ct(fe,17,()=>g(i),Yt,(j,U)=>{var ue=ge(()=>Kc(g(U),2));let ke=()=>g(ue)[0],Ce=()=>g(ue)[1];var ve=WG(),Ee=R(ve),rt=R(Ee),Ke=D(Ee,2),Ye=R(Ke);Ye.__input=ze=>s(ke(),ze.target.value);var Ve=D(Ye,2);Ve.__click=()=>a(ke()),ce(ze=>{Te(rt,ke()),sn(Ye,ze),St(Ve,"aria-label",`Remove ${ke()??""}`)},[()=>String(Ce()??"")]),z(j,ve)}),z(K,he)};le(Z,K=>{g(i).length>0&&K(Y)})}var ne=D(Z,2),ae=R(ne);ae.__keydown=K=>{K.key==="Enter"&&(K.preventDefault(),o())};var ie=D(ae,2);ie.__click=o,ce(K=>{sn(m,X.frontmatter.title??""),sn(v,X.frontmatter.description??""),sn(b,X.frontmatter.slug??""),sn(_,X.frontmatter.author??""),sn(C,X.frontmatter.date??""),sn(k,X.frontmatter.order??""),E=je(T,1,"fm-toggle svelte-1wxsk8w",null,E,{active:X.frontmatter.draft===!0}),St(T,"aria-checked",X.frontmatter.draft===!0),Te($,X.frontmatter.draft===!0?"Draft":"Published"),ie.disabled=K},[()=>!g(r).trim()]),Qn(ae,()=>g(r),K=>q(r,K)),z(t,l),ht()}Vt(["click","input","keydown"]);var HG=W('<button type="button"> </button>'),KG=W('<div class="insert-dialog__tabs svelte-gvk8wi"></div>'),JG=W('<div class="insert-dialog__empty svelte-gvk8wi"> </div>'),eH=W('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),tH=W('<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>'),nH=W('<div class="insert-dialog__grid svelte-gvk8wi"></div>'),rH=W('<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>'),iH=W('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),sH=W('<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>'),oH=W('<div class="insert-dialog__grid svelte-gvk8wi"><!> <!></div>'),aH=W('<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 lH(t,e){dt(e,!0);const n=["Content","Section","Layout","Code & Data","Semantic","Design","Site"];let r=J("Content"),i=J(""),s,o,a=ge(()=>{const y=new Set(e.runesByCategory.keys()),k=n.filter(P=>y.has(P));for(const P of y)k.includes(P)||k.push(P);return k}),l=ge(()=>{if(!g(i).trim())return null;const y=g(i).toLowerCase();return e.runes.filter(k=>k.name.toLowerCase().includes(y)||k.description&&k.description.toLowerCase().includes(y))});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"}];hn(()=>{s?.showModal(),o?.focus()});function u(y){y.target===s&&e.onclose()}function f(y){e.oninsert(y)}function d(y){e.oninsert("rune",y)}var h=aH();h.__click=u,h.__keydown=y=>{y.key==="Escape"&&(y.preventDefault(),e.onclose())};var m=R(h),p=R(m),v=D(R(p),2),O=D(R(v),2);ln(O,y=>o=y,()=>o);var b=D(v,2);b.__click=function(...y){e.onclose?.apply(this,y)};var w=D(p,2);{var S=y=>{var k=KG();Ct(k,21,()=>g(a),Yt,(P,T)=>{var E=HG();let Q;E.__click=()=>q(r,g(T),!0);var $=R(E);ce(()=>{Q=je(E,1,"insert-dialog__tab svelte-gvk8wi",null,Q,{active:g(r)===g(T)}),Te($,g(T))}),z(P,E)}),z(y,k)};le(w,y=>{g(l)||y(S)})}var _=D(w,2),x=R(_);{var C=y=>{var k=an(),P=tt(k);{var T=Q=>{var $=JG(),L=R($);ce(()=>Te(L,`No blocks match "${g(i)??""}"`)),z(Q,$)},E=Q=>{var $=nH();Ct($,21,()=>g(l),Yt,(L,N)=>{var Z=tH();Z.__click=()=>d(g(N).name);var Y=D(R(Z),2),ne=R(Y),ae=R(ne),ie=D(ne,2);{var K=he=>{var fe=eH(),j=R(fe);ce(()=>Te(j,g(N).description)),z(he,fe)};le(ie,he=>{g(N).description&&he(K)})}ce(()=>Te(ae,g(N).name)),z(L,Z)}),z(Q,$)};le(P,Q=>{g(l).length===0?Q(T):Q(E,!1)})}z(y,k)},A=y=>{var k=oH(),P=R(k);{var T=Q=>{var $=an(),L=tt($);Ct(L,17,()=>c,Yt,(N,Z)=>{var Y=rH();Y.__click=()=>f(g(Z).type);var ne=R(Y),ae=R(ne),ie=D(ne,2),K=R(ie),he=R(K),fe=D(K,2),j=R(fe);ce(()=>{St(ae,"d",g(Z).icon),Te(he,g(Z).name),Te(j,g(Z).description)}),z(N,Y)}),z(Q,$)};le(P,Q=>{g(r)==="Content"&&Q(T)})}var E=D(P,2);Ct(E,17,()=>e.runesByCategory.get(g(r))??[],Yt,(Q,$)=>{var L=sH();L.__click=()=>d(g($).name);var N=D(R(L),2),Z=R(N),Y=R(Z),ne=D(Z,2);{var ae=ie=>{var K=iH(),he=R(K);ce(()=>Te(he,g($).description)),z(ie,K)};le(ne,ie=>{g($).description&&ie(ae)})}ce(()=>Te(Y,g($).name)),z(Q,L)}),z(y,k)};le(x,y=>{g(l)?y(C):y(A,!1)})}ln(h,y=>s=y,()=>s),st("close",h,function(...y){e.onclose?.apply(this,y)}),Qn(O,()=>g(i),y=>q(i,y)),z(t,h),ht()}Vt(["click","keydown"]);var cH=W('<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>'),uH=W('<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 o_(t,e){dt(e,!0);let n,r,i=J(0),s=J(0),o=J(!0),a=J(null),l=J(void 0),c;ao(()=>{r.innerHTML=qz(e.inlineSource);const j=n.getBoundingClientRect(),U=j.width,ue=j.height,ke=8;let Ce=e.anchorRect.left+e.anchorRect.width/2-U/2;Ce<ke&&(Ce=ke),Ce+U>window.innerWidth-ke&&(Ce=window.innerWidth-U-ke),q(i,Ce,!0);const ve=e.anchorRect.top-ue-ke;ve>=ke?(q(s,ve),q(o,!0)):(q(s,e.anchorRect.bottom+ke),q(o,!1)),r.focus();const Ee=window.getSelection();if(Ee&&r.childNodes.length>0){const Ye=document.createRange();Ye.selectNodeContents(r),Ye.collapse(!1),Ee.removeAllRanges(),Ee.addRange(Ye)}function rt(Ye){n&&!n.contains(Ye.target)&&e.onclose()}function Ke(Ye){Ye.key==="Escape"&&(g(a)?q(a,null):e.onclose())}return requestAnimationFrame(()=>{document.addEventListener("mousedown",rt)}),document.addEventListener("keydown",Ke),()=>{document.removeEventListener("mousedown",rt),document.removeEventListener("keydown",Ke),clearTimeout(c)}});function u(){clearTimeout(c),c=setTimeout(()=>{D0(r);const j=Dz(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 U=j.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,U)}function h(j){const ue=j.target.closest("a");ue&&r.contains(ue)&&(j.preventDefault(),v(ue))}function m(j){r.focus();const U=window.getSelection();if(!(!U||U.rangeCount===0)){if(j==="code"){const ue=U.getRangeAt(0);if(ue.collapsed)return;const ke=A(ue.commonAncestorContainer,"CODE",r);if(ke){const Ce=document.createTextNode(ke.textContent??"");ke.replaceWith(Ce);const ve=document.createRange();ve.selectNode(Ce),U.removeAllRanges(),U.addRange(ve)}else{const Ce=document.createElement("code");Ce.textContent=ue.toString(),ue.deleteContents(),ue.insertNode(Ce);const ve=document.createRange();ve.selectNodeContents(Ce),U.removeAllRanges(),U.addRange(ve)}}else{const ue=j==="bold"?"bold":"italic";document.execCommand(ue,!1)}D0(r),u()}}function p(){const j=window.getSelection();if(!j||j.rangeCount===0)return;const U=j.getRangeAt(0),ue=A(U.commonAncestorContainer,"A",r);if(ue){v(ue);return}if(U.collapsed)return;const ke=U.toString(),Ce=document.createElement("a");Ce.href="",Ce.textContent=ke,U.deleteContents(),U.insertNode(Ce),v(Ce)}function v(j){q(a,{anchorEl:j,href:j.getAttribute("href")??"",text:j.textContent??"",rect:j.getBoundingClientRect()},!0),requestAnimationFrame(()=>{g(l)?.focus(),g(l)?.select()})}function O(){g(a)&&(g(a).anchorEl.href=g(a).href,g(a).anchorEl.textContent=g(a).text,q(a,null),r.focus(),u())}function b(){if(!g(a))return;const j=document.createTextNode(g(a).anchorEl.textContent??"");g(a).anchorEl.replaceWith(j),q(a,null),r.focus(),u()}function w(j){j.key==="Enter"&&(j.preventDefault(),O())}let S=J(!1),_=J(!1),x=J(!1);function C(){q(S,document.queryCommandState("bold"),!0),q(_,document.queryCommandState("italic"),!0);const j=window.getSelection();j&&j.rangeCount>0?q(x,!!A(j.getRangeAt(0).commonAncestorContainer,"CODE",r)):q(x,!1)}function A(j,U,ue){let ke=j;for(;ke&&ke!==ue;){if(ke.nodeType===globalThis.Node.ELEMENT_NODE&&ke.tagName===U)return ke;ke=ke.parentNode}return null}var y=uH();let k;var P=R(y),T=R(P),E=R(T),Q=D(T,2);Q.__click=function(...j){e.onclose?.apply(this,j)};var $=D(P,2),L=R($);let N;L.__click=()=>m("bold");var Z=D(L,2);let Y;Z.__click=()=>m("italic");var ne=D(Z,2);let ae;ne.__click=()=>m("code");var ie=D(ne,2);ie.__click=p;var K=D($,2);K.__input=u,K.__keydown=f,K.__keyup=C,K.__mouseup=C,K.__click=h,ln(K,j=>r=j,()=>r);var he=D(K,2);{var fe=j=>{var U=cH(),ue=R(U),ke=D(R(ue),2);ke.__keydown=w;var Ce=D(ue,2),ve=D(R(Ce),2);ve.__keydown=w,ln(ve,Ye=>q(l,Ye),()=>g(l));var Ee=D(Ce,2),rt=R(Ee);rt.__click=O;var Ke=D(rt,2);Ke.__click=b,Qn(ke,()=>g(a).text,Ye=>g(a).text=Ye),Qn(ve,()=>g(a).href,Ye=>g(a).href=Ye),z(j,U)};le(he,j=>{g(a)&&j(fe)})}ln(y,j=>n=j,()=>n),ce(()=>{k=je(y,1,"inline-edit-popover svelte-1c50n5q",null,k,{above:g(o),below:!g(o)}),$r(y,`left: ${g(i)??""}px; top: ${g(s)??""}px`),Te(E,e.dataName),N=je(L,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,N,{active:g(S)}),Y=je(Z,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,Y,{active:g(_)}),ae=je(ne,1,"inline-edit-popover__tool-btn inline-edit-popover__tool-btn--code svelte-1c50n5q",null,ae,{active:g(x)})}),st("paste",K,d),z(t,y),ht()}Vt(["click","input","keydown","keyup","mouseup"]);var fH=W('<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 dH(t,e){dt(e,!0);let n,r,i=J(0),s=J(0),o=J(!0),a=J(Ht(e.text)),l=J(Ht(e.href));ao(()=>{const x=n.getBoundingClientRect(),C=x.width,A=x.height,y=8;let k=e.anchorRect.left+e.anchorRect.width/2-C/2;k<y&&(k=y),k+C>window.innerWidth-y&&(k=window.innerWidth-C-y),q(i,k,!0);const P=e.anchorRect.top-A-y;P>=y?(q(s,P),q(o,!0)):(q(s,e.anchorRect.bottom+y),q(o,!1)),r?.focus(),r?.select();function T(Q){n&&!n.contains(Q.target)&&c()}function E(Q){Q.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",T)}),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",E)}});function c(){(g(a)!==e.text||g(l)!==e.href)&&e.onchange(g(a),g(l)),e.onclose()}function u(x){x.key==="Enter"&&(x.preventDefault(),c())}var f=fH();let d;var h=R(f),m=D(R(h),2);m.__click=function(...x){e.onclose?.apply(this,x)};var p=D(h,2),v=D(R(p),2);v.__keydown=u,ln(v,x=>r=x,()=>r);var O=D(p,2),b=D(R(O),2);b.__keydown=u;var w=D(O,2),S=R(w);S.__click=c;var _=D(S,2);_.__click=function(...x){e.onremove?.apply(this,x)},ln(f,x=>n=x,()=>n),ce(()=>{d=je(f,1,"action-edit-popover svelte-15w9shn",null,d,{above:g(o),below:!g(o)}),$r(f,`left: ${g(i)??""}px; top: ${g(s)??""}px`)}),Qn(v,()=>g(a),x=>q(a,x)),Qn(b,()=>g(l),x=>q(l,x)),z(t,f),ht()}Vt(["click","keydown"]);var hH=W("<option> </option>"),pH=W('<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 mH(t,e){dt(e,!0);const n=["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=J(void 0),o=J(0),a=J(0),l=J(!0),c=J(Ht(e.code)),u=J(Ht(e.language));const f=new ws,d=new ws,h=kl.define([{tag:I.keyword,color:"#8839ef"},{tag:[I.atom,I.bool],color:"#fe640b"},{tag:I.number,color:"#fe640b"},{tag:[I.string,I.special(I.string)],color:"#40a02b"},{tag:[I.regexp,I.escape],color:"#ea76cb"},{tag:I.definition(I.variableName),color:"#1e66f5"},{tag:I.local(I.variableName),color:"#1e66f5"},{tag:I.variableName,color:"#4c4f69"},{tag:I.definition(I.propertyName),color:"#1e66f5"},{tag:I.propertyName,color:"#1e66f5"},{tag:[I.typeName,I.className,I.namespace],color:"#df8e1d"},{tag:[I.macroName,I.labelName],color:"#d20f39"},{tag:I.function(I.variableName),color:"#1e66f5"},{tag:I.operator,color:"#04a5e5"},{tag:I.punctuation,color:"#7c7f93"},{tag:I.comment,color:"#9ca0b0",fontStyle:"italic"},{tag:I.lineComment,color:"#9ca0b0",fontStyle:"italic"},{tag:I.blockComment,color:"#9ca0b0",fontStyle:"italic"},{tag:I.meta,color:"#7c7f93"},{tag:I.link,color:"#1e66f5",textDecoration:"underline"},{tag:I.url,color:"#1e66f5"},{tag:I.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=ge(()=>n.includes(g(u))||!g(u)?n:[g(u),...n]);function v(){if(!r)return;const N=r.getBoundingClientRect(),Z=N.width,Y=N.height,ne=8;let ae=e.anchorRect.left+e.anchorRect.width/2-Z/2;ae<ne&&(ae=ne),ae+Z>window.innerWidth-ne&&(ae=window.innerWidth-Z-ne),q(o,ae,!0);const ie=e.anchorRect.top-Y-ne;ie>=ne?(q(a,ie),q(l,!0)):(q(a,e.anchorRect.bottom+ne),q(l,!1))}ao(()=>{v();function N(Y){r&&!r.contains(Y.target)&&b()}function Z(Y){Y.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",N)}),document.addEventListener("keydown",Z),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",Z)}}),hn(()=>{if(!i)return;const N=Pt.create({doc:Er(()=>g(c)),extensions:[f.of(cl()),d.of(Er(()=>g(u))==="markdoc"?jc():[]),pO(),m,Ec(h),Ec(qx,{fallback:!0}),na.of([...vO,...mO,vD,{key:"Mod-Enter",run:()=>(b(),!0)},{key:"Escape",run:()=>(e.onclose(),!0)}]),Pe.updateListener.of(Y=>{Y.docChanged&&q(c,Y.state.doc.toString(),!0)}),Pe.lineWrapping]}),Z=new Pe({state:N,parent:i});return q(s,Z,!0),Z.focus(),O(Z,Er(()=>g(u))),requestAnimationFrame(()=>v()),()=>{q(s,void 0),Z.destroy()}});function O(N,Z){const Y=Z?.trim();if(!Y)return;if(Y==="markdoc"){N.dispatch({effects:[f.reconfigure(cl()),d.reconfigure(jc())]});return}N.dispatch({effects:d.reconfigure([])});const ne=ee.matchLanguageName(VP,Y,!0);ne&&ne.load().then(ae=>{N.dispatch({effects:f.reconfigure(ae)})}).catch(console.error)}function b(){g(c)!==e.code&&e.onchange(g(c)),e.onclose()}function w(N){const Z=N.target;q(u,Z.value,!0),e.onlanguagechange(g(u)),g(s)&&O(g(s),g(u))}var S=pH();let _;var x=R(S),C=D(R(x),2);C.__click=function(...N){e.onclose?.apply(this,N)};var A=D(x,2),y=R(A);y.__change=w;var k=R(y);k.value=k.__value="";var P=D(k);Ct(P,17,()=>g(p),Yt,(N,Z)=>{var Y=hH(),ne=R(Y),ae={};ce(()=>{Te(ne,g(Z)),ae!==(ae=g(Z))&&(Y.value=(Y.__value=g(Z))??"")}),z(N,Y)});var T;qf(y);var E=D(A,2);ln(E,N=>i=N,()=>i);var Q=D(E,2),$=R(Q);$.__click=b;var L=D($,2);L.__click=function(...N){e.onremove?.apply(this,N)},ln(S,N=>r=N,()=>r),ce(()=>{_=je(S,1,"code-edit-popover svelte-rmoejq",null,_,{above:g(l),below:!g(l)}),$r(S,`left: ${g(o)??""}px; top: ${g(a)??""}px`),T!==(T=g(u))&&(y.value=(y.__value=g(u))??"",Oc(y,g(u)))}),z(t,S),ht()}Vt(["click","change"]);const Nn="";async function a_(){const t=await fetch(`${Nn}/api/tree`);if(!t.ok)throw new Error(`Failed to load tree: ${t.status}`);return t.json()}async function rm(t){const e=await fetch(`${Nn}/api/files/${encodeURIComponent(t)}`);if(!e.ok)throw new Error(`Failed to load file: ${e.status}`);return e.json()}async function gH(t,e){const n=await fetch(`${Nn}/api/files/${encodeURIComponent(t)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})});if(!n.ok)throw new Error(`Failed to save file: ${n.status}`)}async function vH(t,e){const n=await fetch(`${Nn}/api/preview`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t,content:e})});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.text()}async function OH(t,e){const n=await fetch(`${Nn}/api/preview-data`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t,content:e})});if(!n.ok)throw new Error(`Preview data failed: ${n.status}`);return n.json()}async function bH(){const t=await fetch(`${Nn}/api/config`);if(!t.ok)throw new Error(`Config failed: ${t.status}`);return t.json()}async function yH(){const t=await fetch(`${Nn}/api/route-rules`);if(!t.ok)throw new Error(`Failed to load route rules: ${t.status}`);return(await t.json()).routeRules}async function wH(t){const e=await fetch(`${Nn}/api/route-rules`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({routeRules:t})});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to update route rules: ${e.status}`)}}async function _H(t){const e=await fetch(`${Nn}/api/pages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to create page: ${e.status}`)}return e.json()}async function l_(t){const e=await fetch(`${Nn}/api/directories`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to create directory: ${e.status}`)}return e.json()}async function kH(t,e){const n=await fetch(`${Nn}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:t,newName:e})});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error??`Failed to rename: ${n.status}`)}return n.json()}async function xH(t){const e=await fetch(`${Nn}/api/duplicate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to duplicate: ${e.status}`)}return e.json()}async function SH(t){const e=await fetch(`${Nn}/api/files/${encodeURIComponent(t)}`,{method:"DELETE"});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to delete: ${e.status}`)}}async function AH(t){const e=await fetch(`${Nn}/api/toggle-draft`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to toggle draft: ${e.status}`)}return e.json()}async function CH(){const t=await fetch(`${Nn}/api/assets`);if(!t.ok)throw new Error(`Failed to load assets: ${t.status}`);return(await t.json()).images}async function TH(t){const e=new FormData;e.append("file",t);const n=await fetch(`${Nn}/api/assets/upload`,{method:"POST",body:e});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error??`Upload failed: ${n.status}`)}return n.json()}async function PH(){const t=await fetch(`${Nn}/api/runes`);if(!t.ok)throw new Error(`Failed to load runes: ${t.status}`);return(await t.json()).runes}async function EH(){const t=await fetch(`${Nn}/api/aggregated`);return t.ok?t.json():{}}function $H(t){const e=new EventSource(`${Nn}/api/events`);return e.addEventListener("file-changed",n=>t("file-changed",JSON.parse(n.data))),e.addEventListener("file-created",n=>t("file-created",JSON.parse(n.data))),e.addEventListener("file-deleted",n=>t("file-deleted",JSON.parse(n.data))),()=>e.close()}var QH=W('<div class="image-edit-modal__empty svelte-1yd8alm">Loading images...</div>'),LH=W('<div class="image-edit-modal__empty svelte-1yd8alm">No images found. Upload one to get started.</div>'),MH=W('<div class="image-edit-modal__empty svelte-1yd8alm"> </div>'),qH=W('<button><img loading="lazy" class="svelte-1yd8alm"/></button>'),RH=W('<div class="image-edit-modal__grid svelte-1yd8alm"></div>'),DH=W('<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 NH(t,e){dt(e,!0);let n,r,i,s=J(Ht([])),o=J(!0),a=J(!1),l=J(""),c=J(Ht(e.currentSrc)),u=J(Ht(e.currentAlt)),f=J(!1);const d=ge(()=>g(l)?g(s).filter(ve=>ve.name.toLowerCase().includes(g(l).toLowerCase())):g(s));ao(()=>{h();function ve(Ee){Ee.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",ve),()=>document.removeEventListener("keydown",ve)});async function h(){q(o,!0);try{q(s,await CH(),!0)}catch{q(s,[],!0)}q(o,!1)}function m(ve){ve.target===ve.currentTarget&&e.onclose()}function p(ve){if(q(c,ve.path,!0),!g(u)){const Ee=ve.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");q(u,Ee,!0)}}function v(){g(c)&&e.onchange(g(c),g(u))}function O(){r?.click()}async function b(ve){const Ee=ve.target,rt=Ee.files?.[0];rt&&(await w(rt),Ee.value="")}async function w(ve){if(ve.type.startsWith("image/")){q(a,!0);try{const Ee=await TH(ve);if(await h(),q(c,Ee.path,!0),!g(u)){const rt=Ee.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");q(u,rt,!0)}}catch(Ee){console.error("Upload failed:",Ee)}q(a,!1)}}function S(ve){ve.preventDefault(),q(f,!0)}function _(){q(f,!1)}async function x(ve){ve.preventDefault(),q(f,!1);const Ee=ve.dataTransfer?.files[0];Ee&&await w(Ee)}function C(ve){ve.key==="Enter"&&(ve.preventDefault(),v())}var A=DH();A.__click=m,A.__keydown=()=>{};var y=R(A);let k;var P=R(y),T=D(R(P),2);T.__click=function(...ve){e.onclose?.apply(this,ve)};var E=D(P,2),Q=R(E),$=D(E,2),L=R($);{var N=ve=>{var Ee=QH();z(ve,Ee)},Z=ve=>{var Ee=LH();z(ve,Ee)},Y=ve=>{var Ee=MH(),rt=R(Ee);ce(()=>Te(rt,`No images match "${g(l)??""}"`)),z(ve,Ee)},ne=ve=>{var Ee=RH();Ct(Ee,21,()=>g(d),rt=>rt.path,(rt,Ke)=>{var Ye=qH();let Ve;Ye.__click=()=>p(g(Ke));var ze=R(Ye);ce(()=>{Ve=je(Ye,1,"image-edit-modal__thumb svelte-1yd8alm",null,Ve,{selected:g(c)===g(Ke).path}),St(Ye,"title",g(Ke).name),St(ze,"src",g(Ke).path),St(ze,"alt",g(Ke).name)}),z(rt,Ye)}),z(ve,Ee)};le(L,ve=>{g(o)?ve(N):g(d).length===0&&!g(l)?ve(Z,1):g(d).length===0?ve(Y,2):ve(ne,!1)})}var ae=D($,2),ie=R(ae);ie.__click=O;var K=R(ie),he=D(ie,4);he.__change=b,ln(he,ve=>r=ve,()=>r);var fe=D(ae,2),j=R(fe),U=D(R(j),2);U.__keydown=C,ln(U,ve=>i=ve,()=>i);var ue=D(j,2),ke=R(ue);ke.__click=v;var Ce=D(ke,2);Ce.__click=function(...ve){e.onremove?.apply(this,ve)},ln(y,ve=>n=ve,()=>n),ce(()=>{k=je(y,1,"image-edit-modal svelte-1yd8alm",null,k,{"drag-over":g(f)}),ie.disabled=g(a),Te(K,g(a)?"Uploading...":"Upload image"),ke.disabled=!g(c)}),st("dragover",y,S),st("dragleave",y,_),st("drop",y,x),Qn(Q,()=>g(l),ve=>q(l,ve)),Qn(U,()=>g(u),ve=>q(u,ve)),z(t,A),ht()}Vt(["click","keydown","change"]);var IH=W('<div class="icon-picker-modal__empty svelte-1rc2pkk">No icons available.</div>'),BH=W('<div class="icon-picker-modal__empty svelte-1rc2pkk"> </div>'),jH=W('<button><span class="icon-picker-modal__icon-svg svelte-1rc2pkk"><!></span> <span class="icon-picker-modal__icon-name svelte-1rc2pkk"> </span></button>'),zH=W('<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>'),ZH=W('<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 FH(t,e){dt(e,!0);let n,r=J(Ht(e.currentIcon)),i=J("");const s=ge(()=>{const y=[];for(const[k,P]of Object.entries(e.icons))for(const[T,E]of Object.entries(P)){const Q=k==="global"?T:`${k}/${T}`;y.push({name:T,qualifiedName:Q,group:k,svg:E})}return y}),o=ge(()=>g(i)?g(s).filter(y=>y.name.toLowerCase().includes(g(i).toLowerCase())||y.qualifiedName.toLowerCase().includes(g(i).toLowerCase())):g(s)),a=ge(()=>{const y=new Map;for(const k of g(o)){const P=y.get(k.group)??[];P.push(k),y.set(k.group,P)}return y});ao(()=>{n?.focus();function y(k){k.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)});function l(y){y.target===y.currentTarget&&e.onclose()}function c(y){q(r,y.qualifiedName,!0)}function u(){g(r)&&e.onchange(g(r))}var f=ZH();f.__click=l,f.__keydown=()=>{};var d=R(f),h=R(d),m=D(R(h),2);m.__click=function(...y){e.onclose?.apply(this,y)};var p=D(h,2),v=R(p);ln(v,y=>n=y,()=>n);var O=D(p,2),b=R(O);{var w=y=>{var k=IH();z(y,k)},S=y=>{var k=BH(),P=R(k);ce(()=>Te(P,`No icons match "${g(i)??""}"`)),z(y,k)},_=y=>{var k=an(),P=tt(k);Ct(P,17,()=>[...g(a)],([T,E])=>T,(T,E)=>{var Q=ge(()=>Kc(g(E),2));let $=()=>g(Q)[0],L=()=>g(Q)[1];var N=zH(),Z=R(N),Y=R(Z),ne=D(Z,2);Ct(ne,21,L,ae=>ae.qualifiedName,(ae,ie)=>{var K=jH();let he;K.__click=()=>c(g(ie));var fe=R(K),j=R(fe);J_(j,()=>g(ie).svg);var U=D(fe,2),ue=R(U);ce(()=>{he=je(K,1,"icon-picker-modal__icon svelte-1rc2pkk",null,he,{selected:g(r)===g(ie).qualifiedName}),St(K,"title",g(ie).qualifiedName),Te(ue,g(ie).name)}),z(ae,K)}),ce(()=>Te(Y,$())),z(T,N)}),z(y,k)};le(b,y=>{g(s).length===0?y(w):g(o).length===0?y(S,1):y(_,!1)})}var x=D(O,2),C=R(x);C.__click=u;var A=D(C,2);A.__click=function(...y){e.onclose?.apply(this,y)},ce(()=>C.disabled=!g(r)),Qn(v,()=>g(i),y=>q(i,y)),z(t,f),ht()}Vt(["click","keydown"]);var XH=W('<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>'),VH=W('<span class="block-editor__fm-desc svelte-10brcoc"> </span>'),WH=W('<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>'),YH=W('<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),UH=W('<button class="block-editor__hover-label svelte-10brcoc"> </button>'),GH=W('<div><div class="block-editor__block-cell svelte-10brcoc"><!></div> <!> <!></div>'),HH=W('<div class="block-editor__popover-backdrop svelte-10brcoc"></div> <div class="block-editor__popover svelte-10brcoc"><!></div>',1),KH=W('<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 JH(t,e){dt(e,!0);let n=xt(e,"highlightCss",3,""),r=xt(e,"highlightTransform",3,null),i=xt(e,"showInsertMenu",3,!0),s=xt(e,"frontmatter",19,()=>({})),o=xt(e,"readOnly",3,!1),a=xt(e,"communityTags",3,null),l=xt(e,"communityPostTransforms",3,null),c=xt(e,"communityStyles",3,null),u=xt(e,"aggregated",19,()=>({})),f=J(Ht([])),d=ge(()=>K4(e.runes)),h="";function m(H,te){if(H.length===0)return;const de=new Set(H.map(He=>He.id)),ye=new Set(te.map(He=>He.id)),$e=H.filter(He=>!ye.has(He.id)),Je=te.filter(He=>!de.has(He.id));if($e.length===0||Je.length===0)return;const Ge=[...$e];for(const He of Je){let it=-1,qt=1/0;for(let lt=0;lt<Ge.length;lt++){const Pn=Ge[lt],fn=Pn.type===He.type?0:1e3,ut=Math.abs(Pn.startLine-He.startLine)+fn;ut<qt&&(qt=ut,it=lt)}it>=0&&(He.id=Ge[it].id,Ge.splice(it,1))}}hn(()=>{const H=e.bodyContent;if(H!==h){const te=dC(H);m(g(f),te),q(f,te,!0),h=H,q(k,null),q(C,!1),q(T,null),q(ze,null),q(S,null)}});function p(){const H=yg(g(f));h=H,e.onchange(H)}let v=ge(()=>S0(g(f)));function O(H){const te=g(v)[H];if(!te)return[0,0];if(te.type==="prose"){const ye=te.children[0],$e=te.children[te.children.length-1],Je=g(f).indexOf(ye),Ge=g(f).indexOf($e);return[Je,Ge]}const de=g(f).indexOf(te);return[de,de]}function b(H,te){const[de,ye]=O(H),$e=g(f).slice(de,ye+1);m($e,te.children),q(f,[...g(f).slice(0,de),...te.children,...g(f).slice(ye+1)],!0),p()}function w(H,te){const de=g(v)[H];if(!de||de.type!=="prose")return;const ye=de.children[te.childIndex];if(!ye)return;const[$e]=O(H),Je=$e+te.childIndex;if(ye.type==="fence"){const lt=ye,Pn=lt.code,fn=lt.language,ut=ye.source.split(`
600
+ `)[0],jn=ut.match(/^(`{3,}|~{3,})/),Ur=jn?jn[1]:"```";q(xe,{blockIndex:Je,rect:te.rect,mapping:{source:ye.source,code:Pn,language:fn,opener:ut,delimiter:Ur}},!0);return}const Ge=ye.source.trim();let He="",it=Ge;if(ye.type==="heading"){const lt=Ge.match(/^(#{1,6}\s+)(.*)/);lt&&(He=lt[1],it=lt[2])}else if(ye.type==="quote"){const lt=Ge.match(/^(>\s*)(.*)/);lt&&(He=lt[1],it=lt[2])}const qt={dataName:ye.type,text:Si(it),source:Ge,sourcePrefix:He,inlineSource:it};q(S,{editorIndex:H,childIndex:te.childIndex,flatIndex:Je,inlineSource:it,rect:te.rect,mapping:qt},!0)}let S=J(null);function _(H){if(!g(S))return;const te=g(f)[g(S).flatIndex];if(!te)return;const de=g(S).mapping.sourcePrefix+H;let ye;te.type==="heading"?(ye={...te,text:H,source:""},ye.source=wg(ye)):ye={...te,source:de},q(S,{...g(S),inlineSource:H,mapping:{...g(S).mapping,text:Si(H),source:de,inlineSource:H}},!0),fe(g(S).flatIndex,ye)}function x(){q(S,null)}let C=J(!1),A=ge(()=>s().title||""),y=ge(()=>()=>{const H=s().description||"";return H.length>80?H.slice(0,80)+"...":H}),k=J(null),P=J(null),T=J(null),E=J(null),Q=J(0);const $=420,L=12;function N(H){if(!H.target.closest(".edit-panel__header")||H.target.closest("button"))return;H.preventDefault();const de=H.currentTarget,ye=de.getBoundingClientRect(),$e=H.clientX,Je=H.clientY,Ge=ye.left,He=ye.top;function it(lt){de.style.left=`${Ge+(lt.clientX-$e)}px`,de.style.top=`${He+(lt.clientY-Je)}px`}function qt(){window.removeEventListener("mousemove",it),window.removeEventListener("mouseup",qt)}window.addEventListener("mousemove",it),window.addEventListener("mouseup",qt)}let Z=ge(()=>{if(!g(T))return"";const H=window.innerWidth,te=window.innerHeight;let de=g(T).x+L;de+$>H-16&&(de=g(T).x-$-L),de<16&&(de=H-$-16);let ye=g(T).y;const $e=te-120,Je=te-Math.min(600,$e)-16;return ye>Je&&(ye=Je),ye<60&&(ye=60),`left: ${de}px; top: ${ye}px; max-height: min(600px, ${$e}px);`});function Y(H,te,de){q(C,!1),g(v)[H]&&(g(k)===H?(q(k,null),q(T,null),q(E,null)):(Th(Q),q(k,H,!0),q(T,{x:te,y:de},!0),q(E,null)))}function ne(H,te,de,ye){q(C,!1),Th(Q),q(k,H,!0),q(T,{x:te,y:de},!0),q(E,ye??null,!0)}function ae(H){q(k,null),g(C)?(q(C,!1),q(T,null)):(q(C,!0),q(T,{x:H.clientX,y:H.clientY},!0))}function ie(H){if(!o()&&H.key==="Escape"){if(g(S)){x();return}(g(k)!==null||g(C))&&(q(k,null),q(C,!1),q(T,null),q(E,null))}}function K(){(g(k)!==null||g(C))&&(q(k,null),q(C,!1),q(T,null),q(E,null))}function he(){g(T)&&q(T,{...g(T)},!0)}function fe(H,te){q(f,g(f).map((de,ye)=>ye===H?te:de),!0),p()}function j(H){const[te,de]=O(H);g(k)!==null&&(g(k)===H?q(k,null):g(k)>H&&Th(k,-1)),q(f,[...g(f).slice(0,te),...g(f).slice(de+1)],!0),p()}let U=J(null),ue=J(null);function ke(H,te){q(U,te,!0),q(k,null),q(C,!1),q(T,null),H.dataTransfer&&(H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",String(te)))}function Ce(H,te){H.preventDefault(),H.dataTransfer&&(H.dataTransfer.dropEffect="move"),q(ue,te,!0)}function ve(H,te){if(H.preventDefault(),g(U)!==null&&g(U)!==te){const[de,ye]=O(g(U)),$e=g(f).slice(de,ye+1),Je=[...g(f).slice(0,de),...g(f).slice(ye+1)];let Ge;if(te>=g(v).length)Ge=Je.length;else{const[He]=O(te);Ge=He>ye?He-$e.length:He}if(Je.splice(Ge,0,...$e),q(f,Je,!0),g(k)!==null)if(g(k)===g(U))q(k,te>g(U)?te-1:te,!0);else{let He=g(k);g(U)<g(k)&&te>=g(k)?He--:g(U)>g(k)&&te<=g(k)&&He++,q(k,He,!0)}p()}q(U,null),q(ue,null)}let Ee=J(!1),rt=J(null);function Ke(H){q(rt,H,!0),q(Ee,!0)}function Ye(){q(Ee,!1),q(rt,null)}function Ve(H,te){let de;const ye=`blk_new_${Date.now()}`;switch(H){case"heading":de={id:ye,type:"heading",source:"## New heading",startLine:0,endLine:0,level:2,text:"New heading"};break;case"paragraph":de={id:ye,type:"paragraph",source:"New paragraph text.",startLine:0,endLine:0};break;case"fence":de={id:ye,type:"fence",source:"```\n\n```",startLine:0,endLine:0,language:"",code:""};break;case"hr":de={id:ye,type:"hr",source:"---",startLine:0,endLine:0};break;case"rune":{const Ge=te??"hint",He=g(d).get(Ge),it=He?.selfClosing??!1,qt={};if(He)for(const[fn,ut]of Object.entries(He.attributes))ut.required&&(qt[fn]=ut.values?.[0]??"");const lt=Object.entries(qt).map(([fn,ut])=>`${fn}="${ut}"`).join(" "),Pn=lt?" "+lt:"";if(it)de={id:ye,type:"rune",source:`{% ${Ge}${Pn} /%}`,startLine:0,endLine:0,runeName:Ge,selfClosing:!0,attributes:qt,innerContent:""};else{const fn=He?.example?J4(He.example,Ge):"";de={id:ye,type:"rune",source:`{% ${Ge}${Pn} %}
601
+ ${fn}
602
+ {% /${Ge} %}`,startLine:0,endLine:0,runeName:Ge,selfClosing:!1,attributes:qt,innerContent:fn}}break}}const $e=g(rt)??g(v).length;let Je;if($e>=g(v).length)Je=g(f).length;else{const[Ge]=O($e);Je=Ge}if(q(f,[...g(f).slice(0,Je),de,...g(f).slice(Je)],!0),q(rt,null),q(Ee,!1),q(C,!1),H==="rune"){const Ge=S0(g(f));q(k,Ge.findIndex(He=>He.type==="rune"&&He===g(f)[Je]),!0),g(k)===-1&&q(k,null)}else q(k,null);p()}let ze=J(null);function Bt(H,te){const de=g(v)[H];if(!de||de.type!=="rune")return;const[ye]=O(H),$e=g(f)[ye];if($e.type!=="rune")return;const Je=$e,Ge=ye;if(te.editType==="link"){const it=Vz(Je.innerContent,te.text,te.href??"");if(!it)return;q(bt,{blockIndex:Ge,rect:te.rect,mapping:it},!0);return}if(te.editType==="code"){const it=Yz(Je.innerContent,te.text);if(!it)return;q(xe,{blockIndex:Ge,rect:te.rect,mapping:it},!0);return}if(te.editType==="image"){const it=te.href??"",qt=Hz(Je.innerContent,it);if(!qt)return;q(se,{blockIndex:Ge,mapping:qt},!0);return}if(te.editType==="icon"){const it=te.iconName??"",qt=Jz(Je.innerContent,it);if(!qt)return;q(Qe,{blockIndex:Ge,mapping:qt},!0);return}const He=ZC(Je.innerContent,te.dataName,te.text);He&&q(ze,{blockIndex:Ge,dataName:te.dataName,inlineSource:He.inlineSource,rect:te.rect,mapping:He},!0)}function In(H){if(!g(ze))return;const te=g(f)[g(ze).blockIndex];if(te.type!=="rune")return;const de=te,ye=Xz(de.innerContent,g(ze).mapping,H),$e={...de,innerContent:ye,source:""};$e.source=ir($e),q(ze,{...g(ze),inlineSource:H,mapping:{...g(ze).mapping,text:Si(H),source:g(ze).mapping.sourcePrefix+H,inlineSource:H}},!0),fe(g(ze).blockIndex,$e)}function tr(){q(ze,null)}let bt=J(null);function Wt(H,te){if(!g(bt))return;const de=g(f)[g(bt).blockIndex];if(de.type!=="rune")return;const ye=de,$e=Wz(ye.innerContent,g(bt).mapping,H,te),Je={...ye,innerContent:$e,source:""};Je.source=ir(Je),fe(g(bt).blockIndex,Je)}function mn(){if(!g(bt))return;const H=g(bt).blockIndex,te=g(f)[H];if(te.type!=="rune")return;const de=te,ye=de.innerContent.replace(g(bt).mapping.source+`
603
+ `,"").replace(g(bt).mapping.source,""),$e={...de,innerContent:ye,source:""};$e.source=ir($e),q(bt,null),fe(H,$e)}function Wn(){q(bt,null)}let xe=J(null);function Yn(H){if(!g(xe))return;const te=g(f)[g(xe).blockIndex];if(te.type==="fence"){const Ge={...te,code:H,source:""};Ge.source=bd(Ge),fe(g(xe).blockIndex,Ge);return}if(te.type!=="rune")return;const de=te,ye=Uz(de.innerContent,g(xe).mapping,H),$e={...de,innerContent:ye,source:""};$e.source=ir($e),fe(g(xe).blockIndex,$e)}function Lt(){if(!g(xe))return;const H=g(xe).blockIndex,te=g(f)[H];if(te.type==="fence"){q(xe,null),q(f,g(f).filter((Je,Ge)=>Ge!==H),!0),p();return}if(te.type!=="rune")return;const de=te,ye=de.innerContent.replace(g(xe).mapping.source+`
604
+ `,"").replace(g(xe).mapping.source,""),$e={...de,innerContent:ye,source:""};$e.source=ir($e),q(xe,null),fe(H,$e)}function Jt(){q(xe,null)}function _n(H){if(!g(xe))return;const te=g(f)[g(xe).blockIndex];if(te.type==="fence"){const lt={...te,language:H,source:""};lt.source=bd(lt);const fn=g(xe).mapping.opener.slice(g(xe).mapping.delimiter.length).replace(/^\w*/,"").trim(),ut=g(xe).mapping.delimiter+H+(fn?" "+fn:""),jn=ut+`
605
+ `+g(xe).mapping.code+`
606
+ `+g(xe).mapping.delimiter;q(xe,{...g(xe),mapping:{...g(xe).mapping,language:H,opener:ut,source:jn}},!0),fe(g(xe).blockIndex,lt);return}if(te.type!=="rune")return;const de=te,ye=Gz(de.innerContent,g(xe).mapping,H),$e={...de,innerContent:ye,source:""};$e.source=ir($e);const Ge=g(xe).mapping.opener.slice(g(xe).mapping.delimiter.length).replace(/^\w*/,"").trim(),He=g(xe).mapping.delimiter+H+(Ge?" "+Ge:""),it=He+`
607
+ `+g(xe).mapping.code+`
608
+ `+g(xe).mapping.delimiter;q(xe,{...g(xe),mapping:{...g(xe).mapping,language:H,opener:He,source:it}},!0),fe(g(xe).blockIndex,$e)}let se=J(null);function Oe(H,te){if(!g(se))return;const de=g(f)[g(se).blockIndex];if(de.type!=="rune")return;const ye=de,$e=Kz(ye.innerContent,g(se).mapping,te,H),Je={...ye,innerContent:$e,source:""};Je.source=ir(Je),fe(g(se).blockIndex,Je)}function _e(){if(!g(se))return;const H=g(se).blockIndex,te=g(f)[H];if(te.type!=="rune")return;const de=te,ye=de.innerContent.replace(g(se).mapping.source+`
609
+ `,"").replace(g(se).mapping.source,""),$e={...de,innerContent:ye,source:""};$e.source=ir($e),q(se,null),fe(H,$e)}function Ae(){q(se,null)}let Qe=J(null);function yt(H){if(!g(Qe))return;const te=g(f)[g(Qe).blockIndex];if(te.type!=="rune")return;const de=te,ye=e8(de.innerContent,g(Qe).mapping,H),$e={...de,innerContent:ye,source:""};$e.source=ir($e),fe(g(Qe).blockIndex,$e)}function ct(){q(Qe,null)}function Ue(H,te,de,ye){if(g(k)===null)return;const[$e]=O(g(k));q(xe,null),q(ze,{blockIndex:$e,dataName:H,inlineSource:te,rect:de,mapping:ye},!0)}function wt(H,te,de,ye){if(g(k)===null)return;const[$e]=O(g(k));q(ze,null),q(xe,{blockIndex:$e,rect:de,mapping:ye},!0)}let pt=ge(()=>{const H=new Map;for(const te of e.runes){const de=H.get(te.category)??[];de.push(te),H.set(te.category,de)}return H});var at=KH();st("keydown",Zo,ie),st("resize",Zo,he);var _t=R(at);{var xn=H=>{var te=XH();z(H,te)};le(_t,H=>{g(f).length===0&&!o()&&H(xn)})}var jt=D(_t,2),en=R(jt),gt=R(en),Ut=R(gt);{var Bn=H=>{var te=WH(),de=R(te),ye=R(de),$e=R(ye),Je=D(ye,2);{var Ge=lt=>{var Pn=VH(),fn=R(Pn);ce(ut=>Te(fn,ut),[()=>g(y)()]),z(lt,Pn)},He=ge(()=>g(y)());le(Je,lt=>{g(He)&&lt(Ge)})}var it=D(de,2);let qt;it.__click=lt=>ae(lt),ce(()=>{Te($e,g(A)||"Untitled"),qt=je(it,1,"block-editor__fm-edit svelte-10brcoc",null,qt,{active:g(C)})}),z(H,te)};le(Ut,H=>{o()||H(Bn)})}var nr=D(Ut,2);Ct(nr,19,()=>g(v),H=>H.id,(H,te,de)=>{var ye=GH();let $e;var Je=R(ye),Ge=R(Je);{var He=ut=>{{let jn=ge(()=>o()?void 0:on=>w(g(de),on)),Ur=ge(()=>o()?void 0:on=>Y(g(de),on.x,on.y)),Mr=ge(()=>o()?void 0:on=>ke(on,g(de))),ia=ge(()=>o()?void 0:on=>Ce(on,g(de))),sa=ge(()=>o()?void 0:on=>ve(on,g(de)));yU(ut,{get block(){return g(te)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return n()},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(jn)},get onblockclick(){return g(Ur)},get ondragstart(){return g(Mr)},get ondragover(){return g(ia)},get ondrop(){return g(sa)}})}},it=ut=>{{let jn=ge(()=>o()?void 0:on=>Bt(g(de),on)),Ur=ge(()=>o()?void 0:on=>ne(g(de),on.x,on.y,on.nestedRuneIndex)),Mr=ge(()=>o()?void 0:on=>ke(on,g(de))),ia=ge(()=>o()?void 0:on=>Ce(on,g(de))),sa=ge(()=>o()?void 0:on=>ve(on,g(de)));gU(ut,{get block(){return g(te)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return n()},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(jn)},get onruneclick(){return g(Ur)},get ondragstart(){return g(Mr)},get ondragover(){return g(ia)},get ondrop(){return g(sa)}})}};le(Ge,ut=>{g(te).type==="prose"?ut(He):ut(it,!1)})}var qt=D(Je,2);{var lt=ut=>{var jn=YH(),Ur=tt(jn);Ur.__click=()=>Ke(g(de));var Mr=D(Ur,2);Mr.__click=()=>Ke(g(de)+1),z(ut,jn)};le(qt,ut=>{!o()&&i()&&ut(lt)})}var Pn=D(qt,2);{var fn=ut=>{var jn=UH();jn.__click=Mr=>Y(g(de),Mr.clientX,Mr.clientY);var Ur=R(jn);ce(Mr=>{St(jn,"aria-pressed",g(k)===g(de)),Te(Ur,Mr)},[()=>WO(g(te))]),z(ut,jn)};le(Pn,ut=>{o()||ut(fn)})}ce(()=>$e=je(ye,1,"block-editor__row svelte-10brcoc",null,$e,{hovered:!o()&&g(P)===g(de),active:!o()&&g(k)===g(de),"drag-source":!o()&&g(U)===g(de),"drag-over":!o()&&g(ue)===g(de)&&g(U)!==g(de)})),st("mouseenter",ye,()=>{o()||q(P,g(de),!0)}),st("mouseleave",ye,()=>{!o()&&g(P)===g(de)&&q(P,null)}),z(H,ye)});var gr=D(jt,2);{var cn=H=>{var te=HH(),de=tt(te);de.__mousedown=()=>{q(k,null),q(C,!1),q(T,null),q(E,null)};var ye=D(de,2);ye.__mousedown=N;var $e=R(ye);{var Je=it=>{GG(it,{onclose:()=>{q(C,!1),q(T,null)}})},Ge=it=>{const qt=ge(()=>g(f)[O(g(k))[0]]);var lt=an(),Pn=tt(lt);Fb(Pn,()=>g(Q),fn=>{jG(fn,{get block(){return g(qt)},get runeMap(){return g(d)},runes:()=>e.runes,get aggregated(){return u()},get initialRuneIndex(){return g(E)},onupdate:ut=>fe(O(g(k))[0],ut),onremove:()=>{const ut=g(k);q(k,null),q(T,null),q(E,null),j(ut)},onclose:()=>{q(k,null),q(T,null),q(E,null)},oneditfield:Ue,oneditcode:wt})}),z(it,lt)},He=it=>{const qt=ge(()=>g(v)[g(k)]);var lt=an(),Pn=tt(lt);Fb(Pn,()=>g(Q),fn=>{VG(fn,{get block(){return g(qt)},runes:()=>e.runes,get aggregated(){return u()},onupdate:ut=>b(g(k),ut),onremove:()=>{const ut=g(k);q(k,null),q(T,null),j(ut)},onclose:()=>{q(k,null),q(T,null)}})}),z(it,lt)};le($e,it=>{g(C)?it(Je):g(k)!==null&&g(v)[g(k)]?.type==="rune"?it(Ge,1):g(k)!==null&&g(v)[g(k)]?.type==="prose"&&it(He,2)})}ce(()=>$r(ye,g(Z))),z(H,te)};le(gr,H=>{!o()&&(g(k)!==null||g(C))&&H(cn)})}var Mt=D(gr,2);{var F=H=>{lH(H,{get runes(){return e.runes},get runesByCategory(){return g(pt)},oninsert:Ve,onclose:Ye})};le(Mt,H=>{g(Ee)&&H(F)})}var Ze=D(Mt,2);{var un=H=>{o_(H,{get anchorRect(){return g(ze).rect},get dataName(){return g(ze).dataName},get inlineSource(){return g(ze).inlineSource},onchange:In,onclose:tr})};le(Ze,H=>{g(ze)&&H(un)})}var Sn=D(Ze,2);{var We=H=>{dH(H,{get anchorRect(){return g(bt).rect},get text(){return g(bt).mapping.text},get href(){return g(bt).mapping.href},onchange:Wt,onremove:mn,onclose:Wn})};le(Sn,H=>{g(bt)&&H(We)})}var vr=D(Sn,2);{var qi=H=>{mH(H,{get anchorRect(){return g(xe).rect},get code(){return g(xe).mapping.code},get language(){return g(xe).mapping.language},onchange:Yn,onlanguagechange:_n,onremove:Lt,onclose:Jt})};le(vr,H=>{g(xe)&&H(qi)})}var Mn=D(vr,2);{var ns=H=>{NH(H,{get currentSrc(){return g(se).mapping.src},get currentAlt(){return g(se).mapping.alt},onchange:(te,de)=>{Oe(te,de),Ae()},onremove:_e,onclose:Ae})};le(Mn,H=>{g(se)&&H(ns)})}var qn=D(Mn,2);{var $s=H=>{{let te=ge(()=>e.themeConfig?.icons??{});FH(H,{get icons(){return g(te)},get currentIcon(){return g(Qe).mapping.name},onchange:de=>{yt(de),ct()},onclose:ct})}};le(qn,H=>{g(Qe)&&H($s)})}var rs=D(qn,2);{var Or=H=>{o_(H,{get anchorRect(){return g(S).rect},get dataName(){return g(S).mapping.dataName},get inlineSource(){return g(S).inlineSource},onchange:_,onclose:x})};le(rs,H=>{g(S)&&H(Or)})}st("scroll",gt,K),z(t,at),ht()}Vt(["click","mousedown"]);const c_=/\{%\s*region\s+([^%]*?)%\}([\s\S]*?)\{%\s*\/region\s*%\}/g,u_=/(\w+)="([^"]*)"/g;function eK(t){const e=[];let n;for(c_.lastIndex=0;(n=c_.exec(t))!==null;){const r=n[1],i=n[2],s={};let o;for(u_.lastIndex=0;(o=u_.exec(r))!==null;)s[o[1]]=o[2];const a=s.name||"",l=s.mode||"replace";let c=i;c.startsWith(`
610
+ `)&&(c=c.slice(1)),c.endsWith(`
611
+ `)&&(c=c.slice(0,-1)),e.push({name:a,mode:l,content:c})}return{regions:e}}function tK(t){const e=["{% layout %}"];for(const n of t.regions){const r=n.mode!=="replace"?` mode="${n.mode}"`:"";e.push(`{% region name="${n.name}"${r} %}`),e.push(n.content),e.push("{% /region %}"),e.push("")}return e.push("{% /layout %}"),e.join(`
612
+ `)}const Cb=/\{%\s*nav\s*%\}/,WP=/\{%\s*\/nav\s*%\}/;function nK(t){return Cb.test(t)}function rK(t){const e=Cb.exec(t);if(!e)return null;const n=e.index+e[0].length,r=WP.exec(t.slice(n));if(!r)return null;let i=t.slice(n,n+r.index);return i.startsWith(`
613
+ `)&&(i=i.slice(1)),i.endsWith(`
614
+ `)&&(i=i.slice(0,-1)),i}function iK(t,e){const n=Cb.exec(t);if(!n)return t;const r=n.index+n[0].length,i=WP.exec(t.slice(r));if(!i)return t;const s=t.slice(0,r),o=t.slice(r+i.index);return`${s}
615
+ ${e}
616
+ ${o}`}function sK(t){const e=t.split(`
617
+ `),n=[],r=[];let i=null;for(const s of e){const o=s.trim(),a=o.match(/^##\s+(.+)$/);if(a){i={title:a[1],items:[]},n.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:n,ungrouped:r}}function oK(t){const e=[];for(const n of t.ungrouped)e.push(`- ${n}`);t.ungrouped.length>0&&t.groups.length>0&&e.push("");for(let n=0;n<t.groups.length;n++){const r=t.groups[n];e.push(`## ${r.title}`),e.push("");for(const i of r.items)e.push(`- ${i}`);n<t.groups.length-1&&e.push("")}return e.join(`
618
+ `)}var aK=W('<input class="nav-item__input svelte-8xlxf2" type="text"/>'),lK=W('<button class="nav-item__slug svelte-8xlxf2"> </button>'),cK=W('<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 uK(t,e){dt(e,!0);let n=J(!1),r=J(Ht(e.slug));function i(){q(r,e.slug,!0),q(n,!0)}function s(){const h=g(r).trim();h&&h!==e.slug&&e.onchange(h),q(n,!1)}function o(h){h.key==="Enter"?(h.preventDefault(),s()):h.key==="Escape"&&q(n,!1)}var a=cK(),l=R(a);l.__pointerdown=function(...h){e.ondragstart?.apply(this,h)};var c=D(l,2);{var u=h=>{var m=aK();m.__keydown=o,ks(m),st("blur",m,s),Qn(m,()=>g(r),p=>q(r,p)),z(h,m)},f=h=>{var m=lK();m.__dblclick=i;var p=R(m);ce(()=>Te(p,e.slug)),z(h,m)};le(c,h=>{g(n)?h(u):h(f,!1)})}var d=D(c,2);d.__click=function(...h){e.ondelete?.apply(this,h)},z(t,a),ht()}Vt(["pointerdown","keydown","dblclick","click"]);var fK=W('<div role="listitem"><!></div>'),dK=W('<div class="nav-editor__add-item svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Page slug..."/></div>'),hK=W('<button class="nav-editor__add-item-btn svelte-1h0zo48">+ Add item</button>'),pK=W('<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>'),mK=W('<div class="nav-editor__add-group svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Group title..."/></div>'),gK=W('<button class="nav-editor__add-group-btn svelte-1h0zo48">+ Add group</button>'),vK=W('<div class="nav-editor svelte-1h0zo48"><!> <!></div>');function OK(t,e){dt(e,!0);let n=J(Ht({groups:[],ungrouped:[]})),r=J(null),i=J(""),s=J(""),o=J(!1),a=J(null),l=J(null);hn(()=>{const k=rK(e.content);k!==null&&q(n,sK(k),!0)});function c(){const k=oK(g(n)),P=iK(e.content,k);e.onchange(P)}function u(k,P){g(n).groups[k]={...g(n).groups[k],title:P},q(n,{...g(n)},!0),c()}function f(k){const P=g(n).groups[k];P.items.length>0&&!confirm(`Delete group "${P.title}" and its ${P.items.length} items?`)||(g(n).groups.splice(k,1),q(n,{...g(n)},!0),c())}function d(){const k=g(s).trim();k&&(g(n).groups.push({title:k,items:[]}),q(n,{...g(n)},!0),q(s,""),q(o,!1),c())}function h(k,P,T){g(n).groups[k].items[P]=T,q(n,{...g(n)},!0),c()}function m(k,P){g(n).groups[k].items.splice(P,1),q(n,{...g(n)},!0),c()}function p(k){const P=g(i).trim();P&&(g(n).groups[k].items.push(P),q(n,{...g(n)},!0),q(i,""),q(r,null),c())}function v(k,P){k.key==="Enter"?(k.preventDefault(),p(P)):k.key==="Escape"&&(q(r,null),q(i,""))}function O(k){k.key==="Enter"?(k.preventDefault(),d()):k.key==="Escape"&&(q(o,!1),q(s,""))}function b(k,P,T){k.currentTarget.setPointerCapture(k.pointerId),q(a,{groupIdx:P,itemIdx:T},!0)}function w(k,P,T){g(a)&&q(l,{groupIdx:P,itemIdx:T},!0)}function S(k){if(!g(a)||!g(l)){q(a,null),q(l,null);return}const{groupIdx:P,itemIdx:T}=g(a),{groupIdx:E,itemIdx:Q}=g(l);if(P===E&&T===Q){q(a,null),q(l,null);return}const[$]=g(n).groups[P].items.splice(T,1);let L=Q;P===E&&T<Q&&(L=Q-1),g(n).groups[E].items.splice(L,0,$),q(n,{...g(n)},!0),q(a,null),q(l,null),c()}var _=vK(),x=R(_);Ct(x,17,()=>g(n).groups,Yt,(k,P,T)=>{var E=pK(),Q=R(E),$=R(Q);$.__input=ae=>u(T,ae.target.value);var L=D($,2);L.__click=()=>f(T);var N=D(Q,2);Ct(N,21,()=>g(P).items,Yt,(ae,ie,K)=>{var he=fK();let fe;he.__pointermove=U=>w(U,T,K),he.__pointerup=S;var j=R(he);uK(j,{get slug(){return g(ie)},onchange:U=>h(T,K,U),ondelete:()=>m(T,K),ondragstart:U=>b(U,T,K)}),ce(()=>fe=je(he,1,"nav-editor__item-wrapper svelte-1h0zo48",null,fe,{"drag-over":g(l)?.groupIdx===T&&g(l)?.itemIdx===K})),z(ae,he)});var Z=D(N,2);{var Y=ae=>{var ie=dK(),K=R(ie);K.__keydown=he=>v(he,T),ks(K),st("blur",K,()=>{q(r,null),q(i,"")}),Qn(K,()=>g(i),he=>q(i,he)),z(ae,ie)},ne=ae=>{var ie=hK();ie.__click=()=>{q(r,T,!0),q(i,"")},z(ae,ie)};le(Z,ae=>{g(r)===T?ae(Y):ae(ne,!1)})}ce(()=>sn($,g(P).title)),z(k,E)});var C=D(x,2);{var A=k=>{var P=mK(),T=R(P);T.__keydown=O,ks(T),st("blur",T,()=>{q(o,!1),q(s,"")}),Qn(T,()=>g(s),E=>q(s,E)),z(k,P)},y=k=>{var P=gK();P.__click=()=>{q(o,!0),q(s,"")},z(k,P)};le(C,k=>{g(o)?k(A):k(y,!1)})}z(t,_),ht()}Vt(["input","click","pointermove","pointerup","keydown"]);var bK=W("<button> </button>"),yK=W("<button> </button>"),wK=W('<textarea class="region-card__textarea svelte-1ah7fba" placeholder="Region content..." rows="4"></textarea>'),_K=W('<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 kK(t,e){dt(e,!0);let n=J(!1),r=ge(()=>nK(e.region.content));function i(A){const y=A.target;e.onchange({...e.region,name:y.value})}function s(A){e.onchange({...e.region,mode:A})}function o(A){const y=A.target;e.onchange({...e.region,content:y.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 y=A.target;c(y),o(A)}var f=_K(),d=R(f),h=R(d),m=R(h);m.__input=i;var p=D(m,2);Ct(p,20,()=>["replace","prepend","append"],Yt,(A,y)=>{var k=bK();let P;k.__click=()=>s(y);var T=R(k);ce(()=>{P=je(k,1,"region-card__mode-btn svelte-1ah7fba",null,P,{active:e.region.mode===y}),Te(T,y)}),z(A,k)});var v=D(h,2),O=R(v);{var b=A=>{var y=yK();let k;y.__click=()=>{q(n,!g(n))};var P=R(y);ce(()=>{k=je(y,1,"region-card__toggle-btn svelte-1ah7fba",null,k,{active:g(n)}),Te(P,g(n)?"Text":"Visual")}),z(A,y)};le(O,A=>{g(r)&&A(b)})}var w=D(O,2);w.__click=l;var S=D(d,2),_=R(S);{var x=A=>{OK(A,{get content(){return e.region.content},onchange:a})},C=A=>{var y=wK();y.__input=u,_$(y,k=>c?.(k)),ce(()=>sn(y,e.region.content)),z(A,y)};le(_,A=>{g(r)&&g(n)?A(x):A(C,!1)})}ce(()=>sn(m,e.region.name)),z(t,f),ht()}Vt(["input","click"]);var xK=W('<span class="layout-editor__path svelte-u2phg9"> </span>'),SK=W('<div class="layout-editor__raw svelte-u2phg9"><!></div>'),AK=W('<div class="layout-editor__empty svelte-u2phg9"><p class="svelte-u2phg9">No regions defined. Add a region to get started.</p></div>'),CK=W('<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>'),TK=W('<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 PK(t,e){dt(e,!0);let n=J(!1),r=J(Ht({regions:[]})),i="";hn(()=>{const x=X.editorContent;x!==i&&(q(r,eK(x),!0),i=x)});function s(){const x=tK(g(r));i=x,X.editorContent=x,X.bodyContent=x}function o(x,C){g(r).regions[x]=C,q(r,{...g(r)},!0),s()}function a(x){g(r).regions.splice(x,1),q(r,{...g(r)},!0),s()}function l(){g(r).regions.push({name:"",mode:"replace",content:""}),q(r,{...g(r)},!0),s()}var c=TK(),u=R(c),f=R(u),d=D(R(f),4);{var h=x=>{var C=xK(),A=R(C);ce(()=>Te(A,X.currentPath)),z(x,C)};le(d,x=>{X.currentPath&&x(h)})}var m=D(f,2),p=R(m);let v;p.__click=()=>{q(n,!1)};var O=D(p,2);let b;O.__click=()=>{q(n,!0)};var w=D(u,2);{var S=x=>{var C=SK(),A=R(C);uC(A,{}),z(x,C)},_=x=>{var C=CK(),A=R(C);{var y=T=>{var E=AK();z(T,E)};le(A,T=>{g(r).regions.length===0&&T(y)})}var k=D(A,2);Ct(k,17,()=>g(r).regions,Yt,(T,E,Q)=>{kK(T,{get region(){return g(E)},onchange:$=>o(Q,$),ondelete:()=>a(Q)})});var P=D(k,2);P.__click=l,z(x,C)};le(w,x=>{g(n)?x(S):x(_,!1)})}ce(()=>{v=je(p,1,"layout-editor__mode-btn svelte-u2phg9",null,v,{active:!g(n)}),b=je(O,1,"layout-editor__mode-btn svelte-u2phg9",null,b,{active:g(n)})}),z(t,c),ht()}Vt(["click"]);var EK=W('<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>'),$K=W('<div class="preview__progress svelte-1iqwj2q"></div>'),QK=W('<iframe title="Preview" src="/preview/" class="preview__iframe svelte-1iqwj2q"></iframe>'),LK=W('<iframe title="Preview" class="preview__iframe svelte-1iqwj2q"></iframe>'),MK=W('<div class="preview__container svelte-1iqwj2q"><!> <div class="preview__viewport svelte-1iqwj2q"><!></div></div>');function qK(t,e){dt(e,!0);let n=J(""),r=J(void 0),i=J(void 0),s,o=new Map,a=J(!1);const l=ge(()=>g(n).replace("<html",`<html data-theme="${X.previewTheme}"`));hn(()=>{function m(p){if(p.data?.type==="preview-ready")X.previewRuntimeReady=!0;else if(p.data?.type==="preview-navigate"){const v=p.data.href,O=o.get(v);O&&e.onnavigate&&e.onnavigate(O)}}return window.addEventListener("message",m),()=>window.removeEventListener("message",m)});const c=ge(()=>X.previewRuntimeAvailable&&X.previewRuntimeReady);hn(()=>{const m=NE(X.routeRules);g(c)&&g(r)?.contentWindow&&g(r).contentWindow.postMessage({type:"route-rules-update",routeRules:m},"*")}),hn(()=>{const m=X.previewTheme;g(c)&&g(r)?.contentWindow&&g(r).contentWindow.postMessage({type:"theme-update",theme:m},"*")}),hn(()=>{const m=X.currentPath,p=X.editorContent,v=g(c);if(!m||!p){q(n,"");return}return q(a,!0),clearTimeout(s),s=setTimeout(async()=>{try{if(v){const O=await OH(m,p);O.pages&&(o=new Map(O.pages.map(b=>[b.url,b.path]))),g(r)?.contentWindow?.postMessage({type:"preview-update",page:O},"*")}else q(n,await vH(m,p),!0)}catch{}finally{q(a,!1)}},400),()=>clearTimeout(s)});var u=an(),f=tt(u);{var d=m=>{var p=EK();z(m,p)},h=m=>{var p=MK(),v=R(p);{var O=x=>{var C=$K();z(x,C)};le(v,x=>{g(a)&&x(O)})}var b=D(v,2),w=R(b);{var S=x=>{var C=QK();ln(C,A=>q(r,A),()=>g(r)),z(x,C)},_=x=>{var C=LK();ln(C,A=>q(i,A),()=>g(i)),ce(()=>St(C,"srcdoc",g(l))),z(x,C)};le(w,x=>{X.previewRuntimeAvailable?x(S):x(_,!1)})}z(m,p)};le(f,m=>{X.currentPath?m(h,!1):m(d)})}z(t,u),ht()}var RK=W('<div class="page-card svelte-1nxc0wz"><!></div>');function DK(t,e){dt(e,!0);const n={desktop:1440,tablet:768,mobile:375},r=ge(()=>X.editorMode==="preview"?n[X.viewport]??1440:1440);var i=RK(),s=R(i);wa(s,()=>e.children),ce(()=>$r(i,`--page-card-width: ${g(r)??""}px`)),z(t,i),ht()}var NK=W('<div class="popover svelte-ohlzgl"><!></div>');function YP(t,e){dt(e,!0);let n,r=J(e.anchorRect.x+e.anchorRect.width+8),i=J(Ht(e.anchorRect.y));ao(()=>{if(n){const c=n.getBoundingClientRect();c.right>window.innerWidth-8&&q(r,e.anchorRect.x-c.width-8),c.bottom>window.innerHeight-8&&q(i,window.innerHeight-c.height-8),g(i)<8&&q(i,8)}function a(c){n&&!n.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=NK(),o=R(s);wa(o,()=>e.children),ln(s,a=>n=a,()=>n),ce(()=>$r(s,`left: ${g(r)??""}px; top: ${g(i)??""}px`)),z(t,s),ht()}var IK=W('<span class="modal__location svelte-vqemeo"> </span>'),BK=W('<span class="modal__hint svelte-vqemeo">Auto-derived from title</span>'),jK=W('<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),zK=W('<span class="modal__error svelte-vqemeo">Use lowercase letters, numbers, and hyphens</span>'),ZK=W('<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),FK=W('<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 XK(t,e){dt(e,!0);let n=xt(e,"initialDirectory",3,""),r=J("file"),i=J(""),s=J(""),o=J(!1),a=J(!1),l=ge(()=>g(i).toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),c=ge(()=>g(o)?g(s):g(l)),u=J(""),f=J(!0),d=ge(()=>/^[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:n(),slug:g(c),title:g(i)||g(c),template:"blank",draft:g(a)})}else{if(!g(d))return;e.oncreatefolder({parent:n(),name:g(u),createLayout:g(f)})}}YP(t,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(m,p)=>{var v=FK(),O=R(v),b=R(O);let w;b.__click=()=>q(r,"file");var S=D(b,2);let _;S.__click=()=>q(r,"folder");var x=D(O,2);{var C=P=>{var T=IK(),E=R(T);ce(()=>Te(E,`in ${n()??""}/`)),z(P,T)};le(x,P=>{n()&&P(C)})}var A=D(x,2);{var y=P=>{var T=jK(),E=tt(T),Q=D(R(E),2);ks(Q);var $=D(E,2),L=D(R($),2);L.__input=he=>{q(s,he.target.value,!0),q(o,!0)};var N=D(L,2);{var Z=he=>{var fe=BK();z(he,fe)};le(N,he=>{!g(o)&&g(i)&&he(Z)})}var Y=D($,2),ne=R(Y),ae=D(Y,2),ie=R(ae);ie.__click=function(...he){e.onclose?.apply(this,he)};var K=D(ie,2);ce(()=>{sn(L,g(c)),K.disabled=!g(c)}),Qn(Q,()=>g(i),he=>q(i,he)),fm(ne,()=>g(a),he=>q(a,he)),z(P,T)},k=P=>{var T=ZK(),E=tt(T),Q=D(R(E),2);ks(Q);var $=D(Q,2);{var L=ie=>{var K=zK();z(ie,K)};le($,ie=>{g(u)&&!g(d)&&ie(L)})}var N=D(E,2),Z=R(N),Y=D(N,2),ne=R(Y);ne.__click=function(...ie){e.onclose?.apply(this,ie)};var ae=D(ne,2);ce(()=>ae.disabled=!g(d)),Qn(Q,()=>g(u),ie=>q(u,ie)),fm(Z,()=>g(f),ie=>q(f,ie)),z(P,T)};le(A,P=>{g(r)==="file"?P(y):P(k,!1)})}ce(()=>{w=je(b,1,"modal__tab svelte-vqemeo",null,w,{active:g(r)==="file"}),_=je(S,1,"modal__tab svelte-vqemeo",null,_,{active:g(r)==="folder"})}),st("submit",v,h),z(m,v)},$$slots:{default:!0}}),ht()}Vt(["click","input"]);var VK=W('<span class="modal__error svelte-fv7j9w">Use lowercase letters, numbers, and hyphens</span>'),WK=W("<option> </option>"),YK=W('<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 UK(t,e){dt(e,!0);let n=J(""),r=J(""),i=J(!0),s;function o(A,y=[]){if(!A||A.type!=="directory")return y;y.push(A.path);for(const k of A.children??[])o(k,y);return y}let a=ge(()=>o(X.tree)),l=ge(()=>/^[a-z0-9][a-z0-9-]*$/.test(g(n)));hn(()=>{s&&!s.open&&s.showModal()});function c(A){A.preventDefault(),g(l)&&e.oncreate({parent:g(r),name:g(n),createLayout:g(i)})}function u(A){A.key==="Escape"&&e.onclose()}var f=YK();f.__keydown=u;var d=R(f),h=D(R(d),2),m=D(R(h),2);ks(m);var p=D(m,2);{var v=A=>{var y=VK();z(A,y)};le(p,A=>{g(n)&&!g(l)&&A(v)})}var O=D(h,2),b=D(R(O),2);Ct(b,21,()=>g(a),Yt,(A,y)=>{var k=WK(),P=R(k),T={};ce(()=>{Te(P,g(y)||"/ (root)"),T!==(T=g(y))&&(k.value=(k.__value=g(y))??"")}),z(A,k)});var w=D(O,2),S=R(w),_=D(w,2),x=R(_);x.__click=function(...A){e.onclose?.apply(this,A)};var C=D(x,2);ln(f,A=>s=A,()=>s),ce(()=>C.disabled=!g(l)),st("close",f,function(...A){e.onclose?.apply(this,A)}),st("submit",d,c),Qn(m,()=>g(n),A=>q(n,A)),ek(b,()=>g(r),A=>q(r,A)),fm(S,()=>g(i),A=>q(i,A)),z(t,f),ht()}Vt(["keydown","click"]);var GK=W('<span class="modal__error svelte-e8lnud">Use lowercase letters, numbers, and hyphens</span>'),HK=W('<span class="modal__hint svelte-e8lnud"> </span>'),KK=W("<option> </option>"),JK=W('<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 eJ(t,e){dt(e,!0);let n=J(""),r=J("default"),i=ge(()=>/^[a-z0-9][a-z0-9-]*$/.test(g(n))),s=ge(()=>{const a=X.themeConfig;return a?.layouts?Object.keys(a.layouts):["default"]});function o(a){a.preventDefault(),g(i)&&e.oncreate({name:g(n),layout:g(r)})}YP(t,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(a,l)=>{var c=JK(),u=D(R(c),4),f=D(R(u),2);ks(f);var d=D(f,2);{var h=S=>{var _=GK();z(S,_)},m=S=>{var _=HK(),x=R(_);ce(()=>Te(x,`Pattern: ${g(n)??""}/** · Directory: ${g(n)??""}/`)),z(S,_)};le(d,S=>{g(n)&&!g(i)?S(h):g(n)&&S(m,1)})}var p=D(u,2),v=D(R(p),2);Ct(v,21,()=>g(s),Yt,(S,_)=>{var x=KK(),C=R(x),A={};ce(()=>{Te(C,g(_)),A!==(A=g(_))&&(x.value=(x.__value=g(_))??"")}),z(S,x)});var O=D(p,2),b=R(O);b.__click=function(...S){e.onclose?.apply(this,S)};var w=D(b,2);ce(()=>w.disabled=!g(i)),st("submit",c,o),Qn(f,()=>g(n),S=>q(n,S)),ek(v,()=>g(r),S=>q(r,S)),z(a,c)},$$slots:{default:!0}}),ht()}Vt(["click"]);var tJ=Ps('<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>'),nJ=W("<button><!> </button>"),rJ=W('<div class="context-menu svelte-1ksg7ac"></div>');function iJ(t,e){dt(e,!0);let n,r=J(Ht(e.x)),i=J(Ht(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}}ao(()=>{if(n){const c=n.getBoundingClientRect();c.right>window.innerWidth&&q(r,window.innerWidth-c.width-4),c.bottom>window.innerHeight&&q(i,window.innerHeight-c.height-4)}function l(c){n&&!n.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=rJ();Ct(a,21,()=>e.items,Yt,(l,c)=>{const u=ge(()=>s(g(c).label));var f=nJ();let d;f.__click=()=>o(g(c).action);var h=R(f);{var m=v=>{var O=tJ(),b=R(O);ce(()=>St(b,"d",g(u))),z(v,O)};le(h,v=>{g(u)&&v(m)})}var p=D(h);ce(()=>{d=je(f,1,"context-menu__item svelte-1ksg7ac",null,d,{danger:g(c).danger}),Te(p,` ${g(c).label??""}`)}),z(l,f)}),ln(a,l=>n=l,()=>n),ce(()=>$r(a,`left: ${g(r)??""}px; top: ${g(i)??""}px`)),z(t,a),ht()}Vt(["click"]);var sJ=W('<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 oJ(t,e){dt(e,!0);let n=J(Ht(e.currentName)),r;hn(()=>{r&&!r.open&&r.showModal()});function i(f){f.preventDefault();const d=g(n).trim();d&&d!==e.currentName&&e.onrename(d)}var s=sJ(),o=R(s),a=D(R(o),2);ks(a),a.__keydown=f=>{f.key==="Escape"&&e.onclose()};var l=D(a,2),c=R(l);c.__click=function(...f){e.onclose?.apply(this,f)};var u=D(c,2);ln(s,f=>r=f,()=>r),ce(f=>u.disabled=f,[()=>!g(n).trim()||g(n).trim()===e.currentName]),st("close",s,function(...f){e.onclose?.apply(this,f)}),st("submit",o,i),Qn(a,()=>g(n),f=>q(n,f)),z(t,s),ht()}Vt(["keydown","click"]);var aJ=W('<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 lJ(t,e){dt(e,!0);let n=xt(e,"confirmLabel",3,"Delete"),r;hn(()=>{r&&!r.open&&r.showModal()});function i(p){p.preventDefault(),e.onconfirm()}var s=aJ(),o=R(s),a=R(o),l=R(a),c=D(a,2),u=R(c),f=D(c,2),d=R(f);d.__click=function(...p){e.onclose?.apply(this,p)};var h=D(d,2),m=R(h);ln(s,p=>r=p,()=>r),ce(()=>{Te(l,e.title),Te(u,e.message),Te(m,n())}),st("close",s,function(...p){e.onclose?.apply(this,p)}),st("submit",o,i),z(t,s),ht()}Vt(["click"]);var cJ=W('<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 uJ(t,e){dt(e,!0);const n=ge(()=>X.externalChange?.event==="file-deleted");var r=an(),i=tt(r);{var s=o=>{var a=cJ(),l=R(a),c=R(l),u=D(l,2);u.__click=function(...d){e.onreload?.apply(this,d)};var f=D(u,2);f.__click=()=>{X.externalChange=null},ce(()=>Te(c,g(n)?"This file was deleted outside the editor.":"This file was changed outside the editor.")),z(o,a)};le(i,o=>{X.externalChange&&o(s)})}z(t,r),ht()}Vt(["click"]);var fJ=W("<!> <!>",1),dJ=W("<!> <!>",1),hJ=W('<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>'),pJ=W('<div class="editor-app svelte-16t0oly"><!></div> <!> <!> <!> <!> <!> <!>',1);function mJ(t,e){dt(e,!0),customElements.get("rf-diagram")||customElements.define("rf-diagram",oU),customElements.get("rf-sandbox")||customElements.define("rf-sandbox",cU),customElements.get("rf-map")||customElements.define("rf-map",aU);let n=J(!1),r=J(!1),i=J(!1),s=J(""),o=J(null),a=J(null),l=J(null),c=J(null),u=J(null),f="",d=0;ao(()=>{(async()=>{X.treeLoading=!0;try{const[ue,ke,Ce,ve,Ee]=await Promise.all([a_(),PH(),bH(),yH(),EH()]);X.tree=ue,X.runes=ke,X.previewRuntimeAvailable=Ce.previewRuntime,X.themeCss=Ce.themeCss,X.themeConfig=Ce.themeConfig,X.routeRules=ve??[],X.aggregated=Ee,Ce.hasCommunityTags&&re(()=>import("/api/community-tags.js"),[]).then(Ke=>{X.communityTags=Ke.communityTags??null,X.communityPostTransforms=Ke.communityPostTransforms??null,X.communityStyles=Ke.communityStyles??null}).catch(()=>{}),re(async()=>{const{createHighlightTransform:Ke}=await import("./index-RTh1eW1u.js");return{createHighlightTransform:Ke}},[]).then(({createHighlightTransform:Ke})=>Ke().then(Ye=>{X.highlightTransform=Ye,X.highlightCss=Ye.css})).catch(()=>{});const rt=ue.children?.find(Ke=>Ke.type==="page"&&Ke.name==="index.md");rt&&m(rt.path)}catch(ue){X.error=ue instanceof Error?ue.message:"Failed to load content tree"}finally{X.treeLoading=!1}})();let j;const U=$H((ue,ke)=>{if(clearTimeout(j),j=setTimeout(()=>h(),500),ke.path===X.currentPath){if(f===ke.path&&Date.now()-d<2e3)return;X.externalChange={path:ke.path,event:ue}}});return()=>{U(),clearTimeout(j)}});async function h(){try{X.tree=await a_()}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 U=await rm(j);X.loadFile(j,U.raw)}catch(U){X.error=U instanceof Error?U.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 gH(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 v(j){(j.metaKey||j.ctrlKey)&&j.key==="s"&&(j.preventDefault(),p())}async function O(j){try{const U=await _H(j);q(n,!1),await h(),await m(U.path)}catch(U){X.error=U instanceof Error?U.message:"Failed to create page"}}async function b(j){try{await l_(j),q(r,!1),q(n,!1),await h()}catch(U){X.error=U instanceof Error?U.message:"Failed to create directory"}}async function w(j){try{await l_({parent:"",name:j.name,createLayout:!0});const U={pattern:`${j.name}/**`,layout:j.layout},ue=[...X.routeRules],ke=ue.findIndex(Ce=>Ce.pattern==="**");ke>=0?ue.splice(ke,0,U):ue.push(U),await wH(ue),X.routeRules=ue,q(i,!1),await h()}catch(U){X.error=U instanceof Error?U.message:"Failed to create category"}}function S(j,U){q(l,{x:j.clientX,y:j.clientY,node:U},!0)}function _(j){const U=[];return j.type==="page"||j.type==="layout"?(U.push({label:"Rename",action:()=>{q(c,j,!0)}}),j.type==="page"&&(U.push({label:"Duplicate",action:()=>C(j)}),U.push({label:j.draft?"Publish":"Set as Draft",action:()=>k(j)})),U.push({label:"Delete",action:()=>{q(u,j,!0)},danger:!0})):j.type==="directory"&&(U.push({label:"Rename",action:()=>{q(c,j,!0)}}),U.push({label:"Delete",action:()=>{q(u,j,!0)},danger:!0})),U}async function x(j){if(!g(c))return;const U=g(c).path;try{const ue=await kH(U,j);q(c,null),await h(),X.currentPath===U&&await m(ue.newPath)}catch(ue){X.error=ue instanceof Error?ue.message:"Failed to rename"}}async function C(j){try{const U=await xH(j.path);await h(),await m(U.path)}catch(U){X.error=U instanceof Error?U.message:"Failed to duplicate"}}async function A(){if(!g(u))return;const j=g(u).path;try{await SH(j),q(u,null),await h(),X.currentPath===j&&(X.currentPath=null,X.editorContent="",X.savedContent="",X.bodyContent="",X.frontmatter={})}catch(U){X.error=U instanceof Error?U.message:"Failed to delete"}}async function y(){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 rm(X.externalChange.path);X.loadFile(j.path,j.raw)}X.externalChange=null}}async function k(j){try{if(await AH(j.path),await h(),X.currentPath===j.path){const U=await rm(j.path);X.loadFile(j.path,U.raw)}}catch(U){X.error=U instanceof Error?U.message:"Failed to toggle draft"}}var P=pJ();st("keydown",Zo,v);var T=tt(P),E=R(T);s5(E,{header:Ce=>{r5(Ce,{onsave:p})},left:Ce=>{_5(Ce,{onselectfile:m,onnewpage:(ve,Ee)=>{q(s,ve??"",!0),q(o,Ee,!0),q(n,!0)},onnewdirectory:ve=>{q(r,!0)},onnewcategory:ve=>{q(a,ve,!0),q(i,!0)},oncontextmenu:S})},center:Ce=>{var ve=dJ(),Ee=tt(ve);uJ(Ee,{onreload:y});var rt=D(Ee,2);{var Ke=Ve=>{PK(Ve,{})},Ye=Ve=>{var ze=fJ(),Bt=tt(ze);q5(Bt,{forceRawMode:!0});var In=D(Bt,2);uC(In,{}),z(Ve,ze)};le(rt,Ve=>{X.currentFileType==="layout"?Ve(Ke):X.currentPath&&Ve(Ye,1)})}z(Ce,ve)},right:Ce=>{var ve=an(),Ee=tt(ve);{var rt=Ye=>{var Ve=hJ();z(Ye,Ve)},Ke=Ye=>{DK(Ye,{children:(Ve,ze)=>{var Bt=an(),In=tt(Bt);{var tr=Wt=>{qK(Wt,{onnavigate:m})},bt=Wt=>{{let mn=ge(()=>X.editorMode==="code");JH(Wt,{get bodyContent(){return X.bodyContent},onchange:Wn=>X.updateBody(Wn),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(mn)},get communityTags(){return X.communityTags},get communityPostTransforms(){return X.communityPostTransforms},get communityStyles(){return X.communityStyles},get aggregated(){return X.aggregated}})}};le(In,Wt=>{X.editorMode==="preview"?Wt(tr):Wt(bt,!1)})}z(Ve,Bt)},$$slots:{default:!0}})};le(Ee,Ye=>{X.currentPath?X.currentFileType!=="layout"&&Ye(Ke,1):Ye(rt)})}z(Ce,ve)},$$slots:{header:!0,left:!0,center:!0,right:!0}});var Q=D(T,2);{var $=j=>{XK(j,{oncreate:O,oncreatefolder:b,onclose:()=>{q(n,!1)},get initialDirectory(){return g(s)},get anchorRect(){return g(o)}})};le(Q,j=>{g(n)&&g(o)&&j($)})}var L=D(Q,2);{var N=j=>{eJ(j,{oncreate:w,onclose:()=>{q(i,!1)},get anchorRect(){return g(a)}})};le(L,j=>{g(i)&&g(a)&&j(N)})}var Z=D(L,2);{var Y=j=>{UK(j,{oncreate:b,onclose:()=>{q(r,!1)}})};le(Z,j=>{g(r)&&j(Y)})}var ne=D(Z,2);{var ae=j=>{{let U=ge(()=>_(g(l).node));iJ(j,{get x(){return g(l).x},get y(){return g(l).y},get items(){return g(U)},onclose:()=>{q(l,null)}})}};le(ne,j=>{g(l)&&j(ae)})}var ie=D(ne,2);{var K=j=>{oJ(j,{get currentName(){return g(c).name},onrename:x,onclose:()=>{q(c,null)}})};le(ie,j=>{g(c)&&j(K)})}var he=D(ie,2);{var fe=j=>{{let U=ge(()=>g(u).type==="directory"?"directory":"file");lJ(j,{get title(){return`Delete ${g(U)??""}`},get message(){return`Are you sure you want to delete "${g(u).name??""}"? This cannot be undone.`},onconfirm:A,onclose:()=>{q(u,null)}})}};le(he,j=>{g(u)&&j(fe)})}z(t,P),ht()}m$(mJ,{target:document.getElementById("app")});export{KS as C,Yr as E,Zt as I,tl as L,Sx as N,re as _,il as a,_l as b,kf as c,bD as d,_S as e,fu as f,ol as g,wn as h,Kt as i,cd as j,Wq as k,Vq as l,Lx as m,wr as n,Pe as o,me as p,NA as q,Ax as r,wl as s,I as t,pA as u,Rx as v,li as w};