@unocss/inspector 0.37.2 → 0.37.3

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.
@@ -1,30 +0,0 @@
1
- var yg=Object.defineProperty,bg=Object.defineProperties;var wg=Object.getOwnPropertyDescriptors;var Bf=Object.getOwnPropertySymbols;var xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable;var jf=(r,s,l)=>s in r?yg(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Hl=(r,s)=>{for(var l in s||(s={}))xg.call(s,l)&&jf(r,l,s[l]);if(Bf)for(var l of Bf(s))kg.call(s,l)&&jf(r,l,s[l]);return r},Uf=(r,s)=>bg(r,wg(s));const Sg=function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const g of d.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&u(g)}).observe(document,{childList:!0,subtree:!0});function l(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerpolicy&&(d.referrerPolicy=f.referrerpolicy),f.crossorigin==="use-credentials"?d.credentials="include":f.crossorigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=l(f);fetch(f.href,d)}};Sg();const Cg="modulepreload",Kf={},_g="/__unocss/",pa=function(s,l){return!l||l.length===0?s():Promise.all(l.map(u=>{if(u=`${_g}${u}`,u in Kf)return;Kf[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const g=document.createElement("link");if(g.rel=f?"stylesheet":Cg,f||(g.as="script",g.crossOrigin=""),g.href=u,document.head.appendChild(g),f)return new Promise((b,y)=>{g.addEventListener("load",b),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>s())};function ga(r,s){const l=Object.create(null),u=r.split(",");for(let f=0;f<u.length;f++)l[u[f]]=!0;return s?f=>!!l[f.toLowerCase()]:f=>!!l[f]}const Tg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Lg=ga(Tg);function Yc(r){return!!r||r===""}function Oo(r){if(je(r)){const s={};for(let l=0;l<r.length;l++){const u=r[l],f=Nt(u)?Mg(u):Oo(u);if(f)for(const d in f)s[d]=f[d]}return s}else{if(Nt(r))return r;if(Lt(r))return r}}const Pg=/;(?![^(]*\))/g,Og=/:(.+)/;function Mg(r){const s={};return r.split(Pg).forEach(l=>{if(l){const u=l.split(Og);u.length>1&&(s[u[0].trim()]=u[1].trim())}}),s}function vi(r){let s="";if(Nt(r))s=r;else if(je(r))for(let l=0;l<r.length;l++){const u=vi(r[l]);u&&(s+=u+" ")}else if(Lt(r))for(const l in r)r[l]&&(s+=l+" ");return s.trim()}const rr=r=>Nt(r)?r:r==null?"":je(r)||Lt(r)&&(r.toString===Qc||!qe(r.toString))?JSON.stringify(r,Xc,2):String(r),Xc=(r,s)=>s&&s.__v_isRef?Xc(r,s.value):pi(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((l,[u,f])=>(l[`${u} =>`]=f,l),{})}:Zc(s)?{[`Set(${s.size})`]:[...s.values()]}:Lt(s)&&!je(s)&&!Vc(s)?String(s):s,st={},hi=[],kr=()=>{},Eg=()=>!1,Ag=/^on[^a-z]/,As=r=>Ag.test(r),va=r=>r.startsWith("onUpdate:"),Zt=Object.assign,ma=(r,s)=>{const l=r.indexOf(s);l>-1&&r.splice(l,1)},Ng=Object.prototype.hasOwnProperty,Ye=(r,s)=>Ng.call(r,s),je=Array.isArray,pi=r=>Ns(r)==="[object Map]",Zc=r=>Ns(r)==="[object Set]",qe=r=>typeof r=="function",Nt=r=>typeof r=="string",ya=r=>typeof r=="symbol",Lt=r=>r!==null&&typeof r=="object",Jc=r=>Lt(r)&&qe(r.then)&&qe(r.catch),Qc=Object.prototype.toString,Ns=r=>Qc.call(r),zg=r=>Ns(r).slice(8,-1),Vc=r=>Ns(r)==="[object Object]",ba=r=>Nt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ms=ga(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zs=r=>{const s=Object.create(null);return l=>s[l]||(s[l]=r(l))},Rg=/-(\w)/g,Rr=zs(r=>r.replace(Rg,(s,l)=>l?l.toUpperCase():"")),Dg=/\B([A-Z])/g,ki=zs(r=>r.replace(Dg,"-$1").toLowerCase()),Rs=zs(r=>r.charAt(0).toUpperCase()+r.slice(1)),Wl=zs(r=>r?`on${Rs(r)}`:""),ko=(r,s)=>!Object.is(r,s),Bl=(r,s)=>{for(let l=0;l<r.length;l++)r[l](s)},xs=(r,s,l)=>{Object.defineProperty(r,s,{configurable:!0,enumerable:!1,value:l})},Fg=r=>{const s=parseFloat(r);return isNaN(s)?r:s};let qf;const Ig=()=>qf||(qf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let ur;class Hg{constructor(s=!1){this.active=!0,this.effects=[],this.cleanups=[],!s&&ur&&(this.parent=ur,this.index=(ur.scopes||(ur.scopes=[])).push(this)-1)}run(s){if(this.active){const l=ur;try{return ur=this,s()}finally{ur=l}}}on(){ur=this}off(){ur=this.parent}stop(s){if(this.active){let l,u;for(l=0,u=this.effects.length;l<u;l++)this.effects[l].stop();for(l=0,u=this.cleanups.length;l<u;l++)this.cleanups[l]();if(this.scopes)for(l=0,u=this.scopes.length;l<u;l++)this.scopes[l].stop(!0);if(this.parent&&!s){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.active=!1}}}function Wg(r,s=ur){s&&s.active&&s.effects.push(r)}function Bg(){return ur}function jg(r){ur&&ur.cleanups.push(r)}const wa=r=>{const s=new Set(r);return s.w=0,s.n=0,s},ed=r=>(r.w&mn)>0,td=r=>(r.n&mn)>0,Ug=({deps:r})=>{if(r.length)for(let s=0;s<r.length;s++)r[s].w|=mn},Kg=r=>{const{deps:s}=r;if(s.length){let l=0;for(let u=0;u<s.length;u++){const f=s[u];ed(f)&&!td(f)?f.delete(r):s[l++]=f,f.w&=~mn,f.n&=~mn}s.length=l}},Xl=new WeakMap;let co=0,mn=1;const Zl=30;let wr;const Dn=Symbol(""),Jl=Symbol("");class xa{constructor(s,l=null,u){this.fn=s,this.scheduler=l,this.active=!0,this.deps=[],this.parent=void 0,Wg(this,u)}run(){if(!this.active)return this.fn();let s=wr,l=pn;for(;s;){if(s===this)return;s=s.parent}try{return this.parent=wr,wr=this,pn=!0,mn=1<<++co,co<=Zl?Ug(this):$f(this),this.fn()}finally{co<=Zl&&Kg(this),mn=1<<--co,wr=this.parent,pn=l,this.parent=void 0,this.deferStop&&this.stop()}}stop(){wr===this?this.deferStop=!0:this.active&&($f(this),this.onStop&&this.onStop(),this.active=!1)}}function $f(r){const{deps:s}=r;if(s.length){for(let l=0;l<s.length;l++)s[l].delete(r);s.length=0}}let pn=!0;const rd=[];function Si(){rd.push(pn),pn=!1}function Ci(){const r=rd.pop();pn=r===void 0?!0:r}function cr(r,s,l){if(pn&&wr){let u=Xl.get(r);u||Xl.set(r,u=new Map);let f=u.get(l);f||u.set(l,f=wa()),nd(f)}}function nd(r,s){let l=!1;co<=Zl?td(r)||(r.n|=mn,l=!ed(r)):l=!r.has(wr),l&&(r.add(wr),wr.deps.push(r))}function Gr(r,s,l,u,f,d){const g=Xl.get(r);if(!g)return;let b=[];if(s==="clear")b=[...g.values()];else if(l==="length"&&je(r))g.forEach((y,w)=>{(w==="length"||w>=u)&&b.push(y)});else switch(l!==void 0&&b.push(g.get(l)),s){case"add":je(r)?ba(l)&&b.push(g.get("length")):(b.push(g.get(Dn)),pi(r)&&b.push(g.get(Jl)));break;case"delete":je(r)||(b.push(g.get(Dn)),pi(r)&&b.push(g.get(Jl)));break;case"set":pi(r)&&b.push(g.get(Dn));break}if(b.length===1)b[0]&&Ql(b[0]);else{const y=[];for(const w of b)w&&y.push(...w);Ql(wa(y))}}function Ql(r,s){const l=je(r)?r:[...r];for(const u of l)u.computed&&Gf(u);for(const u of l)u.computed||Gf(u)}function Gf(r,s){(r!==wr||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const qg=ga("__proto__,__v_isRef,__isVue"),id=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(ya)),$g=ka(),Gg=ka(!1,!0),Yg=ka(!0),Yf=Xg();function Xg(){const r={};return["includes","indexOf","lastIndexOf"].forEach(s=>{r[s]=function(...l){const u=et(this);for(let d=0,g=this.length;d<g;d++)cr(u,"get",d+"");const f=u[s](...l);return f===-1||f===!1?u[s](...l.map(et)):f}}),["push","pop","shift","unshift","splice"].forEach(s=>{r[s]=function(...l){Si();const u=et(this)[s].apply(this,l);return Ci(),u}}),r}function ka(r=!1,s=!1){return function(u,f,d){if(f==="__v_isReactive")return!r;if(f==="__v_isReadonly")return r;if(f==="__v_isShallow")return s;if(f==="__v_raw"&&d===(r?s?cv:ud:s?ad:ld).get(u))return u;const g=je(u);if(!r&&g&&Ye(Yf,f))return Reflect.get(Yf,f,d);const b=Reflect.get(u,f,d);return(ya(f)?id.has(f):qg(f))||(r||cr(u,"get",f),s)?b:bt(b)?g&&ba(f)?b:b.value:Lt(b)?r?fd(b):_i(b):b}}const Zg=od(),Jg=od(!0);function od(r=!1){return function(l,u,f,d){let g=l[u];if(So(g)&&bt(g)&&!bt(f))return!1;if(!r&&!So(f)&&(Vl(f)||(f=et(f),g=et(g)),!je(l)&&bt(g)&&!bt(f)))return g.value=f,!0;const b=je(l)&&ba(u)?Number(u)<l.length:Ye(l,u),y=Reflect.set(l,u,f,d);return l===et(d)&&(b?ko(f,g)&&Gr(l,"set",u,f):Gr(l,"add",u,f)),y}}function Qg(r,s){const l=Ye(r,s);r[s];const u=Reflect.deleteProperty(r,s);return u&&l&&Gr(r,"delete",s,void 0),u}function Vg(r,s){const l=Reflect.has(r,s);return(!ya(s)||!id.has(s))&&cr(r,"has",s),l}function ev(r){return cr(r,"iterate",je(r)?"length":Dn),Reflect.ownKeys(r)}const sd={get:$g,set:Zg,deleteProperty:Qg,has:Vg,ownKeys:ev},tv={get:Yg,set(r,s){return!0},deleteProperty(r,s){return!0}},rv=Zt({},sd,{get:Gg,set:Jg}),Sa=r=>r,Ds=r=>Reflect.getPrototypeOf(r);function fs(r,s,l=!1,u=!1){r=r.__v_raw;const f=et(r),d=et(s);l||(s!==d&&cr(f,"get",s),cr(f,"get",d));const{has:g}=Ds(f),b=u?Sa:l?Ta:Co;if(g.call(f,s))return b(r.get(s));if(g.call(f,d))return b(r.get(d));r!==f&&r.get(s)}function cs(r,s=!1){const l=this.__v_raw,u=et(l),f=et(r);return s||(r!==f&&cr(u,"has",r),cr(u,"has",f)),r===f?l.has(r):l.has(r)||l.has(f)}function ds(r,s=!1){return r=r.__v_raw,!s&&cr(et(r),"iterate",Dn),Reflect.get(r,"size",r)}function Xf(r){r=et(r);const s=et(this);return Ds(s).has.call(s,r)||(s.add(r),Gr(s,"add",r,r)),this}function Zf(r,s){s=et(s);const l=et(this),{has:u,get:f}=Ds(l);let d=u.call(l,r);d||(r=et(r),d=u.call(l,r));const g=f.call(l,r);return l.set(r,s),d?ko(s,g)&&Gr(l,"set",r,s):Gr(l,"add",r,s),this}function Jf(r){const s=et(this),{has:l,get:u}=Ds(s);let f=l.call(s,r);f||(r=et(r),f=l.call(s,r)),u&&u.call(s,r);const d=s.delete(r);return f&&Gr(s,"delete",r,void 0),d}function Qf(){const r=et(this),s=r.size!==0,l=r.clear();return s&&Gr(r,"clear",void 0,void 0),l}function hs(r,s){return function(u,f){const d=this,g=d.__v_raw,b=et(g),y=s?Sa:r?Ta:Co;return!r&&cr(b,"iterate",Dn),g.forEach((w,S)=>u.call(f,y(w),y(S),d))}}function ps(r,s,l){return function(...u){const f=this.__v_raw,d=et(f),g=pi(d),b=r==="entries"||r===Symbol.iterator&&g,y=r==="keys"&&g,w=f[r](...u),S=l?Sa:s?Ta:Co;return!s&&cr(d,"iterate",y?Jl:Dn),{next(){const{value:T,done:O}=w.next();return O?{value:T,done:O}:{value:b?[S(T[0]),S(T[1])]:S(T),done:O}},[Symbol.iterator](){return this}}}}function an(r){return function(...s){return r==="delete"?!1:this}}function nv(){const r={get(d){return fs(this,d)},get size(){return ds(this)},has:cs,add:Xf,set:Zf,delete:Jf,clear:Qf,forEach:hs(!1,!1)},s={get(d){return fs(this,d,!1,!0)},get size(){return ds(this)},has:cs,add:Xf,set:Zf,delete:Jf,clear:Qf,forEach:hs(!1,!0)},l={get(d){return fs(this,d,!0)},get size(){return ds(this,!0)},has(d){return cs.call(this,d,!0)},add:an("add"),set:an("set"),delete:an("delete"),clear:an("clear"),forEach:hs(!0,!1)},u={get(d){return fs(this,d,!0,!0)},get size(){return ds(this,!0)},has(d){return cs.call(this,d,!0)},add:an("add"),set:an("set"),delete:an("delete"),clear:an("clear"),forEach:hs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{r[d]=ps(d,!1,!1),l[d]=ps(d,!0,!1),s[d]=ps(d,!1,!0),u[d]=ps(d,!0,!0)}),[r,l,s,u]}const[iv,ov,sv,lv]=nv();function Ca(r,s){const l=s?r?lv:sv:r?ov:iv;return(u,f,d)=>f==="__v_isReactive"?!r:f==="__v_isReadonly"?r:f==="__v_raw"?u:Reflect.get(Ye(l,f)&&f in u?l:u,f,d)}const av={get:Ca(!1,!1)},uv={get:Ca(!1,!0)},fv={get:Ca(!0,!1)},ld=new WeakMap,ad=new WeakMap,ud=new WeakMap,cv=new WeakMap;function dv(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hv(r){return r.__v_skip||!Object.isExtensible(r)?0:dv(zg(r))}function _i(r){return So(r)?r:_a(r,!1,sd,av,ld)}function pv(r){return _a(r,!1,rv,uv,ad)}function fd(r){return _a(r,!0,tv,fv,ud)}function _a(r,s,l,u,f){if(!Lt(r)||r.__v_raw&&!(s&&r.__v_isReactive))return r;const d=f.get(r);if(d)return d;const g=hv(r);if(g===0)return r;const b=new Proxy(r,g===2?u:l);return f.set(r,b),b}function gi(r){return So(r)?gi(r.__v_raw):!!(r&&r.__v_isReactive)}function So(r){return!!(r&&r.__v_isReadonly)}function Vl(r){return!!(r&&r.__v_isShallow)}function cd(r){return gi(r)||So(r)}function et(r){const s=r&&r.__v_raw;return s?et(s):r}function dd(r){return xs(r,"__v_skip",!0),r}const Co=r=>Lt(r)?_i(r):r,Ta=r=>Lt(r)?fd(r):r;function hd(r){pn&&wr&&(r=et(r),nd(r.dep||(r.dep=wa())))}function pd(r,s){r=et(r),r.dep&&Ql(r.dep)}function bt(r){return!!(r&&r.__v_isRef===!0)}function At(r){return gd(r,!1)}function po(r){return gd(r,!0)}function gd(r,s){return bt(r)?r:new gv(r,s)}class gv{constructor(s,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?s:et(s),this._value=l?s:Co(s)}get value(){return hd(this),this._value}set value(s){s=this.__v_isShallow?s:et(s),ko(s,this._rawValue)&&(this._rawValue=s,this._value=this.__v_isShallow?s:Co(s),pd(this))}}function Ae(r){return bt(r)?r.value:r}const vv={get:(r,s,l)=>Ae(Reflect.get(r,s,l)),set:(r,s,l,u)=>{const f=r[s];return bt(f)&&!bt(l)?(f.value=l,!0):Reflect.set(r,s,l,u)}};function vd(r){return gi(r)?r:new Proxy(r,vv)}function mv(r){const s=je(r)?new Array(r.length):{};for(const l in r)s[l]=bv(r,l);return s}class yv{constructor(s,l,u){this._object=s,this._key=l,this._defaultValue=u,this.__v_isRef=!0}get value(){const s=this._object[this._key];return s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}}function bv(r,s,l){const u=r[s];return bt(u)?u:new yv(r,s,l)}class wv{constructor(s,l,u,f){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new xa(s,()=>{this._dirty||(this._dirty=!0,pd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=u}get value(){const s=et(this);return hd(s),(s._dirty||!s._cacheable)&&(s._dirty=!1,s._value=s.effect.run()),s._value}set value(s){this._setter(s)}}function xv(r,s,l=!1){let u,f;const d=qe(r);return d?(u=r,f=kr):(u=r.get,f=r.set),new wv(u,f,d||!f,l)}function gn(r,s,l,u){let f;try{f=u?r(...u):r()}catch(d){Fs(d,s,l)}return f}function Sr(r,s,l,u){if(qe(r)){const d=gn(r,s,l,u);return d&&Jc(d)&&d.catch(g=>{Fs(g,s,l)}),d}const f=[];for(let d=0;d<r.length;d++)f.push(Sr(r[d],s,l,u));return f}function Fs(r,s,l,u=!0){const f=s?s.vnode:null;if(s){let d=s.parent;const g=s.proxy,b=l;for(;d;){const w=d.ec;if(w){for(let S=0;S<w.length;S++)if(w[S](r,g,b)===!1)return}d=d.parent}const y=s.appContext.config.errorHandler;if(y){gn(y,null,10,[r,g,b]);return}}kv(r,l,f,u)}function kv(r,s,l,u=!0){console.error(r)}let ks=!1,ea=!1;const fr=[];let qr=0;const go=[];let ho=null,ui=0;const vo=[];let cn=null,fi=0;const md=Promise.resolve();let La=null,ta=null;function Is(r){const s=La||md;return r?s.then(this?r.bind(this):r):s}function Sv(r){let s=qr+1,l=fr.length;for(;s<l;){const u=s+l>>>1;_o(fr[u])<r?s=u+1:l=u}return s}function yd(r){(!fr.length||!fr.includes(r,ks&&r.allowRecurse?qr+1:qr))&&r!==ta&&(r.id==null?fr.push(r):fr.splice(Sv(r.id),0,r),bd())}function bd(){!ks&&!ea&&(ea=!0,La=md.then(kd))}function Cv(r){const s=fr.indexOf(r);s>qr&&fr.splice(s,1)}function wd(r,s,l,u){je(r)?l.push(...r):(!s||!s.includes(r,r.allowRecurse?u+1:u))&&l.push(r),bd()}function _v(r){wd(r,ho,go,ui)}function Tv(r){wd(r,cn,vo,fi)}function Hs(r,s=null){if(go.length){for(ta=s,ho=[...new Set(go)],go.length=0,ui=0;ui<ho.length;ui++)ho[ui]();ho=null,ui=0,ta=null,Hs(r,s)}}function xd(r){if(Hs(),vo.length){const s=[...new Set(vo)];if(vo.length=0,cn){cn.push(...s);return}for(cn=s,cn.sort((l,u)=>_o(l)-_o(u)),fi=0;fi<cn.length;fi++)cn[fi]();cn=null,fi=0}}const _o=r=>r.id==null?1/0:r.id;function kd(r){ea=!1,ks=!0,Hs(r),fr.sort((l,u)=>_o(l)-_o(u));const s=kr;try{for(qr=0;qr<fr.length;qr++){const l=fr[qr];l&&l.active!==!1&&gn(l,null,14)}}finally{qr=0,fr.length=0,xd(),ks=!1,La=null,(fr.length||go.length||vo.length)&&kd(r)}}function Lv(r,s,...l){if(r.isUnmounted)return;const u=r.vnode.props||st;let f=l;const d=s.startsWith("update:"),g=d&&s.slice(7);if(g&&g in u){const S=`${g==="modelValue"?"model":g}Modifiers`,{number:T,trim:O}=u[S]||st;O&&(f=l.map(M=>M.trim())),T&&(f=l.map(Fg))}let b,y=u[b=Wl(s)]||u[b=Wl(Rr(s))];!y&&d&&(y=u[b=Wl(ki(s))]),y&&Sr(y,r,6,f);const w=u[b+"Once"];if(w){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,Sr(w,r,6,f)}}function Sd(r,s,l=!1){const u=s.emitsCache,f=u.get(r);if(f!==void 0)return f;const d=r.emits;let g={},b=!1;if(!qe(r)){const y=w=>{const S=Sd(w,s,!0);S&&(b=!0,Zt(g,S))};!l&&s.mixins.length&&s.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!d&&!b?(u.set(r,null),null):(je(d)?d.forEach(y=>g[y]=null):Zt(g,d),u.set(r,g),g)}function Ws(r,s){return!r||!As(s)?!1:(s=s.slice(2).replace(/Once$/,""),Ye(r,s[0].toLowerCase()+s.slice(1))||Ye(r,ki(s))||Ye(r,s))}let Xt=null,Cd=null;function Ss(r){const s=Xt;return Xt=r,Cd=r&&r.type.__scopeId||null,s}function vn(r,s=Xt,l){if(!s||r._n)return r;const u=(...f)=>{u._d&&uc(-1);const d=Ss(s),g=r(...f);return Ss(d),u._d&&uc(1),g};return u._n=!0,u._c=!0,u._d=!0,u}function jl(r){const{type:s,vnode:l,proxy:u,withProxy:f,props:d,propsOptions:[g],slots:b,attrs:y,emit:w,render:S,renderCache:T,data:O,setupState:M,ctx:H,inheritAttrs:re}=r;let V,A;const D=Ss(r);try{if(l.shapeFlag&4){const B=f||u;V=zr(S.call(B,B,T,d,M,O,H)),A=y}else{const B=s;V=zr(B.length>1?B(d,{attrs:y,slots:b,emit:w}):B(d,null)),A=s.props?y:Pv(y)}}catch(B){yo.length=0,Fs(B,r,1),V=ot(yn)}let I=V;if(A&&re!==!1){const B=Object.keys(A),{shapeFlag:oe}=I;B.length&&oe&7&&(g&&B.some(va)&&(A=Ov(A,g)),I=yi(I,A))}return l.dirs&&(I=yi(I),I.dirs=I.dirs?I.dirs.concat(l.dirs):l.dirs),l.transition&&(I.transition=l.transition),V=I,Ss(D),V}const Pv=r=>{let s;for(const l in r)(l==="class"||l==="style"||As(l))&&((s||(s={}))[l]=r[l]);return s},Ov=(r,s)=>{const l={};for(const u in r)(!va(u)||!(u.slice(9)in s))&&(l[u]=r[u]);return l};function Mv(r,s,l){const{props:u,children:f,component:d}=r,{props:g,children:b,patchFlag:y}=s,w=d.emitsOptions;if(s.dirs||s.transition)return!0;if(l&&y>=0){if(y&1024)return!0;if(y&16)return u?Vf(u,g,w):!!g;if(y&8){const S=s.dynamicProps;for(let T=0;T<S.length;T++){const O=S[T];if(g[O]!==u[O]&&!Ws(w,O))return!0}}}else return(f||b)&&(!b||!b.$stable)?!0:u===g?!1:u?g?Vf(u,g,w):!0:!!g;return!1}function Vf(r,s,l){const u=Object.keys(s);if(u.length!==Object.keys(r).length)return!0;for(let f=0;f<u.length;f++){const d=u[f];if(s[d]!==r[d]&&!Ws(l,d))return!0}return!1}function Ev({vnode:r,parent:s},l){for(;s&&s.subTree===r;)(r=s.vnode).el=l,s=s.parent}const Av=r=>r.__isSuspense;function Nv(r,s){s&&s.pendingBranch?je(r)?s.effects.push(...r):s.effects.push(r):Tv(r)}function ys(r,s){if(Et){let l=Et.provides;const u=Et.parent&&Et.parent.provides;u===l&&(l=Et.provides=Object.create(u)),l[r]=s}}function $r(r,s,l=!1){const u=Et||Xt;if(u){const f=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(f&&r in f)return f[r];if(arguments.length>1)return l&&qe(s)?s.call(u.proxy):s}}function zv(r,s){return Pa(r,null,s)}const ec={};function It(r,s,l){return Pa(r,s,l)}function Pa(r,s,{immediate:l,deep:u,flush:f,onTrack:d,onTrigger:g}=st){const b=Et;let y,w=!1,S=!1;if(bt(r)?(y=()=>r.value,w=Vl(r)):gi(r)?(y=()=>r,u=!0):je(r)?(S=!0,w=r.some(A=>gi(A)||Vl(A)),y=()=>r.map(A=>{if(bt(A))return A.value;if(gi(A))return di(A);if(qe(A))return gn(A,b,2)})):qe(r)?s?y=()=>gn(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return T&&T(),Sr(r,b,3,[O])}:y=kr,s&&u){const A=y;y=()=>di(A())}let T,O=A=>{T=V.onStop=()=>{gn(A,b,4)}};if(Lo)return O=kr,s?l&&Sr(s,b,3,[y(),S?[]:void 0,O]):y(),kr;let M=S?[]:ec;const H=()=>{if(!!V.active)if(s){const A=V.run();(u||w||(S?A.some((D,I)=>ko(D,M[I])):ko(A,M)))&&(T&&T(),Sr(s,b,3,[A,M===ec?void 0:M,O]),M=A)}else V.run()};H.allowRecurse=!!s;let re;f==="sync"?re=H:f==="post"?re=()=>tr(H,b&&b.suspense):re=()=>_v(H);const V=new xa(y,re);return s?l?H():M=V.run():f==="post"?tr(V.run.bind(V),b&&b.suspense):V.run(),()=>{V.stop(),b&&b.scope&&ma(b.scope.effects,V)}}function Rv(r,s,l){const u=this.proxy,f=Nt(r)?r.includes(".")?_d(u,r):()=>u[r]:r.bind(u,u);let d;qe(s)?d=s:(d=s.handler,l=s);const g=Et;bi(this);const b=Pa(f,d.bind(u),l);return g?bi(g):Fn(),b}function _d(r,s){const l=s.split(".");return()=>{let u=r;for(let f=0;f<l.length&&u;f++)u=u[l[f]];return u}}function di(r,s){if(!Lt(r)||r.__v_skip||(s=s||new Set,s.has(r)))return r;if(s.add(r),bt(r))di(r.value,s);else if(je(r))for(let l=0;l<r.length;l++)di(r[l],s);else if(Zc(r)||pi(r))r.forEach(l=>{di(l,s)});else if(Vc(r))for(const l in r)di(r[l],s);return r}function Dr(r){return qe(r)?{setup:r,name:r.name}:r}const mo=r=>!!r.type.__asyncLoader,Td=r=>r.type.__isKeepAlive;function Dv(r,s){Ld(r,"a",s)}function Fv(r,s){Ld(r,"da",s)}function Ld(r,s,l=Et){const u=r.__wdc||(r.__wdc=()=>{let f=l;for(;f;){if(f.isDeactivated)return;f=f.parent}return r()});if(Bs(s,u,l),l){let f=l.parent;for(;f&&f.parent;)Td(f.parent.vnode)&&Iv(u,s,l,f),f=f.parent}}function Iv(r,s,l,u){const f=Bs(s,r,u,!0);Od(()=>{ma(u[s],f)},l)}function Bs(r,s,l=Et,u=!1){if(l){const f=l[r]||(l[r]=[]),d=s.__weh||(s.__weh=(...g)=>{if(l.isUnmounted)return;Si(),bi(l);const b=Sr(s,l,r,g);return Fn(),Ci(),b});return u?f.unshift(d):f.push(d),d}}const Yr=r=>(s,l=Et)=>(!Lo||r==="sp")&&Bs(r,s,l),Pd=Yr("bm"),Oa=Yr("m"),Hv=Yr("bu"),Wv=Yr("u"),Bv=Yr("bum"),Od=Yr("um"),jv=Yr("sp"),Uv=Yr("rtg"),Kv=Yr("rtc");function qv(r,s=Et){Bs("ec",r,s)}function An(r,s,l,u){const f=r.dirs,d=s&&s.dirs;for(let g=0;g<f.length;g++){const b=f[g];d&&(b.oldValue=d[g].value);let y=b.dir[u];y&&(Si(),Sr(y,l,8,[r.el,b,r,s]),Ci())}}const Md="components";function Cs(r,s){return Gv(Md,r,!0,s)||r}const $v=Symbol();function Gv(r,s,l=!0,u=!1){const f=Xt||Et;if(f){const d=f.type;if(r===Md){const b=km(d);if(b&&(b===s||b===Rr(s)||b===Rs(Rr(s))))return d}const g=tc(f[r]||d[r],s)||tc(f.appContext[r],s);return!g&&u?d:g}}function tc(r,s){return r&&(r[s]||r[Rr(s)]||r[Rs(Rr(s))])}function rc(r,s,l,u){let f;const d=l&&l[u];if(je(r)||Nt(r)){f=new Array(r.length);for(let g=0,b=r.length;g<b;g++)f[g]=s(r[g],g,void 0,d&&d[g])}else if(typeof r=="number"){f=new Array(r);for(let g=0;g<r;g++)f[g]=s(g+1,g,void 0,d&&d[g])}else if(Lt(r))if(r[Symbol.iterator])f=Array.from(r,(g,b)=>s(g,b,void 0,d&&d[b]));else{const g=Object.keys(r);f=new Array(g.length);for(let b=0,y=g.length;b<y;b++){const w=g[b];f[b]=s(r[w],w,b,d&&d[b])}}else f=[];return l&&(l[u]=f),f}function Ed(r,s,l={},u,f){if(Xt.isCE||Xt.parent&&mo(Xt.parent)&&Xt.parent.isCE)return ot("slot",s==="default"?null:{name:s},u&&u());let d=r[s];d&&d._c&&(d._d=!1),gt();const g=d&&Ad(d(l)),b=mi(nr,{key:l.key||`_${s}`},g||(u?u():[]),g&&r._===1?64:-2);return!f&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function Ad(r){return r.some(s=>Ls(s)?!(s.type===yn||s.type===nr&&!Ad(s.children)):!0)?r:null}const ra=r=>r?Kd(r)?za(r)||r.proxy:ra(r.parent):null,_s=Zt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>ra(r.parent),$root:r=>ra(r.root),$emit:r=>r.emit,$options:r=>zd(r),$forceUpdate:r=>r.f||(r.f=()=>yd(r.update)),$nextTick:r=>r.n||(r.n=Is.bind(r.proxy)),$watch:r=>Rv.bind(r)}),Yv={get({_:r},s){const{ctx:l,setupState:u,data:f,props:d,accessCache:g,type:b,appContext:y}=r;let w;if(s[0]!=="$"){const M=g[s];if(M!==void 0)switch(M){case 1:return u[s];case 2:return f[s];case 4:return l[s];case 3:return d[s]}else{if(u!==st&&Ye(u,s))return g[s]=1,u[s];if(f!==st&&Ye(f,s))return g[s]=2,f[s];if((w=r.propsOptions[0])&&Ye(w,s))return g[s]=3,d[s];if(l!==st&&Ye(l,s))return g[s]=4,l[s];na&&(g[s]=0)}}const S=_s[s];let T,O;if(S)return s==="$attrs"&&cr(r,"get",s),S(r);if((T=b.__cssModules)&&(T=T[s]))return T;if(l!==st&&Ye(l,s))return g[s]=4,l[s];if(O=y.config.globalProperties,Ye(O,s))return O[s]},set({_:r},s,l){const{data:u,setupState:f,ctx:d}=r;return f!==st&&Ye(f,s)?(f[s]=l,!0):u!==st&&Ye(u,s)?(u[s]=l,!0):Ye(r.props,s)||s[0]==="$"&&s.slice(1)in r?!1:(d[s]=l,!0)},has({_:{data:r,setupState:s,accessCache:l,ctx:u,appContext:f,propsOptions:d}},g){let b;return!!l[g]||r!==st&&Ye(r,g)||s!==st&&Ye(s,g)||(b=d[0])&&Ye(b,g)||Ye(u,g)||Ye(_s,g)||Ye(f.config.globalProperties,g)},defineProperty(r,s,l){return l.get!=null?r._.accessCache[s]=0:Ye(l,"value")&&this.set(r,s,l.value,null),Reflect.defineProperty(r,s,l)}};let na=!0;function Xv(r){const s=zd(r),l=r.proxy,u=r.ctx;na=!1,s.beforeCreate&&nc(s.beforeCreate,r,"bc");const{data:f,computed:d,methods:g,watch:b,provide:y,inject:w,created:S,beforeMount:T,mounted:O,beforeUpdate:M,updated:H,activated:re,deactivated:V,beforeDestroy:A,beforeUnmount:D,destroyed:I,unmounted:B,render:oe,renderTracked:pe,renderTriggered:ye,errorCaptured:We,serverPrefetch:Ne,expose:be,inheritAttrs:de,components:Ee,directives:j,filters:$}=s;if(w&&Zv(w,u,null,r.appContext.config.unwrapInjectedRef),g)for(const Y in g){const ae=g[Y];qe(ae)&&(u[Y]=ae.bind(l))}if(f){const Y=f.call(l,l);Lt(Y)&&(r.data=_i(Y))}if(na=!0,d)for(const Y in d){const ae=d[Y],Re=qe(ae)?ae.bind(l,l):qe(ae.get)?ae.get.bind(l,l):kr,Ge=!qe(ae)&&qe(ae.set)?ae.set.bind(l):kr,nt=ct({get:Re,set:Ge});Object.defineProperty(u,Y,{enumerable:!0,configurable:!0,get:()=>nt.value,set:lt=>nt.value=lt})}if(b)for(const Y in b)Nd(b[Y],u,l,Y);if(y){const Y=qe(y)?y.call(l):y;Reflect.ownKeys(Y).forEach(ae=>{ys(ae,Y[ae])})}S&&nc(S,r,"c");function ee(Y,ae){je(ae)?ae.forEach(Re=>Y(Re.bind(l))):ae&&Y(ae.bind(l))}if(ee(Pd,T),ee(Oa,O),ee(Hv,M),ee(Wv,H),ee(Dv,re),ee(Fv,V),ee(qv,We),ee(Kv,pe),ee(Uv,ye),ee(Bv,D),ee(Od,B),ee(jv,Ne),je(be))if(be.length){const Y=r.exposed||(r.exposed={});be.forEach(ae=>{Object.defineProperty(Y,ae,{get:()=>l[ae],set:Re=>l[ae]=Re})})}else r.exposed||(r.exposed={});oe&&r.render===kr&&(r.render=oe),de!=null&&(r.inheritAttrs=de),Ee&&(r.components=Ee),j&&(r.directives=j)}function Zv(r,s,l=kr,u=!1){je(r)&&(r=ia(r));for(const f in r){const d=r[f];let g;Lt(d)?"default"in d?g=$r(d.from||f,d.default,!0):g=$r(d.from||f):g=$r(d),bt(g)&&u?Object.defineProperty(s,f,{enumerable:!0,configurable:!0,get:()=>g.value,set:b=>g.value=b}):s[f]=g}}function nc(r,s,l){Sr(je(r)?r.map(u=>u.bind(s.proxy)):r.bind(s.proxy),s,l)}function Nd(r,s,l,u){const f=u.includes(".")?_d(l,u):()=>l[u];if(Nt(r)){const d=s[r];qe(d)&&It(f,d)}else if(qe(r))It(f,r.bind(l));else if(Lt(r))if(je(r))r.forEach(d=>Nd(d,s,l,u));else{const d=qe(r.handler)?r.handler.bind(l):s[r.handler];qe(d)&&It(f,d,r)}}function zd(r){const s=r.type,{mixins:l,extends:u}=s,{mixins:f,optionsCache:d,config:{optionMergeStrategies:g}}=r.appContext,b=d.get(s);let y;return b?y=b:!f.length&&!l&&!u?y=s:(y={},f.length&&f.forEach(w=>Ts(y,w,g,!0)),Ts(y,s,g)),d.set(s,y),y}function Ts(r,s,l,u=!1){const{mixins:f,extends:d}=s;d&&Ts(r,d,l,!0),f&&f.forEach(g=>Ts(r,g,l,!0));for(const g in s)if(!(u&&g==="expose")){const b=Jv[g]||l&&l[g];r[g]=b?b(r[g],s[g]):s[g]}return r}const Jv={data:ic,props:zn,emits:zn,methods:zn,computed:zn,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:zn,directives:zn,watch:Vv,provide:ic,inject:Qv};function ic(r,s){return s?r?function(){return Zt(qe(r)?r.call(this,this):r,qe(s)?s.call(this,this):s)}:s:r}function Qv(r,s){return zn(ia(r),ia(s))}function ia(r){if(je(r)){const s={};for(let l=0;l<r.length;l++)s[r[l]]=r[l];return s}return r}function Yt(r,s){return r?[...new Set([].concat(r,s))]:s}function zn(r,s){return r?Zt(Zt(Object.create(null),r),s):s}function Vv(r,s){if(!r)return s;if(!s)return r;const l=Zt(Object.create(null),r);for(const u in s)l[u]=Yt(r[u],s[u]);return l}function em(r,s,l,u=!1){const f={},d={};xs(d,js,1),r.propsDefaults=Object.create(null),Rd(r,s,f,d);for(const g in r.propsOptions[0])g in f||(f[g]=void 0);l?r.props=u?f:pv(f):r.type.props?r.props=f:r.props=d,r.attrs=d}function tm(r,s,l,u){const{props:f,attrs:d,vnode:{patchFlag:g}}=r,b=et(f),[y]=r.propsOptions;let w=!1;if((u||g>0)&&!(g&16)){if(g&8){const S=r.vnode.dynamicProps;for(let T=0;T<S.length;T++){let O=S[T];if(Ws(r.emitsOptions,O))continue;const M=s[O];if(y)if(Ye(d,O))M!==d[O]&&(d[O]=M,w=!0);else{const H=Rr(O);f[H]=oa(y,b,H,M,r,!1)}else M!==d[O]&&(d[O]=M,w=!0)}}}else{Rd(r,s,f,d)&&(w=!0);let S;for(const T in b)(!s||!Ye(s,T)&&((S=ki(T))===T||!Ye(s,S)))&&(y?l&&(l[T]!==void 0||l[S]!==void 0)&&(f[T]=oa(y,b,T,void 0,r,!0)):delete f[T]);if(d!==b)for(const T in d)(!s||!Ye(s,T)&&!0)&&(delete d[T],w=!0)}w&&Gr(r,"set","$attrs")}function Rd(r,s,l,u){const[f,d]=r.propsOptions;let g=!1,b;if(s)for(let y in s){if(ms(y))continue;const w=s[y];let S;f&&Ye(f,S=Rr(y))?!d||!d.includes(S)?l[S]=w:(b||(b={}))[S]=w:Ws(r.emitsOptions,y)||(!(y in u)||w!==u[y])&&(u[y]=w,g=!0)}if(d){const y=et(l),w=b||st;for(let S=0;S<d.length;S++){const T=d[S];l[T]=oa(f,y,T,w[T],r,!Ye(w,T))}}return g}function oa(r,s,l,u,f,d){const g=r[l];if(g!=null){const b=Ye(g,"default");if(b&&u===void 0){const y=g.default;if(g.type!==Function&&qe(y)){const{propsDefaults:w}=f;l in w?u=w[l]:(bi(f),u=w[l]=y.call(null,s),Fn())}else u=y}g[0]&&(d&&!b?u=!1:g[1]&&(u===""||u===ki(l))&&(u=!0))}return u}function Dd(r,s,l=!1){const u=s.propsCache,f=u.get(r);if(f)return f;const d=r.props,g={},b=[];let y=!1;if(!qe(r)){const S=T=>{y=!0;const[O,M]=Dd(T,s,!0);Zt(g,O),M&&b.push(...M)};!l&&s.mixins.length&&s.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!d&&!y)return u.set(r,hi),hi;if(je(d))for(let S=0;S<d.length;S++){const T=Rr(d[S]);oc(T)&&(g[T]=st)}else if(d)for(const S in d){const T=Rr(S);if(oc(T)){const O=d[S],M=g[T]=je(O)||qe(O)?{type:O}:O;if(M){const H=ac(Boolean,M.type),re=ac(String,M.type);M[0]=H>-1,M[1]=re<0||H<re,(H>-1||Ye(M,"default"))&&b.push(T)}}}const w=[g,b];return u.set(r,w),w}function oc(r){return r[0]!=="$"}function sc(r){const s=r&&r.toString().match(/^\s*function (\w+)/);return s?s[1]:r===null?"null":""}function lc(r,s){return sc(r)===sc(s)}function ac(r,s){return je(s)?s.findIndex(l=>lc(l,r)):qe(s)&&lc(s,r)?0:-1}const Fd=r=>r[0]==="_"||r==="$stable",Ma=r=>je(r)?r.map(zr):[zr(r)],rm=(r,s,l)=>{if(s._n)return s;const u=vn((...f)=>Ma(s(...f)),l);return u._c=!1,u},Id=(r,s,l)=>{const u=r._ctx;for(const f in r){if(Fd(f))continue;const d=r[f];if(qe(d))s[f]=rm(f,d,u);else if(d!=null){const g=Ma(d);s[f]=()=>g}}},Hd=(r,s)=>{const l=Ma(s);r.slots.default=()=>l},nm=(r,s)=>{if(r.vnode.shapeFlag&32){const l=s._;l?(r.slots=et(s),xs(s,"_",l)):Id(s,r.slots={})}else r.slots={},s&&Hd(r,s);xs(r.slots,js,1)},im=(r,s,l)=>{const{vnode:u,slots:f}=r;let d=!0,g=st;if(u.shapeFlag&32){const b=s._;b?l&&b===1?d=!1:(Zt(f,s),!l&&b===1&&delete f._):(d=!s.$stable,Id(s,f)),g=s}else s&&(Hd(r,s),g={default:1});if(d)for(const b in f)!Fd(b)&&!(b in g)&&delete f[b]};function Wd(){return{app:null,config:{isNativeTag:Eg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let om=0;function sm(r,s){return function(u,f=null){qe(u)||(u=Object.assign({},u)),f!=null&&!Lt(f)&&(f=null);const d=Wd(),g=new Set;let b=!1;const y=d.app={_uid:om++,_component:u,_props:f,_container:null,_context:d,_instance:null,version:Cm,get config(){return d.config},set config(w){},use(w,...S){return g.has(w)||(w&&qe(w.install)?(g.add(w),w.install(y,...S)):qe(w)&&(g.add(w),w(y,...S))),y},mixin(w){return d.mixins.includes(w)||d.mixins.push(w),y},component(w,S){return S?(d.components[w]=S,y):d.components[w]},directive(w,S){return S?(d.directives[w]=S,y):d.directives[w]},mount(w,S,T){if(!b){const O=ot(u,f);return O.appContext=d,S&&s?s(O,w):r(O,w,T),b=!0,y._container=w,w.__vue_app__=y,za(O.component)||O.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(w,S){return d.provides[w]=S,y}};return y}}function sa(r,s,l,u,f=!1){if(je(r)){r.forEach((O,M)=>sa(O,s&&(je(s)?s[M]:s),l,u,f));return}if(mo(u)&&!f)return;const d=u.shapeFlag&4?za(u.component)||u.component.proxy:u.el,g=f?null:d,{i:b,r:y}=r,w=s&&s.r,S=b.refs===st?b.refs={}:b.refs,T=b.setupState;if(w!=null&&w!==y&&(Nt(w)?(S[w]=null,Ye(T,w)&&(T[w]=null)):bt(w)&&(w.value=null)),qe(y))gn(y,b,12,[g,S]);else{const O=Nt(y),M=bt(y);if(O||M){const H=()=>{if(r.f){const re=O?S[y]:y.value;f?je(re)&&ma(re,d):je(re)?re.includes(d)||re.push(d):O?(S[y]=[d],Ye(T,y)&&(T[y]=S[y])):(y.value=[d],r.k&&(S[r.k]=y.value))}else O?(S[y]=g,Ye(T,y)&&(T[y]=g)):bt(y)&&(y.value=g,r.k&&(S[r.k]=g))};g?(H.id=-1,tr(H,l)):H()}}}const tr=Nv;function lm(r){return am(r)}function am(r,s){const l=Ig();l.__VUE__=!0;const{insert:u,remove:f,patchProp:d,createElement:g,createText:b,createComment:y,setText:w,setElementText:S,parentNode:T,nextSibling:O,setScopeId:M=kr,cloneNode:H,insertStaticContent:re}=r,V=(L,N,F,G=null,J=null,ne=null,fe=!1,ce=null,te=!!N.dynamicChildren)=>{if(L===N)return;L&&!ao(L,N)&&(G=se(L),Ie(L,J,ne,!0),L=null),N.patchFlag===-2&&(te=!1,N.dynamicChildren=null);const{type:_,ref:W,shapeFlag:z}=N;switch(_){case Ea:A(L,N,F,G);break;case yn:D(L,N,F,G);break;case Ul:L==null&&I(N,F,G,fe);break;case nr:j(L,N,F,G,J,ne,fe,ce,te);break;default:z&1?pe(L,N,F,G,J,ne,fe,ce,te):z&6?$(L,N,F,G,J,ne,fe,ce,te):(z&64||z&128)&&_.process(L,N,F,G,J,ne,fe,ce,te,Se)}W!=null&&J&&sa(W,L&&L.ref,ne,N||L,!N)},A=(L,N,F,G)=>{if(L==null)u(N.el=b(N.children),F,G);else{const J=N.el=L.el;N.children!==L.children&&w(J,N.children)}},D=(L,N,F,G)=>{L==null?u(N.el=y(N.children||""),F,G):N.el=L.el},I=(L,N,F,G)=>{[L.el,L.anchor]=re(L.children,N,F,G,L.el,L.anchor)},B=({el:L,anchor:N},F,G)=>{let J;for(;L&&L!==N;)J=O(L),u(L,F,G),L=J;u(N,F,G)},oe=({el:L,anchor:N})=>{let F;for(;L&&L!==N;)F=O(L),f(L),L=F;f(N)},pe=(L,N,F,G,J,ne,fe,ce,te)=>{fe=fe||N.type==="svg",L==null?ye(N,F,G,J,ne,fe,ce,te):be(L,N,J,ne,fe,ce,te)},ye=(L,N,F,G,J,ne,fe,ce)=>{let te,_;const{type:W,props:z,shapeFlag:he,transition:Le,patchFlag:Be,dirs:Je}=L;if(L.el&&H!==void 0&&Be===-1)te=L.el=H(L.el);else{if(te=L.el=g(L.type,ne,z&&z.is,z),he&8?S(te,L.children):he&16&&Ne(L.children,te,null,G,J,ne&&W!=="foreignObject",fe,ce),Je&&An(L,null,G,"created"),z){for(const He in z)He!=="value"&&!ms(He)&&d(te,He,null,z[He],ne,L.children,G,J,K);"value"in z&&d(te,"value",null,z.value),(_=z.onVnodeBeforeMount)&&Ar(_,G,L)}We(te,L,L.scopeId,fe,G)}Je&&An(L,null,G,"beforeMount");const Ke=(!J||J&&!J.pendingBranch)&&Le&&!Le.persisted;Ke&&Le.beforeEnter(te),u(te,N,F),((_=z&&z.onVnodeMounted)||Ke||Je)&&tr(()=>{_&&Ar(_,G,L),Ke&&Le.enter(te),Je&&An(L,null,G,"mounted")},J)},We=(L,N,F,G,J)=>{if(F&&M(L,F),G)for(let ne=0;ne<G.length;ne++)M(L,G[ne]);if(J){let ne=J.subTree;if(N===ne){const fe=J.vnode;We(L,fe,fe.scopeId,fe.slotScopeIds,J.parent)}}},Ne=(L,N,F,G,J,ne,fe,ce,te=0)=>{for(let _=te;_<L.length;_++){const W=L[_]=ce?dn(L[_]):zr(L[_]);V(null,W,N,F,G,J,ne,fe,ce)}},be=(L,N,F,G,J,ne,fe)=>{const ce=N.el=L.el;let{patchFlag:te,dynamicChildren:_,dirs:W}=N;te|=L.patchFlag&16;const z=L.props||st,he=N.props||st;let Le;F&&Nn(F,!1),(Le=he.onVnodeBeforeUpdate)&&Ar(Le,F,N,L),W&&An(N,L,F,"beforeUpdate"),F&&Nn(F,!0);const Be=J&&N.type!=="foreignObject";if(_?de(L.dynamicChildren,_,ce,F,G,Be,ne):fe||Re(L,N,ce,null,F,G,Be,ne,!1),te>0){if(te&16)Ee(ce,N,z,he,F,G,J);else if(te&2&&z.class!==he.class&&d(ce,"class",null,he.class,J),te&4&&d(ce,"style",z.style,he.style,J),te&8){const Je=N.dynamicProps;for(let Ke=0;Ke<Je.length;Ke++){const He=Je[Ke],xt=z[He],vt=he[He];(vt!==xt||He==="value")&&d(ce,He,xt,vt,J,L.children,F,G,K)}}te&1&&L.children!==N.children&&S(ce,N.children)}else!fe&&_==null&&Ee(ce,N,z,he,F,G,J);((Le=he.onVnodeUpdated)||W)&&tr(()=>{Le&&Ar(Le,F,N,L),W&&An(N,L,F,"updated")},G)},de=(L,N,F,G,J,ne,fe)=>{for(let ce=0;ce<N.length;ce++){const te=L[ce],_=N[ce],W=te.el&&(te.type===nr||!ao(te,_)||te.shapeFlag&70)?T(te.el):F;V(te,_,W,null,G,J,ne,fe,!0)}},Ee=(L,N,F,G,J,ne,fe)=>{if(F!==G){for(const ce in G){if(ms(ce))continue;const te=G[ce],_=F[ce];te!==_&&ce!=="value"&&d(L,ce,_,te,fe,N.children,J,ne,K)}if(F!==st)for(const ce in F)!ms(ce)&&!(ce in G)&&d(L,ce,F[ce],null,fe,N.children,J,ne,K);"value"in G&&d(L,"value",F.value,G.value)}},j=(L,N,F,G,J,ne,fe,ce,te)=>{const _=N.el=L?L.el:b(""),W=N.anchor=L?L.anchor:b("");let{patchFlag:z,dynamicChildren:he,slotScopeIds:Le}=N;Le&&(ce=ce?ce.concat(Le):Le),L==null?(u(_,F,G),u(W,F,G),Ne(N.children,F,W,J,ne,fe,ce,te)):z>0&&z&64&&he&&L.dynamicChildren?(de(L.dynamicChildren,he,F,J,ne,fe,ce),(N.key!=null||J&&N===J.subTree)&&Bd(L,N,!0)):Re(L,N,F,W,J,ne,fe,ce,te)},$=(L,N,F,G,J,ne,fe,ce,te)=>{N.slotScopeIds=ce,L==null?N.shapeFlag&512?J.ctx.activate(N,F,G,fe,te):x(N,F,G,J,ne,fe,te):ee(L,N,te)},x=(L,N,F,G,J,ne,fe)=>{const ce=L.component=mm(L,G,J);if(Td(L)&&(ce.ctx.renderer=Se),ym(ce),ce.asyncDep){if(J&&J.registerDep(ce,Y),!L.el){const te=ce.subTree=ot(yn);D(null,te,N,F)}return}Y(ce,L,N,F,J,ne,fe)},ee=(L,N,F)=>{const G=N.component=L.component;if(Mv(L,N,F))if(G.asyncDep&&!G.asyncResolved){ae(G,N,F);return}else G.next=N,Cv(G.update),G.update();else N.el=L.el,G.vnode=N},Y=(L,N,F,G,J,ne,fe)=>{const ce=()=>{if(L.isMounted){let{next:W,bu:z,u:he,parent:Le,vnode:Be}=L,Je=W,Ke;Nn(L,!1),W?(W.el=Be.el,ae(L,W,fe)):W=Be,z&&Bl(z),(Ke=W.props&&W.props.onVnodeBeforeUpdate)&&Ar(Ke,Le,W,Be),Nn(L,!0);const He=jl(L),xt=L.subTree;L.subTree=He,V(xt,He,T(xt.el),se(xt),L,J,ne),W.el=He.el,Je===null&&Ev(L,He.el),he&&tr(he,J),(Ke=W.props&&W.props.onVnodeUpdated)&&tr(()=>Ar(Ke,Le,W,Be),J)}else{let W;const{el:z,props:he}=N,{bm:Le,m:Be,parent:Je}=L,Ke=mo(N);if(Nn(L,!1),Le&&Bl(Le),!Ke&&(W=he&&he.onVnodeBeforeMount)&&Ar(W,Je,N),Nn(L,!0),z&&Te){const He=()=>{L.subTree=jl(L),Te(z,L.subTree,L,J,null)};Ke?N.type.__asyncLoader().then(()=>!L.isUnmounted&&He()):He()}else{const He=L.subTree=jl(L);V(null,He,F,G,L,J,ne),N.el=He.el}if(Be&&tr(Be,J),!Ke&&(W=he&&he.onVnodeMounted)){const He=N;tr(()=>Ar(W,Je,He),J)}(N.shapeFlag&256||Je&&mo(Je.vnode)&&Je.vnode.shapeFlag&256)&&L.a&&tr(L.a,J),L.isMounted=!0,N=F=G=null}},te=L.effect=new xa(ce,()=>yd(_),L.scope),_=L.update=()=>te.run();_.id=L.uid,Nn(L,!0),_()},ae=(L,N,F)=>{N.component=L;const G=L.vnode.props;L.vnode=N,L.next=null,tm(L,N.props,G,F),im(L,N.children,F),Si(),Hs(void 0,L.update),Ci()},Re=(L,N,F,G,J,ne,fe,ce,te=!1)=>{const _=L&&L.children,W=L?L.shapeFlag:0,z=N.children,{patchFlag:he,shapeFlag:Le}=N;if(he>0){if(he&128){nt(_,z,F,G,J,ne,fe,ce,te);return}else if(he&256){Ge(_,z,F,G,J,ne,fe,ce,te);return}}Le&8?(W&16&&K(_,J,ne),z!==_&&S(F,z)):W&16?Le&16?nt(_,z,F,G,J,ne,fe,ce,te):K(_,J,ne,!0):(W&8&&S(F,""),Le&16&&Ne(z,F,G,J,ne,fe,ce,te))},Ge=(L,N,F,G,J,ne,fe,ce,te)=>{L=L||hi,N=N||hi;const _=L.length,W=N.length,z=Math.min(_,W);let he;for(he=0;he<z;he++){const Le=N[he]=te?dn(N[he]):zr(N[he]);V(L[he],Le,F,null,J,ne,fe,ce,te)}_>W?K(L,J,ne,!0,!1,z):Ne(N,F,G,J,ne,fe,ce,te,z)},nt=(L,N,F,G,J,ne,fe,ce,te)=>{let _=0;const W=N.length;let z=L.length-1,he=W-1;for(;_<=z&&_<=he;){const Le=L[_],Be=N[_]=te?dn(N[_]):zr(N[_]);if(ao(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;_++}for(;_<=z&&_<=he;){const Le=L[z],Be=N[he]=te?dn(N[he]):zr(N[he]);if(ao(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;z--,he--}if(_>z){if(_<=he){const Le=he+1,Be=Le<W?N[Le].el:G;for(;_<=he;)V(null,N[_]=te?dn(N[_]):zr(N[_]),F,Be,J,ne,fe,ce,te),_++}}else if(_>he)for(;_<=z;)Ie(L[_],J,ne,!0),_++;else{const Le=_,Be=_,Je=new Map;for(_=Be;_<=he;_++){const tt=N[_]=te?dn(N[_]):zr(N[_]);tt.key!=null&&Je.set(tt.key,_)}let Ke,He=0;const xt=he-Be+1;let vt=!1,dr=0;const Pe=new Array(xt);for(_=0;_<xt;_++)Pe[_]=0;for(_=Le;_<=z;_++){const tt=L[_];if(He>=xt){Ie(tt,J,ne,!0);continue}let Oe;if(tt.key!=null)Oe=Je.get(tt.key);else for(Ke=Be;Ke<=he;Ke++)if(Pe[Ke-Be]===0&&ao(tt,N[Ke])){Oe=Ke;break}Oe===void 0?Ie(tt,J,ne,!0):(Pe[Oe-Be]=_+1,Oe>=dr?dr=Oe:vt=!0,V(tt,N[Oe],F,null,J,ne,fe,ce,te),He++)}const Fr=vt?um(Pe):hi;for(Ke=Fr.length-1,_=xt-1;_>=0;_--){const tt=Be+_,Oe=N[tt],ut=tt+1<W?N[tt+1].el:G;Pe[_]===0?V(null,Oe,F,ut,J,ne,fe,ce,te):vt&&(Ke<0||_!==Fr[Ke]?lt(Oe,F,ut,2):Ke--)}}},lt=(L,N,F,G,J=null)=>{const{el:ne,type:fe,transition:ce,children:te,shapeFlag:_}=L;if(_&6){lt(L.component.subTree,N,F,G);return}if(_&128){L.suspense.move(N,F,G);return}if(_&64){fe.move(L,N,F,Se);return}if(fe===nr){u(ne,N,F);for(let z=0;z<te.length;z++)lt(te[z],N,F,G);u(L.anchor,N,F);return}if(fe===Ul){B(L,N,F);return}if(G!==2&&_&1&&ce)if(G===0)ce.beforeEnter(ne),u(ne,N,F),tr(()=>ce.enter(ne),J);else{const{leave:z,delayLeave:he,afterLeave:Le}=ce,Be=()=>u(ne,N,F),Je=()=>{z(ne,()=>{Be(),Le&&Le()})};he?he(ne,Be,Je):Je()}else u(ne,N,F)},Ie=(L,N,F,G=!1,J=!1)=>{const{type:ne,props:fe,ref:ce,children:te,dynamicChildren:_,shapeFlag:W,patchFlag:z,dirs:he}=L;if(ce!=null&&sa(ce,null,F,L,!0),W&256){N.ctx.deactivate(L);return}const Le=W&1&&he,Be=!mo(L);let Je;if(Be&&(Je=fe&&fe.onVnodeBeforeUnmount)&&Ar(Je,N,L),W&6)Z(L.component,F,G);else{if(W&128){L.suspense.unmount(F,G);return}Le&&An(L,null,N,"beforeUnmount"),W&64?L.type.remove(L,N,F,J,Se,G):_&&(ne!==nr||z>0&&z&64)?K(_,N,F,!1,!0):(ne===nr&&z&384||!J&&W&16)&&K(te,N,F),G&&Qe(L)}(Be&&(Je=fe&&fe.onVnodeUnmounted)||Le)&&tr(()=>{Je&&Ar(Je,N,L),Le&&An(L,null,N,"unmounted")},F)},Qe=L=>{const{type:N,el:F,anchor:G,transition:J}=L;if(N===nr){q(F,G);return}if(N===Ul){oe(L);return}const ne=()=>{f(F),J&&!J.persisted&&J.afterLeave&&J.afterLeave()};if(L.shapeFlag&1&&J&&!J.persisted){const{leave:fe,delayLeave:ce}=J,te=()=>fe(F,ne);ce?ce(L.el,ne,te):te()}else ne()},q=(L,N)=>{let F;for(;L!==N;)F=O(L),f(L),L=F;f(N)},Z=(L,N,F)=>{const{bum:G,scope:J,update:ne,subTree:fe,um:ce}=L;G&&Bl(G),J.stop(),ne&&(ne.active=!1,Ie(fe,L,N,F)),ce&&tr(ce,N),tr(()=>{L.isUnmounted=!0},N),N&&N.pendingBranch&&!N.isUnmounted&&L.asyncDep&&!L.asyncResolved&&L.suspenseId===N.pendingId&&(N.deps--,N.deps===0&&N.resolve())},K=(L,N,F,G=!1,J=!1,ne=0)=>{for(let fe=ne;fe<L.length;fe++)Ie(L[fe],N,F,G,J)},se=L=>L.shapeFlag&6?se(L.component.subTree):L.shapeFlag&128?L.suspense.next():O(L.anchor||L.el),Ce=(L,N,F)=>{L==null?N._vnode&&Ie(N._vnode,null,null,!0):V(N._vnode||null,L,N,null,null,null,F),xd(),N._vnode=L},Se={p:V,um:Ie,m:lt,r:Qe,mt:x,mc:Ne,pc:Re,pbc:de,n:se,o:r};let ge,Te;return s&&([ge,Te]=s(Se)),{render:Ce,hydrate:ge,createApp:sm(Ce,ge)}}function Nn({effect:r,update:s},l){r.allowRecurse=s.allowRecurse=l}function Bd(r,s,l=!1){const u=r.children,f=s.children;if(je(u)&&je(f))for(let d=0;d<u.length;d++){const g=u[d];let b=f[d];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=f[d]=dn(f[d]),b.el=g.el),l||Bd(g,b))}}function um(r){const s=r.slice(),l=[0];let u,f,d,g,b;const y=r.length;for(u=0;u<y;u++){const w=r[u];if(w!==0){if(f=l[l.length-1],r[f]<w){s[u]=f,l.push(u);continue}for(d=0,g=l.length-1;d<g;)b=d+g>>1,r[l[b]]<w?d=b+1:g=b;w<r[l[d]]&&(d>0&&(s[u]=l[d-1]),l[d]=u)}}for(d=l.length,g=l[d-1];d-- >0;)l[d]=g,g=s[g];return l}const fm=r=>r.__isTeleport,nr=Symbol(void 0),Ea=Symbol(void 0),yn=Symbol(void 0),Ul=Symbol(void 0),yo=[];let xr=null;function gt(r=!1){yo.push(xr=r?null:[])}function cm(){yo.pop(),xr=yo[yo.length-1]||null}let To=1;function uc(r){To+=r}function jd(r){return r.dynamicChildren=To>0?xr||hi:null,cm(),To>0&&xr&&xr.push(r),r}function Bt(r,s,l,u,f,d){return jd(Fe(r,s,l,u,f,d,!0))}function mi(r,s,l,u,f){return jd(ot(r,s,l,u,f,!0))}function Ls(r){return r?r.__v_isVNode===!0:!1}function ao(r,s){return r.type===s.type&&r.key===s.key}const js="__vInternal",Ud=({key:r})=>r!=null?r:null,bs=({ref:r,ref_key:s,ref_for:l})=>r!=null?Nt(r)||bt(r)||qe(r)?{i:Xt,r,k:s,f:!!l}:r:null;function Fe(r,s=null,l=null,u=0,f=null,d=r===nr?0:1,g=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:s,key:s&&Ud(s),ref:s&&bs(s),scopeId:Cd,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:u,dynamicProps:f,dynamicChildren:null,appContext:null};return b?(Aa(y,l),d&128&&r.normalize(y)):l&&(y.shapeFlag|=Nt(l)?8:16),To>0&&!g&&xr&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&xr.push(y),y}const ot=dm;function dm(r,s=null,l=null,u=0,f=null,d=!1){if((!r||r===$v)&&(r=yn),Ls(r)){const b=yi(r,s,!0);return l&&Aa(b,l),To>0&&!d&&xr&&(b.shapeFlag&6?xr[xr.indexOf(r)]=b:xr.push(b)),b.patchFlag|=-2,b}if(Sm(r)&&(r=r.__vccOpts),s){s=hm(s);let{class:b,style:y}=s;b&&!Nt(b)&&(s.class=vi(b)),Lt(y)&&(cd(y)&&!je(y)&&(y=Zt({},y)),s.style=Oo(y))}const g=Nt(r)?1:Av(r)?128:fm(r)?64:Lt(r)?4:qe(r)?2:0;return Fe(r,s,l,u,f,g,d,!0)}function hm(r){return r?cd(r)||js in r?Zt({},r):r:null}function yi(r,s,l=!1){const{props:u,ref:f,patchFlag:d,children:g}=r,b=s?pm(u||{},s):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&Ud(b),ref:s&&s.ref?l&&f?je(f)?f.concat(bs(s)):[f,bs(s)]:bs(s):f,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:g,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:s&&r.type!==nr?d===-1?16:d|16:d,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&yi(r.ssContent),ssFallback:r.ssFallback&&yi(r.ssFallback),el:r.el,anchor:r.anchor}}function Nr(r=" ",s=0){return ot(Ea,null,r,s)}function Ps(r="",s=!1){return s?(gt(),mi(yn,null,r)):ot(yn,null,r)}function zr(r){return r==null||typeof r=="boolean"?ot(yn):je(r)?ot(nr,null,r.slice()):typeof r=="object"?dn(r):ot(Ea,null,String(r))}function dn(r){return r.el===null||r.memo?r:yi(r)}function Aa(r,s){let l=0;const{shapeFlag:u}=r;if(s==null)s=null;else if(je(s))l=16;else if(typeof s=="object")if(u&65){const f=s.default;f&&(f._c&&(f._d=!1),Aa(r,f()),f._c&&(f._d=!0));return}else{l=32;const f=s._;!f&&!(js in s)?s._ctx=Xt:f===3&&Xt&&(Xt.slots._===1?s._=1:(s._=2,r.patchFlag|=1024))}else qe(s)?(s={default:s,_ctx:Xt},l=32):(s=String(s),u&64?(l=16,s=[Nr(s)]):l=8);r.children=s,r.shapeFlag|=l}function pm(...r){const s={};for(let l=0;l<r.length;l++){const u=r[l];for(const f in u)if(f==="class")s.class!==u.class&&(s.class=vi([s.class,u.class]));else if(f==="style")s.style=Oo([s.style,u.style]);else if(As(f)){const d=s[f],g=u[f];g&&d!==g&&!(je(d)&&d.includes(g))&&(s[f]=d?[].concat(d,g):g)}else f!==""&&(s[f]=u[f])}return s}function Ar(r,s,l,u=null){Sr(r,s,7,[l,u])}const gm=Wd();let vm=0;function mm(r,s,l){const u=r.type,f=(s?s.appContext:r.appContext)||gm,d={uid:vm++,vnode:r,type:u,parent:s,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new Hg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:s?s.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Dd(u,f),emitsOptions:Sd(u,f),emit:null,emitted:null,propsDefaults:st,inheritAttrs:u.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:l,suspenseId:l?l.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=s?s.root:d,d.emit=Lv.bind(null,d),r.ce&&r.ce(d),d}let Et=null;const Na=()=>Et||Xt,bi=r=>{Et=r,r.scope.on()},Fn=()=>{Et&&Et.scope.off(),Et=null};function Kd(r){return r.vnode.shapeFlag&4}let Lo=!1;function ym(r,s=!1){Lo=s;const{props:l,children:u}=r.vnode,f=Kd(r);em(r,l,f,s),nm(r,u);const d=f?bm(r,s):void 0;return Lo=!1,d}function bm(r,s){const l=r.type;r.accessCache=Object.create(null),r.proxy=dd(new Proxy(r.ctx,Yv));const{setup:u}=l;if(u){const f=r.setupContext=u.length>1?xm(r):null;bi(r),Si();const d=gn(u,r,0,[r.props,f]);if(Ci(),Fn(),Jc(d)){if(d.then(Fn,Fn),s)return d.then(g=>{fc(r,g,s)}).catch(g=>{Fs(g,r,0)});r.asyncDep=d}else fc(r,d,s)}else qd(r,s)}function fc(r,s,l){qe(s)?r.type.__ssrInlineRender?r.ssrRender=s:r.render=s:Lt(s)&&(r.setupState=vd(s)),qd(r,l)}let cc;function qd(r,s,l){const u=r.type;if(!r.render){if(!s&&cc&&!u.render){const f=u.template;if(f){const{isCustomElement:d,compilerOptions:g}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,w=Zt(Zt({isCustomElement:d,delimiters:b},g),y);u.render=cc(f,w)}}r.render=u.render||kr}bi(r),Si(),Xv(r),Ci(),Fn()}function wm(r){return new Proxy(r.attrs,{get(s,l){return cr(r,"get","$attrs"),s[l]}})}function xm(r){const s=u=>{r.exposed=u||{}};let l;return{get attrs(){return l||(l=wm(r))},slots:r.slots,emit:r.emit,expose:s}}function za(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(vd(dd(r.exposed)),{get(s,l){if(l in s)return s[l];if(l in _s)return _s[l](r)}}))}function km(r){return qe(r)&&r.displayName||r.name}function Sm(r){return qe(r)&&"__vccOpts"in r}const ct=(r,s)=>xv(r,s,Lo);function Ra(r,s,l){const u=arguments.length;return u===2?Lt(s)&&!je(s)?Ls(s)?ot(r,null,[s]):ot(r,s):ot(r,null,s):(u>3?l=Array.prototype.slice.call(arguments,2):u===3&&Ls(l)&&(l=[l]),ot(r,s,l))}const Cm="3.2.36",_m="http://www.w3.org/2000/svg",Rn=typeof document!="undefined"?document:null,dc=Rn&&Rn.createElement("template"),Tm={insert:(r,s,l)=>{s.insertBefore(r,l||null)},remove:r=>{const s=r.parentNode;s&&s.removeChild(r)},createElement:(r,s,l,u)=>{const f=s?Rn.createElementNS(_m,r):Rn.createElement(r,l?{is:l}:void 0);return r==="select"&&u&&u.multiple!=null&&f.setAttribute("multiple",u.multiple),f},createText:r=>Rn.createTextNode(r),createComment:r=>Rn.createComment(r),setText:(r,s)=>{r.nodeValue=s},setElementText:(r,s)=>{r.textContent=s},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Rn.querySelector(r),setScopeId(r,s){r.setAttribute(s,"")},cloneNode(r){const s=r.cloneNode(!0);return"_value"in r&&(s._value=r._value),s},insertStaticContent(r,s,l,u,f,d){const g=l?l.previousSibling:s.lastChild;if(f&&(f===d||f.nextSibling))for(;s.insertBefore(f.cloneNode(!0),l),!(f===d||!(f=f.nextSibling)););else{dc.innerHTML=u?`<svg>${r}</svg>`:r;const b=dc.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}s.insertBefore(b,l)}return[g?g.nextSibling:s.firstChild,l?l.previousSibling:s.lastChild]}};function Lm(r,s,l){const u=r._vtc;u&&(s=(s?[s,...u]:[...u]).join(" ")),s==null?r.removeAttribute("class"):l?r.setAttribute("class",s):r.className=s}function Pm(r,s,l){const u=r.style,f=Nt(l);if(l&&!f){for(const d in l)la(u,d,l[d]);if(s&&!Nt(s))for(const d in s)l[d]==null&&la(u,d,"")}else{const d=u.display;f?s!==l&&(u.cssText=l):s&&r.removeAttribute("style"),"_vod"in r&&(u.display=d)}}const hc=/\s*!important$/;function la(r,s,l){if(je(l))l.forEach(u=>la(r,s,u));else if(l==null&&(l=""),s.startsWith("--"))r.setProperty(s,l);else{const u=Om(r,s);hc.test(l)?r.setProperty(ki(u),l.replace(hc,""),"important"):r[u]=l}}const pc=["Webkit","Moz","ms"],Kl={};function Om(r,s){const l=Kl[s];if(l)return l;let u=Rr(s);if(u!=="filter"&&u in r)return Kl[s]=u;u=Rs(u);for(let f=0;f<pc.length;f++){const d=pc[f]+u;if(d in r)return Kl[s]=d}return s}const gc="http://www.w3.org/1999/xlink";function Mm(r,s,l,u,f){if(u&&s.startsWith("xlink:"))l==null?r.removeAttributeNS(gc,s.slice(6,s.length)):r.setAttributeNS(gc,s,l);else{const d=Lg(s);l==null||d&&!Yc(l)?r.removeAttribute(s):r.setAttribute(s,d?"":l)}}function Em(r,s,l,u,f,d,g){if(s==="innerHTML"||s==="textContent"){u&&g(u,f,d),r[s]=l==null?"":l;return}if(s==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=l;const y=l==null?"":l;(r.value!==y||r.tagName==="OPTION")&&(r.value=y),l==null&&r.removeAttribute(s);return}let b=!1;if(l===""||l==null){const y=typeof r[s];y==="boolean"?l=Yc(l):l==null&&y==="string"?(l="",b=!0):y==="number"&&(l=0,b=!0)}try{r[s]=l}catch{}b&&r.removeAttribute(s)}const[$d,Am]=(()=>{let r=Date.now,s=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(r=performance.now.bind(performance));const l=navigator.userAgent.match(/firefox\/(\d+)/i);s=!!(l&&Number(l[1])<=53)}return[r,s]})();let aa=0;const Nm=Promise.resolve(),zm=()=>{aa=0},Rm=()=>aa||(Nm.then(zm),aa=$d());function Dm(r,s,l,u){r.addEventListener(s,l,u)}function Fm(r,s,l,u){r.removeEventListener(s,l,u)}function Im(r,s,l,u,f=null){const d=r._vei||(r._vei={}),g=d[s];if(u&&g)g.value=u;else{const[b,y]=Hm(s);if(u){const w=d[s]=Wm(u,f);Dm(r,b,w,y)}else g&&(Fm(r,b,g,y),d[s]=void 0)}}const vc=/(?:Once|Passive|Capture)$/;function Hm(r){let s;if(vc.test(r)){s={};let l;for(;l=r.match(vc);)r=r.slice(0,r.length-l[0].length),s[l[0].toLowerCase()]=!0}return[ki(r.slice(2)),s]}function Wm(r,s){const l=u=>{const f=u.timeStamp||$d();(Am||f>=l.attached-1)&&Sr(Bm(u,l.value),s,5,[u])};return l.value=r,l.attached=Rm(),l}function Bm(r,s){if(je(s)){const l=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{l.call(r),r._stopped=!0},s.map(u=>f=>!f._stopped&&u&&u(f))}else return s}const mc=/^on[a-z]/,jm=(r,s,l,u,f=!1,d,g,b,y)=>{s==="class"?Lm(r,u,f):s==="style"?Pm(r,l,u):As(s)?va(s)||Im(r,s,l,u,g):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):Um(r,s,u,f))?Em(r,s,u,d,g,b,y):(s==="true-value"?r._trueValue=u:s==="false-value"&&(r._falseValue=u),Mm(r,s,u,f))};function Um(r,s,l,u){return u?!!(s==="innerHTML"||s==="textContent"||s in r&&mc.test(s)&&qe(l)):s==="spellcheck"||s==="draggable"||s==="translate"||s==="form"||s==="list"&&r.tagName==="INPUT"||s==="type"&&r.tagName==="TEXTAREA"||mc.test(s)&&Nt(l)?!1:s in r}const Km=Zt({patchProp:jm},Tm);let yc;function qm(){return yc||(yc=lm(Km))}const $m=(...r)=>{const s=qm().createApp(...r),{mount:l}=s;return s.mount=u=>{const f=Gm(u);if(!f)return;const d=s._component;!qe(d)&&!d.render&&!d.template&&(d.template=f.innerHTML),f.innerHTML="";const g=l(f,!1,f instanceof SVGElement);return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),g},s};function Gm(r){return Nt(r)?document.querySelector(r):r}function bo(){const r=[],s=f=>{const d=r.indexOf(f);d!==-1&&r.splice(d,1)};return{on:f=>(r.push(f),{off:()=>s(f)}),off:s,trigger:f=>{r.forEach(d=>d(f))}}}function Us(r){return Bg()?(jg(r),!0):!1}var bc;const Da=typeof window!="undefined",Ym=r=>typeof r!="undefined",Xm=r=>typeof r=="string",ws=()=>{};Da&&((bc=window==null?void 0:window.navigator)==null?void 0:bc.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Gd(r,s){function l(...u){r(()=>s.apply(this,u),{fn:s,thisArg:this,args:u})}return l}const Yd=r=>r();function Zm(r,s={}){let l,u;return d=>{const g=Ae(r),b=Ae(s.maxWait);if(l&&clearTimeout(l),g<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),d();b&&!u&&(u=setTimeout(()=>{l&&clearTimeout(l),u=null,d()},b)),l=setTimeout(()=>{u&&clearTimeout(u),u=null,d()},g)}}function Jm(r=Yd){const s=At(!0);function l(){s.value=!1}function u(){s.value=!0}return{isActive:s,pause:l,resume:u,eventFilter:(...d)=>{s.value&&r(...d)}}}function Qm(r,s=!1,l="Timeout"){return new Promise((u,f)=>{setTimeout(s?()=>f(l):u,r)})}function Vm(r,...s){return s.some(l=>l in r)}function ey(r,s=200,l={}){return Gd(Zm(s,l),r)}function ty(r,s=200,l={}){if(s<=0)return r;const u=At(r.value),f=ey(()=>{u.value=r.value},s,l);return It(r,()=>f()),u}function ry(r,s=!0){Na()?Pd(r):s?r():Is(r)}function ny(r,s=!0){Na()?Oa(r):s?r():Is(r)}function iy(r){let s=!1;function l(T,{flush:O="sync",deep:M=!1,timeout:H,throwOnTimeout:re}={}){let V=null;const D=[new Promise(I=>{V=It(r,B=>{T(B)===!s&&(V==null||V(),I())},{flush:O,deep:M,immediate:!0})})];return H&&D.push(Qm(H,re).finally(()=>{V==null||V()})),Promise.race(D)}function u(T,O){return l(M=>M===Ae(T),O)}function f(T){return l(O=>Boolean(O),T)}function d(T){return u(null,T)}function g(T){return u(void 0,T)}function b(T){return l(Number.isNaN,T)}function y(T,O){return l(M=>{const H=Array.from(M);return H.includes(T)||H.includes(Ae(T))},O)}function w(T){return S(1,T)}function S(T=1,O){let M=-1;return l(()=>(M+=1,M>=T),O)}return Array.isArray(Ae(r))?{toMatch:l,toContains:y,changed:w,changedTimes:S,get not(){return s=!s,this}}:{toMatch:l,toBe:u,toBeTruthy:f,toBeNull:d,toBeNaN:b,toBeUndefined:g,changed:w,changedTimes:S,get not(){return s=!s,this}}}function oy(r,s,l={}){const{immediate:u=!0}=l,f=At(!1);let d=null;function g(){d&&(clearTimeout(d),d=null)}function b(){f.value=!1,g()}function y(...w){g(),f.value=!0,d=setTimeout(()=>{f.value=!1,d=null,r(...w)},Ae(s))}return u&&(f.value=!0,Da&&y()),Us(b),{isPending:f,start:y,stop:b}}function sy(r=!1,s={}){const{truthyValue:l=!0,falsyValue:u=!1}=s,f=bt(r),d=At(r);function g(b){return arguments.length?(d.value=b,d.value):(d.value=d.value===Ae(l)?Ae(u):Ae(l),d.value)}return f?g:[d,g]}var wc=Object.getOwnPropertySymbols,ly=Object.prototype.hasOwnProperty,ay=Object.prototype.propertyIsEnumerable,uy=(r,s)=>{var l={};for(var u in r)ly.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&wc)for(var u of wc(r))s.indexOf(u)<0&&ay.call(r,u)&&(l[u]=r[u]);return l};function fy(r,s,l={}){const u=l,{eventFilter:f=Yd}=u,d=uy(u,["eventFilter"]);return It(r,Gd(f,s),d)}var cy=Object.defineProperty,dy=Object.defineProperties,hy=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Zd=Object.prototype.propertyIsEnumerable,xc=(r,s,l)=>s in r?cy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,py=(r,s)=>{for(var l in s||(s={}))Xd.call(s,l)&&xc(r,l,s[l]);if(Os)for(var l of Os(s))Zd.call(s,l)&&xc(r,l,s[l]);return r},gy=(r,s)=>dy(r,hy(s)),vy=(r,s)=>{var l={};for(var u in r)Xd.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Os)for(var u of Os(r))s.indexOf(u)<0&&Zd.call(r,u)&&(l[u]=r[u]);return l};function my(r,s,l={}){const u=l,{eventFilter:f}=u,d=vy(u,["eventFilter"]),{eventFilter:g,pause:b,resume:y,isActive:w}=Jm(f);return{stop:fy(r,s,gy(py({},d),{eventFilter:g})),pause:b,resume:y,isActive:w}}function Mw(r,s,l){let u;bt(l)?u={evaluating:l}:u=l||{};const{lazy:f=!1,evaluating:d=void 0,onError:g=ws}=u,b=At(!f),y=At(s);let w=0;return zv(async S=>{if(!b.value)return;w++;const T=w;let O=!1;d&&Promise.resolve().then(()=>{d.value=!0});try{const M=await r(H=>{S(()=>{d&&(d.value=!1),O||H()})});T===w&&(y.value=M)}catch(M){g(M)}finally{d&&T===w&&(d.value=!1),O=!0}}),f?ct(()=>(b.value=!0,y.value)):y}function Fa(r){var s;const l=Ae(r);return(s=l==null?void 0:l.$el)!=null?s:l}const bn=Da?window:void 0;function yy(...r){let s,l,u,f;if(Xm(r[0])?([l,u,f]=r,s=bn):[s,l,u,f]=r,!s)return ws;let d=ws;const g=It(()=>Fa(s),y=>{d(),y&&(y.addEventListener(l,u,f),d=()=>{y.removeEventListener(l,u,f),d=ws})},{immediate:!0,flush:"post"}),b=()=>{g(),d()};return Us(b),b}function by(r,s={}){const{window:l=bn}=s,u=Boolean(l&&"matchMedia"in l);let f;const d=At(!1),g=()=>{!u||(f||(f=l.matchMedia(r)),d.value=f.matches)};return ry(()=>{g(),f&&("addEventListener"in f?f.addEventListener("change",g):f.addListener(g),Us(()=>{"removeEventListener"in f?f.removeEventListener("change",g):f.removeListener(g)}))}),d}const ua=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},fa="__vueuse_ssr_handlers__";ua[fa]=ua[fa]||{};const wy=ua[fa];function Jd(r,s){return wy[r]||s}function xy(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":r instanceof Date?"date":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const ky={boolean:{read:r=>r==="true",write:r=>String(r)},object:{read:r=>JSON.parse(r),write:r=>JSON.stringify(r)},number:{read:r=>Number.parseFloat(r),write:r=>String(r)},any:{read:r=>r,write:r=>String(r)},string:{read:r=>r,write:r=>String(r)},map:{read:r=>new Map(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r.entries()))},set:{read:r=>new Set(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r))},date:{read:r=>new Date(r),write:r=>r.toISOString()}};function Sy(r,s,l,u={}){var f;const{flush:d="pre",deep:g=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:w,window:S=bn,eventFilter:T,onError:O=pe=>{console.error(pe)}}=u,M=(w?po:At)(s);if(!l)try{l=Jd("getDefaultStorage",()=>{var pe;return(pe=bn)==null?void 0:pe.localStorage})()}catch(pe){O(pe)}if(!l)return M;const H=Ae(s),re=xy(H),V=(f=u.serializer)!=null?f:ky[re],{pause:A,resume:D}=my(M,()=>I(M.value),{flush:d,deep:g,eventFilter:T});return S&&b&&yy(S,"storage",oe),oe(),M;function I(pe){try{pe==null?l.removeItem(r):l.setItem(r,V.write(pe))}catch(ye){O(ye)}}function B(pe){if(!(pe&&pe.key!==r)){A();try{const ye=pe?pe.newValue:l.getItem(r);return ye==null?(y&&H!==null&&l.setItem(r,V.write(H)),H):typeof ye!="string"?ye:V.read(ye)}catch(ye){O(ye)}finally{D()}}}function oe(pe){pe&&pe.key!==r||(M.value=B(pe))}}function Qd(r){return by("(prefers-color-scheme: dark)",r)}var Cy=Object.defineProperty,kc=Object.getOwnPropertySymbols,_y=Object.prototype.hasOwnProperty,Ty=Object.prototype.propertyIsEnumerable,Sc=(r,s,l)=>s in r?Cy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Ly=(r,s)=>{for(var l in s||(s={}))_y.call(s,l)&&Sc(r,l,s[l]);if(kc)for(var l of kc(s))Ty.call(s,l)&&Sc(r,l,s[l]);return r};function Py(r={}){const{selector:s="html",attribute:l="class",window:u=bn,storage:f,storageKey:d="vueuse-color-scheme",listenToStorageChanges:g=!0,storageRef:b}=r,y=Ly({auto:"",light:"light",dark:"dark"},r.modes||{}),w=Qd({window:u}),S=ct(()=>w.value?"dark":"light"),T=b||(d==null?At("auto"):Sy(d,"auto",f,{window:u,listenToStorageChanges:g})),O=ct({get(){return T.value==="auto"?S.value:T.value},set(V){T.value=V}}),M=Jd("updateHTMLAttrs",(V,A,D)=>{const I=u==null?void 0:u.document.querySelector(V);if(!!I)if(A==="class"){const B=D.split(/\s/g);Object.values(y).flatMap(oe=>(oe||"").split(/\s/g)).filter(Boolean).forEach(oe=>{B.includes(oe)?I.classList.add(oe):I.classList.remove(oe)})}else I.setAttribute(A,D)});function H(V){var A;M(s,l,(A=y[V])!=null?A:V)}function re(V){r.onChanged?r.onChanged(V,H):H(V)}return It(O,re,{flush:"post",immediate:!0}),ny(()=>re(O.value)),O}var Oy=Object.defineProperty,My=Object.defineProperties,Ey=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Ay=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,_c=(r,s,l)=>s in r?Oy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,zy=(r,s)=>{for(var l in s||(s={}))Ay.call(s,l)&&_c(r,l,s[l]);if(Cc)for(var l of Cc(s))Ny.call(s,l)&&_c(r,l,s[l]);return r},Ry=(r,s)=>My(r,Ey(s));function Dy(r={}){const{valueDark:s="dark",valueLight:l="",window:u=bn}=r,f=Py(Ry(zy({},r),{onChanged:(b,y)=>{var w;r.onChanged?(w=r.onChanged)==null||w.call(r,b==="dark"):y(b)},modes:{dark:s,light:l}})),d=Qd({window:u});return ct({get(){return f.value==="dark"},set(b){b===d.value?f.value="auto":f.value=b?"dark":"light"}})}var Tc=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Hy=(r,s)=>{var l={};for(var u in r)Fy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Tc)for(var u of Tc(r))s.indexOf(u)<0&&Iy.call(r,u)&&(l[u]=r[u]);return l};function Wy(r,s,l={}){const u=l,{window:f=bn}=u,d=Hy(u,["window"]);let g;const b=f&&"ResizeObserver"in f,y=()=>{g&&(g.disconnect(),g=void 0)},w=It(()=>Fa(r),T=>{y(),b&&f&&T&&(g=new ResizeObserver(s),g.observe(T,d))},{immediate:!0,flush:"post"}),S=()=>{y(),w()};return Us(S),{isSupported:b,stop:S}}var By=Object.defineProperty,jy=Object.defineProperties,Uy=Object.getOwnPropertyDescriptors,Lc=Object.getOwnPropertySymbols,Ky=Object.prototype.hasOwnProperty,qy=Object.prototype.propertyIsEnumerable,Pc=(r,s,l)=>s in r?By(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,er=(r,s)=>{for(var l in s||(s={}))Ky.call(s,l)&&Pc(r,l,s[l]);if(Lc)for(var l of Lc(s))qy.call(s,l)&&Pc(r,l,s[l]);return r},uo=(r,s)=>jy(r,Uy(s));const $y={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function Oc(r){return Vm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch")}function ql(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function Ks(r,...s){var l;const u=typeof AbortController=="function";let f={},d={immediate:!0,refetch:!1,timeout:0};const g={method:"GET",type:"text",payload:void 0};s.length>0&&(Oc(s[0])?d=er(er({},d),s[0]):f=s[0]),s.length>1&&Oc(s[1])&&(d=er(er({},d),s[1]));const{fetch:b=(l=bn)==null?void 0:l.fetch,initialData:y,timeout:w}=d,S=bo(),T=bo(),O=bo(),M=At(!1),H=At(!1),re=At(!1),V=At(null),A=po(null),D=po(null),I=po(y),B=ct(()=>u&&H.value);let oe,pe;const ye=()=>{u&&oe&&oe.abort()},We=$=>{H.value=$,M.value=!$};w&&(pe=oy(ye,w,{immediate:!1}));const Ne=async($=!1)=>{var x;We(!0),D.value=null,V.value=null,re.value=!1,oe=void 0,u&&(oe=new AbortController,oe.signal.onabort=()=>re.value=!0,f=uo(er({},f),{signal:oe.signal}));const ee={method:g.method,headers:{}};if(g.payload){const Ge=ql(ee.headers);g.payloadType&&(Ge["Content-Type"]=(x=$y[g.payloadType])!=null?x:g.payloadType),ee.body=g.payloadType==="json"?JSON.stringify(Ae(g.payload)):Ae(g.payload)}let Y=!1;const ae={url:Ae(r),options:er(er({},ee),f),cancel:()=>{Y=!0}};if(d.beforeFetch&&Object.assign(ae,await d.beforeFetch(ae)),Y||!b)return We(!1),Promise.resolve(null);let Re=null;return pe&&pe.start(),new Promise((Ge,nt)=>{var lt;b(ae.url,uo(er(er({},ee),ae.options),{headers:er(er({},ql(ee.headers)),ql((lt=ae.options)==null?void 0:lt.headers))})).then(async Ie=>{if(A.value=Ie,V.value=Ie.status,Re=await Ie[g.type](),d.afterFetch&&V.value>=200&&V.value<300&&({data:Re}=await d.afterFetch({data:Re,response:Ie})),I.value=Re,!Ie.ok)throw new Error(Ie.statusText);return S.trigger(Ie),Ge(Ie)}).catch(async Ie=>{let Qe=Ie.message||Ie.name;return d.onFetchError&&({data:Re,error:Qe}=await d.onFetchError({data:Re,error:Ie,response:A.value})),I.value=Re,D.value=Qe,T.trigger(Ie),$?nt(Ie):Ge(null)}).finally(()=>{We(!1),pe&&pe.stop(),O.trigger(null)})})};It(()=>[Ae(r),Ae(d.refetch)],()=>Ae(d.refetch)&&Ne(),{deep:!0});const be={isFinished:M,statusCode:V,response:A,error:D,data:I,isFetching:H,canAbort:B,aborted:re,abort:ye,execute:Ne,onFetchResponse:S.on,onFetchError:T.on,onFetchFinally:O.on,get:de("GET"),put:de("PUT"),post:de("POST"),delete:de("DELETE"),patch:de("PATCH"),head:de("HEAD"),options:de("OPTIONS"),json:j("json"),text:j("text"),blob:j("blob"),arrayBuffer:j("arrayBuffer"),formData:j("formData")};function de($){return(x,ee)=>{if(!H.value)return g.method=$,g.payload=x,g.payloadType=ee,bt(g.payload)&&It(()=>[Ae(g.payload),Ae(d.refetch)],()=>Ae(d.refetch)&&Ne(),{deep:!0}),!ee&&Ae(x)&&Object.getPrototypeOf(Ae(x))===Object.prototype&&(g.payloadType="json"),uo(er({},be),{then(Y,ae){return Ee().then(Y,ae)}})}}function Ee(){return new Promise(($,x)=>{iy(M).toBe(!0).then(()=>$(be)).catch(ee=>x(ee))})}function j($){return()=>{if(!H.value)return g.type=$,uo(er({},be),{then(x,ee){return Ee().then(x,ee)}})}}return d.immediate&&setTimeout(Ne,0),uo(er({},be),{then($,x){return Ee().then($,x)}})}function Gy(r,s,l,u={}){var f;const{passive:d=!1,eventName:g,deep:b=!1,defaultValue:y}=u,w=Na(),S=l||(w==null?void 0:w.emit)||((f=w==null?void 0:w.$emit)==null?void 0:f.bind(w));let T=g;s||(s="modelValue"),T=g||T||`update:${s}`;const O=()=>Ym(r[s])?r[s]:y;if(d){const M=At(O());return It(()=>r[s],H=>M.value=H),It(M,H=>{(H!==r[s]||b)&&S(T,H)},{deep:b}),M}else return ct({get(){return O()},set(M){S(T,M)}})}function Yy(r){const s=r.length;let l=-1,u,f="";const d=r.charCodeAt(0);for(;++l<s;){if(u=r.charCodeAt(l),u===0){f+="\uFFFD";continue}if(u===44){f+="\\,";continue}if(u>=1&&u<=31||u===127||l===0&&u>=48&&u<=57||l===1&&u>=48&&u<=57&&d===45){f+=`\\${u.toString(16)} `;continue}if(l===0&&s===1&&u===45){f+=`\\${r.charAt(l)}`;continue}if(u>=128||u===45||u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122){f+=r.charAt(l);continue}f+=`\\${r.charAt(l)}`}return f}const Mc=Yy,Xy=/^\[(.+?)~?="(.*)"\]$/,Zy=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function Jy(r){return r.match(Xy)}function Ew(r=""){return Zy.test(r)}function Qy(r,s){const l=[],u=[],f=new Set;Array.from(s).forEach(g=>{const b=Jy(g);b?b[2]?u.push(b):f.add(b[1]):f.add(g)});let d=0;return r.split(/[\s"';<>]/g).forEach(g=>{const b=d+g.length;f.has(g)&&l.push([d,b,g]),d=b+1}),u.forEach(([,g,b])=>{const y=new RegExp(`(${Mc(g)}=)(['"])[^\\2]*?${Mc(b)}[^\\2]*?\\2`,"g");Array.from(r.matchAll(y)).forEach(w=>{const S=w[1],O=w[0].slice(S.length).indexOf(b);if(O<0)return;const M=w.index+S.length+O,H=M+b.length;l.push([M,H,`[${g}="${b}"]`])})}),l}var Vy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Xr={exports:{}};(function(r,s){(function(l,u){r.exports=u()})(Vy,function(){var l=navigator.userAgent,u=navigator.platform,f=/gecko\/\d/i.test(l),d=/MSIE \d/.test(l),g=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),y=d||g||b,w=y&&(d?document.documentMode||6:+(b||g)[1]),S=!b&&/WebKit\//.test(l),T=S&&/Qt\/\d+\.\d+/.test(l),O=!b&&/Chrome\//.test(l),M=/Opera\//.test(l),H=/Apple Computer/.test(navigator.vendor),re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),V=/PhantomJS/.test(l),A=H&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),D=/Android/.test(l),I=A||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),B=A||/Mac/.test(u),oe=/\bCrOS\b/.test(l),pe=/win/i.test(u),ye=M&&l.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(M=!1,S=!0);var We=B&&(T||M&&(ye==null||ye<12.11)),Ne=f||y&&w>=9;function be(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var de=function(e,t){var i=e.className,n=be(t).exec(i);if(n){var o=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(o?n[1]+o:"")}};function Ee(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return Ee(e).appendChild(t)}function $(e,t,i,n){var o=document.createElement(e);if(i&&(o.className=i),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)o.appendChild(t[a]);return o}function x(e,t,i,n){var o=$(e,t,i,n);return o.setAttribute("role","presentation"),o}var ee;document.createRange?ee=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:ee=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch{return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function Y(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ae(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Re(e,t){var i=e.className;be(t).test(i)||(e.className+=(i?" ":"")+t)}function Ge(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!be(i[n]).test(t)&&(t+=" "+i[n]);return t}var nt=function(e){e.select()};A?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(nt=function(e){try{e.select()}catch{}});function lt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ie(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Qe(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,c=o||0;;){var h=e.indexOf(" ",a);if(h<0||h>=t)return c+(t-a);c+=h-a,c+=i-c%i,a=h+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=lt(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function Z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var K=50,se={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},Se={origin:"*mouse"},ge={origin:"+move"};function Te(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var c=a-n;if(a==e.length||o+c>=t)return n+Math.min(c,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var L=[""];function N(e){for(;L.length<=e;)L.push(F(L)+" ");return L[e]}function F(e){return e[e.length-1]}function G(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function J(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function ne(){}function fe(e,t){var i;return Object.create?i=Object.create(e):(ne.prototype=e,i=new ne),t&&Ie(t,i),i}var ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ce.test(e))}function _(e,t){return t?t.source.indexOf("\\w")>-1&&te(e)?!0:t.test(e):te(e)}function W(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var z=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function he(e){return e.charCodeAt(0)>=768&&z.test(e)}function Le(e,t,i){for(;(i<0?t>0:t<e.length)&&he(e.charAt(t));)t+=i;return t}function Be(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var o=(t+i)/2,a=n<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+n}}function Je(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var c=e[a];(c.from<i&&c.to>t||t==i&&c.to==t)&&(n(Math.max(c.from,t),Math.min(c.to,i),c.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ke=null;function He(e,t,i){var n;Ke=null;for(var o=0;o<e.length;++o){var a=e[o];if(a.from<t&&a.to>t)return o;a.to==t&&(a.from!=a.to&&i=="before"?n=o:Ke=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ke=o)}return n!=null?n:Ke}var xt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(v){return v<=247?e.charAt(v):1424<=v&&v<=1524?"R":1536<=v&&v<=1785?t.charAt(v-1536):1774<=v&&v<=2220?"r":8192<=v&&v<=8203?"w":v==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,c=/[Lb1n]/,h=/[1n]/;function p(v,k,C){this.level=v,this.from=k,this.to=C}return function(v,k){var C=k=="ltr"?"L":"R";if(v.length==0||k=="ltr"&&!n.test(v))return!1;for(var R=v.length,E=[],U=0;U<R;++U)E.push(i(v.charCodeAt(U)));for(var Q=0,ue=C;Q<R;++Q){var ve=E[Q];ve=="m"?E[Q]=ue:ue=ve}for(var we=0,me=C;we<R;++we){var ke=E[we];ke=="1"&&me=="r"?E[we]="n":a.test(ke)&&(me=ke,ke=="r"&&(E[we]="R"))}for(var ze=1,Me=E[0];ze<R-1;++ze){var Ue=E[ze];Ue=="+"&&Me=="1"&&E[ze+1]=="1"?E[ze]="1":Ue==","&&Me==E[ze+1]&&(Me=="1"||Me=="n")&&(E[ze]=Me),Me=Ue}for(var rt=0;rt<R;++rt){var _t=E[rt];if(_t==",")E[rt]="N";else if(_t=="%"){var ft=void 0;for(ft=rt+1;ft<R&&E[ft]=="%";++ft);for(var Vt=rt&&E[rt-1]=="!"||ft<R&&E[ft]=="1"?"1":"N",qt=rt;qt<ft;++qt)E[qt]=Vt;rt=ft-1}}for(var mt=0,$t=C;mt<R;++mt){var Ot=E[mt];$t=="L"&&Ot=="1"?E[mt]="L":a.test(Ot)&&($t=Ot)}for(var wt=0;wt<R;++wt)if(o.test(E[wt])){var yt=void 0;for(yt=wt+1;yt<R&&o.test(E[yt]);++yt);for(var ht=(wt?E[wt-1]:C)=="L",Gt=(yt<R?E[yt]:C)=="L",si=ht==Gt?ht?"L":"R":C,ln=wt;ln<yt;++ln)E[ln]=si;wt=yt-1}for(var Ft=[],Er,Tt=0;Tt<R;)if(c.test(E[Tt])){var Fl=Tt;for(++Tt;Tt<R&&c.test(E[Tt]);++Tt);Ft.push(new p(0,Fl,Tt))}else{var Kr=Tt,Mn=Ft.length,En=k=="rtl"?1:0;for(++Tt;Tt<R&&E[Tt]!="L";++Tt);for(var Wt=Kr;Wt<Tt;)if(h.test(E[Wt])){Kr<Wt&&(Ft.splice(Mn,0,new p(1,Kr,Wt)),Mn+=En);var li=Wt;for(++Wt;Wt<Tt&&h.test(E[Wt]);++Wt);Ft.splice(Mn,0,new p(2,li,Wt)),Mn+=En,Kr=Wt}else++Wt;Kr<Tt&&Ft.splice(Mn,0,new p(1,Kr,Tt))}return k=="ltr"&&(Ft[0].level==1&&(Er=v.match(/^\s+/))&&(Ft[0].from=Er[0].length,Ft.unshift(new p(0,0,Er[0].length))),F(Ft).level==1&&(Er=v.match(/\s+$/))&&(F(Ft).to-=Er[0].length,Ft.push(new p(0,R-Er[0].length,R)))),k=="rtl"?Ft.reverse():Ft}}();function vt(e,t){var i=e.order;return i==null&&(i=e.order=xt(e.text,t)),i}var dr=[],Pe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||dr).concat(i)}};function Fr(e,t){return e._handlers&&e._handlers[t]||dr}function tt(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,o=n&&n[t];if(o){var a=Z(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Oe(e,t){var i=Fr(e,t);if(!!i.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<i.length;++o)i[o].apply(null,n)}function ut(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,i||t.type,e,t),ir(t)||t.codemirrorIgnore}function In(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Z(i,t[n])==-1&&i.push(t[n])}function Pt(e,t){return Fr(e,t).length>0}function Cr(e){e.prototype.on=function(t,i){Pe(this,t,i)},e.prototype.off=function(t,i){tt(this,t,i)}}function zt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ir(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function wn(e){zt(e),Hn(e)}function Zr(e){return e.target||e.srcElement}function Mo(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var Li=function(){if(y&&w<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}(),jt;function Eo(e){if(jt==null){var t=$("span","\u200B");j(e,$("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(jt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&w<8))}var i=jt?$("span","\u200B"):$("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Pi;function _r(e){if(Pi!=null)return Pi;var t=j(e,document.createTextNode("A\u062EA")),i=ee(t,0,1).getBoundingClientRect(),n=ee(t,1,2).getBoundingClientRect();return Ee(e),!i||i.left==i.right?!1:Pi=n.right-i.right<3}var Oi=`
2
-
3
- b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var o=e.indexOf(`
4
- `,t);o==-1&&(o=e.length);var a=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),c=a.indexOf("\r");c!=-1?(i.push(a.slice(0,c)),t+=c+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Ao=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},No=function(){var e=$("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mi=null;function Jr(e){if(Mi!=null)return Mi;var t=j(e,$("span","x")),i=t.getBoundingClientRect(),n=ee(t,0,1).getBoundingClientRect();return Mi=Math.abs(i.left-n.left)>1}var hr={},or={};function zo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),hr[e]=t}function Ir(e,t){or[e]=t}function Wn(e){if(typeof e=="string"&&or.hasOwnProperty(e))e=or[e];else if(e&&typeof e.name=="string"&&or.hasOwnProperty(e.name)){var t=or[e.name];typeof t=="string"&&(t={name:t}),e=fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bn(e,t){t=Wn(t);var i=hr[t.name];if(!i)return Bn(e,"text/plain");var n=i(e,t);if(pr.hasOwnProperty(t.name)){var o=pr[t.name];for(var a in o)!o.hasOwnProperty(a)||(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=o[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var c in t.modeProps)n[c]=t.modeProps[c];return n}var pr={};function gr(e,t){var i=pr.hasOwnProperty(e)?pr[e]:pr[e]={};Ie(t,i)}function sr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),i[n]=o}return i}function Ei(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ai(e,t,i){return e.startState?e.startState(t,i):!0}var dt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};dt.prototype.eol=function(){return this.pos>=this.string.length},dt.prototype.sol=function(){return this.pos==this.lineStart},dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dt.prototype.skipToEnd=function(){this.pos=this.string.length},dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},dt.prototype.backUp=function(e){this.pos-=e},dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},dt.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},dt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(c){return i?c.toLowerCase():c},o=this.string.substr(this.pos,e.length);if(n(o)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function _e(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var o=i.children[n],a=o.chunkSize();if(t<a){i=o;break}t-=a}return i.lines[t]}function Tr(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var c=a.text;o==i.line&&(c=c.slice(0,i.ch)),o==t.line&&(c=c.slice(t.ch)),n.push(c),++o}),n}function Ni(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function Jt(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Xe(e){if(e.parent==null)return null;for(var t=e.parent,i=Z(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)i+=n.children[o].chunkSize();return i+t.first}function Lr(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],a=o.height;if(t<a){e=o;continue e}t-=a,i+=o.chunkSize()}return i}while(!e.lines);for(var c=0;c<e.lines.length;++c){var h=e.lines[c],p=h.height;if(t<p)break;t-=p}return i+c}function xn(e,t){return t>=e.first&&t<e.first+e.size}function zi(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ie(e,t,i){if(i===void 0&&(i=null),!(this instanceof ie))return new ie(e,t,i);this.line=e,this.ch=t,this.sticky=i}function m(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&m(e,t)==0}function X(e){return ie(e.line,e.ch)}function le(e,t){return m(e,t)<0?t:e}function De(e,t){return m(e,t)<0?e:t}function $e(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function xe(e,t){if(t.line<e.first)return ie(e.first,0);var i=e.first+e.size-1;return t.line>i?ie(i,_e(e,i).text.length):Rt(t,_e(e,t.line).text.length)}function Rt(e,t){var i=e.ch;return i==null||i>t?ie(e.line,t):i<0?ie(e.line,0):e}function lr(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=xe(e,t[n]);return i}var jn=function(e,t){this.state=e,this.lookAhead=t},Pr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Pr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pr.fromSaved=function(e,t,i){return t instanceof jn?new Pr(e,sr(e.mode,t.state),i,t.lookAhead):new Pr(e,sr(e.mode,t),i)},Pr.prototype.save=function(e){var t=e!==!1?sr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jn(t,this.maxLookAhead):t};function ja(e,t,i,n){var o=[e.state.modeGen],a={};Ya(e,t.text,e.doc.mode,i,function(v,k){return o.push(v,k)},a,n);for(var c=i.state,h=function(v){i.baseTokens=o;var k=e.state.overlays[v],C=1,R=0;i.state=!0,Ya(e,t.text,k.mode,i,function(E,U){for(var Q=C;R<E;){var ue=o[C];ue>E&&o.splice(C,1,E,o[C+1],ue),C+=2,R=Math.min(E,ue)}if(!!U)if(k.opaque)o.splice(Q,C-Q,E,"overlay "+U),C=Q+2;else for(;Q<C;Q+=2){var ve=o[Q+1];o[Q+1]=(ve?ve+" ":"")+"overlay "+U}},a),i.state=c,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)h(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function Ua(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Ri(e,Xe(t)),o=t.text.length>e.options.maxHighlightLength&&sr(e.doc.mode,n.state),a=ja(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ri(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new Pr(n,!0,t);var a=wh(e,t,i),c=a>n.first&&_e(n,a-1).stateAfter,h=c?Pr.fromSaved(n,c,a):new Pr(n,Ai(n.mode),a);return n.iter(a,t,function(p){Gs(e,p.text,h);var v=h.line;p.stateAfter=v==t-1||v%5==0||v>=o.viewFrom&&v<o.viewTo?h.save():null,h.nextLine()}),i&&(n.modeFrontier=h.line),h}function Gs(e,t,i,n){var o=e.doc.mode,a=new dt(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Ka(o,i.state);!a.eol();)Ys(o,a,i.state),a.start=a.pos}function Ka(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=Ei(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Ys(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=Ei(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var qa=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function $a(e,t,i,n){var o=e.doc,a=o.mode,c;t=xe(o,t);var h=_e(o,t.line),p=Ri(e,t.line,i),v=new dt(h.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||v.pos<t.ch)&&!v.eol();)v.start=v.pos,c=Ys(a,v,p.state),n&&k.push(new qa(v,c,sr(o.mode,p.state)));return n?k:new qa(v,c,p.state)}function Ga(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function Ya(e,t,i,n,o,a,c){var h=i.flattenSpans;h==null&&(h=e.options.flattenSpans);var p=0,v=null,k=new dt(t,e.options.tabSize,n),C,R=e.options.addModeClass&&[null];for(t==""&&Ga(Ka(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(h=!1,c&&Gs(e,t,n,k.pos),k.pos=t.length,C=null):C=Ga(Ys(i,k,n.state,R),a),R){var E=R[0].name;E&&(C="m-"+(C?E+" "+C:E))}if(!h||v!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,v);v=C}k.start=k.pos}for(;p<k.pos;){var U=Math.min(k.pos,p+5e3);o(U,v),p=U}}function wh(e,t,i){for(var n,o,a=e.doc,c=i?-1:t-(e.doc.mode.innerMode?1e3:100),h=t;h>c;--h){if(h<=a.first)return a.first;var p=_e(a,h-1),v=p.stateAfter;if(v&&(!i||h+(v instanceof jn?v.lookAhead:0)<=a.modeFrontier))return h;var k=Qe(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=h-1,n=k)}return o}function xh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,n=t-1;n>i;n--){var o=_e(e,n).stateAfter;if(o&&(!(o instanceof jn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Xa=!1,Hr=!1;function kh(){Xa=!0}function Sh(){Hr=!0}function Ro(e,t,i){this.marker=e,this.from=t,this.to=i}function Di(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Ch(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function _h(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Th(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);if(h||a.from==t&&c.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new Ro(c,a.from,p?null:a.to))}}return n}function Lh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);if(h||a.from==t&&c.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new Ro(c,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Xs(e,t){if(t.full)return null;var i=xn(e,t.from.line)&&_e(e,t.from.line).markedSpans,n=xn(e,t.to.line)&&_e(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,c=m(t.from,t.to)==0,h=Th(i,o,c),p=Lh(n,a,c),v=t.text.length==1,k=F(t.text).length+(v?o:0);if(h)for(var C=0;C<h.length;++C){var R=h[C];if(R.to==null){var E=Di(p,R.marker);E?v&&(R.to=E.to==null?null:E.to+k):R.to=o}}if(p)for(var U=0;U<p.length;++U){var Q=p[U];if(Q.to!=null&&(Q.to+=k),Q.from==null){var ue=Di(h,Q.marker);ue||(Q.from=k,v&&(h||(h=[])).push(Q))}else Q.from+=k,v&&(h||(h=[])).push(Q)}h&&(h=Za(h)),p&&p!=h&&(p=Za(p));var ve=[h];if(!v){var we=t.text.length-2,me;if(we>0&&h)for(var ke=0;ke<h.length;++ke)h[ke].to==null&&(me||(me=[])).push(new Ro(h[ke].marker,null,null));for(var ze=0;ze<we;++ze)ve.push(me);ve.push(p)}return ve}function Za(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ph(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(E){if(E.markedSpans)for(var U=0;U<E.markedSpans.length;++U){var Q=E.markedSpans[U].marker;Q.readOnly&&(!n||Z(n,Q)==-1)&&(n||(n=[])).push(Q)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var c=n[a],h=c.find(0),p=0;p<o.length;++p){var v=o[p];if(!(m(v.to,h.from)<0||m(v.from,h.to)>0)){var k=[p,1],C=m(v.from,h.from),R=m(v.to,h.to);(C<0||!c.inclusiveLeft&&!C)&&k.push({from:v.from,to:h.from}),(R>0||!c.inclusiveRight&&!R)&&k.push({from:h.to,to:v.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Ja(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Qa(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function Do(e){return e.inclusiveLeft?-1:0}function Fo(e){return e.inclusiveRight?1:0}function Zs(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=m(n.from,o.from)||Do(e)-Do(t);if(a)return-a;var c=m(n.to,o.to)||Fo(e)-Fo(t);return c||t.id-e.id}function Va(e,t){var i=Hr&&e.markedSpans,n;if(i)for(var o=void 0,a=0;a<i.length;++a)o=i[a],o.marker.collapsed&&(t?o.from:o.to)==null&&(!n||Zs(n,o.marker)<0)&&(n=o.marker);return n}function eu(e){return Va(e,!0)}function Io(e){return Va(e,!1)}function Oh(e,t){var i=Hr&&e.markedSpans,n;if(i)for(var o=0;o<i.length;++o){var a=i[o];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Zs(n,a.marker)<0)&&(n=a.marker)}return n}function tu(e,t,i,n,o){var a=_e(e,t),c=Hr&&a.markedSpans;if(c)for(var h=0;h<c.length;++h){var p=c[h];if(!!p.marker.collapsed){var v=p.marker.find(0),k=m(v.from,i)||Do(p.marker)-Do(o),C=m(v.to,n)||Fo(p.marker)-Fo(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(v.to,i)>=0:m(v.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(v.from,n)<=0:m(v.from,n)<0)))return!0}}}function vr(e){for(var t;t=eu(e);)e=t.find(-1,!0).line;return e}function Mh(e){for(var t;t=Io(e);)e=t.find(1,!0).line;return e}function Eh(e){for(var t,i;t=Io(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Js(e,t){var i=_e(e,t),n=vr(i);return i==n?t:Xe(n)}function ru(e,t){if(t>e.lastLine())return t;var i=_e(e,t),n;if(!Qr(e,i))return t;for(;n=Io(i);)i=n.find(1,!0).line;return Xe(i)+1}function Qr(e,t){var i=Hr&&t.markedSpans;if(i){for(var n=void 0,o=0;o<i.length;++o)if(n=i[o],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&Qs(e,t,n))return!0}}}function Qs(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Qs(e,n.line,Di(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var o=void 0,a=0;a<t.markedSpans.length;++a)if(o=t.markedSpans[a],o.marker.collapsed&&!o.marker.widgetNode&&o.from==i.to&&(o.to==null||o.to!=i.from)&&(o.marker.inclusiveLeft||i.marker.inclusiveRight)&&Qs(e,t,o))return!0}function Wr(e){e=vr(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var o=i.lines[n];if(o==e)break;t+=o.height}for(var a=i.parent;a;i=a,a=i.parent)for(var c=0;c<a.children.length;++c){var h=a.children[c];if(h==i)break;t+=h.height}return t}function Ho(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=eu(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=Io(n);){var a=i.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Vs(e){var t=e.display,i=e.doc;t.maxLine=_e(i,i.first),t.maxLineLength=Ho(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Ho(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Un=function(e,t,i){this.text=e,Qa(this,t),this.height=i?i(this):1};Un.prototype.lineNo=function(){return Xe(this)},Cr(Un);function Ah(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ja(e),Qa(e,i);var o=n?n(e):1;o!=e.height&&Jt(e,o)}function Nh(e){e.parent=null,Ja(e)}var zh={},Rh={};function nu(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Rh:zh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function iu(e,t){var i=x("span",null,null,S?"padding-right: .1px":null),n={pre:x("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,c=void 0;n.pos=0,n.addToken=Fh,_r(e.display.measure)&&(c=vt(a,e.doc.direction))&&(n.addToken=Hh(n.addToken,c)),n.map=[];var h=t!=e.display.externalMeasured&&Xe(a);Wh(a,n,Ua(e,a,h)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ge(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ge(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Eo(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(S){var p=n.content.lastChild;(/\bcm-tab\b/.test(p.className)||p.querySelector&&p.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ge(n.pre.className,n.textClass||"")),n}function Dh(e){var t=$("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fh(e,t,i,n,o,a,c){if(!!t){var h=e.splitSpaces?Ih(t,e.trailingSpace):t,p=e.cm.state.specialChars,v=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,k),y&&w<9&&(v=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var R=p.exec(t),E=R?R.index-C:t.length-C;if(E){var U=document.createTextNode(h.slice(C,C+E));y&&w<9?k.appendChild($("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+E,U),e.col+=E,e.pos+=E}if(!R)break;C+=E+1;var Q=void 0;if(R[0]==" "){var ue=e.cm.options.tabSize,ve=ue-e.col%ue;Q=k.appendChild($("span",N(ve),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=ve}else R[0]=="\r"||R[0]==`
5
- `?(Q=k.appendChild($("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Q.setAttribute("cm-text",R[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(R[0]),Q.setAttribute("cm-text",R[0]),y&&w<9?k.appendChild($("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=h.charCodeAt(t.length-1)==32,i||n||o||v||a||c){var we=i||"";n&&(we+=n),o&&(we+=o);var me=$("span",[k],we,a);if(c)for(var ke in c)c.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&me.setAttribute(ke,c[ke]);return e.content.appendChild(me)}e.content.appendChild(k)}}function Ih(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",o=0;o<e.length;o++){var a=e.charAt(o);a==" "&&i&&(o==e.length-1||e.charCodeAt(o+1)==32)&&(a="\xA0"),n+=a,i=a==" "}return n}function Hh(e,t){return function(i,n,o,a,c,h,p){o=o?o+" cm-force-border":"cm-force-border";for(var v=i.pos,k=v+n.length;;){for(var C=void 0,R=0;R<t.length&&(C=t[R],!(C.to>v&&C.from<=v));R++);if(C.to>=k)return e(i,n,o,a,c,h,p);e(i,n.slice(0,C.to-v),o,a,null,h,p),a=null,n=n.slice(C.to-v),v=C.to}}}function ou(e,t,i,n){var o=!n&&i.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",i.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Wh(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var c=1;c<i.length;c+=2)t.addToken(t,o.slice(a,a=i[c]),nu(i[c+1],t.cm.options));return}for(var h=o.length,p=0,v=1,k="",C,R,E=0,U,Q,ue,ve,we;;){if(E==p){U=Q=ue=R="",we=null,ve=null,E=1/0;for(var me=[],ke=void 0,ze=0;ze<n.length;++ze){var Me=n[ze],Ue=Me.marker;if(Ue.type=="bookmark"&&Me.from==p&&Ue.widgetNode)me.push(Ue);else if(Me.from<=p&&(Me.to==null||Me.to>p||Ue.collapsed&&Me.to==p&&Me.from==p)){if(Me.to!=null&&Me.to!=p&&E>Me.to&&(E=Me.to,Q=""),Ue.className&&(U+=" "+Ue.className),Ue.css&&(R=(R?R+";":"")+Ue.css),Ue.startStyle&&Me.from==p&&(ue+=" "+Ue.startStyle),Ue.endStyle&&Me.to==E&&(ke||(ke=[])).push(Ue.endStyle,Me.to),Ue.title&&((we||(we={})).title=Ue.title),Ue.attributes)for(var rt in Ue.attributes)(we||(we={}))[rt]=Ue.attributes[rt];Ue.collapsed&&(!ve||Zs(ve.marker,Ue)<0)&&(ve=Me)}else Me.from>p&&E>Me.from&&(E=Me.from)}if(ke)for(var _t=0;_t<ke.length;_t+=2)ke[_t+1]==E&&(Q+=" "+ke[_t]);if(!ve||ve.from==p)for(var ft=0;ft<me.length;++ft)ou(t,0,me[ft]);if(ve&&(ve.from||0)==p){if(ou(t,(ve.to==null?h+1:ve.to)-p,ve.marker,ve.from==null),ve.to==null)return;ve.to==p&&(ve=!1)}}if(p>=h)break;for(var Vt=Math.min(h,E);;){if(k){var qt=p+k.length;if(!ve){var mt=qt>Vt?k.slice(0,Vt-p):k;t.addToken(t,mt,C?C+U:U,ue,p+mt.length==E?Q:"",R,we)}if(qt>=Vt){k=k.slice(Vt-p),p=Vt;break}p=qt,ue=""}k=o.slice(a,a=i[v++]),C=nu(i[v++],t.cm.options)}}}function su(e,t,i){this.line=t,this.rest=Eh(t),this.size=this.rest?Xe(F(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Qr(e,t)}function Wo(e,t,i){for(var n=[],o,a=t;a<i;a=o){var c=new su(e.doc,_e(e.doc,a),a);o=a+c.size,n.push(c)}return n}var Kn=null;function Bh(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function jh(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(i<t.length)}function Uh(e,t){var i=e.ownsGroup;if(!!i)try{jh(i)}finally{Kn=null,t(i)}}var Fi=null;function kt(e,t){var i=Fr(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Kn?o=Kn.delayedCallbacks:Fi?o=Fi:(o=Fi=[],setTimeout(Kh,0));for(var a=function(h){o.push(function(){return i[h].apply(null,n)})},c=0;c<i.length;++c)a(c)}}function Kh(){var e=Fi;Fi=null;for(var t=0;t<e.length;++t)e[t]()}function lu(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?$h(e,t):a=="gutter"?uu(e,t,i,n):a=="class"?el(e,t):a=="widget"&&Gh(e,t,n)}t.changes=null}function Ii(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&w<8&&(e.node.style.zIndex=2)),e.node}function qh(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=Ii(t);t.background=n.insertBefore($("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function au(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):iu(e,t)}function $h(e,t){var i=t.text.className,n=au(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,el(e,t)):i&&(t.text.className=i)}function el(e,t){qh(e,t),t.line.wrapClass?Ii(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function uu(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ii(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var c=Ii(t),h=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(h.setAttribute("aria-hidden","true"),e.display.input.setUneditable(h),c.insertBefore(h,t.text),t.line.gutterClass&&(h.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=h.appendChild($("div",zi(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var p=0;p<e.display.gutterSpecs.length;++p){var v=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(v)&&a[v];k&&h.appendChild($("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[v]+"px; width: "+n.gutterWidth[v]+"px"))}}}function Gh(e,t,i){t.alignable&&(t.alignable=null);for(var n=be("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);fu(e,t,i)}function Yh(e,t,i,n){var o=au(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),el(e,t),uu(e,t,i,n),fu(e,t,n),t.node}function fu(e,t,i){if(cu(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)cu(e,t.rest[n],t,i,!1)}function cu(e,t,i,n,o){if(!!t.widgets)for(var a=Ii(i),c=0,h=t.widgets;c<h.length;++c){var p=h[c],v=$("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||v.setAttribute("cm-ignore-events","true"),Xh(p,v,i,n),e.display.input.setUneditable(v),o&&p.above?a.insertBefore(v,i.gutter||i.text):a.appendChild(v),kt(p,"redraw")}}function Xh(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Hi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Y(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),j(t.display.measure,$("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Br(e,t){for(var i=Zr(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Bo(e){return e.lineSpace.offsetTop}function tl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function du(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,$("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Or(e){return K-e.display.nativeBarWidth}function kn(e){return e.display.scroller.clientWidth-Or(e)-e.display.barWidth}function rl(e){return e.display.scroller.clientHeight-Or(e)-e.display.barHeight}function Zh(e,t,i){var n=e.options.lineWrapping,o=n&&kn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var c=t.text.firstChild.getClientRects(),h=0;h<c.length-1;h++){var p=c[h],v=c[h+1];Math.abs(p.bottom-v.bottom)>2&&a.push((p.bottom+v.top)/2-i.top)}}a.push(i.bottom-i.top)}}function hu(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Xe(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Jh(e,t){t=vr(t);var i=Xe(t),n=e.display.externalMeasured=new su(e.doc,t,i);n.lineN=i;var o=n.built=iu(e,n);return n.text=o.pre,j(e.display.lineMeasure,o.pre),n}function pu(e,t,i,n){return Mr(e,qn(e,t),i,n)}function nl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[_n(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function qn(e,t){var i=Xe(t),n=nl(e,i);n&&!n.text?n=null:n&&n.changes&&(lu(e,n,i,al(e)),e.curOp.forceUpdate=!0),n||(n=Jh(e,t));var o=hu(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Mr(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),c;return t.cache.hasOwnProperty(a)?c=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zh(e,t.view,t.rect),t.hasHeights=!0),c=Vh(e,t,i,n),c.bogus||(t.cache[a]=c)),{left:c.left,right:c.right,top:o?c.rtop:c.top,bottom:o?c.rbottom:c.bottom}}var gu={left:0,right:0,top:0,bottom:0};function vu(e,t,i){for(var n,o,a,c,h,p,v=0;v<e.length;v+=3)if(h=e[v],p=e[v+1],t<h?(o=0,a=1,c="left"):t<p?(o=t-h,a=o+1):(v==e.length-3||t==p&&e[v+3]>t)&&(a=p-h,o=a-1,t>=p&&(c="right")),o!=null){if(n=e[v+2],h==p&&i==(n.insertLeft?"left":"right")&&(c=i),i=="left"&&o==0)for(;v&&e[v-2]==e[v-3]&&e[v-1].insertLeft;)n=e[(v-=3)+2],c="left";if(i=="right"&&o==p-h)for(;v<e.length-3&&e[v+3]==e[v+4]&&!e[v+5].insertLeft;)n=e[(v+=3)+2],c="right";break}return{node:n,start:o,end:a,collapse:c,coverStart:h,coverEnd:p}}function Qh(e,t){var i=gu;if(t=="left")for(var n=0;n<e.length&&(i=e[n]).left==i.right;n++);else for(var o=e.length-1;o>=0&&(i=e[o]).left==i.right;o--);return i}function Vh(e,t,i,n){var o=vu(t.map,i,n),a=o.node,c=o.start,h=o.end,p=o.collapse,v;if(a.nodeType==3){for(var k=0;k<4;k++){for(;c&&he(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&he(t.line.text.charAt(o.coverStart+h));)++h;if(y&&w<9&&c==0&&h==o.coverEnd-o.coverStart?v=a.parentNode.getBoundingClientRect():v=Qh(ee(a,c,h).getClientRects(),n),v.left||v.right||c==0)break;h=c,c=c-1,p="right"}y&&w<11&&(v=ep(e.display.measure,v))}else{c>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?v=C[n=="right"?C.length-1:0]:v=a.getBoundingClientRect()}if(y&&w<9&&!c&&(!v||!v.left&&!v.right)){var R=a.parentNode.getClientRects()[0];R?v={left:R.left,right:R.left+Gn(e.display),top:R.top,bottom:R.bottom}:v=gu}for(var E=v.top-t.rect.top,U=v.bottom-t.rect.top,Q=(E+U)/2,ue=t.view.measure.heights,ve=0;ve<ue.length-1&&!(Q<ue[ve]);ve++);var we=ve?ue[ve-1]:0,me=ue[ve],ke={left:(p=="right"?v.right:v.left)-t.rect.left,right:(p=="left"?v.left:v.right)-t.rect.left,top:we,bottom:me};return!v.left&&!v.right&&(ke.bogus=!0),e.options.singleCursorHeightPerLine||(ke.rtop=E,ke.rbottom=U),ke}function ep(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jr(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function mu(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function yu(e){e.display.externalMeasure=null,Ee(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)mu(e.display.view[t])}function Wi(e){yu(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function bu(){return O&&D?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wu(){return O&&D?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function il(e){var t=vr(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Hi(i[o]));return n}function jo(e,t,i,n,o){if(!o){var a=il(t);i.top+=a,i.bottom+=a}if(n=="line")return i;n||(n="local");var c=Wr(t);if(n=="local"?c+=Bo(e.display):c-=e.display.viewOffset,n=="page"||n=="window"){var h=e.display.lineSpace.getBoundingClientRect();c+=h.top+(n=="window"?0:wu());var p=h.left+(n=="window"?0:bu());i.left+=p,i.right+=p}return i.top+=c,i.bottom+=c,i}function xu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=bu(),o-=wu();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var c=e.display.lineSpace.getBoundingClientRect();return{left:n-c.left,top:o-c.top}}function Uo(e,t,i,n,o){return n||(n=_e(e.doc,t.line)),jo(e,n,pu(e,n,t.ch,o),i)}function mr(e,t,i,n,o,a){n=n||_e(e.doc,t.line),o||(o=qn(e,n));function c(U,Q){var ue=Mr(e,o,U,Q?"right":"left",a);return Q?ue.left=ue.right:ue.right=ue.left,jo(e,n,ue,i)}var h=vt(n,e.doc.direction),p=t.ch,v=t.sticky;if(p>=n.text.length?(p=n.text.length,v="before"):p<=0&&(p=0,v="after"),!h)return c(v=="before"?p-1:p,v=="before");function k(U,Q,ue){var ve=h[Q],we=ve.level==1;return c(ue?U-1:U,we!=ue)}var C=He(h,p,v),R=Ke,E=k(p,C,v=="before");return R!=null&&(E.other=k(p,R,v!="before")),E}function ku(e,t){var i=0;t=xe(e.doc,t),e.options.lineWrapping||(i=Gn(e.display)*t.ch);var n=_e(e.doc,t.line),o=Wr(n)+Bo(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function ol(e,t,i,n,o){var a=ie(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function sl(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return ol(n.first,0,null,-1,-1);var o=Lr(n,i),a=n.first+n.size-1;if(o>a)return ol(n.first+n.size-1,_e(n,a).text.length,null,1,1);t<0&&(t=0);for(var c=_e(n,o);;){var h=tp(e,c,o,t,i),p=Oh(c,h.ch+(h.xRel>0||h.outside>0?1:0));if(!p)return h;var v=p.find(1);if(v.line==o)return v;c=_e(n,o=v.line)}}function Su(e,t,i,n){n-=il(t);var o=t.text.length,a=Be(function(c){return Mr(e,i,c-1).bottom<=n},o,0);return o=Be(function(c){return Mr(e,i,c).top>n},a,o),{begin:a,end:o}}function Cu(e,t,i,n){i||(i=qn(e,t));var o=jo(e,t,Mr(e,i,n),"line").top;return Su(e,t,i,o)}function ll(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function tp(e,t,i,n,o){o-=Wr(t);var a=qn(e,t),c=il(t),h=0,p=t.text.length,v=!0,k=vt(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?np:rp)(e,t,i,a,k,n,o);v=C.level!=1,h=v?C.from:C.to-1,p=v?C.to:C.from-1}var R=null,E=null,U=Be(function(ze){var Me=Mr(e,a,ze);return Me.top+=c,Me.bottom+=c,ll(Me,n,o,!1)?(Me.top<=o&&Me.left<=n&&(R=ze,E=Me),!0):!1},h,p),Q,ue,ve=!1;if(E){var we=n-E.left<E.right-n,me=we==v;U=R+(me?0:1),ue=me?"after":"before",Q=we?E.left:E.right}else{!v&&(U==p||U==h)&&U++,ue=U==0?"after":U==t.text.length?"before":Mr(e,a,U-(v?1:0)).bottom+c<=o==v?"after":"before";var ke=mr(e,ie(i,U,ue),"line",t,a);Q=ke.left,ve=o<ke.top?-1:o>=ke.bottom?1:0}return U=Le(t.text,U,1),ol(i,U,ue,ve,n-Q)}function rp(e,t,i,n,o,a,c){var h=Be(function(C){var R=o[C],E=R.level!=1;return ll(mr(e,ie(i,E?R.to:R.from,E?"before":"after"),"line",t,n),a,c,!0)},0,o.length-1),p=o[h];if(h>0){var v=p.level!=1,k=mr(e,ie(i,v?p.from:p.to,v?"after":"before"),"line",t,n);ll(k,a,c,!0)&&k.top>c&&(p=o[h-1])}return p}function np(e,t,i,n,o,a,c){var h=Su(e,t,n,c),p=h.begin,v=h.end;/\s/.test(t.text.charAt(v-1))&&v--;for(var k=null,C=null,R=0;R<o.length;R++){var E=o[R];if(!(E.from>=v||E.to<=p)){var U=E.level!=1,Q=Mr(e,n,U?Math.min(v,E.to)-1:Math.max(p,E.from)).right,ue=Q<a?a-Q+1e9:Q-a;(!k||C>ue)&&(k=E,C=ue)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>v&&(k={from:k.from,to:v,level:k.level}),k}var Sn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sn==null){Sn=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sn.appendChild(document.createTextNode("x")),Sn.appendChild($("br"));Sn.appendChild(document.createTextNode("x"))}j(e.measure,Sn);var i=Sn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Ee(e.measure),i||1}function Gn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),i=$("pre",[t],"CodeMirror-line-like");j(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function al(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,c=0;a;a=a.nextSibling,++c){var h=e.display.gutterSpecs[c].className;i[h]=a.offsetLeft+a.clientLeft+o,n[h]=a.clientWidth}return{fixedPos:ul(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ul(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _u(e){var t=$n(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Gn(e.display)-3);return function(o){if(Qr(e.doc,o))return 0;var a=0;if(o.widgets)for(var c=0;c<o.widgets.length;c++)o.widgets[c].height&&(a+=o.widgets[c].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function fl(e){var t=e.doc,i=_u(e);t.iter(function(n){var o=i(n);o!=n.height&&Jt(n,o)})}function Cn(e,t,i,n){var o=e.display;if(!i&&Zr(t).getAttribute("cm-not-content")=="true")return null;var a,c,h=o.lineSpace.getBoundingClientRect();try{a=t.clientX-h.left,c=t.clientY-h.top}catch{return null}var p=sl(e,a,c),v;if(n&&p.xRel>0&&(v=_e(e.doc,p.line).text).length==p.ch){var k=Qe(v,v.length,e.options.tabSize)-v.length;p=ie(p.line,Math.max(0,Math.round((a-du(e.display).left)/Gn(e.display))-k))}return p}function _n(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Ut(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&i<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Hr&&Js(e.doc,t)<o.viewTo&&en(e);else if(i<=o.viewFrom)Hr&&ru(e.doc,i+n)>o.viewFrom?en(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)en(e);else if(t<=o.viewFrom){var a=Ko(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):en(e)}else if(i>=o.viewTo){var c=Ko(e,t,t,-1);c?(o.view=o.view.slice(0,c.index),o.viewTo=c.lineN):en(e)}else{var h=Ko(e,t,t,-1),p=Ko(e,i,i+n,1);h&&p?(o.view=o.view.slice(0,h.index).concat(Wo(e,h.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):en(e)}var v=o.externalMeasured;v&&(i<v.lineN?v.lineN+=n:t<v.lineN+v.size&&(o.externalMeasured=null))}function Vr(e,t,i){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var a=n.view[_n(e,t)];if(a.node!=null){var c=a.changes||(a.changes=[]);Z(c,i)==-1&&c.push(i)}}}function en(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ko(e,t,i,n){var o=_n(e,t),a,c=e.display.view;if(!Hr||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var h=e.display.viewFrom,p=0;p<o;p++)h+=c[p].size;if(h!=t){if(n>0){if(o==c.length-1)return null;a=h+c[o].size-t,o++}else a=h-t;t+=a,i+=a}for(;Js(e.doc,i)!=i;){if(o==(n<0?0:c.length-1))return null;i+=n*c[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function ip(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Wo(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Wo(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(_n(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Wo(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,_n(e,i)))),n.viewTo=i}function Tu(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var o=t[n];!o.hidden&&(!o.node||o.changes)&&++i}return i}function Bi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Lu(e,t){t===void 0&&(t=!0);var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),c=e.options.$customCursor;c&&(t=!0);for(var h=0;h<i.sel.ranges.length;h++)if(!(!t&&h==i.sel.primIndex)){var p=i.sel.ranges[h];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var v=p.empty();if(c){var k=c(e,p);k&&cl(e,k,o)}else(v||e.options.showCursorWhenSelecting)&&cl(e,p.head,o);v||op(e,p,a)}}return n}function cl(e,t,i){var n=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild($("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Uo(e,t,"div",null,null),c=a.right-a.left;o.style.width=(c>0?c:e.defaultCharWidth())+"px"}if(n.other){var h=i.appendChild($("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));h.style.display="",h.style.left=n.other.left+"px",h.style.top=n.other.top+"px",h.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function qo(e,t){return e.top-t.top||e.left-t.left}function op(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),c=du(e.display),h=c.left,p=Math.max(n.sizerWidth,kn(e)-n.sizer.offsetLeft)-c.right,v=o.direction=="ltr";function k(me,ke,ze,Me){ke<0&&(ke=0),ke=Math.round(ke),Me=Math.round(Me),a.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+me+`px;
6
- top: `+ke+"px; width: "+(ze==null?p-me:ze)+`px;
7
- height: `+(Me-ke)+"px"))}function C(me,ke,ze){var Me=_e(o,me),Ue=Me.text.length,rt,_t;function ft(mt,$t){return Uo(e,ie(me,mt),"div",Me,$t)}function Vt(mt,$t,Ot){var wt=Cu(e,Me,null,mt),yt=$t=="ltr"==(Ot=="after")?"left":"right",ht=Ot=="after"?wt.begin:wt.end-(/\s/.test(Me.text.charAt(wt.end-1))?2:1);return ft(ht,yt)[yt]}var qt=vt(Me,o.direction);return Je(qt,ke||0,ze==null?Ue:ze,function(mt,$t,Ot,wt){var yt=Ot=="ltr",ht=ft(mt,yt?"left":"right"),Gt=ft($t-1,yt?"right":"left"),si=ke==null&&mt==0,ln=ze==null&&$t==Ue,Ft=wt==0,Er=!qt||wt==qt.length-1;if(Gt.top-ht.top<=3){var Tt=(v?si:ln)&&Ft,Fl=(v?ln:si)&&Er,Kr=Tt?h:(yt?ht:Gt).left,Mn=Fl?p:(yt?Gt:ht).right;k(Kr,ht.top,Mn-Kr,ht.bottom)}else{var En,Wt,li,Il;yt?(En=v&&si&&Ft?h:ht.left,Wt=v?p:Vt(mt,Ot,"before"),li=v?h:Vt($t,Ot,"after"),Il=v&&ln&&Er?p:Gt.right):(En=v?Vt(mt,Ot,"before"):h,Wt=!v&&si&&Ft?p:ht.right,li=!v&&ln&&Er?h:Gt.left,Il=v?Vt($t,Ot,"after"):p),k(En,ht.top,Wt-En,ht.bottom),ht.bottom<Gt.top&&k(h,ht.bottom,null,Gt.top),k(li,Gt.top,Il-li,Gt.bottom)}(!rt||qo(ht,rt)<0)&&(rt=ht),qo(Gt,rt)<0&&(rt=Gt),(!_t||qo(ht,_t)<0)&&(_t=ht),qo(Gt,_t)<0&&(_t=Gt)}),{start:rt,end:_t}}var R=t.from(),E=t.to();if(R.line==E.line)C(R.line,R.ch,E.ch);else{var U=_e(o,R.line),Q=_e(o,E.line),ue=vr(U)==vr(Q),ve=C(R.line,R.ch,ue?U.text.length+1:null).end,we=C(E.line,ue?0:null,E.ch).start;ue&&(ve.top<we.top-2?(k(ve.right,ve.top,null,ve.bottom),k(h,we.top,we.left,we.bottom)):k(ve.right,ve.top,we.left-ve.right,ve.bottom)),ve.bottom<we.top&&k(h,ve.bottom,null,we.top)}i.appendChild(a)}function dl(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Yn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||pl(e))}function hl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Yn(e))},100)}function pl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,Re(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),S&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),dl(e))}function Yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,de(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function $o(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var h=t.view[c],p=e.options.lineWrapping,v=void 0,k=0;if(!h.hidden){if(o+=h.line.height,y&&w<8){var C=h.node.offsetTop+h.node.offsetHeight;v=C-i,i=C}else{var R=h.node.getBoundingClientRect();v=R.bottom-R.top,!p&&h.text.firstChild&&(k=h.text.firstChild.getBoundingClientRect().right-R.left-1)}var E=h.line.height-v;if((E>.005||E<-.005)&&(o<n&&(a-=E),Jt(h.line,v),Ou(h.line),h.rest))for(var U=0;U<h.rest.length;U++)Ou(h.rest[U]);if(k>e.display.sizerWidth){var Q=Math.ceil(k/Gn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Ou(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Go(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Bo(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=Lr(t,n),c=Lr(t,o);if(i&&i.ensure){var h=i.ensure.from.line,p=i.ensure.to.line;h<a?(a=h,c=Lr(t,Wr(_e(t,h))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=c&&(a=Lr(t,Wr(_e(t,p))-e.wrapper.clientHeight),c=p)}return{from:a,to:Math.max(c,a+1)}}function sp(e,t){if(!ut(e,"scrollCursorIntoView")){var i=e.display,n=i.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!V){var a=$("div","\u200B",null,`position: absolute;
8
- top: `+(t.top-i.viewOffset-Bo(e.display))+`px;
9
- height: `+(t.bottom-t.top+Or(e)+i.barHeight)+`px;
10
- left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function lp(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ie(t.line,t.ch+1,"before"):t,t=t.ch?ie(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var c=!1,h=mr(e,t),p=!i||i==t?h:mr(e,i);o={left:Math.min(h.left,p.left),top:Math.min(h.top,p.top)-n,right:Math.max(h.left,p.left),bottom:Math.max(h.bottom,p.bottom)+n};var v=gl(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(v.scrollTop!=null&&(Ui(e,v.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(c=!0)),v.scrollLeft!=null&&(Tn(e,v.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(c=!0)),!c)break}return o}function ap(e,t){var i=gl(e,t);i.scrollTop!=null&&Ui(e,i.scrollTop),i.scrollLeft!=null&&Tn(e,i.scrollLeft)}function gl(e,t){var i=e.display,n=$n(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=rl(e),c={};t.bottom-t.top>a&&(t.bottom=t.top+a);var h=e.doc.height+tl(i),p=t.top<n,v=t.bottom>h-n;if(t.top<o)c.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(v?h:t.bottom)-a);k!=o&&(c.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,E=kn(e)-i.gutters.offsetWidth,U=t.right-t.left>E;return U&&(t.right=t.left+E),t.left<10?c.scrollLeft=0:t.left<R?c.scrollLeft=Math.max(0,t.left+C-(U?0:10)):t.right>E+R-3&&(c.scrollLeft=t.right+(U?0:10)-E),c}function vl(e,t){t!=null&&(Yo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xn(e){Yo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ji(e,t,i){(t!=null||i!=null)&&Yo(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function up(e,t){Yo(e),e.curOp.scrollToPos=t}function Yo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=ku(e,t.from),n=ku(e,t.to);Mu(e,i,n,t.margin)}}function Mu(e,t,i,n){var o=gl(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});ji(e,o.scrollLeft,o.scrollTop)}function Ui(e,t){Math.abs(e.doc.scrollTop-t)<2||(f||yl(e,{top:t}),Eu(e,t,!0),f&&yl(e),$i(e,100))}function Eu(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Tn(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,Du(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ki(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+tl(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Or(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Ln=function(e,t,i){this.cm=i;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Pe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Pe(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&w<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ln.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Ln.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ln.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ln.prototype.zeroWidthHack=function(){var e=B&&!re?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},Ln.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var o=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Ln.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Zn(e,t){t||(t=Ki(e));var i=e.display.barWidth,n=e.display.barHeight;Au(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&$o(e),Au(e,Ki(e)),i=e.display.barWidth,n=e.display.barHeight}function Au(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Nu={native:Ln,null:qi};function zu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Nu[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Tn(e,t):Ui(e,t)},e),e.display.scrollbars.addClass&&Re(e.display.wrapper,e.display.scrollbars.addClass)}var fp=0;function Pn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++fp,markArrays:null},Bh(e.curOp)}function On(e){var t=e.curOp;t&&Uh(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;cp(i)})}function cp(e){for(var t=e.ops,i=0;i<t.length;i++)dp(t[i]);for(var n=0;n<t.length;n++)hp(t[n]);for(var o=0;o<t.length;o++)pp(t[o]);for(var a=0;a<t.length;a++)gp(t[a]);for(var c=0;c<t.length;c++)vp(t[c])}function dp(e){var t=e.cm,i=t.display;yp(t),e.updateMaxLine&&Vs(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hp(e){e.updatedDisplay=e.mustUpdate&&ml(e.cm,e.update)}function pp(e){var t=e.cm,i=t.display;e.updatedDisplay&&$o(t),e.barMeasure=Ki(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=pu(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Or(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-kn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function gp(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Tn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==ae();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Zn(t,e.barMeasure),e.updatedDisplay&&wl(t,e.barMeasure),e.selectionChanged&&dl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Pu(e.cm)}function vp(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Ru(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Eu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Tn(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=lp(t,xe(n,e.scrollToPos.from),xe(n,e.scrollToPos.to),e.scrollToPos.margin);sp(t,o)}var a=e.maybeHiddenMarkers,c=e.maybeUnhiddenMarkers;if(a)for(var h=0;h<a.length;++h)a[h].lines.length||Oe(a[h],"hide");if(c)for(var p=0;p<c.length;++p)c[p].lines.length&&Oe(c[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qt(e,t){if(e.curOp)return t();Pn(e);try{return t()}finally{On(e)}}function St(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Pn(e);try{return t.apply(e,arguments)}finally{On(e)}}}function Ht(e){return function(){if(this.curOp)return e.apply(this,arguments);Pn(this);try{return e.apply(this,arguments)}finally{On(this)}}}function Ct(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Pn(t);try{return e.apply(this,arguments)}finally{On(t)}}}function $i(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,lt(mp,e))}function mp(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=Ri(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var c=a.styles,h=a.text.length>e.options.maxHighlightLength?sr(t.mode,n.state):null,p=ja(e,a,n,!0);h&&(n.state=h),a.styles=p.styles;var v=a.styleClasses,k=p.classes;k?a.styleClasses=k:v&&(a.styleClasses=null);for(var C=!c||c.length!=a.styles.length||v!=k&&(!v||!k||v.bgClass!=k.bgClass||v.textClass!=k.textClass),R=0;!C&&R<c.length;++R)C=c[R]!=a.styles[R];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Gs(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return $i(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Qt(e,function(){for(var a=0;a<o.length;a++)Vr(e,o[a],"text")})}}var Xo=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Go(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=kn(e),this.force=i,this.dims=al(e),this.events=[]};Xo.prototype.signal=function(e,t){Pt(e,t)&&this.events.push(arguments)},Xo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function yp(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Or(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Or(e)+"px",t.scrollbarsClipped=!0)}function bp(e){if(e.hasFocus())return null;var t=ae();if(!t||!Y(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Y(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function wp(e){if(!(!e||!e.activeElt||e.activeElt==ae())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Y(document.body,e.anchorNode)&&Y(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function ml(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return en(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Tu(e)==0)return!1;Fu(e)&&(en(e),t.dims=al(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),c=Math.min(o,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(n.first,i.viewFrom)),i.viewTo>c&&i.viewTo-c<20&&(c=Math.min(o,i.viewTo)),Hr&&(a=Js(e.doc,a),c=ru(e.doc,c));var h=a!=i.viewFrom||c!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;ip(e,a,c),i.viewOffset=Wr(_e(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=Tu(e);if(!h&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var v=bp(e);return p>4&&(i.lineDiv.style.display="none"),xp(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,wp(v),Ee(i.cursorDiv),Ee(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,h&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,$i(e,400)),i.updateLineNumbers=null,!0}function Ru(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==kn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+tl(e.display)-rl(e),i.top)}),t.visible=Go(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Go(e.display,e.doc,i));if(!ml(e,t))break;$o(e);var o=Ki(e);Bi(e),Zn(e,o),wl(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function yl(e,t){var i=new Xo(e,t);if(ml(e,i)){$o(e),Ru(e,i);var n=Ki(e);Bi(e),Zn(e,n),wl(e,n),i.finish()}}function xp(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,c=a.firstChild;function h(U){var Q=U.nextSibling;return S&&B&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var p=n.view,v=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var R=Yh(e,C,v,i);a.insertBefore(R,c)}else{for(;c!=C.node;)c=h(c);var E=o&&t!=null&&t<=v&&C.lineNumber;C.changes&&(Z(C.changes,"gutter")>-1&&(E=!1),lu(e,C,v,i)),E&&(Ee(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(zi(e.options,v)))),c=C.node.nextSibling}v+=C.size}for(;c;)c=h(c)}function bl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",kt(e,"gutterChanged",e)}function wl(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Or(e)+"px"}function Du(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=ul(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",c=0;c<i.length;c++)if(!i[c].hidden){e.options.fixedGutter&&(i[c].gutter&&(i[c].gutter.style.left=a),i[c].gutterBackground&&(i[c].gutterBackground.style.left=a));var h=i[c].alignable;if(h)for(var p=0;p<h.length;p++)h[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Fu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=zi(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild($("div",[$("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,c=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-c)+1,n.lineNumWidth=n.lineNumInnerWidth+c,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",bl(e.display),!0}return!1}function xl(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],c=null;if(typeof a!="string"&&(c=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:c})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Iu(e){var t=e.gutters,i=e.gutterSpecs;Ee(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,c=o.style,h=t.appendChild($("div",null,"CodeMirror-gutter "+a));c&&(h.style.cssText=c),a=="CodeMirror-linenumbers"&&(e.lineGutter=h,h.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",bl(e)}function Gi(e){Iu(e.display),Ut(e),Du(e)}function kp(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=x("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=x("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=x("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[a],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+K+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&w<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!S&&!(f&&I)&&(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=xl(n.gutters,n.lineNumbers),Iu(o),i.init(o)}var Zo=0,jr=null;y?jr=-.53:f?jr=15:O?jr=-.7:H&&(jr=-1/3);function Hu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function Sp(e){var t=Hu(e);return t.x*=jr,t.y*=jr,t}function Wu(e,t){var i=Hu(t),n=i.x,o=i.y,a=jr;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var c=e.display,h=c.scroller,p=h.scrollWidth>h.clientWidth,v=h.scrollHeight>h.clientHeight;if(!!(n&&p||o&&v)){if(o&&B&&S){e:for(var k=t.target,C=c.view;k!=h;k=k.parentNode)for(var R=0;R<C.length;R++)if(C[R].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!f&&!M&&a!=null){o&&v&&Ui(e,Math.max(0,h.scrollTop+o*a)),Tn(e,Math.max(0,h.scrollLeft+n*a)),(!o||o&&v)&&zt(t),c.wheelStartX=null;return}if(o&&a!=null){var E=o*a,U=e.doc.scrollTop,Q=U+c.wrapper.clientHeight;E<0?U=Math.max(0,U+E-50):Q=Math.min(e.doc.height,Q+E+50),yl(e,{top:U,bottom:Q})}Zo<20&&t.deltaMode!==0&&(c.wheelStartX==null?(c.wheelStartX=h.scrollLeft,c.wheelStartY=h.scrollTop,c.wheelDX=n,c.wheelDY=o,setTimeout(function(){if(c.wheelStartX!=null){var ue=h.scrollLeft-c.wheelStartX,ve=h.scrollTop-c.wheelStartY,we=ve&&c.wheelDY&&ve/c.wheelDY||ue&&c.wheelDX&&ue/c.wheelDX;c.wheelStartX=c.wheelStartY=null,we&&(jr=(jr*Zo+we)/(Zo+1),++Zo)}},200)):(c.wheelDX+=n,c.wheelDY+=o))}}var ar=function(e,t){this.ranges=e,this.primIndex=t};ar.prototype.primary=function(){return this.ranges[this.primIndex]},ar.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!P(i.anchor,n.anchor)||!P(i.head,n.head))return!1}return!0},ar.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ze(X(this.ranges[t].anchor),X(this.ranges[t].head));return new ar(e,this.primIndex)},ar.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ar.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(m(t,n.from())>=0&&m(e,n.to())<=0)return i}return-1};var Ze=function(e,t){this.anchor=e,this.head=t};Ze.prototype.from=function(){return De(this.anchor,this.head)},Ze.prototype.to=function(){return le(this.anchor,this.head)},Ze.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(R,E){return m(R.from(),E.from())}),i=Z(t,o);for(var a=1;a<t.length;a++){var c=t[a],h=t[a-1],p=m(h.to(),c.from());if(n&&!c.empty()?p>0:p>=0){var v=De(h.from(),c.from()),k=le(h.to(),c.to()),C=h.empty()?c.from()==c.head:h.from()==h.head;a<=i&&--i,t.splice(--a,2,new Ze(C?k:v,C?v:k))}}return new ar(t,i)}function tn(e,t){return new ar([new Ze(e,t||e)],0)}function rn(e){return e.text?ie(e.from.line+e.text.length-1,F(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Bu(e,t){if(m(e,t.from)<0)return e;if(m(e,t.to)<=0)return rn(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=rn(t).ch-t.to.ch),ie(i,n)}function kl(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Ze(Bu(o.anchor,t),Bu(o.head,t)))}return yr(e.cm,i,e.sel.primIndex)}function ju(e,t,i){return e.line==t.line?ie(i.line,e.ch-t.ch+i.ch):ie(i.line+(e.line-t.line),e.ch)}function Cp(e,t,i){for(var n=[],o=ie(e.first,0),a=o,c=0;c<t.length;c++){var h=t[c],p=ju(h.from,o,a),v=ju(rn(h),o,a);if(o=h.to,a=v,i=="around"){var k=e.sel.ranges[c],C=m(k.head,k.anchor)<0;n[c]=new Ze(C?v:p,C?p:v)}else n[c]=new Ze(p,p)}return new ar(n,e.sel.primIndex)}function Sl(e){e.doc.mode=Bn(e.options,e.doc.modeOption),Yi(e)}function Yi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,$i(e,100),e.state.modeGen++,e.curOp&&Ut(e)}function Uu(e,t){return t.from.ch==0&&t.to.ch==0&&F(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Cl(e,t,i,n){function o(we){return i?i[we]:null}function a(we,me,ke){Ah(we,me,ke,n),kt(we,"change",we,t)}function c(we,me){for(var ke=[],ze=we;ze<me;++ze)ke.push(new Un(v[ze],o(ze),n));return ke}var h=t.from,p=t.to,v=t.text,k=_e(e,h.line),C=_e(e,p.line),R=F(v),E=o(v.length-1),U=p.line-h.line;if(t.full)e.insert(0,c(0,v.length)),e.remove(v.length,e.size-v.length);else if(Uu(e,t)){var Q=c(0,v.length-1);a(C,C.text,E),U&&e.remove(h.line,U),Q.length&&e.insert(h.line,Q)}else if(k==C)if(v.length==1)a(k,k.text.slice(0,h.ch)+R+k.text.slice(p.ch),E);else{var ue=c(1,v.length-1);ue.push(new Un(R+k.text.slice(p.ch),E,n)),a(k,k.text.slice(0,h.ch)+v[0],o(0)),e.insert(h.line+1,ue)}else if(v.length==1)a(k,k.text.slice(0,h.ch)+v[0]+C.text.slice(p.ch),o(0)),e.remove(h.line+1,U);else{a(k,k.text.slice(0,h.ch)+v[0],o(0)),a(C,R+C.text.slice(p.ch),E);var ve=c(1,v.length-1);U>1&&e.remove(h.line+1,U-1),e.insert(h.line+1,ve)}kt(e,"change",e,t)}function nn(e,t,i){function n(o,a,c){if(o.linked)for(var h=0;h<o.linked.length;++h){var p=o.linked[h];if(p.doc!=a){var v=c&&p.sharedHist;i&&!v||(t(p.doc,v),n(p.doc,o,v))}}}n(e,null,!0)}function Ku(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,fl(e),Sl(e),qu(e),e.options.direction=t.direction,e.options.lineWrapping||Vs(e),e.options.mode=t.modeOption,Ut(e)}function qu(e){(e.doc.direction=="rtl"?Re:de)(e.display.lineDiv,"CodeMirror-rtl")}function _p(e){Qt(e,function(){qu(e),Ut(e)})}function Jo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function _l(e,t){var i={from:X(t.from),to:rn(t),text:Tr(e,t.from,t.to)};return Yu(e,i,t.from.line,t.to.line+1),nn(e,function(n){return Yu(n,i,t.from.line,t.to.line+1)},!0),i}function $u(e){for(;e.length;){var t=F(e);if(t.ranges)e.pop();else break}}function Tp(e,t){if(t)return $u(e.done),F(e.done);if(e.done.length&&!F(e.done).ranges)return F(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),F(e.done)}function Gu(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,c,h;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(c=Tp(o,o.lastOp==n)))h=F(c.changes),m(t.from,t.to)==0&&m(t.from,h.to)==0?h.to=rn(t):c.changes.push(_l(e,t));else{var p=F(o.done);for((!p||!p.ranges)&&Qo(e.sel,o.done),c={changes:[_l(e,t)],generation:o.generation},o.done.push(c);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(i),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,h||Oe(e,"historyAdded")}function Lp(e,t,i,n){var o=t.charAt(0);return o=="*"||o=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pp(e,t,i,n){var o=e.history,a=n&&n.origin;i==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Lp(e,a,F(o.done),t))?o.done[o.done.length-1]=t:Qo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&$u(o.undone)}function Qo(e,t){var i=F(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Yu(e,t,i,n){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(c){c.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=c.markedSpans),++a})}function Op(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function Mp(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Op(i[o]));return n}function Xu(e,t){var i=Mp(e,t),n=Xs(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],c=n[o];if(a&&c){e:for(var h=0;h<c.length;++h){for(var p=c[h],v=0;v<a.length;++v)if(a[v].marker==p.marker)continue e;a.push(p)}}else c&&(i[o]=c)}return i}function Jn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?ar.prototype.deepCopy.call(a):a);continue}var c=a.changes,h=[];n.push({changes:h});for(var p=0;p<c.length;++p){var v=c[p],k=void 0;if(h.push({from:v.from,to:v.to,text:v.text}),t)for(var C in v)(k=C.match(/^spans_(\d+)$/))&&Z(t,Number(k[1]))>-1&&(F(h)[C]=v[C],delete v[C])}}return n}function Tl(e,t,i,n){if(n){var o=e.anchor;if(i){var a=m(t,o)<0;a!=m(i,o)<0?(o=t,t=i):a!=m(t,i)<0&&(t=i)}return new Ze(o,t)}else return new Ze(i||t,t)}function Vo(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Dt(e,new ar([Tl(e.sel.primary(),t,i,o)],0),n)}function Zu(e,t,i){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Tl(e.sel.ranges[a],t[a],null,o);var c=yr(e.cm,n,e.sel.primIndex);Dt(e,c,i)}function Ll(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Dt(e,yr(e.cm,o,e.sel.primIndex),n)}function Ju(e,t,i,n){Dt(e,tn(t,i),n)}function Ep(e,t,i){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var a=0;a<o.length;a++)this.ranges[a]=new Ze(xe(e,o[a].anchor),xe(e,o[a].head))},origin:i&&i.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?yr(e.cm,n.ranges,n.ranges.length-1):t}function Qu(e,t,i){var n=e.history.done,o=F(n);o&&o.ranges?(n[n.length-1]=t,es(e,t,i)):Dt(e,t,i)}function Dt(e,t,i){es(e,t,i),Pp(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function es(e,t,i){(Pt(e,"beforeSelectionChange")||e.cm&&Pt(e.cm,"beforeSelectionChange"))&&(t=Ep(e,t,i));var n=i&&i.bias||(m(t.primary().head,e.sel.primary().head)<0?-1:1);Vu(e,tf(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Xn(e.cm)}function Vu(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,In(e.cm)),kt(e,"cursorActivity",e))}function ef(e){Vu(e,tf(e,e.sel,null,!1))}function tf(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var c=t.ranges[a],h=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=ts(e,c.anchor,h&&h.anchor,i,n),v=ts(e,c.head,h&&h.head,i,n);(o||p!=c.anchor||v!=c.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new Ze(p,v))}return o?yr(e.cm,o,t.primIndex):t}function Qn(e,t,i,n,o){var a=_e(e,t.line);if(a.markedSpans)for(var c=0;c<a.markedSpans.length;++c){var h=a.markedSpans[c],p=h.marker,v="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((h.from==null||(v?h.from<=t.ch:h.from<t.ch))&&(h.to==null||(k?h.to>=t.ch:h.to>t.ch))){if(o&&(Oe(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--c;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),R=void 0;if((n<0?k:v)&&(C=rf(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(R=m(C,i))&&(n<0?R<0:R>0))return Qn(e,C,t,n,o)}var E=p.find(n<0?-1:1);return(n<0?v:k)&&(E=rf(e,E,n,E.line==t.line?a:null)),E?Qn(e,E,t,n,o):null}}return t}function ts(e,t,i,n,o){var a=n||1,c=Qn(e,t,i,a,o)||!o&&Qn(e,t,i,a,!0)||Qn(e,t,i,-a,o)||!o&&Qn(e,t,i,-a,!0);return c||(e.cantEdit=!0,ie(e.first,0))}function rf(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?xe(e,ie(t.line-1)):null:i>0&&t.ch==(n||_e(e,t.line)).text.length?t.line<e.first+e.size-1?ie(t.line+1,0):null:new ie(t.line,t.ch+i)}function nf(e){e.setSelection(ie(e.firstLine(),0),ie(e.lastLine()),Ce)}function of(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(o,a,c,h){o&&(n.from=xe(e,o)),a&&(n.to=xe(e,a)),c&&(n.text=c),h!==void 0&&(n.origin=h)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Vn(e,t,i){if(e.cm){if(!e.cm.curOp)return St(e.cm,Vn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"))&&(t=of(e,t,!0),!t))){var n=Xa&&!i&&Ph(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)sf(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else sf(e,t)}}function sf(e,t){if(!(t.text.length==1&&t.text[0]==""&&m(t.from,t.to)==0)){var i=kl(e,t);Gu(e,t,i,e.cm?e.cm.curOp.id:NaN),Xi(e,t,i,Xs(e,t));var n=[];nn(e,function(o,a){!a&&Z(n,o.history)==-1&&(ff(o.history,t),n.push(o.history)),Xi(o,t,null,Xs(o,t))})}}function rs(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,c=e.sel,h=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,v=0;v<h.length&&(a=h[v],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));v++);if(v!=h.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=h.pop(),a.ranges){if(Qo(a,p),i&&!a.equals(e.sel)){Dt(e,a,{clearRedo:!1});return}c=a}else if(n){h.push(a);return}else break;var k=[];Qo(c,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"),R=function(Q){var ue=a.changes[Q];if(ue.origin=t,C&&!of(e,ue,!1))return h.length=0,{};k.push(_l(e,ue));var ve=Q?kl(e,ue):F(h);Xi(e,ue,ve,Xu(e,ue)),!Q&&e.cm&&e.cm.scrollIntoView({from:ue.from,to:rn(ue)});var we=[];nn(e,function(me,ke){!ke&&Z(we,me.history)==-1&&(ff(me.history,ue),we.push(me.history)),Xi(me,ue,null,Xu(me,ue))})},E=a.changes.length-1;E>=0;--E){var U=R(E);if(U)return U.v}}}}function lf(e,t){if(t!=0&&(e.first+=t,e.sel=new ar(G(e.sel.ranges,function(o){return new Ze(ie(o.anchor.line+t,o.anchor.ch),ie(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Ut(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Vr(e.cm,n,"gutter")}}function Xi(e,t,i,n){if(e.cm&&!e.cm.curOp)return St(e.cm,Xi)(e,t,i,n);if(t.to.line<e.first){lf(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);lf(e,o),t={from:ie(e.first,0),to:ie(t.to.line+o,t.to.ch),text:[F(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ie(a,_e(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Tr(e,t.from,t.to),i||(i=kl(e,t)),e.cm?Ap(e.cm,t,n):Cl(e,t,n),es(e,i,Ce),e.cantEdit&&ts(e,ie(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ap(e,t,i){var n=e.doc,o=e.display,a=t.from,c=t.to,h=!1,p=a.line;e.options.lineWrapping||(p=Xe(vr(_e(n,a.line))),n.iter(p,c.line+1,function(E){if(E==o.maxLine)return h=!0,!0})),n.sel.contains(t.from,t.to)>-1&&In(e),Cl(n,t,i,_u(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(E){var U=Ho(E);U>o.maxLineLength&&(o.maxLine=E,o.maxLineLength=U,o.maxLineChanged=!0,h=!1)}),h&&(e.curOp.updateMaxLine=!0)),xh(n,a.line),$i(e,400);var v=t.text.length-(c.line-a.line)-1;t.full?Ut(e):a.line==c.line&&t.text.length==1&&!Uu(e.doc,t)?Vr(e,a.line,"text"):Ut(e,a.line,c.line+1,v);var k=Pt(e,"changes"),C=Pt(e,"change");if(C||k){var R={from:a,to:c,text:t.text,removed:t.removed,origin:t.origin};C&&kt(e,"change",e,R),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function ei(e,t,i,n,o){var a;n||(n=i),m(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Vn(e,{from:i,to:n,text:t,origin:o})}function af(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function uf(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],c=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var h=0;h<a.ranges.length;h++)af(a.ranges[h].anchor,t,i,n),af(a.ranges[h].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var v=a.changes[p];if(i<v.from.line)v.from=ie(v.from.line+n,v.from.ch),v.to=ie(v.to.line+n,v.to.ch);else if(t<=v.to.line){c=!1;break}}c||(e.splice(0,o+1),o=0)}}function ff(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;uf(e.done,i,n,o),uf(e.undone,i,n,o)}function Zi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=_e(e,$e(e,t)):o=Xe(t),o==null?null:(n(a,o)&&e.cm&&Vr(e.cm,o,i),a)}function Ji(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Ji.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var o=this.lines[i];this.height-=o.height,Nh(o),kt(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Qi(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),i+=o.height,o.parent=this}this.size=t,this.height=i,this.parent=null}Qi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(e<o){var a=Math.min(t,o-e),c=n.height;if(n.removeInner(e,a),this.height-=c-n.height,o==a&&(this.children.splice(i--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ji))){var h=[];this.collapse(h),this.children=[new Ji(h)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,i),o.lines&&o.lines.length>50){for(var c=o.lines.length%25+25,h=c;h<o.lines.length;){var p=new Ji(o.lines.slice(h,h+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,c),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Qi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=Z(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Qi(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<a){var c=Math.min(t,a-e);if(o.iterN(e,c,i))return!0;if((t-=c)==0)break;e=0}else e-=a}}};var Vi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Vi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Xe(i);if(!(n==null||!t)){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(i.widgets=null);var a=Hi(this);Jt(i,Math.max(0,i.height-a)),e&&(Qt(e,function(){cf(e,i,-a),Vr(e,n,"widget")}),kt(e,"lineWidgetCleared",e,this,n))}},Vi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Hi(this)-t;!o||(Qr(this.doc,n)||Jt(n,n.height+o),i&&Qt(i,function(){i.curOp.forceUpdate=!0,cf(i,n,o),kt(i,"lineWidgetChanged",i,e,Xe(n))}))},Cr(Vi);function cf(e,t,i){Wr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&vl(e,i)}function Np(e,t,i,n){var o=new Vi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Zi(e,t,"widget",function(c){var h=c.widgets||(c.widgets=[]);if(o.insertAt==null?h.push(o):h.splice(Math.min(h.length,Math.max(0,o.insertAt)),0,o),o.line=c,a&&!Qr(e,c)){var p=Wr(c)<e.scrollTop;Jt(c,c.height+Hi(o)),p&&vl(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&kt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:Xe(t)),o}var df=0,on=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++df};on.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Pn(e),Pt(this,"clear")){var i=this.find();i&&kt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var c=this.lines[a],h=Di(c.markedSpans,this);e&&!this.collapsed?Vr(e,Xe(c),"text"):e&&(h.to!=null&&(o=Xe(c)),h.from!=null&&(n=Xe(c))),c.markedSpans=Ch(c.markedSpans,h),h.from==null&&this.collapsed&&!Qr(this.doc,c)&&e&&Jt(c,$n(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var v=vr(this.lines[p]),k=Ho(v);k>e.display.maxLineLength&&(e.display.maxLine=v,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Ut(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ef(e.doc)),e&&kt(e,"markerCleared",e,this,n,o),t&&On(e),this.parent&&this.parent.clear()}},on.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,o=0;o<this.lines.length;++o){var a=this.lines[o],c=Di(a.markedSpans,this);if(c.from!=null&&(i=ie(t?a:Xe(a),c.from),e==-1))return i;if(c.to!=null&&(n=ie(t?a:Xe(a),c.to),e==1))return n}return i&&{from:i,to:n}},on.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;!t||!n||Qt(n,function(){var o=t.line,a=Xe(t.line),c=nl(n,a);if(c&&(mu(c),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Qr(i.doc,o)&&i.height!=null){var h=i.height;i.height=null;var p=Hi(i)-h;p&&Jt(o,o.height+p)}kt(n,"markerChanged",n,e)})},on.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},on.prototype.detachLine=function(e){if(this.lines.splice(Z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Cr(on);function ti(e,t,i,n,o){if(n&&n.shared)return zp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return St(e.cm,ti)(e,t,i,n,o);var a=new on(e,o),c=m(t,i);if(n&&Ie(n,a,!1),c>0||c==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=x("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(tu(e,t.line,t,i,a)||t.line!=i.line&&tu(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sh()}a.addToHistory&&Gu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var h=t.line,p=e.cm,v;if(e.iter(h,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&vr(C)==p.display.maxLine&&(v=!0),a.collapsed&&h!=t.line&&Jt(C,0),_h(C,new Ro(a,h==t.line?t.ch:null,h==i.line?i.ch:null),e.cm&&e.cm.curOp),++h}),a.collapsed&&e.iter(t.line,i.line+1,function(C){Qr(e,C)&&Jt(C,0)}),a.clearOnEnter&&Pe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(kh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++df,a.atomic=!0),p){if(v&&(p.curOp.updateMaxLine=!0),a.collapsed)Ut(p,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=i.line;k++)Vr(p,k,"text");a.atomic&&ef(p.doc),kt(p,"markerAdded",p,a)}return a}var eo=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};eo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();kt(this,"clear")}},eo.prototype.find=function(e,t){return this.primary.find(e,t)},Cr(eo);function zp(e,t,i,n,o){n=Ie(n),n.shared=!1;var a=[ti(e,t,i,n,o)],c=a[0],h=n.widgetNode;return nn(e,function(p){h&&(n.widgetNode=h.cloneNode(!0)),a.push(ti(p,xe(p,t),xe(p,i),n,o));for(var v=0;v<p.linked.length;++v)if(p.linked[v].isParent)return;c=F(a)}),new eo(a,c)}function hf(e){return e.findMarks(ie(e.first,0),e.clipPos(ie(e.lastLine())),function(t){return t.parent})}function Rp(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),c=e.clipPos(o.to);if(m(a,c)){var h=ti(e,a,c,n.primary,n.primary.type);n.markers.push(h),h.parent=n}}}function Dp(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];nn(o.primary.doc,function(p){return a.push(p)});for(var c=0;c<o.markers.length;c++){var h=o.markers[c];Z(a,h.doc)==-1&&(h.parent=null,o.markers.splice(c--,1))}},i=0;i<e.length;i++)t(i)}var Fp=0,Kt=function(e,t,i,n,o){if(!(this instanceof Kt))return new Kt(e,t,i,n,o);i==null&&(i=0),Qi.call(this,[new Ji([new Un("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ie(i,0);this.sel=tn(a),this.history=new Jo(null),this.id=++Fp,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Cl(this,{from:a,to:a,text:e}),Dt(this,tn(a),Ce)};Kt.prototype=fe(Qi.prototype,{constructor:Kt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ni(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ct(function(e){var t=ie(this.first,0),i=this.first+this.size-1;Vn(this,{from:t,to:ie(i,_e(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ji(this.cm,0,0),Dt(this,tn(t),Ce)}),replaceRange:function(e,t,i,n){t=xe(this,t),i=i?xe(this,i):t,ei(this,e,t,i,n)},getRange:function(e,t,i){var n=Tr(this,xe(this,e),xe(this,t));return i===!1?n:i===""?n.join(""):n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(xn(this,e))return _e(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=_e(this,e)),vr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return xe(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ct(function(e,t,i){Ju(this,xe(this,typeof e=="number"?ie(e,t||0):e),null,i)}),setSelection:Ct(function(e,t,i){Ju(this,xe(this,e),xe(this,t||e),i)}),extendSelection:Ct(function(e,t,i){Vo(this,xe(this,e),t&&xe(this,t),i)}),extendSelections:Ct(function(e,t){Zu(this,lr(this,e),t)}),extendSelectionsBy:Ct(function(e,t){var i=G(this.sel.ranges,e);Zu(this,lr(this,i),t)}),setSelections:Ct(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new Ze(xe(this,e[o].anchor),xe(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Dt(this,yr(this.cm,n,t),i)}}),addSelection:Ct(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Ze(xe(this,e),xe(this,t||e))),Dt(this,yr(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var o=Tr(this,t[n].from(),t[n].to());i=i?i.concat(o):o}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var o=Tr(this,i[n].from(),i[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,i){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:Ct(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var c=o.ranges[a];n[a]={from:c.from(),to:c.to(),text:this.splitLines(e[a]),origin:i}}for(var h=t&&t!="end"&&Cp(this,n,t),p=n.length-1;p>=0;p--)Vn(this,n[p]);h?Qu(this,h):this.cm&&Xn(this.cm)}),undo:Ct(function(){rs(this,"undo")}),redo:Ct(function(){rs(this,"redo")}),undoSelection:Ct(function(){rs(this,"undo",!0)}),redoSelection:Ct(function(){rs(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Jo(this.history),nn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Jn(this.history.done),undone:Jn(this.history.undone)}},setHistory:function(e){var t=this.history=new Jo(this.history);t.done=Jn(e.done.slice(0),null,!0),t.undone=Jn(e.undone.slice(0),null,!0)},setGutterMarker:Ct(function(e,t,i){return Zi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&W(o)&&(n.gutterMarkers=null),!0})}),clearGutter:Ct(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Zi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,W(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!xn(this,e)||(t=e,e=_e(this,e),!e))return null}else if(t=Xe(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ct(function(e,t,i){return Zi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[o])n[o]=i;else{if(be(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:Ct(function(e,t,i){return Zi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[o];if(a)if(i==null)n[o]=null;else{var c=a.match(be(i));if(!c)return!1;var h=c.index+c[0].length;n[o]=a.slice(0,c.index)+(!c.index||h==a.length?"":" ")+a.slice(h)||null}else return!1;return!0})}),addLineWidget:Ct(function(e,t,i){return Np(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return ti(this,xe(this,e),xe(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=xe(this,e),ti(this,e,e,i,"bookmark")},findMarksAt:function(e){e=xe(this,e);var t=[],i=_e(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,i){e=xe(this,e),t=xe(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var c=a.markedSpans;if(c)for(var h=0;h<c.length;h++){var p=c[h];!(p.to!=null&&o==e.line&&e.ch>=p.to||p.from==null&&o!=e.line||p.from!=null&&o==t.line&&p.from>=t.ch)&&(!i||i(p.marker))&&n.push(p.marker.parent||p.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(o){var a=o.text.length+n;if(a>e)return t=e,!0;e-=a,++i}),xe(this,ie(i,t))},indexFromPos:function(e){e=xe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new Kt(Ni(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new Kt(Ni(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Rp(n,hf(this)),n},unlinkDoc:function(e){if(e instanceof at&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Dp(hf(this));break}}if(e.history==this.history){var n=[e.id];nn(e,function(o){return n.push(o.id)},!0),e.history=new Jo(null),e.history.done=Jn(this.history.done,n),e.history.undone=Jn(this.history.undone,n)}},iterLinkedDocs:function(e){nn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Oi(e)},lineSeparator:function(){return this.lineSep||`
11
- `},setDirection:Ct(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&_p(this.cm))})}),Kt.prototype.eachLine=Kt.prototype.iter;var pf=0;function Ip(e){var t=this;if(gf(t),!(ut(t,e)||Br(t.display,e))){zt(e),y&&(pf=+new Date);var i=Cn(t,e,!0),n=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,a=Array(o),c=0,h=function(){++c==o&&St(t,function(){i=xe(t.doc,i);var E={from:i,to:i,text:t.doc.splitLines(a.filter(function(U){return U!=null}).join(t.doc.lineSeparator())),origin:"paste"};Vn(t.doc,E),Qu(t.doc,tn(xe(t.doc,i),xe(t.doc,rn(E))))})()},p=function(E,U){if(t.options.allowDropFileTypes&&Z(t.options.allowDropFileTypes,E.type)==-1){h();return}var Q=new FileReader;Q.onerror=function(){return h()},Q.onload=function(){var ue=Q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ue)){h();return}a[U]=ue,h()},Q.readAsText(E)},v=0;v<n.length;v++)p(n[v],v);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var k=e.dataTransfer.getData("Text");if(k){var C;if(t.state.draggingText&&!t.state.draggingText.copy&&(C=t.listSelections()),es(t.doc,tn(i,i)),C)for(var R=0;R<C.length;++R)ei(t.doc,"",C[R].anchor,C[R].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function Hp(e,t){if(y&&(!e.state.draggingText||+new Date-pf<100)){wn(t);return}if(!(ut(e,t)||Br(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!H)){var i=$("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",M&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),M&&i.parentNode.removeChild(i)}}function Wp(e,t){var i=Cn(e,t);if(!!i){var n=document.createDocumentFragment();cl(e,i,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,n)}}function gf(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function vf(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&i.push(o)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var mf=!1;function Bp(){mf||(jp(),mf=!0)}function jp(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,vf(Up)},100))}),Pe(window,"blur",function(){return vf(Yn)})}function Up(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var sn={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},to=0;to<10;to++)sn[to+48]=sn[to+96]=String(to);for(var ns=65;ns<=90;ns++)sn[ns]=String.fromCharCode(ns);for(var ro=1;ro<=12;ro++)sn[ro+111]=sn[ro+63235]="F"+ro;var Ur={};Ur.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ur.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ur.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ur.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ur.default=B?Ur.macDefault:Ur.pcDefault;function Kp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,c=0;c<t.length-1;c++){var h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))n=!0;else if(/^s(hift)?$/i.test(h))o=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function qp(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var o=G(i.split(" "),Kp),a=0;a<o.length;a++){var c=void 0,h=void 0;a==o.length-1?(h=o.join(" "),c=n):(h=o.slice(0,a+1).join(" "),c="...");var p=t[h];if(!p)t[h]=c;else if(p!=c)throw new Error("Inconsistent bindings for "+h)}delete e[i]}for(var v in t)e[v]=t[v];return e}function ri(e,t,i,n){t=is(t);var o=t.call?t.call(e,n):t[e];if(o===!1)return"nothing";if(o==="...")return"multi";if(o!=null&&i(o))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return ri(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var c=ri(e,t.fallthrough[a],i,n);if(c)return c}}}function yf(e){var t=typeof e=="string"?e:sn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bf(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(We?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(We?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function wf(e,t){if(M&&e.keyCode==34&&e.char)return!1;var i=sn[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),bf(i,e,t))}function is(e){return typeof e=="string"?Ur[e]:e}function ni(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&m(a.from,F(n).to)<=0;){var c=n.pop();if(m(c.from,a.from)<0){a.from=c.from;break}}n.push(a)}Qt(e,function(){for(var h=n.length-1;h>=0;h--)ei(e.doc,"",n[h].from,n[h].to,"+delete");Xn(e)})}function Pl(e,t,i){var n=Le(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Ol(e,t,i){var n=Pl(e,t.ch,i);return n==null?null:new ie(t.line,n,i<0?"after":"before")}function Ml(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=vt(i,t.doc.direction);if(a){var c=o<0?F(a):a[0],h=o<0==(c.level==1),p=h?"after":"before",v;if(c.level>0||t.doc.direction=="rtl"){var k=qn(t,i);v=o<0?i.text.length-1:0;var C=Mr(t,k,v).top;v=Be(function(R){return Mr(t,k,R).top==C},o<0==(c.level==1)?c.from:c.to-1,v),p=="before"&&(v=Pl(i,v,1))}else v=o<0?c.to:c.from;return new ie(n,v,p)}}return new ie(n,o<0?i.text.length:0,o<0?"before":"after")}function $p(e,t,i,n){var o=vt(t,e.doc.direction);if(!o)return Ol(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=He(o,i.ch,i.sticky),c=o[a];if(e.doc.direction=="ltr"&&c.level%2==0&&(n>0?c.to>i.ch:c.from<i.ch))return Ol(t,i,n);var h=function(ve,we){return Pl(t,ve instanceof ie?ve.ch:ve,we)},p,v=function(ve){return e.options.lineWrapping?(p=p||qn(e,t),Cu(e,t,p,ve)):{begin:0,end:t.text.length}},k=v(i.sticky=="before"?h(i,-1):i.ch);if(e.doc.direction=="rtl"||c.level==1){var C=c.level==1==n<0,R=h(i,C?1:-1);if(R!=null&&(C?R<=c.to&&R<=k.end:R>=c.from&&R>=k.begin)){var E=C?"before":"after";return new ie(i.line,R,E)}}var U=function(ve,we,me){for(var ke=function(rt,_t){return _t?new ie(i.line,h(rt,1),"before"):new ie(i.line,rt,"after")};ve>=0&&ve<o.length;ve+=we){var ze=o[ve],Me=we>0==(ze.level!=1),Ue=Me?me.begin:h(me.end,-1);if(ze.from<=Ue&&Ue<ze.to||(Ue=Me?ze.from:h(ze.to,-1),me.begin<=Ue&&Ue<me.end))return ke(Ue,Me)}},Q=U(a+n,n,k);if(Q)return Q;var ue=n>0?k.end:h(k.begin,-1);return ue!=null&&!(n>0&&ue==t.text.length)&&(Q=U(n>0?0:o.length-1,n,v(ue)),Q)?Q:null}var no={selectAll:nf,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ce)},killLine:function(e){return ni(e,function(t){if(t.empty()){var i=_e(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ie(t.head.line+1,0)}:{from:t.head,to:ie(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ni(e,function(t){return{from:ie(t.from().line,0),to:xe(e.doc,ie(t.to().line+1,0))}})},delLineLeft:function(e){return ni(e,function(t){return{from:ie(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ie(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ie(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xf(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return kf(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Gp(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},ge)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},ge)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?kf(e,t.head):n},ge)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,o=0;o<i.length;o++){var a=i[o].from(),c=Qe(e.getLine(a.line),a.ch,n);t.push(N(n-c%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qt(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)if(!!t[n].empty()){var o=t[n].head,a=_e(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new ie(o.line,o.ch-1)),o.ch>0)o=new ie(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),ie(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var c=_e(e.doc,o.line-1).text;c&&(o=new ie(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+c.charAt(c.length-1),ie(o.line-1,c.length-1),o,"+transpose"))}}i.push(new Ze(o,o))}e.setSelections(i)})},newlineAndIndent:function(e){return Qt(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Xn(e)})},openLine:function(e){return e.replaceSelection(`
12
- `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xf(e,t){var i=_e(e.doc,t),n=vr(i);return n!=i&&(t=Xe(n)),Ml(!0,e,n,t,1)}function Gp(e,t){var i=_e(e.doc,t),n=Mh(i);return n!=i&&(t=Xe(n)),Ml(!0,e,i,t,-1)}function kf(e,t){var i=xf(e,t.line),n=_e(e.doc,i.line),o=vt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),c=t.line==i.line&&t.ch<=a&&t.ch;return ie(i.line,c?0:a,i.sticky)}return i}function os(e,t,i){if(typeof t=="string"&&(t=no[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),o=t(e)!=se}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function Yp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=ri(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&ri(t,e.options.extraKeys,i,e)||ri(t,e.options.keyMap,i,e)}var Xp=new q;function io(e,t,i,n){var o=e.state.keySeq;if(o){if(yf(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Xp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),Sf(e,o+" "+t,i,n))return!0}return Sf(e,t,i,n)}function Sf(e,t,i,n){var o=Yp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&kt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(zt(i),dl(e)),!!o}function Cf(e,t){var i=wf(t,!0);return i?t.shiftKey&&!e.state.keySeq?io(e,"Shift-"+i,t,function(n){return os(e,n,!0)})||io(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return os(e,n)}):io(e,i,t,function(n){return os(e,n)}):!1}function Zp(e,t,i){return io(e,"'"+i+"'",t,function(n){return os(e,n,!0)})}var El=null;function _f(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ae(),!ut(t,e))){y&&w<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=Cf(t,e);M&&(El=n?i:null,!n&&i==88&&!No&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),f&&!B&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Jp(t)}}function Jp(e){var t=e.display.lineDiv;Re(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(de(t,"CodeMirror-crosshair"),tt(document,"keyup",i),tt(document,"mouseover",i))}Pe(document,"keyup",i),Pe(document,"mouseover",i)}function Tf(e){e.keyCode==16&&(this.doc.sel.shift=!1),ut(this,e)}function Lf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Br(t.display,e)||ut(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(M&&i==El){El=null,zt(e);return}if(!(M&&(!e.which||e.which<10)&&Cf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(Zp(t,e,o)||t.display.input.onKeyPress(e))}}}var Qp=400,Al=function(e,t,i){this.time=e,this.pos=t,this.button=i};Al.prototype.compare=function(e,t,i){return this.time+Qp>e&&m(t,this.pos)==0&&i==this.button};var oo,so;function Vp(e,t){var i=+new Date;return so&&so.compare(i,e,t)?(oo=so=null,"triple"):oo&&oo.compare(i,e,t)?(so=new Al(i,e,t),oo=null,"double"):(oo=new Al(i,e,t),so=null,"single")}function Pf(e){var t=this,i=t.display;if(!(ut(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Br(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!Nl(t,e)){var n=Cn(t,e),o=Mo(e),a=n?Vp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&eg(t,o,n,a,e))&&(o==1?n?rg(t,n,a,e):Zr(e)==i.scroller&&zt(e):o==2?(n&&Vo(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(Ne?t.display.input.onContextMenu(e):hl(t)))}}}function eg(e,t,i,n,o){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,io(e,bf(a,o),o,function(c){if(typeof c=="string"&&(c=no[c]),!c)return!1;var h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),h=c(e,i)!=se}finally{e.state.suppressEdits=!1}return h})}function tg(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=oe?i.shiftKey&&i.metaKey:i.altKey;o.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||i.shiftKey),o.addNew==null&&(o.addNew=B?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(B?i.altKey:i.ctrlKey)),o}function rg(e,t,i,n){y?setTimeout(lt(Pu,e),0):e.curOp.focus=ae();var o=tg(e,i,n),a=e.doc.sel,c;e.options.dragDrop&&Li&&!e.isReadOnly()&&i=="single"&&(c=a.contains(t))>-1&&(m((c=a.ranges[c]).from(),t)<0||t.xRel>0)&&(m(c.to(),t)>0||t.xRel<0)?ng(e,n,t,o):ig(e,n,t,o)}function ng(e,t,i,n){var o=e.display,a=!1,c=St(e,function(v){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:hl(e)),tt(o.wrapper.ownerDocument,"mouseup",c),tt(o.wrapper.ownerDocument,"mousemove",h),tt(o.scroller,"dragstart",p),tt(o.scroller,"drop",c),a||(zt(v),n.addNew||Vo(e.doc,i,null,null,n.extend),S&&!H||y&&w==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),h=function(v){a=a||Math.abs(t.clientX-v.clientX)+Math.abs(t.clientY-v.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,Pe(o.wrapper.ownerDocument,"mouseup",c),Pe(o.wrapper.ownerDocument,"mousemove",h),Pe(o.scroller,"dragstart",p),Pe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Of(e,t,i){if(i=="char")return new Ze(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ze(ie(t.line,0),xe(e.doc,ie(t.line+1,0)));var n=i(e,t);return new Ze(n.from,n.to)}function ig(e,t,i,n){y&&hl(e);var o=e.display,a=e.doc;zt(t);var c,h,p=a.sel,v=p.ranges;if(n.addNew&&!n.extend?(h=a.sel.contains(i),h>-1?c=v[h]:c=new Ze(i,i)):(c=a.sel.primary(),h=a.sel.primIndex),n.unit=="rectangle")n.addNew||(c=new Ze(i,i)),i=Cn(e,t,!0,!0),h=-1;else{var k=Of(e,i,n.unit);n.extend?c=Tl(c,k.anchor,k.head,n.extend):c=k}n.addNew?h==-1?(h=v.length,Dt(a,yr(e,v.concat([c]),h),{scroll:!1,origin:"*mouse"})):v.length>1&&v[h].empty()&&n.unit=="char"&&!n.extend?(Dt(a,yr(e,v.slice(0,h).concat(v.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):Ll(a,h,c,Se):(h=0,Dt(a,new ar([c],0),Se),p=a.sel);var C=i;function R(me){if(m(C,me)!=0)if(C=me,n.unit=="rectangle"){for(var ke=[],ze=e.options.tabSize,Me=Qe(_e(a,i.line).text,i.ch,ze),Ue=Qe(_e(a,me.line).text,me.ch,ze),rt=Math.min(Me,Ue),_t=Math.max(Me,Ue),ft=Math.min(i.line,me.line),Vt=Math.min(e.lastLine(),Math.max(i.line,me.line));ft<=Vt;ft++){var qt=_e(a,ft).text,mt=Te(qt,rt,ze);rt==_t?ke.push(new Ze(ie(ft,mt),ie(ft,mt))):qt.length>mt&&ke.push(new Ze(ie(ft,mt),ie(ft,Te(qt,_t,ze))))}ke.length||ke.push(new Ze(i,i)),Dt(a,yr(e,p.ranges.slice(0,h).concat(ke),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(me)}else{var $t=c,Ot=Of(e,me,n.unit),wt=$t.anchor,yt;m(Ot.anchor,wt)>0?(yt=Ot.head,wt=De($t.from(),Ot.anchor)):(yt=Ot.anchor,wt=le($t.to(),Ot.head));var ht=p.ranges.slice(0);ht[h]=og(e,new Ze(xe(a,wt),yt)),Dt(a,yr(e,ht,h),Se)}}var E=o.wrapper.getBoundingClientRect(),U=0;function Q(me){var ke=++U,ze=Cn(e,me,!0,n.unit=="rectangle");if(!!ze)if(m(ze,C)!=0){e.curOp.focus=ae(),R(ze);var Me=Go(o,a);(ze.line>=Me.to||ze.line<Me.from)&&setTimeout(St(e,function(){U==ke&&Q(me)}),150)}else{var Ue=me.clientY<E.top?-20:me.clientY>E.bottom?20:0;Ue&&setTimeout(St(e,function(){U==ke&&(o.scroller.scrollTop+=Ue,Q(me))}),50)}}function ue(me){e.state.selectingText=!1,U=1/0,me&&(zt(me),o.input.focus()),tt(o.wrapper.ownerDocument,"mousemove",ve),tt(o.wrapper.ownerDocument,"mouseup",we),a.history.lastSelOrigin=null}var ve=St(e,function(me){me.buttons===0||!Mo(me)?ue(me):Q(me)}),we=St(e,ue);e.state.selectingText=we,Pe(o.wrapper.ownerDocument,"mousemove",ve),Pe(o.wrapper.ownerDocument,"mouseup",we)}function og(e,t){var i=t.anchor,n=t.head,o=_e(e.doc,i.line);if(m(i,n)==0&&i.sticky==n.sticky)return t;var a=vt(o);if(!a)return t;var c=He(a,i.ch,i.sticky),h=a[c];if(h.from!=i.ch&&h.to!=i.ch)return t;var p=c+(h.from==i.ch==(h.level!=1)?0:1);if(p==0||p==a.length)return t;var v;if(n.line!=i.line)v=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=He(a,n.ch,n.sticky),C=k-c||(n.ch-i.ch)*(h.level==1?-1:1);k==p-1||k==p?v=C<0:v=C>0}var R=a[p+(v?-1:0)],E=v==(R.level==1),U=E?R.from:R.to,Q=E?"after":"before";return i.ch==U&&i.sticky==Q?t:new Ze(new ie(i.line,U,Q),n)}function Mf(e,t,i,n){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch{return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&zt(t);var c=e.display,h=c.lineDiv.getBoundingClientRect();if(a>h.bottom||!Pt(e,i))return ir(t);a-=h.top-c.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var v=c.gutters.childNodes[p];if(v&&v.getBoundingClientRect().right>=o){var k=Lr(e.doc,a),C=e.display.gutterSpecs[p];return Oe(e,i,e,k,C.className,t),ir(t)}}}function Nl(e,t){return Mf(e,t,"gutterClick",!0)}function Ef(e,t){Br(e.display,t)||sg(e,t)||ut(e,t,"contextmenu")||Ne||e.display.input.onContextMenu(t)}function sg(e,t){return Pt(e,"gutterContextMenu")?Mf(e,t,"gutterContextMenu",!1):!1}function Af(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wi(e)}var ii={toString:function(){return"CodeMirror.Init"}},Nf={},ss={};function lg(e){var t=e.optionHandlers;function i(n,o,a,c){e.defaults[n]=o,a&&(t[n]=c?function(h,p,v){v!=ii&&a(h,p,v)}:a)}e.defineOption=i,e.Init=ii,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,Sl(n)},!0),i("indentUnit",2,Sl,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Yi(n),Wi(n),Ut(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],c=n.doc.first;n.doc.iter(function(p){for(var v=0;;){var k=p.text.indexOf(o,v);if(k==-1)break;v=k+o.length,a.push(ie(c,k))}c++});for(var h=a.length-1;h>=0;h--)ei(n.doc,o,a[h],ie(a[h].line,a[h].ch+o.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,o,a){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),a!=ii&&n.refresh()}),i("specialCharPlaceholder",Dh,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",I?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,o){return n.getInputField().spellcheck=o},!0),i("autocorrect",!1,function(n,o){return n.getInputField().autocorrect=o},!0),i("autocapitalize",!1,function(n,o){return n.getInputField().autocapitalize=o},!0),i("rtlMoveVisually",!pe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Af(n),Gi(n)},!0),i("keyMap","default",function(n,o,a){var c=is(o),h=a!=ii&&is(a);h&&h.detach&&h.detach(n,c),c.attach&&c.attach(n,h||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,ug,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=xl(o,n.options.lineNumbers),Gi(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?ul(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return Zn(n)},!0),i("scrollbarStyle","native",function(n){zu(n),Zn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,o){n.display.gutterSpecs=xl(n.options.gutters,o),Gi(n)},!0),i("firstLineNumber",1,Gi,!0),i("lineNumberFormatter",function(n){return n},Gi,!0),i("showCursorWhenSelecting",!1,Bi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Yn(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)}),i("screenReaderLabel",null,function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)}),i("disableInput",!1,function(n,o){o||n.display.input.reset()},!0),i("dragDrop",!0,ag),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Bi,!0),i("singleCursorHeightPerLine",!0,Bi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Yi,!0),i("addModeClass",!1,Yi,!0),i("pollInterval",100),i("undoDepth",200,function(n,o){return n.doc.history.undoDepth=o}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Yi,!0),i("moveInputWithCursor",!0,function(n,o){o||n.display.input.resetPosition()}),i("tabindex",null,function(n,o){return n.display.input.getField().tabIndex=o||""}),i("autofocus",null),i("direction","ltr",function(n,o){return n.doc.setDirection(o)},!0),i("phrases",null)}function ag(e,t,i){var n=i&&i!=ii;if(!t!=!n){var o=e.display.dragFunctions,a=t?Pe:tt;a(e.display.scroller,"dragstart",o.start),a(e.display.scroller,"dragenter",o.enter),a(e.display.scroller,"dragover",o.over),a(e.display.scroller,"dragleave",o.leave),a(e.display.scroller,"drop",o.drop)}}function ug(e){e.options.lineWrapping?(Re(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(de(e.display.wrapper,"CodeMirror-wrap"),Vs(e)),fl(e),Ut(e),Wi(e),setTimeout(function(){return Zn(e)},100)}function at(e,t){var i=this;if(!(this instanceof at))return new at(e,t);this.options=t=t?Ie(t):{},Ie(Nf,t,!1);var n=t.value;typeof n=="string"?n=new Kt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new at.inputStyles[t.inputStyle](this),a=this.display=new kp(e,n,o,t);a.wrapper.CodeMirror=this,Af(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!I&&a.input.focus(),y&&w<11&&setTimeout(function(){return i.display.input.reset(!0)},20),fg(this),Bp(),Pn(this),this.curOp.forceUpdate=!0,Ku(this,n),t.autofocus&&!I||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&pl(i)},20):Yn(this);for(var c in ss)ss.hasOwnProperty(c)&&ss[c](this,t[c],ii);Fu(this),t.finishInit&&t.finishInit(this);for(var h=0;h<zl.length;++h)zl[h](this);On(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}at.defaults=Nf,at.optionHandlers=ss;function fg(e){var t=e.display;Pe(t.scroller,"mousedown",St(e,Pf)),y&&w<11?Pe(t.scroller,"dblclick",St(e,function(p){if(!ut(e,p)){var v=Cn(e,p);if(!(!v||Nl(e,p)||Br(e.display,p))){zt(p);var k=e.findWordAt(v);Vo(e.doc,k.anchor,k.head)}}})):Pe(t.scroller,"dblclick",function(p){return ut(e,p)||zt(p)}),Pe(t.scroller,"contextmenu",function(p){return Ef(e,p)}),Pe(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||Ef(e,p)});var i,n={end:0};function o(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(p){if(p.touches.length!=1)return!1;var v=p.touches[0];return v.radiusX<=1&&v.radiusY<=1}function c(p,v){if(v.left==null)return!0;var k=v.left-p.left,C=v.top-p.top;return k*k+C*C>20*20}Pe(t.scroller,"touchstart",function(p){if(!ut(e,p)&&!a(p)&&!Nl(e,p)){t.input.ensurePolled(),clearTimeout(i);var v=+new Date;t.activeTouch={start:v,moved:!1,prev:v-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(p){var v=t.activeTouch;if(v&&!Br(t,p)&&v.left!=null&&!v.moved&&new Date-v.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!v.prev||c(v,v.prev)?C=new Ze(k,k):!v.prev.prev||c(v,v.prev.prev)?C=e.findWordAt(k):C=new Ze(ie(k.line,0),xe(e.doc,ie(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),zt(p)}o()}),Pe(t.scroller,"touchcancel",o),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ui(e,t.scroller.scrollTop),Tn(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(p){return Wu(e,p)}),Pe(t.scroller,"DOMMouseScroll",function(p){return Wu(e,p)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){ut(e,p)||wn(p)},over:function(p){ut(e,p)||(Wp(e,p),wn(p))},start:function(p){return Hp(e,p)},drop:St(e,Ip),leave:function(p){ut(e,p)||gf(e)}};var h=t.input.getField();Pe(h,"keyup",function(p){return Tf.call(e,p)}),Pe(h,"keydown",St(e,_f)),Pe(h,"keypress",St(e,Lf)),Pe(h,"focus",function(p){return pl(e,p)}),Pe(h,"blur",function(p){return Yn(e,p)})}var zl=[];at.defineInitHook=function(e){return zl.push(e)};function lo(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=Ri(e,t).state:i="prev");var c=e.options.tabSize,h=_e(o,t),p=Qe(h.text,null,c);h.stateAfter&&(h.stateAfter=null);var v=h.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(h.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,h.text.slice(v.length),h.text),k==se||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=Qe(_e(o,t-1).text,null,c):k=0:i=="add"?k=p+e.options.indentUnit:i=="subtract"?k=p-e.options.indentUnit:typeof i=="number"&&(k=p+i),k=Math.max(0,k);var C="",R=0;if(e.options.indentWithTabs)for(var E=Math.floor(k/c);E;--E)R+=c,C+=" ";if(R<k&&(C+=N(k-R)),C!=v)return ei(o,C,ie(t,0),ie(t,v.length),"+input"),h.stateAfter=null,!0;for(var U=0;U<o.sel.ranges.length;U++){var Q=o.sel.ranges[U];if(Q.head.line==t&&Q.head.ch<v.length){var ue=ie(t,v.length);Ll(o,U,new Ze(ue,ue));break}}}var br=null;function ls(e){br=e}function Rl(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var c=+new Date-200,h=o=="paste"||e.state.pasteIncoming>c,p=Oi(t),v=null;if(h&&n.ranges.length>1)if(br&&br.text.join(`
13
- `)==t){if(n.ranges.length%br.text.length==0){v=[];for(var k=0;k<br.text.length;k++)v.push(a.splitLines(br.text[k]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(v=G(p,function(ve){return[ve]}));for(var C=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var E=n.ranges[R],U=E.from(),Q=E.to();E.empty()&&(i&&i>0?U=ie(U.line,U.ch-i):e.state.overwrite&&!h?Q=ie(Q.line,Math.min(_e(a,Q.line).text.length,Q.ch+F(p).length)):h&&br&&br.lineWise&&br.text.join(`
14
- `)==p.join(`
15
- `)&&(U=Q=ie(U.line,0)));var ue={from:U,to:Q,text:v?v[R%v.length]:p,origin:o||(h?"paste":e.state.cutIncoming>c?"cut":"+input")};Vn(e.doc,ue),kt(e,"inputRead",e,ue)}t&&!h&&Rf(e,t),Xn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Qt(t,function(){return Rl(t,i,0,null,"paste")}),!0}function Rf(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var o=i.ranges[n];if(!(o.head.ch>100||n&&i.ranges[n-1].head.line==o.head.line)){var a=e.getModeAt(o.head),c=!1;if(a.electricChars){for(var h=0;h<a.electricChars.length;h++)if(t.indexOf(a.electricChars.charAt(h))>-1){c=lo(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(_e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(c=lo(e,o.head.line,"smart"));c&&kt(e,"electricInput",e,o.head.line)}}}function Df(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,a={anchor:ie(o,0),head:ie(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function Ff(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function If(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),A&&(e.style.border="1px solid black"),Ff(e),t}function cg(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var a=this.options,c=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&St(this,t[n])(this,o,c),Oe(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](is(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,a=0;a<o.length;++a)if(o[a]==n||o[a].name==n)return o.splice(a,1),!0},addOverlay:Ht(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(c){return c.priority}),this.state.modeGen++,Ut(this)}),removeOverlay:Ht(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var c=o[a].modeSpec;if(c==n||typeof n=="string"&&c.name==n){o.splice(a,1),this.state.modeGen++,Ut(this);return}}}),indentLine:Ht(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),xn(this.doc,n)&&lo(this,n,o,a)}),indentSelection:Ht(function(n){for(var o=this.doc.sel.ranges,a=-1,c=0;c<o.length;c++){var h=o[c];if(h.empty())h.head.line>a&&(lo(this,h.head.line,n,!0),a=h.head.line,c==this.doc.sel.primIndex&&Xn(this));else{var p=h.from(),v=h.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),v.line-(v.ch?0:1))+1;for(var C=k;C<a;++C)lo(this,C,n);var R=this.doc.sel.ranges;p.ch==0&&o.length==R.length&&R[c].from().ch>0&&Ll(this.doc,c,new Ze(p,R[c].to()),Ce)}}}),getTokenAt:function(n,o){return $a(this,n,o)},getLineTokens:function(n,o){return $a(this,ie(n),o,!0)},getTokenTypeAt:function(n){n=xe(this.doc,n);var o=Ua(this,_e(this.doc,n.line)),a=0,c=(o.length-1)/2,h=n.ch,p;if(h==0)p=o[2];else for(;;){var v=a+c>>1;if((v?o[v*2-1]:0)>=h)c=v;else if(o[v*2+1]<h)a=v+1;else{p=o[v*2+2];break}}var k=p?p.indexOf("overlay "):-1;return k<0?p:k==0?null:p.slice(0,k-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var a=[];if(!i.hasOwnProperty(o))return a;var c=i[o],h=this.getModeAt(n);if(typeof h[o]=="string")c[h[o]]&&a.push(c[h[o]]);else if(h[o])for(var p=0;p<h[o].length;p++){var v=c[h[o][p]];v&&a.push(v)}else h.helperType&&c[h.helperType]?a.push(c[h.helperType]):c[h.name]&&a.push(c[h.name]);for(var k=0;k<c._global.length;k++){var C=c._global[k];C.pred(h,this)&&Z(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=$e(a,n==null?a.first+a.size-1:n),Ri(this,n+1,o).state},cursorCoords:function(n,o){var a,c=this.doc.sel.primary();return n==null?a=c.head:typeof n=="object"?a=xe(this.doc,n):a=n?c.from():c.to(),mr(this,a,o||"page")},charCoords:function(n,o){return Uo(this,xe(this.doc,n),o||"page")},coordsChar:function(n,o){return n=xu(this,n,o||"page"),sl(this,n.left,n.top)},lineAtHeight:function(n,o){return n=xu(this,{top:n,left:0},o||"page").top,Lr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var c=!1,h;if(typeof n=="number"){var p=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>p&&(n=p,c=!0),h=_e(this.doc,n)}else h=n;return jo(this,h,{top:0,left:0},o||"page",a||c).top+(c?this.doc.height-Wr(h):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Gn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,c,h){var p=this.display;n=mr(this,xe(this.doc,n));var v=n.bottom,k=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),p.sizer.appendChild(o),c=="over")v=n.top;else if(c=="above"||c=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),R=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(c=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?v=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(v=n.bottom),k+o.offsetWidth>R&&(k=R-o.offsetWidth)}o.style.top=v+"px",o.style.left=o.style.right="",h=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(h=="left"?k=0:h=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&ap(this,{left:k,top:v,right:k+o.offsetWidth,bottom:v+o.offsetHeight})},triggerOnKeyDown:Ht(_f),triggerOnKeyPress:Ht(Lf),triggerOnKeyUp:Tf,triggerOnMouseDown:Ht(Pf),execCommand:function(n){if(no.hasOwnProperty(n))return no[n].call(null,this)},triggerElectric:Ht(function(n){Rf(this,n)}),findPosH:function(n,o,a,c){var h=1;o<0&&(h=-1,o=-o);for(var p=xe(this.doc,n),v=0;v<o&&(p=Dl(this.doc,p,h,a,c),!p.hitSide);++v);return p},moveH:Ht(function(n,o){var a=this;this.extendSelectionsBy(function(c){return a.display.shift||a.doc.extend||c.empty()?Dl(a.doc,c.head,n,o,a.options.rtlMoveVisually):n<0?c.from():c.to()},ge)}),deleteH:Ht(function(n,o){var a=this.doc.sel,c=this.doc;a.somethingSelected()?c.replaceSelection("",null,"+delete"):ni(this,function(h){var p=Dl(c,h.head,n,o,!1);return n<0?{from:p,to:h.head}:{from:h.head,to:p}})}),findPosV:function(n,o,a,c){var h=1,p=c;o<0&&(h=-1,o=-o);for(var v=xe(this.doc,n),k=0;k<o;++k){var C=mr(this,v,"div");if(p==null?p=C.left:C.left=p,v=Hf(this,C,h,a),v.hitSide)break}return v},moveV:Ht(function(n,o){var a=this,c=this.doc,h=[],p=!this.display.shift&&!c.extend&&c.sel.somethingSelected();if(c.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=mr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),h.push(C.left);var R=Hf(a,C,n,o);return o=="page"&&k==c.sel.primary()&&vl(a,Uo(a,R,"div").top-C.top),R},ge),h.length)for(var v=0;v<c.sel.ranges.length;v++)c.sel.ranges[v].goalColumn=h[v]}),findWordAt:function(n){var o=this.doc,a=_e(o,n.line).text,c=n.ch,h=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||h==a.length)&&c?--c:++h;for(var v=a.charAt(c),k=_(v,p)?function(C){return _(C,p)}:/\s/.test(v)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!_(C)};c>0&&k(a.charAt(c-1));)--c;for(;h<a.length&&k(a.charAt(h));)++h}return new Ze(ie(n.line,c),ie(n.line,h))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Re(this.display.cursorDiv,"CodeMirror-overwrite"):de(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ae()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ht(function(n,o){ji(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Or(this)-this.display.barHeight,width:n.scrollWidth-Or(this)-this.display.barWidth,clientHeight:rl(this),clientWidth:kn(this)}},scrollIntoView:Ht(function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:ie(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?up(this,n):Mu(this,n.from,n.to,n.margin)}),setSize:Ht(function(n,o){var a=this,c=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=c(n)),o!=null&&(this.display.wrapper.style.height=c(o)),this.options.lineWrapping&&yu(this);var h=this.display.viewFrom;this.doc.iter(h,this.display.viewTo,function(p){if(p.widgets){for(var v=0;v<p.widgets.length;v++)if(p.widgets[v].noHScroll){Vr(a,h,"widget");break}}++h}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return Qt(this,n)},startOperation:function(){return Pn(this)},endOperation:function(){return On(this)},refresh:Ht(function(){var n=this.display.cachedTextHeight;Ut(this),this.curOp.forceUpdate=!0,Wi(this),ji(this,this.doc.scrollLeft,this.doc.scrollTop),bl(this.display),(n==null||Math.abs(n-$n(this.display))>.5||this.options.lineWrapping)&&fl(this),Oe(this,"refresh",this)}),swapDoc:Ht(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Ku(this,n),Wi(this),this.display.input.reset(),ji(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,kt(this,"swapDoc",this,o),o}),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Cr(e),e.registerHelper=function(n,o,a){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][o]=a},e.registerGlobalHelper=function(n,o,a,c){e.registerHelper(n,o,c),i[n]._global.push({pred:a,val:c})}}function Dl(e,t,i,n,o){var a=t,c=i,h=_e(e,t.line),p=o&&e.direction=="rtl"?-i:i;function v(){var we=t.line+p;return we<e.first||we>=e.first+e.size?!1:(t=new ie(we,t.ch,t.sticky),h=_e(e,we))}function k(we){var me;if(n=="codepoint"){var ke=h.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ke))me=null;else{var ze=i>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;me=new ie(t.line,Math.max(0,Math.min(h.text.length,t.ch+i*(ze?2:1))),-i)}}else o?me=$p(e.cm,h,t,i):me=Ol(h,t,i);if(me==null)if(!we&&v())t=Ml(o,e.cm,h,t.line,p);else return!1;else t=me;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,R=n=="group",E=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(i<0&&!k(!U));U=!1){var Q=h.text.charAt(t.ch)||`
16
- `,ue=_(Q,E)?"w":R&&Q==`
17
- `?"n":!R||/\s/.test(Q)?null:"p";if(R&&!U&&!ue&&(ue="s"),C&&C!=ue){i<0&&(i=1,k(),t.sticky="after");break}if(ue&&(C=ue),i>0&&!k(!U))break}var ve=ts(e,t,a,c,!0);return P(a,ve)&&(ve.hitSide=!0),ve}function Hf(e,t,i,n){var o=e.doc,a=t.left,c;if(n=="page"){var h=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(h-.5*$n(e.display),3);c=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(c=i>0?t.bottom+3:t.top-3);for(var v;v=sl(e,a,c),!!v.outside;){if(i<0?c<=0:c>=o.height){v.hitSide=!0;break}c+=i*5}return v}var Ve=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ve.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,Ff(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(h){for(var p=h.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Pe(o,"paste",function(h){!a(h)||ut(n,h)||zf(h,n)||w<=11&&setTimeout(St(n,function(){return t.updateFromDOM()}),20)}),Pe(o,"compositionstart",function(h){t.composing={data:h.data,done:!1}}),Pe(o,"compositionupdate",function(h){t.composing||(t.composing={data:h.data,done:!1})}),Pe(o,"compositionend",function(h){t.composing&&(h.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(o,"touchstart",function(){return i.forceCompositionEnd()}),Pe(o,"input",function(){t.composing||t.readFromDOMSoon()});function c(h){if(!(!a(h)||ut(n,h))){if(n.somethingSelected())ls({lineWise:!1,text:n.getSelections()}),h.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=Df(n);ls({lineWise:!0,text:p.text}),h.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,Ce),n.replaceSelection("",null,"cut")})}else return;if(h.clipboardData){h.clipboardData.clearData();var v=br.text.join(`
18
- `);if(h.clipboardData.setData("Text",v),h.clipboardData.getData("Text")==v){h.preventDefault();return}}var k=If(),C=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),C.value=br.text.join(`
19
- `);var R=ae();nt(C),setTimeout(function(){n.display.lineSpace.removeChild(k),R.focus(),R==o&&i.showPrimarySelection()},50)}}Pe(o,"copy",c),Pe(o,"cut",c)},Ve.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ve.prototype.prepareSelection=function(){var e=Lu(this.cm,!1);return e.focus=ae()==this.div,e},Ve.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ve.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ve.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||o.line<t.display.viewFrom){e.removeAllRanges();return}var a=as(t,e.anchorNode,e.anchorOffset),c=as(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&c&&!c.bad&&m(De(a,c),n)==0&&m(le(a,c),o)==0)){var h=t.display.view,p=n.line>=t.display.viewFrom&&Wf(t,n)||{node:h[0].measure.map[2],offset:0},v=o.line<t.display.viewTo&&Wf(t,o);if(!v){var k=h[h.length-1].measure,C=k.maps?k.maps[k.maps.length-1]:k.map;v={node:C[C.length-1],offset:C[C.length-2]-C[C.length-3]}}if(!p||!v){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),E;try{E=ee(p.node,p.offset,v.offset,v.node)}catch{}E&&(!f&&t.state.focused?(e.collapse(p.node,p.offset),E.collapsed||(e.removeAllRanges(),e.addRange(E))):(e.removeAllRanges(),e.addRange(E)),R&&e.anchorNode==null?e.addRange(R):f&&this.startGracePeriod()),this.rememberSelection()}},Ve.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ve.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},Ve.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ve.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Y(this.div,t)},Ve.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ae()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ve.prototype.blur=function(){this.div.blur()},Ve.prototype.getField=function(){return this.div},Ve.prototype.supportsTouch=function(){return!0},Ve.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Qt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Ve.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ve.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(D&&O&&this.cm.display.gutterSpecs.length&&dg(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=as(t,e.anchorNode,e.anchorOffset),n=as(t,e.focusNode,e.focusOffset);i&&n&&Qt(t,function(){Dt(t.doc,tn(i,n),Ce),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ve.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),o=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=ie(n.line-1,_e(e.doc,n.line-1).length)),o.ch==_e(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=ie(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,c,h;n.line==t.viewFrom||(a=_n(e,n.line))==0?(c=Xe(t.view[0].line),h=t.view[0].node):(c=Xe(t.view[a].line),h=t.view[a-1].node.nextSibling);var p=_n(e,o.line),v,k;if(p==t.view.length-1?(v=t.viewTo-1,k=t.lineDiv.lastChild):(v=Xe(t.view[p+1].line)-1,k=t.view[p+1].node.previousSibling),!h)return!1;for(var C=e.doc.splitLines(hg(e,h,k,c,v)),R=Tr(e.doc,ie(c,0),ie(v,_e(e.doc,v).text.length));C.length>1&&R.length>1;)if(F(C)==F(R))C.pop(),R.pop(),v--;else if(C[0]==R[0])C.shift(),R.shift(),c++;else break;for(var E=0,U=0,Q=C[0],ue=R[0],ve=Math.min(Q.length,ue.length);E<ve&&Q.charCodeAt(E)==ue.charCodeAt(E);)++E;for(var we=F(C),me=F(R),ke=Math.min(we.length-(C.length==1?E:0),me.length-(R.length==1?E:0));U<ke&&we.charCodeAt(we.length-U-1)==me.charCodeAt(me.length-U-1);)++U;if(C.length==1&&R.length==1&&c==n.line)for(;E&&E>n.ch&&we.charCodeAt(we.length-U-1)==me.charCodeAt(me.length-U-1);)E--,U++;C[C.length-1]=we.slice(0,we.length-U).replace(/^\u200b+/,""),C[0]=C[0].slice(E).replace(/\u200b+$/,"");var ze=ie(c,E),Me=ie(v,R.length?F(R).length-U:0);if(C.length>1||C[0]||m(ze,Me))return ei(e.doc,C,ze,Me,"+input"),!0},Ve.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ve.prototype.reset=function(){this.forceCompositionEnd()},Ve.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ve.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Ve.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Qt(this.cm,function(){return Ut(e.cm)})},Ve.prototype.setUneditable=function(e){e.contentEditable="false"},Ve.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||St(this.cm,Rl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ve.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ve.prototype.onContextMenu=function(){},Ve.prototype.resetPosition=function(){},Ve.prototype.needsContentAttribute=!0;function Wf(e,t){var i=nl(e,t.line);if(!i||i.hidden)return null;var n=_e(e.doc,t.line),o=hu(i,n,t.line),a=vt(n,e.doc.direction),c="left";if(a){var h=He(a,t.ch);c=h%2?"right":"left"}var p=vu(o.map,t.ch,c);return p.offset=p.collapse=="right"?p.end:p.start,p}function dg(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function oi(e,t){return t&&(e.bad=!0),e}function hg(e,t,i,n,o){var a="",c=!1,h=e.doc.lineSeparator(),p=!1;function v(E){return function(U){return U.id==E}}function k(){c&&(a+=h,p&&(a+=h),c=p=!1)}function C(E){E&&(k(),a+=E)}function R(E){if(E.nodeType==1){var U=E.getAttribute("cm-text");if(U){C(U);return}var Q=E.getAttribute("cm-marker"),ue;if(Q){var ve=e.findMarks(ie(n,0),ie(o+1,0),v(+Q));ve.length&&(ue=ve[0].find(0))&&C(Tr(e.doc,ue.from,ue.to).join(h));return}if(E.getAttribute("contenteditable")=="false")return;var we=/^(pre|div|p|li|table|br)$/i.test(E.nodeName);if(!/^br$/i.test(E.nodeName)&&E.textContent.length==0)return;we&&k();for(var me=0;me<E.childNodes.length;me++)R(E.childNodes[me]);/^(pre|p)$/i.test(E.nodeName)&&(p=!0),we&&(c=!0)}else E.nodeType==3&&C(E.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=i;)t=t.nextSibling,p=!1;return a}function as(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return oi(e.clipPos(ie(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var a=e.display.view[o];if(a.node==n)return pg(a,t,i)}}function pg(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!Y(n,t))return oi(ie(Xe(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?F(e.rest):e.line;return oi(ie(Xe(a),a.text.length),o)}var c=t.nodeType==3?t:null,h=t;for(!c&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(c=t.firstChild,i&&(i=c.nodeValue.length));h.parentNode!=n;)h=h.parentNode;var p=e.measure,v=p.maps;function k(ue,ve,we){for(var me=-1;me<(v?v.length:0);me++)for(var ke=me<0?p.map:v[me],ze=0;ze<ke.length;ze+=3){var Me=ke[ze+2];if(Me==ue||Me==ve){var Ue=Xe(me<0?e.line:e.rest[me]),rt=ke[ze]+we;return(we<0||Me!=ue)&&(rt=ke[ze+(we?1:0)]),ie(Ue,rt)}}}var C=k(c,h,i);if(C)return oi(C,o);for(var R=h.nextSibling,E=c?c.nodeValue.length-i:0;R;R=R.nextSibling){if(C=k(R,R.firstChild,0),C)return oi(ie(C.line,C.ch-E),o);E+=R.textContent.length}for(var U=h.previousSibling,Q=i;U;U=U.previousSibling){if(C=k(U,U.firstChild,-1),C)return oi(ie(C.line,C.ch+Q),o);Q+=U.textContent.length}}var pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};pt.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),A&&(o.style.width="0px"),Pe(o,"input",function(){y&&w>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Pe(o,"paste",function(c){ut(n,c)||zf(c,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(c){if(!ut(n,c)){if(n.somethingSelected())ls({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var h=Df(n);ls({lineWise:!0,text:h.text}),c.type=="cut"?n.setSelections(h.ranges,null,Ce):(i.prevInput="",o.value=h.text.join(`
20
- `),nt(o))}else return;c.type=="cut"&&(n.state.cutIncoming=+new Date)}}Pe(o,"cut",a),Pe(o,"copy",a),Pe(e.scroller,"paste",function(c){if(!(Br(e,c)||ut(n,c))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var h=new Event("paste");h.clipboardData=c.clipboardData,o.dispatchEvent(h)}}),Pe(e.lineSpace,"selectstart",function(c){Br(e,c)||zt(c)}),Pe(o,"compositionstart",function(){var c=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:c,range:n.markText(c,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},pt.prototype.createField=function(e){this.wrapper=If(),this.textarea=this.wrapper.firstChild},pt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},pt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=Lu(e);if(e.options.moveInputWithCursor){var o=mr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),c=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+c.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+c.left-a.left))}return n},pt.prototype.showSelection=function(e){var t=this.cm,i=t.display;j(i.cursorDiv,e.cursors),j(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},pt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&nt(this.textarea),y&&w>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&w>=9&&(this.hasSelection=null))}},pt.prototype.getField=function(){return this.textarea},pt.prototype.supportsTouch=function(){return!1},pt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||ae()!=this.textarea))try{this.textarea.focus()}catch{}},pt.prototype.blur=function(){this.textarea.blur()},pt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pt.prototype.receivedFocus=function(){this.slowPoll()},pt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},pt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},pt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ao(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=i.value;if(o==n&&!t.somethingSelected())return!1;if(y&&w>=9&&this.hasSelection===o||B&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var c=0,h=Math.min(n.length,o.length);c<h&&n.charCodeAt(c)==o.charCodeAt(c);)++c;return Qt(t,function(){Rl(t,o.slice(c),n.length-c,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
21
- `)>-1?i.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pt.prototype.onKeyPress=function(){y&&w>=9&&(this.hasSelection=null),this.fastPoll()},pt.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Cn(i,e),c=n.scroller.scrollTop;if(!a||M)return;var h=i.options.resetSelectionOnContextMenu;h&&i.doc.sel.contains(a)==-1&&St(i,Dt)(i.doc,tn(a),Ce);var p=o.style.cssText,v=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px;
22
- top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px;
23
- z-index: 1000; background: `+(y?"rgba(255, 255, 255, .05)":"transparent")+`;
24
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var C;S&&(C=window.scrollY),n.input.focus(),S&&window.scrollTo(null,C),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=E,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(o.selectionStart!=null){var Q=i.somethingSelected(),ue="\u200B"+(Q?o.value:"");o.value="\u21DA",o.value=ue,t.prevInput=Q?"":"\u200B",o.selectionStart=1,o.selectionEnd=ue.length,n.selForContextMenu=i.doc.sel}}function E(){if(t.contextMenuPending==E&&(t.contextMenuPending=!1,t.wrapper.style.cssText=v,o.style.cssText=p,y&&w<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),o.selectionStart!=null)){(!y||y&&w<9)&&R();var Q=0,ue=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?St(i,nf)(i):Q++<10?n.detectingSelectAll=setTimeout(ue,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ue,200)}}if(y&&w>=9&&R(),Ne){wn(e);var U=function(){tt(window,"mouseup",U),setTimeout(E,20)};Pe(window,"mouseup",U)}else setTimeout(E,50)},pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},pt.prototype.setUneditable=function(){},pt.prototype.needsContentAttribute=!1;function gg(e,t){if(t=t?Ie(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=ae();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=h.getValue()}var o;if(e.form&&(Pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var c=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=c}}catch{}}t.finishInit=function(p){p.save=n,p.getTextArea=function(){return e},p.toTextArea=function(){p.toTextArea=isNaN,n(),e.parentNode.removeChild(p.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var h=at(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return h}function vg(e){e.off=tt,e.on=Pe,e.wheelEventPixels=Sp,e.Doc=Kt,e.splitLines=Oi,e.countColumn=Qe,e.findColumn=Te,e.isWordChar=te,e.Pass=se,e.signal=Oe,e.Line=Un,e.changeEnd=rn,e.scrollbarModel=Nu,e.Pos=ie,e.cmpPos=m,e.modes=hr,e.mimeModes=or,e.resolveMode=Wn,e.getMode=Bn,e.modeExtensions=pr,e.extendMode=gr,e.copyState=sr,e.startState=Ai,e.innerMode=Ei,e.commands=no,e.keyMap=Ur,e.keyName=wf,e.isModifierKey=yf,e.lookupKey=ri,e.normalizeKeyMap=qp,e.StringStream=dt,e.SharedTextMarker=eo,e.TextMarker=on,e.LineWidget=Vi,e.e_preventDefault=zt,e.e_stopPropagation=Hn,e.e_stop=wn,e.addClass=Re,e.contains=Y,e.rmClass=de,e.keyNames=sn}lg(at),cg(at);var mg="iter insert remove copy getEditor constructor".split(" ");for(var us in Kt.prototype)Kt.prototype.hasOwnProperty(us)&&Z(mg,us)<0&&(at.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(Kt.prototype[us]));return Cr(Kt),at.inputStyles={textarea:pt,contenteditable:Ve},at.defineMode=function(e){!at.defaults.mode&&e!="null"&&(at.defaults.mode=e),zo.apply(this,arguments)},at.defineMIME=Ir,at.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),at.defineMIME("text/plain","null"),at.defineExtension=function(e,t){at.prototype[e]=t},at.defineDocExtension=function(e,t){Kt.prototype[e]=t},at.fromTextArea=gg,vg(at),at.version="5.65.4",at})})(Xr);var e0=Xr.exports,Vd={exports:{}};(function(r,s){(function(l){l(Xr.exports)})(function(l){l.defineMode("javascript",function(u,f){var d=u.indentUnit,g=f.statementIndent,b=f.jsonld,y=f.json||b,w=f.trackScope!==!1,S=f.typescript,T=f.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function m(Rt){return{type:Rt,style:"keyword"}}var P=m("keyword a"),X=m("keyword b"),le=m("keyword c"),De=m("keyword d"),$e=m("operator"),xe={type:"atom",style:"atom"};return{if:m("if"),while:P,with:P,else:X,do:X,try:X,finally:X,return:De,break:De,continue:De,new:m("new"),delete:le,void:le,throw:le,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:$e,typeof:$e,instanceof:$e,true:xe,false:xe,null:xe,undefined:xe,NaN:xe,Infinity:xe,this:m("this"),class:m("class"),super:m("atom"),yield:le,export:m("export"),import:m("import"),extends:le,await:le}}(),M=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function re(m){for(var P=!1,X,le=!1;(X=m.next())!=null;){if(!P){if(X=="/"&&!le)return;X=="["?le=!0:le&&X=="]"&&(le=!1)}P=!P&&X=="\\"}}var V,A;function D(m,P,X){return V=m,A=X,P}function I(m,P){var X=m.next();if(X=='"'||X=="'")return P.tokenize=B(X),P.tokenize(m,P);if(X=="."&&m.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(X=="."&&m.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(X))return D(X);if(X=="="&&m.eat(">"))return D("=>","operator");if(X=="0"&&m.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(X))return m.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(X=="/")return m.eat("*")?(P.tokenize=oe,oe(m,P)):m.eat("/")?(m.skipToEnd(),D("comment","comment")):ie(m,P,1)?(re(m),m.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(m.eat("="),D("operator","operator",m.current()));if(X=="`")return P.tokenize=pe,pe(m,P);if(X=="#"&&m.peek()=="!")return m.skipToEnd(),D("meta","meta");if(X=="#"&&m.eatWhile(T))return D("variable","property");if(X=="<"&&m.match("!--")||X=="-"&&m.match("->")&&!/\S/.test(m.string.slice(0,m.start)))return m.skipToEnd(),D("comment","comment");if(M.test(X))return(X!=">"||!P.lexical||P.lexical.type!=">")&&(m.eat("=")?(X=="!"||X=="=")&&m.eat("="):/[<>*+\-|&?]/.test(X)&&(m.eat(X),X==">"&&m.eat(X))),X=="?"&&m.eat(".")?D("."):D("operator","operator",m.current());if(T.test(X)){m.eatWhile(T);var le=m.current();if(P.lastType!="."){if(O.propertyIsEnumerable(le)){var De=O[le];return D(De.type,De.style,le)}if(le=="async"&&m.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",le)}return D("variable","variable",le)}}function B(m){return function(P,X){var le=!1,De;if(b&&P.peek()=="@"&&P.match(H))return X.tokenize=I,D("jsonld-keyword","meta");for(;(De=P.next())!=null&&!(De==m&&!le);)le=!le&&De=="\\";return le||(X.tokenize=I),D("string","string")}}function oe(m,P){for(var X=!1,le;le=m.next();){if(le=="/"&&X){P.tokenize=I;break}X=le=="*"}return D("comment","comment")}function pe(m,P){for(var X=!1,le;(le=m.next())!=null;){if(!X&&(le=="`"||le=="$"&&m.eat("{"))){P.tokenize=I;break}X=!X&&le=="\\"}return D("quasi","string-2",m.current())}var ye="([{}])";function We(m,P){P.fatArrowAt&&(P.fatArrowAt=null);var X=m.string.indexOf("=>",m.start);if(!(X<0)){if(S){var le=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(m.string.slice(m.start,X));le&&(X=le.index)}for(var De=0,$e=!1,xe=X-1;xe>=0;--xe){var Rt=m.string.charAt(xe),lr=ye.indexOf(Rt);if(lr>=0&&lr<3){if(!De){++xe;break}if(--De==0){Rt=="("&&($e=!0);break}}else if(lr>=3&&lr<6)++De;else if(T.test(Rt))$e=!0;else if(/["'\/`]/.test(Rt))for(;;--xe){if(xe==0)return;var jn=m.string.charAt(xe-1);if(jn==Rt&&m.string.charAt(xe-2)!="\\"){xe--;break}}else if($e&&!De){++xe;break}}$e&&!De&&(P.fatArrowAt=xe)}}var Ne={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function be(m,P,X,le,De,$e){this.indented=m,this.column=P,this.type=X,this.prev=De,this.info=$e,le!=null&&(this.align=le)}function de(m,P){if(!w)return!1;for(var X=m.localVars;X;X=X.next)if(X.name==P)return!0;for(var le=m.context;le;le=le.prev)for(var X=le.vars;X;X=X.next)if(X.name==P)return!0}function Ee(m,P,X,le,De){var $e=m.cc;for(j.state=m,j.stream=De,j.marked=null,j.cc=$e,j.style=P,m.lexical.hasOwnProperty("align")||(m.lexical.align=!0);;){var xe=$e.length?$e.pop():y?ge:Ce;if(xe(X,le)){for(;$e.length&&$e[$e.length-1].lex;)$e.pop()();return j.marked?j.marked:X=="variable"&&de(m,le)?"variable-2":P}}}var j={state:null,column:null,marked:null,cc:null};function $(){for(var m=arguments.length-1;m>=0;m--)j.cc.push(arguments[m])}function x(){return $.apply(null,arguments),!0}function ee(m,P){for(var X=P;X;X=X.next)if(X.name==m)return!0;return!1}function Y(m){var P=j.state;if(j.marked="def",!!w){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var X=ae(m,P.context);if(X!=null){P.context=X;return}}else if(!ee(m,P.localVars)){P.localVars=new nt(m,P.localVars);return}}f.globalVars&&!ee(m,P.globalVars)&&(P.globalVars=new nt(m,P.globalVars))}}function ae(m,P){if(P)if(P.block){var X=ae(m,P.prev);return X?X==P.prev?P:new Ge(X,P.vars,!0):null}else return ee(m,P.vars)?P:new Ge(P.prev,new nt(m,P.vars),!1);else return null}function Re(m){return m=="public"||m=="private"||m=="protected"||m=="abstract"||m=="readonly"}function Ge(m,P,X){this.prev=m,this.vars=P,this.block=X}function nt(m,P){this.name=m,this.next=P}var lt=new nt("this",new nt("arguments",null));function Ie(){j.state.context=new Ge(j.state.context,j.state.localVars,!1),j.state.localVars=lt}function Qe(){j.state.context=new Ge(j.state.context,j.state.localVars,!0),j.state.localVars=null}Ie.lex=Qe.lex=!0;function q(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}q.lex=!0;function Z(m,P){var X=function(){var le=j.state,De=le.indented;if(le.lexical.type=="stat")De=le.lexical.indented;else for(var $e=le.lexical;$e&&$e.type==")"&&$e.align;$e=$e.prev)De=$e.indented;le.lexical=new be(De,j.stream.column(),m,null,le.lexical,P)};return X.lex=!0,X}function K(){var m=j.state;m.lexical.prev&&(m.lexical.type==")"&&(m.indented=m.lexical.indented),m.lexical=m.lexical.prev)}K.lex=!0;function se(m){function P(X){return X==m?x():m==";"||X=="}"||X==")"||X=="]"?$():x(P)}return P}function Ce(m,P){return m=="var"?x(Z("vardef",P),Li,se(";"),K):m=="keyword a"?x(Z("form"),L,Ce,K):m=="keyword b"?x(Z("form"),Ce,K):m=="keyword d"?j.stream.match(/^\s*$/,!1)?x():x(Z("stat"),F,se(";"),K):m=="debugger"?x(se(";")):m=="{"?x(Z("}"),Qe,vt,K,q):m==";"?x():m=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==K&&j.state.cc.pop()(),x(Z("form"),L,Ce,K,Ao)):m=="function"?x(hr):m=="for"?x(Z("form"),Qe,No,Ce,q,K):m=="class"||S&&P=="interface"?(j.marked="keyword",x(Z("form",m=="class"?m:P),Bn,K)):m=="variable"?S&&P=="declare"?(j.marked="keyword",x(Ce)):S&&(P=="module"||P=="enum"||P=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",P=="enum"?x(Lr):P=="type"?x(zo,se("operator"),Oe,se(";")):x(Z("form"),jt,se("{"),Z("}"),vt,K,K)):S&&P=="namespace"?(j.marked="keyword",x(Z("form"),ge,Ce,K)):S&&P=="abstract"?(j.marked="keyword",x(Ce)):x(Z("stat"),he):m=="switch"?x(Z("form"),L,se("{"),Z("}","switch"),Qe,vt,K,K,q):m=="case"?x(ge,se(":")):m=="default"?x(se(":")):m=="catch"?x(Z("form"),Ie,Se,Ce,K,q):m=="export"?x(Z("stat"),Ei,K):m=="import"?x(Z("stat"),dt,K):m=="async"?x(Ce):P=="@"?x(ge,Ce):$(Z("stat"),ge,se(";"),K)}function Se(m){if(m=="(")return x(Ir,se(")"))}function ge(m,P){return N(m,P,!1)}function Te(m,P){return N(m,P,!0)}function L(m){return m!="("?$():x(Z(")"),F,se(")"),K)}function N(m,P,X){if(j.state.fatArrowAt==j.stream.start){var le=X?te:ce;if(m=="(")return x(Ie,Z(")"),He(Ir,")"),K,se("=>"),le,q);if(m=="variable")return $(Ie,jt,se("=>"),le,q)}var De=X?J:G;return Ne.hasOwnProperty(m)?x(De):m=="function"?x(hr,De):m=="class"||S&&P=="interface"?(j.marked="keyword",x(Z("form"),Wn,K)):m=="keyword c"||m=="async"?x(X?Te:ge):m=="("?x(Z(")"),F,se(")"),K,De):m=="operator"||m=="spread"?x(X?Te:ge):m=="["?x(Z("]"),Xe,K,De):m=="{"?xt(Be,"}",null,De):m=="quasi"?$(ne,De):m=="new"?x(_(X)):x()}function F(m){return m.match(/[;\}\)\],]/)?$():$(ge)}function G(m,P){return m==","?x(F):J(m,P,!1)}function J(m,P,X){var le=X==!1?G:J,De=X==!1?ge:Te;if(m=="=>")return x(Ie,X?te:ce,q);if(m=="operator")return/\+\+|--/.test(P)||S&&P=="!"?x(le):S&&P=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(Z(">"),He(Oe,">"),K,le):P=="?"?x(ge,se(":"),De):x(De);if(m=="quasi")return $(ne,le);if(m!=";"){if(m=="(")return xt(Te,")","call",le);if(m==".")return x(Le,le);if(m=="[")return x(Z("]"),F,se("]"),K,le);if(S&&P=="as")return j.marked="keyword",x(Oe,le);if(m=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),x(De)}}function ne(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?x(ne):x(F,fe)}function fe(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,x(ne)}function ce(m){return We(j.stream,j.state),$(m=="{"?Ce:ge)}function te(m){return We(j.stream,j.state),$(m=="{"?Ce:Te)}function _(m){return function(P){return P=="."?x(m?z:W):P=="variable"&&S?x(wn,m?J:G):$(m?Te:ge)}}function W(m,P){if(P=="target")return j.marked="keyword",x(G)}function z(m,P){if(P=="target")return j.marked="keyword",x(J)}function he(m){return m==":"?x(K,Ce):$(G,se(";"),K)}function Le(m){if(m=="variable")return j.marked="property",x()}function Be(m,P){if(m=="async")return j.marked="property",x(Be);if(m=="variable"||j.style=="keyword"){if(j.marked="property",P=="get"||P=="set")return x(Je);var X;return S&&j.state.fatArrowAt==j.stream.start&&(X=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+X[0].length),x(Ke)}else{if(m=="number"||m=="string")return j.marked=b?"property":j.style+" property",x(Ke);if(m=="jsonld-keyword")return x(Ke);if(S&&Re(P))return j.marked="keyword",x(Be);if(m=="[")return x(ge,dr,se("]"),Ke);if(m=="spread")return x(Te,Ke);if(P=="*")return j.marked="keyword",x(Be);if(m==":")return $(Ke)}}function Je(m){return m!="variable"?$(Ke):(j.marked="property",x(hr))}function Ke(m){if(m==":")return x(Te);if(m=="(")return $(hr)}function He(m,P,X){function le(De,$e){if(X?X.indexOf(De)>-1:De==","){var xe=j.state.lexical;return xe.info=="call"&&(xe.pos=(xe.pos||0)+1),x(function(Rt,lr){return Rt==P||lr==P?$():$(m)},le)}return De==P||$e==P?x():X&&X.indexOf(";")>-1?$(m):x(se(P))}return function(De,$e){return De==P||$e==P?x():$(m,le)}}function xt(m,P,X){for(var le=3;le<arguments.length;le++)j.cc.push(arguments[le]);return x(Z(P,X),He(m,P),K)}function vt(m){return m=="}"?x():$(Ce,vt)}function dr(m,P){if(S){if(m==":")return x(Oe);if(P=="?")return x(dr)}}function Pe(m,P){if(S&&(m==":"||P=="in"))return x(Oe)}function Fr(m){if(S&&m==":")return j.stream.match(/^\s*\w+\s+is\b/,!1)?x(ge,tt,Oe):x(Oe)}function tt(m,P){if(P=="is")return j.marked="keyword",x()}function Oe(m,P){if(P=="keyof"||P=="typeof"||P=="infer"||P=="readonly")return j.marked="keyword",x(P=="typeof"?Te:Oe);if(m=="variable"||P=="void")return j.marked="type",x(ir);if(P=="|"||P=="&")return x(Oe);if(m=="string"||m=="number"||m=="atom")return x(ir);if(m=="[")return x(Z("]"),He(Oe,"]",","),K,ir);if(m=="{")return x(Z("}"),In,K,ir);if(m=="(")return x(He(Hn,")"),ut,ir);if(m=="<")return x(He(Oe,">"),Oe);if(m=="quasi")return $(Cr,ir)}function ut(m){if(m=="=>")return x(Oe)}function In(m){return m.match(/[\}\)\]]/)?x():m==","||m==";"?x(In):$(Pt,In)}function Pt(m,P){if(m=="variable"||j.style=="keyword")return j.marked="property",x(Pt);if(P=="?"||m=="number"||m=="string")return x(Pt);if(m==":")return x(Oe);if(m=="[")return x(se("variable"),Pe,se("]"),Pt);if(m=="(")return $(or,Pt);if(!m.match(/[;\}\)\],]/))return x()}function Cr(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?x(Cr):x(Oe,zt)}function zt(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,x(Cr)}function Hn(m,P){return m=="variable"&&j.stream.match(/^\s*[?:]/,!1)||P=="?"?x(Hn):m==":"?x(Oe):m=="spread"?x(Hn):$(Oe)}function ir(m,P){if(P=="<")return x(Z(">"),He(Oe,">"),K,ir);if(P=="|"||m=="."||P=="&")return x(Oe);if(m=="[")return x(Oe,se("]"),ir);if(P=="extends"||P=="implements")return j.marked="keyword",x(Oe);if(P=="?")return x(Oe,se(":"),Oe)}function wn(m,P){if(P=="<")return x(Z(">"),He(Oe,">"),K,ir)}function Zr(){return $(Oe,Mo)}function Mo(m,P){if(P=="=")return x(Oe)}function Li(m,P){return P=="enum"?(j.marked="keyword",x(Lr)):$(jt,dr,_r,Oi)}function jt(m,P){if(S&&Re(P))return j.marked="keyword",x(jt);if(m=="variable")return Y(P),x();if(m=="spread")return x(jt);if(m=="[")return xt(Pi,"]");if(m=="{")return xt(Eo,"}")}function Eo(m,P){return m=="variable"&&!j.stream.match(/^\s*:/,!1)?(Y(P),x(_r)):(m=="variable"&&(j.marked="property"),m=="spread"?x(jt):m=="}"?$():m=="["?x(ge,se("]"),se(":"),Eo):x(se(":"),jt,_r))}function Pi(){return $(jt,_r)}function _r(m,P){if(P=="=")return x(Te)}function Oi(m){if(m==",")return x(Li)}function Ao(m,P){if(m=="keyword b"&&P=="else")return x(Z("form","else"),Ce,K)}function No(m,P){if(P=="await")return x(No);if(m=="(")return x(Z(")"),Mi,K)}function Mi(m){return m=="var"?x(Li,Jr):m=="variable"?x(Jr):$(Jr)}function Jr(m,P){return m==")"?x():m==";"?x(Jr):P=="in"||P=="of"?(j.marked="keyword",x(ge,Jr)):$(ge,Jr)}function hr(m,P){if(P=="*")return j.marked="keyword",x(hr);if(m=="variable")return Y(P),x(hr);if(m=="(")return x(Ie,Z(")"),He(Ir,")"),K,Fr,Ce,q);if(S&&P=="<")return x(Z(">"),He(Zr,">"),K,hr)}function or(m,P){if(P=="*")return j.marked="keyword",x(or);if(m=="variable")return Y(P),x(or);if(m=="(")return x(Ie,Z(")"),He(Ir,")"),K,Fr,q);if(S&&P=="<")return x(Z(">"),He(Zr,">"),K,or)}function zo(m,P){if(m=="keyword"||m=="variable")return j.marked="type",x(zo);if(P=="<")return x(Z(">"),He(Zr,">"),K)}function Ir(m,P){return P=="@"&&x(ge,Ir),m=="spread"?x(Ir):S&&Re(P)?(j.marked="keyword",x(Ir)):S&&m=="this"?x(dr,_r):$(jt,dr,_r)}function Wn(m,P){return m=="variable"?Bn(m,P):pr(m,P)}function Bn(m,P){if(m=="variable")return Y(P),x(pr)}function pr(m,P){if(P=="<")return x(Z(">"),He(Zr,">"),K,pr);if(P=="extends"||P=="implements"||S&&m==",")return P=="implements"&&(j.marked="keyword"),x(S?Oe:ge,pr);if(m=="{")return x(Z("}"),gr,K)}function gr(m,P){if(m=="async"||m=="variable"&&(P=="static"||P=="get"||P=="set"||S&&Re(P))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return j.marked="keyword",x(gr);if(m=="variable"||j.style=="keyword")return j.marked="property",x(sr,gr);if(m=="number"||m=="string")return x(sr,gr);if(m=="[")return x(ge,dr,se("]"),sr,gr);if(P=="*")return j.marked="keyword",x(gr);if(S&&m=="(")return $(or,gr);if(m==";"||m==",")return x(gr);if(m=="}")return x();if(P=="@")return x(ge,gr)}function sr(m,P){if(P=="!"||P=="?")return x(sr);if(m==":")return x(Oe,_r);if(P=="=")return x(Te);var X=j.state.lexical.prev,le=X&&X.info=="interface";return $(le?or:hr)}function Ei(m,P){return P=="*"?(j.marked="keyword",x(Jt,se(";"))):P=="default"?(j.marked="keyword",x(ge,se(";"))):m=="{"?x(He(Ai,"}"),Jt,se(";")):$(Ce)}function Ai(m,P){if(P=="as")return j.marked="keyword",x(se("variable"));if(m=="variable")return $(Te,Ai)}function dt(m){return m=="string"?x():m=="("?$(ge):m=="."?$(G):$(_e,Tr,Jt)}function _e(m,P){return m=="{"?xt(_e,"}"):(m=="variable"&&Y(P),P=="*"&&(j.marked="keyword"),x(Ni))}function Tr(m){if(m==",")return x(_e,Tr)}function Ni(m,P){if(P=="as")return j.marked="keyword",x(_e)}function Jt(m,P){if(P=="from")return j.marked="keyword",x(ge)}function Xe(m){return m=="]"?x():$(He(Te,"]"))}function Lr(){return $(Z("form"),jt,se("{"),Z("}"),He(xn,"}"),K,K)}function xn(){return $(jt,_r)}function zi(m,P){return m.lastType=="operator"||m.lastType==","||M.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function ie(m,P,X){return P.tokenize==I&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(m.string.slice(0,m.pos-(X||0)))}return{startState:function(m){var P={tokenize:I,lastType:"sof",cc:[],lexical:new be((m||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new Ge(null,null,!1),indented:m||0};return f.globalVars&&typeof f.globalVars=="object"&&(P.globalVars=f.globalVars),P},token:function(m,P){if(m.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=m.indentation(),We(m,P)),P.tokenize!=oe&&m.eatSpace())return null;var X=P.tokenize(m,P);return V=="comment"?X:(P.lastType=V=="operator"&&(A=="++"||A=="--")?"incdec":V,Ee(P,X,V,A,m))},indent:function(m,P){if(m.tokenize==oe||m.tokenize==pe)return l.Pass;if(m.tokenize!=I)return 0;var X=P&&P.charAt(0),le=m.lexical,De;if(!/^\s*else\b/.test(P))for(var $e=m.cc.length-1;$e>=0;--$e){var xe=m.cc[$e];if(xe==K)le=le.prev;else if(xe!=Ao&&xe!=q)break}for(;(le.type=="stat"||le.type=="form")&&(X=="}"||(De=m.cc[m.cc.length-1])&&(De==G||De==J)&&!/^[,\.=+\-*:?[\(]/.test(P));)le=le.prev;g&&le.type==")"&&le.prev.type=="stat"&&(le=le.prev);var Rt=le.type,lr=X==Rt;return Rt=="vardef"?le.indented+(m.lastType=="operator"||m.lastType==","?le.info.length+1:0):Rt=="form"&&X=="{"?le.indented:Rt=="form"?le.indented+d:Rt=="stat"?le.indented+(zi(m,P)?g||d:0):le.info=="switch"&&!lr&&f.doubleIndentSwitch!=!1?le.indented+(/^(?:case|default)\b/.test(P)?d:2*d):le.align?le.column+(lr?0:1):le.indented+(lr?0:d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:y?null:"/*",blockCommentEnd:y?null:"*/",blockCommentContinue:y?null:" * ",lineComment:y?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:y?"json":"javascript",jsonldMode:b,jsonMode:y,expressionAllowed:ie,skipExpression:function(m){Ee(m,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var t0={exports:{}};(function(r,s){(function(l){l(Xr.exports)})(function(l){l.defineMode("css",function(be,de){var Ee=de.inline;de.propertyKeywords||(de=l.resolveMode("text/css"));var j=be.indentUnit,$=de.tokenHooks,x=de.documentTypes||{},ee=de.mediaTypes||{},Y=de.mediaFeatures||{},ae=de.mediaValueKeywords||{},Re=de.propertyKeywords||{},Ge=de.nonStandardPropertyKeywords||{},nt=de.fontProperties||{},lt=de.counterDescriptors||{},Ie=de.colorKeywords||{},Qe=de.valueKeywords||{},q=de.allowNested,Z=de.lineComment,K=de.supportsAtComponent===!0,se=be.highlightNonStandardPropertyKeywords!==!1,Ce,Se;function ge(_,W){return Ce=W,_}function Te(_,W){var z=_.next();if($[z]){var he=$[z](_,W);if(he!==!1)return he}if(z=="@")return _.eatWhile(/[\w\\\-]/),ge("def",_.current());if(z=="="||(z=="~"||z=="|")&&_.eat("="))return ge(null,"compare");if(z=='"'||z=="'")return W.tokenize=L(z),W.tokenize(_,W);if(z=="#")return _.eatWhile(/[\w\\\-]/),ge("atom","hash");if(z=="!")return _.match(/^\s*\w*/),ge("keyword","important");if(/\d/.test(z)||z=="."&&_.eat(/\d/))return _.eatWhile(/[\w.%]/),ge("number","unit");if(z==="-"){if(/[\d.]/.test(_.peek()))return _.eatWhile(/[\w.%]/),ge("number","unit");if(_.match(/^-[\w\\\-]*/))return _.eatWhile(/[\w\\\-]/),_.match(/^\s*:/,!1)?ge("variable-2","variable-definition"):ge("variable-2","variable");if(_.match(/^\w+-/))return ge("meta","meta")}else return/[,+>*\/]/.test(z)?ge(null,"select-op"):z=="."&&_.match(/^-?[_a-z][_a-z0-9-]*/i)?ge("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(z)?ge(null,z):_.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(_.current())&&(W.tokenize=N),ge("variable callee","variable")):/[\w\\\-]/.test(z)?(_.eatWhile(/[\w\\\-]/),ge("property","word")):ge(null,null)}function L(_){return function(W,z){for(var he=!1,Le;(Le=W.next())!=null;){if(Le==_&&!he){_==")"&&W.backUp(1);break}he=!he&&Le=="\\"}return(Le==_||!he&&_!=")")&&(z.tokenize=null),ge("string","string")}}function N(_,W){return _.next(),_.match(/^\s*[\"\')]/,!1)?W.tokenize=null:W.tokenize=L(")"),ge(null,"(")}function F(_,W,z){this.type=_,this.indent=W,this.prev=z}function G(_,W,z,he){return _.context=new F(z,W.indentation()+(he===!1?0:j),_.context),z}function J(_){return _.context.prev&&(_.context=_.context.prev),_.context.type}function ne(_,W,z){return te[z.context.type](_,W,z)}function fe(_,W,z,he){for(var Le=he||1;Le>0;Le--)z.context=z.context.prev;return ne(_,W,z)}function ce(_){var W=_.current().toLowerCase();Qe.hasOwnProperty(W)?Se="atom":Ie.hasOwnProperty(W)?Se="keyword":Se="variable"}var te={};return te.top=function(_,W,z){if(_=="{")return G(z,W,"block");if(_=="}"&&z.context.prev)return J(z);if(K&&/@component/i.test(_))return G(z,W,"atComponentBlock");if(/^@(-moz-)?document$/i.test(_))return G(z,W,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(_))return G(z,W,"atBlock");if(/^@(font-face|counter-style)/i.test(_))return z.stateArg=_,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(_))return"keyframes";if(_&&_.charAt(0)=="@")return G(z,W,"at");if(_=="hash")Se="builtin";else if(_=="word")Se="tag";else{if(_=="variable-definition")return"maybeprop";if(_=="interpolation")return G(z,W,"interpolation");if(_==":")return"pseudo";if(q&&_=="(")return G(z,W,"parens")}return z.context.type},te.block=function(_,W,z){if(_=="word"){var he=W.current().toLowerCase();return Re.hasOwnProperty(he)?(Se="property","maybeprop"):Ge.hasOwnProperty(he)?(Se=se?"string-2":"property","maybeprop"):q?(Se=W.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Se+=" error","maybeprop")}else return _=="meta"?"block":!q&&(_=="hash"||_=="qualifier")?(Se="error","block"):te.top(_,W,z)},te.maybeprop=function(_,W,z){return _==":"?G(z,W,"prop"):ne(_,W,z)},te.prop=function(_,W,z){if(_==";")return J(z);if(_=="{"&&q)return G(z,W,"propBlock");if(_=="}"||_=="{")return fe(_,W,z);if(_=="(")return G(z,W,"parens");if(_=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(W.current()))Se+=" error";else if(_=="word")ce(W);else if(_=="interpolation")return G(z,W,"interpolation");return"prop"},te.propBlock=function(_,W,z){return _=="}"?J(z):_=="word"?(Se="property","maybeprop"):z.context.type},te.parens=function(_,W,z){return _=="{"||_=="}"?fe(_,W,z):_==")"?J(z):_=="("?G(z,W,"parens"):_=="interpolation"?G(z,W,"interpolation"):(_=="word"&&ce(W),"parens")},te.pseudo=function(_,W,z){return _=="meta"?"pseudo":_=="word"?(Se="variable-3",z.context.type):ne(_,W,z)},te.documentTypes=function(_,W,z){return _=="word"&&x.hasOwnProperty(W.current())?(Se="tag",z.context.type):te.atBlock(_,W,z)},te.atBlock=function(_,W,z){if(_=="(")return G(z,W,"atBlock_parens");if(_=="}"||_==";")return fe(_,W,z);if(_=="{")return J(z)&&G(z,W,q?"block":"top");if(_=="interpolation")return G(z,W,"interpolation");if(_=="word"){var he=W.current().toLowerCase();he=="only"||he=="not"||he=="and"||he=="or"?Se="keyword":ee.hasOwnProperty(he)?Se="attribute":Y.hasOwnProperty(he)?Se="property":ae.hasOwnProperty(he)?Se="keyword":Re.hasOwnProperty(he)?Se="property":Ge.hasOwnProperty(he)?Se=se?"string-2":"property":Qe.hasOwnProperty(he)?Se="atom":Ie.hasOwnProperty(he)?Se="keyword":Se="error"}return z.context.type},te.atComponentBlock=function(_,W,z){return _=="}"?fe(_,W,z):_=="{"?J(z)&&G(z,W,q?"block":"top",!1):(_=="word"&&(Se="error"),z.context.type)},te.atBlock_parens=function(_,W,z){return _==")"?J(z):_=="{"||_=="}"?fe(_,W,z,2):te.atBlock(_,W,z)},te.restricted_atBlock_before=function(_,W,z){return _=="{"?G(z,W,"restricted_atBlock"):_=="word"&&z.stateArg=="@counter-style"?(Se="variable","restricted_atBlock_before"):ne(_,W,z)},te.restricted_atBlock=function(_,W,z){return _=="}"?(z.stateArg=null,J(z)):_=="word"?(z.stateArg=="@font-face"&&!nt.hasOwnProperty(W.current().toLowerCase())||z.stateArg=="@counter-style"&&!lt.hasOwnProperty(W.current().toLowerCase())?Se="error":Se="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(_,W,z){return _=="word"?(Se="variable","keyframes"):_=="{"?G(z,W,"top"):ne(_,W,z)},te.at=function(_,W,z){return _==";"?J(z):_=="{"||_=="}"?fe(_,W,z):(_=="word"?Se="tag":_=="hash"&&(Se="builtin"),"at")},te.interpolation=function(_,W,z){return _=="}"?J(z):_=="{"||_==";"?fe(_,W,z):(_=="word"?Se="variable":_!="variable"&&_!="("&&_!=")"&&(Se="error"),"interpolation")},{startState:function(_){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new F(Ee?"block":"top",_||0,null)}},token:function(_,W){if(!W.tokenize&&_.eatSpace())return null;var z=(W.tokenize||Te)(_,W);return z&&typeof z=="object"&&(Ce=z[1],z=z[0]),Se=z,Ce!="comment"&&(W.state=te[W.state](Ce,_,W)),Se},indent:function(_,W){var z=_.context,he=W&&W.charAt(0),Le=z.indent;return z.type=="prop"&&(he=="}"||he==")")&&(z=z.prev),z.prev&&(he=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="restricted_atBlock")?(z=z.prev,Le=z.indent):(he==")"&&(z.type=="parens"||z.type=="atBlock_parens")||he=="{"&&(z.type=="at"||z.type=="atBlock"))&&(Le=Math.max(0,z.indent-j))),Le},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Z,fold:"brace"}});function u(be){for(var de={},Ee=0;Ee<be.length;++Ee)de[be[Ee].toLowerCase()]=!0;return de}var f=["domain","regexp","url","url-prefix"],d=u(f),g=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(g),y=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],w=u(y),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],T=u(S),O=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],M=u(O),H=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],re=u(H),V=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],A=u(V),D=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],I=u(D),B=["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","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","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","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","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","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],oe=u(B),pe=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","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","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","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","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","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","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","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","repeating-conic-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","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","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","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","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","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","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"],ye=u(pe),We=f.concat(g).concat(y).concat(S).concat(O).concat(H).concat(B).concat(pe);l.registerHelper("hintWords","css",We);function Ne(be,de){for(var Ee=!1,j;(j=be.next())!=null;){if(Ee&&j=="/"){de.tokenize=null;break}Ee=j=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:d,mediaTypes:b,mediaFeatures:w,mediaValueKeywords:T,propertyKeywords:M,nonStandardPropertyKeywords:re,fontProperties:A,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ne,Ne(be,de)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:w,mediaValueKeywords:T,propertyKeywords:M,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:A,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ne,Ne(be,de)):["operator","operator"]},":":function(be){return be.match(/^\s*\{/,!1)?[null,null]:!1},$:function(be){return be.match(/^[\w-]+/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(be){return be.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:w,mediaValueKeywords:T,propertyKeywords:M,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:A,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ne,Ne(be,de)):["operator","operator"]},"@":function(be){return be.eat("{")?[null,"interpolation"]:be.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(be.eatWhile(/[\w\\\-]/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:d,mediaTypes:b,mediaFeatures:w,propertyKeywords:M,nonStandardPropertyKeywords:re,fontProperties:A,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,supportsAtComponent:!0,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ne,Ne(be,de)):!1}},name:"css",helperType:"gss"})})})();var eh={exports:{}};(function(r,s){(function(l){l(Xr.exports)})(function(l){var u={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},f={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(d,g){var b=d.indentUnit,y={},w=g.htmlMode?u:f;for(var S in w)y[S]=w[S];for(var S in g)y[S]=g[S];var T,O;function M(x,ee){function Y(Ge){return ee.tokenize=Ge,Ge(x,ee)}var ae=x.next();if(ae=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?Y(V("atom","]]>")):null:x.match("--")?Y(V("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),Y(A(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),ee.tokenize=V("meta","?>"),"meta"):(T=x.eat("/")?"closeTag":"openTag",ee.tokenize=H,"tag bracket");if(ae=="&"){var Re;return x.eat("#")?x.eat("x")?Re=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):Re=x.eatWhile(/[\d]/)&&x.eat(";"):Re=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),Re?"atom":"error"}else return x.eatWhile(/[^&<]/),null}M.isInText=!0;function H(x,ee){var Y=x.next();if(Y==">"||Y=="/"&&x.eat(">"))return ee.tokenize=M,T=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return T="equals",null;if(Y=="<"){ee.tokenize=M,ee.state=pe,ee.tagName=ee.tagStart=null;var ae=ee.tokenize(x,ee);return ae?ae+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(ee.tokenize=re(Y),ee.stringStartCol=x.column(),ee.tokenize(x,ee)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(x){var ee=function(Y,ae){for(;!Y.eol();)if(Y.next()==x){ae.tokenize=H;break}return"string"};return ee.isInAttribute=!0,ee}function V(x,ee){return function(Y,ae){for(;!Y.eol();){if(Y.match(ee)){ae.tokenize=M;break}Y.next()}return x}}function A(x){return function(ee,Y){for(var ae;(ae=ee.next())!=null;){if(ae=="<")return Y.tokenize=A(x+1),Y.tokenize(ee,Y);if(ae==">")if(x==1){Y.tokenize=M;break}else return Y.tokenize=A(x-1),Y.tokenize(ee,Y)}return"meta"}}function D(x){return x&&x.toLowerCase()}function I(x,ee,Y){this.prev=x.context,this.tagName=ee||"",this.indent=x.indented,this.startOfLine=Y,(y.doNotIndent.hasOwnProperty(ee)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function B(x){x.context&&(x.context=x.context.prev)}function oe(x,ee){for(var Y;;){if(!x.context||(Y=x.context.tagName,!y.contextGrabbers.hasOwnProperty(D(Y))||!y.contextGrabbers[D(Y)].hasOwnProperty(D(ee))))return;B(x)}}function pe(x,ee,Y){return x=="openTag"?(Y.tagStart=ee.column(),ye):x=="closeTag"?We:pe}function ye(x,ee,Y){return x=="word"?(Y.tagName=ee.current(),O="tag",de):y.allowMissingTagName&&x=="endTag"?(O="tag bracket",de(x,ee,Y)):(O="error",ye)}function We(x,ee,Y){if(x=="word"){var ae=ee.current();return Y.context&&Y.context.tagName!=ae&&y.implicitlyClosed.hasOwnProperty(D(Y.context.tagName))&&B(Y),Y.context&&Y.context.tagName==ae||y.matchClosing===!1?(O="tag",Ne):(O="tag error",be)}else return y.allowMissingTagName&&x=="endTag"?(O="tag bracket",Ne(x,ee,Y)):(O="error",be)}function Ne(x,ee,Y){return x!="endTag"?(O="error",Ne):(B(Y),pe)}function be(x,ee,Y){return O="error",Ne(x,ee,Y)}function de(x,ee,Y){if(x=="word")return O="attribute",Ee;if(x=="endTag"||x=="selfcloseTag"){var ae=Y.tagName,Re=Y.tagStart;return Y.tagName=Y.tagStart=null,x=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(D(ae))?oe(Y,ae):(oe(Y,ae),Y.context=new I(Y,ae,Re==Y.indented)),pe}return O="error",de}function Ee(x,ee,Y){return x=="equals"?j:(y.allowMissing||(O="error"),de(x,ee,Y))}function j(x,ee,Y){return x=="string"?$:x=="word"&&y.allowUnquoted?(O="string",de):(O="error",de(x,ee,Y))}function $(x,ee,Y){return x=="string"?$:de(x,ee,Y)}return{startState:function(x){var ee={tokenize:M,state:pe,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(ee.baseIndent=x),ee},token:function(x,ee){if(!ee.tagName&&x.sol()&&(ee.indented=x.indentation()),x.eatSpace())return null;T=null;var Y=ee.tokenize(x,ee);return(Y||T)&&Y!="comment"&&(O=null,ee.state=ee.state(T||Y,x,ee),O&&(Y=O=="error"?Y+" error":O)),Y},indent:function(x,ee,Y){var ae=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+b;if(ae&&ae.noIndent)return l.Pass;if(x.tokenize!=H&&x.tokenize!=M)return Y?Y.match(/^(\s*)/)[0].length:0;if(x.tagName)return y.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(ee))return 0;var Re=ee&&/^<(\/)?([\w_:\.-]*)/.exec(ee);if(Re&&Re[1])for(;ae;)if(ae.tagName==Re[2]){ae=ae.prev;break}else if(y.implicitlyClosed.hasOwnProperty(D(ae.tagName)))ae=ae.prev;else break;else if(Re)for(;ae;){var Ge=y.contextGrabbers[D(ae.tagName)];if(Ge&&Ge.hasOwnProperty(D(Re[2])))ae=ae.prev;else break}for(;ae&&ae.prev&&!ae.startOfLine;)ae=ae.prev;return ae?ae.indent+b:x.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(x){x.state==j&&(x.state=de)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var ee=[],Y=x.context;Y;Y=Y.prev)ee.push(Y.tagName);return ee.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,s){(function(l){l(Xr.exports,eh.exports,Vd.exports,t0.exports)})(function(l){var u={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(T,O,M){var H=T.current(),re=H.search(O);return re>-1?T.backUp(H.length-re):H.match(/<\/?$/)&&(T.backUp(H.length),T.match(O,!1)||T.match(H)),M}var d={};function g(T){var O=d[T];return O||(d[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(T,O){var M=T.match(g(O));return M?/^\s*(.*?)\s*$/.exec(M[2])[1]:""}function y(T,O){return new RegExp((O?"^":"")+"</\\s*"+T+"\\s*>","i")}function w(T,O){for(var M in T)for(var H=O[M]||(O[M]=[]),re=T[M],V=re.length-1;V>=0;V--)H.unshift(re[V])}function S(T,O){for(var M=0;M<T.length;M++){var H=T[M];if(!H[0]||H[1].test(b(O,H[0])))return H[2]}}l.defineMode("htmlmixed",function(T,O){var M=l.getMode(T,{name:"xml",htmlMode:!0,multilineTagIndentFactor:O.multilineTagIndentFactor,multilineTagIndentPastTag:O.multilineTagIndentPastTag,allowMissingTagName:O.allowMissingTagName}),H={},re=O&&O.tags,V=O&&O.scriptTypes;if(w(u,H),re&&w(re,H),V)for(var A=V.length-1;A>=0;A--)H.script.unshift(["type",V[A].matches,V[A].mode]);function D(I,B){var oe=M.token(I,B.htmlState),pe=/\btag\b/.test(oe),ye;if(pe&&!/[<>\s\/]/.test(I.current())&&(ye=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(ye))B.inTag=ye+" ";else if(B.inTag&&pe&&/>$/.test(I.current())){var We=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var Ne=I.current()==">"&&S(H[We[1]],We[2]),be=l.getMode(T,Ne),de=y(We[1],!0),Ee=y(We[1],!1);B.token=function(j,$){return j.match(de,!1)?($.token=D,$.localState=$.localMode=null,null):f(j,Ee,$.localMode.token(j,$.localState))},B.localMode=be,B.localState=l.startState(be,M.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=I.current(),I.eol()&&(B.inTag+=" "));return oe}return{startState:function(){var I=l.startState(M);return{token:D,inTag:null,localMode:null,localState:null,htmlState:I}},copyState:function(I){var B;return I.localState&&(B=l.copyState(I.localMode,I.localState)),{token:I.token,inTag:I.inTag,localMode:I.localMode,localState:B,htmlState:l.copyState(M,I.htmlState)}},token:function(I,B){return B.token(I,B)},indent:function(I,B,oe){return!I.localMode||/^\s*<\//.test(B)?M.indent(I.htmlState,B,oe):I.localMode.indent?I.localMode.indent(I.localState,B,oe):l.Pass},innerMode:function(I){return{state:I.localState||I.htmlState,mode:I.localMode||M}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(r,s){(function(l){l(Xr.exports,eh.exports,Vd.exports)})(function(l){function u(d,g,b,y){this.state=d,this.mode=g,this.depth=b,this.prev=y}function f(d){return new u(l.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&f(d.prev))}l.defineMode("jsx",function(d,g){var b=l.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=l.getMode(d,g&&g.base||"javascript");function w(M){var H=M.tagName;M.tagName=null;var re=b.indent(M,"","");return M.tagName=H,re}function S(M,H){return H.context.mode==b?T(M,H,H.context):O(M,H,H.context)}function T(M,H,re){if(re.depth==2)return M.match(/^.*?\*\//)?re.depth=1:M.skipToEnd(),"comment";if(M.peek()=="{"){b.skipAttribute(re.state);var V=w(re.state),A=re.state.context;if(A&&M.match(/^[^>]*>\s*$/,!1)){for(;A.prev&&!A.startOfLine;)A=A.prev;A.startOfLine?V-=d.indentUnit:re.prev.state.lexical&&(V=re.prev.state.lexical.indented)}else re.depth==1&&(V+=d.indentUnit);return H.context=new u(l.startState(y,V),y,0,H.context),null}if(re.depth==1){if(M.peek()=="<")return b.skipAttribute(re.state),H.context=new u(l.startState(b,w(re.state)),b,0,H.context),null;if(M.match("//"))return M.skipToEnd(),"comment";if(M.match("/*"))return re.depth=2,S(M,H)}var D=b.token(M,re.state),I=M.current(),B;return/\btag\b/.test(D)?/>$/.test(I)?re.state.context?re.depth=0:H.context=H.context.prev:/^</.test(I)&&(re.depth=1):!D&&(B=I.indexOf("{"))>-1&&M.backUp(I.length-B),D}function O(M,H,re){if(M.peek()=="<"&&y.expressionAllowed(M,re.state))return H.context=new u(l.startState(b,y.indent(re.state,"","")),b,0,H.context),y.skipExpression(re.state),null;var V=y.token(M,re.state);if(!V&&re.depth!=null){var A=M.current();A=="{"?re.depth++:A=="}"&&--re.depth==0&&(H.context=H.context.prev)}return V}return{startState:function(){return{context:new u(l.startState(y),y)}},copyState:function(M){return{context:f(M.context)}},token:S,indent:function(M,H,re){return M.context.mode.indent(M.context.state,H,re)},innerMode:function(M){return M.context}}},"xml","javascript"),l.defineMIME("text/jsx","jsx"),l.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,s){(function(l){l(Xr.exports)})(function(l){l.defineOption("placeholder","",function(w,S,T){var O=T&&T!=l.Init;if(S&&!O)w.on("blur",g),w.on("change",b),w.on("swapDoc",b),l.on(w.getInputField(),"compositionupdate",w.state.placeholderCompose=function(){d(w)}),b(w);else if(!S&&O){w.off("blur",g),w.off("change",b),w.off("swapDoc",b),l.off(w.getInputField(),"compositionupdate",w.state.placeholderCompose),u(w);var M=w.getWrapperElement();M.className=M.className.replace(" CodeMirror-empty","")}S&&!w.hasFocus()&&g(w)});function u(w){w.state.placeholder&&(w.state.placeholder.parentNode.removeChild(w.state.placeholder),w.state.placeholder=null)}function f(w){u(w);var S=w.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=w.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var T=w.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),S.appendChild(T),w.display.lineSpace.insertBefore(S,w.display.lineSpace.firstChild)}function d(w){setTimeout(function(){var S=!1;if(w.lineCount()==1){var T=w.getInputField();S=T.nodeName=="TEXTAREA"?!w.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}S?f(w):u(w)},20)}function g(w){y(w)&&f(w)}function b(w){var S=w.getWrapperElement(),T=y(w);S.className=S.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?f(w):u(w)}function y(w){return w.lineCount()===1&&w.getLine(0)===""}})})();(function(r,s){(function(l){l(Xr.exports)})(function(l){var u="CodeMirror-hint",f="CodeMirror-hint-active";l.showHint=function(A,D,I){if(!D)return A.showHint(I);I&&I.async&&(D.async=!0);var B={hint:D};if(I)for(var oe in I)B[oe]=I[oe];return A.showHint(B)},l.defineExtension("showHint",function(A){A=y(this,this.getCursor("start"),A);var D=this.listSelections();if(!(D.length>1)){if(this.somethingSelected()){if(!A.hint.supportsSelection)return;for(var I=0;I<D.length;I++)if(D[I].head.line!=D[I].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new d(this,A);!B.options.hint||(l.signal(this,"startCompletion",this),B.update(!0))}}),l.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(A,D){if(this.cm=A,this.options=D,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var I=this;A.on("cursorActivity",this.activityFunc=function(){I.cursorActivity()})}}var g=window.requestAnimationFrame||function(A){return setTimeout(A,1e3/60)},b=window.cancelAnimationFrame||clearTimeout;d.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&l.signal(this.data,"close"),this.widget&&this.widget.close(),l.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(A,D){var I=A.list[D],B=this;this.cm.operation(function(){I.hint?I.hint(B.cm,A,I):B.cm.replaceRange(w(I),I.from||A.from,I.to||A.to,"complete"),l.signal(A,"pick",I),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(b(this.debounce),this.debounce=0);var A=this.startPos;this.data&&(A=this.data.from);var D=this.cm.getCursor(),I=this.cm.getLine(D.line);if(D.line!=this.startPos.line||I.length-D.ch!=this.startLen-this.startPos.ch||D.ch<A.ch||this.cm.somethingSelected()||!D.ch||this.options.closeCharacters.test(I.charAt(D.ch-1)))this.close();else{var B=this;this.debounce=g(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(A){if(this.tick!=null){var D=this,I=++this.tick;H(this.options.hint,this.cm,this.options,function(B){D.tick==I&&D.finishUpdate(B,A)})}},finishUpdate:function(A,D){this.data&&l.signal(this.data,"update");var I=this.widget&&this.widget.picked||D&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=A,A&&A.list.length&&(I&&A.list.length==1?this.pick(A,0):(this.widget=new O(this,A),l.signal(A,"shown")))}};function y(A,D,I){var B=A.options.hintOptions,oe={};for(var pe in V)oe[pe]=V[pe];if(B)for(var pe in B)B[pe]!==void 0&&(oe[pe]=B[pe]);if(I)for(var pe in I)I[pe]!==void 0&&(oe[pe]=I[pe]);return oe.hint.resolve&&(oe.hint=oe.hint.resolve(A,D)),oe}function w(A){return typeof A=="string"?A:A.text}function S(A,D){var I={Up:function(){D.moveFocus(-1)},Down:function(){D.moveFocus(1)},PageUp:function(){D.moveFocus(-D.menuSize()+1,!0)},PageDown:function(){D.moveFocus(D.menuSize()-1,!0)},Home:function(){D.setFocus(0)},End:function(){D.setFocus(D.length-1)},Enter:D.pick,Tab:D.pick,Esc:D.close},B=/Mac/.test(navigator.platform);B&&(I["Ctrl-P"]=function(){D.moveFocus(-1)},I["Ctrl-N"]=function(){D.moveFocus(1)});var oe=A.options.customKeys,pe=oe?{}:I;function ye(be,de){var Ee;typeof de!="string"?Ee=function(j){return de(j,D)}:I.hasOwnProperty(de)?Ee=I[de]:Ee=de,pe[be]=Ee}if(oe)for(var We in oe)oe.hasOwnProperty(We)&&ye(We,oe[We]);var Ne=A.options.extraKeys;if(Ne)for(var We in Ne)Ne.hasOwnProperty(We)&&ye(We,Ne[We]);return pe}function T(A,D){for(;D&&D!=A;){if(D.nodeName.toUpperCase()==="LI"&&D.parentNode==A)return D;D=D.parentNode}}function O(A,D){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=A,this.data=D,this.picked=!1;var I=this,B=A.cm,oe=B.getInputField().ownerDocument,pe=oe.defaultView||oe.parentWindow,ye=this.hints=oe.createElement("ul");ye.setAttribute("role","listbox"),ye.setAttribute("aria-expanded","true"),ye.id=this.id;var We=A.cm.options.theme;ye.className="CodeMirror-hints "+We,this.selectedHint=D.selectedHint||0;for(var Ne=D.list,be=0;be<Ne.length;++be){var de=ye.appendChild(oe.createElement("li")),Ee=Ne[be],j=u+(be!=this.selectedHint?"":" "+f);Ee.className!=null&&(j=Ee.className+" "+j),de.className=j,be==this.selectedHint&&de.setAttribute("aria-selected","true"),de.id=this.id+"-"+be,de.setAttribute("role","option"),Ee.render?Ee.render(de,D,Ee):de.appendChild(oe.createTextNode(Ee.displayText||w(Ee))),de.hintId=be}var $=A.options.container||oe.body,x=B.cursorCoords(A.options.alignWithWord?D.from:null),ee=x.left,Y=x.bottom,ae=!0,Re=0,Ge=0;if($!==oe.body){var nt=["absolute","relative","fixed"].indexOf(pe.getComputedStyle($).position)!==-1,lt=nt?$:$.offsetParent,Ie=lt.getBoundingClientRect(),Qe=oe.body.getBoundingClientRect();Re=Ie.left-Qe.left-lt.scrollLeft,Ge=Ie.top-Qe.top-lt.scrollTop}ye.style.left=ee-Re+"px",ye.style.top=Y-Ge+"px";var q=pe.innerWidth||Math.max(oe.body.offsetWidth,oe.documentElement.offsetWidth),Z=pe.innerHeight||Math.max(oe.body.offsetHeight,oe.documentElement.offsetHeight);$.appendChild(ye),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var K=A.options.moveOnOverlap?ye.getBoundingClientRect():new DOMRect,se=A.options.paddingForScrollbar?ye.scrollHeight>ye.clientHeight+1:!1,Ce;setTimeout(function(){Ce=B.getScrollInfo()});var Se=K.bottom-Z;if(Se>0){var ge=K.bottom-K.top,Te=x.top-(x.bottom-K.top);if(Te-ge>0)ye.style.top=(Y=x.top-ge-Ge)+"px",ae=!1;else if(ge>Z){ye.style.height=Z-5+"px",ye.style.top=(Y=x.bottom-K.top-Ge)+"px";var L=B.getCursor();D.from.ch!=L.ch&&(x=B.cursorCoords(L),ye.style.left=(ee=x.left-Re)+"px",K=ye.getBoundingClientRect())}}var N=K.right-q;if(se&&(N+=B.display.nativeBarWidth),N>0&&(K.right-K.left>q&&(ye.style.width=q-5+"px",N-=K.right-K.left-q),ye.style.left=(ee=x.left-N-Re)+"px"),se)for(var F=ye.firstChild;F;F=F.nextSibling)F.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=S(A,{moveFocus:function(ne,fe){I.changeActive(I.selectedHint+ne,fe)},setFocus:function(ne){I.changeActive(ne)},menuSize:function(){return I.screenAmount()},length:Ne.length,close:function(){A.close()},pick:function(){I.pick()},data:D})),A.options.closeOnUnfocus){var G;B.on("blur",this.onBlur=function(){G=setTimeout(function(){A.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(G)})}B.on("scroll",this.onScroll=function(){var ne=B.getScrollInfo(),fe=B.getWrapperElement().getBoundingClientRect();Ce||(Ce=B.getScrollInfo());var ce=Y+Ce.top-ne.top,te=ce-(pe.pageYOffset||(oe.documentElement||oe.body).scrollTop);if(ae||(te+=ye.offsetHeight),te<=fe.top||te>=fe.bottom)return A.close();ye.style.top=ce+"px",ye.style.left=ee+Ce.left-ne.left+"px"}),l.on(ye,"dblclick",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),I.pick())}),l.on(ye,"click",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),A.options.completeOnSingleClick&&I.pick())}),l.on(ye,"mousedown",function(){setTimeout(function(){B.focus()},20)});var J=this.getSelectedHintRange();return(J.from!==0||J.to!==0)&&this.scrollToActive(),l.signal(D,"select",Ne[this.selectedHint],ye.childNodes[this.selectedHint]),!0}O.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var A=this.completion.cm.getInputField();A.removeAttribute("aria-activedescendant"),A.removeAttribute("aria-owns");var D=this.completion.cm;this.completion.options.closeOnUnfocus&&(D.off("blur",this.onBlur),D.off("focus",this.onFocus)),D.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var A=this;this.keyMap={Enter:function(){A.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(A,D){if(A>=this.data.list.length?A=D?this.data.list.length-1:0:A<0&&(A=D?0:this.data.list.length-1),this.selectedHint!=A){var I=this.hints.childNodes[this.selectedHint];I&&(I.className=I.className.replace(" "+f,""),I.removeAttribute("aria-selected")),I=this.hints.childNodes[this.selectedHint=A],I.className+=" "+f,I.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",I.id),this.scrollToActive(),l.signal(this.data,"select",this.data.list[this.selectedHint],I)}},scrollToActive:function(){var A=this.getSelectedHintRange(),D=this.hints.childNodes[A.from],I=this.hints.childNodes[A.to],B=this.hints.firstChild;D.offsetTop<this.hints.scrollTop?this.hints.scrollTop=D.offsetTop-B.offsetTop:I.offsetTop+I.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=I.offsetTop+I.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var A=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-A),to:Math.min(this.data.list.length-1,this.selectedHint+A)}}};function M(A,D){if(!A.somethingSelected())return D;for(var I=[],B=0;B<D.length;B++)D[B].supportsSelection&&I.push(D[B]);return I}function H(A,D,I,B){if(A.async)A(D,B,I);else{var oe=A(D,I);oe&&oe.then?oe.then(B):B(oe)}}function re(A,D){var I=A.getHelpers(D,"hint"),B;if(I.length){var oe=function(pe,ye,We){var Ne=M(pe,I);function be(de){if(de==Ne.length)return ye(null);H(Ne[de],pe,We,function(Ee){Ee&&Ee.list.length>0?ye(Ee):be(de+1)})}be(0)};return oe.async=!0,oe.supportsSelection=!0,oe}else return(B=A.getHelper(A.getCursor(),"hintWords"))?function(pe){return l.hint.fromList(pe,{words:B})}:l.hint.anyword?function(pe,ye){return l.hint.anyword(pe,ye)}:function(){}}l.registerHelper("hint","auto",{resolve:re}),l.registerHelper("hint","fromList",function(A,D){var I=A.getCursor(),B=A.getTokenAt(I),oe,pe=l.Pos(I.line,B.start),ye=I;B.start<I.ch&&/\w/.test(B.string.charAt(I.ch-B.start-1))?oe=B.string.substr(0,I.ch-B.start):(oe="",pe=I);for(var We=[],Ne=0;Ne<D.words.length;Ne++){var be=D.words[Ne];be.slice(0,oe.length)==oe&&We.push(be)}if(We.length)return{list:We,from:pe,to:ye}}),l.commands.autocomplete=l.showHint;var V={hint:l.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};l.defineOption("hintOptions",null)})})();function r0(r,s,l={}){const u=e0.fromTextArea(r.value,Hl({theme:"vars"},Ae(l)));It(l,d=>Object.entries(d).forEach(([g,b])=>u.setOption(g,b)));let f=!1;return u.on("change",()=>{if(f){f=!1;return}s.value=u.getValue()}),It(s,d=>{if(d!==u.getValue()){f=!0;const g=u.listSelections();u.replaceRange(d,u.posFromIndex(0),u.posFromIndex(1/0)),u.setSelections(g)}},{immediate:!0}),u}const n0={relative:"","font-mono":"","text-sm":""},i0=Dr({name:"CodeMirror",props:{modelValue:null,mode:null,readOnly:{type:Boolean},matched:null,getHint:null},emits:["update:modelValue"],setup(r,{emit:s}){const l=r,u={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=At(),d=Gy(l,"modelValue",s,{passive:!0}),g=ct(()=>u[l.mode||""]||l.mode),b=ct(()=>l.getHint?{"Ctrl-Space":"autocomplete","Ctrl-.":"autocomplete","Cmd-Space":"autocomplete","Cmd-.":"autocomplete",Tab:"autocomplete"}:{}),y=ct(()=>l.getHint?{hint:l.getHint}:{});return Oa(async()=>{const w=r0(f,d,_i(Uf(Hl({},mv(l)),{mode:g,hintOptions:y,extraKeys:b})));w.setSize("100%","100%"),l.getHint&&w.on("keyup",(H,re)=>{re.key.match(/^[\w:-]$/)&&H.execCommand("autocomplete")}),setTimeout(()=>w.refresh(),100);const S=[];function T(H,re){S.push(w.markText(w.posFromIndex(H),w.posFromIndex(re),{className:"highlighted"}))}function O(){S.forEach(H=>H.clear()),Qy(l.modelValue,Array.from(l.matched||[])).forEach(H=>T(H[0],H[1]))}let M=0;It(()=>[l.modelValue,l.matched],async()=>{clearTimeout(M),l.matched&&(M=setTimeout(O,200))},{immediate:!0})}),(w,S)=>(gt(),Bt("div",n0,[Fe("textarea",{ref_key:"el",ref:f},null,512)]))}});var th=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const o0={},s0={"bg-gray4:10":"","p-5":"",b:"b main",text:"sm gray5 dark:gray3"};function l0(r,s){return gt(),Bt("div",s0,[Ed(r.$slots,"default")])}var a0=th(o0,[["render",l0]]);const u0="/@vite/client",rh=bo(),nh=bo(),f0=rh.on,ih=nh.on;pa(()=>import(u0),[]).then(r=>{const s=r.createHotContext("/");s.on("vite:beforeUpdate",l=>{l.updates.forEach(u=>{rh.trigger(u)})}),s.on("unocss:config-changed",()=>{nh.trigger()})}).catch(r=>{console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates"),console.error(r)});const qs="/__unocss_api",oh=Ks(qs).json(),Ia=Ks(`${qs}/overview`,{immediate:!1}).json(),Mt=oh.data,gs=Ia.data;ih(()=>{oh.execute(),Ia.execute()});function Aw(r){const s=Ks(ct(()=>`${qs}/module?id=${encodeURIComponent(Ae(r))}`),{refetch:!0}).json();return ih(()=>s.execute()),f0(l=>{var u;(l.path===Ae(r)||l.path===Ae(r).slice(((u=Mt.value)==null?void 0:u.root.length)||0))&&setTimeout(()=>{s.execute()},50)}),s}function Nw(r){const s=ty(r,500);return Ks(ct(()=>`${qs}/repl?token=${encodeURIComponent(s.value)}`),{refetch:!0}).json()}const vs=ct(()=>{if(!Mt.value)return{workspace:{children:{},items:[]},root:{children:{},items:[]}};const r=Mt.value.modules.map(u=>({full:u,path:u})),s=r.filter(u=>u.full.startsWith(Mt.value.root)),l=r.filter(u=>!u.full.startsWith(Mt.value.root));return s.forEach(u=>u.path=u.path.slice(Mt.value.root.length+1)),{workspace:Ec(s,"Project Root"),root:Ec(l,"Disk Root")}});function Ec(r,s){const l={name:s,children:{},items:[]};function u(f,d,g=l){if(d.length<=1){g.items.push(f);return}const b=d.shift();g.children[b]||(g.children[b]={name:b,children:{},items:[]}),u(f,d,g.children[b])}return r.forEach(f=>{const d=f.path.split(/\//g).filter(Boolean);u(f,d)}),l}const c0={key:0,"ws-wrap":""},d0=Fe("span",{op80:""},".",-1),h0={key:1},p0=Dr({name:"ModuleId",props:{id:null},setup(r){return(s,l)=>r.id&&Ae(Mt)?(gt(),Bt("span",c0,[r.id.startsWith(Ae(Mt).root)?(gt(),Bt(nr,{key:0},[d0,Fe("span",null,rr(r.id.slice(Ae(Mt).root.length)),1)],64)):(gt(),Bt("span",h0,rr(r.id),1))])):Ps("",!0)}}),g0=(r,s)=>{const l=At(null);return Wy(r,()=>{var f;const u=(f=Fa(r))==null?void 0:f.clientHeight;l.value=u?`--${s}: calc(100vh - ${u}px - 2px);`:null}),l},v0={"h-full":""},m0={p:"x4 y2",grid:"~ cols-4 gap-4"},y0=Fe("div",{op80:""}," Presets ",-1),b0={op50:"","ws-pre":""},w0={overflow:"auto"},x0=Fe("div",{op80:""}," Rules ",-1),k0=Fe("span",{op50:""},"dynamic",-1),S0=Fe("br",null,null,-1),C0=Fe("span",{op50:""},"static",-1),_0=Fe("div",{op80:""}," Variants ",-1),T0=Fe("div",{op80:""}," Shortcuts ",-1),L0={key:0},P0=Fe("div",{op80:""}," Config File ",-1),O0=Fe("div",{op80:""}," Version ",-1),M0={op50:"","ws-pre":""},E0={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},A0=Fe("div",{op80:""}," Included Files ",-1),N0=Fe("div",{op80:""}," CSS Size ",-1),z0=Fe("span",{op50:""},"gzipped",-1),R0=Fe("div",{op80:""}," Matched Rules ",-1),D0=Fe("div",{op80:""}," Layers ",-1),F0={op50:"","ws-pre":""},I0=Dr({name:"Overview",setup(r){const s=At(null),l=g0(s,"overview-scrolls");return Ia.execute(),(u,f)=>{var y;const d=p0,g=a0,b=i0;return gt(),Bt("div",v0,[ot(g,{ref_key:"status",ref:s,p0:""},{default:vn(()=>{var w,S,T,O,M,H,re,V,A,D,I,B,oe,pe,ye,We,Ne,be;return[Fe("div",m0,[Fe("div",null,[y0,Fe("div",b0,rr((T=(S=(w=Ae(Mt))==null?void 0:w.config)==null?void 0:S.presets)==null?void 0:T.map(de=>de.name).join(`
25
- `)),1)]),Fe("div",w0,[x0,Nr(" "+rr((H=(M=(O=Ae(Mt))==null?void 0:O.config)==null?void 0:M.rulesDynamic)==null?void 0:H.filter(Boolean).length)+" ",1),k0,S0,Nr(" "+rr(Object.keys(((V=(re=Ae(Mt))==null?void 0:re.config)==null?void 0:V.rulesStaticMap)||{}).length)+" ",1),C0]),Fe("div",null,[_0,Nr(" "+rr((I=(D=(A=Ae(Mt))==null?void 0:A.config)==null?void 0:D.variants)==null?void 0:I.length),1)]),Fe("div",null,[T0,Nr(" "+rr((B=Ae(Mt))==null?void 0:B.config.shortcuts.length),1)]),(oe=Ae(Mt))!=null&&oe.configPath?(gt(),Bt("div",L0,[P0,ot(d,{id:Ae(Mt).configPath},null,8,["id"])])):Ps("",!0),Fe("div",null,[O0,Fe("div",M0,rr((pe=Ae(Mt))==null?void 0:pe.version),1)])]),Fe("div",E0,[Fe("div",null,[A0,Nr(" "+rr((ye=Ae(Mt))==null?void 0:ye.modules.length),1)]),Fe("div",null,[N0,Nr(" "+rr(((((We=Ae(gs))==null?void 0:We.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),z0]),Fe("div",null,[R0,Nr(" "+rr((Ne=Ae(gs))==null?void 0:Ne.matched.length),1)]),Fe("div",null,[D0,Fe("div",F0,rr((be=Ae(gs))==null?void 0:be.layers.join(`
26
- `)),1)])])]}),_:1},512),ot(b,{"model-value":((y=Ae(gs))==null?void 0:y.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:Oo(Ae(l))},null,8,["model-value","style"])])}}}),H0={};function W0(r,s){const l=I0;return gt(),mi(l)}var B0=th(H0,[["render",W0]]);const j0=()=>pa(()=>import("./repl.2f791a91.js"),[]),U0=()=>pa(()=>import("./_id_.025431c2.js"),[]),K0=[{name:"index",path:"/",component:B0,props:!0},{name:"repl",path:"/repl",component:j0,props:!0},{name:"module-id",path:"/module/:id",component:U0,props:!0}];/*!
27
- * vue-router v4.0.15
28
- * (c) 2022 Eduardo San Martin Morote
29
- * @license MIT
30
- */const sh=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Ti=r=>sh?Symbol(r):"_vr_"+r,q0=Ti("rvlm"),Ac=Ti("rvd"),Ha=Ti("r"),Wa=Ti("rl"),ca=Ti("rvl"),ci=typeof window!="undefined";function $0(r){return r.__esModule||sh&&r[Symbol.toStringTag]==="Module"}const it=Object.assign;function $l(r,s){const l={};for(const u in s){const f=s[u];l[u]=Array.isArray(f)?f.map(r):r(f)}return l}const wo=()=>{},G0=/\/$/,Y0=r=>r.replace(G0,"");function Gl(r,s,l="/"){let u,f={},d="",g="";const b=s.indexOf("?"),y=s.indexOf("#",b>-1?b:0);return b>-1&&(u=s.slice(0,b),d=s.slice(b+1,y>-1?y:s.length),f=r(d)),y>-1&&(u=u||s.slice(0,y),g=s.slice(y,s.length)),u=Q0(u!=null?u:s,l),{fullPath:u+(d&&"?")+d+g,path:u,query:f,hash:g}}function X0(r,s){const l=s.query?r(s.query):"";return s.path+(l&&"?")+l+(s.hash||"")}function Nc(r,s){return!s||!r.toLowerCase().startsWith(s.toLowerCase())?r:r.slice(s.length)||"/"}function Z0(r,s,l){const u=s.matched.length-1,f=l.matched.length-1;return u>-1&&u===f&&wi(s.matched[u],l.matched[f])&&lh(s.params,l.params)&&r(s.query)===r(l.query)&&s.hash===l.hash}function wi(r,s){return(r.aliasOf||r)===(s.aliasOf||s)}function lh(r,s){if(Object.keys(r).length!==Object.keys(s).length)return!1;for(const l in r)if(!J0(r[l],s[l]))return!1;return!0}function J0(r,s){return Array.isArray(r)?zc(r,s):Array.isArray(s)?zc(s,r):r===s}function zc(r,s){return Array.isArray(s)?r.length===s.length&&r.every((l,u)=>l===s[u]):r.length===1&&r[0]===s}function Q0(r,s){if(r.startsWith("/"))return r;if(!r)return s;const l=s.split("/"),u=r.split("/");let f=l.length-1,d,g;for(d=0;d<u.length;d++)if(g=u[d],!(f===1||g==="."))if(g==="..")f--;else break;return l.slice(0,f).join("/")+"/"+u.slice(d-(d===u.length?1:0)).join("/")}var Po;(function(r){r.pop="pop",r.push="push"})(Po||(Po={}));var xo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(xo||(xo={}));function V0(r){if(!r)if(ci){const s=document.querySelector("base");r=s&&s.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),Y0(r)}const eb=/^[^#]+#/;function tb(r,s){return r.replace(eb,"#")+s}function rb(r,s){const l=document.documentElement.getBoundingClientRect(),u=r.getBoundingClientRect();return{behavior:s.behavior,left:u.left-l.left-(s.left||0),top:u.top-l.top-(s.top||0)}}const $s=()=>({left:window.pageXOffset,top:window.pageYOffset});function nb(r){let s;if("el"in r){const l=r.el,u=typeof l=="string"&&l.startsWith("#"),f=typeof l=="string"?u?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!f)return;s=rb(f,r)}else s=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(s):window.scrollTo(s.left!=null?s.left:window.pageXOffset,s.top!=null?s.top:window.pageYOffset)}function Rc(r,s){return(history.state?history.state.position-s:-1)+r}const da=new Map;function ib(r,s){da.set(r,s)}function ob(r){const s=da.get(r);return da.delete(r),s}let sb=()=>location.protocol+"//"+location.host;function ah(r,s){const{pathname:l,search:u,hash:f}=s,d=r.indexOf("#");if(d>-1){let b=f.includes(r.slice(d))?r.slice(d).length:1,y=f.slice(b);return y[0]!=="/"&&(y="/"+y),Nc(y,"")}return Nc(l,r)+u+f}function lb(r,s,l,u){let f=[],d=[],g=null;const b=({state:O})=>{const M=ah(r,location),H=l.value,re=s.value;let V=0;if(O){if(l.value=M,s.value=O,g&&g===H){g=null;return}V=re?O.position-re.position:0}else u(M);f.forEach(A=>{A(l.value,H,{delta:V,type:Po.pop,direction:V?V>0?xo.forward:xo.back:xo.unknown})})};function y(){g=l.value}function w(O){f.push(O);const M=()=>{const H=f.indexOf(O);H>-1&&f.splice(H,1)};return d.push(M),M}function S(){const{history:O}=window;!O.state||O.replaceState(it({},O.state,{scroll:$s()}),"")}function T(){for(const O of d)O();d=[],window.removeEventListener("popstate",b),window.removeEventListener("beforeunload",S)}return window.addEventListener("popstate",b),window.addEventListener("beforeunload",S),{pauseListeners:y,listen:w,destroy:T}}function Dc(r,s,l,u=!1,f=!1){return{back:r,current:s,forward:l,replaced:u,position:window.history.length,scroll:f?$s():null}}function ab(r){const{history:s,location:l}=window,u={value:ah(r,l)},f={value:s.state};f.value||d(u.value,{back:null,current:u.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function d(y,w,S){const T=r.indexOf("#"),O=T>-1?(l.host&&document.querySelector("base")?r:r.slice(T))+y:sb()+r+y;try{s[S?"replaceState":"pushState"](w,"",O),f.value=w}catch(M){console.error(M),l[S?"replace":"assign"](O)}}function g(y,w){const S=it({},s.state,Dc(f.value.back,y,f.value.forward,!0),w,{position:f.value.position});d(y,S,!0),u.value=y}function b(y,w){const S=it({},f.value,s.state,{forward:y,scroll:$s()});d(S.current,S,!0);const T=it({},Dc(u.value,y,null),{position:S.position+1},w);d(y,T,!1),u.value=y}return{location:u,state:f,push:b,replace:g}}function ub(r){r=V0(r);const s=ab(r),l=lb(r,s.state,s.location,s.replace);function u(d,g=!0){g||l.pauseListeners(),history.go(d)}const f=it({location:"",base:r,go:u,createHref:tb.bind(null,r)},s,l);return Object.defineProperty(f,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(f,"state",{enumerable:!0,get:()=>s.state.value}),f}function fb(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),ub(r)}function cb(r){return typeof r=="string"||r&&typeof r=="object"}function uh(r){return typeof r=="string"||typeof r=="symbol"}const un={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},fh=Ti("nf");var Fc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(Fc||(Fc={}));function xi(r,s){return it(new Error,{type:r,[fh]:!0},s)}function fn(r,s){return r instanceof Error&&fh in r&&(s==null||!!(r.type&s))}const Ic="[^/]+?",db={sensitive:!1,strict:!1,start:!0,end:!0},hb=/[.+*?^${}()[\]/\\]/g;function pb(r,s){const l=it({},db,s),u=[];let f=l.start?"^":"";const d=[];for(const w of r){const S=w.length?[]:[90];l.strict&&!w.length&&(f+="/");for(let T=0;T<w.length;T++){const O=w[T];let M=40+(l.sensitive?.25:0);if(O.type===0)T||(f+="/"),f+=O.value.replace(hb,"\\$&"),M+=40;else if(O.type===1){const{value:H,repeatable:re,optional:V,regexp:A}=O;d.push({name:H,repeatable:re,optional:V});const D=A||Ic;if(D!==Ic){M+=10;try{new RegExp(`(${D})`)}catch(B){throw new Error(`Invalid custom RegExp for param "${H}" (${D}): `+B.message)}}let I=re?`((?:${D})(?:/(?:${D}))*)`:`(${D})`;T||(I=V&&w.length<2?`(?:/${I})`:"/"+I),V&&(I+="?"),f+=I,M+=20,V&&(M+=-8),re&&(M+=-20),D===".*"&&(M+=-50)}S.push(M)}u.push(S)}if(l.strict&&l.end){const w=u.length-1;u[w][u[w].length-1]+=.7000000000000001}l.strict||(f+="/?"),l.end?f+="$":l.strict&&(f+="(?:/|$)");const g=new RegExp(f,l.sensitive?"":"i");function b(w){const S=w.match(g),T={};if(!S)return null;for(let O=1;O<S.length;O++){const M=S[O]||"",H=d[O-1];T[H.name]=M&&H.repeatable?M.split("/"):M}return T}function y(w){let S="",T=!1;for(const O of r){(!T||!S.endsWith("/"))&&(S+="/"),T=!1;for(const M of O)if(M.type===0)S+=M.value;else if(M.type===1){const{value:H,repeatable:re,optional:V}=M,A=H in w?w[H]:"";if(Array.isArray(A)&&!re)throw new Error(`Provided param "${H}" is an array but it is not repeatable (* or + modifiers)`);const D=Array.isArray(A)?A.join("/"):A;if(!D)if(V)O.length<2&&r.length>1&&(S.endsWith("/")?S=S.slice(0,-1):T=!0);else throw new Error(`Missing required param "${H}"`);S+=D}}return S}return{re:g,score:u,keys:d,parse:b,stringify:y}}function gb(r,s){let l=0;for(;l<r.length&&l<s.length;){const u=s[l]-r[l];if(u)return u;l++}return r.length<s.length?r.length===1&&r[0]===40+40?-1:1:r.length>s.length?s.length===1&&s[0]===40+40?1:-1:0}function vb(r,s){let l=0;const u=r.score,f=s.score;for(;l<u.length&&l<f.length;){const d=gb(u[l],f[l]);if(d)return d;l++}return f.length-u.length}const mb={type:0,value:""},yb=/[a-zA-Z0-9_]/;function bb(r){if(!r)return[[]];if(r==="/")return[[mb]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function s(M){throw new Error(`ERR (${l})/"${w}": ${M}`)}let l=0,u=l;const f=[];let d;function g(){d&&f.push(d),d=[]}let b=0,y,w="",S="";function T(){!w||(l===0?d.push({type:0,value:w}):l===1||l===2||l===3?(d.length>1&&(y==="*"||y==="+")&&s(`A repeatable param (${w}) must be alone in its segment. eg: '/:ids+.`),d.push({type:1,value:w,regexp:S,repeatable:y==="*"||y==="+",optional:y==="*"||y==="?"})):s("Invalid state to consume buffer"),w="")}function O(){w+=y}for(;b<r.length;){if(y=r[b++],y==="\\"&&l!==2){u=l,l=4;continue}switch(l){case 0:y==="/"?(w&&T(),g()):y===":"?(T(),l=1):O();break;case 4:O(),l=u;break;case 1:y==="("?l=2:yb.test(y)?O():(T(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--);break;case 2:y===")"?S[S.length-1]=="\\"?S=S.slice(0,-1)+y:l=3:S+=y;break;case 3:T(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--,S="";break;default:s("Unknown state");break}}return l===2&&s(`Unfinished custom RegExp for param "${w}"`),T(),g(),f}function wb(r,s,l){const u=pb(bb(r.path),l),f=it(u,{record:r,parent:s,children:[],alias:[]});return s&&!f.record.aliasOf==!s.record.aliasOf&&s.children.push(f),f}function xb(r,s){const l=[],u=new Map;s=Wc({strict:!1,end:!0,sensitive:!1},s);function f(S){return u.get(S)}function d(S,T,O){const M=!O,H=Sb(S);H.aliasOf=O&&O.record;const re=Wc(s,S),V=[H];if("alias"in S){const I=typeof S.alias=="string"?[S.alias]:S.alias;for(const B of I)V.push(it({},H,{components:O?O.record.components:H.components,path:B,aliasOf:O?O.record:H}))}let A,D;for(const I of V){const{path:B}=I;if(T&&B[0]!=="/"){const oe=T.record.path,pe=oe[oe.length-1]==="/"?"":"/";I.path=T.record.path+(B&&pe+B)}if(A=wb(I,T,re),O?O.alias.push(A):(D=D||A,D!==A&&D.alias.push(A),M&&S.name&&!Hc(A)&&g(S.name)),"children"in H){const oe=H.children;for(let pe=0;pe<oe.length;pe++)d(oe[pe],A,O&&O.children[pe])}O=O||A,y(A)}return D?()=>{g(D)}:wo}function g(S){if(uh(S)){const T=u.get(S);T&&(u.delete(S),l.splice(l.indexOf(T),1),T.children.forEach(g),T.alias.forEach(g))}else{const T=l.indexOf(S);T>-1&&(l.splice(T,1),S.record.name&&u.delete(S.record.name),S.children.forEach(g),S.alias.forEach(g))}}function b(){return l}function y(S){let T=0;for(;T<l.length&&vb(S,l[T])>=0&&(S.record.path!==l[T].record.path||!ch(S,l[T]));)T++;l.splice(T,0,S),S.record.name&&!Hc(S)&&u.set(S.record.name,S)}function w(S,T){let O,M={},H,re;if("name"in S&&S.name){if(O=u.get(S.name),!O)throw xi(1,{location:S});re=O.record.name,M=it(kb(T.params,O.keys.filter(D=>!D.optional).map(D=>D.name)),S.params),H=O.stringify(M)}else if("path"in S)H=S.path,O=l.find(D=>D.re.test(H)),O&&(M=O.parse(H),re=O.record.name);else{if(O=T.name?u.get(T.name):l.find(D=>D.re.test(T.path)),!O)throw xi(1,{location:S,currentLocation:T});re=O.record.name,M=it({},T.params,S.params),H=O.stringify(M)}const V=[];let A=O;for(;A;)V.unshift(A.record),A=A.parent;return{name:re,path:H,params:M,matched:V,meta:_b(V)}}return r.forEach(S=>d(S)),{addRoute:d,resolve:w,removeRoute:g,getRoutes:b,getRecordMatcher:f}}function kb(r,s){const l={};for(const u of s)u in r&&(l[u]=r[u]);return l}function Sb(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:Cb(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||{}:{default:r.component}}}function Cb(r){const s={},l=r.props||!1;if("component"in r)s.default=l;else for(const u in r.components)s[u]=typeof l=="boolean"?l:l[u];return s}function Hc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function _b(r){return r.reduce((s,l)=>it(s,l.meta),{})}function Wc(r,s){const l={};for(const u in r)l[u]=u in s?s[u]:r[u];return l}function ch(r,s){return s.children.some(l=>l===r||ch(r,l))}const dh=/#/g,Tb=/&/g,Lb=/\//g,Pb=/=/g,Ob=/\?/g,hh=/\+/g,Mb=/%5B/g,Eb=/%5D/g,ph=/%5E/g,Ab=/%60/g,gh=/%7B/g,Nb=/%7C/g,vh=/%7D/g,zb=/%20/g;function Ba(r){return encodeURI(""+r).replace(Nb,"|").replace(Mb,"[").replace(Eb,"]")}function Rb(r){return Ba(r).replace(gh,"{").replace(vh,"}").replace(ph,"^")}function ha(r){return Ba(r).replace(hh,"%2B").replace(zb,"+").replace(dh,"%23").replace(Tb,"%26").replace(Ab,"`").replace(gh,"{").replace(vh,"}").replace(ph,"^")}function Db(r){return ha(r).replace(Pb,"%3D")}function Fb(r){return Ba(r).replace(dh,"%23").replace(Ob,"%3F")}function Ib(r){return r==null?"":Fb(r).replace(Lb,"%2F")}function Ms(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Hb(r){const s={};if(r===""||r==="?")return s;const u=(r[0]==="?"?r.slice(1):r).split("&");for(let f=0;f<u.length;++f){const d=u[f].replace(hh," "),g=d.indexOf("="),b=Ms(g<0?d:d.slice(0,g)),y=g<0?null:Ms(d.slice(g+1));if(b in s){let w=s[b];Array.isArray(w)||(w=s[b]=[w]),w.push(y)}else s[b]=y}return s}function Bc(r){let s="";for(let l in r){const u=r[l];if(l=Db(l),u==null){u!==void 0&&(s+=(s.length?"&":"")+l);continue}(Array.isArray(u)?u.map(d=>d&&ha(d)):[u&&ha(u)]).forEach(d=>{d!==void 0&&(s+=(s.length?"&":"")+l,d!=null&&(s+="="+d))})}return s}function Wb(r){const s={};for(const l in r){const u=r[l];u!==void 0&&(s[l]=Array.isArray(u)?u.map(f=>f==null?null:""+f):u==null?u:""+u)}return s}function fo(){let r=[];function s(u){return r.push(u),()=>{const f=r.indexOf(u);f>-1&&r.splice(f,1)}}function l(){r=[]}return{add:s,list:()=>r,reset:l}}function hn(r,s,l,u,f){const d=u&&(u.enterCallbacks[f]=u.enterCallbacks[f]||[]);return()=>new Promise((g,b)=>{const y=T=>{T===!1?b(xi(4,{from:l,to:s})):T instanceof Error?b(T):cb(T)?b(xi(2,{from:s,to:T})):(d&&u.enterCallbacks[f]===d&&typeof T=="function"&&d.push(T),g())},w=r.call(u&&u.instances[f],s,l,y);let S=Promise.resolve(w);r.length<3&&(S=S.then(y)),S.catch(T=>b(T))})}function Yl(r,s,l,u){const f=[];for(const d of r)for(const g in d.components){let b=d.components[g];if(!(s!=="beforeRouteEnter"&&!d.instances[g]))if(Bb(b)){const w=(b.__vccOpts||b)[s];w&&f.push(hn(w,l,u,d,g))}else{let y=b();f.push(()=>y.then(w=>{if(!w)return Promise.reject(new Error(`Couldn't resolve component "${g}" at "${d.path}"`));const S=$0(w)?w.default:w;d.components[g]=S;const O=(S.__vccOpts||S)[s];return O&&hn(O,l,u,d,g)()}))}}return f}function Bb(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function jc(r){const s=$r(Ha),l=$r(Wa),u=ct(()=>s.resolve(Ae(r.to))),f=ct(()=>{const{matched:y}=u.value,{length:w}=y,S=y[w-1],T=l.matched;if(!S||!T.length)return-1;const O=T.findIndex(wi.bind(null,S));if(O>-1)return O;const M=Uc(y[w-2]);return w>1&&Uc(S)===M&&T[T.length-1].path!==M?T.findIndex(wi.bind(null,y[w-2])):O}),d=ct(()=>f.value>-1&&qb(l.params,u.value.params)),g=ct(()=>f.value>-1&&f.value===l.matched.length-1&&lh(l.params,u.value.params));function b(y={}){return Kb(y)?s[Ae(r.replace)?"replace":"push"](Ae(r.to)).catch(wo):Promise.resolve()}return{route:u,href:ct(()=>u.value.href),isActive:d,isExactActive:g,navigate:b}}const jb=Dr({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:jc,setup(r,{slots:s}){const l=_i(jc(r)),{options:u}=$r(Ha),f=ct(()=>({[Kc(r.activeClass,u.linkActiveClass,"router-link-active")]:l.isActive,[Kc(r.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const d=s.default&&s.default(l);return r.custom?d:Ra("a",{"aria-current":l.isExactActive?r.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:f.value},d)}}}),Ub=jb;function Kb(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const s=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(s))return}return r.preventDefault&&r.preventDefault(),!0}}function qb(r,s){for(const l in s){const u=s[l],f=r[l];if(typeof u=="string"){if(u!==f)return!1}else if(!Array.isArray(f)||f.length!==u.length||u.some((d,g)=>d!==f[g]))return!1}return!0}function Uc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const Kc=(r,s,l)=>r!=null?r:s!=null?s:l,$b=Dr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:s,slots:l}){const u=$r(ca),f=ct(()=>r.route||u.value),d=$r(Ac,0),g=ct(()=>f.value.matched[d]);ys(Ac,d+1),ys(q0,g),ys(ca,f);const b=At();return It(()=>[b.value,g.value,r.name],([y,w,S],[T,O,M])=>{w&&(w.instances[S]=y,O&&O!==w&&y&&y===T&&(w.leaveGuards.size||(w.leaveGuards=O.leaveGuards),w.updateGuards.size||(w.updateGuards=O.updateGuards))),y&&w&&(!O||!wi(w,O)||!T)&&(w.enterCallbacks[S]||[]).forEach(H=>H(y))},{flush:"post"}),()=>{const y=f.value,w=g.value,S=w&&w.components[r.name],T=r.name;if(!S)return qc(l.default,{Component:S,route:y});const O=w.props[r.name],M=O?O===!0?y.params:typeof O=="function"?O(y):O:null,re=Ra(S,it({},M,s,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(w.instances[T]=null)},ref:b}));return qc(l.default,{Component:re,route:y})||re}}});function qc(r,s){if(!r)return null;const l=r(s);return l.length===1?l[0]:l}const Gb=$b;function Yb(r){const s=xb(r.routes,r),l=r.parseQuery||Hb,u=r.stringifyQuery||Bc,f=r.history,d=fo(),g=fo(),b=fo(),y=po(un);let w=un;ci&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const S=$l.bind(null,q=>""+q),T=$l.bind(null,Ib),O=$l.bind(null,Ms);function M(q,Z){let K,se;return uh(q)?(K=s.getRecordMatcher(q),se=Z):se=q,s.addRoute(se,K)}function H(q){const Z=s.getRecordMatcher(q);Z&&s.removeRoute(Z)}function re(){return s.getRoutes().map(q=>q.record)}function V(q){return!!s.getRecordMatcher(q)}function A(q,Z){if(Z=it({},Z||y.value),typeof q=="string"){const Te=Gl(l,q,Z.path),L=s.resolve({path:Te.path},Z),N=f.createHref(Te.fullPath);return it(Te,L,{params:O(L.params),hash:Ms(Te.hash),redirectedFrom:void 0,href:N})}let K;if("path"in q)K=it({},q,{path:Gl(l,q.path,Z.path).path});else{const Te=it({},q.params);for(const L in Te)Te[L]==null&&delete Te[L];K=it({},q,{params:T(q.params)}),Z.params=T(Z.params)}const se=s.resolve(K,Z),Ce=q.hash||"";se.params=S(O(se.params));const Se=X0(u,it({},q,{hash:Rb(Ce),path:se.path})),ge=f.createHref(Se);return it({fullPath:Se,hash:Ce,query:u===Bc?Wb(q.query):q.query||{}},se,{redirectedFrom:void 0,href:ge})}function D(q){return typeof q=="string"?Gl(l,q,y.value.path):it({},q)}function I(q,Z){if(w!==q)return xi(8,{from:Z,to:q})}function B(q){return ye(q)}function oe(q){return B(it(D(q),{replace:!0}))}function pe(q){const Z=q.matched[q.matched.length-1];if(Z&&Z.redirect){const{redirect:K}=Z;let se=typeof K=="function"?K(q):K;return typeof se=="string"&&(se=se.includes("?")||se.includes("#")?se=D(se):{path:se},se.params={}),it({query:q.query,hash:q.hash,params:q.params},se)}}function ye(q,Z){const K=w=A(q),se=y.value,Ce=q.state,Se=q.force,ge=q.replace===!0,Te=pe(K);if(Te)return ye(it(D(Te),{state:Ce,force:Se,replace:ge}),Z||K);const L=K;L.redirectedFrom=Z;let N;return!Se&&Z0(u,se,K)&&(N=xi(16,{to:L,from:se}),Ge(se,se,!0,!1)),(N?Promise.resolve(N):Ne(L,se)).catch(F=>fn(F)?fn(F,2)?F:Re(F):Y(F,L,se)).then(F=>{if(F){if(fn(F,2))return ye(it(D(F.to),{state:Ce,force:Se,replace:ge}),Z||L)}else F=de(L,se,!0,ge,Ce);return be(L,se,F),F})}function We(q,Z){const K=I(q,Z);return K?Promise.reject(K):Promise.resolve()}function Ne(q,Z){let K;const[se,Ce,Se]=Xb(q,Z);K=Yl(se.reverse(),"beforeRouteLeave",q,Z);for(const Te of se)Te.leaveGuards.forEach(L=>{K.push(hn(L,q,Z))});const ge=We.bind(null,q,Z);return K.push(ge),ai(K).then(()=>{K=[];for(const Te of d.list())K.push(hn(Te,q,Z));return K.push(ge),ai(K)}).then(()=>{K=Yl(Ce,"beforeRouteUpdate",q,Z);for(const Te of Ce)Te.updateGuards.forEach(L=>{K.push(hn(L,q,Z))});return K.push(ge),ai(K)}).then(()=>{K=[];for(const Te of q.matched)if(Te.beforeEnter&&!Z.matched.includes(Te))if(Array.isArray(Te.beforeEnter))for(const L of Te.beforeEnter)K.push(hn(L,q,Z));else K.push(hn(Te.beforeEnter,q,Z));return K.push(ge),ai(K)}).then(()=>(q.matched.forEach(Te=>Te.enterCallbacks={}),K=Yl(Se,"beforeRouteEnter",q,Z),K.push(ge),ai(K))).then(()=>{K=[];for(const Te of g.list())K.push(hn(Te,q,Z));return K.push(ge),ai(K)}).catch(Te=>fn(Te,8)?Te:Promise.reject(Te))}function be(q,Z,K){for(const se of b.list())se(q,Z,K)}function de(q,Z,K,se,Ce){const Se=I(q,Z);if(Se)return Se;const ge=Z===un,Te=ci?history.state:{};K&&(se||ge?f.replace(q.fullPath,it({scroll:ge&&Te&&Te.scroll},Ce)):f.push(q.fullPath,Ce)),y.value=q,Ge(q,Z,K,ge),Re()}let Ee;function j(){Ee||(Ee=f.listen((q,Z,K)=>{const se=A(q),Ce=pe(se);if(Ce){ye(it(Ce,{replace:!0}),se).catch(wo);return}w=se;const Se=y.value;ci&&ib(Rc(Se.fullPath,K.delta),$s()),Ne(se,Se).catch(ge=>fn(ge,12)?ge:fn(ge,2)?(ye(ge.to,se).then(Te=>{fn(Te,20)&&!K.delta&&K.type===Po.pop&&f.go(-1,!1)}).catch(wo),Promise.reject()):(K.delta&&f.go(-K.delta,!1),Y(ge,se,Se))).then(ge=>{ge=ge||de(se,Se,!1),ge&&(K.delta?f.go(-K.delta,!1):K.type===Po.pop&&fn(ge,20)&&f.go(-1,!1)),be(se,Se,ge)}).catch(wo)}))}let $=fo(),x=fo(),ee;function Y(q,Z,K){Re(q);const se=x.list();return se.length?se.forEach(Ce=>Ce(q,Z,K)):console.error(q),Promise.reject(q)}function ae(){return ee&&y.value!==un?Promise.resolve():new Promise((q,Z)=>{$.add([q,Z])})}function Re(q){return ee||(ee=!q,j(),$.list().forEach(([Z,K])=>q?K(q):Z()),$.reset()),q}function Ge(q,Z,K,se){const{scrollBehavior:Ce}=r;if(!ci||!Ce)return Promise.resolve();const Se=!K&&ob(Rc(q.fullPath,0))||(se||!K)&&history.state&&history.state.scroll||null;return Is().then(()=>Ce(q,Z,Se)).then(ge=>ge&&nb(ge)).catch(ge=>Y(ge,q,Z))}const nt=q=>f.go(q);let lt;const Ie=new Set;return{currentRoute:y,addRoute:M,removeRoute:H,hasRoute:V,getRoutes:re,resolve:A,options:r,push:B,replace:oe,go:nt,back:()=>nt(-1),forward:()=>nt(1),beforeEach:d.add,beforeResolve:g.add,afterEach:b.add,onError:x.add,isReady:ae,install(q){const Z=this;q.component("RouterLink",Ub),q.component("RouterView",Gb),q.config.globalProperties.$router=Z,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>Ae(y)}),ci&&!lt&&y.value===un&&(lt=!0,B(f.location).catch(Ce=>{}));const K={};for(const Ce in un)K[Ce]=ct(()=>y.value[Ce]);q.provide(Ha,Z),q.provide(Wa,_i(K)),q.provide(ca,y);const se=q.unmount;Ie.add(q),q.unmount=function(){Ie.delete(q),Ie.size<1&&(w=un,Ee&&Ee(),Ee=null,y.value=un,lt=!1,ee=!1),se()}}}}function ai(r){return r.reduce((s,l)=>s.then(()=>l()),Promise.resolve())}function Xb(r,s){const l=[],u=[],f=[],d=Math.max(s.matched.length,r.matched.length);for(let g=0;g<d;g++){const b=s.matched[g];b&&(r.matched.find(w=>wi(w,b))?u.push(b):l.push(b));const y=r.matched[g];y&&(s.matched.find(w=>wi(w,y))||f.push(y))}return[l,u,f]}function Zb(){return $r(Wa)}const Jb=Dr({name:"FileIcon",props:{id:null},setup(r){const s=r,l=ct(()=>s.id.split(/\./g).pop()),u=ct(()=>{switch(l.value){case"vue":return"i-logos-vue";default:return"i-carbon-document-blank"}});return(f,d)=>(gt(),Bt("div",{class:vi(Ae(u))},null,2))}}),Qb={open:""},Vb={"cursor-default":"","select-none":"","text-sm":"",truncate:"",p:"y1"},ew={"ml-1":""},tw=Dr({name:"ModuleTreeNode",props:{node:null,icon:{default:"i-carbon-folder"}},setup(r){const s=Zb();return(l,u)=>{const f=Cs("ModuleTreeNode",!0),d=Jb,g=Cs("RouterLink");return gt(),Bt("details",Qb,[Fe("summary",Vb,[Fe("div",{class:vi(r.icon)},null,2),Nr(" "+rr(r.node.name),1)]),(gt(!0),Bt(nr,null,rc(Object.entries(r.node.children),b=>(gt(),mi(f,{key:b[0],ml2:"",node:b[1]},null,8,["node"]))),128)),(gt(!0),Bt(nr,null,rc(r.node.items,b=>(gt(),Bt("div",{key:b.full,ml4:"","ws-nowrap":""},[ot(g,{block:"","text-sm":"",p:"x2 y1",rounded:"",to:`/module/${encodeURIComponent(b.full)}`,class:vi({"bg-gray/10":b.full===Ae(s).params.id})},{default:vn(()=>[ot(d,{id:b.path},null,8,["id"]),Fe("span",ew,rr(b.path.split("/").pop()),1)]),_:2},1032,["to","class"])]))),128))])}}});var rw="/__unocss/icon.svg";const nw={p:"x4 y3",b:"b main",flex:"","children:my-auto":""},iw=Fe("div",{flex:"","flex-auto":"","children:my-auto":"","ws-nowrap":""},[Fe("img",{src:rw,filter:"","dark:invert":"","inline-block":"",h:"1.3em",m:"r-1.5"}),Fe("div",{"of-hidden":""},[Nr(" Inspector "),Fe("sup",{"text-teal5":"","bg-teal5:10":"",p:"x1.5 y0.5",rounded:"",italic:""},"beta")])],-1),ow=Dr({name:"NarBar",setup(r){const s=Dy(),l=sy(s);return(u,f)=>(gt(),Bt("nav",nw,[iw,Fe("button",{"text-lg":"","i-carbon-sun":"","dark:i-carbon-moon":"",onClick:f[0]||(f[0]=d=>Ae(l)())})]))}}),sw={"h-full":""},lw={b:"r main","of-hidden":""},aw={pt:"4",flex:"~ col gap-3"},uw=Fe("div",{"i-carbon-dashboard":""},null,-1),fw=Fe("span",null," Overview ",-1),cw=Fe("div",{"i-carbon-terminal":""},null,-1),dw=Fe("span",null," REPL ",-1),hw=Fe("div",{b:"b main"},null,-1),pw={b:"r main",class:"scrolls scrolls-sidebar"},gw=Dr({name:"Sidebar",setup(r){return(s,l)=>{const u=ow,f=Cs("RouterLink"),d=tw;return gt(),Bt("div",sw,[Fe("div",lw,[ot(u),Fe("div",aw,[ot(f,{block:"",to:"/","text-sm":"",m:"l-3.7"},{default:vn(()=>[uw,fw]),_:1}),ot(f,{block:"",to:"/repl","text-sm":"",m:"l-3.7"},{default:vn(()=>[cw,dw]),_:1}),hw])]),Fe("div",pw,[Object.keys(Ae(vs).workspace.children).length?(gt(),mi(d,{key:0,node:Ae(vs).workspace,p:"l3 t4",icon:"i-carbon-portfolio"},null,8,["node"])):Ps("",!0),Object.keys(Ae(vs).root.children).length?(gt(),mi(d,{key:1,node:Ae(vs).root,p:"l3 t4",icon:"i-carbon-vmdk-disk"},null,8,["node"])):Ps("",!0)])])}}});var vw=Object.defineProperty,mw=Object.defineProperties,yw=Object.getOwnPropertyDescriptors,Es=Object.getOwnPropertySymbols,mh=Object.prototype.hasOwnProperty,yh=Object.prototype.propertyIsEnumerable,$c=(r,s,l)=>s in r?vw(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,bw=(r,s)=>{for(var l in s||(s={}))mh.call(s,l)&&$c(r,l,s[l]);if(Es)for(var l of Es(s))yh.call(s,l)&&$c(r,l,s[l]);return r},ww=(r,s)=>mw(r,yw(s)),xw=(r,s)=>{var l={};for(var u in r)mh.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Es)for(var u of Es(r))s.indexOf(u)<0&&yh.call(r,u)&&(l[u]=r[u]);return l};const kw={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((r,s)=>(r[s.id]=s)&&r,{})}},methods:{updatePaneComponents(){this.panes.forEach(r=>{r.update&&r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(r,s){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=s},onMouseMove(r){this.touch.mouseDown&&(r.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(r)),this.$emit("resize",this.panes.map(s=>({min:s.min,max:s.max,size:s.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(r,s){"ontouchstart"in window&&(r.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===s?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(r,s),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=s,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[s])},onSplitterDblClick(r,s){let l=0;this.panes=this.panes.map((u,f)=>(u.size=f===s?u.max:u.min,f!==s&&(l+=u.min),u)),this.panes[s].size-=l,this.$emit("pane-maximize",this.panes[s])},onPaneClick(r,s){this.$emit("pane-click",this.indexedPanes[s])},getCurrentMouseDrag(r){const s=this.container.getBoundingClientRect(),{clientX:l,clientY:u}="ontouchstart"in window&&r.touches?r.touches[0]:r;return{x:l-s.left,y:u-s.top}},getCurrentDragPercentage(r){r=r[this.horizontal?"y":"x"];const s=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(r=s-r),r*100/s},calculatePanesSize(r){const s=this.touch.activeSplitter;let l={prevPanesSize:this.sumPrevPanesSize(s),nextPanesSize:this.sumNextPanesSize(s),prevReachedMinPanes:0,nextReachedMinPanes:0};const u=0+(this.pushOtherPanes?0:l.prevPanesSize),f=100-(this.pushOtherPanes?0:l.nextPanesSize),d=Math.max(Math.min(this.getCurrentDragPercentage(r),f),u);let g=[s,s+1],b=this.panes[g[0]]||null,y=this.panes[g[1]]||null;const w=b.max<100&&d>=b.max+l.prevPanesSize,S=y.max<100&&d<=100-(y.max+this.sumNextPanesSize(s+1));if(w||S){w?(b.size=b.max,y.size=Math.max(100-b.max-l.prevPanesSize-l.nextPanesSize,0)):(b.size=Math.max(100-y.max-l.prevPanesSize-this.sumNextPanesSize(s+1),0),y.size=y.max);return}if(this.pushOtherPanes){const T=this.doPushOtherPanes(l,d);if(!T)return;({sums:l,panesToResize:g}=T),b=this.panes[g[0]]||null,y=this.panes[g[1]]||null}b!==null&&(b.size=Math.min(Math.max(d-l.prevPanesSize-l.prevReachedMinPanes,b.min),b.max)),y!==null&&(y.size=Math.min(Math.max(100-d-l.nextPanesSize-l.nextReachedMinPanes,y.min),y.max))},doPushOtherPanes(r,s){const l=this.touch.activeSplitter,u=[l,l+1];return s<r.prevPanesSize+this.panes[u[0]].min&&(u[0]=this.findPrevExpandedPane(l).index,r.prevReachedMinPanes=0,u[0]<l&&this.panes.forEach((f,d)=>{d>u[0]&&d<=l&&(f.size=f.min,r.prevReachedMinPanes+=f.min)}),r.prevPanesSize=this.sumPrevPanesSize(u[0]),u[0]===void 0)?(r.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((f,d)=>{d>0&&d<=l&&(f.size=f.min,r.prevReachedMinPanes+=f.min)}),this.panes[u[1]].size=100-r.prevReachedMinPanes-this.panes[0].min-r.prevPanesSize-r.nextPanesSize,null):s>100-r.nextPanesSize-this.panes[u[1]].min&&(u[1]=this.findNextExpandedPane(l).index,r.nextReachedMinPanes=0,u[1]>l+1&&this.panes.forEach((f,d)=>{d>l&&d<u[1]&&(f.size=f.min,r.nextReachedMinPanes+=f.min)}),r.nextPanesSize=this.sumNextPanesSize(u[1]-1),u[1]===void 0)?(r.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((f,d)=>{d<this.panesCount-1&&d>=l+1&&(f.size=f.min,r.nextReachedMinPanes+=f.min)}),this.panes[u[0]].size=100-r.prevPanesSize-r.nextReachedMinPanes-this.panes[this.panesCount-1].min-r.nextPanesSize,null):{sums:r,panesToResize:u}},sumPrevPanesSize(r){return this.panes.reduce((s,l,u)=>s+(u<r?l.size:0),0)},sumNextPanesSize(r){return this.panes.reduce((s,l,u)=>s+(u>r+1?l.size:0),0)},findPrevExpandedPane(r){return[...this.panes].reverse().find(l=>l.index<r&&l.size>l.min)||{}},findNextExpandedPane(r){return this.panes.find(l=>l.index>r+1&&l.size>l.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(s=>{const l=s.classList.contains("splitpanes__pane"),u=s.classList.contains("splitpanes__splitter");if(!l&&!u){s.parentNode.removeChild(s),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter(r,s,l=!1){const u=r-1,f=document.createElement("div");f.classList.add("splitpanes__splitter"),l||(f.onmousedown=d=>this.onMouseDown(d,u),typeof window!="undefined"&&"ontouchstart"in window&&(f.ontouchstart=d=>this.onMouseDown(d,u)),f.onclick=d=>this.onSplitterClick(d,u+1)),this.dblClickSplitter&&(f.ondblclick=d=>this.onSplitterDblClick(d,u+1)),s.parentNode.insertBefore(f,s)},removeSplitter(r){r.onmousedown=void 0,r.onclick=void 0,r.ondblclick=void 0,r.parentNode.removeChild(r)},redoSplitters(){const r=Array.from(this.container.children);r.forEach(l=>{l.className.includes("splitpanes__splitter")&&this.removeSplitter(l)});let s=0;r.forEach(l=>{l.className.includes("splitpanes__pane")&&(!s&&this.firstSplitter?this.addSplitter(s,l,!0):s&&this.addSplitter(s,l),s++)})},requestUpdate(r){var s=r,{target:l}=s,u=xw(s,["target"]);const f=this.indexedPanes[l._.uid];Object.entries(u).forEach(([d,g])=>f[d]=g)},onPaneAdd(r){let s=-1;Array.from(r.$el.parentNode.children).some(f=>(f.className.includes("splitpanes__pane")&&s++,f===r.$el));const l=parseFloat(r.minSize),u=parseFloat(r.maxSize);this.panes.splice(s,0,{id:r._.uid,index:s,min:isNaN(l)?0:l,max:isNaN(u)?100:u,size:r.size===null?null:parseFloat(r.size),givenSize:r.size,update:r.update}),this.panes.forEach((f,d)=>f.index=d),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[s]}),this.$emit("pane-add",{index:s,panes:this.panes.map(f=>({min:f.min,max:f.max,size:f.size}))})})},onPaneRemove(r){const s=this.panes.findIndex(u=>u.id===r._.uid),l=this.panes.splice(s,1)[0];this.panes.forEach((u,f)=>u.index=f),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:ww(bw({},l),{index:s})}),this.$emit("pane-remove",{removed:l,panes:this.panes.map(u=>({min:u.min,max:u.max,size:u.size}))})})},resetPaneSizes(r={}){!r.addedPane&&!r.removedPane?this.initialPanesSizing():this.panes.some(s=>s.givenSize!==null||s.min||s.max<100)?this.equalizeAfterAddOrRemove(r):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(s=>({min:s.min,max:s.max,size:s.size})))},equalize(){const r=100/this.panesCount;let s=0,l=[],u=[];this.panes.forEach(f=>{f.size=Math.max(Math.min(r,f.max),f.min),s-=f.size,f.size>=f.max&&l.push(f.id),f.size<=f.min&&u.push(f.id)}),s>.1&&this.readjustSizes(s,l,u)},initialPanesSizing(){100/this.panesCount;let r=100,s=[],l=[],u=0;this.panes.forEach(d=>{r-=d.size,d.size!==null&&u++,d.size>=d.max&&s.push(d.id),d.size<=d.min&&l.push(d.id)});let f=100;r>.1&&(this.panes.forEach(d=>{d.size===null&&(d.size=Math.max(Math.min(r/(this.panesCount-u),d.max),d.min)),f-=d.size}),f>.1&&this.readjustSizes(r,s,l))},equalizeAfterAddOrRemove({addedPane:r,removedPane:s}={}){let l=100/this.panesCount,u=0,f=[],d=[];r&&r.givenSize!==null&&(l=(100-r.givenSize)/(this.panesCount-1)),this.panes.forEach(g=>{u-=g.size,g.size>=g.max&&f.push(g.id),g.size<=g.min&&d.push(g.id)}),!(Math.abs(u)<.1)&&(this.panes.forEach(g=>{r&&r.givenSize!==null&&r.id===g.id||(g.size=Math.max(Math.min(l,g.max),g.min)),u-=g.size,g.size>=g.max&&f.push(g.id),g.size<=g.min&&d.push(g.id)}),u>.1&&this.readjustSizes(u,f,d))},readjustSizes(r,s,l){let u;r>0?u=r/(this.panesCount-s.length):u=r/(this.panesCount-l.length),this.panes.forEach((f,d)=>{if(r>0&&!s.includes(f.id)){const g=Math.max(Math.min(f.size+u,f.max),f.min);r-=g-f.size,f.size=g}else if(!l.includes(f.id)){const g=Math.max(Math.min(f.size+u,f.max),f.min);r-=g-f.size,f.size=g}f.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[f.id].size}%`})}),Math.abs(r)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(r){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((l,u)=>{l.ondblclick=r?f=>this.onSplitterDblClick(f,u):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Ra("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};var Sw=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const Cw={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(r){this.style=r}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(r){this.requestUpdate({target:this,size:r})},minSizeNumber(r){this.requestUpdate({target:this,min:r})},maxSizeNumber(r){this.requestUpdate({target:this,max:r})}}};function _w(r,s,l,u,f,d){return gt(),Bt("div",{class:"splitpanes__pane",onClick:s[0]||(s[0]=g=>d.onPaneClick(g,r._.uid)),style:Oo(r.style)},[Ed(r.$slots,"default")],4)}var Gc=Sw(Cw,[["render",_w]]);const Tw={"h-screen":"","w-screen":"",overflow:"hidden"},Lw={"h-full":"","of-hidden":""},Pw=Dr({name:"App",setup(r){return(s,l)=>{const u=gw,f=Cs("RouterView");return gt(),Bt("div",Tw,[ot(Ae(kw),null,{default:vn(()=>[ot(Ae(Gc),{size:"20","push-other-panes":!1},{default:vn(()=>[ot(u)]),_:1}),ot(Ae(Gc),{size:"80"},{default:vn(()=>[Fe("div",Lw,[ot(f)])]),_:1})]),_:1})])}}}),bh=$m(Pw);bh.use(Yb({history:fb(),routes:K0}));bh.mount("#app");export{a0 as _,Sy as a,ot as b,Bt as c,Dr as d,Fe as e,Nw as f,Ae as g,i0 as h,bt as i,th as j,mi as k,Ew as l,Jy as m,Oo as n,gt as o,Aw as p,Mw as q,At as r,Nr as s,bv as t,g0 as u,rr as v,vn as w,Ps as x,p0 as y,Zb as z};