@unocss/inspector 0.27.5 → 0.28.1

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,28 +1,28 @@
1
- function Ys(r,l){const s=Object.create(null),u=r.split(",");for(let c=0;c<u.length;c++)s[u[c]]=!0;return l?c=>!!s[c.toLowerCase()]:c=>!!s[c]}const Wp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Bp=Ys(Wp);function wc(r){return!!r||r===""}function gl(r){if(Re(r)){const l={};for(let s=0;s<r.length;s++){const u=r[s],c=Mt(u)?jp(u):gl(u);if(c)for(const h in c)l[h]=c[h]}return l}else{if(Mt(r))return r;if(St(r))return r}}const Up=/;(?![^(]*\))/g,Kp=/:(.+)/;function jp(r){const l={};return r.split(Up).forEach(s=>{if(s){const u=s.split(Kp);u.length>1&&(l[u[0].trim()]=u[1].trim())}}),l}function $s(r){let l="";if(Mt(r))l=r;else if(Re(r))for(let s=0;s<r.length;s++){const u=$s(r[s]);u&&(l+=u+" ")}else if(St(r))for(const s in r)r[s]&&(l+=s+" ");return l.trim()}const p0=r=>Mt(r)?r:r==null?"":Re(r)||St(r)&&(r.toString===Cc||!He(r.toString))?JSON.stringify(r,xc,2):String(r),xc=(r,l)=>l&&l.__v_isRef?xc(r,l.value):li(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((s,[u,c])=>(s[`${u} =>`]=c,s),{})}:kc(l)?{[`Set(${l.size})`]:[...l.values()]}:St(l)&&!Re(l)&&!Tc(l)?String(l):l,rt={},oi=[],gr=()=>{},qp=()=>!1,Gp=/^on[^a-z]/,vl=r=>Gp.test(r),Xs=r=>r.startsWith("onUpdate:"),Kt=Object.assign,Zs=(r,l)=>{const s=r.indexOf(l);s>-1&&r.splice(s,1)},Yp=Object.prototype.hasOwnProperty,Ge=(r,l)=>Yp.call(r,l),Re=Array.isArray,li=r=>ml(r)==="[object Map]",kc=r=>ml(r)==="[object Set]",He=r=>typeof r=="function",Mt=r=>typeof r=="string",Js=r=>typeof r=="symbol",St=r=>r!==null&&typeof r=="object",Sc=r=>St(r)&&He(r.then)&&He(r.catch),Cc=Object.prototype.toString,ml=r=>Cc.call(r),$p=r=>ml(r).slice(8,-1),Tc=r=>ml(r)==="[object Object]",Qs=r=>Mt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,el=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yl=r=>{const l=Object.create(null);return s=>l[s]||(l[s]=r(s))},Xp=/-(\w)/g,Pr=yl(r=>r.replace(Xp,(l,s)=>s?s.toUpperCase():"")),Zp=/\B([A-Z])/g,ci=yl(r=>r.replace(Zp,"-$1").toLowerCase()),bl=yl(r=>r.charAt(0).toUpperCase()+r.slice(1)),ys=yl(r=>r?`on${bl(r)}`:""),oo=(r,l)=>!Object.is(r,l),bs=(r,l)=>{for(let s=0;s<r.length;s++)r[s](l)},il=(r,l,s)=>{Object.defineProperty(r,l,{configurable:!0,enumerable:!1,value:s})},Jp=r=>{const l=parseFloat(r);return isNaN(l)?r:l};let wf;const Qp=()=>wf||(wf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let or;class Vp{constructor(l=!1){this.active=!0,this.effects=[],this.cleanups=[],!l&&or&&(this.parent=or,this.index=(or.scopes||(or.scopes=[])).push(this)-1)}run(l){if(this.active)try{return or=this,l()}finally{or=this.parent}}on(){or=this}off(){or=this.parent}stop(l){if(this.active){let s,u;for(s=0,u=this.effects.length;s<u;s++)this.effects[s].stop();for(s=0,u=this.cleanups.length;s<u;s++)this.cleanups[s]();if(this.scopes)for(s=0,u=this.scopes.length;s<u;s++)this.scopes[s].stop(!0);if(this.parent&&!l){const c=this.parent.scopes.pop();c&&c!==this&&(this.parent.scopes[this.index]=c,c.index=this.index)}this.active=!1}}}function eg(r,l=or){l&&l.active&&l.effects.push(r)}function tg(){return or}function rg(r){or&&or.cleanups.push(r)}const Vs=r=>{const l=new Set(r);return l.w=0,l.n=0,l},Lc=r=>(r.w&sn)>0,Mc=r=>(r.n&sn)>0,ng=({deps:r})=>{if(r.length)for(let l=0;l<r.length;l++)r[l].w|=sn},ig=r=>{const{deps:l}=r;if(l.length){let s=0;for(let u=0;u<l.length;u++){const c=l[u];Lc(c)&&!Mc(c)?c.delete(r):l[s++]=c,c.w&=~sn,c.n&=~sn}l.length=s}},Ps=new WeakMap;let Qi=0,sn=1;const _s=30;let Mr;const Mn=Symbol(""),Os=Symbol("");class ea{constructor(l,s=null,u){this.fn=l,this.scheduler=s,this.active=!0,this.deps=[],this.parent=void 0,eg(this,u)}run(){if(!this.active)return this.fn();let l=Mr,s=on;for(;l;){if(l===this)return;l=l.parent}try{return this.parent=Mr,Mr=this,on=!0,sn=1<<++Qi,Qi<=_s?ng(this):xf(this),this.fn()}finally{Qi<=_s&&ig(this),sn=1<<--Qi,Mr=this.parent,on=s,this.parent=void 0}}stop(){this.active&&(xf(this),this.onStop&&this.onStop(),this.active=!1)}}function xf(r){const{deps:l}=r;if(l.length){for(let s=0;s<l.length;s++)l[s].delete(r);l.length=0}}let on=!0;const Pc=[];function di(){Pc.push(on),on=!1}function hi(){const r=Pc.pop();on=r===void 0?!0:r}function rr(r,l,s){if(on&&Mr){let u=Ps.get(r);u||Ps.set(r,u=new Map);let c=u.get(s);c||u.set(s,c=Vs()),_c(c)}}function _c(r,l){let s=!1;Qi<=_s?Mc(r)||(r.n|=sn,s=!Lc(r)):s=!r.has(Mr),s&&(r.add(Mr),Mr.deps.push(r))}function Hr(r,l,s,u,c,h){const m=Ps.get(r);if(!m)return;let b=[];if(l==="clear")b=[...m.values()];else if(s==="length"&&Re(r))m.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(s!==void 0&&b.push(m.get(s)),l){case"add":Re(r)?Qs(s)&&b.push(m.get("length")):(b.push(m.get(Mn)),li(r)&&b.push(m.get(Os)));break;case"delete":Re(r)||(b.push(m.get(Mn)),li(r)&&b.push(m.get(Os)));break;case"set":li(r)&&b.push(m.get(Mn));break}if(b.length===1)b[0]&&Es(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);Es(Vs(y))}}function Es(r,l){for(const s of Re(r)?r:[...r])(s!==Mr||s.allowRecurse)&&(s.scheduler?s.scheduler():s.run())}const og=Ys("__proto__,__v_isRef,__isVue"),Oc=new Set(Object.getOwnPropertyNames(Symbol).map(r=>Symbol[r]).filter(Js)),lg=ta(),sg=ta(!1,!0),ag=ta(!0),kf=ug();function ug(){const r={};return["includes","indexOf","lastIndexOf"].forEach(l=>{r[l]=function(...s){const u=Xe(this);for(let h=0,m=this.length;h<m;h++)rr(u,"get",h+"");const c=u[l](...s);return c===-1||c===!1?u[l](...s.map(Xe)):c}}),["push","pop","shift","unshift","splice"].forEach(l=>{r[l]=function(...s){di();const u=Xe(this)[l].apply(this,s);return hi(),u}}),r}function ta(r=!1,l=!1){return function(u,c,h){if(c==="__v_isReactive")return!r;if(c==="__v_isReadonly")return r;if(c==="__v_isShallow")return l;if(c==="__v_raw"&&h===(r?l?Tg:Dc:l?zc:Nc).get(u))return u;const m=Re(u);if(!r&&m&&Ge(kf,c))return Reflect.get(kf,c,h);const b=Reflect.get(u,c,h);return(Js(c)?Oc.has(c):og(c))||(r||rr(u,"get",c),l)?b:gt(b)?!m||!Qs(c)?b.value:b:St(b)?r?Rc(b):ho(b):b}}const fg=Ec(),cg=Ec(!0);function Ec(r=!1){return function(s,u,c,h){let m=s[u];if(lo(m)&&gt(m)&&!gt(c))return!1;if(!r&&!lo(c)&&(Ic(c)||(c=Xe(c),m=Xe(m)),!Re(s)&&gt(m)&&!gt(c)))return m.value=c,!0;const b=Re(s)&&Qs(u)?Number(u)<s.length:Ge(s,u),y=Reflect.set(s,u,c,h);return s===Xe(h)&&(b?oo(c,m)&&Hr(s,"set",u,c):Hr(s,"add",u,c)),y}}function dg(r,l){const s=Ge(r,l);r[l];const u=Reflect.deleteProperty(r,l);return u&&s&&Hr(r,"delete",l,void 0),u}function hg(r,l){const s=Reflect.has(r,l);return(!Js(l)||!Oc.has(l))&&rr(r,"has",l),s}function pg(r){return rr(r,"iterate",Re(r)?"length":Mn),Reflect.ownKeys(r)}const Ac={get:lg,set:fg,deleteProperty:dg,has:hg,ownKeys:pg},gg={get:ag,set(r,l){return!0},deleteProperty(r,l){return!0}},vg=Kt({},Ac,{get:sg,set:cg}),ra=r=>r,wl=r=>Reflect.getPrototypeOf(r);function $o(r,l,s=!1,u=!1){r=r.__v_raw;const c=Xe(r),h=Xe(l);l!==h&&!s&&rr(c,"get",l),!s&&rr(c,"get",h);const{has:m}=wl(c),b=u?ra:s?oa:so;if(m.call(c,l))return b(r.get(l));if(m.call(c,h))return b(r.get(h));r!==c&&r.get(l)}function Xo(r,l=!1){const s=this.__v_raw,u=Xe(s),c=Xe(r);return r!==c&&!l&&rr(u,"has",r),!l&&rr(u,"has",c),r===c?s.has(r):s.has(r)||s.has(c)}function Zo(r,l=!1){return r=r.__v_raw,!l&&rr(Xe(r),"iterate",Mn),Reflect.get(r,"size",r)}function Sf(r){r=Xe(r);const l=Xe(this);return wl(l).has.call(l,r)||(l.add(r),Hr(l,"add",r,r)),this}function Cf(r,l){l=Xe(l);const s=Xe(this),{has:u,get:c}=wl(s);let h=u.call(s,r);h||(r=Xe(r),h=u.call(s,r));const m=c.call(s,r);return s.set(r,l),h?oo(l,m)&&Hr(s,"set",r,l):Hr(s,"add",r,l),this}function Tf(r){const l=Xe(this),{has:s,get:u}=wl(l);let c=s.call(l,r);c||(r=Xe(r),c=s.call(l,r)),u&&u.call(l,r);const h=l.delete(r);return c&&Hr(l,"delete",r,void 0),h}function Lf(){const r=Xe(this),l=r.size!==0,s=r.clear();return l&&Hr(r,"clear",void 0,void 0),s}function Jo(r,l){return function(u,c){const h=this,m=h.__v_raw,b=Xe(m),y=l?ra:r?oa:so;return!r&&rr(b,"iterate",Mn),m.forEach((x,S)=>u.call(c,y(x),y(S),h))}}function Qo(r,l,s){return function(...u){const c=this.__v_raw,h=Xe(c),m=li(h),b=r==="entries"||r===Symbol.iterator&&m,y=r==="keys"&&m,x=c[r](...u),S=s?ra:l?oa:so;return!l&&rr(h,"iterate",y?Os:Mn),{next(){const{value:P,done:_}=x.next();return _?{value:P,done:_}:{value:b?[S(P[0]),S(P[1])]:S(P),done:_}},[Symbol.iterator](){return this}}}}function Qr(r){return function(...l){return r==="delete"?!1:this}}function mg(){const r={get(h){return $o(this,h)},get size(){return Zo(this)},has:Xo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Jo(!1,!1)},l={get(h){return $o(this,h,!1,!0)},get size(){return Zo(this)},has:Xo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Jo(!1,!0)},s={get(h){return $o(this,h,!0)},get size(){return Zo(this,!0)},has(h){return Xo.call(this,h,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:Jo(!0,!1)},u={get(h){return $o(this,h,!0,!0)},get size(){return Zo(this,!0)},has(h){return Xo.call(this,h,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:Jo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(h=>{r[h]=Qo(h,!1,!1),s[h]=Qo(h,!0,!1),l[h]=Qo(h,!1,!0),u[h]=Qo(h,!0,!0)}),[r,s,l,u]}const[yg,bg,wg,xg]=mg();function na(r,l){const s=l?r?xg:wg:r?bg:yg;return(u,c,h)=>c==="__v_isReactive"?!r:c==="__v_isReadonly"?r:c==="__v_raw"?u:Reflect.get(Ge(s,c)&&c in u?s:u,c,h)}const kg={get:na(!1,!1)},Sg={get:na(!1,!0)},Cg={get:na(!0,!1)},Nc=new WeakMap,zc=new WeakMap,Dc=new WeakMap,Tg=new WeakMap;function Lg(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mg(r){return r.__v_skip||!Object.isExtensible(r)?0:Lg($p(r))}function ho(r){return lo(r)?r:ia(r,!1,Ac,kg,Nc)}function Pg(r){return ia(r,!1,vg,Sg,zc)}function Rc(r){return ia(r,!0,gg,Cg,Dc)}function ia(r,l,s,u,c){if(!St(r)||r.__v_raw&&!(l&&r.__v_isReactive))return r;const h=c.get(r);if(h)return h;const m=Mg(r);if(m===0)return r;const b=new Proxy(r,m===2?u:s);return c.set(r,b),b}function si(r){return lo(r)?si(r.__v_raw):!!(r&&r.__v_isReactive)}function lo(r){return!!(r&&r.__v_isReadonly)}function Ic(r){return!!(r&&r.__v_isShallow)}function Fc(r){return si(r)||lo(r)}function Xe(r){const l=r&&r.__v_raw;return l?Xe(l):r}function Hc(r){return il(r,"__v_skip",!0),r}const so=r=>St(r)?ho(r):r,oa=r=>St(r)?Rc(r):r;function Wc(r){on&&Mr&&(r=Xe(r),_c(r.dep||(r.dep=Vs())))}function Bc(r,l){r=Xe(r),r.dep&&Es(r.dep)}function gt(r){return!!(r&&r.__v_isRef===!0)}function Ut(r){return Uc(r,!1)}function ol(r){return Uc(r,!0)}function Uc(r,l){return gt(r)?r:new _g(r,l)}class _g{constructor(l,s){this.__v_isShallow=s,this.dep=void 0,this.__v_isRef=!0,this._rawValue=s?l:Xe(l),this._value=s?l:so(l)}get value(){return Wc(this),this._value}set value(l){l=this.__v_isShallow?l:Xe(l),oo(l,this._rawValue)&&(this._rawValue=l,this._value=this.__v_isShallow?l:so(l),Bc(this))}}function ot(r){return gt(r)?r.value:r}const Og={get:(r,l,s)=>ot(Reflect.get(r,l,s)),set:(r,l,s,u)=>{const c=r[l];return gt(c)&&!gt(s)?(c.value=s,!0):Reflect.set(r,l,s,u)}};function Kc(r){return si(r)?r:new Proxy(r,Og)}class Eg{constructor(l,s,u){this._object=l,this._key=s,this._defaultValue=u,this.__v_isRef=!0}get value(){const l=this._object[this._key];return l===void 0?this._defaultValue:l}set value(l){this._object[this._key]=l}}function g0(r,l,s){const u=r[l];return gt(u)?u:new Eg(r,l,s)}class Ag{constructor(l,s,u,c){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ea(l,()=>{this._dirty||(this._dirty=!0,Bc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!c,this.__v_isReadonly=u}get value(){const l=Xe(this);return Wc(l),(l._dirty||!l._cacheable)&&(l._dirty=!1,l._value=l.effect.run()),l._value}set value(l){this._setter(l)}}function Ng(r,l,s=!1){let u,c;const h=He(r);return h?(u=r,c=gr):(u=r.get,c=r.set),new Ag(u,c,h||!c,s)}Promise.resolve();function ln(r,l,s,u){let c;try{c=u?r(...u):r()}catch(h){xl(h,l,s)}return c}function vr(r,l,s,u){if(He(r)){const h=ln(r,l,s,u);return h&&Sc(h)&&h.catch(m=>{xl(m,l,s)}),h}const c=[];for(let h=0;h<r.length;h++)c.push(vr(r[h],l,s,u));return c}function xl(r,l,s,u=!0){const c=l?l.vnode:null;if(l){let h=l.parent;const m=l.proxy,b=s;for(;h;){const x=h.ec;if(x){for(let S=0;S<x.length;S++)if(x[S](r,m,b)===!1)return}h=h.parent}const y=l.appContext.config.errorHandler;if(y){ln(y,null,10,[r,m,b]);return}}zg(r,s,c,u)}function zg(r,l,s,u=!0){console.error(r)}let ll=!1,As=!1;const tr=[];let Ir=0;const eo=[];let Vi=null,ti=0;const to=[];let tn=null,ri=0;const jc=Promise.resolve();let la=null,Ns=null;function sa(r){const l=la||jc;return r?l.then(this?r.bind(this):r):l}function Dg(r){let l=Ir+1,s=tr.length;for(;l<s;){const u=l+s>>>1;ao(tr[u])<r?l=u+1:s=u}return l}function qc(r){(!tr.length||!tr.includes(r,ll&&r.allowRecurse?Ir+1:Ir))&&r!==Ns&&(r.id==null?tr.push(r):tr.splice(Dg(r.id),0,r),Gc())}function Gc(){!ll&&!As&&(As=!0,la=jc.then(Xc))}function Rg(r){const l=tr.indexOf(r);l>Ir&&tr.splice(l,1)}function Yc(r,l,s,u){Re(r)?s.push(...r):(!l||!l.includes(r,r.allowRecurse?u+1:u))&&s.push(r),Gc()}function Ig(r){Yc(r,Vi,eo,ti)}function Fg(r){Yc(r,tn,to,ri)}function aa(r,l=null){if(eo.length){for(Ns=l,Vi=[...new Set(eo)],eo.length=0,ti=0;ti<Vi.length;ti++)Vi[ti]();Vi=null,ti=0,Ns=null,aa(r,l)}}function $c(r){if(to.length){const l=[...new Set(to)];if(to.length=0,tn){tn.push(...l);return}for(tn=l,tn.sort((s,u)=>ao(s)-ao(u)),ri=0;ri<tn.length;ri++)tn[ri]();tn=null,ri=0}}const ao=r=>r.id==null?1/0:r.id;function Xc(r){As=!1,ll=!0,aa(r),tr.sort((s,u)=>ao(s)-ao(u));const l=gr;try{for(Ir=0;Ir<tr.length;Ir++){const s=tr[Ir];s&&s.active!==!1&&ln(s,null,14)}}finally{Ir=0,tr.length=0,$c(),ll=!1,la=null,(tr.length||eo.length||to.length)&&Xc(r)}}function Hg(r,l,...s){const u=r.vnode.props||rt;let c=s;const h=l.startsWith("update:"),m=h&&l.slice(7);if(m&&m in u){const S=`${m==="modelValue"?"model":m}Modifiers`,{number:P,trim:_}=u[S]||rt;_?c=s.map(N=>N.trim()):P&&(c=s.map(Jp))}let b,y=u[b=ys(l)]||u[b=ys(Pr(l))];!y&&h&&(y=u[b=ys(ci(l))]),y&&vr(y,r,6,c);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,vr(x,r,6,c)}}function Zc(r,l,s=!1){const u=l.emitsCache,c=u.get(r);if(c!==void 0)return c;const h=r.emits;let m={},b=!1;if(!He(r)){const y=x=>{const S=Zc(x,l,!0);S&&(b=!0,Kt(m,S))};!s&&l.mixins.length&&l.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!h&&!b?(u.set(r,null),null):(Re(h)?h.forEach(y=>m[y]=null):Kt(m,h),u.set(r,m),m)}function ua(r,l){return!r||!vl(l)?!1:(l=l.slice(2).replace(/Once$/,""),Ge(r,l[0].toLowerCase()+l.slice(1))||Ge(r,ci(l))||Ge(r,l))}let lr=null,Jc=null;function sl(r){const l=lr;return lr=r,Jc=r&&r.type.__scopeId||null,l}function Wg(r,l=lr,s){if(!l||r._n)return r;const u=(...c)=>{u._d&&Rf(-1);const h=sl(l),m=r(...c);return sl(h),u._d&&Rf(1),m};return u._n=!0,u._c=!0,u._d=!0,u}function ws(r){const{type:l,vnode:s,proxy:u,withProxy:c,props:h,propsOptions:[m],slots:b,attrs:y,emit:x,render:S,renderCache:P,data:_,setupState:N,ctx:H,inheritAttrs:V}=r;let X,te;const J=sl(r);try{if(s.shapeFlag&4){const he=c||u;X=Lr(S.call(he,he,P,h,N,_,H)),te=y}else{const he=l;X=Lr(he.length>1?he(h,{attrs:y,slots:b,emit:x}):he(h,null)),te=l.props?y:Bg(y)}}catch(he){ro.length=0,xl(he,r,1),X=$t(an)}let ne=X;if(te&&V!==!1){const he=Object.keys(te),{shapeFlag:Ae}=ne;he.length&&Ae&(1|6)&&(m&&he.some(Xs)&&(te=Ug(te,m)),ne=uo(ne,te))}return s.dirs&&(ne.dirs=ne.dirs?ne.dirs.concat(s.dirs):s.dirs),s.transition&&(ne.transition=s.transition),X=ne,sl(J),X}const Bg=r=>{let l;for(const s in r)(s==="class"||s==="style"||vl(s))&&((l||(l={}))[s]=r[s]);return l},Ug=(r,l)=>{const s={};for(const u in r)(!Xs(u)||!(u.slice(9)in l))&&(s[u]=r[u]);return s};function Kg(r,l,s){const{props:u,children:c,component:h}=r,{props:m,children:b,patchFlag:y}=l,x=h.emitsOptions;if(l.dirs||l.transition)return!0;if(s&&y>=0){if(y&1024)return!0;if(y&16)return u?Mf(u,m,x):!!m;if(y&8){const S=l.dynamicProps;for(let P=0;P<S.length;P++){const _=S[P];if(m[_]!==u[_]&&!ua(x,_))return!0}}}else return(c||b)&&(!b||!b.$stable)?!0:u===m?!1:u?m?Mf(u,m,x):!0:!!m;return!1}function Mf(r,l,s){const u=Object.keys(l);if(u.length!==Object.keys(r).length)return!0;for(let c=0;c<u.length;c++){const h=u[c];if(l[h]!==r[h]&&!ua(s,h))return!0}return!1}function jg({vnode:r,parent:l},s){for(;l&&l.subTree===r;)(r=l.vnode).el=s,l=l.parent}const qg=r=>r.__isSuspense;function Gg(r,l){l&&l.pendingBranch?Re(r)?l.effects.push(...r):l.effects.push(r):Fg(r)}function tl(r,l){if(Lt){let s=Lt.provides;const u=Lt.parent&&Lt.parent.provides;u===s&&(s=Lt.provides=Object.create(u)),s[r]=l}}function Fr(r,l,s=!1){const u=Lt||lr;if(u){const c=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(c&&r in c)return c[r];if(arguments.length>1)return s&&He(l)?l.call(u.proxy):l}}function Yg(r,l){return fa(r,null,l)}const Pf={};function Xt(r,l,s){return fa(r,l,s)}function fa(r,l,{immediate:s,deep:u,flush:c,onTrack:h,onTrigger:m}=rt){const b=Lt;let y,x=!1,S=!1;if(gt(r)?(y=()=>r.value,x=Ic(r)):si(r)?(y=()=>r,u=!0):Re(r)?(S=!0,x=r.some(si),y=()=>r.map(te=>{if(gt(te))return te.value;if(si(te))return ii(te);if(He(te))return ln(te,b,2)})):He(r)?l?y=()=>ln(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return P&&P(),vr(r,b,3,[_])}:y=gr,l&&u){const te=y;y=()=>ii(te())}let P,_=te=>{P=X.onStop=()=>{ln(te,b,4)}};if(fo)return _=gr,l?s&&vr(l,b,3,[y(),S?[]:void 0,_]):y(),gr;let N=S?[]:Pf;const H=()=>{if(!!X.active)if(l){const te=X.run();(u||x||(S?te.some((J,ne)=>oo(J,N[ne])):oo(te,N)))&&(P&&P(),vr(l,b,3,[te,N===Pf?void 0:N,_]),N=te)}else X.run()};H.allowRecurse=!!l;let V;c==="sync"?V=H:c==="post"?V=()=>Yt(H,b&&b.suspense):V=()=>{!b||b.isMounted?Ig(H):H()};const X=new ea(y,V);return l?s?H():N=X.run():c==="post"?Yt(X.run.bind(X),b&&b.suspense):X.run(),()=>{X.stop(),b&&b.scope&&Zs(b.scope.effects,X)}}function $g(r,l,s){const u=this.proxy,c=Mt(r)?r.includes(".")?Qc(u,r):()=>u[r]:r.bind(u,u);let h;He(l)?h=l:(h=l.handler,s=l);const m=Lt;ai(this);const b=fa(c,h.bind(u),s);return m?ai(m):_n(),b}function Qc(r,l){const s=l.split(".");return()=>{let u=r;for(let c=0;c<s.length&&u;c++)u=u[s[c]];return u}}function ii(r,l){if(!St(r)||r.__v_skip||(l=l||new Set,l.has(r)))return r;if(l.add(r),gt(r))ii(r.value,l);else if(Re(r))for(let s=0;s<r.length;s++)ii(r[s],l);else if(kc(r)||li(r))r.forEach(s=>{ii(s,l)});else if(Tc(r))for(const s in r)ii(r[s],l);return r}function Vc(r){return He(r)?{setup:r,name:r.name}:r}const zs=r=>!!r.type.__asyncLoader,ed=r=>r.type.__isKeepAlive;function Xg(r,l){td(r,"a",l)}function Zg(r,l){td(r,"da",l)}function td(r,l,s=Lt){const u=r.__wdc||(r.__wdc=()=>{let c=s;for(;c;){if(c.isDeactivated)return;c=c.parent}return r()});if(kl(l,u,s),s){let c=s.parent;for(;c&&c.parent;)ed(c.parent.vnode)&&Jg(u,l,s,c),c=c.parent}}function Jg(r,l,s,u){const c=kl(l,r,u,!0);nd(()=>{Zs(u[l],c)},s)}function kl(r,l,s=Lt,u=!1){if(s){const c=s[r]||(s[r]=[]),h=l.__weh||(l.__weh=(...m)=>{if(s.isUnmounted)return;di(),ai(s);const b=vr(l,s,r,m);return _n(),hi(),b});return u?c.unshift(h):c.push(h),h}}const Wr=r=>(l,s=Lt)=>(!fo||r==="sp")&&kl(r,l,s),Qg=Wr("bm"),rd=Wr("m"),Vg=Wr("bu"),ev=Wr("u"),tv=Wr("bum"),nd=Wr("um"),rv=Wr("sp"),nv=Wr("rtg"),iv=Wr("rtc");function ov(r,l=Lt){kl("ec",r,l)}let Ds=!0;function lv(r){const l=od(r),s=r.proxy,u=r.ctx;Ds=!1,l.beforeCreate&&_f(l.beforeCreate,r,"bc");const{data:c,computed:h,methods:m,watch:b,provide:y,inject:x,created:S,beforeMount:P,mounted:_,beforeUpdate:N,updated:H,activated:V,deactivated:X,beforeDestroy:te,beforeUnmount:J,destroyed:ne,unmounted:he,render:Ae,renderTracked:Fe,renderTriggered:Ke,errorCaptured:tt,serverPrefetch:Be,expose:xe,inheritAttrs:me,components:We,directives:I,filters:U}=l;if(x&&sv(x,u,null,r.appContext.config.unwrapInjectedRef),m)for(const K in m){const se=m[K];He(se)&&(u[K]=se.bind(s))}if(c){const K=c.call(s,s);St(K)&&(r.data=ho(K))}if(Ds=!0,h)for(const K in h){const se=h[K],_e=He(se)?se.bind(s,s):He(se.get)?se.get.bind(s,s):gr,Ye=!He(se)&&He(se.set)?se.set.bind(s):gr,nt=zt({get:_e,set:Ye});Object.defineProperty(u,K,{enumerable:!0,configurable:!0,get:()=>nt.value,set:ct=>nt.value=ct})}if(b)for(const K in b)id(b[K],u,s,K);if(y){const K=He(y)?y.call(s):y;Reflect.ownKeys(K).forEach(se=>{tl(se,K[se])})}S&&_f(S,r,"c");function Z(K,se){Re(se)?se.forEach(_e=>K(_e.bind(s))):se&&K(se.bind(s))}if(Z(Qg,P),Z(rd,_),Z(Vg,N),Z(ev,H),Z(Xg,V),Z(Zg,X),Z(ov,tt),Z(iv,Fe),Z(nv,Ke),Z(tv,J),Z(nd,he),Z(rv,Be),Re(xe))if(xe.length){const K=r.exposed||(r.exposed={});xe.forEach(se=>{Object.defineProperty(K,se,{get:()=>s[se],set:_e=>s[se]=_e})})}else r.exposed||(r.exposed={});Ae&&r.render===gr&&(r.render=Ae),me!=null&&(r.inheritAttrs=me),We&&(r.components=We),I&&(r.directives=I)}function sv(r,l,s=gr,u=!1){Re(r)&&(r=Rs(r));for(const c in r){const h=r[c];let m;St(h)?"default"in h?m=Fr(h.from||c,h.default,!0):m=Fr(h.from||c):m=Fr(h),gt(m)&&u?Object.defineProperty(l,c,{enumerable:!0,configurable:!0,get:()=>m.value,set:b=>m.value=b}):l[c]=m}}function _f(r,l,s){vr(Re(r)?r.map(u=>u.bind(l.proxy)):r.bind(l.proxy),l,s)}function id(r,l,s,u){const c=u.includes(".")?Qc(s,u):()=>s[u];if(Mt(r)){const h=l[r];He(h)&&Xt(c,h)}else if(He(r))Xt(c,r.bind(s));else if(St(r))if(Re(r))r.forEach(h=>id(h,l,s,u));else{const h=He(r.handler)?r.handler.bind(s):l[r.handler];He(h)&&Xt(c,h,r)}}function od(r){const l=r.type,{mixins:s,extends:u}=l,{mixins:c,optionsCache:h,config:{optionMergeStrategies:m}}=r.appContext,b=h.get(l);let y;return b?y=b:!c.length&&!s&&!u?y=l:(y={},c.length&&c.forEach(x=>al(y,x,m,!0)),al(y,l,m)),h.set(l,y),y}function al(r,l,s,u=!1){const{mixins:c,extends:h}=l;h&&al(r,h,s,!0),c&&c.forEach(m=>al(r,m,s,!0));for(const m in l)if(!(u&&m==="expose")){const b=av[m]||s&&s[m];r[m]=b?b(r[m],l[m]):l[m]}return r}const av={data:Of,props:Tn,emits:Tn,methods:Tn,computed:Tn,beforeCreate:Bt,created:Bt,beforeMount:Bt,mounted:Bt,beforeUpdate:Bt,updated:Bt,beforeDestroy:Bt,beforeUnmount:Bt,destroyed:Bt,unmounted:Bt,activated:Bt,deactivated:Bt,errorCaptured:Bt,serverPrefetch:Bt,components:Tn,directives:Tn,watch:fv,provide:Of,inject:uv};function Of(r,l){return l?r?function(){return Kt(He(r)?r.call(this,this):r,He(l)?l.call(this,this):l)}:l:r}function uv(r,l){return Tn(Rs(r),Rs(l))}function Rs(r){if(Re(r)){const l={};for(let s=0;s<r.length;s++)l[r[s]]=r[s];return l}return r}function Bt(r,l){return r?[...new Set([].concat(r,l))]:l}function Tn(r,l){return r?Kt(Kt(Object.create(null),r),l):l}function fv(r,l){if(!r)return l;if(!l)return r;const s=Kt(Object.create(null),r);for(const u in l)s[u]=Bt(r[u],l[u]);return s}function cv(r,l,s,u=!1){const c={},h={};il(h,Sl,1),r.propsDefaults=Object.create(null),ld(r,l,c,h);for(const m in r.propsOptions[0])m in c||(c[m]=void 0);s?r.props=u?c:Pg(c):r.type.props?r.props=c:r.props=h,r.attrs=h}function dv(r,l,s,u){const{props:c,attrs:h,vnode:{patchFlag:m}}=r,b=Xe(c),[y]=r.propsOptions;let x=!1;if((u||m>0)&&!(m&16)){if(m&8){const S=r.vnode.dynamicProps;for(let P=0;P<S.length;P++){let _=S[P];const N=l[_];if(y)if(Ge(h,_))N!==h[_]&&(h[_]=N,x=!0);else{const H=Pr(_);c[H]=Is(y,b,H,N,r,!1)}else N!==h[_]&&(h[_]=N,x=!0)}}}else{ld(r,l,c,h)&&(x=!0);let S;for(const P in b)(!l||!Ge(l,P)&&((S=ci(P))===P||!Ge(l,S)))&&(y?s&&(s[P]!==void 0||s[S]!==void 0)&&(c[P]=Is(y,b,P,void 0,r,!0)):delete c[P]);if(h!==b)for(const P in h)(!l||!Ge(l,P)&&!0)&&(delete h[P],x=!0)}x&&Hr(r,"set","$attrs")}function ld(r,l,s,u){const[c,h]=r.propsOptions;let m=!1,b;if(l)for(let y in l){if(el(y))continue;const x=l[y];let S;c&&Ge(c,S=Pr(y))?!h||!h.includes(S)?s[S]=x:(b||(b={}))[S]=x:ua(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,m=!0)}if(h){const y=Xe(s),x=b||rt;for(let S=0;S<h.length;S++){const P=h[S];s[P]=Is(c,y,P,x[P],r,!Ge(x,P))}}return m}function Is(r,l,s,u,c,h){const m=r[s];if(m!=null){const b=Ge(m,"default");if(b&&u===void 0){const y=m.default;if(m.type!==Function&&He(y)){const{propsDefaults:x}=c;s in x?u=x[s]:(ai(c),u=x[s]=y.call(null,l),_n())}else u=y}m[0]&&(h&&!b?u=!1:m[1]&&(u===""||u===ci(s))&&(u=!0))}return u}function sd(r,l,s=!1){const u=l.propsCache,c=u.get(r);if(c)return c;const h=r.props,m={},b=[];let y=!1;if(!He(r)){const S=P=>{y=!0;const[_,N]=sd(P,l,!0);Kt(m,_),N&&b.push(...N)};!s&&l.mixins.length&&l.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!h&&!y)return u.set(r,oi),oi;if(Re(h))for(let S=0;S<h.length;S++){const P=Pr(h[S]);Ef(P)&&(m[P]=rt)}else if(h)for(const S in h){const P=Pr(S);if(Ef(P)){const _=h[S],N=m[P]=Re(_)||He(_)?{type:_}:_;if(N){const H=zf(Boolean,N.type),V=zf(String,N.type);N[0]=H>-1,N[1]=V<0||H<V,(H>-1||Ge(N,"default"))&&b.push(P)}}}const x=[m,b];return u.set(r,x),x}function Ef(r){return r[0]!=="$"}function Af(r){const l=r&&r.toString().match(/^\s*function (\w+)/);return l?l[1]:r===null?"null":""}function Nf(r,l){return Af(r)===Af(l)}function zf(r,l){return Re(l)?l.findIndex(s=>Nf(s,r)):He(l)&&Nf(l,r)?0:-1}const ad=r=>r[0]==="_"||r==="$stable",ca=r=>Re(r)?r.map(Lr):[Lr(r)],hv=(r,l,s)=>{const u=Wg((...c)=>ca(l(...c)),s);return u._c=!1,u},ud=(r,l,s)=>{const u=r._ctx;for(const c in r){if(ad(c))continue;const h=r[c];if(He(h))l[c]=hv(c,h,u);else if(h!=null){const m=ca(h);l[c]=()=>m}}},fd=(r,l)=>{const s=ca(l);r.slots.default=()=>s},pv=(r,l)=>{if(r.vnode.shapeFlag&32){const s=l._;s?(r.slots=Xe(l),il(l,"_",s)):ud(l,r.slots={})}else r.slots={},l&&fd(r,l);il(r.slots,Sl,1)},gv=(r,l,s)=>{const{vnode:u,slots:c}=r;let h=!0,m=rt;if(u.shapeFlag&32){const b=l._;b?s&&b===1?h=!1:(Kt(c,l),!s&&b===1&&delete c._):(h=!l.$stable,ud(l,c)),m=l}else l&&(fd(r,l),m={default:1});if(h)for(const b in c)!ad(b)&&!(b in m)&&delete c[b]};function Sn(r,l,s,u){const c=r.dirs,h=l&&l.dirs;for(let m=0;m<c.length;m++){const b=c[m];h&&(b.oldValue=h[m].value);let y=b.dir[u];y&&(di(),vr(y,s,8,[r.el,b,r,l]),hi())}}function cd(){return{app:null,config:{isNativeTag:qp,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 vv=0;function mv(r,l){return function(u,c=null){c!=null&&!St(c)&&(c=null);const h=cd(),m=new Set;let b=!1;const y=h.app={_uid:vv++,_component:u,_props:c,_container:null,_context:h,_instance:null,version:Bv,get config(){return h.config},set config(x){},use(x,...S){return m.has(x)||(x&&He(x.install)?(m.add(x),x.install(y,...S)):He(x)&&(m.add(x),x(y,...S))),y},mixin(x){return h.mixins.includes(x)||h.mixins.push(x),y},component(x,S){return S?(h.components[x]=S,y):h.components[x]},directive(x,S){return S?(h.directives[x]=S,y):h.directives[x]},mount(x,S,P){if(!b){const _=$t(u,c);return _.appContext=h,S&&l?l(_,x):r(_,x,P),b=!0,y._container=x,x.__vue_app__=y,ga(_.component)||_.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,S){return h.provides[x]=S,y}};return y}}function Fs(r,l,s,u,c=!1){if(Re(r)){r.forEach((_,N)=>Fs(_,l&&(Re(l)?l[N]:l),s,u,c));return}if(zs(u)&&!c)return;const h=u.shapeFlag&4?ga(u.component)||u.component.proxy:u.el,m=c?null:h,{i:b,r:y}=r,x=l&&l.r,S=b.refs===rt?b.refs={}:b.refs,P=b.setupState;if(x!=null&&x!==y&&(Mt(x)?(S[x]=null,Ge(P,x)&&(P[x]=null)):gt(x)&&(x.value=null)),He(y))ln(y,b,12,[m,S]);else{const _=Mt(y),N=gt(y);if(_||N){const H=()=>{if(r.f){const V=_?S[y]:y.value;c?Re(V)&&Zs(V,h):Re(V)?V.includes(h)||V.push(h):_?S[y]=[h]:(y.value=[h],r.k&&(S[r.k]=y.value))}else _?(S[y]=m,Ge(P,y)&&(P[y]=m)):gt(y)&&(y.value=m,r.k&&(S[r.k]=m))};m?(H.id=-1,Yt(H,s)):H()}}}const Yt=Gg;function yv(r){return bv(r)}function bv(r,l){const s=Qp();s.__VUE__=!0;const{insert:u,remove:c,patchProp:h,createElement:m,createText:b,createComment:y,setText:x,setElementText:S,parentNode:P,nextSibling:_,setScopeId:N=gr,cloneNode:H,insertStaticContent:V}=r,X=(M,E,D,B=null,Y=null,le=null,pe=!1,ae=null,Q=!!E.dynamicChildren)=>{if(M===E)return;M&&!Zi(M,E)&&(B=oe(M),Ne(M,Y,le,!0),M=null),E.patchFlag===-2&&(Q=!1,E.dynamicChildren=null);const{type:T,ref:R,shapeFlag:A}=E;switch(T){case da:te(M,E,D,B);break;case an:J(M,E,D,B);break;case xs:M==null&&ne(E,D,B,pe);break;case pr:I(M,E,D,B,Y,le,pe,ae,Q);break;default:A&1?Fe(M,E,D,B,Y,le,pe,ae,Q):A&6?U(M,E,D,B,Y,le,pe,ae,Q):(A&64||A&128)&&T.process(M,E,D,B,Y,le,pe,ae,Q,be)}R!=null&&Y&&Fs(R,M&&M.ref,le,E||M,!E)},te=(M,E,D,B)=>{if(M==null)u(E.el=b(E.children),D,B);else{const Y=E.el=M.el;E.children!==M.children&&x(Y,E.children)}},J=(M,E,D,B)=>{M==null?u(E.el=y(E.children||""),D,B):E.el=M.el},ne=(M,E,D,B)=>{[M.el,M.anchor]=V(M.children,E,D,B,M.el,M.anchor)},he=({el:M,anchor:E},D,B)=>{let Y;for(;M&&M!==E;)Y=_(M),u(M,D,B),M=Y;u(E,D,B)},Ae=({el:M,anchor:E})=>{let D;for(;M&&M!==E;)D=_(M),c(M),M=D;c(E)},Fe=(M,E,D,B,Y,le,pe,ae,Q)=>{pe=pe||E.type==="svg",M==null?Ke(E,D,B,Y,le,pe,ae,Q):xe(M,E,Y,le,pe,ae,Q)},Ke=(M,E,D,B,Y,le,pe,ae)=>{let Q,T;const{type:R,props:A,shapeFlag:ue,transition:Se,patchFlag:ze,dirs:Je}=M;if(M.el&&H!==void 0&&ze===-1)Q=M.el=H(M.el);else{if(Q=M.el=m(M.type,le,A&&A.is,A),ue&8?S(Q,M.children):ue&16&&Be(M.children,Q,null,B,Y,le&&R!=="foreignObject",pe,ae),Je&&Sn(M,null,B,"created"),A){for(const Ee in A)Ee!=="value"&&!el(Ee)&&h(Q,Ee,null,A[Ee],le,M.children,B,Y,j);"value"in A&&h(Q,"value",null,A.value),(T=A.onVnodeBeforeMount)&&Tr(T,B,M)}tt(Q,M,M.scopeId,pe,B)}Je&&Sn(M,null,B,"beforeMount");const Ie=(!Y||Y&&!Y.pendingBranch)&&Se&&!Se.persisted;Ie&&Se.beforeEnter(Q),u(Q,E,D),((T=A&&A.onVnodeMounted)||Ie||Je)&&Yt(()=>{T&&Tr(T,B,M),Ie&&Se.enter(Q),Je&&Sn(M,null,B,"mounted")},Y)},tt=(M,E,D,B,Y)=>{if(D&&N(M,D),B)for(let le=0;le<B.length;le++)N(M,B[le]);if(Y){let le=Y.subTree;if(E===le){const pe=Y.vnode;tt(M,pe,pe.scopeId,pe.slotScopeIds,Y.parent)}}},Be=(M,E,D,B,Y,le,pe,ae,Q=0)=>{for(let T=Q;T<M.length;T++){const R=M[T]=ae?rn(M[T]):Lr(M[T]);X(null,R,E,D,B,Y,le,pe,ae)}},xe=(M,E,D,B,Y,le,pe)=>{const ae=E.el=M.el;let{patchFlag:Q,dynamicChildren:T,dirs:R}=E;Q|=M.patchFlag&16;const A=M.props||rt,ue=E.props||rt;let Se;D&&Cn(D,!1),(Se=ue.onVnodeBeforeUpdate)&&Tr(Se,D,E,M),R&&Sn(E,M,D,"beforeUpdate"),D&&Cn(D,!0);const ze=Y&&E.type!=="foreignObject";if(T?me(M.dynamicChildren,T,ae,D,B,ze,le):pe||_e(M,E,ae,null,D,B,ze,le,!1),Q>0){if(Q&16)We(ae,E,A,ue,D,B,Y);else if(Q&2&&A.class!==ue.class&&h(ae,"class",null,ue.class,Y),Q&4&&h(ae,"style",A.style,ue.style,Y),Q&8){const Je=E.dynamicProps;for(let Ie=0;Ie<Je.length;Ie++){const Ee=Je[Ie],mt=A[Ee],dt=ue[Ee];(dt!==mt||Ee==="value")&&h(ae,Ee,mt,dt,Y,M.children,D,B,j)}}Q&1&&M.children!==E.children&&S(ae,E.children)}else!pe&&T==null&&We(ae,E,A,ue,D,B,Y);((Se=ue.onVnodeUpdated)||R)&&Yt(()=>{Se&&Tr(Se,D,E,M),R&&Sn(E,M,D,"updated")},B)},me=(M,E,D,B,Y,le,pe)=>{for(let ae=0;ae<E.length;ae++){const Q=M[ae],T=E[ae],R=Q.el&&(Q.type===pr||!Zi(Q,T)||Q.shapeFlag&(6|64))?P(Q.el):D;X(Q,T,R,null,B,Y,le,pe,!0)}},We=(M,E,D,B,Y,le,pe)=>{if(D!==B){for(const ae in B){if(el(ae))continue;const Q=B[ae],T=D[ae];Q!==T&&ae!=="value"&&h(M,ae,T,Q,pe,E.children,Y,le,j)}if(D!==rt)for(const ae in D)!el(ae)&&!(ae in B)&&h(M,ae,D[ae],null,pe,E.children,Y,le,j);"value"in B&&h(M,"value",D.value,B.value)}},I=(M,E,D,B,Y,le,pe,ae,Q)=>{const T=E.el=M?M.el:b(""),R=E.anchor=M?M.anchor:b("");let{patchFlag:A,dynamicChildren:ue,slotScopeIds:Se}=E;Se&&(ae=ae?ae.concat(Se):Se),M==null?(u(T,D,B),u(R,D,B),Be(E.children,D,R,Y,le,pe,ae,Q)):A>0&&A&64&&ue&&M.dynamicChildren?(me(M.dynamicChildren,ue,D,Y,le,pe,ae),(E.key!=null||Y&&E===Y.subTree)&&dd(M,E,!0)):_e(M,E,D,R,Y,le,pe,ae,Q)},U=(M,E,D,B,Y,le,pe,ae,Q)=>{E.slotScopeIds=ae,M==null?E.shapeFlag&512?Y.ctx.activate(E,D,B,pe,Q):w(E,D,B,Y,le,pe,Q):Z(M,E,Q)},w=(M,E,D,B,Y,le,pe)=>{const ae=M.component=zv(M,B,Y);if(ed(M)&&(ae.ctx.renderer=be),Dv(ae),ae.asyncDep){if(Y&&Y.registerDep(ae,K),!M.el){const Q=ae.subTree=$t(an);J(null,Q,E,D)}return}K(ae,M,E,D,Y,le,pe)},Z=(M,E,D)=>{const B=E.component=M.component;if(Kg(M,E,D))if(B.asyncDep&&!B.asyncResolved){se(B,E,D);return}else B.next=E,Rg(B.update),B.update();else E.component=M.component,E.el=M.el,B.vnode=E},K=(M,E,D,B,Y,le,pe)=>{const ae=()=>{if(M.isMounted){let{next:R,bu:A,u:ue,parent:Se,vnode:ze}=M,Je=R,Ie;Cn(M,!1),R?(R.el=ze.el,se(M,R,pe)):R=ze,A&&bs(A),(Ie=R.props&&R.props.onVnodeBeforeUpdate)&&Tr(Ie,Se,R,ze),Cn(M,!0);const Ee=ws(M),mt=M.subTree;M.subTree=Ee,X(mt,Ee,P(mt.el),oe(mt),M,Y,le),R.el=Ee.el,Je===null&&jg(M,Ee.el),ue&&Yt(ue,Y),(Ie=R.props&&R.props.onVnodeUpdated)&&Yt(()=>Tr(Ie,Se,R,ze),Y)}else{let R;const{el:A,props:ue}=E,{bm:Se,m:ze,parent:Je}=M,Ie=zs(E);if(Cn(M,!1),Se&&bs(Se),!Ie&&(R=ue&&ue.onVnodeBeforeMount)&&Tr(R,Je,E),Cn(M,!0),A&&Le){const Ee=()=>{M.subTree=ws(M),Le(A,M.subTree,M,Y,null)};Ie?E.type.__asyncLoader().then(()=>!M.isUnmounted&&Ee()):Ee()}else{const Ee=M.subTree=ws(M);X(null,Ee,D,B,M,Y,le),E.el=Ee.el}if(ze&&Yt(ze,Y),!Ie&&(R=ue&&ue.onVnodeMounted)){const Ee=E;Yt(()=>Tr(R,Je,Ee),Y)}E.shapeFlag&256&&M.a&&Yt(M.a,Y),M.isMounted=!0,E=D=B=null}},Q=M.effect=new ea(ae,()=>qc(M.update),M.scope),T=M.update=Q.run.bind(Q);T.id=M.uid,Cn(M,!0),T()},se=(M,E,D)=>{E.component=M;const B=M.vnode.props;M.vnode=E,M.next=null,dv(M,E.props,B,D),gv(M,E.children,D),di(),aa(void 0,M.update),hi()},_e=(M,E,D,B,Y,le,pe,ae,Q=!1)=>{const T=M&&M.children,R=M?M.shapeFlag:0,A=E.children,{patchFlag:ue,shapeFlag:Se}=E;if(ue>0){if(ue&128){nt(T,A,D,B,Y,le,pe,ae,Q);return}else if(ue&256){Ye(T,A,D,B,Y,le,pe,ae,Q);return}}Se&8?(R&16&&j(T,Y,le),A!==T&&S(D,A)):R&16?Se&16?nt(T,A,D,B,Y,le,pe,ae,Q):j(T,Y,le,!0):(R&8&&S(D,""),Se&16&&Be(A,D,B,Y,le,pe,ae,Q))},Ye=(M,E,D,B,Y,le,pe,ae,Q)=>{M=M||oi,E=E||oi;const T=M.length,R=E.length,A=Math.min(T,R);let ue;for(ue=0;ue<A;ue++){const Se=E[ue]=Q?rn(E[ue]):Lr(E[ue]);X(M[ue],Se,D,null,Y,le,pe,ae,Q)}T>R?j(M,Y,le,!0,!1,A):Be(E,D,B,Y,le,pe,ae,Q,A)},nt=(M,E,D,B,Y,le,pe,ae,Q)=>{let T=0;const R=E.length;let A=M.length-1,ue=R-1;for(;T<=A&&T<=ue;){const Se=M[T],ze=E[T]=Q?rn(E[T]):Lr(E[T]);if(Zi(Se,ze))X(Se,ze,D,null,Y,le,pe,ae,Q);else break;T++}for(;T<=A&&T<=ue;){const Se=M[A],ze=E[ue]=Q?rn(E[ue]):Lr(E[ue]);if(Zi(Se,ze))X(Se,ze,D,null,Y,le,pe,ae,Q);else break;A--,ue--}if(T>A){if(T<=ue){const Se=ue+1,ze=Se<R?E[Se].el:B;for(;T<=ue;)X(null,E[T]=Q?rn(E[T]):Lr(E[T]),D,ze,Y,le,pe,ae,Q),T++}}else if(T>ue)for(;T<=A;)Ne(M[T],Y,le,!0),T++;else{const Se=T,ze=T,Je=new Map;for(T=ze;T<=ue;T++){const Ze=E[T]=Q?rn(E[T]):Lr(E[T]);Ze.key!=null&&Je.set(Ze.key,T)}let Ie,Ee=0;const mt=ue-ze+1;let dt=!1,nr=0;const Ce=new Array(mt);for(T=0;T<mt;T++)Ce[T]=0;for(T=Se;T<=A;T++){const Ze=M[T];if(Ee>=mt){Ne(Ze,Y,le,!0);continue}let Te;if(Ze.key!=null)Te=Je.get(Ze.key);else for(Ie=ze;Ie<=ue;Ie++)if(Ce[Ie-ze]===0&&Zi(Ze,E[Ie])){Te=Ie;break}Te===void 0?Ne(Ze,Y,le,!0):(Ce[Te-ze]=T+1,Te>=nr?nr=Te:dt=!0,X(Ze,E[Te],D,null,Y,le,pe,ae,Q),Ee++)}const _r=dt?wv(Ce):oi;for(Ie=_r.length-1,T=mt-1;T>=0;T--){const Ze=ze+T,Te=E[Ze],lt=Ze+1<R?E[Ze+1].el:B;Ce[T]===0?X(null,Te,D,lt,Y,le,pe,ae,Q):dt&&(Ie<0||T!==_r[Ie]?ct(Te,D,lt,2):Ie--)}}},ct=(M,E,D,B,Y=null)=>{const{el:le,type:pe,transition:ae,children:Q,shapeFlag:T}=M;if(T&6){ct(M.component.subTree,E,D,B);return}if(T&128){M.suspense.move(E,D,B);return}if(T&64){pe.move(M,E,D,be);return}if(pe===pr){u(le,E,D);for(let A=0;A<Q.length;A++)ct(Q[A],E,D,B);u(M.anchor,E,D);return}if(pe===xs){he(M,E,D);return}if(B!==2&&T&1&&ae)if(B===0)ae.beforeEnter(le),u(le,E,D),Yt(()=>ae.enter(le),Y);else{const{leave:A,delayLeave:ue,afterLeave:Se}=ae,ze=()=>u(le,E,D),Je=()=>{A(le,()=>{ze(),Se&&Se()})};ue?ue(le,ze,Je):Je()}else u(le,E,D)},Ne=(M,E,D,B=!1,Y=!1)=>{const{type:le,props:pe,ref:ae,children:Q,dynamicChildren:T,shapeFlag:R,patchFlag:A,dirs:ue}=M;if(ae!=null&&Fs(ae,null,D,M,!0),R&256){E.ctx.deactivate(M);return}const Se=R&1&&ue,ze=!zs(M);let Je;if(ze&&(Je=pe&&pe.onVnodeBeforeUnmount)&&Tr(Je,E,M),R&6)G(M.component,D,B);else{if(R&128){M.suspense.unmount(D,B);return}Se&&Sn(M,null,E,"beforeUnmount"),R&64?M.type.remove(M,E,D,Y,be,B):T&&(le!==pr||A>0&&A&64)?j(T,E,D,!1,!0):(le===pr&&A&(128|256)||!Y&&R&16)&&j(Q,E,D),B&&Ve(M)}(ze&&(Je=pe&&pe.onVnodeUnmounted)||Se)&&Yt(()=>{Je&&Tr(Je,E,M),Se&&Sn(M,null,E,"unmounted")},D)},Ve=M=>{const{type:E,el:D,anchor:B,transition:Y}=M;if(E===pr){W(D,B);return}if(E===xs){Ae(M);return}const le=()=>{c(D),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(M.shapeFlag&1&&Y&&!Y.persisted){const{leave:pe,delayLeave:ae}=Y,Q=()=>pe(D,le);ae?ae(M.el,le,Q):Q()}else le()},W=(M,E)=>{let D;for(;M!==E;)D=_(M),c(M),M=D;c(E)},G=(M,E,D)=>{const{bum:B,scope:Y,update:le,subTree:pe,um:ae}=M;B&&bs(B),Y.stop(),le&&(le.active=!1,Ne(pe,M,E,D)),ae&&Yt(ae,E),Yt(()=>{M.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&M.asyncDep&&!M.asyncResolved&&M.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},j=(M,E,D,B=!1,Y=!1,le=0)=>{for(let pe=le;pe<M.length;pe++)Ne(M[pe],E,D,B,Y)},oe=M=>M.shapeFlag&6?oe(M.component.subTree):M.shapeFlag&128?M.suspense.next():_(M.anchor||M.el),ke=(M,E,D)=>{M==null?E._vnode&&Ne(E._vnode,null,null,!0):X(E._vnode||null,M,E,null,null,null,D),$c(),E._vnode=M},be={p:X,um:Ne,m:ct,r:Ve,mt:w,mc:Be,pc:_e,pbc:me,n:oe,o:r};let fe,Le;return l&&([fe,Le]=l(be)),{render:ke,hydrate:fe,createApp:mv(ke,fe)}}function Cn({effect:r,update:l},s){r.allowRecurse=l.allowRecurse=s}function dd(r,l,s=!1){const u=r.children,c=l.children;if(Re(u)&&Re(c))for(let h=0;h<u.length;h++){const m=u[h];let b=c[h];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=c[h]=rn(c[h]),b.el=m.el),s||dd(m,b))}}function wv(r){const l=r.slice(),s=[0];let u,c,h,m,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(c=s[s.length-1],r[c]<x){l[u]=c,s.push(u);continue}for(h=0,m=s.length-1;h<m;)b=h+m>>1,r[s[b]]<x?h=b+1:m=b;x<r[s[h]]&&(h>0&&(l[u]=s[h-1]),s[h]=u)}}for(h=s.length,m=s[h-1];h-- >0;)s[h]=m,m=l[m];return s}const xv=r=>r.__isTeleport,hd="components";function v0(r,l){return Sv(hd,r,!0,l)||r}const kv=Symbol();function Sv(r,l,s=!0,u=!1){const c=lr||Lt;if(c){const h=c.type;if(r===hd){const b=Hv(h);if(b&&(b===l||b===Pr(l)||b===bl(Pr(l))))return h}const m=Df(c[r]||h[r],l)||Df(c.appContext[r],l);return!m&&u?h:m}}function Df(r,l){return r&&(r[l]||r[Pr(l)]||r[bl(Pr(l))])}const pr=Symbol(void 0),da=Symbol(void 0),an=Symbol(void 0),xs=Symbol(void 0),ro=[];let Pn=null;function ha(r=!1){ro.push(Pn=r?null:[])}function Cv(){ro.pop(),Pn=ro[ro.length-1]||null}let ul=1;function Rf(r){ul+=r}function pd(r){return r.dynamicChildren=ul>0?Pn||oi:null,Cv(),ul>0&&Pn&&Pn.push(r),r}function Tv(r,l,s,u,c,h){return pd(md(r,l,s,u,c,h,!0))}function gd(r,l,s,u,c){return pd($t(r,l,s,u,c,!0))}function fl(r){return r?r.__v_isVNode===!0:!1}function Zi(r,l){return r.type===l.type&&r.key===l.key}const Sl="__vInternal",vd=({key:r})=>r!=null?r:null,rl=({ref:r,ref_key:l,ref_for:s})=>r!=null?Mt(r)||gt(r)||He(r)?{i:lr,r,k:l,f:!!s}:r:null;function md(r,l=null,s=null,u=0,c=null,h=r===pr?0:1,m=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:l,key:l&&vd(l),ref:l&&rl(l),scopeId:Jc,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:h,patchFlag:u,dynamicProps:c,dynamicChildren:null,appContext:null};return b?(pa(y,s),h&128&&r.normalize(y)):s&&(y.shapeFlag|=Mt(s)?8:16),ul>0&&!m&&Pn&&(y.patchFlag>0||h&6)&&y.patchFlag!==32&&Pn.push(y),y}const $t=Lv;function Lv(r,l=null,s=null,u=0,c=null,h=!1){if((!r||r===kv)&&(r=an),fl(r)){const b=uo(r,l,!0);return s&&pa(b,s),b}if(Wv(r)&&(r=r.__vccOpts),l){l=Mv(l);let{class:b,style:y}=l;b&&!Mt(b)&&(l.class=$s(b)),St(y)&&(Fc(y)&&!Re(y)&&(y=Kt({},y)),l.style=gl(y))}const m=Mt(r)?1:qg(r)?128:xv(r)?64:St(r)?4:He(r)?2:0;return md(r,l,s,u,c,m,h,!0)}function Mv(r){return r?Fc(r)||Sl in r?Kt({},r):r:null}function uo(r,l,s=!1){const{props:u,ref:c,patchFlag:h,children:m}=r,b=l?_v(u||{},l):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&vd(b),ref:l&&l.ref?s&&c?Re(c)?c.concat(rl(l)):[c,rl(l)]:rl(l):c,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:m,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:l&&r.type!==pr?h===-1?16:h|16:h,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&uo(r.ssContent),ssFallback:r.ssFallback&&uo(r.ssFallback),el:r.el,anchor:r.anchor}}function Pv(r=" ",l=0){return $t(da,null,r,l)}function m0(r="",l=!1){return l?(ha(),gd(an,null,r)):$t(an,null,r)}function Lr(r){return r==null||typeof r=="boolean"?$t(an):Re(r)?$t(pr,null,r.slice()):typeof r=="object"?rn(r):$t(da,null,String(r))}function rn(r){return r.el===null||r.memo?r:uo(r)}function pa(r,l){let s=0;const{shapeFlag:u}=r;if(l==null)l=null;else if(Re(l))s=16;else if(typeof l=="object")if(u&(1|64)){const c=l.default;c&&(c._c&&(c._d=!1),pa(r,c()),c._c&&(c._d=!0));return}else{s=32;const c=l._;!c&&!(Sl in l)?l._ctx=lr:c===3&&lr&&(lr.slots._===1?l._=1:(l._=2,r.patchFlag|=1024))}else He(l)?(l={default:l,_ctx:lr},s=32):(l=String(l),u&64?(s=16,l=[Pv(l)]):s=8);r.children=l,r.shapeFlag|=s}function _v(...r){const l={};for(let s=0;s<r.length;s++){const u=r[s];for(const c in u)if(c==="class")l.class!==u.class&&(l.class=$s([l.class,u.class]));else if(c==="style")l.style=gl([l.style,u.style]);else if(vl(c)){const h=l[c],m=u[c];m&&h!==m&&!(Re(h)&&h.includes(m))&&(l[c]=h?[].concat(h,m):m)}else c!==""&&(l[c]=u[c])}return l}function Tr(r,l,s,u=null){vr(r,l,7,[s,u])}function y0(r,l,s,u){let c;const h=s&&s[u];if(Re(r)||Mt(r)){c=new Array(r.length);for(let m=0,b=r.length;m<b;m++)c[m]=l(r[m],m,void 0,h&&h[m])}else if(typeof r=="number"){c=new Array(r);for(let m=0;m<r;m++)c[m]=l(m+1,m,void 0,h&&h[m])}else if(St(r))if(r[Symbol.iterator])c=Array.from(r,(m,b)=>l(m,b,void 0,h&&h[b]));else{const m=Object.keys(r);c=new Array(m.length);for(let b=0,y=m.length;b<y;b++){const x=m[b];c[b]=l(r[x],x,b,h&&h[b])}}else c=[];return s&&(s[u]=c),c}function Ov(r,l,s={},u,c){if(lr.isCE)return $t("slot",l==="default"?null:{name:l},u&&u());let h=r[l];h&&h._c&&(h._d=!1),ha();const m=h&&yd(h(s)),b=gd(pr,{key:s.key||`_${l}`},m||(u?u():[]),m&&r._===1?64:-2);return!c&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),h&&h._c&&(h._d=!0),b}function yd(r){return r.some(l=>fl(l)?!(l.type===an||l.type===pr&&!yd(l.children)):!0)?r:null}const Hs=r=>r?wd(r)?ga(r)||r.proxy:Hs(r.parent):null,cl=Kt(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=>Hs(r.parent),$root:r=>Hs(r.root),$emit:r=>r.emit,$options:r=>od(r),$forceUpdate:r=>()=>qc(r.update),$nextTick:r=>sa.bind(r.proxy),$watch:r=>$g.bind(r)}),Ev={get({_:r},l){const{ctx:s,setupState:u,data:c,props:h,accessCache:m,type:b,appContext:y}=r;let x;if(l[0]!=="$"){const N=m[l];if(N!==void 0)switch(N){case 1:return u[l];case 2:return c[l];case 4:return s[l];case 3:return h[l]}else{if(u!==rt&&Ge(u,l))return m[l]=1,u[l];if(c!==rt&&Ge(c,l))return m[l]=2,c[l];if((x=r.propsOptions[0])&&Ge(x,l))return m[l]=3,h[l];if(s!==rt&&Ge(s,l))return m[l]=4,s[l];Ds&&(m[l]=0)}}const S=cl[l];let P,_;if(S)return l==="$attrs"&&rr(r,"get",l),S(r);if((P=b.__cssModules)&&(P=P[l]))return P;if(s!==rt&&Ge(s,l))return m[l]=4,s[l];if(_=y.config.globalProperties,Ge(_,l))return _[l]},set({_:r},l,s){const{data:u,setupState:c,ctx:h}=r;return c!==rt&&Ge(c,l)?(c[l]=s,!0):u!==rt&&Ge(u,l)?(u[l]=s,!0):Ge(r.props,l)||l[0]==="$"&&l.slice(1)in r?!1:(h[l]=s,!0)},has({_:{data:r,setupState:l,accessCache:s,ctx:u,appContext:c,propsOptions:h}},m){let b;return!!s[m]||r!==rt&&Ge(r,m)||l!==rt&&Ge(l,m)||(b=h[0])&&Ge(b,m)||Ge(u,m)||Ge(cl,m)||Ge(c.config.globalProperties,m)},defineProperty(r,l,s){return s.get!=null?this.set(r,l,s.get(),null):s.value!=null&&this.set(r,l,s.value,null),Reflect.defineProperty(r,l,s)}},Av=cd();let Nv=0;function zv(r,l,s){const u=r.type,c=(l?l.appContext:r.appContext)||Av,h={uid:Nv++,vnode:r,type:u,parent:l,appContext:c,root:null,next:null,subTree:null,effect:null,update:null,scope:new Vp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:l?l.provides:Object.create(c.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:sd(u,c),emitsOptions:Zc(u,c),emit:null,emitted:null,propsDefaults:rt,inheritAttrs:u.inheritAttrs,ctx:rt,data:rt,props:rt,attrs:rt,slots:rt,refs:rt,setupState:rt,setupContext:null,suspense:s,suspenseId:s?s.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 h.ctx={_:h},h.root=l?l.root:h,h.emit=Hg.bind(null,h),r.ce&&r.ce(h),h}let Lt=null;const bd=()=>Lt||lr,ai=r=>{Lt=r,r.scope.on()},_n=()=>{Lt&&Lt.scope.off(),Lt=null};function wd(r){return r.vnode.shapeFlag&4}let fo=!1;function Dv(r,l=!1){fo=l;const{props:s,children:u}=r.vnode,c=wd(r);cv(r,s,c,l),pv(r,u);const h=c?Rv(r,l):void 0;return fo=!1,h}function Rv(r,l){const s=r.type;r.accessCache=Object.create(null),r.proxy=Hc(new Proxy(r.ctx,Ev));const{setup:u}=s;if(u){const c=r.setupContext=u.length>1?Fv(r):null;ai(r),di();const h=ln(u,r,0,[r.props,c]);if(hi(),_n(),Sc(h)){if(h.then(_n,_n),l)return h.then(m=>{If(r,m,l)}).catch(m=>{xl(m,r,0)});r.asyncDep=h}else If(r,h,l)}else xd(r,l)}function If(r,l,s){He(l)?r.type.__ssrInlineRender?r.ssrRender=l:r.render=l:St(l)&&(r.setupState=Kc(l)),xd(r,s)}let Ff;function xd(r,l,s){const u=r.type;if(!r.render){if(!l&&Ff&&!u.render){const c=u.template;if(c){const{isCustomElement:h,compilerOptions:m}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Kt(Kt({isCustomElement:h,delimiters:b},m),y);u.render=Ff(c,x)}}r.render=u.render||gr}ai(r),di(),lv(r),hi(),_n()}function Iv(r){return new Proxy(r.attrs,{get(l,s){return rr(r,"get","$attrs"),l[s]}})}function Fv(r){const l=u=>{r.exposed=u||{}};let s;return{get attrs(){return s||(s=Iv(r))},slots:r.slots,emit:r.emit,expose:l}}function ga(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(Kc(Hc(r.exposed)),{get(l,s){if(s in l)return l[s];if(s in cl)return cl[s](r)}}))}function Hv(r){return He(r)&&r.displayName||r.name}function Wv(r){return He(r)&&"__vccOpts"in r}const zt=(r,l)=>Ng(r,l,fo);function va(r,l,s){const u=arguments.length;return u===2?St(l)&&!Re(l)?fl(l)?$t(r,null,[l]):$t(r,l):$t(r,null,l):(u>3?s=Array.prototype.slice.call(arguments,2):u===3&&fl(s)&&(s=[s]),$t(r,l,s))}const Bv="3.2.31",Uv="http://www.w3.org/2000/svg",Ln=typeof document!="undefined"?document:null,Hf=Ln&&Ln.createElement("template"),Kv={insert:(r,l,s)=>{l.insertBefore(r,s||null)},remove:r=>{const l=r.parentNode;l&&l.removeChild(r)},createElement:(r,l,s,u)=>{const c=l?Ln.createElementNS(Uv,r):Ln.createElement(r,s?{is:s}:void 0);return r==="select"&&u&&u.multiple!=null&&c.setAttribute("multiple",u.multiple),c},createText:r=>Ln.createTextNode(r),createComment:r=>Ln.createComment(r),setText:(r,l)=>{r.nodeValue=l},setElementText:(r,l)=>{r.textContent=l},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Ln.querySelector(r),setScopeId(r,l){r.setAttribute(l,"")},cloneNode(r){const l=r.cloneNode(!0);return"_value"in r&&(l._value=r._value),l},insertStaticContent(r,l,s,u,c,h){const m=s?s.previousSibling:l.lastChild;if(c&&(c===h||c.nextSibling))for(;l.insertBefore(c.cloneNode(!0),s),!(c===h||!(c=c.nextSibling)););else{Hf.innerHTML=u?`<svg>${r}</svg>`:r;const b=Hf.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}l.insertBefore(b,s)}return[m?m.nextSibling:l.firstChild,s?s.previousSibling:l.lastChild]}};function jv(r,l,s){const u=r._vtc;u&&(l=(l?[l,...u]:[...u]).join(" ")),l==null?r.removeAttribute("class"):s?r.setAttribute("class",l):r.className=l}function qv(r,l,s){const u=r.style,c=Mt(s);if(s&&!c){for(const h in s)Ws(u,h,s[h]);if(l&&!Mt(l))for(const h in l)s[h]==null&&Ws(u,h,"")}else{const h=u.display;c?l!==s&&(u.cssText=s):l&&r.removeAttribute("style"),"_vod"in r&&(u.display=h)}}const Wf=/\s*!important$/;function Ws(r,l,s){if(Re(s))s.forEach(u=>Ws(r,l,u));else if(l.startsWith("--"))r.setProperty(l,s);else{const u=Gv(r,l);Wf.test(s)?r.setProperty(ci(u),s.replace(Wf,""),"important"):r[u]=s}}const Bf=["Webkit","Moz","ms"],ks={};function Gv(r,l){const s=ks[l];if(s)return s;let u=Pr(l);if(u!=="filter"&&u in r)return ks[l]=u;u=bl(u);for(let c=0;c<Bf.length;c++){const h=Bf[c]+u;if(h in r)return ks[l]=h}return l}const Uf="http://www.w3.org/1999/xlink";function Yv(r,l,s,u,c){if(u&&l.startsWith("xlink:"))s==null?r.removeAttributeNS(Uf,l.slice(6,l.length)):r.setAttributeNS(Uf,l,s);else{const h=Bp(l);s==null||h&&!wc(s)?r.removeAttribute(l):r.setAttribute(l,h?"":s)}}function $v(r,l,s,u,c,h,m){if(l==="innerHTML"||l==="textContent"){u&&m(u,c,h),r[l]=s==null?"":s;return}if(l==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=s;const b=s==null?"":s;(r.value!==b||r.tagName==="OPTION")&&(r.value=b),s==null&&r.removeAttribute(l);return}if(s===""||s==null){const b=typeof r[l];if(b==="boolean"){r[l]=wc(s);return}else if(s==null&&b==="string"){r[l]="",r.removeAttribute(l);return}else if(b==="number"){try{r[l]=0}catch{}r.removeAttribute(l);return}}try{r[l]=s}catch{}}let dl=Date.now,kd=!1;if(typeof window!="undefined"){dl()>document.createEvent("Event").timeStamp&&(dl=()=>performance.now());const r=navigator.userAgent.match(/firefox\/(\d+)/i);kd=!!(r&&Number(r[1])<=53)}let Bs=0;const Xv=Promise.resolve(),Zv=()=>{Bs=0},Jv=()=>Bs||(Xv.then(Zv),Bs=dl());function Qv(r,l,s,u){r.addEventListener(l,s,u)}function Vv(r,l,s,u){r.removeEventListener(l,s,u)}function em(r,l,s,u,c=null){const h=r._vei||(r._vei={}),m=h[l];if(u&&m)m.value=u;else{const[b,y]=tm(l);if(u){const x=h[l]=rm(u,c);Qv(r,b,x,y)}else m&&(Vv(r,b,m,y),h[l]=void 0)}}const Kf=/(?:Once|Passive|Capture)$/;function tm(r){let l;if(Kf.test(r)){l={};let s;for(;s=r.match(Kf);)r=r.slice(0,r.length-s[0].length),l[s[0].toLowerCase()]=!0}return[ci(r.slice(2)),l]}function rm(r,l){const s=u=>{const c=u.timeStamp||dl();(kd||c>=s.attached-1)&&vr(nm(u,s.value),l,5,[u])};return s.value=r,s.attached=Jv(),s}function nm(r,l){if(Re(l)){const s=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{s.call(r),r._stopped=!0},l.map(u=>c=>!c._stopped&&u&&u(c))}else return l}const jf=/^on[a-z]/,im=(r,l,s,u,c=!1,h,m,b,y)=>{l==="class"?jv(r,u,c):l==="style"?qv(r,s,u):vl(l)?Xs(l)||em(r,l,s,u,m):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):om(r,l,u,c))?$v(r,l,u,h,m,b,y):(l==="true-value"?r._trueValue=u:l==="false-value"&&(r._falseValue=u),Yv(r,l,u,c))};function om(r,l,s,u){return u?!!(l==="innerHTML"||l==="textContent"||l in r&&jf.test(l)&&He(s)):l==="spellcheck"||l==="draggable"||l==="form"||l==="list"&&r.tagName==="INPUT"||l==="type"&&r.tagName==="TEXTAREA"||jf.test(l)&&Mt(s)?!1:l in r}const lm=Kt({patchProp:im},Kv);let qf;function sm(){return qf||(qf=yv(lm))}const b0=(...r)=>{const l=sm().createApp(...r),{mount:s}=l;return l.mount=u=>{const c=am(u);if(!c)return;const h=l._component;!He(h)&&!h.render&&!h.template&&(h.template=c.innerHTML),c.innerHTML="";const m=s(c,!1,c instanceof SVGElement);return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),m},l};function am(r){return Mt(r)?document.querySelector(r):r}function Ss(){const r=[],l=c=>{const h=r.indexOf(c);h!==-1&&r.splice(h,1)};return{on:c=>(r.push(c),{off:()=>l(c)}),off:l,trigger:c=>{r.forEach(h=>h(c))}}}function Cl(r){return tg()?(rg(r),!0):!1}const ma=typeof window!="undefined",um=r=>typeof r=="string",nl=()=>{};function Sd(r,l){function s(...u){r(()=>l.apply(this,u),{fn:l,thisArg:this,args:u})}return s}const fm=r=>r();function cm(r,l={}){let s,u;return h=>{const m=ot(r),b=ot(l.maxWait);if(s&&clearTimeout(s),m<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),h();b&&!u&&(u=setTimeout(()=>{s&&clearTimeout(s),u=null,h()},b)),s=setTimeout(()=>{u&&clearTimeout(u),u=null,h()},m)}}function dm(r,l=!1,s="Timeout"){return new Promise((u,c)=>{setTimeout(l?()=>c(s):u,r)})}function hm(r,...l){return l.some(s=>s in r)}function pm(r,l=200,s={}){return Sd(cm(l,s),r)}function w0(r,l=200,s={}){if(l<=0)return r;const u=Ut(r.value),c=pm(()=>{u.value=r.value},l,s);return Xt(r,()=>c()),u}var Gf=Object.getOwnPropertySymbols,gm=Object.prototype.hasOwnProperty,vm=Object.prototype.propertyIsEnumerable,mm=(r,l)=>{var s={};for(var u in r)gm.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&Gf)for(var u of Gf(r))l.indexOf(u)<0&&vm.call(r,u)&&(s[u]=r[u]);return s};function ym(r,l,s={}){const u=s,{eventFilter:c=fm}=u,h=mm(u,["eventFilter"]);return Xt(r,Sd(c,l),h)}function Cd(r,l=!0){bd()?rd(r):l?r():sa(r)}function bm(r){let l=!1;function s(P,{flush:_="sync",deep:N=!1,timeout:H,throwOnTimeout:V}={}){let X=null;const J=[new Promise(ne=>{X=Xt(r,he=>{P(he)===!l&&(X==null||X(),ne())},{flush:_,deep:N,immediate:!0})})];return H&&J.push(dm(H,V).finally(()=>{X==null||X()})),Promise.race(J)}function u(P,_){return s(N=>N===ot(P),_)}function c(P){return s(_=>Boolean(_),P)}function h(P){return u(null,P)}function m(P){return u(void 0,P)}function b(P){return s(Number.isNaN,P)}function y(P,_){return s(N=>{const H=Array.from(N);return H.includes(P)||H.includes(ot(P))},_)}function x(P){return S(1,P)}function S(P=1,_){let N=-1;return s(()=>(N+=1,N>=P),_)}return Array.isArray(ot(r))?{toMatch:s,toContains:y,changed:x,changedTimes:S,get not(){return l=!l,this}}:{toMatch:s,toBe:u,toBeTruthy:c,toBeNull:h,toBeNaN:b,toBeUndefined:m,changed:x,changedTimes:S,get not(){return l=!l,this}}}function wm(r,l,s={}){const{immediate:u=!0}=s,c=Ut(!1);let h=null;function m(){h&&(clearTimeout(h),h=null)}function b(){c.value=!1,m()}function y(...x){m(),c.value=!0,h=setTimeout(()=>{c.value=!1,h=null,r(...x)},ot(l))}return u&&(c.value=!0,ma&&y()),Cl(b),{isPending:c,start:y,stop:b}}function x0(r=!1){if(gt(r))return l=>(r.value=typeof l=="boolean"?l:!r.value,r.value);{const l=Ut(r);return[l,u=>(l.value=typeof u=="boolean"?u:!l.value,l.value)]}}function k0(r,l,s){let u;gt(s)?u={evaluating:s}:u=s||{};const{lazy:c=!1,evaluating:h=void 0,onError:m=nl}=u,b=Ut(!c),y=Ut(l);let x=0;return Yg(async S=>{if(!b.value)return;x++;const P=x;let _=!1;h&&Promise.resolve().then(()=>{h.value=!0});try{const N=await r(H=>{S(()=>{h&&(h.value=!1),_||H()})});P===x&&(y.value=N)}catch(N){m(N)}finally{h&&(h.value=!1),_=!0}}),c?zt(()=>(b.value=!0,y.value)):y}function xm(r){var l;const s=ot(r);return(l=s==null?void 0:s.$el)!=null?l:s}const un=ma?window:void 0;function km(...r){let l,s,u,c;if(um(r[0])?([s,u,c]=r,l=un):[l,s,u,c]=r,!l)return nl;let h=nl;const m=Xt(()=>ot(l),y=>{h(),!!y&&(y.addEventListener(s,u,c),h=()=>{y.removeEventListener(s,u,c),h=nl})},{immediate:!0,flush:"post"}),b=()=>{m(),h()};return Cl(b),b}function Sm(r,l={}){const{window:s=un}=l;let u;const c=Ut(!1),h=()=>{!s||(u||(u=s.matchMedia(r)),c.value=u.matches)};return Cd(()=>{h(),!!u&&("addEventListener"in u?u.addEventListener("change",h):u.addListener(h),Cl(()=>{"removeEventListener"in h?u.removeEventListener("change",h):u.removeListener(h)}))}),c}const Us=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ks="__vueuse_ssr_handlers__";Us[Ks]=Us[Ks]||{};const Cm=Us[Ks];function Td(r,l){return Cm[r]||l}function Tm(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const Lm={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.entries()))}};function Mm(r,l,s,u={}){var c;const{flush:h="pre",deep:m=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:S=un,eventFilter:P,onError:_=J=>{console.error(J)}}=u,N=ot(l),H=Tm(N),V=(x?ol:Ut)(l),X=(c=u.serializer)!=null?c:Lm[H];if(!s)try{s=Td("getDefaultStorage",()=>{var J;return(J=un)==null?void 0:J.localStorage})()}catch(J){_(J)}function te(J){if(!(!s||J&&J.key!==r))try{const ne=J?J.newValue:s.getItem(r);ne==null?(V.value=N,y&&N!==null&&s.setItem(r,X.write(N))):typeof ne!="string"?V.value=ne:V.value=X.read(ne)}catch(ne){_(ne)}}return te(),S&&b&&km(S,"storage",J=>setTimeout(()=>te(J),0)),s&&ym(V,()=>{try{V.value==null?s.removeItem(r):s.setItem(r,X.write(V.value))}catch(J){_(J)}},{flush:h,deep:m,eventFilter:P}),V}function Ld(r){return Sm("(prefers-color-scheme: dark)",r)}var Pm=Object.defineProperty,Yf=Object.getOwnPropertySymbols,_m=Object.prototype.hasOwnProperty,Om=Object.prototype.propertyIsEnumerable,$f=(r,l,s)=>l in r?Pm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Em=(r,l)=>{for(var s in l||(l={}))_m.call(l,s)&&$f(r,s,l[s]);if(Yf)for(var s of Yf(l))Om.call(l,s)&&$f(r,s,l[s]);return r};function Am(r={}){const{selector:l="html",attribute:s="class",window:u=un,storage:c,storageKey:h="vueuse-color-scheme",listenToStorageChanges:m=!0,storageRef:b}=r,y=Em({auto:"",light:"light",dark:"dark"},r.modes||{}),x=Ld({window:u}),S=zt(()=>x.value?"dark":"light"),P=b||(h==null?Ut("auto"):Mm(h,"auto",c,{window:u,listenToStorageChanges:m})),_=zt({get(){return P.value==="auto"?S.value:P.value},set(X){P.value=X}}),N=Td("updateHTMLAttrs",(X,te,J)=>{const ne=u==null?void 0:u.document.querySelector(X);if(!!ne)if(te==="class"){const he=J.split(/\s/g);Object.values(y).flatMap(Ae=>(Ae||"").split(/\s/g)).filter(Boolean).forEach(Ae=>{he.includes(Ae)?ne.classList.add(Ae):ne.classList.remove(Ae)})}else ne.setAttribute(te,J)});function H(X){var te;N(l,s,(te=y[X])!=null?te:X)}function V(X){r.onChanged?r.onChanged(X,H):H(X)}return Xt(_,V,{flush:"post",immediate:!0}),Cd(()=>V(_.value)),_}var Nm=Object.defineProperty,zm=Object.defineProperties,Dm=Object.getOwnPropertyDescriptors,Xf=Object.getOwnPropertySymbols,Rm=Object.prototype.hasOwnProperty,Im=Object.prototype.propertyIsEnumerable,Zf=(r,l,s)=>l in r?Nm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Fm=(r,l)=>{for(var s in l||(l={}))Rm.call(l,s)&&Zf(r,s,l[s]);if(Xf)for(var s of Xf(l))Im.call(l,s)&&Zf(r,s,l[s]);return r},Hm=(r,l)=>zm(r,Dm(l));function S0(r={}){const{valueDark:l="dark",valueLight:s="",window:u=un}=r,c=Am(Hm(Fm({},r),{onChanged:(b,y)=>{var x;r.onChanged?(x=r.onChanged)==null||x.call(r,b==="dark"):y(b)},modes:{dark:l,light:s}})),h=Ld({window:u});return zt({get(){return c.value==="dark"},set(b){b===h.value?c.value="auto":c.value=b?"dark":"light"}})}var Jf=Object.getOwnPropertySymbols,Wm=Object.prototype.hasOwnProperty,Bm=Object.prototype.propertyIsEnumerable,Um=(r,l)=>{var s={};for(var u in r)Wm.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&Jf)for(var u of Jf(r))l.indexOf(u)<0&&Bm.call(r,u)&&(s[u]=r[u]);return s};function C0(r,l,s={}){const u=s,{window:c=un}=u,h=Um(u,["window"]);let m;const b=c&&"ResizeObserver"in c,y=()=>{m&&(m.disconnect(),m=void 0)},x=Xt(()=>xm(r),P=>{y(),b&&c&&P&&(m=new c.ResizeObserver(l),m.observe(P,h))},{immediate:!0,flush:"post"}),S=()=>{y(),x()};return Cl(S),{isSupported:b,stop:S}}var Km=Object.defineProperty,jm=Object.defineProperties,qm=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,Gm=Object.prototype.hasOwnProperty,Ym=Object.prototype.propertyIsEnumerable,Vf=(r,l,s)=>l in r?Km(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,hr=(r,l)=>{for(var s in l||(l={}))Gm.call(l,s)&&Vf(r,s,l[s]);if(Qf)for(var s of Qf(l))Ym.call(l,s)&&Vf(r,s,l[s]);return r},Vo=(r,l)=>jm(r,qm(l));const $m={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function ec(r){return hm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError")}function Cs(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function T0(r,...l){var s;const u=typeof AbortController=="function";let c={},h={immediate:!0,refetch:!1,timeout:0};const m={method:"get",type:"text",payload:void 0};l.length>0&&(ec(l[0])?h=hr(hr({},h),l[0]):c=l[0]),l.length>1&&ec(l[1])&&(h=hr(hr({},h),l[1]));const{fetch:b=(s=un)==null?void 0:s.fetch,initialData:y,timeout:x}=h,S=Ss(),P=Ss(),_=Ss(),N=Ut(!1),H=Ut(!1),V=Ut(!1),X=Ut(null),te=ol(null),J=Ut(null),ne=ol(y),he=zt(()=>u&&H.value);let Ae,Fe;const Ke=()=>{u&&Ae&&Ae.abort()},tt=U=>{H.value=U,N.value=!U};x&&(Fe=wm(Ke,x,{immediate:!1}));const Be=async(U=!1)=>{var w;tt(!0),J.value=null,X.value=null,V.value=!1,Ae=void 0,u&&(Ae=new AbortController,Ae.signal.onabort=()=>V.value=!0,c=Vo(hr({},c),{signal:Ae.signal}));const Z={method:m.method,headers:{}};if(m.payload){const Ye=Cs(Z.headers);m.payloadType&&(Ye["Content-Type"]=(w=$m[m.payloadType])!=null?w:m.payloadType),Z.body=m.payloadType==="json"?JSON.stringify(ot(m.payload)):ot(m.payload)}let K=!1;const se={url:ot(r),options:c,cancel:()=>{K=!0}};if(h.beforeFetch&&Object.assign(se,await h.beforeFetch(se)),K||!b)return tt(!1),Promise.resolve(null);let _e=null;return Fe&&Fe.start(),new Promise((Ye,nt)=>{var ct;b(se.url,Vo(hr(hr({},Z),se.options),{headers:hr(hr({},Cs(Z.headers)),Cs((ct=se.options)==null?void 0:ct.headers))})).then(async Ne=>{if(te.value=Ne,X.value=Ne.status,_e=await Ne[m.type](),h.afterFetch&&X.value>=200&&X.value<300&&({data:_e}=await h.afterFetch({data:_e,response:Ne})),ne.value=_e,!Ne.ok)throw new Error(Ne.statusText);return S.trigger(Ne),Ye(Ne)}).catch(async Ne=>{let Ve=Ne.message||Ne.name;return h.onFetchError&&({data:_e,error:Ve}=await h.onFetchError({data:_e,error:Ne})),ne.value=_e,J.value=Ve,P.trigger(Ne),U?nt(Ne):Ye(null)}).finally(()=>{tt(!1),Fe&&Fe.stop(),_.trigger(null)})})};Xt(()=>[ot(r),ot(h.refetch)],()=>ot(h.refetch)&&Be(),{deep:!0});const xe={isFinished:N,statusCode:X,response:te,error:J,data:ne,isFetching:H,canAbort:he,aborted:V,abort:Ke,execute:Be,onFetchResponse:S.on,onFetchError:P.on,onFetchFinally:_.on,get:me("get"),put:me("put"),post:me("post"),delete:me("delete"),patch:me("patch"),head:me("head"),options:me("options"),json:I("json"),text:I("text"),blob:I("blob"),arrayBuffer:I("arrayBuffer"),formData:I("formData")};function me(U){return(w,Z)=>{if(!H.value)return m.method=U,m.payload=w,m.payloadType=Z,gt(m.payload)&&Xt(()=>[ot(m.payload),ot(h.refetch)],()=>ot(h.refetch)&&Be(),{deep:!0}),!Z&&ot(w)&&Object.getPrototypeOf(ot(w))===Object.prototype&&(m.payloadType="json"),xe}}function We(){return new Promise((U,w)=>{bm(N).toBe(!0).then(()=>U(xe)).catch(Z=>w(Z))})}function I(U){return()=>{if(!H.value)return m.type=U,Vo(hr({},xe),{then(w,Z){return We().then(w,Z)}})}}return h.immediate&&setTimeout(Be,0),Vo(hr({},xe),{then(U,w){return We().then(U,w)}})}var tc,rc;ma&&(window==null?void 0:window.navigator)&&((tc=window==null?void 0:window.navigator)==null?void 0:tc.platform)&&/iP(ad|hone|od)/.test((rc=window==null?void 0:window.navigator)==null?void 0:rc.platform);var Xm=Object.defineProperty,nc=Object.getOwnPropertySymbols,Zm=Object.prototype.hasOwnProperty,Jm=Object.prototype.propertyIsEnumerable,ic=(r,l,s)=>l in r?Xm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Qm=(r,l)=>{for(var s in l||(l={}))Zm.call(l,s)&&ic(r,s,l[s]);if(nc)for(var s of nc(l))Jm.call(l,s)&&ic(r,s,l[s]);return r};const Vm={top:0,left:0,bottom:0,right:0,height:0,width:0};Qm({text:""},Vm);function L0(r,l,s,u={}){var c;const{passive:h=!1,eventName:m,deep:b=!1}=u,y=bd(),x=s||(y==null?void 0:y.emit)||((c=y==null?void 0:y.$emit)==null?void 0:c.bind(y));let S=m;if(l||(l="modelValue"),S=m||S||`update:${l}`,h){const P=Ut(r[l]);return Xt(()=>r[l],_=>P.value=_),Xt(P,_=>{(_!==r[l]||b)&&x(S,_)},{deep:b}),P}else return zt({get(){return r[l]},set(P){x(S,P)}})}var ey=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},fn={exports:{}};(function(r,l){(function(s,u){r.exports=u()})(ey,function(){var s=navigator.userAgent,u=navigator.platform,c=/gecko\/\d/i.test(s),h=/MSIE \d/.test(s),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(s),b=/Edge\/(\d+)/.exec(s),y=h||m||b,x=y&&(h?document.documentMode||6:+(b||m)[1]),S=!b&&/WebKit\//.test(s),P=S&&/Qt\/\d+\.\d+/.test(s),_=!b&&/Chrome\//.test(s),N=/Opera\//.test(s),H=/Apple Computer/.test(navigator.vendor),V=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(s),X=/PhantomJS/.test(s),te=H&&(/Mobile\/\w+/.test(s)||navigator.maxTouchPoints>2),J=/Android/.test(s),ne=te||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(s),he=te||/Mac/.test(u),Ae=/\bCrOS\b/.test(s),Fe=/win/i.test(u),Ke=N&&s.match(/Version\/(\d*\.\d*)/);Ke&&(Ke=Number(Ke[1])),Ke&&Ke>=15&&(N=!1,S=!0);var tt=he&&(P||N&&(Ke==null||Ke<12.11)),Be=c||y&&x>=9;function xe(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var me=function(e,t){var i=e.className,n=xe(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 We(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function I(e,t){return We(e).appendChild(t)}function U(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 w(e,t,i,n){var o=U(e,t,i,n);return o.setAttribute("role","presentation"),o}var Z;document.createRange?Z=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:Z=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 K(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 se(){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 _e(e,t){var i=e.className;xe(t).test(i)||(e.className+=(i?" ":"")+t)}function Ye(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!xe(i[n]).test(t)&&(t+=" "+i[n]);return t}var nt=function(e){e.select()};te?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(nt=function(e){try{e.select()}catch{}});function ct(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ne(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 Ve(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,f=o||0;;){var d=e.indexOf(" ",a);if(d<0||d>=t)return f+(t-a);f+=d-a,f+=i-f%i,a=d+1}}var W=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(this.onTimeout,this)};W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.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 G(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var j=50,oe={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},be={origin:"*mouse"},fe={origin:"+move"};function Le(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var f=a-n;if(a==e.length||o+f>=t)return n+Math.min(f,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var M=[""];function E(e){for(;M.length<=e;)M.push(D(M)+" ");return M[e]}function D(e){return e[e.length-1]}function B(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function Y(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function le(){}function pe(e,t){var i;return Object.create?i=Object.create(e):(le.prototype=e,i=new le),t&&Ne(t,i),i}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ae.test(e))}function T(e,t){return t?t.source.indexOf("\\w")>-1&&Q(e)?!0:t.test(e):Q(e)}function R(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var A=/[\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 ue(e){return e.charCodeAt(0)>=768&&A.test(e)}function Se(e,t,i){for(;(i<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=i;return t}function ze(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 f=e[a];(f.from<i&&f.to>t||t==i&&f.to==t)&&(n(Math.max(f.from,t),Math.min(f.to,i),f.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ie=null;function Ee(e,t,i){var n;Ie=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:Ie=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ie=o)}return n!=null?n:Ie}var mt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,f=/[Lb1n]/,d=/[1n]/;function p(g,k,C){this.level=g,this.from=k,this.to=C}return function(g,k){var C=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!n.test(g))return!1;for(var z=g.length,O=[],F=0;F<z;++F)O.push(i(g.charCodeAt(F)));for(var $=0,ie=C;$<z;++$){var ce=O[$];ce=="m"?O[$]=ie:ie=ce}for(var ge=0,de=C;ge<z;++ge){var ye=O[ge];ye=="1"&&de=="r"?O[ge]="n":a.test(ye)&&(de=ye,ye=="r"&&(O[ge]="R"))}for(var Pe=1,Me=O[0];Pe<z-1;++Pe){var De=O[Pe];De=="+"&&Me=="1"&&O[Pe+1]=="1"?O[Pe]="1":De==","&&Me==O[Pe+1]&&(Me=="1"||Me=="n")&&(O[Pe]=Me),Me=De}for(var Qe=0;Qe<z;++Qe){var xt=O[Qe];if(xt==",")O[Qe]="N";else if(xt=="%"){var st=void 0;for(st=Qe+1;st<z&&O[st]=="%";++st);for(var Gt=Qe&&O[Qe-1]=="!"||st<z&&O[st]=="1"?"1":"N",Ft=Qe;Ft<st;++Ft)O[Ft]=Gt;Qe=st-1}}for(var ht=0,Ht=C;ht<z;++ht){var Tt=O[ht];Ht=="L"&&Tt=="1"?O[ht]="L":a.test(Tt)&&(Ht=Tt)}for(var vt=0;vt<z;++vt)if(o.test(O[vt])){var pt=void 0;for(pt=vt+1;pt<z&&o.test(O[pt]);++pt);for(var ut=(vt?O[vt-1]:C)=="L",Wt=(pt<z?O[pt]:C)=="L",Qn=ut==Wt?ut?"L":"R":C,Jr=vt;Jr<pt;++Jr)O[Jr]=Qn;vt=pt-1}for(var Et=[],Cr,kt=0;kt<z;)if(f.test(O[kt])){var vs=kt;for(++kt;kt<z&&f.test(O[kt]);++kt);Et.push(new p(0,vs,kt))}else{var Rr=kt,xn=Et.length,kn=k=="rtl"?1:0;for(++kt;kt<z&&O[kt]!="L";++kt);for(var Nt=Rr;Nt<kt;)if(d.test(O[Nt])){Rr<Nt&&(Et.splice(xn,0,new p(1,Rr,Nt)),xn+=kn);var Vn=Nt;for(++Nt;Nt<kt&&d.test(O[Nt]);++Nt);Et.splice(xn,0,new p(2,Vn,Nt)),xn+=kn,Rr=Nt}else++Nt;Rr<kt&&Et.splice(xn,0,new p(1,Rr,kt))}return k=="ltr"&&(Et[0].level==1&&(Cr=g.match(/^\s+/))&&(Et[0].from=Cr[0].length,Et.unshift(new p(0,0,Cr[0].length))),D(Et).level==1&&(Cr=g.match(/\s+$/))&&(D(Et).to-=Cr[0].length,Et.push(new p(0,z-Cr[0].length,z)))),k=="rtl"?Et.reverse():Et}}();function dt(e,t){var i=e.order;return i==null&&(i=e.order=mt(e.text,t)),i}var nr=[],Ce=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]||nr).concat(i)}};function _r(e,t){return e._handlers&&e._handlers[t]||nr}function Ze(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=G(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Te(e,t){var i=_r(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 lt(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,i||t.type,e,t),Zt(t)||t.codemirrorIgnore}function On(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)G(i,t[n])==-1&&i.push(t[n])}function Ct(e,t){return _r(e,t).length>0}function mr(e){e.prototype.on=function(t,i){Ce(this,t,i)},e.prototype.off=function(t,i){Ze(this,t,i)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function En(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function cn(e){Pt(e),En(e)}function Br(e){return e.target||e.srcElement}function po(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),he&&e.ctrlKey&&t==1&&(t=3),t}var gi=function(){if(y&&x<9)return!1;var e=U("div");return"draggable"in e||"dragDrop"in e}(),Dt;function go(e){if(Dt==null){var t=U("span","\u200B");I(e,U("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=Dt?U("span","\u200B"):U("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var vi;function yr(e){if(vi!=null)return vi;var t=I(e,document.createTextNode("A\u062EA")),i=Z(t,0,1).getBoundingClientRect(),n=Z(t,1,2).getBoundingClientRect();return We(e),!i||i.left==i.right?!1:vi=n.right-i.right<3}var mi=`
1
+ function Ys(r,l){const s=Object.create(null),u=r.split(",");for(let c=0;c<u.length;c++)s[u[c]]=!0;return l?c=>!!s[c.toLowerCase()]:c=>!!s[c]}const Wp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Bp=Ys(Wp);function wc(r){return!!r||r===""}function gl(r){if(Re(r)){const l={};for(let s=0;s<r.length;s++){const u=r[s],c=Mt(u)?jp(u):gl(u);if(c)for(const h in c)l[h]=c[h]}return l}else{if(Mt(r))return r;if(St(r))return r}}const Up=/;(?![^(]*\))/g,Kp=/:(.+)/;function jp(r){const l={};return r.split(Up).forEach(s=>{if(s){const u=s.split(Kp);u.length>1&&(l[u[0].trim()]=u[1].trim())}}),l}function $s(r){let l="";if(Mt(r))l=r;else if(Re(r))for(let s=0;s<r.length;s++){const u=$s(r[s]);u&&(l+=u+" ")}else if(St(r))for(const s in r)r[s]&&(l+=s+" ");return l.trim()}const p0=r=>Mt(r)?r:r==null?"":Re(r)||St(r)&&(r.toString===Cc||!He(r.toString))?JSON.stringify(r,xc,2):String(r),xc=(r,l)=>l&&l.__v_isRef?xc(r,l.value):li(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((s,[u,c])=>(s[`${u} =>`]=c,s),{})}:kc(l)?{[`Set(${l.size})`]:[...l.values()]}:St(l)&&!Re(l)&&!Tc(l)?String(l):l,rt={},oi=[],gr=()=>{},qp=()=>!1,Gp=/^on[^a-z]/,vl=r=>Gp.test(r),Xs=r=>r.startsWith("onUpdate:"),Ut=Object.assign,Zs=(r,l)=>{const s=r.indexOf(l);s>-1&&r.splice(s,1)},Yp=Object.prototype.hasOwnProperty,Ge=(r,l)=>Yp.call(r,l),Re=Array.isArray,li=r=>ml(r)==="[object Map]",kc=r=>ml(r)==="[object Set]",He=r=>typeof r=="function",Mt=r=>typeof r=="string",Js=r=>typeof r=="symbol",St=r=>r!==null&&typeof r=="object",Sc=r=>St(r)&&He(r.then)&&He(r.catch),Cc=Object.prototype.toString,ml=r=>Cc.call(r),$p=r=>ml(r).slice(8,-1),Tc=r=>ml(r)==="[object Object]",Qs=r=>Mt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,tl=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yl=r=>{const l=Object.create(null);return s=>l[s]||(l[s]=r(s))},Xp=/-(\w)/g,Pr=yl(r=>r.replace(Xp,(l,s)=>s?s.toUpperCase():"")),Zp=/\B([A-Z])/g,ci=yl(r=>r.replace(Zp,"-$1").toLowerCase()),bl=yl(r=>r.charAt(0).toUpperCase()+r.slice(1)),ys=yl(r=>r?`on${bl(r)}`:""),lo=(r,l)=>!Object.is(r,l),bs=(r,l)=>{for(let s=0;s<r.length;s++)r[s](l)},ol=(r,l,s)=>{Object.defineProperty(r,l,{configurable:!0,enumerable:!1,value:s})},Jp=r=>{const l=parseFloat(r);return isNaN(l)?r:l};let wf;const Qp=()=>wf||(wf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let or;class Vp{constructor(l=!1){this.active=!0,this.effects=[],this.cleanups=[],!l&&or&&(this.parent=or,this.index=(or.scopes||(or.scopes=[])).push(this)-1)}run(l){if(this.active)try{return or=this,l()}finally{or=this.parent}}on(){or=this}off(){or=this.parent}stop(l){if(this.active){let s,u;for(s=0,u=this.effects.length;s<u;s++)this.effects[s].stop();for(s=0,u=this.cleanups.length;s<u;s++)this.cleanups[s]();if(this.scopes)for(s=0,u=this.scopes.length;s<u;s++)this.scopes[s].stop(!0);if(this.parent&&!l){const c=this.parent.scopes.pop();c&&c!==this&&(this.parent.scopes[this.index]=c,c.index=this.index)}this.active=!1}}}function eg(r,l=or){l&&l.active&&l.effects.push(r)}function tg(){return or}function rg(r){or&&or.cleanups.push(r)}const Vs=r=>{const l=new Set(r);return l.w=0,l.n=0,l},Lc=r=>(r.w&sn)>0,Mc=r=>(r.n&sn)>0,ng=({deps:r})=>{if(r.length)for(let l=0;l<r.length;l++)r[l].w|=sn},ig=r=>{const{deps:l}=r;if(l.length){let s=0;for(let u=0;u<l.length;u++){const c=l[u];Lc(c)&&!Mc(c)?c.delete(r):l[s++]=c,c.w&=~sn,c.n&=~sn}l.length=s}},Ps=new WeakMap;let Qi=0,sn=1;const _s=30;let Mr;const Mn=Symbol(""),Os=Symbol("");class ea{constructor(l,s=null,u){this.fn=l,this.scheduler=s,this.active=!0,this.deps=[],this.parent=void 0,eg(this,u)}run(){if(!this.active)return this.fn();let l=Mr,s=on;for(;l;){if(l===this)return;l=l.parent}try{return this.parent=Mr,Mr=this,on=!0,sn=1<<++Qi,Qi<=_s?ng(this):xf(this),this.fn()}finally{Qi<=_s&&ig(this),sn=1<<--Qi,Mr=this.parent,on=s,this.parent=void 0}}stop(){this.active&&(xf(this),this.onStop&&this.onStop(),this.active=!1)}}function xf(r){const{deps:l}=r;if(l.length){for(let s=0;s<l.length;s++)l[s].delete(r);l.length=0}}let on=!0;const Pc=[];function di(){Pc.push(on),on=!1}function hi(){const r=Pc.pop();on=r===void 0?!0:r}function rr(r,l,s){if(on&&Mr){let u=Ps.get(r);u||Ps.set(r,u=new Map);let c=u.get(s);c||u.set(s,c=Vs()),_c(c)}}function _c(r,l){let s=!1;Qi<=_s?Mc(r)||(r.n|=sn,s=!Lc(r)):s=!r.has(Mr),s&&(r.add(Mr),Mr.deps.push(r))}function Hr(r,l,s,u,c,h){const m=Ps.get(r);if(!m)return;let b=[];if(l==="clear")b=[...m.values()];else if(s==="length"&&Re(r))m.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(s!==void 0&&b.push(m.get(s)),l){case"add":Re(r)?Qs(s)&&b.push(m.get("length")):(b.push(m.get(Mn)),li(r)&&b.push(m.get(Os)));break;case"delete":Re(r)||(b.push(m.get(Mn)),li(r)&&b.push(m.get(Os)));break;case"set":li(r)&&b.push(m.get(Mn));break}if(b.length===1)b[0]&&Es(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);Es(Vs(y))}}function Es(r,l){for(const s of Re(r)?r:[...r])(s!==Mr||s.allowRecurse)&&(s.scheduler?s.scheduler():s.run())}const og=Ys("__proto__,__v_isRef,__isVue"),Oc=new Set(Object.getOwnPropertyNames(Symbol).map(r=>Symbol[r]).filter(Js)),lg=ta(),sg=ta(!1,!0),ag=ta(!0),kf=ug();function ug(){const r={};return["includes","indexOf","lastIndexOf"].forEach(l=>{r[l]=function(...s){const u=Xe(this);for(let h=0,m=this.length;h<m;h++)rr(u,"get",h+"");const c=u[l](...s);return c===-1||c===!1?u[l](...s.map(Xe)):c}}),["push","pop","shift","unshift","splice"].forEach(l=>{r[l]=function(...s){di();const u=Xe(this)[l].apply(this,s);return hi(),u}}),r}function ta(r=!1,l=!1){return function(u,c,h){if(c==="__v_isReactive")return!r;if(c==="__v_isReadonly")return r;if(c==="__v_isShallow")return l;if(c==="__v_raw"&&h===(r?l?Tg:Dc:l?zc:Nc).get(u))return u;const m=Re(u);if(!r&&m&&Ge(kf,c))return Reflect.get(kf,c,h);const b=Reflect.get(u,c,h);return(Js(c)?Oc.has(c):og(c))||(r||rr(u,"get",c),l)?b:gt(b)?!m||!Qs(c)?b.value:b:St(b)?r?Rc(b):po(b):b}}const fg=Ec(),cg=Ec(!0);function Ec(r=!1){return function(s,u,c,h){let m=s[u];if(so(m)&&gt(m)&&!gt(c))return!1;if(!r&&!so(c)&&(Ic(c)||(c=Xe(c),m=Xe(m)),!Re(s)&&gt(m)&&!gt(c)))return m.value=c,!0;const b=Re(s)&&Qs(u)?Number(u)<s.length:Ge(s,u),y=Reflect.set(s,u,c,h);return s===Xe(h)&&(b?lo(c,m)&&Hr(s,"set",u,c):Hr(s,"add",u,c)),y}}function dg(r,l){const s=Ge(r,l);r[l];const u=Reflect.deleteProperty(r,l);return u&&s&&Hr(r,"delete",l,void 0),u}function hg(r,l){const s=Reflect.has(r,l);return(!Js(l)||!Oc.has(l))&&rr(r,"has",l),s}function pg(r){return rr(r,"iterate",Re(r)?"length":Mn),Reflect.ownKeys(r)}const Ac={get:lg,set:fg,deleteProperty:dg,has:hg,ownKeys:pg},gg={get:ag,set(r,l){return!0},deleteProperty(r,l){return!0}},vg=Ut({},Ac,{get:sg,set:cg}),ra=r=>r,wl=r=>Reflect.getPrototypeOf(r);function Xo(r,l,s=!1,u=!1){r=r.__v_raw;const c=Xe(r),h=Xe(l);l!==h&&!s&&rr(c,"get",l),!s&&rr(c,"get",h);const{has:m}=wl(c),b=u?ra:s?oa:ao;if(m.call(c,l))return b(r.get(l));if(m.call(c,h))return b(r.get(h));r!==c&&r.get(l)}function Zo(r,l=!1){const s=this.__v_raw,u=Xe(s),c=Xe(r);return r!==c&&!l&&rr(u,"has",r),!l&&rr(u,"has",c),r===c?s.has(r):s.has(r)||s.has(c)}function Jo(r,l=!1){return r=r.__v_raw,!l&&rr(Xe(r),"iterate",Mn),Reflect.get(r,"size",r)}function Sf(r){r=Xe(r);const l=Xe(this);return wl(l).has.call(l,r)||(l.add(r),Hr(l,"add",r,r)),this}function Cf(r,l){l=Xe(l);const s=Xe(this),{has:u,get:c}=wl(s);let h=u.call(s,r);h||(r=Xe(r),h=u.call(s,r));const m=c.call(s,r);return s.set(r,l),h?lo(l,m)&&Hr(s,"set",r,l):Hr(s,"add",r,l),this}function Tf(r){const l=Xe(this),{has:s,get:u}=wl(l);let c=s.call(l,r);c||(r=Xe(r),c=s.call(l,r)),u&&u.call(l,r);const h=l.delete(r);return c&&Hr(l,"delete",r,void 0),h}function Lf(){const r=Xe(this),l=r.size!==0,s=r.clear();return l&&Hr(r,"clear",void 0,void 0),s}function Qo(r,l){return function(u,c){const h=this,m=h.__v_raw,b=Xe(m),y=l?ra:r?oa:ao;return!r&&rr(b,"iterate",Mn),m.forEach((x,S)=>u.call(c,y(x),y(S),h))}}function Vo(r,l,s){return function(...u){const c=this.__v_raw,h=Xe(c),m=li(h),b=r==="entries"||r===Symbol.iterator&&m,y=r==="keys"&&m,x=c[r](...u),S=s?ra:l?oa:ao;return!l&&rr(h,"iterate",y?Os:Mn),{next(){const{value:P,done:_}=x.next();return _?{value:P,done:_}:{value:b?[S(P[0]),S(P[1])]:S(P),done:_}},[Symbol.iterator](){return this}}}}function Qr(r){return function(...l){return r==="delete"?!1:this}}function mg(){const r={get(h){return Xo(this,h)},get size(){return Jo(this)},has:Zo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Qo(!1,!1)},l={get(h){return Xo(this,h,!1,!0)},get size(){return Jo(this)},has:Zo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Qo(!1,!0)},s={get(h){return Xo(this,h,!0)},get size(){return Jo(this,!0)},has(h){return Zo.call(this,h,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:Qo(!0,!1)},u={get(h){return Xo(this,h,!0,!0)},get size(){return Jo(this,!0)},has(h){return Zo.call(this,h,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:Qo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(h=>{r[h]=Vo(h,!1,!1),s[h]=Vo(h,!0,!1),l[h]=Vo(h,!1,!0),u[h]=Vo(h,!0,!0)}),[r,s,l,u]}const[yg,bg,wg,xg]=mg();function na(r,l){const s=l?r?xg:wg:r?bg:yg;return(u,c,h)=>c==="__v_isReactive"?!r:c==="__v_isReadonly"?r:c==="__v_raw"?u:Reflect.get(Ge(s,c)&&c in u?s:u,c,h)}const kg={get:na(!1,!1)},Sg={get:na(!1,!0)},Cg={get:na(!0,!1)},Nc=new WeakMap,zc=new WeakMap,Dc=new WeakMap,Tg=new WeakMap;function Lg(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mg(r){return r.__v_skip||!Object.isExtensible(r)?0:Lg($p(r))}function po(r){return so(r)?r:ia(r,!1,Ac,kg,Nc)}function Pg(r){return ia(r,!1,vg,Sg,zc)}function Rc(r){return ia(r,!0,gg,Cg,Dc)}function ia(r,l,s,u,c){if(!St(r)||r.__v_raw&&!(l&&r.__v_isReactive))return r;const h=c.get(r);if(h)return h;const m=Mg(r);if(m===0)return r;const b=new Proxy(r,m===2?u:s);return c.set(r,b),b}function si(r){return so(r)?si(r.__v_raw):!!(r&&r.__v_isReactive)}function so(r){return!!(r&&r.__v_isReadonly)}function Ic(r){return!!(r&&r.__v_isShallow)}function Fc(r){return si(r)||so(r)}function Xe(r){const l=r&&r.__v_raw;return l?Xe(l):r}function Hc(r){return ol(r,"__v_skip",!0),r}const ao=r=>St(r)?po(r):r,oa=r=>St(r)?Rc(r):r;function Wc(r){on&&Mr&&(r=Xe(r),_c(r.dep||(r.dep=Vs())))}function Bc(r,l){r=Xe(r),r.dep&&Es(r.dep)}function gt(r){return!!(r&&r.__v_isRef===!0)}function Yt(r){return Uc(r,!1)}function eo(r){return Uc(r,!0)}function Uc(r,l){return gt(r)?r:new _g(r,l)}class _g{constructor(l,s){this.__v_isShallow=s,this.dep=void 0,this.__v_isRef=!0,this._rawValue=s?l:Xe(l),this._value=s?l:ao(l)}get value(){return Wc(this),this._value}set value(l){l=this.__v_isShallow?l:Xe(l),lo(l,this._rawValue)&&(this._rawValue=l,this._value=this.__v_isShallow?l:ao(l),Bc(this))}}function ot(r){return gt(r)?r.value:r}const Og={get:(r,l,s)=>ot(Reflect.get(r,l,s)),set:(r,l,s,u)=>{const c=r[l];return gt(c)&&!gt(s)?(c.value=s,!0):Reflect.set(r,l,s,u)}};function Kc(r){return si(r)?r:new Proxy(r,Og)}class Eg{constructor(l,s,u){this._object=l,this._key=s,this._defaultValue=u,this.__v_isRef=!0}get value(){const l=this._object[this._key];return l===void 0?this._defaultValue:l}set value(l){this._object[this._key]=l}}function g0(r,l,s){const u=r[l];return gt(u)?u:new Eg(r,l,s)}class Ag{constructor(l,s,u,c){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ea(l,()=>{this._dirty||(this._dirty=!0,Bc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!c,this.__v_isReadonly=u}get value(){const l=Xe(this);return Wc(l),(l._dirty||!l._cacheable)&&(l._dirty=!1,l._value=l.effect.run()),l._value}set value(l){this._setter(l)}}function Ng(r,l,s=!1){let u,c;const h=He(r);return h?(u=r,c=gr):(u=r.get,c=r.set),new Ag(u,c,h||!c,s)}Promise.resolve();function ln(r,l,s,u){let c;try{c=u?r(...u):r()}catch(h){xl(h,l,s)}return c}function vr(r,l,s,u){if(He(r)){const h=ln(r,l,s,u);return h&&Sc(h)&&h.catch(m=>{xl(m,l,s)}),h}const c=[];for(let h=0;h<r.length;h++)c.push(vr(r[h],l,s,u));return c}function xl(r,l,s,u=!0){const c=l?l.vnode:null;if(l){let h=l.parent;const m=l.proxy,b=s;for(;h;){const x=h.ec;if(x){for(let S=0;S<x.length;S++)if(x[S](r,m,b)===!1)return}h=h.parent}const y=l.appContext.config.errorHandler;if(y){ln(y,null,10,[r,m,b]);return}}zg(r,s,c,u)}function zg(r,l,s,u=!0){console.error(r)}let ll=!1,As=!1;const tr=[];let Ir=0;const to=[];let Vi=null,ti=0;const ro=[];let tn=null,ri=0;const jc=Promise.resolve();let la=null,Ns=null;function sa(r){const l=la||jc;return r?l.then(this?r.bind(this):r):l}function Dg(r){let l=Ir+1,s=tr.length;for(;l<s;){const u=l+s>>>1;uo(tr[u])<r?l=u+1:s=u}return l}function qc(r){(!tr.length||!tr.includes(r,ll&&r.allowRecurse?Ir+1:Ir))&&r!==Ns&&(r.id==null?tr.push(r):tr.splice(Dg(r.id),0,r),Gc())}function Gc(){!ll&&!As&&(As=!0,la=jc.then(Xc))}function Rg(r){const l=tr.indexOf(r);l>Ir&&tr.splice(l,1)}function Yc(r,l,s,u){Re(r)?s.push(...r):(!l||!l.includes(r,r.allowRecurse?u+1:u))&&s.push(r),Gc()}function Ig(r){Yc(r,Vi,to,ti)}function Fg(r){Yc(r,tn,ro,ri)}function aa(r,l=null){if(to.length){for(Ns=l,Vi=[...new Set(to)],to.length=0,ti=0;ti<Vi.length;ti++)Vi[ti]();Vi=null,ti=0,Ns=null,aa(r,l)}}function $c(r){if(ro.length){const l=[...new Set(ro)];if(ro.length=0,tn){tn.push(...l);return}for(tn=l,tn.sort((s,u)=>uo(s)-uo(u)),ri=0;ri<tn.length;ri++)tn[ri]();tn=null,ri=0}}const uo=r=>r.id==null?1/0:r.id;function Xc(r){As=!1,ll=!0,aa(r),tr.sort((s,u)=>uo(s)-uo(u));const l=gr;try{for(Ir=0;Ir<tr.length;Ir++){const s=tr[Ir];s&&s.active!==!1&&ln(s,null,14)}}finally{Ir=0,tr.length=0,$c(),ll=!1,la=null,(tr.length||to.length||ro.length)&&Xc(r)}}function Hg(r,l,...s){const u=r.vnode.props||rt;let c=s;const h=l.startsWith("update:"),m=h&&l.slice(7);if(m&&m in u){const S=`${m==="modelValue"?"model":m}Modifiers`,{number:P,trim:_}=u[S]||rt;_?c=s.map(N=>N.trim()):P&&(c=s.map(Jp))}let b,y=u[b=ys(l)]||u[b=ys(Pr(l))];!y&&h&&(y=u[b=ys(ci(l))]),y&&vr(y,r,6,c);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,vr(x,r,6,c)}}function Zc(r,l,s=!1){const u=l.emitsCache,c=u.get(r);if(c!==void 0)return c;const h=r.emits;let m={},b=!1;if(!He(r)){const y=x=>{const S=Zc(x,l,!0);S&&(b=!0,Ut(m,S))};!s&&l.mixins.length&&l.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!h&&!b?(u.set(r,null),null):(Re(h)?h.forEach(y=>m[y]=null):Ut(m,h),u.set(r,m),m)}function ua(r,l){return!r||!vl(l)?!1:(l=l.slice(2).replace(/Once$/,""),Ge(r,l[0].toLowerCase()+l.slice(1))||Ge(r,ci(l))||Ge(r,l))}let lr=null,Jc=null;function sl(r){const l=lr;return lr=r,Jc=r&&r.type.__scopeId||null,l}function Wg(r,l=lr,s){if(!l||r._n)return r;const u=(...c)=>{u._d&&Rf(-1);const h=sl(l),m=r(...c);return sl(h),u._d&&Rf(1),m};return u._n=!0,u._c=!0,u._d=!0,u}function ws(r){const{type:l,vnode:s,proxy:u,withProxy:c,props:h,propsOptions:[m],slots:b,attrs:y,emit:x,render:S,renderCache:P,data:_,setupState:N,ctx:H,inheritAttrs:V}=r;let X,te;const J=sl(r);try{if(s.shapeFlag&4){const he=c||u;X=Lr(S.call(he,he,P,h,N,_,H)),te=y}else{const he=l;X=Lr(he.length>1?he(h,{attrs:y,slots:b,emit:x}):he(h,null)),te=l.props?y:Bg(y)}}catch(he){no.length=0,xl(he,r,1),X=$t(an)}let ne=X;if(te&&V!==!1){const he=Object.keys(te),{shapeFlag:Ae}=ne;he.length&&Ae&(1|6)&&(m&&he.some(Xs)&&(te=Ug(te,m)),ne=fo(ne,te))}return s.dirs&&(ne.dirs=ne.dirs?ne.dirs.concat(s.dirs):s.dirs),s.transition&&(ne.transition=s.transition),X=ne,sl(J),X}const Bg=r=>{let l;for(const s in r)(s==="class"||s==="style"||vl(s))&&((l||(l={}))[s]=r[s]);return l},Ug=(r,l)=>{const s={};for(const u in r)(!Xs(u)||!(u.slice(9)in l))&&(s[u]=r[u]);return s};function Kg(r,l,s){const{props:u,children:c,component:h}=r,{props:m,children:b,patchFlag:y}=l,x=h.emitsOptions;if(l.dirs||l.transition)return!0;if(s&&y>=0){if(y&1024)return!0;if(y&16)return u?Mf(u,m,x):!!m;if(y&8){const S=l.dynamicProps;for(let P=0;P<S.length;P++){const _=S[P];if(m[_]!==u[_]&&!ua(x,_))return!0}}}else return(c||b)&&(!b||!b.$stable)?!0:u===m?!1:u?m?Mf(u,m,x):!0:!!m;return!1}function Mf(r,l,s){const u=Object.keys(l);if(u.length!==Object.keys(r).length)return!0;for(let c=0;c<u.length;c++){const h=u[c];if(l[h]!==r[h]&&!ua(s,h))return!0}return!1}function jg({vnode:r,parent:l},s){for(;l&&l.subTree===r;)(r=l.vnode).el=s,l=l.parent}const qg=r=>r.__isSuspense;function Gg(r,l){l&&l.pendingBranch?Re(r)?l.effects.push(...r):l.effects.push(r):Fg(r)}function rl(r,l){if(Lt){let s=Lt.provides;const u=Lt.parent&&Lt.parent.provides;u===s&&(s=Lt.provides=Object.create(u)),s[r]=l}}function Fr(r,l,s=!1){const u=Lt||lr;if(u){const c=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(c&&r in c)return c[r];if(arguments.length>1)return s&&He(l)?l.call(u.proxy):l}}function Yg(r,l){return fa(r,null,l)}const Pf={};function Xt(r,l,s){return fa(r,l,s)}function fa(r,l,{immediate:s,deep:u,flush:c,onTrack:h,onTrigger:m}=rt){const b=Lt;let y,x=!1,S=!1;if(gt(r)?(y=()=>r.value,x=Ic(r)):si(r)?(y=()=>r,u=!0):Re(r)?(S=!0,x=r.some(si),y=()=>r.map(te=>{if(gt(te))return te.value;if(si(te))return ii(te);if(He(te))return ln(te,b,2)})):He(r)?l?y=()=>ln(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return P&&P(),vr(r,b,3,[_])}:y=gr,l&&u){const te=y;y=()=>ii(te())}let P,_=te=>{P=X.onStop=()=>{ln(te,b,4)}};if(co)return _=gr,l?s&&vr(l,b,3,[y(),S?[]:void 0,_]):y(),gr;let N=S?[]:Pf;const H=()=>{if(!!X.active)if(l){const te=X.run();(u||x||(S?te.some((J,ne)=>lo(J,N[ne])):lo(te,N)))&&(P&&P(),vr(l,b,3,[te,N===Pf?void 0:N,_]),N=te)}else X.run()};H.allowRecurse=!!l;let V;c==="sync"?V=H:c==="post"?V=()=>Gt(H,b&&b.suspense):V=()=>{!b||b.isMounted?Ig(H):H()};const X=new ea(y,V);return l?s?H():N=X.run():c==="post"?Gt(X.run.bind(X),b&&b.suspense):X.run(),()=>{X.stop(),b&&b.scope&&Zs(b.scope.effects,X)}}function $g(r,l,s){const u=this.proxy,c=Mt(r)?r.includes(".")?Qc(u,r):()=>u[r]:r.bind(u,u);let h;He(l)?h=l:(h=l.handler,s=l);const m=Lt;ai(this);const b=fa(c,h.bind(u),s);return m?ai(m):_n(),b}function Qc(r,l){const s=l.split(".");return()=>{let u=r;for(let c=0;c<s.length&&u;c++)u=u[s[c]];return u}}function ii(r,l){if(!St(r)||r.__v_skip||(l=l||new Set,l.has(r)))return r;if(l.add(r),gt(r))ii(r.value,l);else if(Re(r))for(let s=0;s<r.length;s++)ii(r[s],l);else if(kc(r)||li(r))r.forEach(s=>{ii(s,l)});else if(Tc(r))for(const s in r)ii(r[s],l);return r}function Vc(r){return He(r)?{setup:r,name:r.name}:r}const zs=r=>!!r.type.__asyncLoader,ed=r=>r.type.__isKeepAlive;function Xg(r,l){td(r,"a",l)}function Zg(r,l){td(r,"da",l)}function td(r,l,s=Lt){const u=r.__wdc||(r.__wdc=()=>{let c=s;for(;c;){if(c.isDeactivated)return;c=c.parent}return r()});if(kl(l,u,s),s){let c=s.parent;for(;c&&c.parent;)ed(c.parent.vnode)&&Jg(u,l,s,c),c=c.parent}}function Jg(r,l,s,u){const c=kl(l,r,u,!0);nd(()=>{Zs(u[l],c)},s)}function kl(r,l,s=Lt,u=!1){if(s){const c=s[r]||(s[r]=[]),h=l.__weh||(l.__weh=(...m)=>{if(s.isUnmounted)return;di(),ai(s);const b=vr(l,s,r,m);return _n(),hi(),b});return u?c.unshift(h):c.push(h),h}}const Wr=r=>(l,s=Lt)=>(!co||r==="sp")&&kl(r,l,s),Qg=Wr("bm"),rd=Wr("m"),Vg=Wr("bu"),ev=Wr("u"),tv=Wr("bum"),nd=Wr("um"),rv=Wr("sp"),nv=Wr("rtg"),iv=Wr("rtc");function ov(r,l=Lt){kl("ec",r,l)}let Ds=!0;function lv(r){const l=od(r),s=r.proxy,u=r.ctx;Ds=!1,l.beforeCreate&&_f(l.beforeCreate,r,"bc");const{data:c,computed:h,methods:m,watch:b,provide:y,inject:x,created:S,beforeMount:P,mounted:_,beforeUpdate:N,updated:H,activated:V,deactivated:X,beforeDestroy:te,beforeUnmount:J,destroyed:ne,unmounted:he,render:Ae,renderTracked:Fe,renderTriggered:Ke,errorCaptured:tt,serverPrefetch:Be,expose:xe,inheritAttrs:me,components:We,directives:I,filters:U}=l;if(x&&sv(x,u,null,r.appContext.config.unwrapInjectedRef),m)for(const K in m){const se=m[K];He(se)&&(u[K]=se.bind(s))}if(c){const K=c.call(s,s);St(K)&&(r.data=po(K))}if(Ds=!0,h)for(const K in h){const se=h[K],_e=He(se)?se.bind(s,s):He(se.get)?se.get.bind(s,s):gr,Ye=!He(se)&&He(se.set)?se.set.bind(s):gr,nt=zt({get:_e,set:Ye});Object.defineProperty(u,K,{enumerable:!0,configurable:!0,get:()=>nt.value,set:ct=>nt.value=ct})}if(b)for(const K in b)id(b[K],u,s,K);if(y){const K=He(y)?y.call(s):y;Reflect.ownKeys(K).forEach(se=>{rl(se,K[se])})}S&&_f(S,r,"c");function Z(K,se){Re(se)?se.forEach(_e=>K(_e.bind(s))):se&&K(se.bind(s))}if(Z(Qg,P),Z(rd,_),Z(Vg,N),Z(ev,H),Z(Xg,V),Z(Zg,X),Z(ov,tt),Z(iv,Fe),Z(nv,Ke),Z(tv,J),Z(nd,he),Z(rv,Be),Re(xe))if(xe.length){const K=r.exposed||(r.exposed={});xe.forEach(se=>{Object.defineProperty(K,se,{get:()=>s[se],set:_e=>s[se]=_e})})}else r.exposed||(r.exposed={});Ae&&r.render===gr&&(r.render=Ae),me!=null&&(r.inheritAttrs=me),We&&(r.components=We),I&&(r.directives=I)}function sv(r,l,s=gr,u=!1){Re(r)&&(r=Rs(r));for(const c in r){const h=r[c];let m;St(h)?"default"in h?m=Fr(h.from||c,h.default,!0):m=Fr(h.from||c):m=Fr(h),gt(m)&&u?Object.defineProperty(l,c,{enumerable:!0,configurable:!0,get:()=>m.value,set:b=>m.value=b}):l[c]=m}}function _f(r,l,s){vr(Re(r)?r.map(u=>u.bind(l.proxy)):r.bind(l.proxy),l,s)}function id(r,l,s,u){const c=u.includes(".")?Qc(s,u):()=>s[u];if(Mt(r)){const h=l[r];He(h)&&Xt(c,h)}else if(He(r))Xt(c,r.bind(s));else if(St(r))if(Re(r))r.forEach(h=>id(h,l,s,u));else{const h=He(r.handler)?r.handler.bind(s):l[r.handler];He(h)&&Xt(c,h,r)}}function od(r){const l=r.type,{mixins:s,extends:u}=l,{mixins:c,optionsCache:h,config:{optionMergeStrategies:m}}=r.appContext,b=h.get(l);let y;return b?y=b:!c.length&&!s&&!u?y=l:(y={},c.length&&c.forEach(x=>al(y,x,m,!0)),al(y,l,m)),h.set(l,y),y}function al(r,l,s,u=!1){const{mixins:c,extends:h}=l;h&&al(r,h,s,!0),c&&c.forEach(m=>al(r,m,s,!0));for(const m in l)if(!(u&&m==="expose")){const b=av[m]||s&&s[m];r[m]=b?b(r[m],l[m]):l[m]}return r}const av={data:Of,props:Tn,emits:Tn,methods:Tn,computed:Tn,beforeCreate:Bt,created:Bt,beforeMount:Bt,mounted:Bt,beforeUpdate:Bt,updated:Bt,beforeDestroy:Bt,beforeUnmount:Bt,destroyed:Bt,unmounted:Bt,activated:Bt,deactivated:Bt,errorCaptured:Bt,serverPrefetch:Bt,components:Tn,directives:Tn,watch:fv,provide:Of,inject:uv};function Of(r,l){return l?r?function(){return Ut(He(r)?r.call(this,this):r,He(l)?l.call(this,this):l)}:l:r}function uv(r,l){return Tn(Rs(r),Rs(l))}function Rs(r){if(Re(r)){const l={};for(let s=0;s<r.length;s++)l[r[s]]=r[s];return l}return r}function Bt(r,l){return r?[...new Set([].concat(r,l))]:l}function Tn(r,l){return r?Ut(Ut(Object.create(null),r),l):l}function fv(r,l){if(!r)return l;if(!l)return r;const s=Ut(Object.create(null),r);for(const u in l)s[u]=Bt(r[u],l[u]);return s}function cv(r,l,s,u=!1){const c={},h={};ol(h,Sl,1),r.propsDefaults=Object.create(null),ld(r,l,c,h);for(const m in r.propsOptions[0])m in c||(c[m]=void 0);s?r.props=u?c:Pg(c):r.type.props?r.props=c:r.props=h,r.attrs=h}function dv(r,l,s,u){const{props:c,attrs:h,vnode:{patchFlag:m}}=r,b=Xe(c),[y]=r.propsOptions;let x=!1;if((u||m>0)&&!(m&16)){if(m&8){const S=r.vnode.dynamicProps;for(let P=0;P<S.length;P++){let _=S[P];const N=l[_];if(y)if(Ge(h,_))N!==h[_]&&(h[_]=N,x=!0);else{const H=Pr(_);c[H]=Is(y,b,H,N,r,!1)}else N!==h[_]&&(h[_]=N,x=!0)}}}else{ld(r,l,c,h)&&(x=!0);let S;for(const P in b)(!l||!Ge(l,P)&&((S=ci(P))===P||!Ge(l,S)))&&(y?s&&(s[P]!==void 0||s[S]!==void 0)&&(c[P]=Is(y,b,P,void 0,r,!0)):delete c[P]);if(h!==b)for(const P in h)(!l||!Ge(l,P)&&!0)&&(delete h[P],x=!0)}x&&Hr(r,"set","$attrs")}function ld(r,l,s,u){const[c,h]=r.propsOptions;let m=!1,b;if(l)for(let y in l){if(tl(y))continue;const x=l[y];let S;c&&Ge(c,S=Pr(y))?!h||!h.includes(S)?s[S]=x:(b||(b={}))[S]=x:ua(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,m=!0)}if(h){const y=Xe(s),x=b||rt;for(let S=0;S<h.length;S++){const P=h[S];s[P]=Is(c,y,P,x[P],r,!Ge(x,P))}}return m}function Is(r,l,s,u,c,h){const m=r[s];if(m!=null){const b=Ge(m,"default");if(b&&u===void 0){const y=m.default;if(m.type!==Function&&He(y)){const{propsDefaults:x}=c;s in x?u=x[s]:(ai(c),u=x[s]=y.call(null,l),_n())}else u=y}m[0]&&(h&&!b?u=!1:m[1]&&(u===""||u===ci(s))&&(u=!0))}return u}function sd(r,l,s=!1){const u=l.propsCache,c=u.get(r);if(c)return c;const h=r.props,m={},b=[];let y=!1;if(!He(r)){const S=P=>{y=!0;const[_,N]=sd(P,l,!0);Ut(m,_),N&&b.push(...N)};!s&&l.mixins.length&&l.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!h&&!y)return u.set(r,oi),oi;if(Re(h))for(let S=0;S<h.length;S++){const P=Pr(h[S]);Ef(P)&&(m[P]=rt)}else if(h)for(const S in h){const P=Pr(S);if(Ef(P)){const _=h[S],N=m[P]=Re(_)||He(_)?{type:_}:_;if(N){const H=zf(Boolean,N.type),V=zf(String,N.type);N[0]=H>-1,N[1]=V<0||H<V,(H>-1||Ge(N,"default"))&&b.push(P)}}}const x=[m,b];return u.set(r,x),x}function Ef(r){return r[0]!=="$"}function Af(r){const l=r&&r.toString().match(/^\s*function (\w+)/);return l?l[1]:r===null?"null":""}function Nf(r,l){return Af(r)===Af(l)}function zf(r,l){return Re(l)?l.findIndex(s=>Nf(s,r)):He(l)&&Nf(l,r)?0:-1}const ad=r=>r[0]==="_"||r==="$stable",ca=r=>Re(r)?r.map(Lr):[Lr(r)],hv=(r,l,s)=>{const u=Wg((...c)=>ca(l(...c)),s);return u._c=!1,u},ud=(r,l,s)=>{const u=r._ctx;for(const c in r){if(ad(c))continue;const h=r[c];if(He(h))l[c]=hv(c,h,u);else if(h!=null){const m=ca(h);l[c]=()=>m}}},fd=(r,l)=>{const s=ca(l);r.slots.default=()=>s},pv=(r,l)=>{if(r.vnode.shapeFlag&32){const s=l._;s?(r.slots=Xe(l),ol(l,"_",s)):ud(l,r.slots={})}else r.slots={},l&&fd(r,l);ol(r.slots,Sl,1)},gv=(r,l,s)=>{const{vnode:u,slots:c}=r;let h=!0,m=rt;if(u.shapeFlag&32){const b=l._;b?s&&b===1?h=!1:(Ut(c,l),!s&&b===1&&delete c._):(h=!l.$stable,ud(l,c)),m=l}else l&&(fd(r,l),m={default:1});if(h)for(const b in c)!ad(b)&&!(b in m)&&delete c[b]};function Sn(r,l,s,u){const c=r.dirs,h=l&&l.dirs;for(let m=0;m<c.length;m++){const b=c[m];h&&(b.oldValue=h[m].value);let y=b.dir[u];y&&(di(),vr(y,s,8,[r.el,b,r,l]),hi())}}function cd(){return{app:null,config:{isNativeTag:qp,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 vv=0;function mv(r,l){return function(u,c=null){c!=null&&!St(c)&&(c=null);const h=cd(),m=new Set;let b=!1;const y=h.app={_uid:vv++,_component:u,_props:c,_container:null,_context:h,_instance:null,version:Bv,get config(){return h.config},set config(x){},use(x,...S){return m.has(x)||(x&&He(x.install)?(m.add(x),x.install(y,...S)):He(x)&&(m.add(x),x(y,...S))),y},mixin(x){return h.mixins.includes(x)||h.mixins.push(x),y},component(x,S){return S?(h.components[x]=S,y):h.components[x]},directive(x,S){return S?(h.directives[x]=S,y):h.directives[x]},mount(x,S,P){if(!b){const _=$t(u,c);return _.appContext=h,S&&l?l(_,x):r(_,x,P),b=!0,y._container=x,x.__vue_app__=y,ga(_.component)||_.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,S){return h.provides[x]=S,y}};return y}}function Fs(r,l,s,u,c=!1){if(Re(r)){r.forEach((_,N)=>Fs(_,l&&(Re(l)?l[N]:l),s,u,c));return}if(zs(u)&&!c)return;const h=u.shapeFlag&4?ga(u.component)||u.component.proxy:u.el,m=c?null:h,{i:b,r:y}=r,x=l&&l.r,S=b.refs===rt?b.refs={}:b.refs,P=b.setupState;if(x!=null&&x!==y&&(Mt(x)?(S[x]=null,Ge(P,x)&&(P[x]=null)):gt(x)&&(x.value=null)),He(y))ln(y,b,12,[m,S]);else{const _=Mt(y),N=gt(y);if(_||N){const H=()=>{if(r.f){const V=_?S[y]:y.value;c?Re(V)&&Zs(V,h):Re(V)?V.includes(h)||V.push(h):_?S[y]=[h]:(y.value=[h],r.k&&(S[r.k]=y.value))}else _?(S[y]=m,Ge(P,y)&&(P[y]=m)):gt(y)&&(y.value=m,r.k&&(S[r.k]=m))};m?(H.id=-1,Gt(H,s)):H()}}}const Gt=Gg;function yv(r){return bv(r)}function bv(r,l){const s=Qp();s.__VUE__=!0;const{insert:u,remove:c,patchProp:h,createElement:m,createText:b,createComment:y,setText:x,setElementText:S,parentNode:P,nextSibling:_,setScopeId:N=gr,cloneNode:H,insertStaticContent:V}=r,X=(M,E,D,B=null,Y=null,le=null,pe=!1,ae=null,Q=!!E.dynamicChildren)=>{if(M===E)return;M&&!Zi(M,E)&&(B=oe(M),Ne(M,Y,le,!0),M=null),E.patchFlag===-2&&(Q=!1,E.dynamicChildren=null);const{type:T,ref:R,shapeFlag:A}=E;switch(T){case da:te(M,E,D,B);break;case an:J(M,E,D,B);break;case xs:M==null&&ne(E,D,B,pe);break;case pr:I(M,E,D,B,Y,le,pe,ae,Q);break;default:A&1?Fe(M,E,D,B,Y,le,pe,ae,Q):A&6?U(M,E,D,B,Y,le,pe,ae,Q):(A&64||A&128)&&T.process(M,E,D,B,Y,le,pe,ae,Q,be)}R!=null&&Y&&Fs(R,M&&M.ref,le,E||M,!E)},te=(M,E,D,B)=>{if(M==null)u(E.el=b(E.children),D,B);else{const Y=E.el=M.el;E.children!==M.children&&x(Y,E.children)}},J=(M,E,D,B)=>{M==null?u(E.el=y(E.children||""),D,B):E.el=M.el},ne=(M,E,D,B)=>{[M.el,M.anchor]=V(M.children,E,D,B,M.el,M.anchor)},he=({el:M,anchor:E},D,B)=>{let Y;for(;M&&M!==E;)Y=_(M),u(M,D,B),M=Y;u(E,D,B)},Ae=({el:M,anchor:E})=>{let D;for(;M&&M!==E;)D=_(M),c(M),M=D;c(E)},Fe=(M,E,D,B,Y,le,pe,ae,Q)=>{pe=pe||E.type==="svg",M==null?Ke(E,D,B,Y,le,pe,ae,Q):xe(M,E,Y,le,pe,ae,Q)},Ke=(M,E,D,B,Y,le,pe,ae)=>{let Q,T;const{type:R,props:A,shapeFlag:ue,transition:Se,patchFlag:ze,dirs:Je}=M;if(M.el&&H!==void 0&&ze===-1)Q=M.el=H(M.el);else{if(Q=M.el=m(M.type,le,A&&A.is,A),ue&8?S(Q,M.children):ue&16&&Be(M.children,Q,null,B,Y,le&&R!=="foreignObject",pe,ae),Je&&Sn(M,null,B,"created"),A){for(const Ee in A)Ee!=="value"&&!tl(Ee)&&h(Q,Ee,null,A[Ee],le,M.children,B,Y,j);"value"in A&&h(Q,"value",null,A.value),(T=A.onVnodeBeforeMount)&&Tr(T,B,M)}tt(Q,M,M.scopeId,pe,B)}Je&&Sn(M,null,B,"beforeMount");const Ie=(!Y||Y&&!Y.pendingBranch)&&Se&&!Se.persisted;Ie&&Se.beforeEnter(Q),u(Q,E,D),((T=A&&A.onVnodeMounted)||Ie||Je)&&Gt(()=>{T&&Tr(T,B,M),Ie&&Se.enter(Q),Je&&Sn(M,null,B,"mounted")},Y)},tt=(M,E,D,B,Y)=>{if(D&&N(M,D),B)for(let le=0;le<B.length;le++)N(M,B[le]);if(Y){let le=Y.subTree;if(E===le){const pe=Y.vnode;tt(M,pe,pe.scopeId,pe.slotScopeIds,Y.parent)}}},Be=(M,E,D,B,Y,le,pe,ae,Q=0)=>{for(let T=Q;T<M.length;T++){const R=M[T]=ae?rn(M[T]):Lr(M[T]);X(null,R,E,D,B,Y,le,pe,ae)}},xe=(M,E,D,B,Y,le,pe)=>{const ae=E.el=M.el;let{patchFlag:Q,dynamicChildren:T,dirs:R}=E;Q|=M.patchFlag&16;const A=M.props||rt,ue=E.props||rt;let Se;D&&Cn(D,!1),(Se=ue.onVnodeBeforeUpdate)&&Tr(Se,D,E,M),R&&Sn(E,M,D,"beforeUpdate"),D&&Cn(D,!0);const ze=Y&&E.type!=="foreignObject";if(T?me(M.dynamicChildren,T,ae,D,B,ze,le):pe||_e(M,E,ae,null,D,B,ze,le,!1),Q>0){if(Q&16)We(ae,E,A,ue,D,B,Y);else if(Q&2&&A.class!==ue.class&&h(ae,"class",null,ue.class,Y),Q&4&&h(ae,"style",A.style,ue.style,Y),Q&8){const Je=E.dynamicProps;for(let Ie=0;Ie<Je.length;Ie++){const Ee=Je[Ie],mt=A[Ee],dt=ue[Ee];(dt!==mt||Ee==="value")&&h(ae,Ee,mt,dt,Y,M.children,D,B,j)}}Q&1&&M.children!==E.children&&S(ae,E.children)}else!pe&&T==null&&We(ae,E,A,ue,D,B,Y);((Se=ue.onVnodeUpdated)||R)&&Gt(()=>{Se&&Tr(Se,D,E,M),R&&Sn(E,M,D,"updated")},B)},me=(M,E,D,B,Y,le,pe)=>{for(let ae=0;ae<E.length;ae++){const Q=M[ae],T=E[ae],R=Q.el&&(Q.type===pr||!Zi(Q,T)||Q.shapeFlag&(6|64))?P(Q.el):D;X(Q,T,R,null,B,Y,le,pe,!0)}},We=(M,E,D,B,Y,le,pe)=>{if(D!==B){for(const ae in B){if(tl(ae))continue;const Q=B[ae],T=D[ae];Q!==T&&ae!=="value"&&h(M,ae,T,Q,pe,E.children,Y,le,j)}if(D!==rt)for(const ae in D)!tl(ae)&&!(ae in B)&&h(M,ae,D[ae],null,pe,E.children,Y,le,j);"value"in B&&h(M,"value",D.value,B.value)}},I=(M,E,D,B,Y,le,pe,ae,Q)=>{const T=E.el=M?M.el:b(""),R=E.anchor=M?M.anchor:b("");let{patchFlag:A,dynamicChildren:ue,slotScopeIds:Se}=E;Se&&(ae=ae?ae.concat(Se):Se),M==null?(u(T,D,B),u(R,D,B),Be(E.children,D,R,Y,le,pe,ae,Q)):A>0&&A&64&&ue&&M.dynamicChildren?(me(M.dynamicChildren,ue,D,Y,le,pe,ae),(E.key!=null||Y&&E===Y.subTree)&&dd(M,E,!0)):_e(M,E,D,R,Y,le,pe,ae,Q)},U=(M,E,D,B,Y,le,pe,ae,Q)=>{E.slotScopeIds=ae,M==null?E.shapeFlag&512?Y.ctx.activate(E,D,B,pe,Q):w(E,D,B,Y,le,pe,Q):Z(M,E,Q)},w=(M,E,D,B,Y,le,pe)=>{const ae=M.component=zv(M,B,Y);if(ed(M)&&(ae.ctx.renderer=be),Dv(ae),ae.asyncDep){if(Y&&Y.registerDep(ae,K),!M.el){const Q=ae.subTree=$t(an);J(null,Q,E,D)}return}K(ae,M,E,D,Y,le,pe)},Z=(M,E,D)=>{const B=E.component=M.component;if(Kg(M,E,D))if(B.asyncDep&&!B.asyncResolved){se(B,E,D);return}else B.next=E,Rg(B.update),B.update();else E.component=M.component,E.el=M.el,B.vnode=E},K=(M,E,D,B,Y,le,pe)=>{const ae=()=>{if(M.isMounted){let{next:R,bu:A,u:ue,parent:Se,vnode:ze}=M,Je=R,Ie;Cn(M,!1),R?(R.el=ze.el,se(M,R,pe)):R=ze,A&&bs(A),(Ie=R.props&&R.props.onVnodeBeforeUpdate)&&Tr(Ie,Se,R,ze),Cn(M,!0);const Ee=ws(M),mt=M.subTree;M.subTree=Ee,X(mt,Ee,P(mt.el),oe(mt),M,Y,le),R.el=Ee.el,Je===null&&jg(M,Ee.el),ue&&Gt(ue,Y),(Ie=R.props&&R.props.onVnodeUpdated)&&Gt(()=>Tr(Ie,Se,R,ze),Y)}else{let R;const{el:A,props:ue}=E,{bm:Se,m:ze,parent:Je}=M,Ie=zs(E);if(Cn(M,!1),Se&&bs(Se),!Ie&&(R=ue&&ue.onVnodeBeforeMount)&&Tr(R,Je,E),Cn(M,!0),A&&Le){const Ee=()=>{M.subTree=ws(M),Le(A,M.subTree,M,Y,null)};Ie?E.type.__asyncLoader().then(()=>!M.isUnmounted&&Ee()):Ee()}else{const Ee=M.subTree=ws(M);X(null,Ee,D,B,M,Y,le),E.el=Ee.el}if(ze&&Gt(ze,Y),!Ie&&(R=ue&&ue.onVnodeMounted)){const Ee=E;Gt(()=>Tr(R,Je,Ee),Y)}E.shapeFlag&256&&M.a&&Gt(M.a,Y),M.isMounted=!0,E=D=B=null}},Q=M.effect=new ea(ae,()=>qc(M.update),M.scope),T=M.update=Q.run.bind(Q);T.id=M.uid,Cn(M,!0),T()},se=(M,E,D)=>{E.component=M;const B=M.vnode.props;M.vnode=E,M.next=null,dv(M,E.props,B,D),gv(M,E.children,D),di(),aa(void 0,M.update),hi()},_e=(M,E,D,B,Y,le,pe,ae,Q=!1)=>{const T=M&&M.children,R=M?M.shapeFlag:0,A=E.children,{patchFlag:ue,shapeFlag:Se}=E;if(ue>0){if(ue&128){nt(T,A,D,B,Y,le,pe,ae,Q);return}else if(ue&256){Ye(T,A,D,B,Y,le,pe,ae,Q);return}}Se&8?(R&16&&j(T,Y,le),A!==T&&S(D,A)):R&16?Se&16?nt(T,A,D,B,Y,le,pe,ae,Q):j(T,Y,le,!0):(R&8&&S(D,""),Se&16&&Be(A,D,B,Y,le,pe,ae,Q))},Ye=(M,E,D,B,Y,le,pe,ae,Q)=>{M=M||oi,E=E||oi;const T=M.length,R=E.length,A=Math.min(T,R);let ue;for(ue=0;ue<A;ue++){const Se=E[ue]=Q?rn(E[ue]):Lr(E[ue]);X(M[ue],Se,D,null,Y,le,pe,ae,Q)}T>R?j(M,Y,le,!0,!1,A):Be(E,D,B,Y,le,pe,ae,Q,A)},nt=(M,E,D,B,Y,le,pe,ae,Q)=>{let T=0;const R=E.length;let A=M.length-1,ue=R-1;for(;T<=A&&T<=ue;){const Se=M[T],ze=E[T]=Q?rn(E[T]):Lr(E[T]);if(Zi(Se,ze))X(Se,ze,D,null,Y,le,pe,ae,Q);else break;T++}for(;T<=A&&T<=ue;){const Se=M[A],ze=E[ue]=Q?rn(E[ue]):Lr(E[ue]);if(Zi(Se,ze))X(Se,ze,D,null,Y,le,pe,ae,Q);else break;A--,ue--}if(T>A){if(T<=ue){const Se=ue+1,ze=Se<R?E[Se].el:B;for(;T<=ue;)X(null,E[T]=Q?rn(E[T]):Lr(E[T]),D,ze,Y,le,pe,ae,Q),T++}}else if(T>ue)for(;T<=A;)Ne(M[T],Y,le,!0),T++;else{const Se=T,ze=T,Je=new Map;for(T=ze;T<=ue;T++){const Ze=E[T]=Q?rn(E[T]):Lr(E[T]);Ze.key!=null&&Je.set(Ze.key,T)}let Ie,Ee=0;const mt=ue-ze+1;let dt=!1,nr=0;const Ce=new Array(mt);for(T=0;T<mt;T++)Ce[T]=0;for(T=Se;T<=A;T++){const Ze=M[T];if(Ee>=mt){Ne(Ze,Y,le,!0);continue}let Te;if(Ze.key!=null)Te=Je.get(Ze.key);else for(Ie=ze;Ie<=ue;Ie++)if(Ce[Ie-ze]===0&&Zi(Ze,E[Ie])){Te=Ie;break}Te===void 0?Ne(Ze,Y,le,!0):(Ce[Te-ze]=T+1,Te>=nr?nr=Te:dt=!0,X(Ze,E[Te],D,null,Y,le,pe,ae,Q),Ee++)}const _r=dt?wv(Ce):oi;for(Ie=_r.length-1,T=mt-1;T>=0;T--){const Ze=ze+T,Te=E[Ze],lt=Ze+1<R?E[Ze+1].el:B;Ce[T]===0?X(null,Te,D,lt,Y,le,pe,ae,Q):dt&&(Ie<0||T!==_r[Ie]?ct(Te,D,lt,2):Ie--)}}},ct=(M,E,D,B,Y=null)=>{const{el:le,type:pe,transition:ae,children:Q,shapeFlag:T}=M;if(T&6){ct(M.component.subTree,E,D,B);return}if(T&128){M.suspense.move(E,D,B);return}if(T&64){pe.move(M,E,D,be);return}if(pe===pr){u(le,E,D);for(let A=0;A<Q.length;A++)ct(Q[A],E,D,B);u(M.anchor,E,D);return}if(pe===xs){he(M,E,D);return}if(B!==2&&T&1&&ae)if(B===0)ae.beforeEnter(le),u(le,E,D),Gt(()=>ae.enter(le),Y);else{const{leave:A,delayLeave:ue,afterLeave:Se}=ae,ze=()=>u(le,E,D),Je=()=>{A(le,()=>{ze(),Se&&Se()})};ue?ue(le,ze,Je):Je()}else u(le,E,D)},Ne=(M,E,D,B=!1,Y=!1)=>{const{type:le,props:pe,ref:ae,children:Q,dynamicChildren:T,shapeFlag:R,patchFlag:A,dirs:ue}=M;if(ae!=null&&Fs(ae,null,D,M,!0),R&256){E.ctx.deactivate(M);return}const Se=R&1&&ue,ze=!zs(M);let Je;if(ze&&(Je=pe&&pe.onVnodeBeforeUnmount)&&Tr(Je,E,M),R&6)G(M.component,D,B);else{if(R&128){M.suspense.unmount(D,B);return}Se&&Sn(M,null,E,"beforeUnmount"),R&64?M.type.remove(M,E,D,Y,be,B):T&&(le!==pr||A>0&&A&64)?j(T,E,D,!1,!0):(le===pr&&A&(128|256)||!Y&&R&16)&&j(Q,E,D),B&&Ve(M)}(ze&&(Je=pe&&pe.onVnodeUnmounted)||Se)&&Gt(()=>{Je&&Tr(Je,E,M),Se&&Sn(M,null,E,"unmounted")},D)},Ve=M=>{const{type:E,el:D,anchor:B,transition:Y}=M;if(E===pr){W(D,B);return}if(E===xs){Ae(M);return}const le=()=>{c(D),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(M.shapeFlag&1&&Y&&!Y.persisted){const{leave:pe,delayLeave:ae}=Y,Q=()=>pe(D,le);ae?ae(M.el,le,Q):Q()}else le()},W=(M,E)=>{let D;for(;M!==E;)D=_(M),c(M),M=D;c(E)},G=(M,E,D)=>{const{bum:B,scope:Y,update:le,subTree:pe,um:ae}=M;B&&bs(B),Y.stop(),le&&(le.active=!1,Ne(pe,M,E,D)),ae&&Gt(ae,E),Gt(()=>{M.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&M.asyncDep&&!M.asyncResolved&&M.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},j=(M,E,D,B=!1,Y=!1,le=0)=>{for(let pe=le;pe<M.length;pe++)Ne(M[pe],E,D,B,Y)},oe=M=>M.shapeFlag&6?oe(M.component.subTree):M.shapeFlag&128?M.suspense.next():_(M.anchor||M.el),ke=(M,E,D)=>{M==null?E._vnode&&Ne(E._vnode,null,null,!0):X(E._vnode||null,M,E,null,null,null,D),$c(),E._vnode=M},be={p:X,um:Ne,m:ct,r:Ve,mt:w,mc:Be,pc:_e,pbc:me,n:oe,o:r};let fe,Le;return l&&([fe,Le]=l(be)),{render:ke,hydrate:fe,createApp:mv(ke,fe)}}function Cn({effect:r,update:l},s){r.allowRecurse=l.allowRecurse=s}function dd(r,l,s=!1){const u=r.children,c=l.children;if(Re(u)&&Re(c))for(let h=0;h<u.length;h++){const m=u[h];let b=c[h];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=c[h]=rn(c[h]),b.el=m.el),s||dd(m,b))}}function wv(r){const l=r.slice(),s=[0];let u,c,h,m,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(c=s[s.length-1],r[c]<x){l[u]=c,s.push(u);continue}for(h=0,m=s.length-1;h<m;)b=h+m>>1,r[s[b]]<x?h=b+1:m=b;x<r[s[h]]&&(h>0&&(l[u]=s[h-1]),s[h]=u)}}for(h=s.length,m=s[h-1];h-- >0;)s[h]=m,m=l[m];return s}const xv=r=>r.__isTeleport,hd="components";function v0(r,l){return Sv(hd,r,!0,l)||r}const kv=Symbol();function Sv(r,l,s=!0,u=!1){const c=lr||Lt;if(c){const h=c.type;if(r===hd){const b=Hv(h);if(b&&(b===l||b===Pr(l)||b===bl(Pr(l))))return h}const m=Df(c[r]||h[r],l)||Df(c.appContext[r],l);return!m&&u?h:m}}function Df(r,l){return r&&(r[l]||r[Pr(l)]||r[bl(Pr(l))])}const pr=Symbol(void 0),da=Symbol(void 0),an=Symbol(void 0),xs=Symbol(void 0),no=[];let Pn=null;function ha(r=!1){no.push(Pn=r?null:[])}function Cv(){no.pop(),Pn=no[no.length-1]||null}let ul=1;function Rf(r){ul+=r}function pd(r){return r.dynamicChildren=ul>0?Pn||oi:null,Cv(),ul>0&&Pn&&Pn.push(r),r}function Tv(r,l,s,u,c,h){return pd(md(r,l,s,u,c,h,!0))}function gd(r,l,s,u,c){return pd($t(r,l,s,u,c,!0))}function fl(r){return r?r.__v_isVNode===!0:!1}function Zi(r,l){return r.type===l.type&&r.key===l.key}const Sl="__vInternal",vd=({key:r})=>r!=null?r:null,nl=({ref:r,ref_key:l,ref_for:s})=>r!=null?Mt(r)||gt(r)||He(r)?{i:lr,r,k:l,f:!!s}:r:null;function md(r,l=null,s=null,u=0,c=null,h=r===pr?0:1,m=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:l,key:l&&vd(l),ref:l&&nl(l),scopeId:Jc,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:h,patchFlag:u,dynamicProps:c,dynamicChildren:null,appContext:null};return b?(pa(y,s),h&128&&r.normalize(y)):s&&(y.shapeFlag|=Mt(s)?8:16),ul>0&&!m&&Pn&&(y.patchFlag>0||h&6)&&y.patchFlag!==32&&Pn.push(y),y}const $t=Lv;function Lv(r,l=null,s=null,u=0,c=null,h=!1){if((!r||r===kv)&&(r=an),fl(r)){const b=fo(r,l,!0);return s&&pa(b,s),b}if(Wv(r)&&(r=r.__vccOpts),l){l=Mv(l);let{class:b,style:y}=l;b&&!Mt(b)&&(l.class=$s(b)),St(y)&&(Fc(y)&&!Re(y)&&(y=Ut({},y)),l.style=gl(y))}const m=Mt(r)?1:qg(r)?128:xv(r)?64:St(r)?4:He(r)?2:0;return md(r,l,s,u,c,m,h,!0)}function Mv(r){return r?Fc(r)||Sl in r?Ut({},r):r:null}function fo(r,l,s=!1){const{props:u,ref:c,patchFlag:h,children:m}=r,b=l?_v(u||{},l):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&vd(b),ref:l&&l.ref?s&&c?Re(c)?c.concat(nl(l)):[c,nl(l)]:nl(l):c,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:m,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:l&&r.type!==pr?h===-1?16:h|16:h,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&fo(r.ssContent),ssFallback:r.ssFallback&&fo(r.ssFallback),el:r.el,anchor:r.anchor}}function Pv(r=" ",l=0){return $t(da,null,r,l)}function m0(r="",l=!1){return l?(ha(),gd(an,null,r)):$t(an,null,r)}function Lr(r){return r==null||typeof r=="boolean"?$t(an):Re(r)?$t(pr,null,r.slice()):typeof r=="object"?rn(r):$t(da,null,String(r))}function rn(r){return r.el===null||r.memo?r:fo(r)}function pa(r,l){let s=0;const{shapeFlag:u}=r;if(l==null)l=null;else if(Re(l))s=16;else if(typeof l=="object")if(u&(1|64)){const c=l.default;c&&(c._c&&(c._d=!1),pa(r,c()),c._c&&(c._d=!0));return}else{s=32;const c=l._;!c&&!(Sl in l)?l._ctx=lr:c===3&&lr&&(lr.slots._===1?l._=1:(l._=2,r.patchFlag|=1024))}else He(l)?(l={default:l,_ctx:lr},s=32):(l=String(l),u&64?(s=16,l=[Pv(l)]):s=8);r.children=l,r.shapeFlag|=s}function _v(...r){const l={};for(let s=0;s<r.length;s++){const u=r[s];for(const c in u)if(c==="class")l.class!==u.class&&(l.class=$s([l.class,u.class]));else if(c==="style")l.style=gl([l.style,u.style]);else if(vl(c)){const h=l[c],m=u[c];m&&h!==m&&!(Re(h)&&h.includes(m))&&(l[c]=h?[].concat(h,m):m)}else c!==""&&(l[c]=u[c])}return l}function Tr(r,l,s,u=null){vr(r,l,7,[s,u])}function y0(r,l,s,u){let c;const h=s&&s[u];if(Re(r)||Mt(r)){c=new Array(r.length);for(let m=0,b=r.length;m<b;m++)c[m]=l(r[m],m,void 0,h&&h[m])}else if(typeof r=="number"){c=new Array(r);for(let m=0;m<r;m++)c[m]=l(m+1,m,void 0,h&&h[m])}else if(St(r))if(r[Symbol.iterator])c=Array.from(r,(m,b)=>l(m,b,void 0,h&&h[b]));else{const m=Object.keys(r);c=new Array(m.length);for(let b=0,y=m.length;b<y;b++){const x=m[b];c[b]=l(r[x],x,b,h&&h[b])}}else c=[];return s&&(s[u]=c),c}function Ov(r,l,s={},u,c){if(lr.isCE)return $t("slot",l==="default"?null:{name:l},u&&u());let h=r[l];h&&h._c&&(h._d=!1),ha();const m=h&&yd(h(s)),b=gd(pr,{key:s.key||`_${l}`},m||(u?u():[]),m&&r._===1?64:-2);return!c&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),h&&h._c&&(h._d=!0),b}function yd(r){return r.some(l=>fl(l)?!(l.type===an||l.type===pr&&!yd(l.children)):!0)?r:null}const Hs=r=>r?wd(r)?ga(r)||r.proxy:Hs(r.parent):null,cl=Ut(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=>Hs(r.parent),$root:r=>Hs(r.root),$emit:r=>r.emit,$options:r=>od(r),$forceUpdate:r=>()=>qc(r.update),$nextTick:r=>sa.bind(r.proxy),$watch:r=>$g.bind(r)}),Ev={get({_:r},l){const{ctx:s,setupState:u,data:c,props:h,accessCache:m,type:b,appContext:y}=r;let x;if(l[0]!=="$"){const N=m[l];if(N!==void 0)switch(N){case 1:return u[l];case 2:return c[l];case 4:return s[l];case 3:return h[l]}else{if(u!==rt&&Ge(u,l))return m[l]=1,u[l];if(c!==rt&&Ge(c,l))return m[l]=2,c[l];if((x=r.propsOptions[0])&&Ge(x,l))return m[l]=3,h[l];if(s!==rt&&Ge(s,l))return m[l]=4,s[l];Ds&&(m[l]=0)}}const S=cl[l];let P,_;if(S)return l==="$attrs"&&rr(r,"get",l),S(r);if((P=b.__cssModules)&&(P=P[l]))return P;if(s!==rt&&Ge(s,l))return m[l]=4,s[l];if(_=y.config.globalProperties,Ge(_,l))return _[l]},set({_:r},l,s){const{data:u,setupState:c,ctx:h}=r;return c!==rt&&Ge(c,l)?(c[l]=s,!0):u!==rt&&Ge(u,l)?(u[l]=s,!0):Ge(r.props,l)||l[0]==="$"&&l.slice(1)in r?!1:(h[l]=s,!0)},has({_:{data:r,setupState:l,accessCache:s,ctx:u,appContext:c,propsOptions:h}},m){let b;return!!s[m]||r!==rt&&Ge(r,m)||l!==rt&&Ge(l,m)||(b=h[0])&&Ge(b,m)||Ge(u,m)||Ge(cl,m)||Ge(c.config.globalProperties,m)},defineProperty(r,l,s){return s.get!=null?this.set(r,l,s.get(),null):s.value!=null&&this.set(r,l,s.value,null),Reflect.defineProperty(r,l,s)}},Av=cd();let Nv=0;function zv(r,l,s){const u=r.type,c=(l?l.appContext:r.appContext)||Av,h={uid:Nv++,vnode:r,type:u,parent:l,appContext:c,root:null,next:null,subTree:null,effect:null,update:null,scope:new Vp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:l?l.provides:Object.create(c.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:sd(u,c),emitsOptions:Zc(u,c),emit:null,emitted:null,propsDefaults:rt,inheritAttrs:u.inheritAttrs,ctx:rt,data:rt,props:rt,attrs:rt,slots:rt,refs:rt,setupState:rt,setupContext:null,suspense:s,suspenseId:s?s.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 h.ctx={_:h},h.root=l?l.root:h,h.emit=Hg.bind(null,h),r.ce&&r.ce(h),h}let Lt=null;const bd=()=>Lt||lr,ai=r=>{Lt=r,r.scope.on()},_n=()=>{Lt&&Lt.scope.off(),Lt=null};function wd(r){return r.vnode.shapeFlag&4}let co=!1;function Dv(r,l=!1){co=l;const{props:s,children:u}=r.vnode,c=wd(r);cv(r,s,c,l),pv(r,u);const h=c?Rv(r,l):void 0;return co=!1,h}function Rv(r,l){const s=r.type;r.accessCache=Object.create(null),r.proxy=Hc(new Proxy(r.ctx,Ev));const{setup:u}=s;if(u){const c=r.setupContext=u.length>1?Fv(r):null;ai(r),di();const h=ln(u,r,0,[r.props,c]);if(hi(),_n(),Sc(h)){if(h.then(_n,_n),l)return h.then(m=>{If(r,m,l)}).catch(m=>{xl(m,r,0)});r.asyncDep=h}else If(r,h,l)}else xd(r,l)}function If(r,l,s){He(l)?r.type.__ssrInlineRender?r.ssrRender=l:r.render=l:St(l)&&(r.setupState=Kc(l)),xd(r,s)}let Ff;function xd(r,l,s){const u=r.type;if(!r.render){if(!l&&Ff&&!u.render){const c=u.template;if(c){const{isCustomElement:h,compilerOptions:m}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Ut(Ut({isCustomElement:h,delimiters:b},m),y);u.render=Ff(c,x)}}r.render=u.render||gr}ai(r),di(),lv(r),hi(),_n()}function Iv(r){return new Proxy(r.attrs,{get(l,s){return rr(r,"get","$attrs"),l[s]}})}function Fv(r){const l=u=>{r.exposed=u||{}};let s;return{get attrs(){return s||(s=Iv(r))},slots:r.slots,emit:r.emit,expose:l}}function ga(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(Kc(Hc(r.exposed)),{get(l,s){if(s in l)return l[s];if(s in cl)return cl[s](r)}}))}function Hv(r){return He(r)&&r.displayName||r.name}function Wv(r){return He(r)&&"__vccOpts"in r}const zt=(r,l)=>Ng(r,l,co);function va(r,l,s){const u=arguments.length;return u===2?St(l)&&!Re(l)?fl(l)?$t(r,null,[l]):$t(r,l):$t(r,null,l):(u>3?s=Array.prototype.slice.call(arguments,2):u===3&&fl(s)&&(s=[s]),$t(r,l,s))}const Bv="3.2.31",Uv="http://www.w3.org/2000/svg",Ln=typeof document!="undefined"?document:null,Hf=Ln&&Ln.createElement("template"),Kv={insert:(r,l,s)=>{l.insertBefore(r,s||null)},remove:r=>{const l=r.parentNode;l&&l.removeChild(r)},createElement:(r,l,s,u)=>{const c=l?Ln.createElementNS(Uv,r):Ln.createElement(r,s?{is:s}:void 0);return r==="select"&&u&&u.multiple!=null&&c.setAttribute("multiple",u.multiple),c},createText:r=>Ln.createTextNode(r),createComment:r=>Ln.createComment(r),setText:(r,l)=>{r.nodeValue=l},setElementText:(r,l)=>{r.textContent=l},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Ln.querySelector(r),setScopeId(r,l){r.setAttribute(l,"")},cloneNode(r){const l=r.cloneNode(!0);return"_value"in r&&(l._value=r._value),l},insertStaticContent(r,l,s,u,c,h){const m=s?s.previousSibling:l.lastChild;if(c&&(c===h||c.nextSibling))for(;l.insertBefore(c.cloneNode(!0),s),!(c===h||!(c=c.nextSibling)););else{Hf.innerHTML=u?`<svg>${r}</svg>`:r;const b=Hf.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}l.insertBefore(b,s)}return[m?m.nextSibling:l.firstChild,s?s.previousSibling:l.lastChild]}};function jv(r,l,s){const u=r._vtc;u&&(l=(l?[l,...u]:[...u]).join(" ")),l==null?r.removeAttribute("class"):s?r.setAttribute("class",l):r.className=l}function qv(r,l,s){const u=r.style,c=Mt(s);if(s&&!c){for(const h in s)Ws(u,h,s[h]);if(l&&!Mt(l))for(const h in l)s[h]==null&&Ws(u,h,"")}else{const h=u.display;c?l!==s&&(u.cssText=s):l&&r.removeAttribute("style"),"_vod"in r&&(u.display=h)}}const Wf=/\s*!important$/;function Ws(r,l,s){if(Re(s))s.forEach(u=>Ws(r,l,u));else if(l.startsWith("--"))r.setProperty(l,s);else{const u=Gv(r,l);Wf.test(s)?r.setProperty(ci(u),s.replace(Wf,""),"important"):r[u]=s}}const Bf=["Webkit","Moz","ms"],ks={};function Gv(r,l){const s=ks[l];if(s)return s;let u=Pr(l);if(u!=="filter"&&u in r)return ks[l]=u;u=bl(u);for(let c=0;c<Bf.length;c++){const h=Bf[c]+u;if(h in r)return ks[l]=h}return l}const Uf="http://www.w3.org/1999/xlink";function Yv(r,l,s,u,c){if(u&&l.startsWith("xlink:"))s==null?r.removeAttributeNS(Uf,l.slice(6,l.length)):r.setAttributeNS(Uf,l,s);else{const h=Bp(l);s==null||h&&!wc(s)?r.removeAttribute(l):r.setAttribute(l,h?"":s)}}function $v(r,l,s,u,c,h,m){if(l==="innerHTML"||l==="textContent"){u&&m(u,c,h),r[l]=s==null?"":s;return}if(l==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=s;const b=s==null?"":s;(r.value!==b||r.tagName==="OPTION")&&(r.value=b),s==null&&r.removeAttribute(l);return}if(s===""||s==null){const b=typeof r[l];if(b==="boolean"){r[l]=wc(s);return}else if(s==null&&b==="string"){r[l]="",r.removeAttribute(l);return}else if(b==="number"){try{r[l]=0}catch{}r.removeAttribute(l);return}}try{r[l]=s}catch{}}let dl=Date.now,kd=!1;if(typeof window!="undefined"){dl()>document.createEvent("Event").timeStamp&&(dl=()=>performance.now());const r=navigator.userAgent.match(/firefox\/(\d+)/i);kd=!!(r&&Number(r[1])<=53)}let Bs=0;const Xv=Promise.resolve(),Zv=()=>{Bs=0},Jv=()=>Bs||(Xv.then(Zv),Bs=dl());function Qv(r,l,s,u){r.addEventListener(l,s,u)}function Vv(r,l,s,u){r.removeEventListener(l,s,u)}function em(r,l,s,u,c=null){const h=r._vei||(r._vei={}),m=h[l];if(u&&m)m.value=u;else{const[b,y]=tm(l);if(u){const x=h[l]=rm(u,c);Qv(r,b,x,y)}else m&&(Vv(r,b,m,y),h[l]=void 0)}}const Kf=/(?:Once|Passive|Capture)$/;function tm(r){let l;if(Kf.test(r)){l={};let s;for(;s=r.match(Kf);)r=r.slice(0,r.length-s[0].length),l[s[0].toLowerCase()]=!0}return[ci(r.slice(2)),l]}function rm(r,l){const s=u=>{const c=u.timeStamp||dl();(kd||c>=s.attached-1)&&vr(nm(u,s.value),l,5,[u])};return s.value=r,s.attached=Jv(),s}function nm(r,l){if(Re(l)){const s=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{s.call(r),r._stopped=!0},l.map(u=>c=>!c._stopped&&u&&u(c))}else return l}const jf=/^on[a-z]/,im=(r,l,s,u,c=!1,h,m,b,y)=>{l==="class"?jv(r,u,c):l==="style"?qv(r,s,u):vl(l)?Xs(l)||em(r,l,s,u,m):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):om(r,l,u,c))?$v(r,l,u,h,m,b,y):(l==="true-value"?r._trueValue=u:l==="false-value"&&(r._falseValue=u),Yv(r,l,u,c))};function om(r,l,s,u){return u?!!(l==="innerHTML"||l==="textContent"||l in r&&jf.test(l)&&He(s)):l==="spellcheck"||l==="draggable"||l==="form"||l==="list"&&r.tagName==="INPUT"||l==="type"&&r.tagName==="TEXTAREA"||jf.test(l)&&Mt(s)?!1:l in r}const lm=Ut({patchProp:im},Kv);let qf;function sm(){return qf||(qf=yv(lm))}const b0=(...r)=>{const l=sm().createApp(...r),{mount:s}=l;return l.mount=u=>{const c=am(u);if(!c)return;const h=l._component;!He(h)&&!h.render&&!h.template&&(h.template=c.innerHTML),c.innerHTML="";const m=s(c,!1,c instanceof SVGElement);return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),m},l};function am(r){return Mt(r)?document.querySelector(r):r}function Ss(){const r=[],l=c=>{const h=r.indexOf(c);h!==-1&&r.splice(h,1)};return{on:c=>(r.push(c),{off:()=>l(c)}),off:l,trigger:c=>{r.forEach(h=>h(c))}}}function Cl(r){return tg()?(rg(r),!0):!1}const ma=typeof window!="undefined",um=r=>typeof r=="string",il=()=>{};function Sd(r,l){function s(...u){r(()=>l.apply(this,u),{fn:l,thisArg:this,args:u})}return s}const fm=r=>r();function cm(r,l={}){let s,u;return h=>{const m=ot(r),b=ot(l.maxWait);if(s&&clearTimeout(s),m<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),h();b&&!u&&(u=setTimeout(()=>{s&&clearTimeout(s),u=null,h()},b)),s=setTimeout(()=>{u&&clearTimeout(u),u=null,h()},m)}}function dm(r,l=!1,s="Timeout"){return new Promise((u,c)=>{setTimeout(l?()=>c(s):u,r)})}function hm(r,...l){return l.some(s=>s in r)}function pm(r,l=200,s={}){return Sd(cm(l,s),r)}function w0(r,l=200,s={}){if(l<=0)return r;const u=Yt(r.value),c=pm(()=>{u.value=r.value},l,s);return Xt(r,()=>c()),u}var Gf=Object.getOwnPropertySymbols,gm=Object.prototype.hasOwnProperty,vm=Object.prototype.propertyIsEnumerable,mm=(r,l)=>{var s={};for(var u in r)gm.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&Gf)for(var u of Gf(r))l.indexOf(u)<0&&vm.call(r,u)&&(s[u]=r[u]);return s};function ym(r,l,s={}){const u=s,{eventFilter:c=fm}=u,h=mm(u,["eventFilter"]);return Xt(r,Sd(c,l),h)}function Cd(r,l=!0){bd()?rd(r):l?r():sa(r)}function bm(r){let l=!1;function s(P,{flush:_="sync",deep:N=!1,timeout:H,throwOnTimeout:V}={}){let X=null;const J=[new Promise(ne=>{X=Xt(r,he=>{P(he)===!l&&(X==null||X(),ne())},{flush:_,deep:N,immediate:!0})})];return H&&J.push(dm(H,V).finally(()=>{X==null||X()})),Promise.race(J)}function u(P,_){return s(N=>N===ot(P),_)}function c(P){return s(_=>Boolean(_),P)}function h(P){return u(null,P)}function m(P){return u(void 0,P)}function b(P){return s(Number.isNaN,P)}function y(P,_){return s(N=>{const H=Array.from(N);return H.includes(P)||H.includes(ot(P))},_)}function x(P){return S(1,P)}function S(P=1,_){let N=-1;return s(()=>(N+=1,N>=P),_)}return Array.isArray(ot(r))?{toMatch:s,toContains:y,changed:x,changedTimes:S,get not(){return l=!l,this}}:{toMatch:s,toBe:u,toBeTruthy:c,toBeNull:h,toBeNaN:b,toBeUndefined:m,changed:x,changedTimes:S,get not(){return l=!l,this}}}function wm(r,l,s={}){const{immediate:u=!0}=s,c=Yt(!1);let h=null;function m(){h&&(clearTimeout(h),h=null)}function b(){c.value=!1,m()}function y(...x){m(),c.value=!0,h=setTimeout(()=>{c.value=!1,h=null,r(...x)},ot(l))}return u&&(c.value=!0,ma&&y()),Cl(b),{isPending:c,start:y,stop:b}}function x0(r=!1){if(gt(r))return l=>(r.value=typeof l=="boolean"?l:!r.value,r.value);{const l=Yt(r);return[l,u=>(l.value=typeof u=="boolean"?u:!l.value,l.value)]}}function k0(r,l,s){let u;gt(s)?u={evaluating:s}:u=s||{};const{lazy:c=!1,evaluating:h=void 0,onError:m=il}=u,b=Yt(!c),y=Yt(l);let x=0;return Yg(async S=>{if(!b.value)return;x++;const P=x;let _=!1;h&&Promise.resolve().then(()=>{h.value=!0});try{const N=await r(H=>{S(()=>{h&&(h.value=!1),_||H()})});P===x&&(y.value=N)}catch(N){m(N)}finally{h&&(h.value=!1),_=!0}}),c?zt(()=>(b.value=!0,y.value)):y}function xm(r){var l;const s=ot(r);return(l=s==null?void 0:s.$el)!=null?l:s}const un=ma?window:void 0;function km(...r){let l,s,u,c;if(um(r[0])?([s,u,c]=r,l=un):[l,s,u,c]=r,!l)return il;let h=il;const m=Xt(()=>ot(l),y=>{h(),!!y&&(y.addEventListener(s,u,c),h=()=>{y.removeEventListener(s,u,c),h=il})},{immediate:!0,flush:"post"}),b=()=>{m(),h()};return Cl(b),b}function Sm(r,l={}){const{window:s=un}=l;let u;const c=Yt(!1),h=()=>{!s||(u||(u=s.matchMedia(r)),c.value=u.matches)};return Cd(()=>{h(),!!u&&("addEventListener"in u?u.addEventListener("change",h):u.addListener(h),Cl(()=>{"removeEventListener"in h?u.removeEventListener("change",h):u.removeListener(h)}))}),c}const Us=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ks="__vueuse_ssr_handlers__";Us[Ks]=Us[Ks]||{};const Cm=Us[Ks];function Td(r,l){return Cm[r]||l}function Tm(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const Lm={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.entries()))}};function Mm(r,l,s,u={}){var c;const{flush:h="pre",deep:m=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:S=un,eventFilter:P,onError:_=J=>{console.error(J)}}=u,N=ot(l),H=Tm(N),V=(x?eo:Yt)(l),X=(c=u.serializer)!=null?c:Lm[H];if(!s)try{s=Td("getDefaultStorage",()=>{var J;return(J=un)==null?void 0:J.localStorage})()}catch(J){_(J)}function te(J){if(!(!s||J&&J.key!==r))try{const ne=J?J.newValue:s.getItem(r);ne==null?(V.value=N,y&&N!==null&&s.setItem(r,X.write(N))):typeof ne!="string"?V.value=ne:V.value=X.read(ne)}catch(ne){_(ne)}}return te(),S&&b&&km(S,"storage",J=>setTimeout(()=>te(J),0)),s&&ym(V,()=>{try{V.value==null?s.removeItem(r):s.setItem(r,X.write(V.value))}catch(J){_(J)}},{flush:h,deep:m,eventFilter:P}),V}function Ld(r){return Sm("(prefers-color-scheme: dark)",r)}var Pm=Object.defineProperty,Yf=Object.getOwnPropertySymbols,_m=Object.prototype.hasOwnProperty,Om=Object.prototype.propertyIsEnumerable,$f=(r,l,s)=>l in r?Pm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Em=(r,l)=>{for(var s in l||(l={}))_m.call(l,s)&&$f(r,s,l[s]);if(Yf)for(var s of Yf(l))Om.call(l,s)&&$f(r,s,l[s]);return r};function Am(r={}){const{selector:l="html",attribute:s="class",window:u=un,storage:c,storageKey:h="vueuse-color-scheme",listenToStorageChanges:m=!0,storageRef:b}=r,y=Em({auto:"",light:"light",dark:"dark"},r.modes||{}),x=Ld({window:u}),S=zt(()=>x.value?"dark":"light"),P=b||(h==null?Yt("auto"):Mm(h,"auto",c,{window:u,listenToStorageChanges:m})),_=zt({get(){return P.value==="auto"?S.value:P.value},set(X){P.value=X}}),N=Td("updateHTMLAttrs",(X,te,J)=>{const ne=u==null?void 0:u.document.querySelector(X);if(!!ne)if(te==="class"){const he=J.split(/\s/g);Object.values(y).flatMap(Ae=>(Ae||"").split(/\s/g)).filter(Boolean).forEach(Ae=>{he.includes(Ae)?ne.classList.add(Ae):ne.classList.remove(Ae)})}else ne.setAttribute(te,J)});function H(X){var te;N(l,s,(te=y[X])!=null?te:X)}function V(X){r.onChanged?r.onChanged(X,H):H(X)}return Xt(_,V,{flush:"post",immediate:!0}),Cd(()=>V(_.value)),_}var Nm=Object.defineProperty,zm=Object.defineProperties,Dm=Object.getOwnPropertyDescriptors,Xf=Object.getOwnPropertySymbols,Rm=Object.prototype.hasOwnProperty,Im=Object.prototype.propertyIsEnumerable,Zf=(r,l,s)=>l in r?Nm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Fm=(r,l)=>{for(var s in l||(l={}))Rm.call(l,s)&&Zf(r,s,l[s]);if(Xf)for(var s of Xf(l))Im.call(l,s)&&Zf(r,s,l[s]);return r},Hm=(r,l)=>zm(r,Dm(l));function S0(r={}){const{valueDark:l="dark",valueLight:s="",window:u=un}=r,c=Am(Hm(Fm({},r),{onChanged:(b,y)=>{var x;r.onChanged?(x=r.onChanged)==null||x.call(r,b==="dark"):y(b)},modes:{dark:l,light:s}})),h=Ld({window:u});return zt({get(){return c.value==="dark"},set(b){b===h.value?c.value="auto":c.value=b?"dark":"light"}})}var Jf=Object.getOwnPropertySymbols,Wm=Object.prototype.hasOwnProperty,Bm=Object.prototype.propertyIsEnumerable,Um=(r,l)=>{var s={};for(var u in r)Wm.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&Jf)for(var u of Jf(r))l.indexOf(u)<0&&Bm.call(r,u)&&(s[u]=r[u]);return s};function C0(r,l,s={}){const u=s,{window:c=un}=u,h=Um(u,["window"]);let m;const b=c&&"ResizeObserver"in c,y=()=>{m&&(m.disconnect(),m=void 0)},x=Xt(()=>xm(r),P=>{y(),b&&c&&P&&(m=new c.ResizeObserver(l),m.observe(P,h))},{immediate:!0,flush:"post"}),S=()=>{y(),x()};return Cl(S),{isSupported:b,stop:S}}var Km=Object.defineProperty,jm=Object.defineProperties,qm=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,Gm=Object.prototype.hasOwnProperty,Ym=Object.prototype.propertyIsEnumerable,Vf=(r,l,s)=>l in r?Km(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,hr=(r,l)=>{for(var s in l||(l={}))Gm.call(l,s)&&Vf(r,s,l[s]);if(Qf)for(var s of Qf(l))Ym.call(l,s)&&Vf(r,s,l[s]);return r},el=(r,l)=>jm(r,qm(l));const $m={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function ec(r){return hm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError")}function Cs(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function T0(r,...l){var s;const u=typeof AbortController=="function";let c={},h={immediate:!0,refetch:!1,timeout:0};const m={method:"get",type:"text",payload:void 0};l.length>0&&(ec(l[0])?h=hr(hr({},h),l[0]):c=l[0]),l.length>1&&ec(l[1])&&(h=hr(hr({},h),l[1]));const{fetch:b=(s=un)==null?void 0:s.fetch,initialData:y,timeout:x}=h,S=Ss(),P=Ss(),_=Ss(),N=Yt(!1),H=Yt(!1),V=Yt(!1),X=Yt(null),te=eo(null),J=eo(null),ne=eo(y),he=zt(()=>u&&H.value);let Ae,Fe;const Ke=()=>{u&&Ae&&Ae.abort()},tt=U=>{H.value=U,N.value=!U};x&&(Fe=wm(Ke,x,{immediate:!1}));const Be=async(U=!1)=>{var w;tt(!0),J.value=null,X.value=null,V.value=!1,Ae=void 0,u&&(Ae=new AbortController,Ae.signal.onabort=()=>V.value=!0,c=el(hr({},c),{signal:Ae.signal}));const Z={method:m.method,headers:{}};if(m.payload){const Ye=Cs(Z.headers);m.payloadType&&(Ye["Content-Type"]=(w=$m[m.payloadType])!=null?w:m.payloadType),Z.body=m.payloadType==="json"?JSON.stringify(ot(m.payload)):ot(m.payload)}let K=!1;const se={url:ot(r),options:c,cancel:()=>{K=!0}};if(h.beforeFetch&&Object.assign(se,await h.beforeFetch(se)),K||!b)return tt(!1),Promise.resolve(null);let _e=null;return Fe&&Fe.start(),new Promise((Ye,nt)=>{var ct;b(se.url,el(hr(hr({},Z),se.options),{headers:hr(hr({},Cs(Z.headers)),Cs((ct=se.options)==null?void 0:ct.headers))})).then(async Ne=>{if(te.value=Ne,X.value=Ne.status,_e=await Ne[m.type](),h.afterFetch&&X.value>=200&&X.value<300&&({data:_e}=await h.afterFetch({data:_e,response:Ne})),ne.value=_e,!Ne.ok)throw new Error(Ne.statusText);return S.trigger(Ne),Ye(Ne)}).catch(async Ne=>{let Ve=Ne.message||Ne.name;return h.onFetchError&&({data:_e,error:Ve}=await h.onFetchError({data:_e,error:Ne})),ne.value=_e,J.value=Ve,P.trigger(Ne),U?nt(Ne):Ye(null)}).finally(()=>{tt(!1),Fe&&Fe.stop(),_.trigger(null)})})};Xt(()=>[ot(r),ot(h.refetch)],()=>ot(h.refetch)&&Be(),{deep:!0});const xe={isFinished:N,statusCode:X,response:te,error:J,data:ne,isFetching:H,canAbort:he,aborted:V,abort:Ke,execute:Be,onFetchResponse:S.on,onFetchError:P.on,onFetchFinally:_.on,get:me("get"),put:me("put"),post:me("post"),delete:me("delete"),patch:me("patch"),head:me("head"),options:me("options"),json:I("json"),text:I("text"),blob:I("blob"),arrayBuffer:I("arrayBuffer"),formData:I("formData")};function me(U){return(w,Z)=>{if(!H.value)return m.method=U,m.payload=w,m.payloadType=Z,gt(m.payload)&&Xt(()=>[ot(m.payload),ot(h.refetch)],()=>ot(h.refetch)&&Be(),{deep:!0}),!Z&&ot(w)&&Object.getPrototypeOf(ot(w))===Object.prototype&&(m.payloadType="json"),xe}}function We(){return new Promise((U,w)=>{bm(N).toBe(!0).then(()=>U(xe)).catch(Z=>w(Z))})}function I(U){return()=>{if(!H.value)return m.type=U,el(hr({},xe),{then(w,Z){return We().then(w,Z)}})}}return h.immediate&&setTimeout(Be,0),el(hr({},xe),{then(U,w){return We().then(U,w)}})}var tc,rc;ma&&(window==null?void 0:window.navigator)&&((tc=window==null?void 0:window.navigator)==null?void 0:tc.platform)&&/iP(ad|hone|od)/.test((rc=window==null?void 0:window.navigator)==null?void 0:rc.platform);var Xm=Object.defineProperty,nc=Object.getOwnPropertySymbols,Zm=Object.prototype.hasOwnProperty,Jm=Object.prototype.propertyIsEnumerable,ic=(r,l,s)=>l in r?Xm(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,Qm=(r,l)=>{for(var s in l||(l={}))Zm.call(l,s)&&ic(r,s,l[s]);if(nc)for(var s of nc(l))Jm.call(l,s)&&ic(r,s,l[s]);return r};const Vm={top:0,left:0,bottom:0,right:0,height:0,width:0};Qm({text:""},Vm);function L0(r,l,s,u={}){var c;const{passive:h=!1,eventName:m,deep:b=!1}=u,y=bd(),x=s||(y==null?void 0:y.emit)||((c=y==null?void 0:y.$emit)==null?void 0:c.bind(y));let S=m;if(l||(l="modelValue"),S=m||S||`update:${l}`,h){const P=Yt(r[l]);return Xt(()=>r[l],_=>P.value=_),Xt(P,_=>{(_!==r[l]||b)&&x(S,_)},{deep:b}),P}else return zt({get(){return r[l]},set(P){x(S,P)}})}var ey=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},fn={exports:{}};(function(r,l){(function(s,u){r.exports=u()})(ey,function(){var s=navigator.userAgent,u=navigator.platform,c=/gecko\/\d/i.test(s),h=/MSIE \d/.test(s),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(s),b=/Edge\/(\d+)/.exec(s),y=h||m||b,x=y&&(h?document.documentMode||6:+(b||m)[1]),S=!b&&/WebKit\//.test(s),P=S&&/Qt\/\d+\.\d+/.test(s),_=!b&&/Chrome\//.test(s),N=/Opera\//.test(s),H=/Apple Computer/.test(navigator.vendor),V=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(s),X=/PhantomJS/.test(s),te=H&&(/Mobile\/\w+/.test(s)||navigator.maxTouchPoints>2),J=/Android/.test(s),ne=te||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(s),he=te||/Mac/.test(u),Ae=/\bCrOS\b/.test(s),Fe=/win/i.test(u),Ke=N&&s.match(/Version\/(\d*\.\d*)/);Ke&&(Ke=Number(Ke[1])),Ke&&Ke>=15&&(N=!1,S=!0);var tt=he&&(P||N&&(Ke==null||Ke<12.11)),Be=c||y&&x>=9;function xe(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var me=function(e,t){var i=e.className,n=xe(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 We(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function I(e,t){return We(e).appendChild(t)}function U(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 w(e,t,i,n){var o=U(e,t,i,n);return o.setAttribute("role","presentation"),o}var Z;document.createRange?Z=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:Z=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 K(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 se(){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 _e(e,t){var i=e.className;xe(t).test(i)||(e.className+=(i?" ":"")+t)}function Ye(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!xe(i[n]).test(t)&&(t+=" "+i[n]);return t}var nt=function(e){e.select()};te?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(nt=function(e){try{e.select()}catch{}});function ct(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ne(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 Ve(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,f=o||0;;){var d=e.indexOf(" ",a);if(d<0||d>=t)return f+(t-a);f+=d-a,f+=i-f%i,a=d+1}}var W=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(this.onTimeout,this)};W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.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 G(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var j=50,oe={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},be={origin:"*mouse"},fe={origin:"+move"};function Le(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var f=a-n;if(a==e.length||o+f>=t)return n+Math.min(f,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var M=[""];function E(e){for(;M.length<=e;)M.push(D(M)+" ");return M[e]}function D(e){return e[e.length-1]}function B(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function Y(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function le(){}function pe(e,t){var i;return Object.create?i=Object.create(e):(le.prototype=e,i=new le),t&&Ne(t,i),i}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ae.test(e))}function T(e,t){return t?t.source.indexOf("\\w")>-1&&Q(e)?!0:t.test(e):Q(e)}function R(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var A=/[\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 ue(e){return e.charCodeAt(0)>=768&&A.test(e)}function Se(e,t,i){for(;(i<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=i;return t}function ze(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 f=e[a];(f.from<i&&f.to>t||t==i&&f.to==t)&&(n(Math.max(f.from,t),Math.min(f.to,i),f.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ie=null;function Ee(e,t,i){var n;Ie=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:Ie=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ie=o)}return n!=null?n:Ie}var mt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,f=/[Lb1n]/,d=/[1n]/;function p(g,k,C){this.level=g,this.from=k,this.to=C}return function(g,k){var C=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!n.test(g))return!1;for(var z=g.length,O=[],F=0;F<z;++F)O.push(i(g.charCodeAt(F)));for(var $=0,ie=C;$<z;++$){var ce=O[$];ce=="m"?O[$]=ie:ie=ce}for(var ge=0,de=C;ge<z;++ge){var ye=O[ge];ye=="1"&&de=="r"?O[ge]="n":a.test(ye)&&(de=ye,ye=="r"&&(O[ge]="R"))}for(var Pe=1,Me=O[0];Pe<z-1;++Pe){var De=O[Pe];De=="+"&&Me=="1"&&O[Pe+1]=="1"?O[Pe]="1":De==","&&Me==O[Pe+1]&&(Me=="1"||Me=="n")&&(O[Pe]=Me),Me=De}for(var Qe=0;Qe<z;++Qe){var xt=O[Qe];if(xt==",")O[Qe]="N";else if(xt=="%"){var st=void 0;for(st=Qe+1;st<z&&O[st]=="%";++st);for(var qt=Qe&&O[Qe-1]=="!"||st<z&&O[st]=="1"?"1":"N",Ft=Qe;Ft<st;++Ft)O[Ft]=qt;Qe=st-1}}for(var ht=0,Ht=C;ht<z;++ht){var Tt=O[ht];Ht=="L"&&Tt=="1"?O[ht]="L":a.test(Tt)&&(Ht=Tt)}for(var vt=0;vt<z;++vt)if(o.test(O[vt])){var pt=void 0;for(pt=vt+1;pt<z&&o.test(O[pt]);++pt);for(var ut=(vt?O[vt-1]:C)=="L",Wt=(pt<z?O[pt]:C)=="L",Qn=ut==Wt?ut?"L":"R":C,Jr=vt;Jr<pt;++Jr)O[Jr]=Qn;vt=pt-1}for(var Et=[],Cr,kt=0;kt<z;)if(f.test(O[kt])){var vs=kt;for(++kt;kt<z&&f.test(O[kt]);++kt);Et.push(new p(0,vs,kt))}else{var Rr=kt,xn=Et.length,kn=k=="rtl"?1:0;for(++kt;kt<z&&O[kt]!="L";++kt);for(var Nt=Rr;Nt<kt;)if(d.test(O[Nt])){Rr<Nt&&(Et.splice(xn,0,new p(1,Rr,Nt)),xn+=kn);var Vn=Nt;for(++Nt;Nt<kt&&d.test(O[Nt]);++Nt);Et.splice(xn,0,new p(2,Vn,Nt)),xn+=kn,Rr=Nt}else++Nt;Rr<kt&&Et.splice(xn,0,new p(1,Rr,kt))}return k=="ltr"&&(Et[0].level==1&&(Cr=g.match(/^\s+/))&&(Et[0].from=Cr[0].length,Et.unshift(new p(0,0,Cr[0].length))),D(Et).level==1&&(Cr=g.match(/\s+$/))&&(D(Et).to-=Cr[0].length,Et.push(new p(0,z-Cr[0].length,z)))),k=="rtl"?Et.reverse():Et}}();function dt(e,t){var i=e.order;return i==null&&(i=e.order=mt(e.text,t)),i}var nr=[],Ce=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]||nr).concat(i)}};function _r(e,t){return e._handlers&&e._handlers[t]||nr}function Ze(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=G(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Te(e,t){var i=_r(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 lt(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,i||t.type,e,t),Zt(t)||t.codemirrorIgnore}function On(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)G(i,t[n])==-1&&i.push(t[n])}function Ct(e,t){return _r(e,t).length>0}function mr(e){e.prototype.on=function(t,i){Ce(this,t,i)},e.prototype.off=function(t,i){Ze(this,t,i)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function En(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function cn(e){Pt(e),En(e)}function Br(e){return e.target||e.srcElement}function go(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),he&&e.ctrlKey&&t==1&&(t=3),t}var gi=function(){if(y&&x<9)return!1;var e=U("div");return"draggable"in e||"dragDrop"in e}(),Dt;function vo(e){if(Dt==null){var t=U("span","\u200B");I(e,U("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=Dt?U("span","\u200B"):U("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var vi;function yr(e){if(vi!=null)return vi;var t=I(e,document.createTextNode("A\u062EA")),i=Z(t,0,1).getBoundingClientRect(),n=Z(t,1,2).getBoundingClientRect();return We(e),!i||i.left==i.right?!1:vi=n.right-i.right<3}var mi=`
2
2
 
3
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),f=a.indexOf("\r");f!=-1?(i.push(a.slice(0,f)),t+=f+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},vo=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},mo=function(){var e=U("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yi=null;function Ur(e){if(yi!=null)return yi;var t=I(e,U("span","x")),i=t.getBoundingClientRect(),n=Z(t,0,1).getBoundingClientRect();return yi=Math.abs(i.left-n.left)>1}var ir={},Jt={};function yo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ir[e]=t}function Or(e,t){Jt[e]=t}function An(e){if(typeof e=="string"&&Jt.hasOwnProperty(e))e=Jt[e];else if(e&&typeof e.name=="string"&&Jt.hasOwnProperty(e.name)){var t=Jt[e.name];typeof t=="string"&&(t={name:t}),e=pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return An("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return An("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Nn(e,t){t=An(t);var i=ir[t.name];if(!i)return Nn(e,"text/plain");var n=i(e,t);if(sr.hasOwnProperty(t.name)){var o=sr[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 f in t.modeProps)n[f]=t.modeProps[f];return n}var sr={};function ar(e,t){var i=sr.hasOwnProperty(e)?sr[e]:sr[e]={};Ne(t,i)}function Qt(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 bi(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 wi(e,t,i){return e.startState?e.startState(t,i):!0}var at=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};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.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},at.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return Ve(this.string,null,this.tabSize)-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},at.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(f){return i?f.toLowerCase():f},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)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(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 br(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var f=a.text;o==i.line&&(f=f.slice(0,i.ch)),o==t.line&&(f=f.slice(t.ch)),n.push(f),++o}),n}function xi(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 je(e){if(e.parent==null)return null;for(var t=e.parent,i=G(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 wr(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 f=0;f<e.lines.length;++f){var d=e.lines[f],p=d.height;if(t<p)break;t-=p}return i+f}function dn(e,t){return t>=e.first&&t<e.first+e.size}function ki(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ee(e,t,i){if(i===void 0&&(i=null),!(this instanceof ee))return new ee(e,t,i);this.line=e,this.ch=t,this.sticky=i}function v(e,t){return e.line-t.line||e.ch-t.ch}function L(e,t){return e.sticky==t.sticky&&v(e,t)==0}function q(e){return ee(e.line,e.ch)}function re(e,t){return v(e,t)<0?t:e}function Oe(e,t){return v(e,t)<0?e:t}function Ue(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ve(e,t){if(t.line<e.first)return ee(e.first,0);var i=e.first+e.size-1;return t.line>i?ee(i,we(e,i).text.length):_t(t,we(e,t.line).text.length)}function _t(e,t){var i=e.ch;return i==null||i>t?ee(e.line,t):i<0?ee(e.line,0):e}function Vt(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=ve(e,t[n]);return i}var zn=function(e,t){this.state=e,this.lookAhead=t},xr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};xr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},xr.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}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(e,t,i){return t instanceof zn?new xr(e,Qt(e.mode,t.state),i,t.lookAhead):new xr(e,Qt(e.mode,t),i)},xr.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(t,this.maxLookAhead):t};function xa(e,t,i,n){var o=[e.state.modeGen],a={};Ma(e,t.text,e.doc.mode,i,function(g,k){return o.push(g,k)},a,n);for(var f=i.state,d=function(g){i.baseTokens=o;var k=e.state.overlays[g],C=1,z=0;i.state=!0,Ma(e,t.text,k.mode,i,function(O,F){for(var $=C;z<O;){var ie=o[C];ie>O&&o.splice(C,1,O,o[C+1],ie),C+=2,z=Math.min(O,ie)}if(!!F)if(k.opaque)o.splice($,C-$,O,"overlay "+F),C=$+2;else for(;$<C;$+=2){var ce=o[$+1];o[$+1]=(ce?ce+" ":"")+"overlay "+F}},a),i.state=f,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)d(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function ka(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Si(e,je(t)),o=t.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,n.state),a=xa(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 Si(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new xr(n,!0,t);var a=Ud(e,t,i),f=a>n.first&&we(n,a-1).stateAfter,d=f?xr.fromSaved(n,f,a):new xr(n,wi(n.mode),a);return n.iter(a,t,function(p){Ll(e,p.text,d);var g=d.line;p.stateAfter=g==t-1||g%5==0||g>=o.viewFrom&&g<o.viewTo?d.save():null,d.nextLine()}),i&&(n.modeFrontier=d.line),d}function Ll(e,t,i,n){var o=e.doc.mode,a=new at(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Sa(o,i.state);!a.eol();)Ml(o,a,i.state),a.start=a.pos}function Sa(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=bi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Ml(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=bi(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 Ca=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Ta(e,t,i,n){var o=e.doc,a=o.mode,f;t=ve(o,t);var d=we(o,t.line),p=Si(e,t.line,i),g=new at(d.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,f=Ml(a,g,p.state),n&&k.push(new Ca(g,f,Qt(o.mode,p.state)));return n?k:new Ca(g,f,p.state)}function La(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 Ma(e,t,i,n,o,a,f){var d=i.flattenSpans;d==null&&(d=e.options.flattenSpans);var p=0,g=null,k=new at(t,e.options.tabSize,n),C,z=e.options.addModeClass&&[null];for(t==""&&La(Sa(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(d=!1,f&&Ll(e,t,n,k.pos),k.pos=t.length,C=null):C=La(Ml(i,k,n.state,z),a),z){var O=z[0].name;O&&(C="m-"+(C?O+" "+C:O))}if(!d||g!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,g);g=C}k.start=k.pos}for(;p<k.pos;){var F=Math.min(k.pos,p+5e3);o(F,g),p=F}}function Ud(e,t,i){for(var n,o,a=e.doc,f=i?-1:t-(e.doc.mode.innerMode?1e3:100),d=t;d>f;--d){if(d<=a.first)return a.first;var p=we(a,d-1),g=p.stateAfter;if(g&&(!i||d+(g instanceof zn?g.lookAhead:0)<=a.modeFrontier))return d;var k=Ve(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=d-1,n=k)}return o}function Kd(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=we(e,n).stateAfter;if(o&&(!(o instanceof zn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Pa=!1,Er=!1;function jd(){Pa=!0}function qd(){Er=!0}function bo(e,t,i){this.marker=e,this.from=t,this.to=i}function Ci(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Gd(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Yd(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&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 $d(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,d=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);if(d||a.from==t&&f.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new bo(f,a.from,p?null:a.to))}}return n}function Xd(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,d=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);if(d||a.from==t&&f.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new bo(f,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Pl(e,t){if(t.full)return null;var i=dn(e,t.from.line)&&we(e,t.from.line).markedSpans,n=dn(e,t.to.line)&&we(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,f=v(t.from,t.to)==0,d=$d(i,o,f),p=Xd(n,a,f),g=t.text.length==1,k=D(t.text).length+(g?o:0);if(d)for(var C=0;C<d.length;++C){var z=d[C];if(z.to==null){var O=Ci(p,z.marker);O?g&&(z.to=O.to==null?null:O.to+k):z.to=o}}if(p)for(var F=0;F<p.length;++F){var $=p[F];if($.to!=null&&($.to+=k),$.from==null){var ie=Ci(d,$.marker);ie||($.from=k,g&&(d||(d=[])).push($))}else $.from+=k,g&&(d||(d=[])).push($)}d&&(d=_a(d)),p&&p!=d&&(p=_a(p));var ce=[d];if(!g){var ge=t.text.length-2,de;if(ge>0&&d)for(var ye=0;ye<d.length;++ye)d[ye].to==null&&(de||(de=[])).push(new bo(d[ye].marker,null,null));for(var Pe=0;Pe<ge;++Pe)ce.push(de);ce.push(p)}return ce}function _a(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 Zd(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(O){if(O.markedSpans)for(var F=0;F<O.markedSpans.length;++F){var $=O.markedSpans[F].marker;$.readOnly&&(!n||G(n,$)==-1)&&(n||(n=[])).push($)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var f=n[a],d=f.find(0),p=0;p<o.length;++p){var g=o[p];if(!(v(g.to,d.from)<0||v(g.from,d.to)>0)){var k=[p,1],C=v(g.from,d.from),z=v(g.to,d.to);(C<0||!f.inclusiveLeft&&!C)&&k.push({from:g.from,to:d.from}),(z>0||!f.inclusiveRight&&!z)&&k.push({from:d.to,to:g.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Oa(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Ea(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function wo(e){return e.inclusiveLeft?-1:0}function xo(e){return e.inclusiveRight?1:0}function _l(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=v(n.from,o.from)||wo(e)-wo(t);if(a)return-a;var f=v(n.to,o.to)||xo(e)-xo(t);return f||t.id-e.id}function Aa(e,t){var i=Er&&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||_l(n,o.marker)<0)&&(n=o.marker);return n}function Na(e){return Aa(e,!0)}function ko(e){return Aa(e,!1)}function Jd(e,t){var i=Er&&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||_l(n,a.marker)<0)&&(n=a.marker)}return n}function za(e,t,i,n,o){var a=we(e,t),f=Er&&a.markedSpans;if(f)for(var d=0;d<f.length;++d){var p=f[d];if(!!p.marker.collapsed){var g=p.marker.find(0),k=v(g.from,i)||wo(p.marker)-wo(o),C=v(g.to,n)||xo(p.marker)-xo(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.to,i)>=0:v(g.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.from,n)<=0:v(g.from,n)<0)))return!0}}}function ur(e){for(var t;t=Na(e);)e=t.find(-1,!0).line;return e}function Qd(e){for(var t;t=ko(e);)e=t.find(1,!0).line;return e}function Vd(e){for(var t,i;t=ko(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Ol(e,t){var i=we(e,t),n=ur(i);return i==n?t:je(n)}function Da(e,t){if(t>e.lastLine())return t;var i=we(e,t),n;if(!Kr(e,i))return t;for(;n=ko(i);)i=n.find(1,!0).line;return je(i)+1}function Kr(e,t){var i=Er&&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&&El(e,t,n))return!0}}}function El(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return El(e,n.line,Ci(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)&&El(e,t,o))return!0}function Ar(e){e=ur(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 f=0;f<a.children.length;++f){var d=a.children[f];if(d==i)break;t+=d.height}return t}function So(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Na(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=ko(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 Al(e){var t=e.display,i=e.doc;t.maxLine=we(i,i.first),t.maxLineLength=So(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=So(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Dn=function(e,t,i){this.text=e,Ea(this,t),this.height=i?i(this):1};Dn.prototype.lineNo=function(){return je(this)},mr(Dn);function eh(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Oa(e),Ea(e,i);var o=n?n(e):1;o!=e.height&&jt(e,o)}function th(e){e.parent=null,Oa(e)}var rh={},nh={};function Ra(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?nh:rh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Ia(e,t){var i=w("span",null,null,S?"padding-right: .1px":null),n={pre:w("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,f=void 0;n.pos=0,n.addToken=oh,yr(e.display.measure)&&(f=dt(a,e.doc.direction))&&(n.addToken=sh(n.addToken,f)),n.map=[];var d=t!=e.display.externalMeasured&&je(a);ah(a,n,ka(e,a,d)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ye(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ye(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(go(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 Te(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ye(n.pre.className,n.textClass||"")),n}function ih(e){var t=U("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function oh(e,t,i,n,o,a,f){if(!!t){var d=e.splitSpaces?lh(t,e.trailingSpace):t,p=e.cm.state.specialChars,g=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(d),e.map.push(e.pos,e.pos+t.length,k),y&&x<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var z=p.exec(t),O=z?z.index-C:t.length-C;if(O){var F=document.createTextNode(d.slice(C,C+O));y&&x<9?k.appendChild(U("span",[F])):k.appendChild(F),e.map.push(e.pos,e.pos+O,F),e.col+=O,e.pos+=O}if(!z)break;C+=O+1;var $=void 0;if(z[0]==" "){var ie=e.cm.options.tabSize,ce=ie-e.col%ie;$=k.appendChild(U("span",E(ce),"cm-tab")),$.setAttribute("role","presentation"),$.setAttribute("cm-text"," "),e.col+=ce}else z[0]=="\r"||z[0]==`
5
- `?($=k.appendChild(U("span",z[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$.setAttribute("cm-text",z[0]),e.col+=1):($=e.cm.options.specialCharPlaceholder(z[0]),$.setAttribute("cm-text",z[0]),y&&x<9?k.appendChild(U("span",[$])):k.appendChild($),e.col+=1);e.map.push(e.pos,e.pos+1,$),e.pos++}}if(e.trailingSpace=d.charCodeAt(t.length-1)==32,i||n||o||g||a||f){var ge=i||"";n&&(ge+=n),o&&(ge+=o);var de=U("span",[k],ge,a);if(f)for(var ye in f)f.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&de.setAttribute(ye,f[ye]);return e.content.appendChild(de)}e.content.appendChild(k)}}function lh(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 sh(e,t){return function(i,n,o,a,f,d,p){o=o?o+" cm-force-border":"cm-force-border";for(var g=i.pos,k=g+n.length;;){for(var C=void 0,z=0;z<t.length&&(C=t[z],!(C.to>g&&C.from<=g));z++);if(C.to>=k)return e(i,n,o,a,f,d,p);e(i,n.slice(0,C.to-g),o,a,null,d,p),a=null,n=n.slice(C.to-g),g=C.to}}}function Fa(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 ah(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var f=1;f<i.length;f+=2)t.addToken(t,o.slice(a,a=i[f]),Ra(i[f+1],t.cm.options));return}for(var d=o.length,p=0,g=1,k="",C,z,O=0,F,$,ie,ce,ge;;){if(O==p){F=$=ie=z="",ge=null,ce=null,O=1/0;for(var de=[],ye=void 0,Pe=0;Pe<n.length;++Pe){var Me=n[Pe],De=Me.marker;if(De.type=="bookmark"&&Me.from==p&&De.widgetNode)de.push(De);else if(Me.from<=p&&(Me.to==null||Me.to>p||De.collapsed&&Me.to==p&&Me.from==p)){if(Me.to!=null&&Me.to!=p&&O>Me.to&&(O=Me.to,$=""),De.className&&(F+=" "+De.className),De.css&&(z=(z?z+";":"")+De.css),De.startStyle&&Me.from==p&&(ie+=" "+De.startStyle),De.endStyle&&Me.to==O&&(ye||(ye=[])).push(De.endStyle,Me.to),De.title&&((ge||(ge={})).title=De.title),De.attributes)for(var Qe in De.attributes)(ge||(ge={}))[Qe]=De.attributes[Qe];De.collapsed&&(!ce||_l(ce.marker,De)<0)&&(ce=Me)}else Me.from>p&&O>Me.from&&(O=Me.from)}if(ye)for(var xt=0;xt<ye.length;xt+=2)ye[xt+1]==O&&($+=" "+ye[xt]);if(!ce||ce.from==p)for(var st=0;st<de.length;++st)Fa(t,0,de[st]);if(ce&&(ce.from||0)==p){if(Fa(t,(ce.to==null?d+1:ce.to)-p,ce.marker,ce.from==null),ce.to==null)return;ce.to==p&&(ce=!1)}}if(p>=d)break;for(var Gt=Math.min(d,O);;){if(k){var Ft=p+k.length;if(!ce){var ht=Ft>Gt?k.slice(0,Gt-p):k;t.addToken(t,ht,C?C+F:F,ie,p+ht.length==O?$:"",z,ge)}if(Ft>=Gt){k=k.slice(Gt-p),p=Gt;break}p=Ft,ie=""}k=o.slice(a,a=i[g++]),C=Ra(i[g++],t.cm.options)}}}function Ha(e,t,i){this.line=t,this.rest=Vd(t),this.size=this.rest?je(D(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Kr(e,t)}function Co(e,t,i){for(var n=[],o,a=t;a<i;a=o){var f=new Ha(e.doc,we(e.doc,a),a);o=a+f.size,n.push(f)}return n}var Rn=null;function uh(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function fh(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 ch(e,t){var i=e.ownsGroup;if(!!i)try{fh(i)}finally{Rn=null,t(i)}}var Ti=null;function yt(e,t){var i=_r(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Rn?o=Rn.delayedCallbacks:Ti?o=Ti:(o=Ti=[],setTimeout(dh,0));for(var a=function(d){o.push(function(){return i[d].apply(null,n)})},f=0;f<i.length;++f)a(f)}}function dh(){var e=Ti;Ti=null;for(var t=0;t<e.length;++t)e[t]()}function Wa(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?ph(e,t):a=="gutter"?Ua(e,t,i,n):a=="class"?Nl(e,t):a=="widget"&&gh(e,t,n)}t.changes=null}function Li(e){return e.node==e.text&&(e.node=U("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&x<8&&(e.node.style.zIndex=2)),e.node}function hh(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=Li(t);t.background=n.insertBefore(U("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Ba(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Ia(e,t)}function ph(e,t){var i=t.text.className,n=Ba(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,Nl(e,t)):i&&(t.text.className=i)}function Nl(e,t){hh(e,t),t.line.wrapClass?Li(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 Ua(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=Li(t);t.gutterBackground=U("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 f=Li(t),d=t.gutter=U("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(d.setAttribute("aria-hidden","true"),e.display.input.setUneditable(d),f.insertBefore(d,t.text),t.line.gutterClass&&(d.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=d.appendChild(U("div",ki(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 g=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(g)&&a[g];k&&d.appendChild(U("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function gh(e,t,i){t.alignable&&(t.alignable=null);for(var n=xe("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);Ka(e,t,i)}function vh(e,t,i,n){var o=Ba(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Nl(e,t),Ua(e,t,i,n),Ka(e,t,n),t.node}function Ka(e,t,i){if(ja(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ja(e,t.rest[n],t,i,!1)}function ja(e,t,i,n,o){if(!!t.widgets)for(var a=Li(i),f=0,d=t.widgets;f<d.length;++f){var p=d[f],g=U("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),mh(p,g,i,n),e.display.input.setUneditable(g),o&&p.above?a.insertBefore(g,i.gutter||i.text):a.appendChild(g),yt(p,"redraw")}}function mh(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 Mi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!K(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;"),I(t.display.measure,U("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Nr(e,t){for(var i=Br(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 To(e){return e.lineSpace.offsetTop}function zl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=I(e.measure,U("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 kr(e){return j-e.display.nativeBarWidth}function hn(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Dl(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function yh(e,t,i){var n=e.options.lineWrapping,o=n&&hn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var f=t.text.firstChild.getClientRects(),d=0;d<f.length-1;d++){var p=f[d],g=f[d+1];Math.abs(p.bottom-g.bottom)>2&&a.push((p.bottom+g.top)/2-i.top)}}a.push(i.bottom-i.top)}}function Ga(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(je(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function bh(e,t){t=ur(t);var i=je(t),n=e.display.externalMeasured=new Ha(e.doc,t,i);n.lineN=i;var o=n.built=Ia(e,n);return n.text=o.pre,I(e.display.lineMeasure,o.pre),n}function Ya(e,t,i,n){return Sr(e,In(e,t),i,n)}function Rl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[vn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function In(e,t){var i=je(t),n=Rl(e,i);n&&!n.text?n=null:n&&n.changes&&(Wa(e,n,i,Bl(e)),e.curOp.forceUpdate=!0),n||(n=bh(e,t));var o=Ga(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Sr(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),f;return t.cache.hasOwnProperty(a)?f=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(yh(e,t.view,t.rect),t.hasHeights=!0),f=xh(e,t,i,n),f.bogus||(t.cache[a]=f)),{left:f.left,right:f.right,top:o?f.rtop:f.top,bottom:o?f.rbottom:f.bottom}}var $a={left:0,right:0,top:0,bottom:0};function Xa(e,t,i){for(var n,o,a,f,d,p,g=0;g<e.length;g+=3)if(d=e[g],p=e[g+1],t<d?(o=0,a=1,f="left"):t<p?(o=t-d,a=o+1):(g==e.length-3||t==p&&e[g+3]>t)&&(a=p-d,o=a-1,t>=p&&(f="right")),o!=null){if(n=e[g+2],d==p&&i==(n.insertLeft?"left":"right")&&(f=i),i=="left"&&o==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],f="left";if(i=="right"&&o==p-d)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],f="right";break}return{node:n,start:o,end:a,collapse:f,coverStart:d,coverEnd:p}}function wh(e,t){var i=$a;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 xh(e,t,i,n){var o=Xa(t.map,i,n),a=o.node,f=o.start,d=o.end,p=o.collapse,g;if(a.nodeType==3){for(var k=0;k<4;k++){for(;f&&ue(t.line.text.charAt(o.coverStart+f));)--f;for(;o.coverStart+d<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+d));)++d;if(y&&x<9&&f==0&&d==o.coverEnd-o.coverStart?g=a.parentNode.getBoundingClientRect():g=wh(Z(a,f,d).getClientRects(),n),g.left||g.right||f==0)break;d=f,f=f-1,p="right"}y&&x<11&&(g=kh(e.display.measure,g))}else{f>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?g=C[n=="right"?C.length-1:0]:g=a.getBoundingClientRect()}if(y&&x<9&&!f&&(!g||!g.left&&!g.right)){var z=a.parentNode.getClientRects()[0];z?g={left:z.left,right:z.left+Hn(e.display),top:z.top,bottom:z.bottom}:g=$a}for(var O=g.top-t.rect.top,F=g.bottom-t.rect.top,$=(O+F)/2,ie=t.view.measure.heights,ce=0;ce<ie.length-1&&!($<ie[ce]);ce++);var ge=ce?ie[ce-1]:0,de=ie[ce],ye={left:(p=="right"?g.right:g.left)-t.rect.left,right:(p=="left"?g.left:g.right)-t.rect.left,top:ge,bottom:de};return!g.left&&!g.right&&(ye.bogus=!0),e.options.singleCursorHeightPerLine||(ye.rtop=O,ye.rbottom=F),ye}function kh(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ur(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 Za(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 Ja(e){e.display.externalMeasure=null,We(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(e.display.view[t])}function Pi(e){Ja(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Qa(){return _&&J?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Va(){return _&&J?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Il(e){var t=ur(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Mi(i[o]));return n}function Lo(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 f=Ar(t);if(n=="local"?f+=To(e.display):f-=e.display.viewOffset,n=="page"||n=="window"){var d=e.display.lineSpace.getBoundingClientRect();f+=d.top+(n=="window"?0:Va());var p=d.left+(n=="window"?0:Qa());i.left+=p,i.right+=p}return i.top+=f,i.bottom+=f,i}function eu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=Qa(),o-=Va();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:n-f.left,top:o-f.top}}function Mo(e,t,i,n,o){return n||(n=we(e.doc,t.line)),Lo(e,n,Ya(e,n,t.ch,o),i)}function fr(e,t,i,n,o,a){n=n||we(e.doc,t.line),o||(o=In(e,n));function f(F,$){var ie=Sr(e,o,F,$?"right":"left",a);return $?ie.left=ie.right:ie.right=ie.left,Lo(e,n,ie,i)}var d=dt(n,e.doc.direction),p=t.ch,g=t.sticky;if(p>=n.text.length?(p=n.text.length,g="before"):p<=0&&(p=0,g="after"),!d)return f(g=="before"?p-1:p,g=="before");function k(F,$,ie){var ce=d[$],ge=ce.level==1;return f(ie?F-1:F,ge!=ie)}var C=Ee(d,p,g),z=Ie,O=k(p,C,g=="before");return z!=null&&(O.other=k(p,z,g!="before")),O}function tu(e,t){var i=0;t=ve(e.doc,t),e.options.lineWrapping||(i=Hn(e.display)*t.ch);var n=we(e.doc,t.line),o=Ar(n)+To(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function Fl(e,t,i,n,o){var a=ee(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function Hl(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return Fl(n.first,0,null,-1,-1);var o=wr(n,i),a=n.first+n.size-1;if(o>a)return Fl(n.first+n.size-1,we(n,a).text.length,null,1,1);t<0&&(t=0);for(var f=we(n,o);;){var d=Sh(e,f,o,t,i),p=Jd(f,d.ch+(d.xRel>0||d.outside>0?1:0));if(!p)return d;var g=p.find(1);if(g.line==o)return g;f=we(n,o=g.line)}}function ru(e,t,i,n){n-=Il(t);var o=t.text.length,a=ze(function(f){return Sr(e,i,f-1).bottom<=n},o,0);return o=ze(function(f){return Sr(e,i,f).top>n},a,o),{begin:a,end:o}}function nu(e,t,i,n){i||(i=In(e,t));var o=Lo(e,t,Sr(e,i,n),"line").top;return ru(e,t,i,o)}function Wl(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Sh(e,t,i,n,o){o-=Ar(t);var a=In(e,t),f=Il(t),d=0,p=t.text.length,g=!0,k=dt(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?Th:Ch)(e,t,i,a,k,n,o);g=C.level!=1,d=g?C.from:C.to-1,p=g?C.to:C.from-1}var z=null,O=null,F=ze(function(Pe){var Me=Sr(e,a,Pe);return Me.top+=f,Me.bottom+=f,Wl(Me,n,o,!1)?(Me.top<=o&&Me.left<=n&&(z=Pe,O=Me),!0):!1},d,p),$,ie,ce=!1;if(O){var ge=n-O.left<O.right-n,de=ge==g;F=z+(de?0:1),ie=de?"after":"before",$=ge?O.left:O.right}else{!g&&(F==p||F==d)&&F++,ie=F==0?"after":F==t.text.length?"before":Sr(e,a,F-(g?1:0)).bottom+f<=o==g?"after":"before";var ye=fr(e,ee(i,F,ie),"line",t,a);$=ye.left,ce=o<ye.top?-1:o>=ye.bottom?1:0}return F=Se(t.text,F,1),Fl(i,F,ie,ce,n-$)}function Ch(e,t,i,n,o,a,f){var d=ze(function(C){var z=o[C],O=z.level!=1;return Wl(fr(e,ee(i,O?z.to:z.from,O?"before":"after"),"line",t,n),a,f,!0)},0,o.length-1),p=o[d];if(d>0){var g=p.level!=1,k=fr(e,ee(i,g?p.from:p.to,g?"after":"before"),"line",t,n);Wl(k,a,f,!0)&&k.top>f&&(p=o[d-1])}return p}function Th(e,t,i,n,o,a,f){var d=ru(e,t,n,f),p=d.begin,g=d.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,C=null,z=0;z<o.length;z++){var O=o[z];if(!(O.from>=g||O.to<=p)){var F=O.level!=1,$=Sr(e,n,F?Math.min(g,O.to)-1:Math.max(p,O.from)).right,ie=$<a?a-$+1e9:$-a;(!k||C>ie)&&(k=O,C=ie)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>g&&(k={from:k.from,to:g,level:k.level}),k}var pn;function Fn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pn==null){pn=U("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pn.appendChild(document.createTextNode("x")),pn.appendChild(U("br"));pn.appendChild(document.createTextNode("x"))}I(e.measure,pn);var i=pn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),We(e.measure),i||1}function Hn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=U("span","xxxxxxxxxx"),i=U("pre",[t],"CodeMirror-line-like");I(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Bl(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,f=0;a;a=a.nextSibling,++f){var d=e.display.gutterSpecs[f].className;i[d]=a.offsetLeft+a.clientLeft+o,n[d]=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 iu(e){var t=Fn(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Hn(e.display)-3);return function(o){if(Kr(e.doc,o))return 0;var a=0;if(o.widgets)for(var f=0;f<o.widgets.length;f++)o.widgets[f].height&&(a+=o.widgets[f].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function Kl(e){var t=e.doc,i=iu(e);t.iter(function(n){var o=i(n);o!=n.height&&jt(n,o)})}function gn(e,t,i,n){var o=e.display;if(!i&&Br(t).getAttribute("cm-not-content")=="true")return null;var a,f,d=o.lineSpace.getBoundingClientRect();try{a=t.clientX-d.left,f=t.clientY-d.top}catch{return null}var p=Hl(e,a,f),g;if(n&&p.xRel>0&&(g=we(e.doc,p.line).text).length==p.ch){var k=Ve(g,g.length,e.options.tabSize)-g.length;p=ee(p.line,Math.max(0,Math.round((a-qa(e.display).left)/Hn(e.display))-k))}return p}function vn(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 Rt(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)Er&&Ol(e.doc,t)<o.viewTo&&qr(e);else if(i<=o.viewFrom)Er&&Da(e.doc,i+n)>o.viewFrom?qr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)qr(e);else if(t<=o.viewFrom){var a=Po(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):qr(e)}else if(i>=o.viewTo){var f=Po(e,t,t,-1);f?(o.view=o.view.slice(0,f.index),o.viewTo=f.lineN):qr(e)}else{var d=Po(e,t,t,-1),p=Po(e,i,i+n,1);d&&p?(o.view=o.view.slice(0,d.index).concat(Co(e,d.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):qr(e)}var g=o.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(o.externalMeasured=null))}function jr(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[vn(e,t)];if(a.node!=null){var f=a.changes||(a.changes=[]);G(f,i)==-1&&f.push(i)}}}function qr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Po(e,t,i,n){var o=vn(e,t),a,f=e.display.view;if(!Er||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var d=e.display.viewFrom,p=0;p<o;p++)d+=f[p].size;if(d!=t){if(n>0){if(o==f.length-1)return null;a=d+f[o].size-t,o++}else a=d-t;t+=a,i+=a}for(;Ol(e.doc,i)!=i;){if(o==(n<0?0:f.length-1))return null;i+=n*f[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function Lh(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Co(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Co(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(vn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Co(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,vn(e,i)))),n.viewTo=i}function ou(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 _i(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(),f=e.options.$customCursor;f&&(t=!0);for(var d=0;d<i.sel.ranges.length;d++)if(!(!t&&d==i.sel.primIndex)){var p=i.sel.ranges[d];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var g=p.empty();if(f){var k=f(e,p);k&&jl(e,k,o)}else(g||e.options.showCursorWhenSelecting)&&jl(e,p.head,o);g||Mh(e,p,a)}}return n}function jl(e,t,i){var n=fr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild(U("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=Mo(e,t,"div",null,null),f=a.right-a.left;o.style.width=(f>0?f:e.defaultCharWidth())+"px"}if(n.other){var d=i.appendChild(U("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));d.style.display="",d.style.left=n.other.left+"px",d.style.top=n.other.top+"px",d.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function _o(e,t){return e.top-t.top||e.left-t.left}function Mh(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),f=qa(e.display),d=f.left,p=Math.max(n.sizerWidth,hn(e)-n.sizer.offsetLeft)-f.right,g=o.direction=="ltr";function k(de,ye,Pe,Me){ye<0&&(ye=0),ye=Math.round(ye),Me=Math.round(Me),a.appendChild(U("div",null,"CodeMirror-selected","position: absolute; left: "+de+`px;
4
+ `,t);o==-1&&(o=e.length);var a=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),f=a.indexOf("\r");f!=-1?(i.push(a.slice(0,f)),t+=f+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},mo=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},yo=function(){var e=U("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yi=null;function Ur(e){if(yi!=null)return yi;var t=I(e,U("span","x")),i=t.getBoundingClientRect(),n=Z(t,0,1).getBoundingClientRect();return yi=Math.abs(i.left-n.left)>1}var ir={},Jt={};function bo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ir[e]=t}function Or(e,t){Jt[e]=t}function An(e){if(typeof e=="string"&&Jt.hasOwnProperty(e))e=Jt[e];else if(e&&typeof e.name=="string"&&Jt.hasOwnProperty(e.name)){var t=Jt[e.name];typeof t=="string"&&(t={name:t}),e=pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return An("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return An("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Nn(e,t){t=An(t);var i=ir[t.name];if(!i)return Nn(e,"text/plain");var n=i(e,t);if(sr.hasOwnProperty(t.name)){var o=sr[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 f in t.modeProps)n[f]=t.modeProps[f];return n}var sr={};function ar(e,t){var i=sr.hasOwnProperty(e)?sr[e]:sr[e]={};Ne(t,i)}function Qt(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 bi(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 wi(e,t,i){return e.startState?e.startState(t,i):!0}var at=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};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.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},at.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return Ve(this.string,null,this.tabSize)-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},at.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(f){return i?f.toLowerCase():f},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)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(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 br(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var f=a.text;o==i.line&&(f=f.slice(0,i.ch)),o==t.line&&(f=f.slice(t.ch)),n.push(f),++o}),n}function xi(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function Kt(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function je(e){if(e.parent==null)return null;for(var t=e.parent,i=G(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 wr(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 f=0;f<e.lines.length;++f){var d=e.lines[f],p=d.height;if(t<p)break;t-=p}return i+f}function dn(e,t){return t>=e.first&&t<e.first+e.size}function ki(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ee(e,t,i){if(i===void 0&&(i=null),!(this instanceof ee))return new ee(e,t,i);this.line=e,this.ch=t,this.sticky=i}function v(e,t){return e.line-t.line||e.ch-t.ch}function L(e,t){return e.sticky==t.sticky&&v(e,t)==0}function q(e){return ee(e.line,e.ch)}function re(e,t){return v(e,t)<0?t:e}function Oe(e,t){return v(e,t)<0?e:t}function Ue(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ve(e,t){if(t.line<e.first)return ee(e.first,0);var i=e.first+e.size-1;return t.line>i?ee(i,we(e,i).text.length):_t(t,we(e,t.line).text.length)}function _t(e,t){var i=e.ch;return i==null||i>t?ee(e.line,t):i<0?ee(e.line,0):e}function Vt(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=ve(e,t[n]);return i}var zn=function(e,t){this.state=e,this.lookAhead=t},xr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};xr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},xr.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}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(e,t,i){return t instanceof zn?new xr(e,Qt(e.mode,t.state),i,t.lookAhead):new xr(e,Qt(e.mode,t),i)},xr.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(t,this.maxLookAhead):t};function xa(e,t,i,n){var o=[e.state.modeGen],a={};Ma(e,t.text,e.doc.mode,i,function(g,k){return o.push(g,k)},a,n);for(var f=i.state,d=function(g){i.baseTokens=o;var k=e.state.overlays[g],C=1,z=0;i.state=!0,Ma(e,t.text,k.mode,i,function(O,F){for(var $=C;z<O;){var ie=o[C];ie>O&&o.splice(C,1,O,o[C+1],ie),C+=2,z=Math.min(O,ie)}if(!!F)if(k.opaque)o.splice($,C-$,O,"overlay "+F),C=$+2;else for(;$<C;$+=2){var ce=o[$+1];o[$+1]=(ce?ce+" ":"")+"overlay "+F}},a),i.state=f,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)d(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function ka(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Si(e,je(t)),o=t.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,n.state),a=xa(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 Si(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new xr(n,!0,t);var a=Ud(e,t,i),f=a>n.first&&we(n,a-1).stateAfter,d=f?xr.fromSaved(n,f,a):new xr(n,wi(n.mode),a);return n.iter(a,t,function(p){Ll(e,p.text,d);var g=d.line;p.stateAfter=g==t-1||g%5==0||g>=o.viewFrom&&g<o.viewTo?d.save():null,d.nextLine()}),i&&(n.modeFrontier=d.line),d}function Ll(e,t,i,n){var o=e.doc.mode,a=new at(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Sa(o,i.state);!a.eol();)Ml(o,a,i.state),a.start=a.pos}function Sa(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=bi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Ml(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=bi(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 Ca=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Ta(e,t,i,n){var o=e.doc,a=o.mode,f;t=ve(o,t);var d=we(o,t.line),p=Si(e,t.line,i),g=new at(d.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,f=Ml(a,g,p.state),n&&k.push(new Ca(g,f,Qt(o.mode,p.state)));return n?k:new Ca(g,f,p.state)}function La(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 Ma(e,t,i,n,o,a,f){var d=i.flattenSpans;d==null&&(d=e.options.flattenSpans);var p=0,g=null,k=new at(t,e.options.tabSize,n),C,z=e.options.addModeClass&&[null];for(t==""&&La(Sa(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(d=!1,f&&Ll(e,t,n,k.pos),k.pos=t.length,C=null):C=La(Ml(i,k,n.state,z),a),z){var O=z[0].name;O&&(C="m-"+(C?O+" "+C:O))}if(!d||g!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,g);g=C}k.start=k.pos}for(;p<k.pos;){var F=Math.min(k.pos,p+5e3);o(F,g),p=F}}function Ud(e,t,i){for(var n,o,a=e.doc,f=i?-1:t-(e.doc.mode.innerMode?1e3:100),d=t;d>f;--d){if(d<=a.first)return a.first;var p=we(a,d-1),g=p.stateAfter;if(g&&(!i||d+(g instanceof zn?g.lookAhead:0)<=a.modeFrontier))return d;var k=Ve(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=d-1,n=k)}return o}function Kd(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=we(e,n).stateAfter;if(o&&(!(o instanceof zn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Pa=!1,Er=!1;function jd(){Pa=!0}function qd(){Er=!0}function wo(e,t,i){this.marker=e,this.from=t,this.to=i}function Ci(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Gd(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Yd(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&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 $d(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,d=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);if(d||a.from==t&&f.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new wo(f,a.from,p?null:a.to))}}return n}function Xd(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,d=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);if(d||a.from==t&&f.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new wo(f,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Pl(e,t){if(t.full)return null;var i=dn(e,t.from.line)&&we(e,t.from.line).markedSpans,n=dn(e,t.to.line)&&we(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,f=v(t.from,t.to)==0,d=$d(i,o,f),p=Xd(n,a,f),g=t.text.length==1,k=D(t.text).length+(g?o:0);if(d)for(var C=0;C<d.length;++C){var z=d[C];if(z.to==null){var O=Ci(p,z.marker);O?g&&(z.to=O.to==null?null:O.to+k):z.to=o}}if(p)for(var F=0;F<p.length;++F){var $=p[F];if($.to!=null&&($.to+=k),$.from==null){var ie=Ci(d,$.marker);ie||($.from=k,g&&(d||(d=[])).push($))}else $.from+=k,g&&(d||(d=[])).push($)}d&&(d=_a(d)),p&&p!=d&&(p=_a(p));var ce=[d];if(!g){var ge=t.text.length-2,de;if(ge>0&&d)for(var ye=0;ye<d.length;++ye)d[ye].to==null&&(de||(de=[])).push(new wo(d[ye].marker,null,null));for(var Pe=0;Pe<ge;++Pe)ce.push(de);ce.push(p)}return ce}function _a(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 Zd(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(O){if(O.markedSpans)for(var F=0;F<O.markedSpans.length;++F){var $=O.markedSpans[F].marker;$.readOnly&&(!n||G(n,$)==-1)&&(n||(n=[])).push($)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var f=n[a],d=f.find(0),p=0;p<o.length;++p){var g=o[p];if(!(v(g.to,d.from)<0||v(g.from,d.to)>0)){var k=[p,1],C=v(g.from,d.from),z=v(g.to,d.to);(C<0||!f.inclusiveLeft&&!C)&&k.push({from:g.from,to:d.from}),(z>0||!f.inclusiveRight&&!z)&&k.push({from:d.to,to:g.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Oa(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Ea(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function xo(e){return e.inclusiveLeft?-1:0}function ko(e){return e.inclusiveRight?1:0}function _l(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=v(n.from,o.from)||xo(e)-xo(t);if(a)return-a;var f=v(n.to,o.to)||ko(e)-ko(t);return f||t.id-e.id}function Aa(e,t){var i=Er&&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||_l(n,o.marker)<0)&&(n=o.marker);return n}function Na(e){return Aa(e,!0)}function So(e){return Aa(e,!1)}function Jd(e,t){var i=Er&&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||_l(n,a.marker)<0)&&(n=a.marker)}return n}function za(e,t,i,n,o){var a=we(e,t),f=Er&&a.markedSpans;if(f)for(var d=0;d<f.length;++d){var p=f[d];if(!!p.marker.collapsed){var g=p.marker.find(0),k=v(g.from,i)||xo(p.marker)-xo(o),C=v(g.to,n)||ko(p.marker)-ko(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.to,i)>=0:v(g.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.from,n)<=0:v(g.from,n)<0)))return!0}}}function ur(e){for(var t;t=Na(e);)e=t.find(-1,!0).line;return e}function Qd(e){for(var t;t=So(e);)e=t.find(1,!0).line;return e}function Vd(e){for(var t,i;t=So(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Ol(e,t){var i=we(e,t),n=ur(i);return i==n?t:je(n)}function Da(e,t){if(t>e.lastLine())return t;var i=we(e,t),n;if(!Kr(e,i))return t;for(;n=So(i);)i=n.find(1,!0).line;return je(i)+1}function Kr(e,t){var i=Er&&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&&El(e,t,n))return!0}}}function El(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return El(e,n.line,Ci(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)&&El(e,t,o))return!0}function Ar(e){e=ur(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 f=0;f<a.children.length;++f){var d=a.children[f];if(d==i)break;t+=d.height}return t}function Co(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Na(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=So(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 Al(e){var t=e.display,i=e.doc;t.maxLine=we(i,i.first),t.maxLineLength=Co(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Co(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Dn=function(e,t,i){this.text=e,Ea(this,t),this.height=i?i(this):1};Dn.prototype.lineNo=function(){return je(this)},mr(Dn);function eh(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Oa(e),Ea(e,i);var o=n?n(e):1;o!=e.height&&Kt(e,o)}function th(e){e.parent=null,Oa(e)}var rh={},nh={};function Ra(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?nh:rh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Ia(e,t){var i=w("span",null,null,S?"padding-right: .1px":null),n={pre:w("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,f=void 0;n.pos=0,n.addToken=oh,yr(e.display.measure)&&(f=dt(a,e.doc.direction))&&(n.addToken=sh(n.addToken,f)),n.map=[];var d=t!=e.display.externalMeasured&&je(a);ah(a,n,ka(e,a,d)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ye(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ye(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(vo(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 Te(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ye(n.pre.className,n.textClass||"")),n}function ih(e){var t=U("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function oh(e,t,i,n,o,a,f){if(!!t){var d=e.splitSpaces?lh(t,e.trailingSpace):t,p=e.cm.state.specialChars,g=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(d),e.map.push(e.pos,e.pos+t.length,k),y&&x<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var z=p.exec(t),O=z?z.index-C:t.length-C;if(O){var F=document.createTextNode(d.slice(C,C+O));y&&x<9?k.appendChild(U("span",[F])):k.appendChild(F),e.map.push(e.pos,e.pos+O,F),e.col+=O,e.pos+=O}if(!z)break;C+=O+1;var $=void 0;if(z[0]==" "){var ie=e.cm.options.tabSize,ce=ie-e.col%ie;$=k.appendChild(U("span",E(ce),"cm-tab")),$.setAttribute("role","presentation"),$.setAttribute("cm-text"," "),e.col+=ce}else z[0]=="\r"||z[0]==`
5
+ `?($=k.appendChild(U("span",z[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$.setAttribute("cm-text",z[0]),e.col+=1):($=e.cm.options.specialCharPlaceholder(z[0]),$.setAttribute("cm-text",z[0]),y&&x<9?k.appendChild(U("span",[$])):k.appendChild($),e.col+=1);e.map.push(e.pos,e.pos+1,$),e.pos++}}if(e.trailingSpace=d.charCodeAt(t.length-1)==32,i||n||o||g||a||f){var ge=i||"";n&&(ge+=n),o&&(ge+=o);var de=U("span",[k],ge,a);if(f)for(var ye in f)f.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&de.setAttribute(ye,f[ye]);return e.content.appendChild(de)}e.content.appendChild(k)}}function lh(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 sh(e,t){return function(i,n,o,a,f,d,p){o=o?o+" cm-force-border":"cm-force-border";for(var g=i.pos,k=g+n.length;;){for(var C=void 0,z=0;z<t.length&&(C=t[z],!(C.to>g&&C.from<=g));z++);if(C.to>=k)return e(i,n,o,a,f,d,p);e(i,n.slice(0,C.to-g),o,a,null,d,p),a=null,n=n.slice(C.to-g),g=C.to}}}function Fa(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 ah(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var f=1;f<i.length;f+=2)t.addToken(t,o.slice(a,a=i[f]),Ra(i[f+1],t.cm.options));return}for(var d=o.length,p=0,g=1,k="",C,z,O=0,F,$,ie,ce,ge;;){if(O==p){F=$=ie=z="",ge=null,ce=null,O=1/0;for(var de=[],ye=void 0,Pe=0;Pe<n.length;++Pe){var Me=n[Pe],De=Me.marker;if(De.type=="bookmark"&&Me.from==p&&De.widgetNode)de.push(De);else if(Me.from<=p&&(Me.to==null||Me.to>p||De.collapsed&&Me.to==p&&Me.from==p)){if(Me.to!=null&&Me.to!=p&&O>Me.to&&(O=Me.to,$=""),De.className&&(F+=" "+De.className),De.css&&(z=(z?z+";":"")+De.css),De.startStyle&&Me.from==p&&(ie+=" "+De.startStyle),De.endStyle&&Me.to==O&&(ye||(ye=[])).push(De.endStyle,Me.to),De.title&&((ge||(ge={})).title=De.title),De.attributes)for(var Qe in De.attributes)(ge||(ge={}))[Qe]=De.attributes[Qe];De.collapsed&&(!ce||_l(ce.marker,De)<0)&&(ce=Me)}else Me.from>p&&O>Me.from&&(O=Me.from)}if(ye)for(var xt=0;xt<ye.length;xt+=2)ye[xt+1]==O&&($+=" "+ye[xt]);if(!ce||ce.from==p)for(var st=0;st<de.length;++st)Fa(t,0,de[st]);if(ce&&(ce.from||0)==p){if(Fa(t,(ce.to==null?d+1:ce.to)-p,ce.marker,ce.from==null),ce.to==null)return;ce.to==p&&(ce=!1)}}if(p>=d)break;for(var qt=Math.min(d,O);;){if(k){var Ft=p+k.length;if(!ce){var ht=Ft>qt?k.slice(0,qt-p):k;t.addToken(t,ht,C?C+F:F,ie,p+ht.length==O?$:"",z,ge)}if(Ft>=qt){k=k.slice(qt-p),p=qt;break}p=Ft,ie=""}k=o.slice(a,a=i[g++]),C=Ra(i[g++],t.cm.options)}}}function Ha(e,t,i){this.line=t,this.rest=Vd(t),this.size=this.rest?je(D(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Kr(e,t)}function To(e,t,i){for(var n=[],o,a=t;a<i;a=o){var f=new Ha(e.doc,we(e.doc,a),a);o=a+f.size,n.push(f)}return n}var Rn=null;function uh(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function fh(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 ch(e,t){var i=e.ownsGroup;if(!!i)try{fh(i)}finally{Rn=null,t(i)}}var Ti=null;function yt(e,t){var i=_r(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Rn?o=Rn.delayedCallbacks:Ti?o=Ti:(o=Ti=[],setTimeout(dh,0));for(var a=function(d){o.push(function(){return i[d].apply(null,n)})},f=0;f<i.length;++f)a(f)}}function dh(){var e=Ti;Ti=null;for(var t=0;t<e.length;++t)e[t]()}function Wa(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?ph(e,t):a=="gutter"?Ua(e,t,i,n):a=="class"?Nl(e,t):a=="widget"&&gh(e,t,n)}t.changes=null}function Li(e){return e.node==e.text&&(e.node=U("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&x<8&&(e.node.style.zIndex=2)),e.node}function hh(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=Li(t);t.background=n.insertBefore(U("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Ba(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Ia(e,t)}function ph(e,t){var i=t.text.className,n=Ba(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,Nl(e,t)):i&&(t.text.className=i)}function Nl(e,t){hh(e,t),t.line.wrapClass?Li(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 Ua(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=Li(t);t.gutterBackground=U("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 f=Li(t),d=t.gutter=U("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(d.setAttribute("aria-hidden","true"),e.display.input.setUneditable(d),f.insertBefore(d,t.text),t.line.gutterClass&&(d.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=d.appendChild(U("div",ki(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 g=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(g)&&a[g];k&&d.appendChild(U("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function gh(e,t,i){t.alignable&&(t.alignable=null);for(var n=xe("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);Ka(e,t,i)}function vh(e,t,i,n){var o=Ba(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Nl(e,t),Ua(e,t,i,n),Ka(e,t,n),t.node}function Ka(e,t,i){if(ja(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ja(e,t.rest[n],t,i,!1)}function ja(e,t,i,n,o){if(!!t.widgets)for(var a=Li(i),f=0,d=t.widgets;f<d.length;++f){var p=d[f],g=U("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),mh(p,g,i,n),e.display.input.setUneditable(g),o&&p.above?a.insertBefore(g,i.gutter||i.text):a.appendChild(g),yt(p,"redraw")}}function mh(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 Mi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!K(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;"),I(t.display.measure,U("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Nr(e,t){for(var i=Br(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 Lo(e){return e.lineSpace.offsetTop}function zl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=I(e.measure,U("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 kr(e){return j-e.display.nativeBarWidth}function hn(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Dl(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function yh(e,t,i){var n=e.options.lineWrapping,o=n&&hn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var f=t.text.firstChild.getClientRects(),d=0;d<f.length-1;d++){var p=f[d],g=f[d+1];Math.abs(p.bottom-g.bottom)>2&&a.push((p.bottom+g.top)/2-i.top)}}a.push(i.bottom-i.top)}}function Ga(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(je(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function bh(e,t){t=ur(t);var i=je(t),n=e.display.externalMeasured=new Ha(e.doc,t,i);n.lineN=i;var o=n.built=Ia(e,n);return n.text=o.pre,I(e.display.lineMeasure,o.pre),n}function Ya(e,t,i,n){return Sr(e,In(e,t),i,n)}function Rl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[vn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function In(e,t){var i=je(t),n=Rl(e,i);n&&!n.text?n=null:n&&n.changes&&(Wa(e,n,i,Bl(e)),e.curOp.forceUpdate=!0),n||(n=bh(e,t));var o=Ga(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Sr(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),f;return t.cache.hasOwnProperty(a)?f=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(yh(e,t.view,t.rect),t.hasHeights=!0),f=xh(e,t,i,n),f.bogus||(t.cache[a]=f)),{left:f.left,right:f.right,top:o?f.rtop:f.top,bottom:o?f.rbottom:f.bottom}}var $a={left:0,right:0,top:0,bottom:0};function Xa(e,t,i){for(var n,o,a,f,d,p,g=0;g<e.length;g+=3)if(d=e[g],p=e[g+1],t<d?(o=0,a=1,f="left"):t<p?(o=t-d,a=o+1):(g==e.length-3||t==p&&e[g+3]>t)&&(a=p-d,o=a-1,t>=p&&(f="right")),o!=null){if(n=e[g+2],d==p&&i==(n.insertLeft?"left":"right")&&(f=i),i=="left"&&o==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],f="left";if(i=="right"&&o==p-d)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],f="right";break}return{node:n,start:o,end:a,collapse:f,coverStart:d,coverEnd:p}}function wh(e,t){var i=$a;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 xh(e,t,i,n){var o=Xa(t.map,i,n),a=o.node,f=o.start,d=o.end,p=o.collapse,g;if(a.nodeType==3){for(var k=0;k<4;k++){for(;f&&ue(t.line.text.charAt(o.coverStart+f));)--f;for(;o.coverStart+d<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+d));)++d;if(y&&x<9&&f==0&&d==o.coverEnd-o.coverStart?g=a.parentNode.getBoundingClientRect():g=wh(Z(a,f,d).getClientRects(),n),g.left||g.right||f==0)break;d=f,f=f-1,p="right"}y&&x<11&&(g=kh(e.display.measure,g))}else{f>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?g=C[n=="right"?C.length-1:0]:g=a.getBoundingClientRect()}if(y&&x<9&&!f&&(!g||!g.left&&!g.right)){var z=a.parentNode.getClientRects()[0];z?g={left:z.left,right:z.left+Hn(e.display),top:z.top,bottom:z.bottom}:g=$a}for(var O=g.top-t.rect.top,F=g.bottom-t.rect.top,$=(O+F)/2,ie=t.view.measure.heights,ce=0;ce<ie.length-1&&!($<ie[ce]);ce++);var ge=ce?ie[ce-1]:0,de=ie[ce],ye={left:(p=="right"?g.right:g.left)-t.rect.left,right:(p=="left"?g.left:g.right)-t.rect.left,top:ge,bottom:de};return!g.left&&!g.right&&(ye.bogus=!0),e.options.singleCursorHeightPerLine||(ye.rtop=O,ye.rbottom=F),ye}function kh(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ur(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 Za(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 Ja(e){e.display.externalMeasure=null,We(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(e.display.view[t])}function Pi(e){Ja(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Qa(){return _&&J?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Va(){return _&&J?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Il(e){var t=ur(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Mi(i[o]));return n}function Mo(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 f=Ar(t);if(n=="local"?f+=Lo(e.display):f-=e.display.viewOffset,n=="page"||n=="window"){var d=e.display.lineSpace.getBoundingClientRect();f+=d.top+(n=="window"?0:Va());var p=d.left+(n=="window"?0:Qa());i.left+=p,i.right+=p}return i.top+=f,i.bottom+=f,i}function eu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=Qa(),o-=Va();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:n-f.left,top:o-f.top}}function Po(e,t,i,n,o){return n||(n=we(e.doc,t.line)),Mo(e,n,Ya(e,n,t.ch,o),i)}function fr(e,t,i,n,o,a){n=n||we(e.doc,t.line),o||(o=In(e,n));function f(F,$){var ie=Sr(e,o,F,$?"right":"left",a);return $?ie.left=ie.right:ie.right=ie.left,Mo(e,n,ie,i)}var d=dt(n,e.doc.direction),p=t.ch,g=t.sticky;if(p>=n.text.length?(p=n.text.length,g="before"):p<=0&&(p=0,g="after"),!d)return f(g=="before"?p-1:p,g=="before");function k(F,$,ie){var ce=d[$],ge=ce.level==1;return f(ie?F-1:F,ge!=ie)}var C=Ee(d,p,g),z=Ie,O=k(p,C,g=="before");return z!=null&&(O.other=k(p,z,g!="before")),O}function tu(e,t){var i=0;t=ve(e.doc,t),e.options.lineWrapping||(i=Hn(e.display)*t.ch);var n=we(e.doc,t.line),o=Ar(n)+Lo(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function Fl(e,t,i,n,o){var a=ee(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function Hl(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return Fl(n.first,0,null,-1,-1);var o=wr(n,i),a=n.first+n.size-1;if(o>a)return Fl(n.first+n.size-1,we(n,a).text.length,null,1,1);t<0&&(t=0);for(var f=we(n,o);;){var d=Sh(e,f,o,t,i),p=Jd(f,d.ch+(d.xRel>0||d.outside>0?1:0));if(!p)return d;var g=p.find(1);if(g.line==o)return g;f=we(n,o=g.line)}}function ru(e,t,i,n){n-=Il(t);var o=t.text.length,a=ze(function(f){return Sr(e,i,f-1).bottom<=n},o,0);return o=ze(function(f){return Sr(e,i,f).top>n},a,o),{begin:a,end:o}}function nu(e,t,i,n){i||(i=In(e,t));var o=Mo(e,t,Sr(e,i,n),"line").top;return ru(e,t,i,o)}function Wl(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function Sh(e,t,i,n,o){o-=Ar(t);var a=In(e,t),f=Il(t),d=0,p=t.text.length,g=!0,k=dt(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?Th:Ch)(e,t,i,a,k,n,o);g=C.level!=1,d=g?C.from:C.to-1,p=g?C.to:C.from-1}var z=null,O=null,F=ze(function(Pe){var Me=Sr(e,a,Pe);return Me.top+=f,Me.bottom+=f,Wl(Me,n,o,!1)?(Me.top<=o&&Me.left<=n&&(z=Pe,O=Me),!0):!1},d,p),$,ie,ce=!1;if(O){var ge=n-O.left<O.right-n,de=ge==g;F=z+(de?0:1),ie=de?"after":"before",$=ge?O.left:O.right}else{!g&&(F==p||F==d)&&F++,ie=F==0?"after":F==t.text.length?"before":Sr(e,a,F-(g?1:0)).bottom+f<=o==g?"after":"before";var ye=fr(e,ee(i,F,ie),"line",t,a);$=ye.left,ce=o<ye.top?-1:o>=ye.bottom?1:0}return F=Se(t.text,F,1),Fl(i,F,ie,ce,n-$)}function Ch(e,t,i,n,o,a,f){var d=ze(function(C){var z=o[C],O=z.level!=1;return Wl(fr(e,ee(i,O?z.to:z.from,O?"before":"after"),"line",t,n),a,f,!0)},0,o.length-1),p=o[d];if(d>0){var g=p.level!=1,k=fr(e,ee(i,g?p.from:p.to,g?"after":"before"),"line",t,n);Wl(k,a,f,!0)&&k.top>f&&(p=o[d-1])}return p}function Th(e,t,i,n,o,a,f){var d=ru(e,t,n,f),p=d.begin,g=d.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,C=null,z=0;z<o.length;z++){var O=o[z];if(!(O.from>=g||O.to<=p)){var F=O.level!=1,$=Sr(e,n,F?Math.min(g,O.to)-1:Math.max(p,O.from)).right,ie=$<a?a-$+1e9:$-a;(!k||C>ie)&&(k=O,C=ie)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>g&&(k={from:k.from,to:g,level:k.level}),k}var pn;function Fn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pn==null){pn=U("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pn.appendChild(document.createTextNode("x")),pn.appendChild(U("br"));pn.appendChild(document.createTextNode("x"))}I(e.measure,pn);var i=pn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),We(e.measure),i||1}function Hn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=U("span","xxxxxxxxxx"),i=U("pre",[t],"CodeMirror-line-like");I(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Bl(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,f=0;a;a=a.nextSibling,++f){var d=e.display.gutterSpecs[f].className;i[d]=a.offsetLeft+a.clientLeft+o,n[d]=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 iu(e){var t=Fn(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Hn(e.display)-3);return function(o){if(Kr(e.doc,o))return 0;var a=0;if(o.widgets)for(var f=0;f<o.widgets.length;f++)o.widgets[f].height&&(a+=o.widgets[f].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function Kl(e){var t=e.doc,i=iu(e);t.iter(function(n){var o=i(n);o!=n.height&&Kt(n,o)})}function gn(e,t,i,n){var o=e.display;if(!i&&Br(t).getAttribute("cm-not-content")=="true")return null;var a,f,d=o.lineSpace.getBoundingClientRect();try{a=t.clientX-d.left,f=t.clientY-d.top}catch{return null}var p=Hl(e,a,f),g;if(n&&p.xRel>0&&(g=we(e.doc,p.line).text).length==p.ch){var k=Ve(g,g.length,e.options.tabSize)-g.length;p=ee(p.line,Math.max(0,Math.round((a-qa(e.display).left)/Hn(e.display))-k))}return p}function vn(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 Rt(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)Er&&Ol(e.doc,t)<o.viewTo&&qr(e);else if(i<=o.viewFrom)Er&&Da(e.doc,i+n)>o.viewFrom?qr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)qr(e);else if(t<=o.viewFrom){var a=_o(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):qr(e)}else if(i>=o.viewTo){var f=_o(e,t,t,-1);f?(o.view=o.view.slice(0,f.index),o.viewTo=f.lineN):qr(e)}else{var d=_o(e,t,t,-1),p=_o(e,i,i+n,1);d&&p?(o.view=o.view.slice(0,d.index).concat(To(e,d.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):qr(e)}var g=o.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(o.externalMeasured=null))}function jr(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[vn(e,t)];if(a.node!=null){var f=a.changes||(a.changes=[]);G(f,i)==-1&&f.push(i)}}}function qr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _o(e,t,i,n){var o=vn(e,t),a,f=e.display.view;if(!Er||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var d=e.display.viewFrom,p=0;p<o;p++)d+=f[p].size;if(d!=t){if(n>0){if(o==f.length-1)return null;a=d+f[o].size-t,o++}else a=d-t;t+=a,i+=a}for(;Ol(e.doc,i)!=i;){if(o==(n<0?0:f.length-1))return null;i+=n*f[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function Lh(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=To(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=To(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(vn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(To(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,vn(e,i)))),n.viewTo=i}function ou(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 _i(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(),f=e.options.$customCursor;f&&(t=!0);for(var d=0;d<i.sel.ranges.length;d++)if(!(!t&&d==i.sel.primIndex)){var p=i.sel.ranges[d];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var g=p.empty();if(f){var k=f(e,p);k&&jl(e,k,o)}else(g||e.options.showCursorWhenSelecting)&&jl(e,p.head,o);g||Mh(e,p,a)}}return n}function jl(e,t,i){var n=fr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild(U("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=Po(e,t,"div",null,null),f=a.right-a.left;o.style.width=(f>0?f:e.defaultCharWidth())+"px"}if(n.other){var d=i.appendChild(U("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));d.style.display="",d.style.left=n.other.left+"px",d.style.top=n.other.top+"px",d.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Oo(e,t){return e.top-t.top||e.left-t.left}function Mh(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),f=qa(e.display),d=f.left,p=Math.max(n.sizerWidth,hn(e)-n.sizer.offsetLeft)-f.right,g=o.direction=="ltr";function k(de,ye,Pe,Me){ye<0&&(ye=0),ye=Math.round(ye),Me=Math.round(Me),a.appendChild(U("div",null,"CodeMirror-selected","position: absolute; left: "+de+`px;
6
6
  top: `+ye+"px; width: "+(Pe==null?p-de:Pe)+`px;
7
- height: `+(Me-ye)+"px"))}function C(de,ye,Pe){var Me=we(o,de),De=Me.text.length,Qe,xt;function st(ht,Ht){return Mo(e,ee(de,ht),"div",Me,Ht)}function Gt(ht,Ht,Tt){var vt=nu(e,Me,null,ht),pt=Ht=="ltr"==(Tt=="after")?"left":"right",ut=Tt=="after"?vt.begin:vt.end-(/\s/.test(Me.text.charAt(vt.end-1))?2:1);return st(ut,pt)[pt]}var Ft=dt(Me,o.direction);return Je(Ft,ye||0,Pe==null?De:Pe,function(ht,Ht,Tt,vt){var pt=Tt=="ltr",ut=st(ht,pt?"left":"right"),Wt=st(Ht-1,pt?"right":"left"),Qn=ye==null&&ht==0,Jr=Pe==null&&Ht==De,Et=vt==0,Cr=!Ft||vt==Ft.length-1;if(Wt.top-ut.top<=3){var kt=(g?Qn:Jr)&&Et,vs=(g?Jr:Qn)&&Cr,Rr=kt?d:(pt?ut:Wt).left,xn=vs?p:(pt?Wt:ut).right;k(Rr,ut.top,xn-Rr,ut.bottom)}else{var kn,Nt,Vn,ms;pt?(kn=g&&Qn&&Et?d:ut.left,Nt=g?p:Gt(ht,Tt,"before"),Vn=g?d:Gt(Ht,Tt,"after"),ms=g&&Jr&&Cr?p:Wt.right):(kn=g?Gt(ht,Tt,"before"):d,Nt=!g&&Qn&&Et?p:ut.right,Vn=!g&&Jr&&Cr?d:Wt.left,ms=g?Gt(Ht,Tt,"after"):p),k(kn,ut.top,Nt-kn,ut.bottom),ut.bottom<Wt.top&&k(d,ut.bottom,null,Wt.top),k(Vn,Wt.top,ms-Vn,Wt.bottom)}(!Qe||_o(ut,Qe)<0)&&(Qe=ut),_o(Wt,Qe)<0&&(Qe=Wt),(!xt||_o(ut,xt)<0)&&(xt=ut),_o(Wt,xt)<0&&(xt=Wt)}),{start:Qe,end:xt}}var z=t.from(),O=t.to();if(z.line==O.line)C(z.line,z.ch,O.ch);else{var F=we(o,z.line),$=we(o,O.line),ie=ur(F)==ur($),ce=C(z.line,z.ch,ie?F.text.length+1:null).end,ge=C(O.line,ie?0:null,O.ch).start;ie&&(ce.top<ge.top-2?(k(ce.right,ce.top,null,ce.bottom),k(d,ge.top,ge.left,ge.bottom)):k(ce.right,ce.top,ge.left-ce.right,ce.bottom)),ce.bottom<ge.top&&k(d,ce.bottom,null,ge.top)}i.appendChild(a)}function ql(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()||Wn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function su(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Yl(e))}function Gl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Wn(e))},100)}function Yl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,_e(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()),ql(e))}function Wn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,me(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Oo(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,f=0;f<t.view.length;f++){var d=t.view[f],p=e.options.lineWrapping,g=void 0,k=0;if(!d.hidden){if(o+=d.line.height,y&&x<8){var C=d.node.offsetTop+d.node.offsetHeight;g=C-i,i=C}else{var z=d.node.getBoundingClientRect();g=z.bottom-z.top,!p&&d.text.firstChild&&(k=d.text.firstChild.getBoundingClientRect().right-z.left-1)}var O=d.line.height-g;if((O>.005||O<-.005)&&(o<n&&(a-=O),jt(d.line,g),au(d.line),d.rest))for(var F=0;F<d.rest.length;F++)au(d.rest[F]);if(k>e.display.sizerWidth){var $=Math.ceil(k/Hn(e.display));$>e.display.maxLineLength&&(e.display.maxLineLength=$,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function au(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 Eo(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-To(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=wr(t,n),f=wr(t,o);if(i&&i.ensure){var d=i.ensure.from.line,p=i.ensure.to.line;d<a?(a=d,f=wr(t,Ar(we(t,d))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=f&&(a=wr(t,Ar(we(t,p))-e.wrapper.clientHeight),f=p)}return{from:a,to:Math.max(f,a+1)}}function Ph(e,t){if(!lt(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&&!X){var a=U("div","\u200B",null,`position: absolute;
8
- top: `+(t.top-i.viewOffset-To(e.display))+`px;
7
+ height: `+(Me-ye)+"px"))}function C(de,ye,Pe){var Me=we(o,de),De=Me.text.length,Qe,xt;function st(ht,Ht){return Po(e,ee(de,ht),"div",Me,Ht)}function qt(ht,Ht,Tt){var vt=nu(e,Me,null,ht),pt=Ht=="ltr"==(Tt=="after")?"left":"right",ut=Tt=="after"?vt.begin:vt.end-(/\s/.test(Me.text.charAt(vt.end-1))?2:1);return st(ut,pt)[pt]}var Ft=dt(Me,o.direction);return Je(Ft,ye||0,Pe==null?De:Pe,function(ht,Ht,Tt,vt){var pt=Tt=="ltr",ut=st(ht,pt?"left":"right"),Wt=st(Ht-1,pt?"right":"left"),Qn=ye==null&&ht==0,Jr=Pe==null&&Ht==De,Et=vt==0,Cr=!Ft||vt==Ft.length-1;if(Wt.top-ut.top<=3){var kt=(g?Qn:Jr)&&Et,vs=(g?Jr:Qn)&&Cr,Rr=kt?d:(pt?ut:Wt).left,xn=vs?p:(pt?Wt:ut).right;k(Rr,ut.top,xn-Rr,ut.bottom)}else{var kn,Nt,Vn,ms;pt?(kn=g&&Qn&&Et?d:ut.left,Nt=g?p:qt(ht,Tt,"before"),Vn=g?d:qt(Ht,Tt,"after"),ms=g&&Jr&&Cr?p:Wt.right):(kn=g?qt(ht,Tt,"before"):d,Nt=!g&&Qn&&Et?p:ut.right,Vn=!g&&Jr&&Cr?d:Wt.left,ms=g?qt(Ht,Tt,"after"):p),k(kn,ut.top,Nt-kn,ut.bottom),ut.bottom<Wt.top&&k(d,ut.bottom,null,Wt.top),k(Vn,Wt.top,ms-Vn,Wt.bottom)}(!Qe||Oo(ut,Qe)<0)&&(Qe=ut),Oo(Wt,Qe)<0&&(Qe=Wt),(!xt||Oo(ut,xt)<0)&&(xt=ut),Oo(Wt,xt)<0&&(xt=Wt)}),{start:Qe,end:xt}}var z=t.from(),O=t.to();if(z.line==O.line)C(z.line,z.ch,O.ch);else{var F=we(o,z.line),$=we(o,O.line),ie=ur(F)==ur($),ce=C(z.line,z.ch,ie?F.text.length+1:null).end,ge=C(O.line,ie?0:null,O.ch).start;ie&&(ce.top<ge.top-2?(k(ce.right,ce.top,null,ce.bottom),k(d,ge.top,ge.left,ge.bottom)):k(ce.right,ce.top,ge.left-ce.right,ce.bottom)),ce.bottom<ge.top&&k(d,ce.bottom,null,ge.top)}i.appendChild(a)}function ql(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()||Wn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function su(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Yl(e))}function Gl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Wn(e))},100)}function Yl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,_e(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()),ql(e))}function Wn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,me(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Eo(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,f=0;f<t.view.length;f++){var d=t.view[f],p=e.options.lineWrapping,g=void 0,k=0;if(!d.hidden){if(o+=d.line.height,y&&x<8){var C=d.node.offsetTop+d.node.offsetHeight;g=C-i,i=C}else{var z=d.node.getBoundingClientRect();g=z.bottom-z.top,!p&&d.text.firstChild&&(k=d.text.firstChild.getBoundingClientRect().right-z.left-1)}var O=d.line.height-g;if((O>.005||O<-.005)&&(o<n&&(a-=O),Kt(d.line,g),au(d.line),d.rest))for(var F=0;F<d.rest.length;F++)au(d.rest[F]);if(k>e.display.sizerWidth){var $=Math.ceil(k/Hn(e.display));$>e.display.maxLineLength&&(e.display.maxLineLength=$,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function au(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 Ao(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Lo(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=wr(t,n),f=wr(t,o);if(i&&i.ensure){var d=i.ensure.from.line,p=i.ensure.to.line;d<a?(a=d,f=wr(t,Ar(we(t,d))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=f&&(a=wr(t,Ar(we(t,p))-e.wrapper.clientHeight),f=p)}return{from:a,to:Math.max(f,a+1)}}function Ph(e,t){if(!lt(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&&!X){var a=U("div","\u200B",null,`position: absolute;
8
+ top: `+(t.top-i.viewOffset-Lo(e.display))+`px;
9
9
  height: `+(t.bottom-t.top+kr(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 _h(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ee(t.line,t.ch+1,"before"):t,t=t.ch?ee(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var f=!1,d=fr(e,t),p=!i||i==t?d:fr(e,i);o={left:Math.min(d.left,p.left),top:Math.min(d.top,p.top)-n,right:Math.max(d.left,p.left),bottom:Math.max(d.bottom,p.bottom)+n};var g=$l(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(g.scrollTop!=null&&(Ei(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(f=!0)),g.scrollLeft!=null&&(mn(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(f=!0)),!f)break}return o}function Oh(e,t){var i=$l(e,t);i.scrollTop!=null&&Ei(e,i.scrollTop),i.scrollLeft!=null&&mn(e,i.scrollLeft)}function $l(e,t){var i=e.display,n=Fn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=Dl(e),f={};t.bottom-t.top>a&&(t.bottom=t.top+a);var d=e.doc.height+zl(i),p=t.top<n,g=t.bottom>d-n;if(t.top<o)f.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(g?d:t.bottom)-a);k!=o&&(f.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,z=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,O=hn(e)-i.gutters.offsetWidth,F=t.right-t.left>O;return F&&(t.right=t.left+O),t.left<10?f.scrollLeft=0:t.left<z?f.scrollLeft=Math.max(0,t.left+C-(F?0:10)):t.right>O+z-3&&(f.scrollLeft=t.right+(F?0:10)-O),f}function Xl(e,t){t!=null&&(Ao(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Bn(e){Ao(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Oi(e,t,i){(t!=null||i!=null)&&Ao(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Eh(e,t){Ao(e),e.curOp.scrollToPos=t}function Ao(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=tu(e,t.from),n=tu(e,t.to);uu(e,i,n,t.margin)}}function uu(e,t,i,n){var o=$l(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});Oi(e,o.scrollLeft,o.scrollTop)}function Ei(e,t){Math.abs(e.doc.scrollTop-t)<2||(c||Jl(e,{top:t}),fu(e,t,!0),c&&Jl(e),zi(e,100))}function fu(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 mn(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,gu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ai(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+zl(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+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var yn=function(e,t,i){this.cm=i;var n=this.vert=U("div",[U("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=U("div",[U("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Ce(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Ce(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yn.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}},yn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yn.prototype.zeroWidthHack=function(){var e=he&&!V?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},yn.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)},yn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ni=function(){};Ni.prototype.update=function(){return{bottom:0,right:0}},Ni.prototype.setScrollLeft=function(){},Ni.prototype.setScrollTop=function(){},Ni.prototype.clear=function(){};function Un(e,t){t||(t=Ai(e));var i=e.display.barWidth,n=e.display.barHeight;cu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Oo(e),cu(e,Ai(e)),i=e.display.barWidth,n=e.display.barHeight}function cu(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 du={native:yn,null:Ni};function hu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&me(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new du[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(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"?mn(e,t):Ei(e,t)},e),e.display.scrollbars.addClass&&_e(e.display.wrapper,e.display.scrollbars.addClass)}var Ah=0;function bn(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:++Ah,markArrays:null},uh(e.curOp)}function wn(e){var t=e.curOp;t&&ch(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;Nh(i)})}function Nh(e){for(var t=e.ops,i=0;i<t.length;i++)zh(t[i]);for(var n=0;n<t.length;n++)Dh(t[n]);for(var o=0;o<t.length;o++)Rh(t[o]);for(var a=0;a<t.length;a++)Ih(t[a]);for(var f=0;f<t.length;f++)Fh(t[f])}function zh(e){var t=e.cm,i=t.display;Wh(t),e.updateMaxLine&&Al(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 No(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Dh(e){e.updatedDisplay=e.mustUpdate&&Zl(e.cm,e.update)}function Rh(e){var t=e.cm,i=t.display;e.updatedDisplay&&Oo(t),e.barMeasure=Ai(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(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+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-hn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Ih(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==se();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Un(t,e.barMeasure),e.updatedDisplay&&Vl(t,e.barMeasure),e.selectionChanged&&ql(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&su(e.cm)}function Fh(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&pu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&fu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&mn(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=_h(t,ve(n,e.scrollToPos.from),ve(n,e.scrollToPos.to),e.scrollToPos.margin);Ph(t,o)}var a=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(a)for(var d=0;d<a.length;++d)a[d].lines.length||Te(a[d],"hide");if(f)for(var p=0;p<f.length;++p)f[p].lines.length&&Te(f[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Te(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function qt(e,t){if(e.curOp)return t();bn(e);try{return t()}finally{wn(e)}}function bt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);bn(e);try{return t.apply(e,arguments)}finally{wn(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);bn(this);try{return e.apply(this,arguments)}finally{wn(this)}}}function wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);bn(t);try{return e.apply(this,arguments)}finally{wn(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ct(Hh,e))}function Hh(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=Si(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 f=a.styles,d=a.text.length>e.options.maxHighlightLength?Qt(t.mode,n.state):null,p=xa(e,a,n,!0);d&&(n.state=d),a.styles=p.styles;var g=a.styleClasses,k=p.classes;k?a.styleClasses=k:g&&(a.styleClasses=null);for(var C=!f||f.length!=a.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),z=0;!C&&z<f.length;++z)C=f[z]!=a.styles[z];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ll(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return zi(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++)jr(e,o[a],"text")})}}var No=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Eo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=hn(e),this.force=i,this.dims=Bl(e),this.events=[]};No.prototype.signal=function(e,t){Ct(e,t)&&this.events.push(arguments)},No.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Te.apply(null,this.events[e])};function Wh(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}function Bh(e){if(e.hasFocus())return null;var t=se();if(!t||!K(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&K(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function Uh(e){if(!(!e||!e.activeElt||e.activeElt==se())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&K(document.body,e.anchorNode)&&K(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 Zl(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return qr(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&&ou(e)==0)return!1;vu(e)&&(qr(e),t.dims=Bl(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),f=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>f&&i.viewTo-f<20&&(f=Math.min(o,i.viewTo)),Er&&(a=Ol(e.doc,a),f=Da(e.doc,f));var d=a!=i.viewFrom||f!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Lh(e,a,f),i.viewOffset=Ar(we(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=ou(e);if(!d&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=Bh(e);return p>4&&(i.lineDiv.style.display="none"),Kh(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Uh(g),We(i.cursorDiv),We(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,d&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,zi(e,400)),i.updateLineNumbers=null,!0}function pu(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==hn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+zl(e.display)-Dl(e),i.top)}),t.visible=Eo(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Eo(e.display,e.doc,i));if(!Zl(e,t))break;Oo(e);var o=Ai(e);_i(e),Un(e,o),Vl(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 Jl(e,t){var i=new No(e,t);if(Zl(e,i)){Oo(e),pu(e,i);var n=Ai(e);_i(e),Un(e,n),Vl(e,n),i.finish()}}function Kh(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,f=a.firstChild;function d(F){var $=F.nextSibling;return S&&he&&e.display.currentWheelTarget==F?F.style.display="none":F.parentNode.removeChild(F),$}for(var p=n.view,g=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var z=vh(e,C,g,i);a.insertBefore(z,f)}else{for(;f!=C.node;)f=d(f);var O=o&&t!=null&&t<=g&&C.lineNumber;C.changes&&(G(C.changes,"gutter")>-1&&(O=!1),Wa(e,C,g,i)),O&&(We(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(ki(e.options,g)))),f=C.node.nextSibling}g+=C.size}for(;f;)f=d(f)}function Ql(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",yt(e,"gutterChanged",e)}function Vl(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+kr(e)+"px"}function gu(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",f=0;f<i.length;f++)if(!i[f].hidden){e.options.fixedGutter&&(i[f].gutter&&(i[f].gutter.style.left=a),i[f].gutterBackground&&(i[f].gutterBackground.style.left=a));var d=i[f].alignable;if(d)for(var p=0;p<d.length;p++)d[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function vu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=ki(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild(U("div",[U("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,f=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-f)+1,n.lineNumWidth=n.lineNumInnerWidth+f,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Ql(e.display),!0}return!1}function es(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],f=null;if(typeof a!="string"&&(f=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:f})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function mu(e){var t=e.gutters,i=e.gutterSpecs;We(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,f=o.style,d=t.appendChild(U("div",null,"CodeMirror-gutter "+a));f&&(d.style.cssText=f),a=="CodeMirror-linenumbers"&&(e.lineGutter=d,d.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Ql(e)}function Di(e){mu(e.display),Rt(e),gu(e)}function jh(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=U("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=U("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=w("div",null,"CodeMirror-code"),o.selectionDiv=U("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=U("div",null,"CodeMirror-cursors"),o.measure=U("div",null,"CodeMirror-measure"),o.lineMeasure=U("div",null,"CodeMirror-measure"),o.lineSpace=w("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=w("div",[o.lineSpace],"CodeMirror-lines");o.mover=U("div",[a],null,"position: relative"),o.sizer=U("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=U("div",null,null,"position: absolute; height: "+j+"px; width: 1px;"),o.gutters=U("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=U("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=U("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&x<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!S&&!(c&&ne)&&(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=es(n.gutters,n.lineNumbers),mu(o),i.init(o)}var zo=0,zr=null;y?zr=-.53:c?zr=15:_?zr=-.7:H&&(zr=-1/3);function yu(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 qh(e){var t=yu(e);return t.x*=zr,t.y*=zr,t}function bu(e,t){var i=yu(t),n=i.x,o=i.y,a=zr;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var f=e.display,d=f.scroller,p=d.scrollWidth>d.clientWidth,g=d.scrollHeight>d.clientHeight;if(!!(n&&p||o&&g)){if(o&&he&&S){e:for(var k=t.target,C=f.view;k!=d;k=k.parentNode)for(var z=0;z<C.length;z++)if(C[z].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!c&&!N&&a!=null){o&&g&&Ei(e,Math.max(0,d.scrollTop+o*a)),mn(e,Math.max(0,d.scrollLeft+n*a)),(!o||o&&g)&&Pt(t),f.wheelStartX=null;return}if(o&&a!=null){var O=o*a,F=e.doc.scrollTop,$=F+f.wrapper.clientHeight;O<0?F=Math.max(0,F+O-50):$=Math.min(e.doc.height,$+O+50),Jl(e,{top:F,bottom:$})}zo<20&&t.deltaMode!==0&&(f.wheelStartX==null?(f.wheelStartX=d.scrollLeft,f.wheelStartY=d.scrollTop,f.wheelDX=n,f.wheelDY=o,setTimeout(function(){if(f.wheelStartX!=null){var ie=d.scrollLeft-f.wheelStartX,ce=d.scrollTop-f.wheelStartY,ge=ce&&f.wheelDY&&ce/f.wheelDY||ie&&f.wheelDX&&ie/f.wheelDX;f.wheelStartX=f.wheelStartY=null,!!ge&&(zr=(zr*zo+ge)/(zo+1),++zo)}},200)):(f.wheelDX+=n,f.wheelDY+=o))}}var er=function(e,t){this.ranges=e,this.primIndex=t};er.prototype.primary=function(){return this.ranges[this.primIndex]},er.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(!L(i.anchor,n.anchor)||!L(i.head,n.head))return!1}return!0},er.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new qe(q(this.ranges[t].anchor),q(this.ranges[t].head));return new er(e,this.primIndex)},er.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},er.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(v(t,n.from())>=0&&v(e,n.to())<=0)return i}return-1};var qe=function(e,t){this.anchor=e,this.head=t};qe.prototype.from=function(){return Oe(this.anchor,this.head)},qe.prototype.to=function(){return re(this.anchor,this.head)},qe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(z,O){return v(z.from(),O.from())}),i=G(t,o);for(var a=1;a<t.length;a++){var f=t[a],d=t[a-1],p=v(d.to(),f.from());if(n&&!f.empty()?p>0:p>=0){var g=Oe(d.from(),f.from()),k=re(d.to(),f.to()),C=d.empty()?f.from()==f.head:d.from()==d.head;a<=i&&--i,t.splice(--a,2,new qe(C?k:g,C?g:k))}}return new er(t,i)}function Gr(e,t){return new er([new qe(e,t||e)],0)}function Yr(e){return e.text?ee(e.from.line+e.text.length-1,D(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function wu(e,t){if(v(e,t.from)<0)return e;if(v(e,t.to)<=0)return Yr(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+=Yr(t).ch-t.to.ch),ee(i,n)}function ts(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new qe(wu(o.anchor,t),wu(o.head,t)))}return cr(e.cm,i,e.sel.primIndex)}function xu(e,t,i){return e.line==t.line?ee(i.line,e.ch-t.ch+i.ch):ee(i.line+(e.line-t.line),e.ch)}function Gh(e,t,i){for(var n=[],o=ee(e.first,0),a=o,f=0;f<t.length;f++){var d=t[f],p=xu(d.from,o,a),g=xu(Yr(d),o,a);if(o=d.to,a=g,i=="around"){var k=e.sel.ranges[f],C=v(k.head,k.anchor)<0;n[f]=new qe(C?g:p,C?p:g)}else n[f]=new qe(p,p)}return new er(n,e.sel.primIndex)}function rs(e){e.doc.mode=Nn(e.options,e.doc.modeOption),Ri(e)}function Ri(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,zi(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function ku(e,t){return t.from.ch==0&&t.to.ch==0&&D(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ns(e,t,i,n){function o(ge){return i?i[ge]:null}function a(ge,de,ye){eh(ge,de,ye,n),yt(ge,"change",ge,t)}function f(ge,de){for(var ye=[],Pe=ge;Pe<de;++Pe)ye.push(new Dn(g[Pe],o(Pe),n));return ye}var d=t.from,p=t.to,g=t.text,k=we(e,d.line),C=we(e,p.line),z=D(g),O=o(g.length-1),F=p.line-d.line;if(t.full)e.insert(0,f(0,g.length)),e.remove(g.length,e.size-g.length);else if(ku(e,t)){var $=f(0,g.length-1);a(C,C.text,O),F&&e.remove(d.line,F),$.length&&e.insert(d.line,$)}else if(k==C)if(g.length==1)a(k,k.text.slice(0,d.ch)+z+k.text.slice(p.ch),O);else{var ie=f(1,g.length-1);ie.push(new Dn(z+k.text.slice(p.ch),O,n)),a(k,k.text.slice(0,d.ch)+g[0],o(0)),e.insert(d.line+1,ie)}else if(g.length==1)a(k,k.text.slice(0,d.ch)+g[0]+C.text.slice(p.ch),o(0)),e.remove(d.line+1,F);else{a(k,k.text.slice(0,d.ch)+g[0],o(0)),a(C,z+C.text.slice(p.ch),O);var ce=f(1,g.length-1);F>1&&e.remove(d.line+1,F-1),e.insert(d.line+1,ce)}yt(e,"change",e,t)}function $r(e,t,i){function n(o,a,f){if(o.linked)for(var d=0;d<o.linked.length;++d){var p=o.linked[d];if(p.doc!=a){var g=f&&p.sharedHist;i&&!g||(t(p.doc,g),n(p.doc,o,g))}}}n(e,null,!0)}function Su(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Kl(e),rs(e),Cu(e),e.options.direction=t.direction,e.options.lineWrapping||Al(e),e.options.mode=t.modeOption,Rt(e)}function Cu(e){(e.doc.direction=="rtl"?_e:me)(e.display.lineDiv,"CodeMirror-rtl")}function Yh(e){qt(e,function(){Cu(e),Rt(e)})}function Do(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 is(e,t){var i={from:q(t.from),to:Yr(t),text:br(e,t.from,t.to)};return Mu(e,i,t.from.line,t.to.line+1),$r(e,function(n){return Mu(n,i,t.from.line,t.to.line+1)},!0),i}function Tu(e){for(;e.length;){var t=D(e);if(t.ranges)e.pop();else break}}function $h(e,t){if(t)return Tu(e.done),D(e.done);if(e.done.length&&!D(e.done).ranges)return D(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),D(e.done)}function Lu(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,f,d;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)=="*"))&&(f=$h(o,o.lastOp==n)))d=D(f.changes),v(t.from,t.to)==0&&v(t.from,d.to)==0?d.to=Yr(t):f.changes.push(is(e,t));else{var p=D(o.done);for((!p||!p.ranges)&&Ro(e.sel,o.done),f={changes:[is(e,t)],generation:o.generation},o.done.push(f);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,d||Te(e,"historyAdded")}function Xh(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 Zh(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||Xh(e,a,D(o.done),t))?o.done[o.done.length-1]=t:Ro(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&Tu(o.undone)}function Ro(e,t){var i=D(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Mu(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(f){f.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=f.markedSpans),++a})}function Jh(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 Qh(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Jh(i[o]));return n}function Pu(e,t){var i=Qh(e,t),n=Pl(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],f=n[o];if(a&&f){e:for(var d=0;d<f.length;++d){for(var p=f[d],g=0;g<a.length;++g)if(a[g].marker==p.marker)continue e;a.push(p)}}else f&&(i[o]=f)}return i}function Kn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?er.prototype.deepCopy.call(a):a);continue}var f=a.changes,d=[];n.push({changes:d});for(var p=0;p<f.length;++p){var g=f[p],k=void 0;if(d.push({from:g.from,to:g.to,text:g.text}),t)for(var C in g)(k=C.match(/^spans_(\d+)$/))&&G(t,Number(k[1]))>-1&&(D(d)[C]=g[C],delete g[C])}}return n}function os(e,t,i,n){if(n){var o=e.anchor;if(i){var a=v(t,o)<0;a!=v(i,o)<0?(o=t,t=i):a!=v(t,i)<0&&(t=i)}return new qe(o,t)}else return new qe(i||t,t)}function Io(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Ot(e,new er([os(e.sel.primary(),t,i,o)],0),n)}function _u(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]=os(e.sel.ranges[a],t[a],null,o);var f=cr(e.cm,n,e.sel.primIndex);Ot(e,f,i)}function ls(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Ot(e,cr(e.cm,o,e.sel.primIndex),n)}function Ou(e,t,i,n){Ot(e,Gr(t,i),n)}function Vh(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 qe(ve(e,o[a].anchor),ve(e,o[a].head))},origin:i&&i.origin};return Te(e,"beforeSelectionChange",e,n),e.cm&&Te(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?cr(e.cm,n.ranges,n.ranges.length-1):t}function Eu(e,t,i){var n=e.history.done,o=D(n);o&&o.ranges?(n[n.length-1]=t,Fo(e,t,i)):Ot(e,t,i)}function Ot(e,t,i){Fo(e,t,i),Zh(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Fo(e,t,i){(Ct(e,"beforeSelectionChange")||e.cm&&Ct(e.cm,"beforeSelectionChange"))&&(t=Vh(e,t,i));var n=i&&i.bias||(v(t.primary().head,e.sel.primary().head)<0?-1:1);Au(e,zu(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Bn(e.cm)}function Au(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,On(e.cm)),yt(e,"cursorActivity",e))}function Nu(e){Au(e,zu(e,e.sel,null,!1))}function zu(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var f=t.ranges[a],d=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Ho(e,f.anchor,d&&d.anchor,i,n),g=Ho(e,f.head,d&&d.head,i,n);(o||p!=f.anchor||g!=f.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new qe(p,g))}return o?cr(e.cm,o,t.primIndex):t}function jn(e,t,i,n,o){var a=we(e,t.line);if(a.markedSpans)for(var f=0;f<a.markedSpans.length;++f){var d=a.markedSpans[f],p=d.marker,g="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((d.from==null||(g?d.from<=t.ch:d.from<t.ch))&&(d.to==null||(k?d.to>=t.ch:d.to>t.ch))){if(o&&(Te(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--f;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),z=void 0;if((n<0?k:g)&&(C=Du(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(z=v(C,i))&&(n<0?z<0:z>0))return jn(e,C,t,n,o)}var O=p.find(n<0?-1:1);return(n<0?g:k)&&(O=Du(e,O,n,O.line==t.line?a:null)),O?jn(e,O,t,n,o):null}}return t}function Ho(e,t,i,n,o){var a=n||1,f=jn(e,t,i,a,o)||!o&&jn(e,t,i,a,!0)||jn(e,t,i,-a,o)||!o&&jn(e,t,i,-a,!0);return f||(e.cantEdit=!0,ee(e.first,0))}function Du(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?ve(e,ee(t.line-1)):null:i>0&&t.ch==(n||we(e,t.line)).text.length?t.line<e.first+e.size-1?ee(t.line+1,0):null:new ee(t.line,t.ch+i)}function Ru(e){e.setSelection(ee(e.firstLine(),0),ee(e.lastLine()),ke)}function Iu(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,f,d){o&&(n.from=ve(e,o)),a&&(n.to=ve(e,a)),f&&(n.text=f),d!==void 0&&(n.origin=d)}),Te(e,"beforeChange",e,n),e.cm&&Te(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 qn(e,t,i){if(e.cm){if(!e.cm.curOp)return bt(e.cm,qn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"))&&(t=Iu(e,t,!0),!t))){var n=Pa&&!i&&Zd(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)Fu(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else Fu(e,t)}}function Fu(e,t){if(!(t.text.length==1&&t.text[0]==""&&v(t.from,t.to)==0)){var i=ts(e,t);Lu(e,t,i,e.cm?e.cm.curOp.id:NaN),Ii(e,t,i,Pl(e,t));var n=[];$r(e,function(o,a){!a&&G(n,o.history)==-1&&(Uu(o.history,t),n.push(o.history)),Ii(o,t,null,Pl(o,t))})}}function Wo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,f=e.sel,d=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,g=0;g<d.length&&(a=d[g],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));g++);if(g!=d.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=d.pop(),a.ranges){if(Ro(a,p),i&&!a.equals(e.sel)){Ot(e,a,{clearRedo:!1});return}f=a}else if(n){d.push(a);return}else break;var k=[];Ro(f,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"),z=function($){var ie=a.changes[$];if(ie.origin=t,C&&!Iu(e,ie,!1))return d.length=0,{};k.push(is(e,ie));var ce=$?ts(e,ie):D(d);Ii(e,ie,ce,Pu(e,ie)),!$&&e.cm&&e.cm.scrollIntoView({from:ie.from,to:Yr(ie)});var ge=[];$r(e,function(de,ye){!ye&&G(ge,de.history)==-1&&(Uu(de.history,ie),ge.push(de.history)),Ii(de,ie,null,Pu(de,ie))})},O=a.changes.length-1;O>=0;--O){var F=z(O);if(F)return F.v}}}}function Hu(e,t){if(t!=0&&(e.first+=t,e.sel=new er(B(e.sel.ranges,function(o){return new qe(ee(o.anchor.line+t,o.anchor.ch),ee(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)jr(e.cm,n,"gutter")}}function Ii(e,t,i,n){if(e.cm&&!e.cm.curOp)return bt(e.cm,Ii)(e,t,i,n);if(t.to.line<e.first){Hu(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);Hu(e,o),t={from:ee(e.first,0),to:ee(t.to.line+o,t.to.ch),text:[D(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ee(a,we(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=br(e,t.from,t.to),i||(i=ts(e,t)),e.cm?ep(e.cm,t,n):ns(e,t,n),Fo(e,i,ke),e.cantEdit&&Ho(e,ee(e.firstLine(),0))&&(e.cantEdit=!1)}}function ep(e,t,i){var n=e.doc,o=e.display,a=t.from,f=t.to,d=!1,p=a.line;e.options.lineWrapping||(p=je(ur(we(n,a.line))),n.iter(p,f.line+1,function(O){if(O==o.maxLine)return d=!0,!0})),n.sel.contains(t.from,t.to)>-1&&On(e),ns(n,t,i,iu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(O){var F=So(O);F>o.maxLineLength&&(o.maxLine=O,o.maxLineLength=F,o.maxLineChanged=!0,d=!1)}),d&&(e.curOp.updateMaxLine=!0)),Kd(n,a.line),zi(e,400);var g=t.text.length-(f.line-a.line)-1;t.full?Rt(e):a.line==f.line&&t.text.length==1&&!ku(e.doc,t)?jr(e,a.line,"text"):Rt(e,a.line,f.line+1,g);var k=Ct(e,"changes"),C=Ct(e,"change");if(C||k){var z={from:a,to:f,text:t.text,removed:t.removed,origin:t.origin};C&&yt(e,"change",e,z),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(z)}e.display.selForContextMenu=null}function Gn(e,t,i,n,o){var a;n||(n=i),v(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),qn(e,{from:i,to:n,text:t,origin:o})}function Wu(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Bu(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],f=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var d=0;d<a.ranges.length;d++)Wu(a.ranges[d].anchor,t,i,n),Wu(a.ranges[d].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var g=a.changes[p];if(i<g.from.line)g.from=ee(g.from.line+n,g.from.ch),g.to=ee(g.to.line+n,g.to.ch);else if(t<=g.to.line){f=!1;break}}f||(e.splice(0,o+1),o=0)}}function Uu(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;Bu(e.done,i,n,o),Bu(e.undone,i,n,o)}function Fi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=we(e,Ue(e,t)):o=je(t),o==null?null:(n(a,o)&&e.cm&&jr(e.cm,o,i),a)}function Hi(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}Hi.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,th(o),yt(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 Wi(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}Wi.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),f=n.height;if(n.removeInner(e,a),this.height-=f-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 Hi))){var d=[];this.collapse(d),this.children=[new Hi(d)],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 f=o.lines.length%25+25,d=f;d<o.lines.length;){var p=new Hi(o.lines.slice(d,d+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,f),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 Wi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=G(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Wi(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 f=Math.min(t,a-e);if(o.iterN(e,f,i))return!0;if((t-=f)==0)break;e=0}else e-=a}}};var Bi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Bi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=je(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=Mi(this);jt(i,Math.max(0,i.height-a)),e&&(qt(e,function(){Ku(e,i,-a),jr(e,n,"widget")}),yt(e,"lineWidgetCleared",e,this,n))}},Bi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Mi(this)-t;!o||(Kr(this.doc,n)||jt(n,n.height+o),i&&qt(i,function(){i.curOp.forceUpdate=!0,Ku(i,n,o),yt(i,"lineWidgetChanged",i,e,je(n))}))},mr(Bi);function Ku(e,t,i){Ar(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Xl(e,i)}function tp(e,t,i,n){var o=new Bi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Fi(e,t,"widget",function(f){var d=f.widgets||(f.widgets=[]);if(o.insertAt==null?d.push(o):d.splice(Math.min(d.length,Math.max(0,o.insertAt)),0,o),o.line=f,a&&!Kr(e,f)){var p=Ar(f)<e.scrollTop;jt(f,f.height+Mi(o)),p&&Xl(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&yt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:je(t)),o}var ju=0,Xr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ju};Xr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bn(e),Ct(this,"clear")){var i=this.find();i&&yt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var f=this.lines[a],d=Ci(f.markedSpans,this);e&&!this.collapsed?jr(e,je(f),"text"):e&&(d.to!=null&&(o=je(f)),d.from!=null&&(n=je(f))),f.markedSpans=Gd(f.markedSpans,d),d.from==null&&this.collapsed&&!Kr(this.doc,f)&&e&&jt(f,Fn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var g=ur(this.lines[p]),k=So(g);k>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Rt(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Nu(e.doc)),e&&yt(e,"markerCleared",e,this,n,o),t&&wn(e),this.parent&&this.parent.clear()}},Xr.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],f=Ci(a.markedSpans,this);if(f.from!=null&&(i=ee(t?a:je(a),f.from),e==-1))return i;if(f.to!=null&&(n=ee(t?a:je(a),f.to),e==1))return n}return i&&{from:i,to:n}},Xr.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=je(t.line),f=Rl(n,a);if(f&&(Za(f),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Kr(i.doc,o)&&i.height!=null){var d=i.height;i.height=null;var p=Mi(i)-d;p&&jt(o,o.height+p)}yt(n,"markerChanged",n,e)})},Xr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||G(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Xr.prototype.detachLine=function(e){if(this.lines.splice(G(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},mr(Xr);function Yn(e,t,i,n,o){if(n&&n.shared)return rp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return bt(e.cm,Yn)(e,t,i,n,o);var a=new Xr(e,o),f=v(t,i);if(n&&Ne(n,a,!1),f>0||f==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=w("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(za(e,t.line,t,i,a)||t.line!=i.line&&za(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");qd()}a.addToHistory&&Lu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var d=t.line,p=e.cm,g;if(e.iter(d,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&ur(C)==p.display.maxLine&&(g=!0),a.collapsed&&d!=t.line&&jt(C,0),Yd(C,new bo(a,d==t.line?t.ch:null,d==i.line?i.ch:null),e.cm&&e.cm.curOp),++d}),a.collapsed&&e.iter(t.line,i.line+1,function(C){Kr(e,C)&&jt(C,0)}),a.clearOnEnter&&Ce(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(jd(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ju,a.atomic=!0),p){if(g&&(p.curOp.updateMaxLine=!0),a.collapsed)Rt(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++)jr(p,k,"text");a.atomic&&Nu(p.doc),yt(p,"markerAdded",p,a)}return a}var Ui=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Ui.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();yt(this,"clear")}},Ui.prototype.find=function(e,t){return this.primary.find(e,t)},mr(Ui);function rp(e,t,i,n,o){n=Ne(n),n.shared=!1;var a=[Yn(e,t,i,n,o)],f=a[0],d=n.widgetNode;return $r(e,function(p){d&&(n.widgetNode=d.cloneNode(!0)),a.push(Yn(p,ve(p,t),ve(p,i),n,o));for(var g=0;g<p.linked.length;++g)if(p.linked[g].isParent)return;f=D(a)}),new Ui(a,f)}function qu(e){return e.findMarks(ee(e.first,0),e.clipPos(ee(e.lastLine())),function(t){return t.parent})}function np(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),f=e.clipPos(o.to);if(v(a,f)){var d=Yn(e,a,f,n.primary,n.primary.type);n.markers.push(d),d.parent=n}}}function ip(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];$r(o.primary.doc,function(p){return a.push(p)});for(var f=0;f<o.markers.length;f++){var d=o.markers[f];G(a,d.doc)==-1&&(d.parent=null,o.markers.splice(f--,1))}},i=0;i<e.length;i++)t(i)}var op=0,It=function(e,t,i,n,o){if(!(this instanceof It))return new It(e,t,i,n,o);i==null&&(i=0),Wi.call(this,[new Hi([new Dn("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ee(i,0);this.sel=Gr(a),this.history=new Do(null),this.id=++op,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ns(this,{from:a,to:a,text:e}),Ot(this,Gr(a),ke)};It.prototype=pe(Wi.prototype,{constructor:It,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=xi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:wt(function(e){var t=ee(this.first,0),i=this.first+this.size-1;qn(this,{from:t,to:ee(i,we(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Oi(this.cm,0,0),Ot(this,Gr(t),ke)}),replaceRange:function(e,t,i,n){t=ve(this,t),i=i?ve(this,i):t,Gn(this,e,t,i,n)},getRange:function(e,t,i){var n=br(this,ve(this,e),ve(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(dn(this,e))return we(this,e)},getLineNumber:function(e){return je(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=we(this,e)),ur(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ve(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:wt(function(e,t,i){Ou(this,ve(this,typeof e=="number"?ee(e,t||0):e),null,i)}),setSelection:wt(function(e,t,i){Ou(this,ve(this,e),ve(this,t||e),i)}),extendSelection:wt(function(e,t,i){Io(this,ve(this,e),t&&ve(this,t),i)}),extendSelections:wt(function(e,t){_u(this,Vt(this,e),t)}),extendSelectionsBy:wt(function(e,t){var i=B(this.sel.ranges,e);_u(this,Vt(this,i),t)}),setSelections:wt(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new qe(ve(this,e[o].anchor),ve(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Ot(this,cr(this.cm,n,t),i)}}),addSelection:wt(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new qe(ve(this,e),ve(this,t||e))),Ot(this,cr(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=br(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=br(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:wt(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var f=o.ranges[a];n[a]={from:f.from(),to:f.to(),text:this.splitLines(e[a]),origin:i}}for(var d=t&&t!="end"&&Gh(this,n,t),p=n.length-1;p>=0;p--)qn(this,n[p]);d?Eu(this,d):this.cm&&Bn(this.cm)}),undo:wt(function(){Wo(this,"undo")}),redo:wt(function(){Wo(this,"redo")}),undoSelection:wt(function(){Wo(this,"undo",!0)}),redoSelection:wt(function(){Wo(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 Do(this.history),$r(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:Kn(this.history.done),undone:Kn(this.history.undone)}},setHistory:function(e){var t=this.history=new Do(this.history);t.done=Kn(e.done.slice(0),null,!0),t.undone=Kn(e.undone.slice(0),null,!0)},setGutterMarker:wt(function(e,t,i){return Fi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&R(o)&&(n.gutterMarkers=null),!0})}),clearGutter:wt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Fi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,R(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dn(this,e)||(t=e,e=we(this,e),!e))return null}else if(t=je(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:wt(function(e,t,i){return Fi(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(xe(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:wt(function(e,t,i){return Fi(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 f=a.match(xe(i));if(!f)return!1;var d=f.index+f[0].length;n[o]=a.slice(0,f.index)+(!f.index||d==a.length?"":" ")+a.slice(d)||null}else return!1;return!0})}),addLineWidget:wt(function(e,t,i){return tp(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Yn(this,ve(this,e),ve(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=ve(this,e),Yn(this,e,e,i,"bookmark")},findMarksAt:function(e){e=ve(this,e);var t=[],i=we(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=ve(this,e),t=ve(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var f=a.markedSpans;if(f)for(var d=0;d<f.length;d++){var p=f[d];!(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}),ve(this,ee(i,t))},indexFromPos:function(e){e=ve(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 It(xi(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 It(xi(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}],np(n,qu(this)),n},unlinkDoc:function(e){if(e instanceof it&&(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),ip(qu(this));break}}if(e.history==this.history){var n=[e.id];$r(e,function(o){return n.push(o.id)},!0),e.history=new Do(null),e.history.done=Kn(this.history.done,n),e.history.undone=Kn(this.history.undone,n)}},iterLinkedDocs:function(e){$r(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mi(e)},lineSeparator:function(){return this.lineSep||`
11
- `},setDirection:wt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Yh(this.cm))})}),It.prototype.eachLine=It.prototype.iter;var Gu=0;function lp(e){var t=this;if(Yu(t),!(lt(t,e)||Nr(t.display,e))){Pt(e),y&&(Gu=+new Date);var i=gn(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),f=0,d=function(){++f==o&&bt(t,function(){i=ve(t.doc,i);var O={from:i,to:i,text:t.doc.splitLines(a.filter(function(F){return F!=null}).join(t.doc.lineSeparator())),origin:"paste"};qn(t.doc,O),Eu(t.doc,Gr(ve(t.doc,i),ve(t.doc,Yr(O))))})()},p=function(O,F){if(t.options.allowDropFileTypes&&G(t.options.allowDropFileTypes,O.type)==-1){d();return}var $=new FileReader;$.onerror=function(){return d()},$.onload=function(){var ie=$.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ie)){d();return}a[F]=ie,d()},$.readAsText(O)},g=0;g<n.length;g++)p(n[g],g);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()),Fo(t.doc,Gr(i,i)),C)for(var z=0;z<C.length;++z)Gn(t.doc,"",C[z].anchor,C[z].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function sp(e,t){if(y&&(!e.state.draggingText||+new Date-Gu<100)){cn(t);return}if(!(lt(e,t)||Nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!H)){var i=U("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",N&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),N&&i.parentNode.removeChild(i)}}function ap(e,t){var i=gn(e,t);if(!!i){var n=document.createDocumentFragment();jl(e,i,n),e.display.dragCursor||(e.display.dragCursor=U("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),I(e.display.dragCursor,n)}}function Yu(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function $u(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 Xu=!1;function up(){Xu||(fp(),Xu=!0)}function fp(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,$u(cp)},100))}),Ce(window,"blur",function(){return $u(Wn)})}function cp(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Zr={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"},Ki=0;Ki<10;Ki++)Zr[Ki+48]=Zr[Ki+96]=String(Ki);for(var Bo=65;Bo<=90;Bo++)Zr[Bo]=String.fromCharCode(Bo);for(var ji=1;ji<=12;ji++)Zr[ji+111]=Zr[ji+63235]="F"+ji;var Dr={};Dr.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"},Dr.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"},Dr.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"},Dr.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"]},Dr.default=he?Dr.macDefault:Dr.pcDefault;function dp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,f=0;f<t.length-1;f++){var d=t[f];if(/^(cmd|meta|m)$/i.test(d))a=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))n=!0;else if(/^s(hift)?$/i.test(d))o=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function hp(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=B(i.split(" "),dp),a=0;a<o.length;a++){var f=void 0,d=void 0;a==o.length-1?(d=o.join(" "),f=n):(d=o.slice(0,a+1).join(" "),f="...");var p=t[d];if(!p)t[d]=f;else if(p!=f)throw new Error("Inconsistent bindings for "+d)}delete e[i]}for(var g in t)e[g]=t[g];return e}function $n(e,t,i,n){t=Uo(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 $n(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var f=$n(e,t.fallthrough[a],i,n);if(f)return f}}}function Zu(e){var t=typeof e=="string"?e:Zr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Ju(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(tt?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(tt?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Qu(e,t){if(N&&e.keyCode==34&&e.char)return!1;var i=Zr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),Ju(i,e,t))}function Uo(e){return typeof e=="string"?Dr[e]:e}function Xn(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&v(a.from,D(n).to)<=0;){var f=n.pop();if(v(f.from,a.from)<0){a.from=f.from;break}}n.push(a)}qt(e,function(){for(var d=n.length-1;d>=0;d--)Gn(e.doc,"",n[d].from,n[d].to,"+delete");Bn(e)})}function ss(e,t,i){var n=Se(e.text,t+i,i);return n<0||n>e.text.length?null:n}function as(e,t,i){var n=ss(e,t.ch,i);return n==null?null:new ee(t.line,n,i<0?"after":"before")}function us(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=dt(i,t.doc.direction);if(a){var f=o<0?D(a):a[0],d=o<0==(f.level==1),p=d?"after":"before",g;if(f.level>0||t.doc.direction=="rtl"){var k=In(t,i);g=o<0?i.text.length-1:0;var C=Sr(t,k,g).top;g=ze(function(z){return Sr(t,k,z).top==C},o<0==(f.level==1)?f.from:f.to-1,g),p=="before"&&(g=ss(i,g,1))}else g=o<0?f.to:f.from;return new ee(n,g,p)}}return new ee(n,o<0?i.text.length:0,o<0?"before":"after")}function pp(e,t,i,n){var o=dt(t,e.doc.direction);if(!o)return as(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=Ee(o,i.ch,i.sticky),f=o[a];if(e.doc.direction=="ltr"&&f.level%2==0&&(n>0?f.to>i.ch:f.from<i.ch))return as(t,i,n);var d=function(ce,ge){return ss(t,ce instanceof ee?ce.ch:ce,ge)},p,g=function(ce){return e.options.lineWrapping?(p=p||In(e,t),nu(e,t,p,ce)):{begin:0,end:t.text.length}},k=g(i.sticky=="before"?d(i,-1):i.ch);if(e.doc.direction=="rtl"||f.level==1){var C=f.level==1==n<0,z=d(i,C?1:-1);if(z!=null&&(C?z<=f.to&&z<=k.end:z>=f.from&&z>=k.begin)){var O=C?"before":"after";return new ee(i.line,z,O)}}var F=function(ce,ge,de){for(var ye=function(Qe,xt){return xt?new ee(i.line,d(Qe,1),"before"):new ee(i.line,Qe,"after")};ce>=0&&ce<o.length;ce+=ge){var Pe=o[ce],Me=ge>0==(Pe.level!=1),De=Me?de.begin:d(de.end,-1);if(Pe.from<=De&&De<Pe.to||(De=Me?Pe.from:d(Pe.to,-1),de.begin<=De&&De<de.end))return ye(De,Me)}},$=F(a+n,n,k);if($)return $;var ie=n>0?k.end:d(k.begin,-1);return ie!=null&&!(n>0&&ie==t.text.length)&&($=F(n>0?0:o.length-1,n,g(ie)),$)?$:null}var qi={selectAll:Ru,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return Xn(e,function(t){if(t.empty()){var i=we(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ee(t.head.line+1,0)}:{from:t.head,to:ee(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xn(e,function(t){return{from:ee(t.from().line,0),to:ve(e.doc,ee(t.to().line+1,0))}})},delLineLeft:function(e){return Xn(e,function(t){return{from:ee(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Xn(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 Xn(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(ee(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ee(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vu(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ef(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")},fe)},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")},fe)},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/)?ef(e,t.head):n},fe)},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(),f=Ve(e.getLine(a.line),a.ch,n);t.push(E(n-f%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=we(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new ee(o.line,o.ch-1)),o.ch>0)o=new ee(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),ee(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var f=we(e.doc,o.line-1).text;f&&(o=new ee(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ee(o.line-1,f.length-1),o,"+transpose"))}}i.push(new qe(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);Bn(e)})},openLine:function(e){return e.replaceSelection(`
12
- `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vu(e,t){var i=we(e.doc,t),n=ur(i);return n!=i&&(t=je(n)),us(!0,e,n,t,1)}function gp(e,t){var i=we(e.doc,t),n=Qd(i);return n!=i&&(t=je(n)),us(!0,e,i,t,-1)}function ef(e,t){var i=Vu(e,t.line),n=we(e.doc,i.line),o=dt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),f=t.line==i.line&&t.ch<=a&&t.ch;return ee(i.line,f?0:a,i.sticky)}return i}function Ko(e,t,i){if(typeof t=="string"&&(t=qi[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)!=oe}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function vp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=$n(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&$n(t,e.options.extraKeys,i,e)||$n(t,e.options.keyMap,i,e)}var mp=new W;function Gi(e,t,i,n){var o=e.state.keySeq;if(o){if(Zu(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:mp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),tf(e,o+" "+t,i,n))return!0}return tf(e,t,i,n)}function tf(e,t,i,n){var o=vp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&yt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(Pt(i),ql(e)),!!o}function rf(e,t){var i=Qu(t,!0);return i?t.shiftKey&&!e.state.keySeq?Gi(e,"Shift-"+i,t,function(n){return Ko(e,n,!0)})||Gi(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ko(e,n)}):Gi(e,i,t,function(n){return Ko(e,n)}):!1}function yp(e,t,i){return Gi(e,"'"+i+"'",t,function(n){return Ko(e,n,!0)})}var fs=null;function nf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=se(),!lt(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=rf(t,e);N&&(fs=n?i:null,!n&&i==88&&!mo&&(he?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),c&&!he&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&bp(t)}}function bp(e){var t=e.display.lineDiv;_e(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(me(t,"CodeMirror-crosshair"),Ze(document,"keyup",i),Ze(document,"mouseover",i))}Ce(document,"keyup",i),Ce(document,"mouseover",i)}function of(e){e.keyCode==16&&(this.doc.sel.shift=!1),lt(this,e)}function lf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Nr(t.display,e)||lt(t,e)||e.ctrlKey&&!e.altKey||he&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(N&&i==fs){fs=null,Pt(e);return}if(!(N&&(!e.which||e.which<10)&&rf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(yp(t,e,o)||t.display.input.onKeyPress(e))}}}var wp=400,cs=function(e,t,i){this.time=e,this.pos=t,this.button=i};cs.prototype.compare=function(e,t,i){return this.time+wp>e&&v(t,this.pos)==0&&i==this.button};var Yi,$i;function xp(e,t){var i=+new Date;return $i&&$i.compare(i,e,t)?(Yi=$i=null,"triple"):Yi&&Yi.compare(i,e,t)?($i=new cs(i,e,t),Yi=null,"double"):(Yi=new cs(i,e,t),$i=null,"single")}function sf(e){var t=this,i=t.display;if(!(lt(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Nr(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!ds(t,e)){var n=gn(t,e),o=po(e),a=n?xp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&kp(t,o,n,a,e))&&(o==1?n?Cp(t,n,a,e):Br(e)==i.scroller&&Pt(e):o==2?(n&&Io(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(Be?t.display.input.onContextMenu(e):Gl(t)))}}}function kp(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,Gi(e,Ju(a,o),o,function(f){if(typeof f=="string"&&(f=qi[f]),!f)return!1;var d=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d=f(e,i)!=oe}finally{e.state.suppressEdits=!1}return d})}function Sp(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=Ae?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=he?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(he?i.altKey:i.ctrlKey)),o}function Cp(e,t,i,n){y?setTimeout(ct(su,e),0):e.curOp.focus=se();var o=Sp(e,i,n),a=e.doc.sel,f;e.options.dragDrop&&gi&&!e.isReadOnly()&&i=="single"&&(f=a.contains(t))>-1&&(v((f=a.ranges[f]).from(),t)<0||t.xRel>0)&&(v(f.to(),t)>0||t.xRel<0)?Tp(e,n,t,o):Lp(e,n,t,o)}function Tp(e,t,i,n){var o=e.display,a=!1,f=bt(e,function(g){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Gl(e)),Ze(o.wrapper.ownerDocument,"mouseup",f),Ze(o.wrapper.ownerDocument,"mousemove",d),Ze(o.scroller,"dragstart",p),Ze(o.scroller,"drop",f),a||(Pt(g),n.addNew||Io(e.doc,i,null,null,n.extend),S&&!H||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),d=function(g){a=a||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=f,f.copy=!n.moveOnDrag,Ce(o.wrapper.ownerDocument,"mouseup",f),Ce(o.wrapper.ownerDocument,"mousemove",d),Ce(o.scroller,"dragstart",p),Ce(o.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function af(e,t,i){if(i=="char")return new qe(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new qe(ee(t.line,0),ve(e.doc,ee(t.line+1,0)));var n=i(e,t);return new qe(n.from,n.to)}function Lp(e,t,i,n){y&&Gl(e);var o=e.display,a=e.doc;Pt(t);var f,d,p=a.sel,g=p.ranges;if(n.addNew&&!n.extend?(d=a.sel.contains(i),d>-1?f=g[d]:f=new qe(i,i)):(f=a.sel.primary(),d=a.sel.primIndex),n.unit=="rectangle")n.addNew||(f=new qe(i,i)),i=gn(e,t,!0,!0),d=-1;else{var k=af(e,i,n.unit);n.extend?f=os(f,k.anchor,k.head,n.extend):f=k}n.addNew?d==-1?(d=g.length,Ot(a,cr(e,g.concat([f]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&n.unit=="char"&&!n.extend?(Ot(a,cr(e,g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):ls(a,d,f,be):(d=0,Ot(a,new er([f],0),be),p=a.sel);var C=i;function z(de){if(v(C,de)!=0)if(C=de,n.unit=="rectangle"){for(var ye=[],Pe=e.options.tabSize,Me=Ve(we(a,i.line).text,i.ch,Pe),De=Ve(we(a,de.line).text,de.ch,Pe),Qe=Math.min(Me,De),xt=Math.max(Me,De),st=Math.min(i.line,de.line),Gt=Math.min(e.lastLine(),Math.max(i.line,de.line));st<=Gt;st++){var Ft=we(a,st).text,ht=Le(Ft,Qe,Pe);Qe==xt?ye.push(new qe(ee(st,ht),ee(st,ht))):Ft.length>ht&&ye.push(new qe(ee(st,ht),ee(st,Le(Ft,xt,Pe))))}ye.length||ye.push(new qe(i,i)),Ot(a,cr(e,p.ranges.slice(0,d).concat(ye),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(de)}else{var Ht=f,Tt=af(e,de,n.unit),vt=Ht.anchor,pt;v(Tt.anchor,vt)>0?(pt=Tt.head,vt=Oe(Ht.from(),Tt.anchor)):(pt=Tt.anchor,vt=re(Ht.to(),Tt.head));var ut=p.ranges.slice(0);ut[d]=Mp(e,new qe(ve(a,vt),pt)),Ot(a,cr(e,ut,d),be)}}var O=o.wrapper.getBoundingClientRect(),F=0;function $(de){var ye=++F,Pe=gn(e,de,!0,n.unit=="rectangle");if(!!Pe)if(v(Pe,C)!=0){e.curOp.focus=se(),z(Pe);var Me=Eo(o,a);(Pe.line>=Me.to||Pe.line<Me.from)&&setTimeout(bt(e,function(){F==ye&&$(de)}),150)}else{var De=de.clientY<O.top?-20:de.clientY>O.bottom?20:0;De&&setTimeout(bt(e,function(){F==ye&&(o.scroller.scrollTop+=De,$(de))}),50)}}function ie(de){e.state.selectingText=!1,F=1/0,de&&(Pt(de),o.input.focus()),Ze(o.wrapper.ownerDocument,"mousemove",ce),Ze(o.wrapper.ownerDocument,"mouseup",ge),a.history.lastSelOrigin=null}var ce=bt(e,function(de){de.buttons===0||!po(de)?ie(de):$(de)}),ge=bt(e,ie);e.state.selectingText=ge,Ce(o.wrapper.ownerDocument,"mousemove",ce),Ce(o.wrapper.ownerDocument,"mouseup",ge)}function Mp(e,t){var i=t.anchor,n=t.head,o=we(e.doc,i.line);if(v(i,n)==0&&i.sticky==n.sticky)return t;var a=dt(o);if(!a)return t;var f=Ee(a,i.ch,i.sticky),d=a[f];if(d.from!=i.ch&&d.to!=i.ch)return t;var p=f+(d.from==i.ch==(d.level!=1)?0:1);if(p==0||p==a.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=Ee(a,n.ch,n.sticky),C=k-f||(n.ch-i.ch)*(d.level==1?-1:1);k==p-1||k==p?g=C<0:g=C>0}var z=a[p+(g?-1:0)],O=g==(z.level==1),F=O?z.from:z.to,$=O?"after":"before";return i.ch==F&&i.sticky==$?t:new qe(new ee(i.line,F,$),n)}function uf(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&&Pt(t);var f=e.display,d=f.lineDiv.getBoundingClientRect();if(a>d.bottom||!Ct(e,i))return Zt(t);a-=d.top-f.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var g=f.gutters.childNodes[p];if(g&&g.getBoundingClientRect().right>=o){var k=wr(e.doc,a),C=e.display.gutterSpecs[p];return Te(e,i,e,k,C.className,t),Zt(t)}}}function ds(e,t){return uf(e,t,"gutterClick",!0)}function ff(e,t){Nr(e.display,t)||Pp(e,t)||lt(e,t,"contextmenu")||Be||e.display.input.onContextMenu(t)}function Pp(e,t){return Ct(e,"gutterContextMenu")?uf(e,t,"gutterContextMenu",!1):!1}function cf(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pi(e)}var Zn={toString:function(){return"CodeMirror.Init"}},df={},jo={};function _p(e){var t=e.optionHandlers;function i(n,o,a,f){e.defaults[n]=o,a&&(t[n]=f?function(d,p,g){g!=Zn&&a(d,p,g)}:a)}e.defineOption=i,e.Init=Zn,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,rs(n)},!0),i("indentUnit",2,rs,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Ri(n),Pi(n),Rt(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],f=n.doc.first;n.doc.iter(function(p){for(var g=0;;){var k=p.text.indexOf(o,g);if(k==-1)break;g=k+o.length,a.push(ee(f,k))}f++});for(var d=a.length-1;d>=0;d--)Gn(n.doc,o,a[d],ee(a[d].line,a[d].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!=Zn&&n.refresh()}),i("specialCharPlaceholder",ih,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",ne?"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",!Fe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){cf(n),Di(n)},!0),i("keyMap","default",function(n,o,a){var f=Uo(o),d=a!=Zn&&Uo(a);d&&d.detach&&d.detach(n,f),f.attach&&f.attach(n,d||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ep,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=es(o,n.options.lineNumbers),Di(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 Un(n)},!0),i("scrollbarStyle","native",function(n){hu(n),Un(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=es(n.options.gutters,o),Di(n)},!0),i("firstLineNumber",1,Di,!0),i("lineNumberFormatter",function(n){return n},Di,!0),i("showCursorWhenSelecting",!1,_i,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Wn(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,Op),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,_i,!0),i("singleCursorHeightPerLine",!0,_i,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Ri,!0),i("addModeClass",!1,Ri,!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,Ri,!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 Op(e,t,i){var n=i&&i!=Zn;if(!t!=!n){var o=e.display.dragFunctions,a=t?Ce:Ze;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 Ep(e){e.options.lineWrapping?(_e(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(me(e.display.wrapper,"CodeMirror-wrap"),Al(e)),Kl(e),Rt(e),Pi(e),setTimeout(function(){return Un(e)},100)}function it(e,t){var i=this;if(!(this instanceof it))return new it(e,t);this.options=t=t?Ne(t):{},Ne(df,t,!1);var n=t.value;typeof n=="string"?n=new It(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new it.inputStyles[t.inputStyle](this),a=this.display=new jh(e,n,o,t);a.wrapper.CodeMirror=this,cf(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),hu(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 W,keySeq:null,specialChars:null},t.autofocus&&!ne&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ap(this),up(),bn(this),this.curOp.forceUpdate=!0,Su(this,n),t.autofocus&&!ne||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Yl(i)},20):Wn(this);for(var f in jo)jo.hasOwnProperty(f)&&jo[f](this,t[f],Zn);vu(this),t.finishInit&&t.finishInit(this);for(var d=0;d<hs.length;++d)hs[d](this);wn(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}it.defaults=df,it.optionHandlers=jo;function Ap(e){var t=e.display;Ce(t.scroller,"mousedown",bt(e,sf)),y&&x<11?Ce(t.scroller,"dblclick",bt(e,function(p){if(!lt(e,p)){var g=gn(e,p);if(!(!g||ds(e,p)||Nr(e.display,p))){Pt(p);var k=e.findWordAt(g);Io(e.doc,k.anchor,k.head)}}})):Ce(t.scroller,"dblclick",function(p){return lt(e,p)||Pt(p)}),Ce(t.scroller,"contextmenu",function(p){return ff(e,p)}),Ce(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||ff(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 g=p.touches[0];return g.radiusX<=1&&g.radiusY<=1}function f(p,g){if(g.left==null)return!0;var k=g.left-p.left,C=g.top-p.top;return k*k+C*C>20*20}Ce(t.scroller,"touchstart",function(p){if(!lt(e,p)&&!a(p)&&!ds(e,p)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(p){var g=t.activeTouch;if(g&&!Nr(t,p)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!g.prev||f(g,g.prev)?C=new qe(k,k):!g.prev.prev||f(g,g.prev.prev)?C=e.findWordAt(k):C=new qe(ee(k.line,0),ve(e.doc,ee(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),Pt(p)}o()}),Ce(t.scroller,"touchcancel",o),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ei(e,t.scroller.scrollTop),mn(e,t.scroller.scrollLeft,!0),Te(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(p){return bu(e,p)}),Ce(t.scroller,"DOMMouseScroll",function(p){return bu(e,p)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){lt(e,p)||cn(p)},over:function(p){lt(e,p)||(ap(e,p),cn(p))},start:function(p){return sp(e,p)},drop:bt(e,lp),leave:function(p){lt(e,p)||Yu(e)}};var d=t.input.getField();Ce(d,"keyup",function(p){return of.call(e,p)}),Ce(d,"keydown",bt(e,nf)),Ce(d,"keypress",bt(e,lf)),Ce(d,"focus",function(p){return Yl(e,p)}),Ce(d,"blur",function(p){return Wn(e,p)})}var hs=[];it.defineInitHook=function(e){return hs.push(e)};function Xi(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=Si(e,t).state:i="prev");var f=e.options.tabSize,d=we(o,t),p=Ve(d.text,null,f);d.stateAfter&&(d.stateAfter=null);var g=d.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(d.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,d.text.slice(g.length),d.text),k==oe||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=Ve(we(o,t-1).text,null,f):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="",z=0;if(e.options.indentWithTabs)for(var O=Math.floor(k/f);O;--O)z+=f,C+=" ";if(z<k&&(C+=E(k-z)),C!=g)return Gn(o,C,ee(t,0),ee(t,g.length),"+input"),d.stateAfter=null,!0;for(var F=0;F<o.sel.ranges.length;F++){var $=o.sel.ranges[F];if($.head.line==t&&$.head.ch<g.length){var ie=ee(t,g.length);ls(o,F,new qe(ie,ie));break}}}var dr=null;function qo(e){dr=e}function ps(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var f=+new Date-200,d=o=="paste"||e.state.pasteIncoming>f,p=mi(t),g=null;if(d&&n.ranges.length>1)if(dr&&dr.text.join(`
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 _h(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ee(t.line,t.ch+1,"before"):t,t=t.ch?ee(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var f=!1,d=fr(e,t),p=!i||i==t?d:fr(e,i);o={left:Math.min(d.left,p.left),top:Math.min(d.top,p.top)-n,right:Math.max(d.left,p.left),bottom:Math.max(d.bottom,p.bottom)+n};var g=$l(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(g.scrollTop!=null&&(Ei(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(f=!0)),g.scrollLeft!=null&&(mn(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(f=!0)),!f)break}return o}function Oh(e,t){var i=$l(e,t);i.scrollTop!=null&&Ei(e,i.scrollTop),i.scrollLeft!=null&&mn(e,i.scrollLeft)}function $l(e,t){var i=e.display,n=Fn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=Dl(e),f={};t.bottom-t.top>a&&(t.bottom=t.top+a);var d=e.doc.height+zl(i),p=t.top<n,g=t.bottom>d-n;if(t.top<o)f.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(g?d:t.bottom)-a);k!=o&&(f.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,z=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,O=hn(e)-i.gutters.offsetWidth,F=t.right-t.left>O;return F&&(t.right=t.left+O),t.left<10?f.scrollLeft=0:t.left<z?f.scrollLeft=Math.max(0,t.left+C-(F?0:10)):t.right>O+z-3&&(f.scrollLeft=t.right+(F?0:10)-O),f}function Xl(e,t){t!=null&&(No(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Bn(e){No(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Oi(e,t,i){(t!=null||i!=null)&&No(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Eh(e,t){No(e),e.curOp.scrollToPos=t}function No(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=tu(e,t.from),n=tu(e,t.to);uu(e,i,n,t.margin)}}function uu(e,t,i,n){var o=$l(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});Oi(e,o.scrollLeft,o.scrollTop)}function Ei(e,t){Math.abs(e.doc.scrollTop-t)<2||(c||Jl(e,{top:t}),fu(e,t,!0),c&&Jl(e),zi(e,100))}function fu(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 mn(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,gu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ai(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+zl(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+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var yn=function(e,t,i){this.cm=i;var n=this.vert=U("div",[U("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=U("div",[U("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Ce(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Ce(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yn.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}},yn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yn.prototype.zeroWidthHack=function(){var e=he&&!V?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},yn.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)},yn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ni=function(){};Ni.prototype.update=function(){return{bottom:0,right:0}},Ni.prototype.setScrollLeft=function(){},Ni.prototype.setScrollTop=function(){},Ni.prototype.clear=function(){};function Un(e,t){t||(t=Ai(e));var i=e.display.barWidth,n=e.display.barHeight;cu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Eo(e),cu(e,Ai(e)),i=e.display.barWidth,n=e.display.barHeight}function cu(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 du={native:yn,null:Ni};function hu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&me(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new du[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(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"?mn(e,t):Ei(e,t)},e),e.display.scrollbars.addClass&&_e(e.display.wrapper,e.display.scrollbars.addClass)}var Ah=0;function bn(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:++Ah,markArrays:null},uh(e.curOp)}function wn(e){var t=e.curOp;t&&ch(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;Nh(i)})}function Nh(e){for(var t=e.ops,i=0;i<t.length;i++)zh(t[i]);for(var n=0;n<t.length;n++)Dh(t[n]);for(var o=0;o<t.length;o++)Rh(t[o]);for(var a=0;a<t.length;a++)Ih(t[a]);for(var f=0;f<t.length;f++)Fh(t[f])}function zh(e){var t=e.cm,i=t.display;Wh(t),e.updateMaxLine&&Al(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 zo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Dh(e){e.updatedDisplay=e.mustUpdate&&Zl(e.cm,e.update)}function Rh(e){var t=e.cm,i=t.display;e.updatedDisplay&&Eo(t),e.barMeasure=Ai(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(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+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-hn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Ih(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==se();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Un(t,e.barMeasure),e.updatedDisplay&&Vl(t,e.barMeasure),e.selectionChanged&&ql(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&su(e.cm)}function Fh(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&pu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&fu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&mn(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=_h(t,ve(n,e.scrollToPos.from),ve(n,e.scrollToPos.to),e.scrollToPos.margin);Ph(t,o)}var a=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(a)for(var d=0;d<a.length;++d)a[d].lines.length||Te(a[d],"hide");if(f)for(var p=0;p<f.length;++p)f[p].lines.length&&Te(f[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Te(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function jt(e,t){if(e.curOp)return t();bn(e);try{return t()}finally{wn(e)}}function bt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);bn(e);try{return t.apply(e,arguments)}finally{wn(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);bn(this);try{return e.apply(this,arguments)}finally{wn(this)}}}function wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);bn(t);try{return e.apply(this,arguments)}finally{wn(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ct(Hh,e))}function Hh(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=Si(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 f=a.styles,d=a.text.length>e.options.maxHighlightLength?Qt(t.mode,n.state):null,p=xa(e,a,n,!0);d&&(n.state=d),a.styles=p.styles;var g=a.styleClasses,k=p.classes;k?a.styleClasses=k:g&&(a.styleClasses=null);for(var C=!f||f.length!=a.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),z=0;!C&&z<f.length;++z)C=f[z]!=a.styles[z];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ll(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return zi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&jt(e,function(){for(var a=0;a<o.length;a++)jr(e,o[a],"text")})}}var zo=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Ao(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=hn(e),this.force=i,this.dims=Bl(e),this.events=[]};zo.prototype.signal=function(e,t){Ct(e,t)&&this.events.push(arguments)},zo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Te.apply(null,this.events[e])};function Wh(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}function Bh(e){if(e.hasFocus())return null;var t=se();if(!t||!K(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&K(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function Uh(e){if(!(!e||!e.activeElt||e.activeElt==se())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&K(document.body,e.anchorNode)&&K(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 Zl(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return qr(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&&ou(e)==0)return!1;vu(e)&&(qr(e),t.dims=Bl(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),f=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>f&&i.viewTo-f<20&&(f=Math.min(o,i.viewTo)),Er&&(a=Ol(e.doc,a),f=Da(e.doc,f));var d=a!=i.viewFrom||f!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Lh(e,a,f),i.viewOffset=Ar(we(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=ou(e);if(!d&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=Bh(e);return p>4&&(i.lineDiv.style.display="none"),Kh(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Uh(g),We(i.cursorDiv),We(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,d&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,zi(e,400)),i.updateLineNumbers=null,!0}function pu(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==hn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+zl(e.display)-Dl(e),i.top)}),t.visible=Ao(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ao(e.display,e.doc,i));if(!Zl(e,t))break;Eo(e);var o=Ai(e);_i(e),Un(e,o),Vl(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 Jl(e,t){var i=new zo(e,t);if(Zl(e,i)){Eo(e),pu(e,i);var n=Ai(e);_i(e),Un(e,n),Vl(e,n),i.finish()}}function Kh(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,f=a.firstChild;function d(F){var $=F.nextSibling;return S&&he&&e.display.currentWheelTarget==F?F.style.display="none":F.parentNode.removeChild(F),$}for(var p=n.view,g=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var z=vh(e,C,g,i);a.insertBefore(z,f)}else{for(;f!=C.node;)f=d(f);var O=o&&t!=null&&t<=g&&C.lineNumber;C.changes&&(G(C.changes,"gutter")>-1&&(O=!1),Wa(e,C,g,i)),O&&(We(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(ki(e.options,g)))),f=C.node.nextSibling}g+=C.size}for(;f;)f=d(f)}function Ql(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",yt(e,"gutterChanged",e)}function Vl(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+kr(e)+"px"}function gu(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",f=0;f<i.length;f++)if(!i[f].hidden){e.options.fixedGutter&&(i[f].gutter&&(i[f].gutter.style.left=a),i[f].gutterBackground&&(i[f].gutterBackground.style.left=a));var d=i[f].alignable;if(d)for(var p=0;p<d.length;p++)d[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function vu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=ki(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild(U("div",[U("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,f=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-f)+1,n.lineNumWidth=n.lineNumInnerWidth+f,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Ql(e.display),!0}return!1}function es(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],f=null;if(typeof a!="string"&&(f=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:f})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function mu(e){var t=e.gutters,i=e.gutterSpecs;We(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,f=o.style,d=t.appendChild(U("div",null,"CodeMirror-gutter "+a));f&&(d.style.cssText=f),a=="CodeMirror-linenumbers"&&(e.lineGutter=d,d.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Ql(e)}function Di(e){mu(e.display),Rt(e),gu(e)}function jh(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=U("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=U("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=w("div",null,"CodeMirror-code"),o.selectionDiv=U("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=U("div",null,"CodeMirror-cursors"),o.measure=U("div",null,"CodeMirror-measure"),o.lineMeasure=U("div",null,"CodeMirror-measure"),o.lineSpace=w("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=w("div",[o.lineSpace],"CodeMirror-lines");o.mover=U("div",[a],null,"position: relative"),o.sizer=U("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=U("div",null,null,"position: absolute; height: "+j+"px; width: 1px;"),o.gutters=U("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=U("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=U("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&x<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!S&&!(c&&ne)&&(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=es(n.gutters,n.lineNumbers),mu(o),i.init(o)}var Do=0,zr=null;y?zr=-.53:c?zr=15:_?zr=-.7:H&&(zr=-1/3);function yu(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 qh(e){var t=yu(e);return t.x*=zr,t.y*=zr,t}function bu(e,t){var i=yu(t),n=i.x,o=i.y,a=zr;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var f=e.display,d=f.scroller,p=d.scrollWidth>d.clientWidth,g=d.scrollHeight>d.clientHeight;if(!!(n&&p||o&&g)){if(o&&he&&S){e:for(var k=t.target,C=f.view;k!=d;k=k.parentNode)for(var z=0;z<C.length;z++)if(C[z].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!c&&!N&&a!=null){o&&g&&Ei(e,Math.max(0,d.scrollTop+o*a)),mn(e,Math.max(0,d.scrollLeft+n*a)),(!o||o&&g)&&Pt(t),f.wheelStartX=null;return}if(o&&a!=null){var O=o*a,F=e.doc.scrollTop,$=F+f.wrapper.clientHeight;O<0?F=Math.max(0,F+O-50):$=Math.min(e.doc.height,$+O+50),Jl(e,{top:F,bottom:$})}Do<20&&t.deltaMode!==0&&(f.wheelStartX==null?(f.wheelStartX=d.scrollLeft,f.wheelStartY=d.scrollTop,f.wheelDX=n,f.wheelDY=o,setTimeout(function(){if(f.wheelStartX!=null){var ie=d.scrollLeft-f.wheelStartX,ce=d.scrollTop-f.wheelStartY,ge=ce&&f.wheelDY&&ce/f.wheelDY||ie&&f.wheelDX&&ie/f.wheelDX;f.wheelStartX=f.wheelStartY=null,!!ge&&(zr=(zr*Do+ge)/(Do+1),++Do)}},200)):(f.wheelDX+=n,f.wheelDY+=o))}}var er=function(e,t){this.ranges=e,this.primIndex=t};er.prototype.primary=function(){return this.ranges[this.primIndex]},er.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(!L(i.anchor,n.anchor)||!L(i.head,n.head))return!1}return!0},er.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new qe(q(this.ranges[t].anchor),q(this.ranges[t].head));return new er(e,this.primIndex)},er.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},er.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(v(t,n.from())>=0&&v(e,n.to())<=0)return i}return-1};var qe=function(e,t){this.anchor=e,this.head=t};qe.prototype.from=function(){return Oe(this.anchor,this.head)},qe.prototype.to=function(){return re(this.anchor,this.head)},qe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(z,O){return v(z.from(),O.from())}),i=G(t,o);for(var a=1;a<t.length;a++){var f=t[a],d=t[a-1],p=v(d.to(),f.from());if(n&&!f.empty()?p>0:p>=0){var g=Oe(d.from(),f.from()),k=re(d.to(),f.to()),C=d.empty()?f.from()==f.head:d.from()==d.head;a<=i&&--i,t.splice(--a,2,new qe(C?k:g,C?g:k))}}return new er(t,i)}function Gr(e,t){return new er([new qe(e,t||e)],0)}function Yr(e){return e.text?ee(e.from.line+e.text.length-1,D(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function wu(e,t){if(v(e,t.from)<0)return e;if(v(e,t.to)<=0)return Yr(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+=Yr(t).ch-t.to.ch),ee(i,n)}function ts(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new qe(wu(o.anchor,t),wu(o.head,t)))}return cr(e.cm,i,e.sel.primIndex)}function xu(e,t,i){return e.line==t.line?ee(i.line,e.ch-t.ch+i.ch):ee(i.line+(e.line-t.line),e.ch)}function Gh(e,t,i){for(var n=[],o=ee(e.first,0),a=o,f=0;f<t.length;f++){var d=t[f],p=xu(d.from,o,a),g=xu(Yr(d),o,a);if(o=d.to,a=g,i=="around"){var k=e.sel.ranges[f],C=v(k.head,k.anchor)<0;n[f]=new qe(C?g:p,C?p:g)}else n[f]=new qe(p,p)}return new er(n,e.sel.primIndex)}function rs(e){e.doc.mode=Nn(e.options,e.doc.modeOption),Ri(e)}function Ri(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,zi(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function ku(e,t){return t.from.ch==0&&t.to.ch==0&&D(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ns(e,t,i,n){function o(ge){return i?i[ge]:null}function a(ge,de,ye){eh(ge,de,ye,n),yt(ge,"change",ge,t)}function f(ge,de){for(var ye=[],Pe=ge;Pe<de;++Pe)ye.push(new Dn(g[Pe],o(Pe),n));return ye}var d=t.from,p=t.to,g=t.text,k=we(e,d.line),C=we(e,p.line),z=D(g),O=o(g.length-1),F=p.line-d.line;if(t.full)e.insert(0,f(0,g.length)),e.remove(g.length,e.size-g.length);else if(ku(e,t)){var $=f(0,g.length-1);a(C,C.text,O),F&&e.remove(d.line,F),$.length&&e.insert(d.line,$)}else if(k==C)if(g.length==1)a(k,k.text.slice(0,d.ch)+z+k.text.slice(p.ch),O);else{var ie=f(1,g.length-1);ie.push(new Dn(z+k.text.slice(p.ch),O,n)),a(k,k.text.slice(0,d.ch)+g[0],o(0)),e.insert(d.line+1,ie)}else if(g.length==1)a(k,k.text.slice(0,d.ch)+g[0]+C.text.slice(p.ch),o(0)),e.remove(d.line+1,F);else{a(k,k.text.slice(0,d.ch)+g[0],o(0)),a(C,z+C.text.slice(p.ch),O);var ce=f(1,g.length-1);F>1&&e.remove(d.line+1,F-1),e.insert(d.line+1,ce)}yt(e,"change",e,t)}function $r(e,t,i){function n(o,a,f){if(o.linked)for(var d=0;d<o.linked.length;++d){var p=o.linked[d];if(p.doc!=a){var g=f&&p.sharedHist;i&&!g||(t(p.doc,g),n(p.doc,o,g))}}}n(e,null,!0)}function Su(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Kl(e),rs(e),Cu(e),e.options.direction=t.direction,e.options.lineWrapping||Al(e),e.options.mode=t.modeOption,Rt(e)}function Cu(e){(e.doc.direction=="rtl"?_e:me)(e.display.lineDiv,"CodeMirror-rtl")}function Yh(e){jt(e,function(){Cu(e),Rt(e)})}function Ro(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 is(e,t){var i={from:q(t.from),to:Yr(t),text:br(e,t.from,t.to)};return Mu(e,i,t.from.line,t.to.line+1),$r(e,function(n){return Mu(n,i,t.from.line,t.to.line+1)},!0),i}function Tu(e){for(;e.length;){var t=D(e);if(t.ranges)e.pop();else break}}function $h(e,t){if(t)return Tu(e.done),D(e.done);if(e.done.length&&!D(e.done).ranges)return D(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),D(e.done)}function Lu(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,f,d;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)=="*"))&&(f=$h(o,o.lastOp==n)))d=D(f.changes),v(t.from,t.to)==0&&v(t.from,d.to)==0?d.to=Yr(t):f.changes.push(is(e,t));else{var p=D(o.done);for((!p||!p.ranges)&&Io(e.sel,o.done),f={changes:[is(e,t)],generation:o.generation},o.done.push(f);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,d||Te(e,"historyAdded")}function Xh(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 Zh(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||Xh(e,a,D(o.done),t))?o.done[o.done.length-1]=t:Io(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&Tu(o.undone)}function Io(e,t){var i=D(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Mu(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(f){f.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=f.markedSpans),++a})}function Jh(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 Qh(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Jh(i[o]));return n}function Pu(e,t){var i=Qh(e,t),n=Pl(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],f=n[o];if(a&&f){e:for(var d=0;d<f.length;++d){for(var p=f[d],g=0;g<a.length;++g)if(a[g].marker==p.marker)continue e;a.push(p)}}else f&&(i[o]=f)}return i}function Kn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?er.prototype.deepCopy.call(a):a);continue}var f=a.changes,d=[];n.push({changes:d});for(var p=0;p<f.length;++p){var g=f[p],k=void 0;if(d.push({from:g.from,to:g.to,text:g.text}),t)for(var C in g)(k=C.match(/^spans_(\d+)$/))&&G(t,Number(k[1]))>-1&&(D(d)[C]=g[C],delete g[C])}}return n}function os(e,t,i,n){if(n){var o=e.anchor;if(i){var a=v(t,o)<0;a!=v(i,o)<0?(o=t,t=i):a!=v(t,i)<0&&(t=i)}return new qe(o,t)}else return new qe(i||t,t)}function Fo(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Ot(e,new er([os(e.sel.primary(),t,i,o)],0),n)}function _u(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]=os(e.sel.ranges[a],t[a],null,o);var f=cr(e.cm,n,e.sel.primIndex);Ot(e,f,i)}function ls(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Ot(e,cr(e.cm,o,e.sel.primIndex),n)}function Ou(e,t,i,n){Ot(e,Gr(t,i),n)}function Vh(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 qe(ve(e,o[a].anchor),ve(e,o[a].head))},origin:i&&i.origin};return Te(e,"beforeSelectionChange",e,n),e.cm&&Te(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?cr(e.cm,n.ranges,n.ranges.length-1):t}function Eu(e,t,i){var n=e.history.done,o=D(n);o&&o.ranges?(n[n.length-1]=t,Ho(e,t,i)):Ot(e,t,i)}function Ot(e,t,i){Ho(e,t,i),Zh(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Ho(e,t,i){(Ct(e,"beforeSelectionChange")||e.cm&&Ct(e.cm,"beforeSelectionChange"))&&(t=Vh(e,t,i));var n=i&&i.bias||(v(t.primary().head,e.sel.primary().head)<0?-1:1);Au(e,zu(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Bn(e.cm)}function Au(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,On(e.cm)),yt(e,"cursorActivity",e))}function Nu(e){Au(e,zu(e,e.sel,null,!1))}function zu(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var f=t.ranges[a],d=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Wo(e,f.anchor,d&&d.anchor,i,n),g=Wo(e,f.head,d&&d.head,i,n);(o||p!=f.anchor||g!=f.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new qe(p,g))}return o?cr(e.cm,o,t.primIndex):t}function jn(e,t,i,n,o){var a=we(e,t.line);if(a.markedSpans)for(var f=0;f<a.markedSpans.length;++f){var d=a.markedSpans[f],p=d.marker,g="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((d.from==null||(g?d.from<=t.ch:d.from<t.ch))&&(d.to==null||(k?d.to>=t.ch:d.to>t.ch))){if(o&&(Te(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--f;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),z=void 0;if((n<0?k:g)&&(C=Du(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(z=v(C,i))&&(n<0?z<0:z>0))return jn(e,C,t,n,o)}var O=p.find(n<0?-1:1);return(n<0?g:k)&&(O=Du(e,O,n,O.line==t.line?a:null)),O?jn(e,O,t,n,o):null}}return t}function Wo(e,t,i,n,o){var a=n||1,f=jn(e,t,i,a,o)||!o&&jn(e,t,i,a,!0)||jn(e,t,i,-a,o)||!o&&jn(e,t,i,-a,!0);return f||(e.cantEdit=!0,ee(e.first,0))}function Du(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?ve(e,ee(t.line-1)):null:i>0&&t.ch==(n||we(e,t.line)).text.length?t.line<e.first+e.size-1?ee(t.line+1,0):null:new ee(t.line,t.ch+i)}function Ru(e){e.setSelection(ee(e.firstLine(),0),ee(e.lastLine()),ke)}function Iu(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,f,d){o&&(n.from=ve(e,o)),a&&(n.to=ve(e,a)),f&&(n.text=f),d!==void 0&&(n.origin=d)}),Te(e,"beforeChange",e,n),e.cm&&Te(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 qn(e,t,i){if(e.cm){if(!e.cm.curOp)return bt(e.cm,qn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"))&&(t=Iu(e,t,!0),!t))){var n=Pa&&!i&&Zd(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)Fu(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else Fu(e,t)}}function Fu(e,t){if(!(t.text.length==1&&t.text[0]==""&&v(t.from,t.to)==0)){var i=ts(e,t);Lu(e,t,i,e.cm?e.cm.curOp.id:NaN),Ii(e,t,i,Pl(e,t));var n=[];$r(e,function(o,a){!a&&G(n,o.history)==-1&&(Uu(o.history,t),n.push(o.history)),Ii(o,t,null,Pl(o,t))})}}function Bo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,f=e.sel,d=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,g=0;g<d.length&&(a=d[g],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));g++);if(g!=d.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=d.pop(),a.ranges){if(Io(a,p),i&&!a.equals(e.sel)){Ot(e,a,{clearRedo:!1});return}f=a}else if(n){d.push(a);return}else break;var k=[];Io(f,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"),z=function($){var ie=a.changes[$];if(ie.origin=t,C&&!Iu(e,ie,!1))return d.length=0,{};k.push(is(e,ie));var ce=$?ts(e,ie):D(d);Ii(e,ie,ce,Pu(e,ie)),!$&&e.cm&&e.cm.scrollIntoView({from:ie.from,to:Yr(ie)});var ge=[];$r(e,function(de,ye){!ye&&G(ge,de.history)==-1&&(Uu(de.history,ie),ge.push(de.history)),Ii(de,ie,null,Pu(de,ie))})},O=a.changes.length-1;O>=0;--O){var F=z(O);if(F)return F.v}}}}function Hu(e,t){if(t!=0&&(e.first+=t,e.sel=new er(B(e.sel.ranges,function(o){return new qe(ee(o.anchor.line+t,o.anchor.ch),ee(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)jr(e.cm,n,"gutter")}}function Ii(e,t,i,n){if(e.cm&&!e.cm.curOp)return bt(e.cm,Ii)(e,t,i,n);if(t.to.line<e.first){Hu(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);Hu(e,o),t={from:ee(e.first,0),to:ee(t.to.line+o,t.to.ch),text:[D(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ee(a,we(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=br(e,t.from,t.to),i||(i=ts(e,t)),e.cm?ep(e.cm,t,n):ns(e,t,n),Ho(e,i,ke),e.cantEdit&&Wo(e,ee(e.firstLine(),0))&&(e.cantEdit=!1)}}function ep(e,t,i){var n=e.doc,o=e.display,a=t.from,f=t.to,d=!1,p=a.line;e.options.lineWrapping||(p=je(ur(we(n,a.line))),n.iter(p,f.line+1,function(O){if(O==o.maxLine)return d=!0,!0})),n.sel.contains(t.from,t.to)>-1&&On(e),ns(n,t,i,iu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(O){var F=Co(O);F>o.maxLineLength&&(o.maxLine=O,o.maxLineLength=F,o.maxLineChanged=!0,d=!1)}),d&&(e.curOp.updateMaxLine=!0)),Kd(n,a.line),zi(e,400);var g=t.text.length-(f.line-a.line)-1;t.full?Rt(e):a.line==f.line&&t.text.length==1&&!ku(e.doc,t)?jr(e,a.line,"text"):Rt(e,a.line,f.line+1,g);var k=Ct(e,"changes"),C=Ct(e,"change");if(C||k){var z={from:a,to:f,text:t.text,removed:t.removed,origin:t.origin};C&&yt(e,"change",e,z),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(z)}e.display.selForContextMenu=null}function Gn(e,t,i,n,o){var a;n||(n=i),v(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),qn(e,{from:i,to:n,text:t,origin:o})}function Wu(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Bu(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],f=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var d=0;d<a.ranges.length;d++)Wu(a.ranges[d].anchor,t,i,n),Wu(a.ranges[d].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var g=a.changes[p];if(i<g.from.line)g.from=ee(g.from.line+n,g.from.ch),g.to=ee(g.to.line+n,g.to.ch);else if(t<=g.to.line){f=!1;break}}f||(e.splice(0,o+1),o=0)}}function Uu(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;Bu(e.done,i,n,o),Bu(e.undone,i,n,o)}function Fi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=we(e,Ue(e,t)):o=je(t),o==null?null:(n(a,o)&&e.cm&&jr(e.cm,o,i),a)}function Hi(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}Hi.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,th(o),yt(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 Wi(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}Wi.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),f=n.height;if(n.removeInner(e,a),this.height-=f-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 Hi))){var d=[];this.collapse(d),this.children=[new Hi(d)],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 f=o.lines.length%25+25,d=f;d<o.lines.length;){var p=new Hi(o.lines.slice(d,d+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,f),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 Wi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=G(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Wi(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 f=Math.min(t,a-e);if(o.iterN(e,f,i))return!0;if((t-=f)==0)break;e=0}else e-=a}}};var Bi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Bi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=je(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=Mi(this);Kt(i,Math.max(0,i.height-a)),e&&(jt(e,function(){Ku(e,i,-a),jr(e,n,"widget")}),yt(e,"lineWidgetCleared",e,this,n))}},Bi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Mi(this)-t;!o||(Kr(this.doc,n)||Kt(n,n.height+o),i&&jt(i,function(){i.curOp.forceUpdate=!0,Ku(i,n,o),yt(i,"lineWidgetChanged",i,e,je(n))}))},mr(Bi);function Ku(e,t,i){Ar(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Xl(e,i)}function tp(e,t,i,n){var o=new Bi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Fi(e,t,"widget",function(f){var d=f.widgets||(f.widgets=[]);if(o.insertAt==null?d.push(o):d.splice(Math.min(d.length,Math.max(0,o.insertAt)),0,o),o.line=f,a&&!Kr(e,f)){var p=Ar(f)<e.scrollTop;Kt(f,f.height+Mi(o)),p&&Xl(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&yt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:je(t)),o}var ju=0,Xr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ju};Xr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bn(e),Ct(this,"clear")){var i=this.find();i&&yt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var f=this.lines[a],d=Ci(f.markedSpans,this);e&&!this.collapsed?jr(e,je(f),"text"):e&&(d.to!=null&&(o=je(f)),d.from!=null&&(n=je(f))),f.markedSpans=Gd(f.markedSpans,d),d.from==null&&this.collapsed&&!Kr(this.doc,f)&&e&&Kt(f,Fn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var g=ur(this.lines[p]),k=Co(g);k>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Rt(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Nu(e.doc)),e&&yt(e,"markerCleared",e,this,n,o),t&&wn(e),this.parent&&this.parent.clear()}},Xr.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],f=Ci(a.markedSpans,this);if(f.from!=null&&(i=ee(t?a:je(a),f.from),e==-1))return i;if(f.to!=null&&(n=ee(t?a:je(a),f.to),e==1))return n}return i&&{from:i,to:n}},Xr.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;!t||!n||jt(n,function(){var o=t.line,a=je(t.line),f=Rl(n,a);if(f&&(Za(f),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Kr(i.doc,o)&&i.height!=null){var d=i.height;i.height=null;var p=Mi(i)-d;p&&Kt(o,o.height+p)}yt(n,"markerChanged",n,e)})},Xr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||G(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Xr.prototype.detachLine=function(e){if(this.lines.splice(G(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},mr(Xr);function Yn(e,t,i,n,o){if(n&&n.shared)return rp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return bt(e.cm,Yn)(e,t,i,n,o);var a=new Xr(e,o),f=v(t,i);if(n&&Ne(n,a,!1),f>0||f==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=w("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(za(e,t.line,t,i,a)||t.line!=i.line&&za(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");qd()}a.addToHistory&&Lu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var d=t.line,p=e.cm,g;if(e.iter(d,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&ur(C)==p.display.maxLine&&(g=!0),a.collapsed&&d!=t.line&&Kt(C,0),Yd(C,new wo(a,d==t.line?t.ch:null,d==i.line?i.ch:null),e.cm&&e.cm.curOp),++d}),a.collapsed&&e.iter(t.line,i.line+1,function(C){Kr(e,C)&&Kt(C,0)}),a.clearOnEnter&&Ce(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(jd(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ju,a.atomic=!0),p){if(g&&(p.curOp.updateMaxLine=!0),a.collapsed)Rt(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++)jr(p,k,"text");a.atomic&&Nu(p.doc),yt(p,"markerAdded",p,a)}return a}var Ui=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Ui.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();yt(this,"clear")}},Ui.prototype.find=function(e,t){return this.primary.find(e,t)},mr(Ui);function rp(e,t,i,n,o){n=Ne(n),n.shared=!1;var a=[Yn(e,t,i,n,o)],f=a[0],d=n.widgetNode;return $r(e,function(p){d&&(n.widgetNode=d.cloneNode(!0)),a.push(Yn(p,ve(p,t),ve(p,i),n,o));for(var g=0;g<p.linked.length;++g)if(p.linked[g].isParent)return;f=D(a)}),new Ui(a,f)}function qu(e){return e.findMarks(ee(e.first,0),e.clipPos(ee(e.lastLine())),function(t){return t.parent})}function np(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),f=e.clipPos(o.to);if(v(a,f)){var d=Yn(e,a,f,n.primary,n.primary.type);n.markers.push(d),d.parent=n}}}function ip(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];$r(o.primary.doc,function(p){return a.push(p)});for(var f=0;f<o.markers.length;f++){var d=o.markers[f];G(a,d.doc)==-1&&(d.parent=null,o.markers.splice(f--,1))}},i=0;i<e.length;i++)t(i)}var op=0,It=function(e,t,i,n,o){if(!(this instanceof It))return new It(e,t,i,n,o);i==null&&(i=0),Wi.call(this,[new Hi([new Dn("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ee(i,0);this.sel=Gr(a),this.history=new Ro(null),this.id=++op,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ns(this,{from:a,to:a,text:e}),Ot(this,Gr(a),ke)};It.prototype=pe(Wi.prototype,{constructor:It,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=xi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:wt(function(e){var t=ee(this.first,0),i=this.first+this.size-1;qn(this,{from:t,to:ee(i,we(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Oi(this.cm,0,0),Ot(this,Gr(t),ke)}),replaceRange:function(e,t,i,n){t=ve(this,t),i=i?ve(this,i):t,Gn(this,e,t,i,n)},getRange:function(e,t,i){var n=br(this,ve(this,e),ve(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(dn(this,e))return we(this,e)},getLineNumber:function(e){return je(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=we(this,e)),ur(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ve(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:wt(function(e,t,i){Ou(this,ve(this,typeof e=="number"?ee(e,t||0):e),null,i)}),setSelection:wt(function(e,t,i){Ou(this,ve(this,e),ve(this,t||e),i)}),extendSelection:wt(function(e,t,i){Fo(this,ve(this,e),t&&ve(this,t),i)}),extendSelections:wt(function(e,t){_u(this,Vt(this,e),t)}),extendSelectionsBy:wt(function(e,t){var i=B(this.sel.ranges,e);_u(this,Vt(this,i),t)}),setSelections:wt(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new qe(ve(this,e[o].anchor),ve(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Ot(this,cr(this.cm,n,t),i)}}),addSelection:wt(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new qe(ve(this,e),ve(this,t||e))),Ot(this,cr(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=br(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=br(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:wt(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var f=o.ranges[a];n[a]={from:f.from(),to:f.to(),text:this.splitLines(e[a]),origin:i}}for(var d=t&&t!="end"&&Gh(this,n,t),p=n.length-1;p>=0;p--)qn(this,n[p]);d?Eu(this,d):this.cm&&Bn(this.cm)}),undo:wt(function(){Bo(this,"undo")}),redo:wt(function(){Bo(this,"redo")}),undoSelection:wt(function(){Bo(this,"undo",!0)}),redoSelection:wt(function(){Bo(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 Ro(this.history),$r(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:Kn(this.history.done),undone:Kn(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history);t.done=Kn(e.done.slice(0),null,!0),t.undone=Kn(e.undone.slice(0),null,!0)},setGutterMarker:wt(function(e,t,i){return Fi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&R(o)&&(n.gutterMarkers=null),!0})}),clearGutter:wt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Fi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,R(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dn(this,e)||(t=e,e=we(this,e),!e))return null}else if(t=je(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:wt(function(e,t,i){return Fi(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(xe(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:wt(function(e,t,i){return Fi(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 f=a.match(xe(i));if(!f)return!1;var d=f.index+f[0].length;n[o]=a.slice(0,f.index)+(!f.index||d==a.length?"":" ")+a.slice(d)||null}else return!1;return!0})}),addLineWidget:wt(function(e,t,i){return tp(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Yn(this,ve(this,e),ve(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=ve(this,e),Yn(this,e,e,i,"bookmark")},findMarksAt:function(e){e=ve(this,e);var t=[],i=we(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=ve(this,e),t=ve(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var f=a.markedSpans;if(f)for(var d=0;d<f.length;d++){var p=f[d];!(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}),ve(this,ee(i,t))},indexFromPos:function(e){e=ve(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 It(xi(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 It(xi(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}],np(n,qu(this)),n},unlinkDoc:function(e){if(e instanceof it&&(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),ip(qu(this));break}}if(e.history==this.history){var n=[e.id];$r(e,function(o){return n.push(o.id)},!0),e.history=new Ro(null),e.history.done=Kn(this.history.done,n),e.history.undone=Kn(this.history.undone,n)}},iterLinkedDocs:function(e){$r(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mi(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:wt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Yh(this.cm))})}),It.prototype.eachLine=It.prototype.iter;var Gu=0;function lp(e){var t=this;if(Yu(t),!(lt(t,e)||Nr(t.display,e))){Pt(e),y&&(Gu=+new Date);var i=gn(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),f=0,d=function(){++f==o&&bt(t,function(){i=ve(t.doc,i);var O={from:i,to:i,text:t.doc.splitLines(a.filter(function(F){return F!=null}).join(t.doc.lineSeparator())),origin:"paste"};qn(t.doc,O),Eu(t.doc,Gr(ve(t.doc,i),ve(t.doc,Yr(O))))})()},p=function(O,F){if(t.options.allowDropFileTypes&&G(t.options.allowDropFileTypes,O.type)==-1){d();return}var $=new FileReader;$.onerror=function(){return d()},$.onload=function(){var ie=$.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ie)){d();return}a[F]=ie,d()},$.readAsText(O)},g=0;g<n.length;g++)p(n[g],g);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()),Ho(t.doc,Gr(i,i)),C)for(var z=0;z<C.length;++z)Gn(t.doc,"",C[z].anchor,C[z].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function sp(e,t){if(y&&(!e.state.draggingText||+new Date-Gu<100)){cn(t);return}if(!(lt(e,t)||Nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!H)){var i=U("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",N&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),N&&i.parentNode.removeChild(i)}}function ap(e,t){var i=gn(e,t);if(!!i){var n=document.createDocumentFragment();jl(e,i,n),e.display.dragCursor||(e.display.dragCursor=U("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),I(e.display.dragCursor,n)}}function Yu(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function $u(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 Xu=!1;function up(){Xu||(fp(),Xu=!0)}function fp(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,$u(cp)},100))}),Ce(window,"blur",function(){return $u(Wn)})}function cp(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Zr={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"},Ki=0;Ki<10;Ki++)Zr[Ki+48]=Zr[Ki+96]=String(Ki);for(var Uo=65;Uo<=90;Uo++)Zr[Uo]=String.fromCharCode(Uo);for(var ji=1;ji<=12;ji++)Zr[ji+111]=Zr[ji+63235]="F"+ji;var Dr={};Dr.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"},Dr.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"},Dr.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"},Dr.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"]},Dr.default=he?Dr.macDefault:Dr.pcDefault;function dp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,f=0;f<t.length-1;f++){var d=t[f];if(/^(cmd|meta|m)$/i.test(d))a=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))n=!0;else if(/^s(hift)?$/i.test(d))o=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function hp(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=B(i.split(" "),dp),a=0;a<o.length;a++){var f=void 0,d=void 0;a==o.length-1?(d=o.join(" "),f=n):(d=o.slice(0,a+1).join(" "),f="...");var p=t[d];if(!p)t[d]=f;else if(p!=f)throw new Error("Inconsistent bindings for "+d)}delete e[i]}for(var g in t)e[g]=t[g];return e}function $n(e,t,i,n){t=Ko(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 $n(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var f=$n(e,t.fallthrough[a],i,n);if(f)return f}}}function Zu(e){var t=typeof e=="string"?e:Zr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Ju(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(tt?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(tt?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Qu(e,t){if(N&&e.keyCode==34&&e.char)return!1;var i=Zr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),Ju(i,e,t))}function Ko(e){return typeof e=="string"?Dr[e]:e}function Xn(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&v(a.from,D(n).to)<=0;){var f=n.pop();if(v(f.from,a.from)<0){a.from=f.from;break}}n.push(a)}jt(e,function(){for(var d=n.length-1;d>=0;d--)Gn(e.doc,"",n[d].from,n[d].to,"+delete");Bn(e)})}function ss(e,t,i){var n=Se(e.text,t+i,i);return n<0||n>e.text.length?null:n}function as(e,t,i){var n=ss(e,t.ch,i);return n==null?null:new ee(t.line,n,i<0?"after":"before")}function us(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=dt(i,t.doc.direction);if(a){var f=o<0?D(a):a[0],d=o<0==(f.level==1),p=d?"after":"before",g;if(f.level>0||t.doc.direction=="rtl"){var k=In(t,i);g=o<0?i.text.length-1:0;var C=Sr(t,k,g).top;g=ze(function(z){return Sr(t,k,z).top==C},o<0==(f.level==1)?f.from:f.to-1,g),p=="before"&&(g=ss(i,g,1))}else g=o<0?f.to:f.from;return new ee(n,g,p)}}return new ee(n,o<0?i.text.length:0,o<0?"before":"after")}function pp(e,t,i,n){var o=dt(t,e.doc.direction);if(!o)return as(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=Ee(o,i.ch,i.sticky),f=o[a];if(e.doc.direction=="ltr"&&f.level%2==0&&(n>0?f.to>i.ch:f.from<i.ch))return as(t,i,n);var d=function(ce,ge){return ss(t,ce instanceof ee?ce.ch:ce,ge)},p,g=function(ce){return e.options.lineWrapping?(p=p||In(e,t),nu(e,t,p,ce)):{begin:0,end:t.text.length}},k=g(i.sticky=="before"?d(i,-1):i.ch);if(e.doc.direction=="rtl"||f.level==1){var C=f.level==1==n<0,z=d(i,C?1:-1);if(z!=null&&(C?z<=f.to&&z<=k.end:z>=f.from&&z>=k.begin)){var O=C?"before":"after";return new ee(i.line,z,O)}}var F=function(ce,ge,de){for(var ye=function(Qe,xt){return xt?new ee(i.line,d(Qe,1),"before"):new ee(i.line,Qe,"after")};ce>=0&&ce<o.length;ce+=ge){var Pe=o[ce],Me=ge>0==(Pe.level!=1),De=Me?de.begin:d(de.end,-1);if(Pe.from<=De&&De<Pe.to||(De=Me?Pe.from:d(Pe.to,-1),de.begin<=De&&De<de.end))return ye(De,Me)}},$=F(a+n,n,k);if($)return $;var ie=n>0?k.end:d(k.begin,-1);return ie!=null&&!(n>0&&ie==t.text.length)&&($=F(n>0?0:o.length-1,n,g(ie)),$)?$:null}var qi={selectAll:Ru,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return Xn(e,function(t){if(t.empty()){var i=we(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ee(t.head.line+1,0)}:{from:t.head,to:ee(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xn(e,function(t){return{from:ee(t.from().line,0),to:ve(e.doc,ee(t.to().line+1,0))}})},delLineLeft:function(e){return Xn(e,function(t){return{from:ee(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Xn(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 Xn(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(ee(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ee(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vu(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ef(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")},fe)},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")},fe)},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/)?ef(e,t.head):n},fe)},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(),f=Ve(e.getLine(a.line),a.ch,n);t.push(E(n-f%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return jt(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)if(!!t[n].empty()){var o=t[n].head,a=we(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new ee(o.line,o.ch-1)),o.ch>0)o=new ee(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),ee(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var f=we(e.doc,o.line-1).text;f&&(o=new ee(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ee(o.line-1,f.length-1),o,"+transpose"))}}i.push(new qe(o,o))}e.setSelections(i)})},newlineAndIndent:function(e){return jt(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);Bn(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vu(e,t){var i=we(e.doc,t),n=ur(i);return n!=i&&(t=je(n)),us(!0,e,n,t,1)}function gp(e,t){var i=we(e.doc,t),n=Qd(i);return n!=i&&(t=je(n)),us(!0,e,i,t,-1)}function ef(e,t){var i=Vu(e,t.line),n=we(e.doc,i.line),o=dt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),f=t.line==i.line&&t.ch<=a&&t.ch;return ee(i.line,f?0:a,i.sticky)}return i}function jo(e,t,i){if(typeof t=="string"&&(t=qi[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)!=oe}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function vp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=$n(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&$n(t,e.options.extraKeys,i,e)||$n(t,e.options.keyMap,i,e)}var mp=new W;function Gi(e,t,i,n){var o=e.state.keySeq;if(o){if(Zu(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:mp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),tf(e,o+" "+t,i,n))return!0}return tf(e,t,i,n)}function tf(e,t,i,n){var o=vp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&yt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(Pt(i),ql(e)),!!o}function rf(e,t){var i=Qu(t,!0);return i?t.shiftKey&&!e.state.keySeq?Gi(e,"Shift-"+i,t,function(n){return jo(e,n,!0)})||Gi(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return jo(e,n)}):Gi(e,i,t,function(n){return jo(e,n)}):!1}function yp(e,t,i){return Gi(e,"'"+i+"'",t,function(n){return jo(e,n,!0)})}var fs=null;function nf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=se(),!lt(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=rf(t,e);N&&(fs=n?i:null,!n&&i==88&&!yo&&(he?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),c&&!he&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&bp(t)}}function bp(e){var t=e.display.lineDiv;_e(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(me(t,"CodeMirror-crosshair"),Ze(document,"keyup",i),Ze(document,"mouseover",i))}Ce(document,"keyup",i),Ce(document,"mouseover",i)}function of(e){e.keyCode==16&&(this.doc.sel.shift=!1),lt(this,e)}function lf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Nr(t.display,e)||lt(t,e)||e.ctrlKey&&!e.altKey||he&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(N&&i==fs){fs=null,Pt(e);return}if(!(N&&(!e.which||e.which<10)&&rf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(yp(t,e,o)||t.display.input.onKeyPress(e))}}}var wp=400,cs=function(e,t,i){this.time=e,this.pos=t,this.button=i};cs.prototype.compare=function(e,t,i){return this.time+wp>e&&v(t,this.pos)==0&&i==this.button};var Yi,$i;function xp(e,t){var i=+new Date;return $i&&$i.compare(i,e,t)?(Yi=$i=null,"triple"):Yi&&Yi.compare(i,e,t)?($i=new cs(i,e,t),Yi=null,"double"):(Yi=new cs(i,e,t),$i=null,"single")}function sf(e){var t=this,i=t.display;if(!(lt(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Nr(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!ds(t,e)){var n=gn(t,e),o=go(e),a=n?xp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&kp(t,o,n,a,e))&&(o==1?n?Cp(t,n,a,e):Br(e)==i.scroller&&Pt(e):o==2?(n&&Fo(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(Be?t.display.input.onContextMenu(e):Gl(t)))}}}function kp(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,Gi(e,Ju(a,o),o,function(f){if(typeof f=="string"&&(f=qi[f]),!f)return!1;var d=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d=f(e,i)!=oe}finally{e.state.suppressEdits=!1}return d})}function Sp(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=Ae?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=he?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(he?i.altKey:i.ctrlKey)),o}function Cp(e,t,i,n){y?setTimeout(ct(su,e),0):e.curOp.focus=se();var o=Sp(e,i,n),a=e.doc.sel,f;e.options.dragDrop&&gi&&!e.isReadOnly()&&i=="single"&&(f=a.contains(t))>-1&&(v((f=a.ranges[f]).from(),t)<0||t.xRel>0)&&(v(f.to(),t)>0||t.xRel<0)?Tp(e,n,t,o):Lp(e,n,t,o)}function Tp(e,t,i,n){var o=e.display,a=!1,f=bt(e,function(g){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Gl(e)),Ze(o.wrapper.ownerDocument,"mouseup",f),Ze(o.wrapper.ownerDocument,"mousemove",d),Ze(o.scroller,"dragstart",p),Ze(o.scroller,"drop",f),a||(Pt(g),n.addNew||Fo(e.doc,i,null,null,n.extend),S&&!H||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),d=function(g){a=a||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=f,f.copy=!n.moveOnDrag,Ce(o.wrapper.ownerDocument,"mouseup",f),Ce(o.wrapper.ownerDocument,"mousemove",d),Ce(o.scroller,"dragstart",p),Ce(o.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function af(e,t,i){if(i=="char")return new qe(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new qe(ee(t.line,0),ve(e.doc,ee(t.line+1,0)));var n=i(e,t);return new qe(n.from,n.to)}function Lp(e,t,i,n){y&&Gl(e);var o=e.display,a=e.doc;Pt(t);var f,d,p=a.sel,g=p.ranges;if(n.addNew&&!n.extend?(d=a.sel.contains(i),d>-1?f=g[d]:f=new qe(i,i)):(f=a.sel.primary(),d=a.sel.primIndex),n.unit=="rectangle")n.addNew||(f=new qe(i,i)),i=gn(e,t,!0,!0),d=-1;else{var k=af(e,i,n.unit);n.extend?f=os(f,k.anchor,k.head,n.extend):f=k}n.addNew?d==-1?(d=g.length,Ot(a,cr(e,g.concat([f]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&n.unit=="char"&&!n.extend?(Ot(a,cr(e,g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):ls(a,d,f,be):(d=0,Ot(a,new er([f],0),be),p=a.sel);var C=i;function z(de){if(v(C,de)!=0)if(C=de,n.unit=="rectangle"){for(var ye=[],Pe=e.options.tabSize,Me=Ve(we(a,i.line).text,i.ch,Pe),De=Ve(we(a,de.line).text,de.ch,Pe),Qe=Math.min(Me,De),xt=Math.max(Me,De),st=Math.min(i.line,de.line),qt=Math.min(e.lastLine(),Math.max(i.line,de.line));st<=qt;st++){var Ft=we(a,st).text,ht=Le(Ft,Qe,Pe);Qe==xt?ye.push(new qe(ee(st,ht),ee(st,ht))):Ft.length>ht&&ye.push(new qe(ee(st,ht),ee(st,Le(Ft,xt,Pe))))}ye.length||ye.push(new qe(i,i)),Ot(a,cr(e,p.ranges.slice(0,d).concat(ye),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(de)}else{var Ht=f,Tt=af(e,de,n.unit),vt=Ht.anchor,pt;v(Tt.anchor,vt)>0?(pt=Tt.head,vt=Oe(Ht.from(),Tt.anchor)):(pt=Tt.anchor,vt=re(Ht.to(),Tt.head));var ut=p.ranges.slice(0);ut[d]=Mp(e,new qe(ve(a,vt),pt)),Ot(a,cr(e,ut,d),be)}}var O=o.wrapper.getBoundingClientRect(),F=0;function $(de){var ye=++F,Pe=gn(e,de,!0,n.unit=="rectangle");if(!!Pe)if(v(Pe,C)!=0){e.curOp.focus=se(),z(Pe);var Me=Ao(o,a);(Pe.line>=Me.to||Pe.line<Me.from)&&setTimeout(bt(e,function(){F==ye&&$(de)}),150)}else{var De=de.clientY<O.top?-20:de.clientY>O.bottom?20:0;De&&setTimeout(bt(e,function(){F==ye&&(o.scroller.scrollTop+=De,$(de))}),50)}}function ie(de){e.state.selectingText=!1,F=1/0,de&&(Pt(de),o.input.focus()),Ze(o.wrapper.ownerDocument,"mousemove",ce),Ze(o.wrapper.ownerDocument,"mouseup",ge),a.history.lastSelOrigin=null}var ce=bt(e,function(de){de.buttons===0||!go(de)?ie(de):$(de)}),ge=bt(e,ie);e.state.selectingText=ge,Ce(o.wrapper.ownerDocument,"mousemove",ce),Ce(o.wrapper.ownerDocument,"mouseup",ge)}function Mp(e,t){var i=t.anchor,n=t.head,o=we(e.doc,i.line);if(v(i,n)==0&&i.sticky==n.sticky)return t;var a=dt(o);if(!a)return t;var f=Ee(a,i.ch,i.sticky),d=a[f];if(d.from!=i.ch&&d.to!=i.ch)return t;var p=f+(d.from==i.ch==(d.level!=1)?0:1);if(p==0||p==a.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=Ee(a,n.ch,n.sticky),C=k-f||(n.ch-i.ch)*(d.level==1?-1:1);k==p-1||k==p?g=C<0:g=C>0}var z=a[p+(g?-1:0)],O=g==(z.level==1),F=O?z.from:z.to,$=O?"after":"before";return i.ch==F&&i.sticky==$?t:new qe(new ee(i.line,F,$),n)}function uf(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&&Pt(t);var f=e.display,d=f.lineDiv.getBoundingClientRect();if(a>d.bottom||!Ct(e,i))return Zt(t);a-=d.top-f.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var g=f.gutters.childNodes[p];if(g&&g.getBoundingClientRect().right>=o){var k=wr(e.doc,a),C=e.display.gutterSpecs[p];return Te(e,i,e,k,C.className,t),Zt(t)}}}function ds(e,t){return uf(e,t,"gutterClick",!0)}function ff(e,t){Nr(e.display,t)||Pp(e,t)||lt(e,t,"contextmenu")||Be||e.display.input.onContextMenu(t)}function Pp(e,t){return Ct(e,"gutterContextMenu")?uf(e,t,"gutterContextMenu",!1):!1}function cf(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pi(e)}var Zn={toString:function(){return"CodeMirror.Init"}},df={},qo={};function _p(e){var t=e.optionHandlers;function i(n,o,a,f){e.defaults[n]=o,a&&(t[n]=f?function(d,p,g){g!=Zn&&a(d,p,g)}:a)}e.defineOption=i,e.Init=Zn,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,rs(n)},!0),i("indentUnit",2,rs,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Ri(n),Pi(n),Rt(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],f=n.doc.first;n.doc.iter(function(p){for(var g=0;;){var k=p.text.indexOf(o,g);if(k==-1)break;g=k+o.length,a.push(ee(f,k))}f++});for(var d=a.length-1;d>=0;d--)Gn(n.doc,o,a[d],ee(a[d].line,a[d].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!=Zn&&n.refresh()}),i("specialCharPlaceholder",ih,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",ne?"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",!Fe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){cf(n),Di(n)},!0),i("keyMap","default",function(n,o,a){var f=Ko(o),d=a!=Zn&&Ko(a);d&&d.detach&&d.detach(n,f),f.attach&&f.attach(n,d||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ep,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=es(o,n.options.lineNumbers),Di(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 Un(n)},!0),i("scrollbarStyle","native",function(n){hu(n),Un(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=es(n.options.gutters,o),Di(n)},!0),i("firstLineNumber",1,Di,!0),i("lineNumberFormatter",function(n){return n},Di,!0),i("showCursorWhenSelecting",!1,_i,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Wn(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,Op),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,_i,!0),i("singleCursorHeightPerLine",!0,_i,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Ri,!0),i("addModeClass",!1,Ri,!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,Ri,!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 Op(e,t,i){var n=i&&i!=Zn;if(!t!=!n){var o=e.display.dragFunctions,a=t?Ce:Ze;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 Ep(e){e.options.lineWrapping?(_e(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(me(e.display.wrapper,"CodeMirror-wrap"),Al(e)),Kl(e),Rt(e),Pi(e),setTimeout(function(){return Un(e)},100)}function it(e,t){var i=this;if(!(this instanceof it))return new it(e,t);this.options=t=t?Ne(t):{},Ne(df,t,!1);var n=t.value;typeof n=="string"?n=new It(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new it.inputStyles[t.inputStyle](this),a=this.display=new jh(e,n,o,t);a.wrapper.CodeMirror=this,cf(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),hu(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 W,keySeq:null,specialChars:null},t.autofocus&&!ne&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ap(this),up(),bn(this),this.curOp.forceUpdate=!0,Su(this,n),t.autofocus&&!ne||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Yl(i)},20):Wn(this);for(var f in qo)qo.hasOwnProperty(f)&&qo[f](this,t[f],Zn);vu(this),t.finishInit&&t.finishInit(this);for(var d=0;d<hs.length;++d)hs[d](this);wn(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}it.defaults=df,it.optionHandlers=qo;function Ap(e){var t=e.display;Ce(t.scroller,"mousedown",bt(e,sf)),y&&x<11?Ce(t.scroller,"dblclick",bt(e,function(p){if(!lt(e,p)){var g=gn(e,p);if(!(!g||ds(e,p)||Nr(e.display,p))){Pt(p);var k=e.findWordAt(g);Fo(e.doc,k.anchor,k.head)}}})):Ce(t.scroller,"dblclick",function(p){return lt(e,p)||Pt(p)}),Ce(t.scroller,"contextmenu",function(p){return ff(e,p)}),Ce(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||ff(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 g=p.touches[0];return g.radiusX<=1&&g.radiusY<=1}function f(p,g){if(g.left==null)return!0;var k=g.left-p.left,C=g.top-p.top;return k*k+C*C>20*20}Ce(t.scroller,"touchstart",function(p){if(!lt(e,p)&&!a(p)&&!ds(e,p)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(p){var g=t.activeTouch;if(g&&!Nr(t,p)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!g.prev||f(g,g.prev)?C=new qe(k,k):!g.prev.prev||f(g,g.prev.prev)?C=e.findWordAt(k):C=new qe(ee(k.line,0),ve(e.doc,ee(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),Pt(p)}o()}),Ce(t.scroller,"touchcancel",o),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ei(e,t.scroller.scrollTop),mn(e,t.scroller.scrollLeft,!0),Te(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(p){return bu(e,p)}),Ce(t.scroller,"DOMMouseScroll",function(p){return bu(e,p)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){lt(e,p)||cn(p)},over:function(p){lt(e,p)||(ap(e,p),cn(p))},start:function(p){return sp(e,p)},drop:bt(e,lp),leave:function(p){lt(e,p)||Yu(e)}};var d=t.input.getField();Ce(d,"keyup",function(p){return of.call(e,p)}),Ce(d,"keydown",bt(e,nf)),Ce(d,"keypress",bt(e,lf)),Ce(d,"focus",function(p){return Yl(e,p)}),Ce(d,"blur",function(p){return Wn(e,p)})}var hs=[];it.defineInitHook=function(e){return hs.push(e)};function Xi(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=Si(e,t).state:i="prev");var f=e.options.tabSize,d=we(o,t),p=Ve(d.text,null,f);d.stateAfter&&(d.stateAfter=null);var g=d.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(d.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,d.text.slice(g.length),d.text),k==oe||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=Ve(we(o,t-1).text,null,f):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="",z=0;if(e.options.indentWithTabs)for(var O=Math.floor(k/f);O;--O)z+=f,C+=" ";if(z<k&&(C+=E(k-z)),C!=g)return Gn(o,C,ee(t,0),ee(t,g.length),"+input"),d.stateAfter=null,!0;for(var F=0;F<o.sel.ranges.length;F++){var $=o.sel.ranges[F];if($.head.line==t&&$.head.ch<g.length){var ie=ee(t,g.length);ls(o,F,new qe(ie,ie));break}}}var dr=null;function Go(e){dr=e}function ps(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var f=+new Date-200,d=o=="paste"||e.state.pasteIncoming>f,p=mi(t),g=null;if(d&&n.ranges.length>1)if(dr&&dr.text.join(`
13
13
  `)==t){if(n.ranges.length%dr.text.length==0){g=[];for(var k=0;k<dr.text.length;k++)g.push(a.splitLines(dr.text[k]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(g=B(p,function(ce){return[ce]}));for(var C=e.curOp.updateInput,z=n.ranges.length-1;z>=0;z--){var O=n.ranges[z],F=O.from(),$=O.to();O.empty()&&(i&&i>0?F=ee(F.line,F.ch-i):e.state.overwrite&&!d?$=ee($.line,Math.min(we(a,$.line).text.length,$.ch+D(p).length)):d&&dr&&dr.lineWise&&dr.text.join(`
14
14
  `)==p.join(`
15
- `)&&(F=$=ee(F.line,0)));var ie={from:F,to:$,text:g?g[z%g.length]:p,origin:o||(d?"paste":e.state.cutIncoming>f?"cut":"+input")};qn(e.doc,ie),yt(e,"inputRead",e,ie)}t&&!d&&pf(e,t),Bn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function hf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&qt(t,function(){return ps(t,i,0,null,"paste")}),!0}function pf(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),f=!1;if(a.electricChars){for(var d=0;d<a.electricChars.length;d++)if(t.indexOf(a.electricChars.charAt(d))>-1){f=Xi(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(we(e.doc,o.head.line).text.slice(0,o.head.ch))&&(f=Xi(e,o.head.line,"smart"));f&&yt(e,"electricInput",e,o.head.line)}}}function gf(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:ee(o,0),head:ee(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function vf(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function mf(){var e=U("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=U("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),te&&(e.style.border="1px solid black"),vf(e),t}function Np(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,f=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&bt(this,t[n])(this,o,f),Te(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"](Uo(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:At(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");Y(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(f){return f.priority}),this.state.modeGen++,Rt(this)}),removeOverlay:At(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var f=o[a].modeSpec;if(f==n||typeof n=="string"&&f.name==n){o.splice(a,1),this.state.modeGen++,Rt(this);return}}}),indentLine:At(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),dn(this.doc,n)&&Xi(this,n,o,a)}),indentSelection:At(function(n){for(var o=this.doc.sel.ranges,a=-1,f=0;f<o.length;f++){var d=o[f];if(d.empty())d.head.line>a&&(Xi(this,d.head.line,n,!0),a=d.head.line,f==this.doc.sel.primIndex&&Bn(this));else{var p=d.from(),g=d.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var C=k;C<a;++C)Xi(this,C,n);var z=this.doc.sel.ranges;p.ch==0&&o.length==z.length&&z[f].from().ch>0&&ls(this.doc,f,new qe(p,z[f].to()),ke)}}}),getTokenAt:function(n,o){return Ta(this,n,o)},getLineTokens:function(n,o){return Ta(this,ee(n),o,!0)},getTokenTypeAt:function(n){n=ve(this.doc,n);var o=ka(this,we(this.doc,n.line)),a=0,f=(o.length-1)/2,d=n.ch,p;if(d==0)p=o[2];else for(;;){var g=a+f>>1;if((g?o[g*2-1]:0)>=d)f=g;else if(o[g*2+1]<d)a=g+1;else{p=o[g*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 f=i[o],d=this.getModeAt(n);if(typeof d[o]=="string")f[d[o]]&&a.push(f[d[o]]);else if(d[o])for(var p=0;p<d[o].length;p++){var g=f[d[o][p]];g&&a.push(g)}else d.helperType&&f[d.helperType]?a.push(f[d.helperType]):f[d.name]&&a.push(f[d.name]);for(var k=0;k<f._global.length;k++){var C=f._global[k];C.pred(d,this)&&G(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=Ue(a,n==null?a.first+a.size-1:n),Si(this,n+1,o).state},cursorCoords:function(n,o){var a,f=this.doc.sel.primary();return n==null?a=f.head:typeof n=="object"?a=ve(this.doc,n):a=n?f.from():f.to(),fr(this,a,o||"page")},charCoords:function(n,o){return Mo(this,ve(this.doc,n),o||"page")},coordsChar:function(n,o){return n=eu(this,n,o||"page"),Hl(this,n.left,n.top)},lineAtHeight:function(n,o){return n=eu(this,{top:n,left:0},o||"page").top,wr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var f=!1,d;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,f=!0),d=we(this.doc,n)}else d=n;return Lo(this,d,{top:0,left:0},o||"page",a||f).top+(f?this.doc.height-Ar(d):0)},defaultTextHeight:function(){return Fn(this.display)},defaultCharWidth:function(){return Hn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,f,d){var p=this.display;n=fr(this,ve(this.doc,n));var g=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),f=="over")g=n.top;else if(f=="above"||f=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),z=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(f=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?g=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(g=n.bottom),k+o.offsetWidth>z&&(k=z-o.offsetWidth)}o.style.top=g+"px",o.style.left=o.style.right="",d=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(d=="left"?k=0:d=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&Oh(this,{left:k,top:g,right:k+o.offsetWidth,bottom:g+o.offsetHeight})},triggerOnKeyDown:At(nf),triggerOnKeyPress:At(lf),triggerOnKeyUp:of,triggerOnMouseDown:At(sf),execCommand:function(n){if(qi.hasOwnProperty(n))return qi[n].call(null,this)},triggerElectric:At(function(n){pf(this,n)}),findPosH:function(n,o,a,f){var d=1;o<0&&(d=-1,o=-o);for(var p=ve(this.doc,n),g=0;g<o&&(p=gs(this.doc,p,d,a,f),!p.hitSide);++g);return p},moveH:At(function(n,o){var a=this;this.extendSelectionsBy(function(f){return a.display.shift||a.doc.extend||f.empty()?gs(a.doc,f.head,n,o,a.options.rtlMoveVisually):n<0?f.from():f.to()},fe)}),deleteH:At(function(n,o){var a=this.doc.sel,f=this.doc;a.somethingSelected()?f.replaceSelection("",null,"+delete"):Xn(this,function(d){var p=gs(f,d.head,n,o,!1);return n<0?{from:p,to:d.head}:{from:d.head,to:p}})}),findPosV:function(n,o,a,f){var d=1,p=f;o<0&&(d=-1,o=-o);for(var g=ve(this.doc,n),k=0;k<o;++k){var C=fr(this,g,"div");if(p==null?p=C.left:C.left=p,g=yf(this,C,d,a),g.hitSide)break}return g},moveV:At(function(n,o){var a=this,f=this.doc,d=[],p=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=fr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),d.push(C.left);var z=yf(a,C,n,o);return o=="page"&&k==f.sel.primary()&&Xl(a,Mo(a,z,"div").top-C.top),z},fe),d.length)for(var g=0;g<f.sel.ranges.length;g++)f.sel.ranges[g].goalColumn=d[g]}),findWordAt:function(n){var o=this.doc,a=we(o,n.line).text,f=n.ch,d=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||d==a.length)&&f?--f:++d;for(var g=a.charAt(f),k=T(g,p)?function(C){return T(C,p)}:/\s/.test(g)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!T(C)};f>0&&k(a.charAt(f-1));)--f;for(;d<a.length&&k(a.charAt(d));)++d}return new qe(ee(n.line,f),ee(n.line,d))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?_e(this.display.cursorDiv,"CodeMirror-overwrite"):me(this.display.cursorDiv,"CodeMirror-overwrite"),Te(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:At(function(n,o){Oi(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-kr(this)-this.display.barHeight,width:n.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Dl(this),clientWidth:hn(this)}},scrollIntoView:At(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:ee(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?Eh(this,n):uu(this,n.from,n.to,n.margin)}),setSize:At(function(n,o){var a=this,f=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=f(n)),o!=null&&(this.display.wrapper.style.height=f(o)),this.options.lineWrapping&&Ja(this);var d=this.display.viewFrom;this.doc.iter(d,this.display.viewTo,function(p){if(p.widgets){for(var g=0;g<p.widgets.length;g++)if(p.widgets[g].noHScroll){jr(a,d,"widget");break}}++d}),this.curOp.forceUpdate=!0,Te(this,"refresh",this)}),operation:function(n){return qt(this,n)},startOperation:function(){return bn(this)},endOperation:function(){return wn(this)},refresh:At(function(){var n=this.display.cachedTextHeight;Rt(this),this.curOp.forceUpdate=!0,Pi(this),Oi(this,this.doc.scrollLeft,this.doc.scrollTop),Ql(this.display),(n==null||Math.abs(n-Fn(this.display))>.5||this.options.lineWrapping)&&Kl(this),Te(this,"refresh",this)}),swapDoc:At(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Su(this,n),Pi(this),this.display.input.reset(),Oi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,yt(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}},mr(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,f){e.registerHelper(n,o,f),i[n]._global.push({pred:a,val:f})}}function gs(e,t,i,n,o){var a=t,f=i,d=we(e,t.line),p=o&&e.direction=="rtl"?-i:i;function g(){var ge=t.line+p;return ge<e.first||ge>=e.first+e.size?!1:(t=new ee(ge,t.ch,t.sticky),d=we(e,ge))}function k(ge){var de;if(n=="codepoint"){var ye=d.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ye))de=null;else{var Pe=i>0?ye>=55296&&ye<56320:ye>=56320&&ye<57343;de=new ee(t.line,Math.max(0,Math.min(d.text.length,t.ch+i*(Pe?2:1))),-i)}}else o?de=pp(e.cm,d,t,i):de=as(d,t,i);if(de==null)if(!ge&&g())t=us(o,e.cm,d,t.line,p);else return!1;else t=de;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,z=n=="group",O=e.cm&&e.cm.getHelper(t,"wordChars"),F=!0;!(i<0&&!k(!F));F=!1){var $=d.text.charAt(t.ch)||`
15
+ `)&&(F=$=ee(F.line,0)));var ie={from:F,to:$,text:g?g[z%g.length]:p,origin:o||(d?"paste":e.state.cutIncoming>f?"cut":"+input")};qn(e.doc,ie),yt(e,"inputRead",e,ie)}t&&!d&&pf(e,t),Bn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function hf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&jt(t,function(){return ps(t,i,0,null,"paste")}),!0}function pf(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),f=!1;if(a.electricChars){for(var d=0;d<a.electricChars.length;d++)if(t.indexOf(a.electricChars.charAt(d))>-1){f=Xi(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(we(e.doc,o.head.line).text.slice(0,o.head.ch))&&(f=Xi(e,o.head.line,"smart"));f&&yt(e,"electricInput",e,o.head.line)}}}function gf(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:ee(o,0),head:ee(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function vf(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function mf(){var e=U("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=U("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),te&&(e.style.border="1px solid black"),vf(e),t}function Np(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,f=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&bt(this,t[n])(this,o,f),Te(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"](Ko(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:At(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");Y(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(f){return f.priority}),this.state.modeGen++,Rt(this)}),removeOverlay:At(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var f=o[a].modeSpec;if(f==n||typeof n=="string"&&f.name==n){o.splice(a,1),this.state.modeGen++,Rt(this);return}}}),indentLine:At(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),dn(this.doc,n)&&Xi(this,n,o,a)}),indentSelection:At(function(n){for(var o=this.doc.sel.ranges,a=-1,f=0;f<o.length;f++){var d=o[f];if(d.empty())d.head.line>a&&(Xi(this,d.head.line,n,!0),a=d.head.line,f==this.doc.sel.primIndex&&Bn(this));else{var p=d.from(),g=d.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var C=k;C<a;++C)Xi(this,C,n);var z=this.doc.sel.ranges;p.ch==0&&o.length==z.length&&z[f].from().ch>0&&ls(this.doc,f,new qe(p,z[f].to()),ke)}}}),getTokenAt:function(n,o){return Ta(this,n,o)},getLineTokens:function(n,o){return Ta(this,ee(n),o,!0)},getTokenTypeAt:function(n){n=ve(this.doc,n);var o=ka(this,we(this.doc,n.line)),a=0,f=(o.length-1)/2,d=n.ch,p;if(d==0)p=o[2];else for(;;){var g=a+f>>1;if((g?o[g*2-1]:0)>=d)f=g;else if(o[g*2+1]<d)a=g+1;else{p=o[g*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 f=i[o],d=this.getModeAt(n);if(typeof d[o]=="string")f[d[o]]&&a.push(f[d[o]]);else if(d[o])for(var p=0;p<d[o].length;p++){var g=f[d[o][p]];g&&a.push(g)}else d.helperType&&f[d.helperType]?a.push(f[d.helperType]):f[d.name]&&a.push(f[d.name]);for(var k=0;k<f._global.length;k++){var C=f._global[k];C.pred(d,this)&&G(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=Ue(a,n==null?a.first+a.size-1:n),Si(this,n+1,o).state},cursorCoords:function(n,o){var a,f=this.doc.sel.primary();return n==null?a=f.head:typeof n=="object"?a=ve(this.doc,n):a=n?f.from():f.to(),fr(this,a,o||"page")},charCoords:function(n,o){return Po(this,ve(this.doc,n),o||"page")},coordsChar:function(n,o){return n=eu(this,n,o||"page"),Hl(this,n.left,n.top)},lineAtHeight:function(n,o){return n=eu(this,{top:n,left:0},o||"page").top,wr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var f=!1,d;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,f=!0),d=we(this.doc,n)}else d=n;return Mo(this,d,{top:0,left:0},o||"page",a||f).top+(f?this.doc.height-Ar(d):0)},defaultTextHeight:function(){return Fn(this.display)},defaultCharWidth:function(){return Hn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,f,d){var p=this.display;n=fr(this,ve(this.doc,n));var g=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),f=="over")g=n.top;else if(f=="above"||f=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),z=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(f=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?g=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(g=n.bottom),k+o.offsetWidth>z&&(k=z-o.offsetWidth)}o.style.top=g+"px",o.style.left=o.style.right="",d=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(d=="left"?k=0:d=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&Oh(this,{left:k,top:g,right:k+o.offsetWidth,bottom:g+o.offsetHeight})},triggerOnKeyDown:At(nf),triggerOnKeyPress:At(lf),triggerOnKeyUp:of,triggerOnMouseDown:At(sf),execCommand:function(n){if(qi.hasOwnProperty(n))return qi[n].call(null,this)},triggerElectric:At(function(n){pf(this,n)}),findPosH:function(n,o,a,f){var d=1;o<0&&(d=-1,o=-o);for(var p=ve(this.doc,n),g=0;g<o&&(p=gs(this.doc,p,d,a,f),!p.hitSide);++g);return p},moveH:At(function(n,o){var a=this;this.extendSelectionsBy(function(f){return a.display.shift||a.doc.extend||f.empty()?gs(a.doc,f.head,n,o,a.options.rtlMoveVisually):n<0?f.from():f.to()},fe)}),deleteH:At(function(n,o){var a=this.doc.sel,f=this.doc;a.somethingSelected()?f.replaceSelection("",null,"+delete"):Xn(this,function(d){var p=gs(f,d.head,n,o,!1);return n<0?{from:p,to:d.head}:{from:d.head,to:p}})}),findPosV:function(n,o,a,f){var d=1,p=f;o<0&&(d=-1,o=-o);for(var g=ve(this.doc,n),k=0;k<o;++k){var C=fr(this,g,"div");if(p==null?p=C.left:C.left=p,g=yf(this,C,d,a),g.hitSide)break}return g},moveV:At(function(n,o){var a=this,f=this.doc,d=[],p=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=fr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),d.push(C.left);var z=yf(a,C,n,o);return o=="page"&&k==f.sel.primary()&&Xl(a,Po(a,z,"div").top-C.top),z},fe),d.length)for(var g=0;g<f.sel.ranges.length;g++)f.sel.ranges[g].goalColumn=d[g]}),findWordAt:function(n){var o=this.doc,a=we(o,n.line).text,f=n.ch,d=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||d==a.length)&&f?--f:++d;for(var g=a.charAt(f),k=T(g,p)?function(C){return T(C,p)}:/\s/.test(g)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!T(C)};f>0&&k(a.charAt(f-1));)--f;for(;d<a.length&&k(a.charAt(d));)++d}return new qe(ee(n.line,f),ee(n.line,d))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?_e(this.display.cursorDiv,"CodeMirror-overwrite"):me(this.display.cursorDiv,"CodeMirror-overwrite"),Te(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:At(function(n,o){Oi(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-kr(this)-this.display.barHeight,width:n.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Dl(this),clientWidth:hn(this)}},scrollIntoView:At(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:ee(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?Eh(this,n):uu(this,n.from,n.to,n.margin)}),setSize:At(function(n,o){var a=this,f=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=f(n)),o!=null&&(this.display.wrapper.style.height=f(o)),this.options.lineWrapping&&Ja(this);var d=this.display.viewFrom;this.doc.iter(d,this.display.viewTo,function(p){if(p.widgets){for(var g=0;g<p.widgets.length;g++)if(p.widgets[g].noHScroll){jr(a,d,"widget");break}}++d}),this.curOp.forceUpdate=!0,Te(this,"refresh",this)}),operation:function(n){return jt(this,n)},startOperation:function(){return bn(this)},endOperation:function(){return wn(this)},refresh:At(function(){var n=this.display.cachedTextHeight;Rt(this),this.curOp.forceUpdate=!0,Pi(this),Oi(this,this.doc.scrollLeft,this.doc.scrollTop),Ql(this.display),(n==null||Math.abs(n-Fn(this.display))>.5||this.options.lineWrapping)&&Kl(this),Te(this,"refresh",this)}),swapDoc:At(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Su(this,n),Pi(this),this.display.input.reset(),Oi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,yt(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}},mr(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,f){e.registerHelper(n,o,f),i[n]._global.push({pred:a,val:f})}}function gs(e,t,i,n,o){var a=t,f=i,d=we(e,t.line),p=o&&e.direction=="rtl"?-i:i;function g(){var ge=t.line+p;return ge<e.first||ge>=e.first+e.size?!1:(t=new ee(ge,t.ch,t.sticky),d=we(e,ge))}function k(ge){var de;if(n=="codepoint"){var ye=d.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ye))de=null;else{var Pe=i>0?ye>=55296&&ye<56320:ye>=56320&&ye<57343;de=new ee(t.line,Math.max(0,Math.min(d.text.length,t.ch+i*(Pe?2:1))),-i)}}else o?de=pp(e.cm,d,t,i):de=as(d,t,i);if(de==null)if(!ge&&g())t=us(o,e.cm,d,t.line,p);else return!1;else t=de;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,z=n=="group",O=e.cm&&e.cm.getHelper(t,"wordChars"),F=!0;!(i<0&&!k(!F));F=!1){var $=d.text.charAt(t.ch)||`
16
16
  `,ie=T($,O)?"w":z&&$==`
17
- `?"n":!z||/\s/.test($)?null:"p";if(z&&!F&&!ie&&(ie="s"),C&&C!=ie){i<0&&(i=1,k(),t.sticky="after");break}if(ie&&(C=ie),i>0&&!k(!F))break}var ce=Ho(e,t,a,f,!0);return L(a,ce)&&(ce.hitSide=!0),ce}function yf(e,t,i,n){var o=e.doc,a=t.left,f;if(n=="page"){var d=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(d-.5*Fn(e.display),3);f=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(f=i>0?t.bottom+3:t.top-3);for(var g;g=Hl(e,a,f),!!g.outside;){if(i<0?f<=0:f>=o.height){g.hitSide=!0;break}f+=i*5}return g}var $e=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$e.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,vf(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(d){for(var p=d.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Ce(o,"paste",function(d){!a(d)||lt(n,d)||hf(d,n)||x<=11&&setTimeout(bt(n,function(){return t.updateFromDOM()}),20)}),Ce(o,"compositionstart",function(d){t.composing={data:d.data,done:!1}}),Ce(o,"compositionupdate",function(d){t.composing||(t.composing={data:d.data,done:!1})}),Ce(o,"compositionend",function(d){t.composing&&(d.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(o,"touchstart",function(){return i.forceCompositionEnd()}),Ce(o,"input",function(){t.composing||t.readFromDOMSoon()});function f(d){if(!(!a(d)||lt(n,d))){if(n.somethingSelected())qo({lineWise:!1,text:n.getSelections()}),d.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=gf(n);qo({lineWise:!0,text:p.text}),d.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,ke),n.replaceSelection("",null,"cut")})}else return;if(d.clipboardData){d.clipboardData.clearData();var g=dr.text.join(`
17
+ `?"n":!z||/\s/.test($)?null:"p";if(z&&!F&&!ie&&(ie="s"),C&&C!=ie){i<0&&(i=1,k(),t.sticky="after");break}if(ie&&(C=ie),i>0&&!k(!F))break}var ce=Wo(e,t,a,f,!0);return L(a,ce)&&(ce.hitSide=!0),ce}function yf(e,t,i,n){var o=e.doc,a=t.left,f;if(n=="page"){var d=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(d-.5*Fn(e.display),3);f=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(f=i>0?t.bottom+3:t.top-3);for(var g;g=Hl(e,a,f),!!g.outside;){if(i<0?f<=0:f>=o.height){g.hitSide=!0;break}f+=i*5}return g}var $e=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$e.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,vf(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(d){for(var p=d.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Ce(o,"paste",function(d){!a(d)||lt(n,d)||hf(d,n)||x<=11&&setTimeout(bt(n,function(){return t.updateFromDOM()}),20)}),Ce(o,"compositionstart",function(d){t.composing={data:d.data,done:!1}}),Ce(o,"compositionupdate",function(d){t.composing||(t.composing={data:d.data,done:!1})}),Ce(o,"compositionend",function(d){t.composing&&(d.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(o,"touchstart",function(){return i.forceCompositionEnd()}),Ce(o,"input",function(){t.composing||t.readFromDOMSoon()});function f(d){if(!(!a(d)||lt(n,d))){if(n.somethingSelected())Go({lineWise:!1,text:n.getSelections()}),d.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=gf(n);Go({lineWise:!0,text:p.text}),d.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,ke),n.replaceSelection("",null,"cut")})}else return;if(d.clipboardData){d.clipboardData.clearData();var g=dr.text.join(`
18
18
  `);if(d.clipboardData.setData("Text",g),d.clipboardData.getData("Text")==g){d.preventDefault();return}}var k=mf(),C=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),C.value=dr.text.join(`
19
- `);var z=se();nt(C),setTimeout(function(){n.display.lineSpace.removeChild(k),z.focus(),z==o&&i.showPrimarySelection()},50)}}Ce(o,"copy",f),Ce(o,"cut",f)},$e.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=lu(this.cm,!1);return e.focus=se()==this.div,e},$e.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$e.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$e.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=Go(t,e.anchorNode,e.anchorOffset),f=Go(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&f&&!f.bad&&v(Oe(a,f),n)==0&&v(re(a,f),o)==0)){var d=t.display.view,p=n.line>=t.display.viewFrom&&bf(t,n)||{node:d[0].measure.map[2],offset:0},g=o.line<t.display.viewTo&&bf(t,o);if(!g){var k=d[d.length-1].measure,C=k.maps?k.maps[k.maps.length-1]:k.map;g={node:C[C.length-1],offset:C[C.length-2]-C[C.length-3]}}if(!p||!g){e.removeAllRanges();return}var z=e.rangeCount&&e.getRangeAt(0),O;try{O=Z(p.node,p.offset,g.offset,g.node)}catch{}O&&(!c&&t.state.focused?(e.collapse(p.node,p.offset),O.collapsed||(e.removeAllRanges(),e.addRange(O))):(e.removeAllRanges(),e.addRange(O)),z&&e.anchorNode==null?e.addRange(z):c&&this.startGracePeriod()),this.rememberSelection()}},$e.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)},$e.prototype.showMultipleSelections=function(e){I(this.cm.display.cursorDiv,e.cursors),I(this.cm.display.selectionDiv,e.selection)},$e.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},$e.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return K(this.div,t)},$e.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||se()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},$e.prototype.blur=function(){this.div.blur()},$e.prototype.getField=function(){return this.div},$e.prototype.supportsTouch=function(){return!0},$e.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)},$e.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},$e.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(J&&_&&this.cm.display.gutterSpecs.length&&zp(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=Go(t,e.anchorNode,e.anchorOffset),n=Go(t,e.focusNode,e.focusOffset);i&&n&&qt(t,function(){Ot(t.doc,Gr(i,n),ke),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},$e.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=ee(n.line-1,we(e.doc,n.line-1).length)),o.ch==we(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=ee(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,f,d;n.line==t.viewFrom||(a=vn(e,n.line))==0?(f=je(t.view[0].line),d=t.view[0].node):(f=je(t.view[a].line),d=t.view[a-1].node.nextSibling);var p=vn(e,o.line),g,k;if(p==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=je(t.view[p+1].line)-1,k=t.view[p+1].node.previousSibling),!d)return!1;for(var C=e.doc.splitLines(Dp(e,d,k,f,g)),z=br(e.doc,ee(f,0),ee(g,we(e.doc,g).text.length));C.length>1&&z.length>1;)if(D(C)==D(z))C.pop(),z.pop(),g--;else if(C[0]==z[0])C.shift(),z.shift(),f++;else break;for(var O=0,F=0,$=C[0],ie=z[0],ce=Math.min($.length,ie.length);O<ce&&$.charCodeAt(O)==ie.charCodeAt(O);)++O;for(var ge=D(C),de=D(z),ye=Math.min(ge.length-(C.length==1?O:0),de.length-(z.length==1?O:0));F<ye&&ge.charCodeAt(ge.length-F-1)==de.charCodeAt(de.length-F-1);)++F;if(C.length==1&&z.length==1&&f==n.line)for(;O&&O>n.ch&&ge.charCodeAt(ge.length-F-1)==de.charCodeAt(de.length-F-1);)O--,F++;C[C.length-1]=ge.slice(0,ge.length-F).replace(/^\u200b+/,""),C[0]=C[0].slice(O).replace(/\u200b+$/,"");var Pe=ee(f,O),Me=ee(g,z.length?D(z).length-F:0);if(C.length>1||C[0]||v(Pe,Me))return Gn(e.doc,C,Pe,Me,"+input"),!0},$e.prototype.ensurePolled=function(){this.forceCompositionEnd()},$e.prototype.reset=function(){this.forceCompositionEnd()},$e.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$e.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))},$e.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&qt(this.cm,function(){return Rt(e.cm)})},$e.prototype.setUneditable=function(e){e.contentEditable="false"},$e.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||bt(this.cm,ps)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$e.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},$e.prototype.onContextMenu=function(){},$e.prototype.resetPosition=function(){},$e.prototype.needsContentAttribute=!0;function bf(e,t){var i=Rl(e,t.line);if(!i||i.hidden)return null;var n=we(e.doc,t.line),o=Ga(i,n,t.line),a=dt(n,e.doc.direction),f="left";if(a){var d=Ee(a,t.ch);f=d%2?"right":"left"}var p=Xa(o.map,t.ch,f);return p.offset=p.collapse=="right"?p.end:p.start,p}function zp(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jn(e,t){return t&&(e.bad=!0),e}function Dp(e,t,i,n,o){var a="",f=!1,d=e.doc.lineSeparator(),p=!1;function g(O){return function(F){return F.id==O}}function k(){f&&(a+=d,p&&(a+=d),f=p=!1)}function C(O){O&&(k(),a+=O)}function z(O){if(O.nodeType==1){var F=O.getAttribute("cm-text");if(F){C(F);return}var $=O.getAttribute("cm-marker"),ie;if($){var ce=e.findMarks(ee(n,0),ee(o+1,0),g(+$));ce.length&&(ie=ce[0].find(0))&&C(br(e.doc,ie.from,ie.to).join(d));return}if(O.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test(O.nodeName);if(!/^br$/i.test(O.nodeName)&&O.textContent.length==0)return;ge&&k();for(var de=0;de<O.childNodes.length;de++)z(O.childNodes[de]);/^(pre|p)$/i.test(O.nodeName)&&(p=!0),ge&&(f=!0)}else O.nodeType==3&&C(O.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;z(t),t!=i;)t=t.nextSibling,p=!1;return a}function Go(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return Jn(e.clipPos(ee(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 Rp(a,t,i)}}function Rp(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!K(n,t))return Jn(ee(je(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?D(e.rest):e.line;return Jn(ee(je(a),a.text.length),o)}var f=t.nodeType==3?t:null,d=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,i&&(i=f.nodeValue.length));d.parentNode!=n;)d=d.parentNode;var p=e.measure,g=p.maps;function k(ie,ce,ge){for(var de=-1;de<(g?g.length:0);de++)for(var ye=de<0?p.map:g[de],Pe=0;Pe<ye.length;Pe+=3){var Me=ye[Pe+2];if(Me==ie||Me==ce){var De=je(de<0?e.line:e.rest[de]),Qe=ye[Pe]+ge;return(ge<0||Me!=ie)&&(Qe=ye[Pe+(ge?1:0)]),ee(De,Qe)}}}var C=k(f,d,i);if(C)return Jn(C,o);for(var z=d.nextSibling,O=f?f.nodeValue.length-i:0;z;z=z.nextSibling){if(C=k(z,z.firstChild,0),C)return Jn(ee(C.line,C.ch-O),o);O+=z.textContent.length}for(var F=d.previousSibling,$=i;F;F=F.previousSibling){if(C=k(F,F.firstChild,-1),C)return Jn(ee(C.line,C.ch+$),o);$+=F.textContent.length}}var ft=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null};ft.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),te&&(o.style.width="0px"),Ce(o,"input",function(){y&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ce(o,"paste",function(f){lt(n,f)||hf(f,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(f){if(!lt(n,f)){if(n.somethingSelected())qo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var d=gf(n);qo({lineWise:!0,text:d.text}),f.type=="cut"?n.setSelections(d.ranges,null,ke):(i.prevInput="",o.value=d.text.join(`
20
- `),nt(o))}else return;f.type=="cut"&&(n.state.cutIncoming=+new Date)}}Ce(o,"cut",a),Ce(o,"copy",a),Ce(e.scroller,"paste",function(f){if(!(Nr(e,f)||lt(n,f))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var d=new Event("paste");d.clipboardData=f.clipboardData,o.dispatchEvent(d)}}),Ce(e.lineSpace,"selectstart",function(f){Nr(e,f)||Pt(f)}),Ce(o,"compositionstart",function(){var f=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:f,range:n.markText(f,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},ft.prototype.createField=function(e){this.wrapper=mf(),this.textarea=this.wrapper.firstChild},ft.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ft.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=lu(e);if(e.options.moveInputWithCursor){var o=fr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+f.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+f.left-a.left))}return n},ft.prototype.showSelection=function(e){var t=this.cm,i=t.display;I(i.cursorDiv,e.cursors),I(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ft.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&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&x>=9&&(this.hasSelection=null))}},ft.prototype.getField=function(){return this.textarea},ft.prototype.supportsTouch=function(){return!1},ft.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||se()!=this.textarea))try{this.textarea.focus()}catch{}},ft.prototype.blur=function(){this.textarea.blur()},ft.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ft.prototype.receivedFocus=function(){this.slowPoll()},ft.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ft.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)},ft.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||vo(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&&x>=9&&this.hasSelection===o||he&&/[\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 f=0,d=Math.min(n.length,o.length);f<d&&n.charCodeAt(f)==o.charCodeAt(f);)++f;return qt(t,function(){ps(t,o.slice(f),n.length-f,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
19
+ `);var z=se();nt(C),setTimeout(function(){n.display.lineSpace.removeChild(k),z.focus(),z==o&&i.showPrimarySelection()},50)}}Ce(o,"copy",f),Ce(o,"cut",f)},$e.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=lu(this.cm,!1);return e.focus=se()==this.div,e},$e.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$e.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$e.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=Yo(t,e.anchorNode,e.anchorOffset),f=Yo(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&f&&!f.bad&&v(Oe(a,f),n)==0&&v(re(a,f),o)==0)){var d=t.display.view,p=n.line>=t.display.viewFrom&&bf(t,n)||{node:d[0].measure.map[2],offset:0},g=o.line<t.display.viewTo&&bf(t,o);if(!g){var k=d[d.length-1].measure,C=k.maps?k.maps[k.maps.length-1]:k.map;g={node:C[C.length-1],offset:C[C.length-2]-C[C.length-3]}}if(!p||!g){e.removeAllRanges();return}var z=e.rangeCount&&e.getRangeAt(0),O;try{O=Z(p.node,p.offset,g.offset,g.node)}catch{}O&&(!c&&t.state.focused?(e.collapse(p.node,p.offset),O.collapsed||(e.removeAllRanges(),e.addRange(O))):(e.removeAllRanges(),e.addRange(O)),z&&e.anchorNode==null?e.addRange(z):c&&this.startGracePeriod()),this.rememberSelection()}},$e.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)},$e.prototype.showMultipleSelections=function(e){I(this.cm.display.cursorDiv,e.cursors),I(this.cm.display.selectionDiv,e.selection)},$e.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},$e.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return K(this.div,t)},$e.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||se()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},$e.prototype.blur=function(){this.div.blur()},$e.prototype.getField=function(){return this.div},$e.prototype.supportsTouch=function(){return!0},$e.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):jt(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)},$e.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},$e.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(J&&_&&this.cm.display.gutterSpecs.length&&zp(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=Yo(t,e.anchorNode,e.anchorOffset),n=Yo(t,e.focusNode,e.focusOffset);i&&n&&jt(t,function(){Ot(t.doc,Gr(i,n),ke),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},$e.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=ee(n.line-1,we(e.doc,n.line-1).length)),o.ch==we(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=ee(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,f,d;n.line==t.viewFrom||(a=vn(e,n.line))==0?(f=je(t.view[0].line),d=t.view[0].node):(f=je(t.view[a].line),d=t.view[a-1].node.nextSibling);var p=vn(e,o.line),g,k;if(p==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=je(t.view[p+1].line)-1,k=t.view[p+1].node.previousSibling),!d)return!1;for(var C=e.doc.splitLines(Dp(e,d,k,f,g)),z=br(e.doc,ee(f,0),ee(g,we(e.doc,g).text.length));C.length>1&&z.length>1;)if(D(C)==D(z))C.pop(),z.pop(),g--;else if(C[0]==z[0])C.shift(),z.shift(),f++;else break;for(var O=0,F=0,$=C[0],ie=z[0],ce=Math.min($.length,ie.length);O<ce&&$.charCodeAt(O)==ie.charCodeAt(O);)++O;for(var ge=D(C),de=D(z),ye=Math.min(ge.length-(C.length==1?O:0),de.length-(z.length==1?O:0));F<ye&&ge.charCodeAt(ge.length-F-1)==de.charCodeAt(de.length-F-1);)++F;if(C.length==1&&z.length==1&&f==n.line)for(;O&&O>n.ch&&ge.charCodeAt(ge.length-F-1)==de.charCodeAt(de.length-F-1);)O--,F++;C[C.length-1]=ge.slice(0,ge.length-F).replace(/^\u200b+/,""),C[0]=C[0].slice(O).replace(/\u200b+$/,"");var Pe=ee(f,O),Me=ee(g,z.length?D(z).length-F:0);if(C.length>1||C[0]||v(Pe,Me))return Gn(e.doc,C,Pe,Me,"+input"),!0},$e.prototype.ensurePolled=function(){this.forceCompositionEnd()},$e.prototype.reset=function(){this.forceCompositionEnd()},$e.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$e.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))},$e.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&jt(this.cm,function(){return Rt(e.cm)})},$e.prototype.setUneditable=function(e){e.contentEditable="false"},$e.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||bt(this.cm,ps)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$e.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},$e.prototype.onContextMenu=function(){},$e.prototype.resetPosition=function(){},$e.prototype.needsContentAttribute=!0;function bf(e,t){var i=Rl(e,t.line);if(!i||i.hidden)return null;var n=we(e.doc,t.line),o=Ga(i,n,t.line),a=dt(n,e.doc.direction),f="left";if(a){var d=Ee(a,t.ch);f=d%2?"right":"left"}var p=Xa(o.map,t.ch,f);return p.offset=p.collapse=="right"?p.end:p.start,p}function zp(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jn(e,t){return t&&(e.bad=!0),e}function Dp(e,t,i,n,o){var a="",f=!1,d=e.doc.lineSeparator(),p=!1;function g(O){return function(F){return F.id==O}}function k(){f&&(a+=d,p&&(a+=d),f=p=!1)}function C(O){O&&(k(),a+=O)}function z(O){if(O.nodeType==1){var F=O.getAttribute("cm-text");if(F){C(F);return}var $=O.getAttribute("cm-marker"),ie;if($){var ce=e.findMarks(ee(n,0),ee(o+1,0),g(+$));ce.length&&(ie=ce[0].find(0))&&C(br(e.doc,ie.from,ie.to).join(d));return}if(O.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test(O.nodeName);if(!/^br$/i.test(O.nodeName)&&O.textContent.length==0)return;ge&&k();for(var de=0;de<O.childNodes.length;de++)z(O.childNodes[de]);/^(pre|p)$/i.test(O.nodeName)&&(p=!0),ge&&(f=!0)}else O.nodeType==3&&C(O.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;z(t),t!=i;)t=t.nextSibling,p=!1;return a}function Yo(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return Jn(e.clipPos(ee(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 Rp(a,t,i)}}function Rp(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!K(n,t))return Jn(ee(je(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?D(e.rest):e.line;return Jn(ee(je(a),a.text.length),o)}var f=t.nodeType==3?t:null,d=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,i&&(i=f.nodeValue.length));d.parentNode!=n;)d=d.parentNode;var p=e.measure,g=p.maps;function k(ie,ce,ge){for(var de=-1;de<(g?g.length:0);de++)for(var ye=de<0?p.map:g[de],Pe=0;Pe<ye.length;Pe+=3){var Me=ye[Pe+2];if(Me==ie||Me==ce){var De=je(de<0?e.line:e.rest[de]),Qe=ye[Pe]+ge;return(ge<0||Me!=ie)&&(Qe=ye[Pe+(ge?1:0)]),ee(De,Qe)}}}var C=k(f,d,i);if(C)return Jn(C,o);for(var z=d.nextSibling,O=f?f.nodeValue.length-i:0;z;z=z.nextSibling){if(C=k(z,z.firstChild,0),C)return Jn(ee(C.line,C.ch-O),o);O+=z.textContent.length}for(var F=d.previousSibling,$=i;F;F=F.previousSibling){if(C=k(F,F.firstChild,-1),C)return Jn(ee(C.line,C.ch+$),o);$+=F.textContent.length}}var ft=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null};ft.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),te&&(o.style.width="0px"),Ce(o,"input",function(){y&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ce(o,"paste",function(f){lt(n,f)||hf(f,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(f){if(!lt(n,f)){if(n.somethingSelected())Go({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var d=gf(n);Go({lineWise:!0,text:d.text}),f.type=="cut"?n.setSelections(d.ranges,null,ke):(i.prevInput="",o.value=d.text.join(`
20
+ `),nt(o))}else return;f.type=="cut"&&(n.state.cutIncoming=+new Date)}}Ce(o,"cut",a),Ce(o,"copy",a),Ce(e.scroller,"paste",function(f){if(!(Nr(e,f)||lt(n,f))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var d=new Event("paste");d.clipboardData=f.clipboardData,o.dispatchEvent(d)}}),Ce(e.lineSpace,"selectstart",function(f){Nr(e,f)||Pt(f)}),Ce(o,"compositionstart",function(){var f=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:f,range:n.markText(f,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},ft.prototype.createField=function(e){this.wrapper=mf(),this.textarea=this.wrapper.firstChild},ft.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ft.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=lu(e);if(e.options.moveInputWithCursor){var o=fr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+f.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+f.left-a.left))}return n},ft.prototype.showSelection=function(e){var t=this.cm,i=t.display;I(i.cursorDiv,e.cursors),I(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ft.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&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&x>=9&&(this.hasSelection=null))}},ft.prototype.getField=function(){return this.textarea},ft.prototype.supportsTouch=function(){return!1},ft.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||se()!=this.textarea))try{this.textarea.focus()}catch{}},ft.prototype.blur=function(){this.textarea.blur()},ft.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ft.prototype.receivedFocus=function(){this.slowPoll()},ft.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ft.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)},ft.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||mo(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&&x>=9&&this.hasSelection===o||he&&/[\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 f=0,d=Math.min(n.length,o.length);f<d&&n.charCodeAt(f)==o.charCodeAt(f);)++f;return jt(t,function(){ps(t,o.slice(f),n.length-f,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
21
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},ft.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ft.prototype.onKeyPress=function(){y&&x>=9&&(this.hasSelection=null),this.fastPoll()},ft.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=gn(i,e),f=n.scroller.scrollTop;if(!a||N)return;var d=i.options.resetSelectionOnContextMenu;d&&i.doc.sel.contains(a)==-1&&bt(i,Ot)(i.doc,Gr(a),ke);var p=o.style.cssText,g=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
22
  top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px;
23
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=O,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function z(){if(o.selectionStart!=null){var $=i.somethingSelected(),ie="\u200B"+($?o.value:"");o.value="\u21DA",o.value=ie,t.prevInput=$?"":"\u200B",o.selectionStart=1,o.selectionEnd=ie.length,n.selForContextMenu=i.doc.sel}}function O(){if(t.contextMenuPending==O&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=f),o.selectionStart!=null)){(!y||y&&x<9)&&z();var $=0,ie=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?bt(i,Ru)(i):$++<10?n.detectingSelectAll=setTimeout(ie,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ie,200)}}if(y&&x>=9&&z(),Be){cn(e);var F=function(){Ze(window,"mouseup",F),setTimeout(O,20)};Ce(window,"mouseup",F)}else setTimeout(O,50)},ft.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ft.prototype.setUneditable=function(){},ft.prototype.needsContentAttribute=!1;function Ip(e,t){if(t=t?Ne(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=se();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=d.getValue()}var o;if(e.form&&(Ce(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var f=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=f}}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&&(Ze(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var d=it(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return d}function Fp(e){e.off=Ze,e.on=Ce,e.wheelEventPixels=qh,e.Doc=It,e.splitLines=mi,e.countColumn=Ve,e.findColumn=Le,e.isWordChar=Q,e.Pass=oe,e.signal=Te,e.Line=Dn,e.changeEnd=Yr,e.scrollbarModel=du,e.Pos=ee,e.cmpPos=v,e.modes=ir,e.mimeModes=Jt,e.resolveMode=An,e.getMode=Nn,e.modeExtensions=sr,e.extendMode=ar,e.copyState=Qt,e.startState=wi,e.innerMode=bi,e.commands=qi,e.keyMap=Dr,e.keyName=Qu,e.isModifierKey=Zu,e.lookupKey=$n,e.normalizeKeyMap=hp,e.StringStream=at,e.SharedTextMarker=Ui,e.TextMarker=Xr,e.LineWidget=Bi,e.e_preventDefault=Pt,e.e_stopPropagation=En,e.e_stop=cn,e.addClass=_e,e.contains=K,e.rmClass=me,e.keyNames=Zr}_p(it),Np(it);var Hp="iter insert remove copy getEditor constructor".split(" ");for(var Yo in It.prototype)It.prototype.hasOwnProperty(Yo)&&G(Hp,Yo)<0&&(it.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(It.prototype[Yo]));return mr(It),it.inputStyles={textarea:ft,contenteditable:$e},it.defineMode=function(e){!it.defaults.mode&&e!="null"&&(it.defaults.mode=e),yo.apply(this,arguments)},it.defineMIME=Or,it.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),it.defineMIME("text/plain","null"),it.defineExtension=function(e,t){it.prototype[e]=t},it.defineDocExtension=function(e,t){It.prototype[e]=t},it.fromTextArea=Ip,Fp(it),it.version="5.65.2",it})})(fn);var M0=fn.exports,Md={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineMode("javascript",function(u,c){var h=u.indentUnit,m=c.statementIndent,b=c.jsonld,y=c.json||b,x=c.trackScope!==!1,S=c.typescript,P=c.wordCharacters||/[\w$\xa1-\uffff]/,_=function(){function v(_t){return{type:_t,style:"keyword"}}var L=v("keyword a"),q=v("keyword b"),re=v("keyword c"),Oe=v("keyword d"),Ue=v("operator"),ve={type:"atom",style:"atom"};return{if:v("if"),while:L,with:L,else:q,do:q,try:q,finally:q,return:Oe,break:Oe,continue:Oe,new:v("new"),delete:re,void:re,throw:re,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:Ue,typeof:Ue,instanceof:Ue,true:ve,false:ve,null:ve,undefined:ve,NaN:ve,Infinity:ve,this:v("this"),class:v("class"),super:v("atom"),yield:re,export:v("export"),import:v("import"),extends:re,await:re}}(),N=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(v){for(var L=!1,q,re=!1;(q=v.next())!=null;){if(!L){if(q=="/"&&!re)return;q=="["?re=!0:re&&q=="]"&&(re=!1)}L=!L&&q=="\\"}}var X,te;function J(v,L,q){return X=v,te=q,L}function ne(v,L){var q=v.next();if(q=='"'||q=="'")return L.tokenize=he(q),L.tokenize(v,L);if(q=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return J("number","number");if(q=="."&&v.match(".."))return J("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(q))return J(q);if(q=="="&&v.eat(">"))return J("=>","operator");if(q=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return J("number","number");if(/\d/.test(q))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),J("number","number");if(q=="/")return v.eat("*")?(L.tokenize=Ae,Ae(v,L)):v.eat("/")?(v.skipToEnd(),J("comment","comment")):ee(v,L,1)?(V(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),J("regexp","string-2")):(v.eat("="),J("operator","operator",v.current()));if(q=="`")return L.tokenize=Fe,Fe(v,L);if(q=="#"&&v.peek()=="!")return v.skipToEnd(),J("meta","meta");if(q=="#"&&v.eatWhile(P))return J("variable","property");if(q=="<"&&v.match("!--")||q=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),J("comment","comment");if(N.test(q))return(q!=">"||!L.lexical||L.lexical.type!=">")&&(v.eat("=")?(q=="!"||q=="=")&&v.eat("="):/[<>*+\-|&?]/.test(q)&&(v.eat(q),q==">"&&v.eat(q))),q=="?"&&v.eat(".")?J("."):J("operator","operator",v.current());if(P.test(q)){v.eatWhile(P);var re=v.current();if(L.lastType!="."){if(_.propertyIsEnumerable(re)){var Oe=_[re];return J(Oe.type,Oe.style,re)}if(re=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return J("async","keyword",re)}return J("variable","variable",re)}}function he(v){return function(L,q){var re=!1,Oe;if(b&&L.peek()=="@"&&L.match(H))return q.tokenize=ne,J("jsonld-keyword","meta");for(;(Oe=L.next())!=null&&!(Oe==v&&!re);)re=!re&&Oe=="\\";return re||(q.tokenize=ne),J("string","string")}}function Ae(v,L){for(var q=!1,re;re=v.next();){if(re=="/"&&q){L.tokenize=ne;break}q=re=="*"}return J("comment","comment")}function Fe(v,L){for(var q=!1,re;(re=v.next())!=null;){if(!q&&(re=="`"||re=="$"&&v.eat("{"))){L.tokenize=ne;break}q=!q&&re=="\\"}return J("quasi","string-2",v.current())}var Ke="([{}])";function tt(v,L){L.fatArrowAt&&(L.fatArrowAt=null);var q=v.string.indexOf("=>",v.start);if(!(q<0)){if(S){var re=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,q));re&&(q=re.index)}for(var Oe=0,Ue=!1,ve=q-1;ve>=0;--ve){var _t=v.string.charAt(ve),Vt=Ke.indexOf(_t);if(Vt>=0&&Vt<3){if(!Oe){++ve;break}if(--Oe==0){_t=="("&&(Ue=!0);break}}else if(Vt>=3&&Vt<6)++Oe;else if(P.test(_t))Ue=!0;else if(/["'\/`]/.test(_t))for(;;--ve){if(ve==0)return;var zn=v.string.charAt(ve-1);if(zn==_t&&v.string.charAt(ve-2)!="\\"){ve--;break}}else if(Ue&&!Oe){++ve;break}}Ue&&!Oe&&(L.fatArrowAt=ve)}}var Be={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function xe(v,L,q,re,Oe,Ue){this.indented=v,this.column=L,this.type=q,this.prev=Oe,this.info=Ue,re!=null&&(this.align=re)}function me(v,L){if(!x)return!1;for(var q=v.localVars;q;q=q.next)if(q.name==L)return!0;for(var re=v.context;re;re=re.prev)for(var q=re.vars;q;q=q.next)if(q.name==L)return!0}function We(v,L,q,re,Oe){var Ue=v.cc;for(I.state=v,I.stream=Oe,I.marked=null,I.cc=Ue,I.style=L,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var ve=Ue.length?Ue.pop():y?fe:ke;if(ve(q,re)){for(;Ue.length&&Ue[Ue.length-1].lex;)Ue.pop()();return I.marked?I.marked:q=="variable"&&me(v,re)?"variable-2":L}}}var I={state:null,column:null,marked:null,cc:null};function U(){for(var v=arguments.length-1;v>=0;v--)I.cc.push(arguments[v])}function w(){return U.apply(null,arguments),!0}function Z(v,L){for(var q=L;q;q=q.next)if(q.name==v)return!0;return!1}function K(v){var L=I.state;if(I.marked="def",!!x){if(L.context){if(L.lexical.info=="var"&&L.context&&L.context.block){var q=se(v,L.context);if(q!=null){L.context=q;return}}else if(!Z(v,L.localVars)){L.localVars=new nt(v,L.localVars);return}}c.globalVars&&!Z(v,L.globalVars)&&(L.globalVars=new nt(v,L.globalVars))}}function se(v,L){if(L)if(L.block){var q=se(v,L.prev);return q?q==L.prev?L:new Ye(q,L.vars,!0):null}else return Z(v,L.vars)?L:new Ye(L.prev,new nt(v,L.vars),!1);else return null}function _e(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function Ye(v,L,q){this.prev=v,this.vars=L,this.block=q}function nt(v,L){this.name=v,this.next=L}var ct=new nt("this",new nt("arguments",null));function Ne(){I.state.context=new Ye(I.state.context,I.state.localVars,!1),I.state.localVars=ct}function Ve(){I.state.context=new Ye(I.state.context,I.state.localVars,!0),I.state.localVars=null}Ne.lex=Ve.lex=!0;function W(){I.state.localVars=I.state.context.vars,I.state.context=I.state.context.prev}W.lex=!0;function G(v,L){var q=function(){var re=I.state,Oe=re.indented;if(re.lexical.type=="stat")Oe=re.lexical.indented;else for(var Ue=re.lexical;Ue&&Ue.type==")"&&Ue.align;Ue=Ue.prev)Oe=Ue.indented;re.lexical=new xe(Oe,I.stream.column(),v,null,re.lexical,L)};return q.lex=!0,q}function j(){var v=I.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}j.lex=!0;function oe(v){function L(q){return q==v?w():v==";"||q=="}"||q==")"||q=="]"?U():w(L)}return L}function ke(v,L){return v=="var"?w(G("vardef",L),gi,oe(";"),j):v=="keyword a"?w(G("form"),M,ke,j):v=="keyword b"?w(G("form"),ke,j):v=="keyword d"?I.stream.match(/^\s*$/,!1)?w():w(G("stat"),D,oe(";"),j):v=="debugger"?w(oe(";")):v=="{"?w(G("}"),Ve,dt,j,W):v==";"?w():v=="if"?(I.state.lexical.info=="else"&&I.state.cc[I.state.cc.length-1]==j&&I.state.cc.pop()(),w(G("form"),M,ke,j,vo)):v=="function"?w(ir):v=="for"?w(G("form"),Ve,mo,ke,W,j):v=="class"||S&&L=="interface"?(I.marked="keyword",w(G("form",v=="class"?v:L),Nn,j)):v=="variable"?S&&L=="declare"?(I.marked="keyword",w(ke)):S&&(L=="module"||L=="enum"||L=="type")&&I.stream.match(/^\s*\w/,!1)?(I.marked="keyword",L=="enum"?w(wr):L=="type"?w(yo,oe("operator"),Te,oe(";")):w(G("form"),Dt,oe("{"),G("}"),dt,j,j)):S&&L=="namespace"?(I.marked="keyword",w(G("form"),fe,ke,j)):S&&L=="abstract"?(I.marked="keyword",w(ke)):w(G("stat"),ue):v=="switch"?w(G("form"),M,oe("{"),G("}","switch"),Ve,dt,j,j,W):v=="case"?w(fe,oe(":")):v=="default"?w(oe(":")):v=="catch"?w(G("form"),Ne,be,ke,j,W):v=="export"?w(G("stat"),bi,j):v=="import"?w(G("stat"),at,j):v=="async"?w(ke):L=="@"?w(fe,ke):U(G("stat"),fe,oe(";"),j)}function be(v){if(v=="(")return w(Or,oe(")"))}function fe(v,L){return E(v,L,!1)}function Le(v,L){return E(v,L,!0)}function M(v){return v!="("?U():w(G(")"),D,oe(")"),j)}function E(v,L,q){if(I.state.fatArrowAt==I.stream.start){var re=q?Q:ae;if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,oe("=>"),re,W);if(v=="variable")return U(Ne,Dt,oe("=>"),re,W)}var Oe=q?Y:B;return Be.hasOwnProperty(v)?w(Oe):v=="function"?w(ir,Oe):v=="class"||S&&L=="interface"?(I.marked="keyword",w(G("form"),An,j)):v=="keyword c"||v=="async"?w(q?Le:fe):v=="("?w(G(")"),D,oe(")"),j,Oe):v=="operator"||v=="spread"?w(q?Le:fe):v=="["?w(G("]"),je,j,Oe):v=="{"?mt(ze,"}",null,Oe):v=="quasi"?U(le,Oe):v=="new"?w(T(q)):w()}function D(v){return v.match(/[;\}\)\],]/)?U():U(fe)}function B(v,L){return v==","?w(D):Y(v,L,!1)}function Y(v,L,q){var re=q==!1?B:Y,Oe=q==!1?fe:Le;if(v=="=>")return w(Ne,q?Q:ae,W);if(v=="operator")return/\+\+|--/.test(L)||S&&L=="!"?w(re):S&&L=="<"&&I.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(G(">"),Ee(Te,">"),j,re):L=="?"?w(fe,oe(":"),Oe):w(Oe);if(v=="quasi")return U(le,re);if(v!=";"){if(v=="(")return mt(Le,")","call",re);if(v==".")return w(Se,re);if(v=="[")return w(G("]"),D,oe("]"),j,re);if(S&&L=="as")return I.marked="keyword",w(Te,re);if(v=="regexp")return I.state.lastType=I.marked="operator",I.stream.backUp(I.stream.pos-I.stream.start-1),w(Oe)}}function le(v,L){return v!="quasi"?U():L.slice(L.length-2)!="${"?w(le):w(D,pe)}function pe(v){if(v=="}")return I.marked="string-2",I.state.tokenize=Fe,w(le)}function ae(v){return tt(I.stream,I.state),U(v=="{"?ke:fe)}function Q(v){return tt(I.stream,I.state),U(v=="{"?ke:Le)}function T(v){return function(L){return L=="."?w(v?A:R):L=="variable"&&S?w(cn,v?Y:B):U(v?Le:fe)}}function R(v,L){if(L=="target")return I.marked="keyword",w(B)}function A(v,L){if(L=="target")return I.marked="keyword",w(Y)}function ue(v){return v==":"?w(j,ke):U(B,oe(";"),j)}function Se(v){if(v=="variable")return I.marked="property",w()}function ze(v,L){if(v=="async")return I.marked="property",w(ze);if(v=="variable"||I.style=="keyword"){if(I.marked="property",L=="get"||L=="set")return w(Je);var q;return S&&I.state.fatArrowAt==I.stream.start&&(q=I.stream.match(/^\s*:\s*/,!1))&&(I.state.fatArrowAt=I.stream.pos+q[0].length),w(Ie)}else{if(v=="number"||v=="string")return I.marked=b?"property":I.style+" property",w(Ie);if(v=="jsonld-keyword")return w(Ie);if(S&&_e(L))return I.marked="keyword",w(ze);if(v=="[")return w(fe,nr,oe("]"),Ie);if(v=="spread")return w(Le,Ie);if(L=="*")return I.marked="keyword",w(ze);if(v==":")return U(Ie)}}function Je(v){return v!="variable"?U(Ie):(I.marked="property",w(ir))}function Ie(v){if(v==":")return w(Le);if(v=="(")return U(ir)}function Ee(v,L,q){function re(Oe,Ue){if(q?q.indexOf(Oe)>-1:Oe==","){var ve=I.state.lexical;return ve.info=="call"&&(ve.pos=(ve.pos||0)+1),w(function(_t,Vt){return _t==L||Vt==L?U():U(v)},re)}return Oe==L||Ue==L?w():q&&q.indexOf(";")>-1?U(v):w(oe(L))}return function(Oe,Ue){return Oe==L||Ue==L?w():U(v,re)}}function mt(v,L,q){for(var re=3;re<arguments.length;re++)I.cc.push(arguments[re]);return w(G(L,q),Ee(v,L),j)}function dt(v){return v=="}"?w():U(ke,dt)}function nr(v,L){if(S){if(v==":")return w(Te);if(L=="?")return w(nr)}}function Ce(v,L){if(S&&(v==":"||L=="in"))return w(Te)}function _r(v){if(S&&v==":")return I.stream.match(/^\s*\w+\s+is\b/,!1)?w(fe,Ze,Te):w(Te)}function Ze(v,L){if(L=="is")return I.marked="keyword",w()}function Te(v,L){if(L=="keyof"||L=="typeof"||L=="infer"||L=="readonly")return I.marked="keyword",w(L=="typeof"?Le:Te);if(v=="variable"||L=="void")return I.marked="type",w(Zt);if(L=="|"||L=="&")return w(Te);if(v=="string"||v=="number"||v=="atom")return w(Zt);if(v=="[")return w(G("]"),Ee(Te,"]",","),j,Zt);if(v=="{")return w(G("}"),On,j,Zt);if(v=="(")return w(Ee(En,")"),lt,Zt);if(v=="<")return w(Ee(Te,">"),Te);if(v=="quasi")return U(mr,Zt)}function lt(v){if(v=="=>")return w(Te)}function On(v){return v.match(/[\}\)\]]/)?w():v==","||v==";"?w(On):U(Ct,On)}function Ct(v,L){if(v=="variable"||I.style=="keyword")return I.marked="property",w(Ct);if(L=="?"||v=="number"||v=="string")return w(Ct);if(v==":")return w(Te);if(v=="[")return w(oe("variable"),Ce,oe("]"),Ct);if(v=="(")return U(Jt,Ct);if(!v.match(/[;\}\)\],]/))return w()}function mr(v,L){return v!="quasi"?U():L.slice(L.length-2)!="${"?w(mr):w(Te,Pt)}function Pt(v){if(v=="}")return I.marked="string-2",I.state.tokenize=Fe,w(mr)}function En(v,L){return v=="variable"&&I.stream.match(/^\s*[?:]/,!1)||L=="?"?w(En):v==":"?w(Te):v=="spread"?w(En):U(Te)}function Zt(v,L){if(L=="<")return w(G(">"),Ee(Te,">"),j,Zt);if(L=="|"||v=="."||L=="&")return w(Te);if(v=="[")return w(Te,oe("]"),Zt);if(L=="extends"||L=="implements")return I.marked="keyword",w(Te);if(L=="?")return w(Te,oe(":"),Te)}function cn(v,L){if(L=="<")return w(G(">"),Ee(Te,">"),j,Zt)}function Br(){return U(Te,po)}function po(v,L){if(L=="=")return w(Te)}function gi(v,L){return L=="enum"?(I.marked="keyword",w(wr)):U(Dt,nr,yr,mi)}function Dt(v,L){if(S&&_e(L))return I.marked="keyword",w(Dt);if(v=="variable")return K(L),w();if(v=="spread")return w(Dt);if(v=="[")return mt(vi,"]");if(v=="{")return mt(go,"}")}function go(v,L){return v=="variable"&&!I.stream.match(/^\s*:/,!1)?(K(L),w(yr)):(v=="variable"&&(I.marked="property"),v=="spread"?w(Dt):v=="}"?U():v=="["?w(fe,oe("]"),oe(":"),go):w(oe(":"),Dt,yr))}function vi(){return U(Dt,yr)}function yr(v,L){if(L=="=")return w(Le)}function mi(v){if(v==",")return w(gi)}function vo(v,L){if(v=="keyword b"&&L=="else")return w(G("form","else"),ke,j)}function mo(v,L){if(L=="await")return w(mo);if(v=="(")return w(G(")"),yi,j)}function yi(v){return v=="var"?w(gi,Ur):v=="variable"?w(Ur):U(Ur)}function Ur(v,L){return v==")"?w():v==";"?w(Ur):L=="in"||L=="of"?(I.marked="keyword",w(fe,Ur)):U(fe,Ur)}function ir(v,L){if(L=="*")return I.marked="keyword",w(ir);if(v=="variable")return K(L),w(ir);if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,_r,ke,W);if(S&&L=="<")return w(G(">"),Ee(Br,">"),j,ir)}function Jt(v,L){if(L=="*")return I.marked="keyword",w(Jt);if(v=="variable")return K(L),w(Jt);if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,_r,W);if(S&&L=="<")return w(G(">"),Ee(Br,">"),j,Jt)}function yo(v,L){if(v=="keyword"||v=="variable")return I.marked="type",w(yo);if(L=="<")return w(G(">"),Ee(Br,">"),j)}function Or(v,L){return L=="@"&&w(fe,Or),v=="spread"?w(Or):S&&_e(L)?(I.marked="keyword",w(Or)):S&&v=="this"?w(nr,yr):U(Dt,nr,yr)}function An(v,L){return v=="variable"?Nn(v,L):sr(v,L)}function Nn(v,L){if(v=="variable")return K(L),w(sr)}function sr(v,L){if(L=="<")return w(G(">"),Ee(Br,">"),j,sr);if(L=="extends"||L=="implements"||S&&v==",")return L=="implements"&&(I.marked="keyword"),w(S?Te:fe,sr);if(v=="{")return w(G("}"),ar,j)}function ar(v,L){if(v=="async"||v=="variable"&&(L=="static"||L=="get"||L=="set"||S&&_e(L))&&I.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return I.marked="keyword",w(ar);if(v=="variable"||I.style=="keyword")return I.marked="property",w(Qt,ar);if(v=="number"||v=="string")return w(Qt,ar);if(v=="[")return w(fe,nr,oe("]"),Qt,ar);if(L=="*")return I.marked="keyword",w(ar);if(S&&v=="(")return U(Jt,ar);if(v==";"||v==",")return w(ar);if(v=="}")return w();if(L=="@")return w(fe,ar)}function Qt(v,L){if(L=="!"||L=="?")return w(Qt);if(v==":")return w(Te,yr);if(L=="=")return w(Le);var q=I.state.lexical.prev,re=q&&q.info=="interface";return U(re?Jt:ir)}function bi(v,L){return L=="*"?(I.marked="keyword",w(jt,oe(";"))):L=="default"?(I.marked="keyword",w(fe,oe(";"))):v=="{"?w(Ee(wi,"}"),jt,oe(";")):U(ke)}function wi(v,L){if(L=="as")return I.marked="keyword",w(oe("variable"));if(v=="variable")return U(Le,wi)}function at(v){return v=="string"?w():v=="("?U(fe):v=="."?U(B):U(we,br,jt)}function we(v,L){return v=="{"?mt(we,"}"):(v=="variable"&&K(L),L=="*"&&(I.marked="keyword"),w(xi))}function br(v){if(v==",")return w(we,br)}function xi(v,L){if(L=="as")return I.marked="keyword",w(we)}function jt(v,L){if(L=="from")return I.marked="keyword",w(fe)}function je(v){return v=="]"?w():U(Ee(Le,"]"))}function wr(){return U(G("form"),Dt,oe("{"),G("}"),Ee(dn,"}"),j,j)}function dn(){return U(Dt,yr)}function ki(v,L){return v.lastType=="operator"||v.lastType==","||N.test(L.charAt(0))||/[,.]/.test(L.charAt(0))}function ee(v,L,q){return L.tokenize==ne&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(L.lastType)||L.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-(q||0)))}return{startState:function(v){var L={tokenize:ne,lastType:"sof",cc:[],lexical:new xe((v||0)-h,0,"block",!1),localVars:c.localVars,context:c.localVars&&new Ye(null,null,!1),indented:v||0};return c.globalVars&&typeof c.globalVars=="object"&&(L.globalVars=c.globalVars),L},token:function(v,L){if(v.sol()&&(L.lexical.hasOwnProperty("align")||(L.lexical.align=!1),L.indented=v.indentation(),tt(v,L)),L.tokenize!=Ae&&v.eatSpace())return null;var q=L.tokenize(v,L);return X=="comment"?q:(L.lastType=X=="operator"&&(te=="++"||te=="--")?"incdec":X,We(L,q,X,te,v))},indent:function(v,L){if(v.tokenize==Ae||v.tokenize==Fe)return s.Pass;if(v.tokenize!=ne)return 0;var q=L&&L.charAt(0),re=v.lexical,Oe;if(!/^\s*else\b/.test(L))for(var Ue=v.cc.length-1;Ue>=0;--Ue){var ve=v.cc[Ue];if(ve==j)re=re.prev;else if(ve!=vo&&ve!=W)break}for(;(re.type=="stat"||re.type=="form")&&(q=="}"||(Oe=v.cc[v.cc.length-1])&&(Oe==B||Oe==Y)&&!/^[,\.=+\-*:?[\(]/.test(L));)re=re.prev;m&&re.type==")"&&re.prev.type=="stat"&&(re=re.prev);var _t=re.type,Vt=q==_t;return _t=="vardef"?re.indented+(v.lastType=="operator"||v.lastType==","?re.info.length+1:0):_t=="form"&&q=="{"?re.indented:_t=="form"?re.indented+h:_t=="stat"?re.indented+(ki(v,L)?m||h:0):re.info=="switch"&&!Vt&&c.doubleIndentSwitch!=!1?re.indented+(/^(?:case|default)\b/.test(L)?h:2*h):re.align?re.column+(Vt?0:1):re.indented+(Vt?0:h)},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:ee,skipExpression:function(v){We(v,"atom","atom","true",new s.StringStream("",2,null))}}}),s.registerHelper("wordChars","javascript",/[\w$]/),s.defineMIME("text/javascript","javascript"),s.defineMIME("text/ecmascript","javascript"),s.defineMIME("application/javascript","javascript"),s.defineMIME("application/x-javascript","javascript"),s.defineMIME("application/ecmascript","javascript"),s.defineMIME("application/json",{name:"javascript",json:!0}),s.defineMIME("application/x-json",{name:"javascript",json:!0}),s.defineMIME("application/manifest+json",{name:"javascript",json:!0}),s.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),s.defineMIME("text/typescript",{name:"javascript",typescript:!0}),s.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var ty={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineMode("css",function(xe,me){var We=me.inline;me.propertyKeywords||(me=s.resolveMode("text/css"));var I=xe.indentUnit,U=me.tokenHooks,w=me.documentTypes||{},Z=me.mediaTypes||{},K=me.mediaFeatures||{},se=me.mediaValueKeywords||{},_e=me.propertyKeywords||{},Ye=me.nonStandardPropertyKeywords||{},nt=me.fontProperties||{},ct=me.counterDescriptors||{},Ne=me.colorKeywords||{},Ve=me.valueKeywords||{},W=me.allowNested,G=me.lineComment,j=me.supportsAtComponent===!0,oe=xe.highlightNonStandardPropertyKeywords!==!1,ke,be;function fe(T,R){return ke=R,T}function Le(T,R){var A=T.next();if(U[A]){var ue=U[A](T,R);if(ue!==!1)return ue}if(A=="@")return T.eatWhile(/[\w\\\-]/),fe("def",T.current());if(A=="="||(A=="~"||A=="|")&&T.eat("="))return fe(null,"compare");if(A=='"'||A=="'")return R.tokenize=M(A),R.tokenize(T,R);if(A=="#")return T.eatWhile(/[\w\\\-]/),fe("atom","hash");if(A=="!")return T.match(/^\s*\w*/),fe("keyword","important");if(/\d/.test(A)||A=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),fe("number","unit");if(A==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),fe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?fe("variable-2","variable-definition"):fe("variable-2","variable");if(T.match(/^\w+-/))return fe("meta","meta")}else return/[,+>*\/]/.test(A)?fe(null,"select-op"):A=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?fe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(A)?fe(null,A):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(R.tokenize=E),fe("variable callee","variable")):/[\w\\\-]/.test(A)?(T.eatWhile(/[\w\\\-]/),fe("property","word")):fe(null,null)}function M(T){return function(R,A){for(var ue=!1,Se;(Se=R.next())!=null;){if(Se==T&&!ue){T==")"&&R.backUp(1);break}ue=!ue&&Se=="\\"}return(Se==T||!ue&&T!=")")&&(A.tokenize=null),fe("string","string")}}function E(T,R){return T.next(),T.match(/^\s*[\"\')]/,!1)?R.tokenize=null:R.tokenize=M(")"),fe(null,"(")}function D(T,R,A){this.type=T,this.indent=R,this.prev=A}function B(T,R,A,ue){return T.context=new D(A,R.indentation()+(ue===!1?0:I),T.context),A}function Y(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function le(T,R,A){return Q[A.context.type](T,R,A)}function pe(T,R,A,ue){for(var Se=ue||1;Se>0;Se--)A.context=A.context.prev;return le(T,R,A)}function ae(T){var R=T.current().toLowerCase();Ve.hasOwnProperty(R)?be="atom":Ne.hasOwnProperty(R)?be="keyword":be="variable"}var Q={};return Q.top=function(T,R,A){if(T=="{")return B(A,R,"block");if(T=="}"&&A.context.prev)return Y(A);if(j&&/@component/i.test(T))return B(A,R,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return B(A,R,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return B(A,R,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return A.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return B(A,R,"at");if(T=="hash")be="builtin";else if(T=="word")be="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return B(A,R,"interpolation");if(T==":")return"pseudo";if(W&&T=="(")return B(A,R,"parens")}return A.context.type},Q.block=function(T,R,A){if(T=="word"){var ue=R.current().toLowerCase();return _e.hasOwnProperty(ue)?(be="property","maybeprop"):Ye.hasOwnProperty(ue)?(be=oe?"string-2":"property","maybeprop"):W?(be=R.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return T=="meta"?"block":!W&&(T=="hash"||T=="qualifier")?(be="error","block"):Q.top(T,R,A)},Q.maybeprop=function(T,R,A){return T==":"?B(A,R,"prop"):le(T,R,A)},Q.prop=function(T,R,A){if(T==";")return Y(A);if(T=="{"&&W)return B(A,R,"propBlock");if(T=="}"||T=="{")return pe(T,R,A);if(T=="(")return B(A,R,"parens");if(T=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(R.current()))be+=" error";else if(T=="word")ae(R);else if(T=="interpolation")return B(A,R,"interpolation");return"prop"},Q.propBlock=function(T,R,A){return T=="}"?Y(A):T=="word"?(be="property","maybeprop"):A.context.type},Q.parens=function(T,R,A){return T=="{"||T=="}"?pe(T,R,A):T==")"?Y(A):T=="("?B(A,R,"parens"):T=="interpolation"?B(A,R,"interpolation"):(T=="word"&&ae(R),"parens")},Q.pseudo=function(T,R,A){return T=="meta"?"pseudo":T=="word"?(be="variable-3",A.context.type):le(T,R,A)},Q.documentTypes=function(T,R,A){return T=="word"&&w.hasOwnProperty(R.current())?(be="tag",A.context.type):Q.atBlock(T,R,A)},Q.atBlock=function(T,R,A){if(T=="(")return B(A,R,"atBlock_parens");if(T=="}"||T==";")return pe(T,R,A);if(T=="{")return Y(A)&&B(A,R,W?"block":"top");if(T=="interpolation")return B(A,R,"interpolation");if(T=="word"){var ue=R.current().toLowerCase();ue=="only"||ue=="not"||ue=="and"||ue=="or"?be="keyword":Z.hasOwnProperty(ue)?be="attribute":K.hasOwnProperty(ue)?be="property":se.hasOwnProperty(ue)?be="keyword":_e.hasOwnProperty(ue)?be="property":Ye.hasOwnProperty(ue)?be=oe?"string-2":"property":Ve.hasOwnProperty(ue)?be="atom":Ne.hasOwnProperty(ue)?be="keyword":be="error"}return A.context.type},Q.atComponentBlock=function(T,R,A){return T=="}"?pe(T,R,A):T=="{"?Y(A)&&B(A,R,W?"block":"top",!1):(T=="word"&&(be="error"),A.context.type)},Q.atBlock_parens=function(T,R,A){return T==")"?Y(A):T=="{"||T=="}"?pe(T,R,A,2):Q.atBlock(T,R,A)},Q.restricted_atBlock_before=function(T,R,A){return T=="{"?B(A,R,"restricted_atBlock"):T=="word"&&A.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):le(T,R,A)},Q.restricted_atBlock=function(T,R,A){return T=="}"?(A.stateArg=null,Y(A)):T=="word"?(A.stateArg=="@font-face"&&!nt.hasOwnProperty(R.current().toLowerCase())||A.stateArg=="@counter-style"&&!ct.hasOwnProperty(R.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Q.keyframes=function(T,R,A){return T=="word"?(be="variable","keyframes"):T=="{"?B(A,R,"top"):le(T,R,A)},Q.at=function(T,R,A){return T==";"?Y(A):T=="{"||T=="}"?pe(T,R,A):(T=="word"?be="tag":T=="hash"&&(be="builtin"),"at")},Q.interpolation=function(T,R,A){return T=="}"?Y(A):T=="{"||T==";"?pe(T,R,A):(T=="word"?be="variable":T!="variable"&&T!="("&&T!=")"&&(be="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:We?"block":"top",stateArg:null,context:new D(We?"block":"top",T||0,null)}},token:function(T,R){if(!R.tokenize&&T.eatSpace())return null;var A=(R.tokenize||Le)(T,R);return A&&typeof A=="object"&&(ke=A[1],A=A[0]),be=A,ke!="comment"&&(R.state=Q[R.state](ke,T,R)),be},indent:function(T,R){var A=T.context,ue=R&&R.charAt(0),Se=A.indent;return A.type=="prop"&&(ue=="}"||ue==")")&&(A=A.prev),A.prev&&(ue=="}"&&(A.type=="block"||A.type=="top"||A.type=="interpolation"||A.type=="restricted_atBlock")?(A=A.prev,Se=A.indent):(ue==")"&&(A.type=="parens"||A.type=="atBlock_parens")||ue=="{"&&(A.type=="at"||A.type=="atBlock"))&&(Se=Math.max(0,A.indent-I))),Se},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:G,fold:"brace"}});function u(xe){for(var me={},We=0;We<xe.length;++We)me[xe[We].toLowerCase()]=!0;return me}var c=["domain","regexp","url","url-prefix"],h=u(c),m=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(m),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"],x=u(y),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],P=u(S),_=["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"],N=u(_),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"],V=u(H),X=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],te=u(X),J=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],ne=u(J),he=["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"],Ae=u(he),Fe=["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","button-bevel","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-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","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"],Ke=u(Fe),tt=c.concat(m).concat(y).concat(S).concat(_).concat(H).concat(he).concat(Fe);s.registerHelper("hintWords","css",tt);function Be(xe,me){for(var We=!1,I;(I=xe.next())!=null;){if(We&&I=="/"){me.tokenize=null;break}We=I=="*"}return["comment","comment"]}s.defineMIME("text/css",{documentTypes:h,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,fontProperties:te,counterDescriptors:ne,colorKeywords:Ae,valueKeywords:Ke,tokenHooks:{"/":function(xe,me){return xe.eat("*")?(me.tokenize=Be,Be(xe,me)):!1}},name:"css"}),s.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,colorKeywords:Ae,valueKeywords:Ke,fontProperties:te,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(xe,me){return xe.eat("/")?(xe.skipToEnd(),["comment","comment"]):xe.eat("*")?(me.tokenize=Be,Be(xe,me)):["operator","operator"]},":":function(xe){return xe.match(/^\s*\{/,!1)?[null,null]:!1},$:function(xe){return xe.match(/^[\w-]+/),xe.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(xe){return xe.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),s.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,colorKeywords:Ae,valueKeywords:Ke,fontProperties:te,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(xe,me){return xe.eat("/")?(xe.skipToEnd(),["comment","comment"]):xe.eat("*")?(me.tokenize=Be,Be(xe,me)):["operator","operator"]},"@":function(xe){return xe.eat("{")?[null,"interpolation"]:xe.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(xe.eatWhile(/[\w\\\-]/),xe.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),s.defineMIME("text/x-gss",{documentTypes:h,mediaTypes:b,mediaFeatures:x,propertyKeywords:N,nonStandardPropertyKeywords:V,fontProperties:te,counterDescriptors:ne,colorKeywords:Ae,valueKeywords:Ke,supportsAtComponent:!0,tokenHooks:{"/":function(xe,me){return xe.eat("*")?(me.tokenize=Be,Be(xe,me)):!1}},name:"css",helperType:"gss"})})})();var Pd={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){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},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};s.defineMode("xml",function(h,m){var b=h.indentUnit,y={},x=m.htmlMode?u:c;for(var S in x)y[S]=x[S];for(var S in m)y[S]=m[S];var P,_;function N(w,Z){function K(Ye){return Z.tokenize=Ye,Ye(w,Z)}var se=w.next();if(se=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?K(X("atom","]]>")):null:w.match("--")?K(X("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),K(te(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),Z.tokenize=X("meta","?>"),"meta"):(P=w.eat("/")?"closeTag":"openTag",Z.tokenize=H,"tag bracket");if(se=="&"){var _e;return w.eat("#")?w.eat("x")?_e=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):_e=w.eatWhile(/[\d]/)&&w.eat(";"):_e=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),_e?"atom":"error"}else return w.eatWhile(/[^&<]/),null}N.isInText=!0;function H(w,Z){var K=w.next();if(K==">"||K=="/"&&w.eat(">"))return Z.tokenize=N,P=K==">"?"endTag":"selfcloseTag","tag bracket";if(K=="=")return P="equals",null;if(K=="<"){Z.tokenize=N,Z.state=Fe,Z.tagName=Z.tagStart=null;var se=Z.tokenize(w,Z);return se?se+" tag error":"tag error"}else return/[\'\"]/.test(K)?(Z.tokenize=V(K),Z.stringStartCol=w.column(),Z.tokenize(w,Z)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function V(w){var Z=function(K,se){for(;!K.eol();)if(K.next()==w){se.tokenize=H;break}return"string"};return Z.isInAttribute=!0,Z}function X(w,Z){return function(K,se){for(;!K.eol();){if(K.match(Z)){se.tokenize=N;break}K.next()}return w}}function te(w){return function(Z,K){for(var se;(se=Z.next())!=null;){if(se=="<")return K.tokenize=te(w+1),K.tokenize(Z,K);if(se==">")if(w==1){K.tokenize=N;break}else return K.tokenize=te(w-1),K.tokenize(Z,K)}return"meta"}}function J(w){return w&&w.toLowerCase()}function ne(w,Z,K){this.prev=w.context,this.tagName=Z||"",this.indent=w.indented,this.startOfLine=K,(y.doNotIndent.hasOwnProperty(Z)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function he(w){w.context&&(w.context=w.context.prev)}function Ae(w,Z){for(var K;;){if(!w.context||(K=w.context.tagName,!y.contextGrabbers.hasOwnProperty(J(K))||!y.contextGrabbers[J(K)].hasOwnProperty(J(Z))))return;he(w)}}function Fe(w,Z,K){return w=="openTag"?(K.tagStart=Z.column(),Ke):w=="closeTag"?tt:Fe}function Ke(w,Z,K){return w=="word"?(K.tagName=Z.current(),_="tag",me):y.allowMissingTagName&&w=="endTag"?(_="tag bracket",me(w,Z,K)):(_="error",Ke)}function tt(w,Z,K){if(w=="word"){var se=Z.current();return K.context&&K.context.tagName!=se&&y.implicitlyClosed.hasOwnProperty(J(K.context.tagName))&&he(K),K.context&&K.context.tagName==se||y.matchClosing===!1?(_="tag",Be):(_="tag error",xe)}else return y.allowMissingTagName&&w=="endTag"?(_="tag bracket",Be(w,Z,K)):(_="error",xe)}function Be(w,Z,K){return w!="endTag"?(_="error",Be):(he(K),Fe)}function xe(w,Z,K){return _="error",Be(w,Z,K)}function me(w,Z,K){if(w=="word")return _="attribute",We;if(w=="endTag"||w=="selfcloseTag"){var se=K.tagName,_e=K.tagStart;return K.tagName=K.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(J(se))?Ae(K,se):(Ae(K,se),K.context=new ne(K,se,_e==K.indented)),Fe}return _="error",me}function We(w,Z,K){return w=="equals"?I:(y.allowMissing||(_="error"),me(w,Z,K))}function I(w,Z,K){return w=="string"?U:w=="word"&&y.allowUnquoted?(_="string",me):(_="error",me(w,Z,K))}function U(w,Z,K){return w=="string"?U:me(w,Z,K)}return{startState:function(w){var Z={tokenize:N,state:Fe,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(Z.baseIndent=w),Z},token:function(w,Z){if(!Z.tagName&&w.sol()&&(Z.indented=w.indentation()),w.eatSpace())return null;P=null;var K=Z.tokenize(w,Z);return(K||P)&&K!="comment"&&(_=null,Z.state=Z.state(P||K,w,Z),_&&(K=_=="error"?K+" error":_)),K},indent:function(w,Z,K){var se=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(se&&se.noIndent)return s.Pass;if(w.tokenize!=H&&w.tokenize!=N)return K?K.match(/^(\s*)/)[0].length:0;if(w.tagName)return y.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(Z))return 0;var _e=Z&&/^<(\/)?([\w_:\.-]*)/.exec(Z);if(_e&&_e[1])for(;se;)if(se.tagName==_e[2]){se=se.prev;break}else if(y.implicitlyClosed.hasOwnProperty(J(se.tagName)))se=se.prev;else break;else if(_e)for(;se;){var Ye=y.contextGrabbers[J(se.tagName)];if(Ye&&Ye.hasOwnProperty(J(_e[2])))se=se.prev;else break}for(;se&&se.prev&&!se.startOfLine;)se=se.prev;return se?se.indent+b:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(w){w.state==I&&(w.state=me)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var Z=[],K=w.context;K;K=K.prev)Z.push(K.tagName);return Z.reverse()}}}),s.defineMIME("text/xml","xml"),s.defineMIME("application/xml","xml"),s.mimeModes.hasOwnProperty("text/html")||s.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,l){(function(s){s(fn.exports,Pd.exports,Md.exports,ty.exports)})(function(s){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 c(P,_,N){var H=P.current(),V=H.search(_);return V>-1?P.backUp(H.length-V):H.match(/<\/?$/)&&(P.backUp(H.length),P.match(_,!1)||P.match(H)),N}var h={};function m(P){var _=h[P];return _||(h[P]=new RegExp("\\s+"+P+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(P,_){var N=P.match(m(_));return N?/^\s*(.*?)\s*$/.exec(N[2])[1]:""}function y(P,_){return new RegExp((_?"^":"")+"</\\s*"+P+"\\s*>","i")}function x(P,_){for(var N in P)for(var H=_[N]||(_[N]=[]),V=P[N],X=V.length-1;X>=0;X--)H.unshift(V[X])}function S(P,_){for(var N=0;N<P.length;N++){var H=P[N];if(!H[0]||H[1].test(b(_,H[0])))return H[2]}}s.defineMode("htmlmixed",function(P,_){var N=s.getMode(P,{name:"xml",htmlMode:!0,multilineTagIndentFactor:_.multilineTagIndentFactor,multilineTagIndentPastTag:_.multilineTagIndentPastTag,allowMissingTagName:_.allowMissingTagName}),H={},V=_&&_.tags,X=_&&_.scriptTypes;if(x(u,H),V&&x(V,H),X)for(var te=X.length-1;te>=0;te--)H.script.unshift(["type",X[te].matches,X[te].mode]);function J(ne,he){var Ae=N.token(ne,he.htmlState),Fe=/\btag\b/.test(Ae),Ke;if(Fe&&!/[<>\s\/]/.test(ne.current())&&(Ke=he.htmlState.tagName&&he.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(Ke))he.inTag=Ke+" ";else if(he.inTag&&Fe&&/>$/.test(ne.current())){var tt=/^([\S]+) (.*)/.exec(he.inTag);he.inTag=null;var Be=ne.current()==">"&&S(H[tt[1]],tt[2]),xe=s.getMode(P,Be),me=y(tt[1],!0),We=y(tt[1],!1);he.token=function(I,U){return I.match(me,!1)?(U.token=J,U.localState=U.localMode=null,null):c(I,We,U.localMode.token(I,U.localState))},he.localMode=xe,he.localState=s.startState(xe,N.indent(he.htmlState,"",""))}else he.inTag&&(he.inTag+=ne.current(),ne.eol()&&(he.inTag+=" "));return Ae}return{startState:function(){var ne=s.startState(N);return{token:J,inTag:null,localMode:null,localState:null,htmlState:ne}},copyState:function(ne){var he;return ne.localState&&(he=s.copyState(ne.localMode,ne.localState)),{token:ne.token,inTag:ne.inTag,localMode:ne.localMode,localState:he,htmlState:s.copyState(N,ne.htmlState)}},token:function(ne,he){return he.token(ne,he)},indent:function(ne,he,Ae){return!ne.localMode||/^\s*<\//.test(he)?N.indent(ne.htmlState,he,Ae):ne.localMode.indent?ne.localMode.indent(ne.localState,he,Ae):s.Pass},innerMode:function(ne){return{state:ne.localState||ne.htmlState,mode:ne.localMode||N}}}},"xml","javascript","css"),s.defineMIME("text/html","htmlmixed")})})();(function(r,l){(function(s){s(fn.exports,Pd.exports,Md.exports)})(function(s){function u(h,m,b,y){this.state=h,this.mode=m,this.depth=b,this.prev=y}function c(h){return new u(s.copyState(h.mode,h.state),h.mode,h.depth,h.prev&&c(h.prev))}s.defineMode("jsx",function(h,m){var b=s.getMode(h,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=s.getMode(h,m&&m.base||"javascript");function x(N){var H=N.tagName;N.tagName=null;var V=b.indent(N,"","");return N.tagName=H,V}function S(N,H){return H.context.mode==b?P(N,H,H.context):_(N,H,H.context)}function P(N,H,V){if(V.depth==2)return N.match(/^.*?\*\//)?V.depth=1:N.skipToEnd(),"comment";if(N.peek()=="{"){b.skipAttribute(V.state);var X=x(V.state),te=V.state.context;if(te&&N.match(/^[^>]*>\s*$/,!1)){for(;te.prev&&!te.startOfLine;)te=te.prev;te.startOfLine?X-=h.indentUnit:V.prev.state.lexical&&(X=V.prev.state.lexical.indented)}else V.depth==1&&(X+=h.indentUnit);return H.context=new u(s.startState(y,X),y,0,H.context),null}if(V.depth==1){if(N.peek()=="<")return b.skipAttribute(V.state),H.context=new u(s.startState(b,x(V.state)),b,0,H.context),null;if(N.match("//"))return N.skipToEnd(),"comment";if(N.match("/*"))return V.depth=2,S(N,H)}var J=b.token(N,V.state),ne=N.current(),he;return/\btag\b/.test(J)?/>$/.test(ne)?V.state.context?V.depth=0:H.context=H.context.prev:/^</.test(ne)&&(V.depth=1):!J&&(he=ne.indexOf("{"))>-1&&N.backUp(ne.length-he),J}function _(N,H,V){if(N.peek()=="<"&&y.expressionAllowed(N,V.state))return H.context=new u(s.startState(b,y.indent(V.state,"","")),b,0,H.context),y.skipExpression(V.state),null;var X=y.token(N,V.state);if(!X&&V.depth!=null){var te=N.current();te=="{"?V.depth++:te=="}"&&--V.depth==0&&(H.context=H.context.prev)}return X}return{startState:function(){return{context:new u(s.startState(y),y)}},copyState:function(N){return{context:c(N.context)}},token:S,indent:function(N,H,V){return N.context.mode.indent(N.context.state,H,V)},innerMode:function(N){return N.context}}},"xml","javascript"),s.defineMIME("text/jsx","jsx"),s.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineOption("placeholder","",function(x,S,P){var _=P&&P!=s.Init;if(S&&!_)x.on("blur",m),x.on("change",b),x.on("swapDoc",b),s.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){h(x)}),b(x);else if(!S&&_){x.off("blur",m),x.off("change",b),x.off("swapDoc",b),s.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var N=x.getWrapperElement();N.className=N.className.replace(" CodeMirror-empty","")}S&&!x.hasFocus()&&m(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function c(x){u(x);var S=x.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=x.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var P=x.getOption("placeholder");typeof P=="string"&&(P=document.createTextNode(P)),S.appendChild(P),x.display.lineSpace.insertBefore(S,x.display.lineSpace.firstChild)}function h(x){setTimeout(function(){var S=!1;if(x.lineCount()==1){var P=x.getInputField();S=P.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(P.querySelector(".CodeMirror-line").textContent)}S?c(x):u(x)},20)}function m(x){y(x)&&c(x)}function b(x){var S=x.getWrapperElement(),P=y(x);S.className=S.className.replace(" CodeMirror-empty","")+(P?" CodeMirror-empty":""),P?c(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();/*!
25
- * vue-router v4.0.13
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=O,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function z(){if(o.selectionStart!=null){var $=i.somethingSelected(),ie="\u200B"+($?o.value:"");o.value="\u21DA",o.value=ie,t.prevInput=$?"":"\u200B",o.selectionStart=1,o.selectionEnd=ie.length,n.selForContextMenu=i.doc.sel}}function O(){if(t.contextMenuPending==O&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=f),o.selectionStart!=null)){(!y||y&&x<9)&&z();var $=0,ie=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?bt(i,Ru)(i):$++<10?n.detectingSelectAll=setTimeout(ie,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ie,200)}}if(y&&x>=9&&z(),Be){cn(e);var F=function(){Ze(window,"mouseup",F),setTimeout(O,20)};Ce(window,"mouseup",F)}else setTimeout(O,50)},ft.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ft.prototype.setUneditable=function(){},ft.prototype.needsContentAttribute=!1;function Ip(e,t){if(t=t?Ne(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=se();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=d.getValue()}var o;if(e.form&&(Ce(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var f=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=f}}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&&(Ze(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var d=it(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return d}function Fp(e){e.off=Ze,e.on=Ce,e.wheelEventPixels=qh,e.Doc=It,e.splitLines=mi,e.countColumn=Ve,e.findColumn=Le,e.isWordChar=Q,e.Pass=oe,e.signal=Te,e.Line=Dn,e.changeEnd=Yr,e.scrollbarModel=du,e.Pos=ee,e.cmpPos=v,e.modes=ir,e.mimeModes=Jt,e.resolveMode=An,e.getMode=Nn,e.modeExtensions=sr,e.extendMode=ar,e.copyState=Qt,e.startState=wi,e.innerMode=bi,e.commands=qi,e.keyMap=Dr,e.keyName=Qu,e.isModifierKey=Zu,e.lookupKey=$n,e.normalizeKeyMap=hp,e.StringStream=at,e.SharedTextMarker=Ui,e.TextMarker=Xr,e.LineWidget=Bi,e.e_preventDefault=Pt,e.e_stopPropagation=En,e.e_stop=cn,e.addClass=_e,e.contains=K,e.rmClass=me,e.keyNames=Zr}_p(it),Np(it);var Hp="iter insert remove copy getEditor constructor".split(" ");for(var $o in It.prototype)It.prototype.hasOwnProperty($o)&&G(Hp,$o)<0&&(it.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}(It.prototype[$o]));return mr(It),it.inputStyles={textarea:ft,contenteditable:$e},it.defineMode=function(e){!it.defaults.mode&&e!="null"&&(it.defaults.mode=e),bo.apply(this,arguments)},it.defineMIME=Or,it.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),it.defineMIME("text/plain","null"),it.defineExtension=function(e,t){it.prototype[e]=t},it.defineDocExtension=function(e,t){It.prototype[e]=t},it.fromTextArea=Ip,Fp(it),it.version="5.65.2",it})})(fn);var M0=fn.exports,Md={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineMode("javascript",function(u,c){var h=u.indentUnit,m=c.statementIndent,b=c.jsonld,y=c.json||b,x=c.trackScope!==!1,S=c.typescript,P=c.wordCharacters||/[\w$\xa1-\uffff]/,_=function(){function v(_t){return{type:_t,style:"keyword"}}var L=v("keyword a"),q=v("keyword b"),re=v("keyword c"),Oe=v("keyword d"),Ue=v("operator"),ve={type:"atom",style:"atom"};return{if:v("if"),while:L,with:L,else:q,do:q,try:q,finally:q,return:Oe,break:Oe,continue:Oe,new:v("new"),delete:re,void:re,throw:re,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:Ue,typeof:Ue,instanceof:Ue,true:ve,false:ve,null:ve,undefined:ve,NaN:ve,Infinity:ve,this:v("this"),class:v("class"),super:v("atom"),yield:re,export:v("export"),import:v("import"),extends:re,await:re}}(),N=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(v){for(var L=!1,q,re=!1;(q=v.next())!=null;){if(!L){if(q=="/"&&!re)return;q=="["?re=!0:re&&q=="]"&&(re=!1)}L=!L&&q=="\\"}}var X,te;function J(v,L,q){return X=v,te=q,L}function ne(v,L){var q=v.next();if(q=='"'||q=="'")return L.tokenize=he(q),L.tokenize(v,L);if(q=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return J("number","number");if(q=="."&&v.match(".."))return J("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(q))return J(q);if(q=="="&&v.eat(">"))return J("=>","operator");if(q=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return J("number","number");if(/\d/.test(q))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),J("number","number");if(q=="/")return v.eat("*")?(L.tokenize=Ae,Ae(v,L)):v.eat("/")?(v.skipToEnd(),J("comment","comment")):ee(v,L,1)?(V(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),J("regexp","string-2")):(v.eat("="),J("operator","operator",v.current()));if(q=="`")return L.tokenize=Fe,Fe(v,L);if(q=="#"&&v.peek()=="!")return v.skipToEnd(),J("meta","meta");if(q=="#"&&v.eatWhile(P))return J("variable","property");if(q=="<"&&v.match("!--")||q=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),J("comment","comment");if(N.test(q))return(q!=">"||!L.lexical||L.lexical.type!=">")&&(v.eat("=")?(q=="!"||q=="=")&&v.eat("="):/[<>*+\-|&?]/.test(q)&&(v.eat(q),q==">"&&v.eat(q))),q=="?"&&v.eat(".")?J("."):J("operator","operator",v.current());if(P.test(q)){v.eatWhile(P);var re=v.current();if(L.lastType!="."){if(_.propertyIsEnumerable(re)){var Oe=_[re];return J(Oe.type,Oe.style,re)}if(re=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return J("async","keyword",re)}return J("variable","variable",re)}}function he(v){return function(L,q){var re=!1,Oe;if(b&&L.peek()=="@"&&L.match(H))return q.tokenize=ne,J("jsonld-keyword","meta");for(;(Oe=L.next())!=null&&!(Oe==v&&!re);)re=!re&&Oe=="\\";return re||(q.tokenize=ne),J("string","string")}}function Ae(v,L){for(var q=!1,re;re=v.next();){if(re=="/"&&q){L.tokenize=ne;break}q=re=="*"}return J("comment","comment")}function Fe(v,L){for(var q=!1,re;(re=v.next())!=null;){if(!q&&(re=="`"||re=="$"&&v.eat("{"))){L.tokenize=ne;break}q=!q&&re=="\\"}return J("quasi","string-2",v.current())}var Ke="([{}])";function tt(v,L){L.fatArrowAt&&(L.fatArrowAt=null);var q=v.string.indexOf("=>",v.start);if(!(q<0)){if(S){var re=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,q));re&&(q=re.index)}for(var Oe=0,Ue=!1,ve=q-1;ve>=0;--ve){var _t=v.string.charAt(ve),Vt=Ke.indexOf(_t);if(Vt>=0&&Vt<3){if(!Oe){++ve;break}if(--Oe==0){_t=="("&&(Ue=!0);break}}else if(Vt>=3&&Vt<6)++Oe;else if(P.test(_t))Ue=!0;else if(/["'\/`]/.test(_t))for(;;--ve){if(ve==0)return;var zn=v.string.charAt(ve-1);if(zn==_t&&v.string.charAt(ve-2)!="\\"){ve--;break}}else if(Ue&&!Oe){++ve;break}}Ue&&!Oe&&(L.fatArrowAt=ve)}}var Be={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function xe(v,L,q,re,Oe,Ue){this.indented=v,this.column=L,this.type=q,this.prev=Oe,this.info=Ue,re!=null&&(this.align=re)}function me(v,L){if(!x)return!1;for(var q=v.localVars;q;q=q.next)if(q.name==L)return!0;for(var re=v.context;re;re=re.prev)for(var q=re.vars;q;q=q.next)if(q.name==L)return!0}function We(v,L,q,re,Oe){var Ue=v.cc;for(I.state=v,I.stream=Oe,I.marked=null,I.cc=Ue,I.style=L,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var ve=Ue.length?Ue.pop():y?fe:ke;if(ve(q,re)){for(;Ue.length&&Ue[Ue.length-1].lex;)Ue.pop()();return I.marked?I.marked:q=="variable"&&me(v,re)?"variable-2":L}}}var I={state:null,column:null,marked:null,cc:null};function U(){for(var v=arguments.length-1;v>=0;v--)I.cc.push(arguments[v])}function w(){return U.apply(null,arguments),!0}function Z(v,L){for(var q=L;q;q=q.next)if(q.name==v)return!0;return!1}function K(v){var L=I.state;if(I.marked="def",!!x){if(L.context){if(L.lexical.info=="var"&&L.context&&L.context.block){var q=se(v,L.context);if(q!=null){L.context=q;return}}else if(!Z(v,L.localVars)){L.localVars=new nt(v,L.localVars);return}}c.globalVars&&!Z(v,L.globalVars)&&(L.globalVars=new nt(v,L.globalVars))}}function se(v,L){if(L)if(L.block){var q=se(v,L.prev);return q?q==L.prev?L:new Ye(q,L.vars,!0):null}else return Z(v,L.vars)?L:new Ye(L.prev,new nt(v,L.vars),!1);else return null}function _e(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function Ye(v,L,q){this.prev=v,this.vars=L,this.block=q}function nt(v,L){this.name=v,this.next=L}var ct=new nt("this",new nt("arguments",null));function Ne(){I.state.context=new Ye(I.state.context,I.state.localVars,!1),I.state.localVars=ct}function Ve(){I.state.context=new Ye(I.state.context,I.state.localVars,!0),I.state.localVars=null}Ne.lex=Ve.lex=!0;function W(){I.state.localVars=I.state.context.vars,I.state.context=I.state.context.prev}W.lex=!0;function G(v,L){var q=function(){var re=I.state,Oe=re.indented;if(re.lexical.type=="stat")Oe=re.lexical.indented;else for(var Ue=re.lexical;Ue&&Ue.type==")"&&Ue.align;Ue=Ue.prev)Oe=Ue.indented;re.lexical=new xe(Oe,I.stream.column(),v,null,re.lexical,L)};return q.lex=!0,q}function j(){var v=I.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}j.lex=!0;function oe(v){function L(q){return q==v?w():v==";"||q=="}"||q==")"||q=="]"?U():w(L)}return L}function ke(v,L){return v=="var"?w(G("vardef",L),gi,oe(";"),j):v=="keyword a"?w(G("form"),M,ke,j):v=="keyword b"?w(G("form"),ke,j):v=="keyword d"?I.stream.match(/^\s*$/,!1)?w():w(G("stat"),D,oe(";"),j):v=="debugger"?w(oe(";")):v=="{"?w(G("}"),Ve,dt,j,W):v==";"?w():v=="if"?(I.state.lexical.info=="else"&&I.state.cc[I.state.cc.length-1]==j&&I.state.cc.pop()(),w(G("form"),M,ke,j,mo)):v=="function"?w(ir):v=="for"?w(G("form"),Ve,yo,ke,W,j):v=="class"||S&&L=="interface"?(I.marked="keyword",w(G("form",v=="class"?v:L),Nn,j)):v=="variable"?S&&L=="declare"?(I.marked="keyword",w(ke)):S&&(L=="module"||L=="enum"||L=="type")&&I.stream.match(/^\s*\w/,!1)?(I.marked="keyword",L=="enum"?w(wr):L=="type"?w(bo,oe("operator"),Te,oe(";")):w(G("form"),Dt,oe("{"),G("}"),dt,j,j)):S&&L=="namespace"?(I.marked="keyword",w(G("form"),fe,ke,j)):S&&L=="abstract"?(I.marked="keyword",w(ke)):w(G("stat"),ue):v=="switch"?w(G("form"),M,oe("{"),G("}","switch"),Ve,dt,j,j,W):v=="case"?w(fe,oe(":")):v=="default"?w(oe(":")):v=="catch"?w(G("form"),Ne,be,ke,j,W):v=="export"?w(G("stat"),bi,j):v=="import"?w(G("stat"),at,j):v=="async"?w(ke):L=="@"?w(fe,ke):U(G("stat"),fe,oe(";"),j)}function be(v){if(v=="(")return w(Or,oe(")"))}function fe(v,L){return E(v,L,!1)}function Le(v,L){return E(v,L,!0)}function M(v){return v!="("?U():w(G(")"),D,oe(")"),j)}function E(v,L,q){if(I.state.fatArrowAt==I.stream.start){var re=q?Q:ae;if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,oe("=>"),re,W);if(v=="variable")return U(Ne,Dt,oe("=>"),re,W)}var Oe=q?Y:B;return Be.hasOwnProperty(v)?w(Oe):v=="function"?w(ir,Oe):v=="class"||S&&L=="interface"?(I.marked="keyword",w(G("form"),An,j)):v=="keyword c"||v=="async"?w(q?Le:fe):v=="("?w(G(")"),D,oe(")"),j,Oe):v=="operator"||v=="spread"?w(q?Le:fe):v=="["?w(G("]"),je,j,Oe):v=="{"?mt(ze,"}",null,Oe):v=="quasi"?U(le,Oe):v=="new"?w(T(q)):w()}function D(v){return v.match(/[;\}\)\],]/)?U():U(fe)}function B(v,L){return v==","?w(D):Y(v,L,!1)}function Y(v,L,q){var re=q==!1?B:Y,Oe=q==!1?fe:Le;if(v=="=>")return w(Ne,q?Q:ae,W);if(v=="operator")return/\+\+|--/.test(L)||S&&L=="!"?w(re):S&&L=="<"&&I.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(G(">"),Ee(Te,">"),j,re):L=="?"?w(fe,oe(":"),Oe):w(Oe);if(v=="quasi")return U(le,re);if(v!=";"){if(v=="(")return mt(Le,")","call",re);if(v==".")return w(Se,re);if(v=="[")return w(G("]"),D,oe("]"),j,re);if(S&&L=="as")return I.marked="keyword",w(Te,re);if(v=="regexp")return I.state.lastType=I.marked="operator",I.stream.backUp(I.stream.pos-I.stream.start-1),w(Oe)}}function le(v,L){return v!="quasi"?U():L.slice(L.length-2)!="${"?w(le):w(D,pe)}function pe(v){if(v=="}")return I.marked="string-2",I.state.tokenize=Fe,w(le)}function ae(v){return tt(I.stream,I.state),U(v=="{"?ke:fe)}function Q(v){return tt(I.stream,I.state),U(v=="{"?ke:Le)}function T(v){return function(L){return L=="."?w(v?A:R):L=="variable"&&S?w(cn,v?Y:B):U(v?Le:fe)}}function R(v,L){if(L=="target")return I.marked="keyword",w(B)}function A(v,L){if(L=="target")return I.marked="keyword",w(Y)}function ue(v){return v==":"?w(j,ke):U(B,oe(";"),j)}function Se(v){if(v=="variable")return I.marked="property",w()}function ze(v,L){if(v=="async")return I.marked="property",w(ze);if(v=="variable"||I.style=="keyword"){if(I.marked="property",L=="get"||L=="set")return w(Je);var q;return S&&I.state.fatArrowAt==I.stream.start&&(q=I.stream.match(/^\s*:\s*/,!1))&&(I.state.fatArrowAt=I.stream.pos+q[0].length),w(Ie)}else{if(v=="number"||v=="string")return I.marked=b?"property":I.style+" property",w(Ie);if(v=="jsonld-keyword")return w(Ie);if(S&&_e(L))return I.marked="keyword",w(ze);if(v=="[")return w(fe,nr,oe("]"),Ie);if(v=="spread")return w(Le,Ie);if(L=="*")return I.marked="keyword",w(ze);if(v==":")return U(Ie)}}function Je(v){return v!="variable"?U(Ie):(I.marked="property",w(ir))}function Ie(v){if(v==":")return w(Le);if(v=="(")return U(ir)}function Ee(v,L,q){function re(Oe,Ue){if(q?q.indexOf(Oe)>-1:Oe==","){var ve=I.state.lexical;return ve.info=="call"&&(ve.pos=(ve.pos||0)+1),w(function(_t,Vt){return _t==L||Vt==L?U():U(v)},re)}return Oe==L||Ue==L?w():q&&q.indexOf(";")>-1?U(v):w(oe(L))}return function(Oe,Ue){return Oe==L||Ue==L?w():U(v,re)}}function mt(v,L,q){for(var re=3;re<arguments.length;re++)I.cc.push(arguments[re]);return w(G(L,q),Ee(v,L),j)}function dt(v){return v=="}"?w():U(ke,dt)}function nr(v,L){if(S){if(v==":")return w(Te);if(L=="?")return w(nr)}}function Ce(v,L){if(S&&(v==":"||L=="in"))return w(Te)}function _r(v){if(S&&v==":")return I.stream.match(/^\s*\w+\s+is\b/,!1)?w(fe,Ze,Te):w(Te)}function Ze(v,L){if(L=="is")return I.marked="keyword",w()}function Te(v,L){if(L=="keyof"||L=="typeof"||L=="infer"||L=="readonly")return I.marked="keyword",w(L=="typeof"?Le:Te);if(v=="variable"||L=="void")return I.marked="type",w(Zt);if(L=="|"||L=="&")return w(Te);if(v=="string"||v=="number"||v=="atom")return w(Zt);if(v=="[")return w(G("]"),Ee(Te,"]",","),j,Zt);if(v=="{")return w(G("}"),On,j,Zt);if(v=="(")return w(Ee(En,")"),lt,Zt);if(v=="<")return w(Ee(Te,">"),Te);if(v=="quasi")return U(mr,Zt)}function lt(v){if(v=="=>")return w(Te)}function On(v){return v.match(/[\}\)\]]/)?w():v==","||v==";"?w(On):U(Ct,On)}function Ct(v,L){if(v=="variable"||I.style=="keyword")return I.marked="property",w(Ct);if(L=="?"||v=="number"||v=="string")return w(Ct);if(v==":")return w(Te);if(v=="[")return w(oe("variable"),Ce,oe("]"),Ct);if(v=="(")return U(Jt,Ct);if(!v.match(/[;\}\)\],]/))return w()}function mr(v,L){return v!="quasi"?U():L.slice(L.length-2)!="${"?w(mr):w(Te,Pt)}function Pt(v){if(v=="}")return I.marked="string-2",I.state.tokenize=Fe,w(mr)}function En(v,L){return v=="variable"&&I.stream.match(/^\s*[?:]/,!1)||L=="?"?w(En):v==":"?w(Te):v=="spread"?w(En):U(Te)}function Zt(v,L){if(L=="<")return w(G(">"),Ee(Te,">"),j,Zt);if(L=="|"||v=="."||L=="&")return w(Te);if(v=="[")return w(Te,oe("]"),Zt);if(L=="extends"||L=="implements")return I.marked="keyword",w(Te);if(L=="?")return w(Te,oe(":"),Te)}function cn(v,L){if(L=="<")return w(G(">"),Ee(Te,">"),j,Zt)}function Br(){return U(Te,go)}function go(v,L){if(L=="=")return w(Te)}function gi(v,L){return L=="enum"?(I.marked="keyword",w(wr)):U(Dt,nr,yr,mi)}function Dt(v,L){if(S&&_e(L))return I.marked="keyword",w(Dt);if(v=="variable")return K(L),w();if(v=="spread")return w(Dt);if(v=="[")return mt(vi,"]");if(v=="{")return mt(vo,"}")}function vo(v,L){return v=="variable"&&!I.stream.match(/^\s*:/,!1)?(K(L),w(yr)):(v=="variable"&&(I.marked="property"),v=="spread"?w(Dt):v=="}"?U():v=="["?w(fe,oe("]"),oe(":"),vo):w(oe(":"),Dt,yr))}function vi(){return U(Dt,yr)}function yr(v,L){if(L=="=")return w(Le)}function mi(v){if(v==",")return w(gi)}function mo(v,L){if(v=="keyword b"&&L=="else")return w(G("form","else"),ke,j)}function yo(v,L){if(L=="await")return w(yo);if(v=="(")return w(G(")"),yi,j)}function yi(v){return v=="var"?w(gi,Ur):v=="variable"?w(Ur):U(Ur)}function Ur(v,L){return v==")"?w():v==";"?w(Ur):L=="in"||L=="of"?(I.marked="keyword",w(fe,Ur)):U(fe,Ur)}function ir(v,L){if(L=="*")return I.marked="keyword",w(ir);if(v=="variable")return K(L),w(ir);if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,_r,ke,W);if(S&&L=="<")return w(G(">"),Ee(Br,">"),j,ir)}function Jt(v,L){if(L=="*")return I.marked="keyword",w(Jt);if(v=="variable")return K(L),w(Jt);if(v=="(")return w(Ne,G(")"),Ee(Or,")"),j,_r,W);if(S&&L=="<")return w(G(">"),Ee(Br,">"),j,Jt)}function bo(v,L){if(v=="keyword"||v=="variable")return I.marked="type",w(bo);if(L=="<")return w(G(">"),Ee(Br,">"),j)}function Or(v,L){return L=="@"&&w(fe,Or),v=="spread"?w(Or):S&&_e(L)?(I.marked="keyword",w(Or)):S&&v=="this"?w(nr,yr):U(Dt,nr,yr)}function An(v,L){return v=="variable"?Nn(v,L):sr(v,L)}function Nn(v,L){if(v=="variable")return K(L),w(sr)}function sr(v,L){if(L=="<")return w(G(">"),Ee(Br,">"),j,sr);if(L=="extends"||L=="implements"||S&&v==",")return L=="implements"&&(I.marked="keyword"),w(S?Te:fe,sr);if(v=="{")return w(G("}"),ar,j)}function ar(v,L){if(v=="async"||v=="variable"&&(L=="static"||L=="get"||L=="set"||S&&_e(L))&&I.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return I.marked="keyword",w(ar);if(v=="variable"||I.style=="keyword")return I.marked="property",w(Qt,ar);if(v=="number"||v=="string")return w(Qt,ar);if(v=="[")return w(fe,nr,oe("]"),Qt,ar);if(L=="*")return I.marked="keyword",w(ar);if(S&&v=="(")return U(Jt,ar);if(v==";"||v==",")return w(ar);if(v=="}")return w();if(L=="@")return w(fe,ar)}function Qt(v,L){if(L=="!"||L=="?")return w(Qt);if(v==":")return w(Te,yr);if(L=="=")return w(Le);var q=I.state.lexical.prev,re=q&&q.info=="interface";return U(re?Jt:ir)}function bi(v,L){return L=="*"?(I.marked="keyword",w(Kt,oe(";"))):L=="default"?(I.marked="keyword",w(fe,oe(";"))):v=="{"?w(Ee(wi,"}"),Kt,oe(";")):U(ke)}function wi(v,L){if(L=="as")return I.marked="keyword",w(oe("variable"));if(v=="variable")return U(Le,wi)}function at(v){return v=="string"?w():v=="("?U(fe):v=="."?U(B):U(we,br,Kt)}function we(v,L){return v=="{"?mt(we,"}"):(v=="variable"&&K(L),L=="*"&&(I.marked="keyword"),w(xi))}function br(v){if(v==",")return w(we,br)}function xi(v,L){if(L=="as")return I.marked="keyword",w(we)}function Kt(v,L){if(L=="from")return I.marked="keyword",w(fe)}function je(v){return v=="]"?w():U(Ee(Le,"]"))}function wr(){return U(G("form"),Dt,oe("{"),G("}"),Ee(dn,"}"),j,j)}function dn(){return U(Dt,yr)}function ki(v,L){return v.lastType=="operator"||v.lastType==","||N.test(L.charAt(0))||/[,.]/.test(L.charAt(0))}function ee(v,L,q){return L.tokenize==ne&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(L.lastType)||L.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-(q||0)))}return{startState:function(v){var L={tokenize:ne,lastType:"sof",cc:[],lexical:new xe((v||0)-h,0,"block",!1),localVars:c.localVars,context:c.localVars&&new Ye(null,null,!1),indented:v||0};return c.globalVars&&typeof c.globalVars=="object"&&(L.globalVars=c.globalVars),L},token:function(v,L){if(v.sol()&&(L.lexical.hasOwnProperty("align")||(L.lexical.align=!1),L.indented=v.indentation(),tt(v,L)),L.tokenize!=Ae&&v.eatSpace())return null;var q=L.tokenize(v,L);return X=="comment"?q:(L.lastType=X=="operator"&&(te=="++"||te=="--")?"incdec":X,We(L,q,X,te,v))},indent:function(v,L){if(v.tokenize==Ae||v.tokenize==Fe)return s.Pass;if(v.tokenize!=ne)return 0;var q=L&&L.charAt(0),re=v.lexical,Oe;if(!/^\s*else\b/.test(L))for(var Ue=v.cc.length-1;Ue>=0;--Ue){var ve=v.cc[Ue];if(ve==j)re=re.prev;else if(ve!=mo&&ve!=W)break}for(;(re.type=="stat"||re.type=="form")&&(q=="}"||(Oe=v.cc[v.cc.length-1])&&(Oe==B||Oe==Y)&&!/^[,\.=+\-*:?[\(]/.test(L));)re=re.prev;m&&re.type==")"&&re.prev.type=="stat"&&(re=re.prev);var _t=re.type,Vt=q==_t;return _t=="vardef"?re.indented+(v.lastType=="operator"||v.lastType==","?re.info.length+1:0):_t=="form"&&q=="{"?re.indented:_t=="form"?re.indented+h:_t=="stat"?re.indented+(ki(v,L)?m||h:0):re.info=="switch"&&!Vt&&c.doubleIndentSwitch!=!1?re.indented+(/^(?:case|default)\b/.test(L)?h:2*h):re.align?re.column+(Vt?0:1):re.indented+(Vt?0:h)},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:ee,skipExpression:function(v){We(v,"atom","atom","true",new s.StringStream("",2,null))}}}),s.registerHelper("wordChars","javascript",/[\w$]/),s.defineMIME("text/javascript","javascript"),s.defineMIME("text/ecmascript","javascript"),s.defineMIME("application/javascript","javascript"),s.defineMIME("application/x-javascript","javascript"),s.defineMIME("application/ecmascript","javascript"),s.defineMIME("application/json",{name:"javascript",json:!0}),s.defineMIME("application/x-json",{name:"javascript",json:!0}),s.defineMIME("application/manifest+json",{name:"javascript",json:!0}),s.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),s.defineMIME("text/typescript",{name:"javascript",typescript:!0}),s.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var ty={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineMode("css",function(xe,me){var We=me.inline;me.propertyKeywords||(me=s.resolveMode("text/css"));var I=xe.indentUnit,U=me.tokenHooks,w=me.documentTypes||{},Z=me.mediaTypes||{},K=me.mediaFeatures||{},se=me.mediaValueKeywords||{},_e=me.propertyKeywords||{},Ye=me.nonStandardPropertyKeywords||{},nt=me.fontProperties||{},ct=me.counterDescriptors||{},Ne=me.colorKeywords||{},Ve=me.valueKeywords||{},W=me.allowNested,G=me.lineComment,j=me.supportsAtComponent===!0,oe=xe.highlightNonStandardPropertyKeywords!==!1,ke,be;function fe(T,R){return ke=R,T}function Le(T,R){var A=T.next();if(U[A]){var ue=U[A](T,R);if(ue!==!1)return ue}if(A=="@")return T.eatWhile(/[\w\\\-]/),fe("def",T.current());if(A=="="||(A=="~"||A=="|")&&T.eat("="))return fe(null,"compare");if(A=='"'||A=="'")return R.tokenize=M(A),R.tokenize(T,R);if(A=="#")return T.eatWhile(/[\w\\\-]/),fe("atom","hash");if(A=="!")return T.match(/^\s*\w*/),fe("keyword","important");if(/\d/.test(A)||A=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),fe("number","unit");if(A==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),fe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?fe("variable-2","variable-definition"):fe("variable-2","variable");if(T.match(/^\w+-/))return fe("meta","meta")}else return/[,+>*\/]/.test(A)?fe(null,"select-op"):A=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?fe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(A)?fe(null,A):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(R.tokenize=E),fe("variable callee","variable")):/[\w\\\-]/.test(A)?(T.eatWhile(/[\w\\\-]/),fe("property","word")):fe(null,null)}function M(T){return function(R,A){for(var ue=!1,Se;(Se=R.next())!=null;){if(Se==T&&!ue){T==")"&&R.backUp(1);break}ue=!ue&&Se=="\\"}return(Se==T||!ue&&T!=")")&&(A.tokenize=null),fe("string","string")}}function E(T,R){return T.next(),T.match(/^\s*[\"\')]/,!1)?R.tokenize=null:R.tokenize=M(")"),fe(null,"(")}function D(T,R,A){this.type=T,this.indent=R,this.prev=A}function B(T,R,A,ue){return T.context=new D(A,R.indentation()+(ue===!1?0:I),T.context),A}function Y(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function le(T,R,A){return Q[A.context.type](T,R,A)}function pe(T,R,A,ue){for(var Se=ue||1;Se>0;Se--)A.context=A.context.prev;return le(T,R,A)}function ae(T){var R=T.current().toLowerCase();Ve.hasOwnProperty(R)?be="atom":Ne.hasOwnProperty(R)?be="keyword":be="variable"}var Q={};return Q.top=function(T,R,A){if(T=="{")return B(A,R,"block");if(T=="}"&&A.context.prev)return Y(A);if(j&&/@component/i.test(T))return B(A,R,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return B(A,R,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return B(A,R,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return A.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return B(A,R,"at");if(T=="hash")be="builtin";else if(T=="word")be="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return B(A,R,"interpolation");if(T==":")return"pseudo";if(W&&T=="(")return B(A,R,"parens")}return A.context.type},Q.block=function(T,R,A){if(T=="word"){var ue=R.current().toLowerCase();return _e.hasOwnProperty(ue)?(be="property","maybeprop"):Ye.hasOwnProperty(ue)?(be=oe?"string-2":"property","maybeprop"):W?(be=R.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return T=="meta"?"block":!W&&(T=="hash"||T=="qualifier")?(be="error","block"):Q.top(T,R,A)},Q.maybeprop=function(T,R,A){return T==":"?B(A,R,"prop"):le(T,R,A)},Q.prop=function(T,R,A){if(T==";")return Y(A);if(T=="{"&&W)return B(A,R,"propBlock");if(T=="}"||T=="{")return pe(T,R,A);if(T=="(")return B(A,R,"parens");if(T=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(R.current()))be+=" error";else if(T=="word")ae(R);else if(T=="interpolation")return B(A,R,"interpolation");return"prop"},Q.propBlock=function(T,R,A){return T=="}"?Y(A):T=="word"?(be="property","maybeprop"):A.context.type},Q.parens=function(T,R,A){return T=="{"||T=="}"?pe(T,R,A):T==")"?Y(A):T=="("?B(A,R,"parens"):T=="interpolation"?B(A,R,"interpolation"):(T=="word"&&ae(R),"parens")},Q.pseudo=function(T,R,A){return T=="meta"?"pseudo":T=="word"?(be="variable-3",A.context.type):le(T,R,A)},Q.documentTypes=function(T,R,A){return T=="word"&&w.hasOwnProperty(R.current())?(be="tag",A.context.type):Q.atBlock(T,R,A)},Q.atBlock=function(T,R,A){if(T=="(")return B(A,R,"atBlock_parens");if(T=="}"||T==";")return pe(T,R,A);if(T=="{")return Y(A)&&B(A,R,W?"block":"top");if(T=="interpolation")return B(A,R,"interpolation");if(T=="word"){var ue=R.current().toLowerCase();ue=="only"||ue=="not"||ue=="and"||ue=="or"?be="keyword":Z.hasOwnProperty(ue)?be="attribute":K.hasOwnProperty(ue)?be="property":se.hasOwnProperty(ue)?be="keyword":_e.hasOwnProperty(ue)?be="property":Ye.hasOwnProperty(ue)?be=oe?"string-2":"property":Ve.hasOwnProperty(ue)?be="atom":Ne.hasOwnProperty(ue)?be="keyword":be="error"}return A.context.type},Q.atComponentBlock=function(T,R,A){return T=="}"?pe(T,R,A):T=="{"?Y(A)&&B(A,R,W?"block":"top",!1):(T=="word"&&(be="error"),A.context.type)},Q.atBlock_parens=function(T,R,A){return T==")"?Y(A):T=="{"||T=="}"?pe(T,R,A,2):Q.atBlock(T,R,A)},Q.restricted_atBlock_before=function(T,R,A){return T=="{"?B(A,R,"restricted_atBlock"):T=="word"&&A.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):le(T,R,A)},Q.restricted_atBlock=function(T,R,A){return T=="}"?(A.stateArg=null,Y(A)):T=="word"?(A.stateArg=="@font-face"&&!nt.hasOwnProperty(R.current().toLowerCase())||A.stateArg=="@counter-style"&&!ct.hasOwnProperty(R.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Q.keyframes=function(T,R,A){return T=="word"?(be="variable","keyframes"):T=="{"?B(A,R,"top"):le(T,R,A)},Q.at=function(T,R,A){return T==";"?Y(A):T=="{"||T=="}"?pe(T,R,A):(T=="word"?be="tag":T=="hash"&&(be="builtin"),"at")},Q.interpolation=function(T,R,A){return T=="}"?Y(A):T=="{"||T==";"?pe(T,R,A):(T=="word"?be="variable":T!="variable"&&T!="("&&T!=")"&&(be="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:We?"block":"top",stateArg:null,context:new D(We?"block":"top",T||0,null)}},token:function(T,R){if(!R.tokenize&&T.eatSpace())return null;var A=(R.tokenize||Le)(T,R);return A&&typeof A=="object"&&(ke=A[1],A=A[0]),be=A,ke!="comment"&&(R.state=Q[R.state](ke,T,R)),be},indent:function(T,R){var A=T.context,ue=R&&R.charAt(0),Se=A.indent;return A.type=="prop"&&(ue=="}"||ue==")")&&(A=A.prev),A.prev&&(ue=="}"&&(A.type=="block"||A.type=="top"||A.type=="interpolation"||A.type=="restricted_atBlock")?(A=A.prev,Se=A.indent):(ue==")"&&(A.type=="parens"||A.type=="atBlock_parens")||ue=="{"&&(A.type=="at"||A.type=="atBlock"))&&(Se=Math.max(0,A.indent-I))),Se},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:G,fold:"brace"}});function u(xe){for(var me={},We=0;We<xe.length;++We)me[xe[We].toLowerCase()]=!0;return me}var c=["domain","regexp","url","url-prefix"],h=u(c),m=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(m),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"],x=u(y),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],P=u(S),_=["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"],N=u(_),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"],V=u(H),X=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],te=u(X),J=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],ne=u(J),he=["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"],Ae=u(he),Fe=["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","button-bevel","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-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","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"],Ke=u(Fe),tt=c.concat(m).concat(y).concat(S).concat(_).concat(H).concat(he).concat(Fe);s.registerHelper("hintWords","css",tt);function Be(xe,me){for(var We=!1,I;(I=xe.next())!=null;){if(We&&I=="/"){me.tokenize=null;break}We=I=="*"}return["comment","comment"]}s.defineMIME("text/css",{documentTypes:h,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,fontProperties:te,counterDescriptors:ne,colorKeywords:Ae,valueKeywords:Ke,tokenHooks:{"/":function(xe,me){return xe.eat("*")?(me.tokenize=Be,Be(xe,me)):!1}},name:"css"}),s.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,colorKeywords:Ae,valueKeywords:Ke,fontProperties:te,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(xe,me){return xe.eat("/")?(xe.skipToEnd(),["comment","comment"]):xe.eat("*")?(me.tokenize=Be,Be(xe,me)):["operator","operator"]},":":function(xe){return xe.match(/^\s*\{/,!1)?[null,null]:!1},$:function(xe){return xe.match(/^[\w-]+/),xe.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(xe){return xe.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),s.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:N,nonStandardPropertyKeywords:V,colorKeywords:Ae,valueKeywords:Ke,fontProperties:te,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(xe,me){return xe.eat("/")?(xe.skipToEnd(),["comment","comment"]):xe.eat("*")?(me.tokenize=Be,Be(xe,me)):["operator","operator"]},"@":function(xe){return xe.eat("{")?[null,"interpolation"]:xe.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(xe.eatWhile(/[\w\\\-]/),xe.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),s.defineMIME("text/x-gss",{documentTypes:h,mediaTypes:b,mediaFeatures:x,propertyKeywords:N,nonStandardPropertyKeywords:V,fontProperties:te,counterDescriptors:ne,colorKeywords:Ae,valueKeywords:Ke,supportsAtComponent:!0,tokenHooks:{"/":function(xe,me){return xe.eat("*")?(me.tokenize=Be,Be(xe,me)):!1}},name:"css",helperType:"gss"})})})();var Pd={exports:{}};(function(r,l){(function(s){s(fn.exports)})(function(s){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},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};s.defineMode("xml",function(h,m){var b=h.indentUnit,y={},x=m.htmlMode?u:c;for(var S in x)y[S]=x[S];for(var S in m)y[S]=m[S];var P,_;function N(w,Z){function K(Ye){return Z.tokenize=Ye,Ye(w,Z)}var se=w.next();if(se=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?K(X("atom","]]>")):null:w.match("--")?K(X("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),K(te(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),Z.tokenize=X("meta","?>"),"meta"):(P=w.eat("/")?"closeTag":"openTag",Z.tokenize=H,"tag bracket");if(se=="&"){var _e;return w.eat("#")?w.eat("x")?_e=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):_e=w.eatWhile(/[\d]/)&&w.eat(";"):_e=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),_e?"atom":"error"}else return w.eatWhile(/[^&<]/),null}N.isInText=!0;function H(w,Z){var K=w.next();if(K==">"||K=="/"&&w.eat(">"))return Z.tokenize=N,P=K==">"?"endTag":"selfcloseTag","tag bracket";if(K=="=")return P="equals",null;if(K=="<"){Z.tokenize=N,Z.state=Fe,Z.tagName=Z.tagStart=null;var se=Z.tokenize(w,Z);return se?se+" tag error":"tag error"}else return/[\'\"]/.test(K)?(Z.tokenize=V(K),Z.stringStartCol=w.column(),Z.tokenize(w,Z)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function V(w){var Z=function(K,se){for(;!K.eol();)if(K.next()==w){se.tokenize=H;break}return"string"};return Z.isInAttribute=!0,Z}function X(w,Z){return function(K,se){for(;!K.eol();){if(K.match(Z)){se.tokenize=N;break}K.next()}return w}}function te(w){return function(Z,K){for(var se;(se=Z.next())!=null;){if(se=="<")return K.tokenize=te(w+1),K.tokenize(Z,K);if(se==">")if(w==1){K.tokenize=N;break}else return K.tokenize=te(w-1),K.tokenize(Z,K)}return"meta"}}function J(w){return w&&w.toLowerCase()}function ne(w,Z,K){this.prev=w.context,this.tagName=Z||"",this.indent=w.indented,this.startOfLine=K,(y.doNotIndent.hasOwnProperty(Z)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function he(w){w.context&&(w.context=w.context.prev)}function Ae(w,Z){for(var K;;){if(!w.context||(K=w.context.tagName,!y.contextGrabbers.hasOwnProperty(J(K))||!y.contextGrabbers[J(K)].hasOwnProperty(J(Z))))return;he(w)}}function Fe(w,Z,K){return w=="openTag"?(K.tagStart=Z.column(),Ke):w=="closeTag"?tt:Fe}function Ke(w,Z,K){return w=="word"?(K.tagName=Z.current(),_="tag",me):y.allowMissingTagName&&w=="endTag"?(_="tag bracket",me(w,Z,K)):(_="error",Ke)}function tt(w,Z,K){if(w=="word"){var se=Z.current();return K.context&&K.context.tagName!=se&&y.implicitlyClosed.hasOwnProperty(J(K.context.tagName))&&he(K),K.context&&K.context.tagName==se||y.matchClosing===!1?(_="tag",Be):(_="tag error",xe)}else return y.allowMissingTagName&&w=="endTag"?(_="tag bracket",Be(w,Z,K)):(_="error",xe)}function Be(w,Z,K){return w!="endTag"?(_="error",Be):(he(K),Fe)}function xe(w,Z,K){return _="error",Be(w,Z,K)}function me(w,Z,K){if(w=="word")return _="attribute",We;if(w=="endTag"||w=="selfcloseTag"){var se=K.tagName,_e=K.tagStart;return K.tagName=K.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(J(se))?Ae(K,se):(Ae(K,se),K.context=new ne(K,se,_e==K.indented)),Fe}return _="error",me}function We(w,Z,K){return w=="equals"?I:(y.allowMissing||(_="error"),me(w,Z,K))}function I(w,Z,K){return w=="string"?U:w=="word"&&y.allowUnquoted?(_="string",me):(_="error",me(w,Z,K))}function U(w,Z,K){return w=="string"?U:me(w,Z,K)}return{startState:function(w){var Z={tokenize:N,state:Fe,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(Z.baseIndent=w),Z},token:function(w,Z){if(!Z.tagName&&w.sol()&&(Z.indented=w.indentation()),w.eatSpace())return null;P=null;var K=Z.tokenize(w,Z);return(K||P)&&K!="comment"&&(_=null,Z.state=Z.state(P||K,w,Z),_&&(K=_=="error"?K+" error":_)),K},indent:function(w,Z,K){var se=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(se&&se.noIndent)return s.Pass;if(w.tokenize!=H&&w.tokenize!=N)return K?K.match(/^(\s*)/)[0].length:0;if(w.tagName)return y.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(Z))return 0;var _e=Z&&/^<(\/)?([\w_:\.-]*)/.exec(Z);if(_e&&_e[1])for(;se;)if(se.tagName==_e[2]){se=se.prev;break}else if(y.implicitlyClosed.hasOwnProperty(J(se.tagName)))se=se.prev;else break;else if(_e)for(;se;){var Ye=y.contextGrabbers[J(se.tagName)];if(Ye&&Ye.hasOwnProperty(J(_e[2])))se=se.prev;else break}for(;se&&se.prev&&!se.startOfLine;)se=se.prev;return se?se.indent+b:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(w){w.state==I&&(w.state=me)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var Z=[],K=w.context;K;K=K.prev)Z.push(K.tagName);return Z.reverse()}}}),s.defineMIME("text/xml","xml"),s.defineMIME("application/xml","xml"),s.mimeModes.hasOwnProperty("text/html")||s.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,l){(function(s){s(fn.exports,Pd.exports,Md.exports,ty.exports)})(function(s){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 c(P,_,N){var H=P.current(),V=H.search(_);return V>-1?P.backUp(H.length-V):H.match(/<\/?$/)&&(P.backUp(H.length),P.match(_,!1)||P.match(H)),N}var h={};function m(P){var _=h[P];return _||(h[P]=new RegExp("\\s+"+P+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(P,_){var N=P.match(m(_));return N?/^\s*(.*?)\s*$/.exec(N[2])[1]:""}function y(P,_){return new RegExp((_?"^":"")+"</\\s*"+P+"\\s*>","i")}function x(P,_){for(var N in P)for(var H=_[N]||(_[N]=[]),V=P[N],X=V.length-1;X>=0;X--)H.unshift(V[X])}function S(P,_){for(var N=0;N<P.length;N++){var H=P[N];if(!H[0]||H[1].test(b(_,H[0])))return H[2]}}s.defineMode("htmlmixed",function(P,_){var N=s.getMode(P,{name:"xml",htmlMode:!0,multilineTagIndentFactor:_.multilineTagIndentFactor,multilineTagIndentPastTag:_.multilineTagIndentPastTag,allowMissingTagName:_.allowMissingTagName}),H={},V=_&&_.tags,X=_&&_.scriptTypes;if(x(u,H),V&&x(V,H),X)for(var te=X.length-1;te>=0;te--)H.script.unshift(["type",X[te].matches,X[te].mode]);function J(ne,he){var Ae=N.token(ne,he.htmlState),Fe=/\btag\b/.test(Ae),Ke;if(Fe&&!/[<>\s\/]/.test(ne.current())&&(Ke=he.htmlState.tagName&&he.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(Ke))he.inTag=Ke+" ";else if(he.inTag&&Fe&&/>$/.test(ne.current())){var tt=/^([\S]+) (.*)/.exec(he.inTag);he.inTag=null;var Be=ne.current()==">"&&S(H[tt[1]],tt[2]),xe=s.getMode(P,Be),me=y(tt[1],!0),We=y(tt[1],!1);he.token=function(I,U){return I.match(me,!1)?(U.token=J,U.localState=U.localMode=null,null):c(I,We,U.localMode.token(I,U.localState))},he.localMode=xe,he.localState=s.startState(xe,N.indent(he.htmlState,"",""))}else he.inTag&&(he.inTag+=ne.current(),ne.eol()&&(he.inTag+=" "));return Ae}return{startState:function(){var ne=s.startState(N);return{token:J,inTag:null,localMode:null,localState:null,htmlState:ne}},copyState:function(ne){var he;return ne.localState&&(he=s.copyState(ne.localMode,ne.localState)),{token:ne.token,inTag:ne.inTag,localMode:ne.localMode,localState:he,htmlState:s.copyState(N,ne.htmlState)}},token:function(ne,he){return he.token(ne,he)},indent:function(ne,he,Ae){return!ne.localMode||/^\s*<\//.test(he)?N.indent(ne.htmlState,he,Ae):ne.localMode.indent?ne.localMode.indent(ne.localState,he,Ae):s.Pass},innerMode:function(ne){return{state:ne.localState||ne.htmlState,mode:ne.localMode||N}}}},"xml","javascript","css"),s.defineMIME("text/html","htmlmixed")})})();(function(r,l){(function(s){s(fn.exports,Pd.exports,Md.exports)})(function(s){function u(h,m,b,y){this.state=h,this.mode=m,this.depth=b,this.prev=y}function c(h){return new u(s.copyState(h.mode,h.state),h.mode,h.depth,h.prev&&c(h.prev))}s.defineMode("jsx",function(h,m){var b=s.getMode(h,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=s.getMode(h,m&&m.base||"javascript");function x(N){var H=N.tagName;N.tagName=null;var V=b.indent(N,"","");return N.tagName=H,V}function S(N,H){return H.context.mode==b?P(N,H,H.context):_(N,H,H.context)}function P(N,H,V){if(V.depth==2)return N.match(/^.*?\*\//)?V.depth=1:N.skipToEnd(),"comment";if(N.peek()=="{"){b.skipAttribute(V.state);var X=x(V.state),te=V.state.context;if(te&&N.match(/^[^>]*>\s*$/,!1)){for(;te.prev&&!te.startOfLine;)te=te.prev;te.startOfLine?X-=h.indentUnit:V.prev.state.lexical&&(X=V.prev.state.lexical.indented)}else V.depth==1&&(X+=h.indentUnit);return H.context=new u(s.startState(y,X),y,0,H.context),null}if(V.depth==1){if(N.peek()=="<")return b.skipAttribute(V.state),H.context=new u(s.startState(b,x(V.state)),b,0,H.context),null;if(N.match("//"))return N.skipToEnd(),"comment";if(N.match("/*"))return V.depth=2,S(N,H)}var J=b.token(N,V.state),ne=N.current(),he;return/\btag\b/.test(J)?/>$/.test(ne)?V.state.context?V.depth=0:H.context=H.context.prev:/^</.test(ne)&&(V.depth=1):!J&&(he=ne.indexOf("{"))>-1&&N.backUp(ne.length-he),J}function _(N,H,V){if(N.peek()=="<"&&y.expressionAllowed(N,V.state))return H.context=new u(s.startState(b,y.indent(V.state,"","")),b,0,H.context),y.skipExpression(V.state),null;var X=y.token(N,V.state);if(!X&&V.depth!=null){var te=N.current();te=="{"?V.depth++:te=="}"&&--V.depth==0&&(H.context=H.context.prev)}return X}return{startState:function(){return{context:new u(s.startState(y),y)}},copyState:function(N){return{context:c(N.context)}},token:S,indent:function(N,H,V){return N.context.mode.indent(N.context.state,H,V)},innerMode:function(N){return N.context}}},"xml","javascript"),s.defineMIME("text/jsx","jsx"),s.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,l){(function(s){s(fn.exports)})(function(s){s.defineOption("placeholder","",function(x,S,P){var _=P&&P!=s.Init;if(S&&!_)x.on("blur",m),x.on("change",b),x.on("swapDoc",b),s.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){h(x)}),b(x);else if(!S&&_){x.off("blur",m),x.off("change",b),x.off("swapDoc",b),s.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var N=x.getWrapperElement();N.className=N.className.replace(" CodeMirror-empty","")}S&&!x.hasFocus()&&m(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function c(x){u(x);var S=x.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=x.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var P=x.getOption("placeholder");typeof P=="string"&&(P=document.createTextNode(P)),S.appendChild(P),x.display.lineSpace.insertBefore(S,x.display.lineSpace.firstChild)}function h(x){setTimeout(function(){var S=!1;if(x.lineCount()==1){var P=x.getInputField();S=P.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(P.querySelector(".CodeMirror-line").textContent)}S?c(x):u(x)},20)}function m(x){y(x)&&c(x)}function b(x){var S=x.getWrapperElement(),P=y(x);S.className=S.className.replace(" CodeMirror-empty","")+(P?" CodeMirror-empty":""),P?c(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();/*!
25
+ * vue-router v4.0.14
26
26
  * (c) 2022 Eduardo San Martin Morote
27
27
  * @license MIT
28
- */const _d=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",pi=r=>_d?Symbol(r):"_vr_"+r,ry=pi("rvlm"),oc=pi("rvd"),ya=pi("r"),ba=pi("rl"),js=pi("rvl"),ni=typeof window!="undefined";function ny(r){return r.__esModule||_d&&r[Symbol.toStringTag]==="Module"}const et=Object.assign;function Ts(r,l){const s={};for(const u in l){const c=l[u];s[u]=Array.isArray(c)?c.map(r):r(c)}return s}const no=()=>{},iy=/\/$/,oy=r=>r.replace(iy,"");function Ls(r,l,s="/"){let u,c={},h="",m="";const b=l.indexOf("?"),y=l.indexOf("#",b>-1?b:0);return b>-1&&(u=l.slice(0,b),h=l.slice(b+1,y>-1?y:l.length),c=r(h)),y>-1&&(u=u||l.slice(0,y),m=l.slice(y,l.length)),u=uy(u!=null?u:l,s),{fullPath:u+(h&&"?")+h+m,path:u,query:c,hash:m}}function ly(r,l){const s=l.query?r(l.query):"";return l.path+(s&&"?")+s+(l.hash||"")}function lc(r,l){return!l||!r.toLowerCase().startsWith(l.toLowerCase())?r:r.slice(l.length)||"/"}function sy(r,l,s){const u=l.matched.length-1,c=s.matched.length-1;return u>-1&&u===c&&ui(l.matched[u],s.matched[c])&&Od(l.params,s.params)&&r(l.query)===r(s.query)&&l.hash===s.hash}function ui(r,l){return(r.aliasOf||r)===(l.aliasOf||l)}function Od(r,l){if(Object.keys(r).length!==Object.keys(l).length)return!1;for(const s in r)if(!ay(r[s],l[s]))return!1;return!0}function ay(r,l){return Array.isArray(r)?sc(r,l):Array.isArray(l)?sc(l,r):r===l}function sc(r,l){return Array.isArray(l)?r.length===l.length&&r.every((s,u)=>s===l[u]):r.length===1&&r[0]===l}function uy(r,l){if(r.startsWith("/"))return r;if(!r)return l;const s=l.split("/"),u=r.split("/");let c=s.length-1,h,m;for(h=0;h<u.length;h++)if(m=u[h],!(c===1||m==="."))if(m==="..")c--;else break;return s.slice(0,c).join("/")+"/"+u.slice(h-(h===u.length?1:0)).join("/")}var co;(function(r){r.pop="pop",r.push="push"})(co||(co={}));var io;(function(r){r.back="back",r.forward="forward",r.unknown=""})(io||(io={}));function fy(r){if(!r)if(ni){const l=document.querySelector("base");r=l&&l.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),oy(r)}const cy=/^[^#]+#/;function dy(r,l){return r.replace(cy,"#")+l}function hy(r,l){const s=document.documentElement.getBoundingClientRect(),u=r.getBoundingClientRect();return{behavior:l.behavior,left:u.left-s.left-(l.left||0),top:u.top-s.top-(l.top||0)}}const Tl=()=>({left:window.pageXOffset,top:window.pageYOffset});function py(r){let l;if("el"in r){const s=r.el,u=typeof s=="string"&&s.startsWith("#"),c=typeof s=="string"?u?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!c)return;l=hy(c,r)}else l=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(l):window.scrollTo(l.left!=null?l.left:window.pageXOffset,l.top!=null?l.top:window.pageYOffset)}function ac(r,l){return(history.state?history.state.position-l:-1)+r}const qs=new Map;function gy(r,l){qs.set(r,l)}function vy(r){const l=qs.get(r);return qs.delete(r),l}let my=()=>location.protocol+"//"+location.host;function Ed(r,l){const{pathname:s,search:u,hash:c}=l,h=r.indexOf("#");if(h>-1){let b=c.includes(r.slice(h))?r.slice(h).length:1,y=c.slice(b);return y[0]!=="/"&&(y="/"+y),lc(y,"")}return lc(s,r)+u+c}function yy(r,l,s,u){let c=[],h=[],m=null;const b=({state:_})=>{const N=Ed(r,location),H=s.value,V=l.value;let X=0;if(_){if(s.value=N,l.value=_,m&&m===H){m=null;return}X=V?_.position-V.position:0}else u(N);c.forEach(te=>{te(s.value,H,{delta:X,type:co.pop,direction:X?X>0?io.forward:io.back:io.unknown})})};function y(){m=s.value}function x(_){c.push(_);const N=()=>{const H=c.indexOf(_);H>-1&&c.splice(H,1)};return h.push(N),N}function S(){const{history:_}=window;!_.state||_.replaceState(et({},_.state,{scroll:Tl()}),"")}function P(){for(const _ of h)_();h=[],window.removeEventListener("popstate",b),window.removeEventListener("beforeunload",S)}return window.addEventListener("popstate",b),window.addEventListener("beforeunload",S),{pauseListeners:y,listen:x,destroy:P}}function uc(r,l,s,u=!1,c=!1){return{back:r,current:l,forward:s,replaced:u,position:window.history.length,scroll:c?Tl():null}}function by(r){const{history:l,location:s}=window,u={value:Ed(r,s)},c={value:l.state};c.value||h(u.value,{back:null,current:u.value,forward:null,position:l.length-1,replaced:!0,scroll:null},!0);function h(y,x,S){const P=r.indexOf("#"),_=P>-1?(s.host&&document.querySelector("base")?r:r.slice(P))+y:my()+r+y;try{l[S?"replaceState":"pushState"](x,"",_),c.value=x}catch(N){console.error(N),s[S?"replace":"assign"](_)}}function m(y,x){const S=et({},l.state,uc(c.value.back,y,c.value.forward,!0),x,{position:c.value.position});h(y,S,!0),u.value=y}function b(y,x){const S=et({},c.value,l.state,{forward:y,scroll:Tl()});h(S.current,S,!0);const P=et({},uc(u.value,y,null),{position:S.position+1},x);h(y,P,!1),u.value=y}return{location:u,state:c,push:b,replace:m}}function wy(r){r=fy(r);const l=by(r),s=yy(r,l.state,l.location,l.replace);function u(h,m=!0){m||s.pauseListeners(),history.go(h)}const c=et({location:"",base:r,go:u,createHref:dy.bind(null,r)},l,s);return Object.defineProperty(c,"location",{enumerable:!0,get:()=>l.location.value}),Object.defineProperty(c,"state",{enumerable:!0,get:()=>l.state.value}),c}function P0(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),wy(r)}function xy(r){return typeof r=="string"||r&&typeof r=="object"}function Ad(r){return typeof r=="string"||typeof r=="symbol"}const Vr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Nd=pi("nf");var fc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(fc||(fc={}));function fi(r,l){return et(new Error,{type:r,[Nd]:!0},l)}function en(r,l){return r instanceof Error&&Nd in r&&(l==null||!!(r.type&l))}const cc="[^/]+?",ky={sensitive:!1,strict:!1,start:!0,end:!0},Sy=/[.+*?^${}()[\]/\\]/g;function Cy(r,l){const s=et({},ky,l),u=[];let c=s.start?"^":"";const h=[];for(const x of r){const S=x.length?[]:[90];s.strict&&!x.length&&(c+="/");for(let P=0;P<x.length;P++){const _=x[P];let N=40+(s.sensitive?.25:0);if(_.type===0)P||(c+="/"),c+=_.value.replace(Sy,"\\$&"),N+=40;else if(_.type===1){const{value:H,repeatable:V,optional:X,regexp:te}=_;h.push({name:H,repeatable:V,optional:X});const J=te||cc;if(J!==cc){N+=10;try{new RegExp(`(${J})`)}catch(he){throw new Error(`Invalid custom RegExp for param "${H}" (${J}): `+he.message)}}let ne=V?`((?:${J})(?:/(?:${J}))*)`:`(${J})`;P||(ne=X&&x.length<2?`(?:/${ne})`:"/"+ne),X&&(ne+="?"),c+=ne,N+=20,X&&(N+=-8),V&&(N+=-20),J===".*"&&(N+=-50)}S.push(N)}u.push(S)}if(s.strict&&s.end){const x=u.length-1;u[x][u[x].length-1]+=.7000000000000001}s.strict||(c+="/?"),s.end?c+="$":s.strict&&(c+="(?:/|$)");const m=new RegExp(c,s.sensitive?"":"i");function b(x){const S=x.match(m),P={};if(!S)return null;for(let _=1;_<S.length;_++){const N=S[_]||"",H=h[_-1];P[H.name]=N&&H.repeatable?N.split("/"):N}return P}function y(x){let S="",P=!1;for(const _ of r){(!P||!S.endsWith("/"))&&(S+="/"),P=!1;for(const N of _)if(N.type===0)S+=N.value;else if(N.type===1){const{value:H,repeatable:V,optional:X}=N,te=H in x?x[H]:"";if(Array.isArray(te)&&!V)throw new Error(`Provided param "${H}" is an array but it is not repeatable (* or + modifiers)`);const J=Array.isArray(te)?te.join("/"):te;if(!J)if(X)_.length<2&&(S.endsWith("/")?S=S.slice(0,-1):P=!0);else throw new Error(`Missing required param "${H}"`);S+=J}}return S}return{re:m,score:u,keys:h,parse:b,stringify:y}}function Ty(r,l){let s=0;for(;s<r.length&&s<l.length;){const u=l[s]-r[s];if(u)return u;s++}return r.length<l.length?r.length===1&&r[0]===40+40?-1:1:r.length>l.length?l.length===1&&l[0]===40+40?1:-1:0}function Ly(r,l){let s=0;const u=r.score,c=l.score;for(;s<u.length&&s<c.length;){const h=Ty(u[s],c[s]);if(h)return h;s++}return c.length-u.length}const My={type:0,value:""},Py=/[a-zA-Z0-9_]/;function _y(r){if(!r)return[[]];if(r==="/")return[[My]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function l(N){throw new Error(`ERR (${s})/"${x}": ${N}`)}let s=0,u=s;const c=[];let h;function m(){h&&c.push(h),h=[]}let b=0,y,x="",S="";function P(){!x||(s===0?h.push({type:0,value:x}):s===1||s===2||s===3?(h.length>1&&(y==="*"||y==="+")&&l(`A repeatable param (${x}) must be alone in its segment. eg: '/:ids+.`),h.push({type:1,value:x,regexp:S,repeatable:y==="*"||y==="+",optional:y==="*"||y==="?"})):l("Invalid state to consume buffer"),x="")}function _(){x+=y}for(;b<r.length;){if(y=r[b++],y==="\\"&&s!==2){u=s,s=4;continue}switch(s){case 0:y==="/"?(x&&P(),m()):y===":"?(P(),s=1):_();break;case 4:_(),s=u;break;case 1:y==="("?s=2:Py.test(y)?_():(P(),s=0,y!=="*"&&y!=="?"&&y!=="+"&&b--);break;case 2:y===")"?S[S.length-1]=="\\"?S=S.slice(0,-1)+y:s=3:S+=y;break;case 3:P(),s=0,y!=="*"&&y!=="?"&&y!=="+"&&b--,S="";break;default:l("Unknown state");break}}return s===2&&l(`Unfinished custom RegExp for param "${x}"`),P(),m(),c}function Oy(r,l,s){const u=Cy(_y(r.path),s),c=et(u,{record:r,parent:l,children:[],alias:[]});return l&&!c.record.aliasOf==!l.record.aliasOf&&l.children.push(c),c}function Ey(r,l){const s=[],u=new Map;l=hc({strict:!1,end:!0,sensitive:!1},l);function c(S){return u.get(S)}function h(S,P,_){const N=!_,H=Ny(S);H.aliasOf=_&&_.record;const V=hc(l,S),X=[H];if("alias"in S){const ne=typeof S.alias=="string"?[S.alias]:S.alias;for(const he of ne)X.push(et({},H,{components:_?_.record.components:H.components,path:he,aliasOf:_?_.record:H}))}let te,J;for(const ne of X){const{path:he}=ne;if(P&&he[0]!=="/"){const Ae=P.record.path,Fe=Ae[Ae.length-1]==="/"?"":"/";ne.path=P.record.path+(he&&Fe+he)}if(te=Oy(ne,P,V),_?_.alias.push(te):(J=J||te,J!==te&&J.alias.push(te),N&&S.name&&!dc(te)&&m(S.name)),"children"in H){const Ae=H.children;for(let Fe=0;Fe<Ae.length;Fe++)h(Ae[Fe],te,_&&_.children[Fe])}_=_||te,y(te)}return J?()=>{m(J)}:no}function m(S){if(Ad(S)){const P=u.get(S);P&&(u.delete(S),s.splice(s.indexOf(P),1),P.children.forEach(m),P.alias.forEach(m))}else{const P=s.indexOf(S);P>-1&&(s.splice(P,1),S.record.name&&u.delete(S.record.name),S.children.forEach(m),S.alias.forEach(m))}}function b(){return s}function y(S){let P=0;for(;P<s.length&&Ly(S,s[P])>=0&&(S.record.path!==s[P].record.path||!zd(S,s[P]));)P++;s.splice(P,0,S),S.record.name&&!dc(S)&&u.set(S.record.name,S)}function x(S,P){let _,N={},H,V;if("name"in S&&S.name){if(_=u.get(S.name),!_)throw fi(1,{location:S});V=_.record.name,N=et(Ay(P.params,_.keys.filter(J=>!J.optional).map(J=>J.name)),S.params),H=_.stringify(N)}else if("path"in S)H=S.path,_=s.find(J=>J.re.test(H)),_&&(N=_.parse(H),V=_.record.name);else{if(_=P.name?u.get(P.name):s.find(J=>J.re.test(P.path)),!_)throw fi(1,{location:S,currentLocation:P});V=_.record.name,N=et({},P.params,S.params),H=_.stringify(N)}const X=[];let te=_;for(;te;)X.unshift(te.record),te=te.parent;return{name:V,path:H,params:N,matched:X,meta:Dy(X)}}return r.forEach(S=>h(S)),{addRoute:h,resolve:x,removeRoute:m,getRoutes:b,getRecordMatcher:c}}function Ay(r,l){const s={};for(const u of l)u in r&&(s[u]=r[u]);return s}function Ny(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:zy(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||{}:{default:r.component}}}function zy(r){const l={},s=r.props||!1;if("component"in r)l.default=s;else for(const u in r.components)l[u]=typeof s=="boolean"?s:s[u];return l}function dc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function Dy(r){return r.reduce((l,s)=>et(l,s.meta),{})}function hc(r,l){const s={};for(const u in r)s[u]=u in l?l[u]:r[u];return s}function zd(r,l){return l.children.some(s=>s===r||zd(r,s))}const Dd=/#/g,Ry=/&/g,Iy=/\//g,Fy=/=/g,Hy=/\?/g,Rd=/\+/g,Wy=/%5B/g,By=/%5D/g,Id=/%5E/g,Uy=/%60/g,Fd=/%7B/g,Ky=/%7C/g,Hd=/%7D/g,jy=/%20/g;function wa(r){return encodeURI(""+r).replace(Ky,"|").replace(Wy,"[").replace(By,"]")}function qy(r){return wa(r).replace(Fd,"{").replace(Hd,"}").replace(Id,"^")}function Gs(r){return wa(r).replace(Rd,"%2B").replace(jy,"+").replace(Dd,"%23").replace(Ry,"%26").replace(Uy,"`").replace(Fd,"{").replace(Hd,"}").replace(Id,"^")}function Gy(r){return Gs(r).replace(Fy,"%3D")}function Yy(r){return wa(r).replace(Dd,"%23").replace(Hy,"%3F")}function $y(r){return r==null?"":Yy(r).replace(Iy,"%2F")}function hl(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Xy(r){const l={};if(r===""||r==="?")return l;const u=(r[0]==="?"?r.slice(1):r).split("&");for(let c=0;c<u.length;++c){const h=u[c].replace(Rd," "),m=h.indexOf("="),b=hl(m<0?h:h.slice(0,m)),y=m<0?null:hl(h.slice(m+1));if(b in l){let x=l[b];Array.isArray(x)||(x=l[b]=[x]),x.push(y)}else l[b]=y}return l}function pc(r){let l="";for(let s in r){const u=r[s];if(s=Gy(s),u==null){u!==void 0&&(l+=(l.length?"&":"")+s);continue}(Array.isArray(u)?u.map(h=>h&&Gs(h)):[u&&Gs(u)]).forEach(h=>{h!==void 0&&(l+=(l.length?"&":"")+s,h!=null&&(l+="="+h))})}return l}function Zy(r){const l={};for(const s in r){const u=r[s];u!==void 0&&(l[s]=Array.isArray(u)?u.map(c=>c==null?null:""+c):u==null?u:""+u)}return l}function Ji(){let r=[];function l(u){return r.push(u),()=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}}function s(){r=[]}return{add:l,list:()=>r,reset:s}}function nn(r,l,s,u,c){const h=u&&(u.enterCallbacks[c]=u.enterCallbacks[c]||[]);return()=>new Promise((m,b)=>{const y=P=>{P===!1?b(fi(4,{from:s,to:l})):P instanceof Error?b(P):xy(P)?b(fi(2,{from:l,to:P})):(h&&u.enterCallbacks[c]===h&&typeof P=="function"&&h.push(P),m())},x=r.call(u&&u.instances[c],l,s,y);let S=Promise.resolve(x);r.length<3&&(S=S.then(y)),S.catch(P=>b(P))})}function Ms(r,l,s,u){const c=[];for(const h of r)for(const m in h.components){let b=h.components[m];if(!(l!=="beforeRouteEnter"&&!h.instances[m]))if(Jy(b)){const x=(b.__vccOpts||b)[l];x&&c.push(nn(x,s,u,h,m))}else{let y=b();c.push(()=>y.then(x=>{if(!x)return Promise.reject(new Error(`Couldn't resolve component "${m}" at "${h.path}"`));const S=ny(x)?x.default:x;h.components[m]=S;const _=(S.__vccOpts||S)[l];return _&&nn(_,s,u,h,m)()}))}}return c}function Jy(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function gc(r){const l=Fr(ya),s=Fr(ba),u=zt(()=>l.resolve(ot(r.to))),c=zt(()=>{const{matched:y}=u.value,{length:x}=y,S=y[x-1],P=s.matched;if(!S||!P.length)return-1;const _=P.findIndex(ui.bind(null,S));if(_>-1)return _;const N=vc(y[x-2]);return x>1&&vc(S)===N&&P[P.length-1].path!==N?P.findIndex(ui.bind(null,y[x-2])):_}),h=zt(()=>c.value>-1&&t0(s.params,u.value.params)),m=zt(()=>c.value>-1&&c.value===s.matched.length-1&&Od(s.params,u.value.params));function b(y={}){return e0(y)?l[ot(r.replace)?"replace":"push"](ot(r.to)).catch(no):Promise.resolve()}return{route:u,href:zt(()=>u.value.href),isActive:h,isExactActive:m,navigate:b}}const Qy=Vc({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:gc,setup(r,{slots:l}){const s=ho(gc(r)),{options:u}=Fr(ya),c=zt(()=>({[mc(r.activeClass,u.linkActiveClass,"router-link-active")]:s.isActive,[mc(r.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const h=l.default&&l.default(s);return r.custom?h:va("a",{"aria-current":s.isExactActive?r.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:c.value},h)}}}),Vy=Qy;function e0(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 l=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(l))return}return r.preventDefault&&r.preventDefault(),!0}}function t0(r,l){for(const s in l){const u=l[s],c=r[s];if(typeof u=="string"){if(u!==c)return!1}else if(!Array.isArray(c)||c.length!==u.length||u.some((h,m)=>h!==c[m]))return!1}return!0}function vc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const mc=(r,l,s)=>r!=null?r:l!=null?l:s,r0=Vc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(r,{attrs:l,slots:s}){const u=Fr(js),c=zt(()=>r.route||u.value),h=Fr(oc,0),m=zt(()=>c.value.matched[h]);tl(oc,h+1),tl(ry,m),tl(js,c);const b=Ut();return Xt(()=>[b.value,m.value,r.name],([y,x,S],[P,_,N])=>{x&&(x.instances[S]=y,_&&_!==x&&y&&y===P&&(x.leaveGuards.size||(x.leaveGuards=_.leaveGuards),x.updateGuards.size||(x.updateGuards=_.updateGuards))),y&&x&&(!_||!ui(x,_)||!P)&&(x.enterCallbacks[S]||[]).forEach(H=>H(y))},{flush:"post"}),()=>{const y=c.value,x=m.value,S=x&&x.components[r.name],P=r.name;if(!S)return yc(s.default,{Component:S,route:y});const _=x.props[r.name],N=_?_===!0?y.params:typeof _=="function"?_(y):_:null,V=va(S,et({},N,l,{onVnodeUnmounted:X=>{X.component.isUnmounted&&(x.instances[P]=null)},ref:b}));return yc(s.default,{Component:V,route:y})||V}}});function yc(r,l){if(!r)return null;const s=r(l);return s.length===1?s[0]:s}const n0=r0;function _0(r){const l=Ey(r.routes,r),s=r.parseQuery||Xy,u=r.stringifyQuery||pc,c=r.history,h=Ji(),m=Ji(),b=Ji(),y=ol(Vr);let x=Vr;ni&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const S=Ts.bind(null,W=>""+W),P=Ts.bind(null,$y),_=Ts.bind(null,hl);function N(W,G){let j,oe;return Ad(W)?(j=l.getRecordMatcher(W),oe=G):oe=W,l.addRoute(oe,j)}function H(W){const G=l.getRecordMatcher(W);G&&l.removeRoute(G)}function V(){return l.getRoutes().map(W=>W.record)}function X(W){return!!l.getRecordMatcher(W)}function te(W,G){if(G=et({},G||y.value),typeof W=="string"){const Le=Ls(s,W,G.path),M=l.resolve({path:Le.path},G),E=c.createHref(Le.fullPath);return et(Le,M,{params:_(M.params),hash:hl(Le.hash),redirectedFrom:void 0,href:E})}let j;if("path"in W)j=et({},W,{path:Ls(s,W.path,G.path).path});else{const Le=et({},W.params);for(const M in Le)Le[M]==null&&delete Le[M];j=et({},W,{params:P(W.params)}),G.params=P(G.params)}const oe=l.resolve(j,G),ke=W.hash||"";oe.params=S(_(oe.params));const be=ly(u,et({},W,{hash:qy(ke),path:oe.path})),fe=c.createHref(be);return et({fullPath:be,hash:ke,query:u===pc?Zy(W.query):W.query||{}},oe,{redirectedFrom:void 0,href:fe})}function J(W){return typeof W=="string"?Ls(s,W,y.value.path):et({},W)}function ne(W,G){if(x!==W)return fi(8,{from:G,to:W})}function he(W){return Ke(W)}function Ae(W){return he(et(J(W),{replace:!0}))}function Fe(W){const G=W.matched[W.matched.length-1];if(G&&G.redirect){const{redirect:j}=G;let oe=typeof j=="function"?j(W):j;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=J(oe):{path:oe},oe.params={}),et({query:W.query,hash:W.hash,params:W.params},oe)}}function Ke(W,G){const j=x=te(W),oe=y.value,ke=W.state,be=W.force,fe=W.replace===!0,Le=Fe(j);if(Le)return Ke(et(J(Le),{state:ke,force:be,replace:fe}),G||j);const M=j;M.redirectedFrom=G;let E;return!be&&sy(u,oe,j)&&(E=fi(16,{to:M,from:oe}),Ye(oe,oe,!0,!1)),(E?Promise.resolve(E):Be(M,oe)).catch(D=>en(D)?en(D,2)?D:_e(D):K(D,M,oe)).then(D=>{if(D){if(en(D,2))return Ke(et(J(D.to),{state:ke,force:be,replace:fe}),G||M)}else D=me(M,oe,!0,fe,ke);return xe(M,oe,D),D})}function tt(W,G){const j=ne(W,G);return j?Promise.reject(j):Promise.resolve()}function Be(W,G){let j;const[oe,ke,be]=i0(W,G);j=Ms(oe.reverse(),"beforeRouteLeave",W,G);for(const Le of oe)Le.leaveGuards.forEach(M=>{j.push(nn(M,W,G))});const fe=tt.bind(null,W,G);return j.push(fe),ei(j).then(()=>{j=[];for(const Le of h.list())j.push(nn(Le,W,G));return j.push(fe),ei(j)}).then(()=>{j=Ms(ke,"beforeRouteUpdate",W,G);for(const Le of ke)Le.updateGuards.forEach(M=>{j.push(nn(M,W,G))});return j.push(fe),ei(j)}).then(()=>{j=[];for(const Le of W.matched)if(Le.beforeEnter&&!G.matched.includes(Le))if(Array.isArray(Le.beforeEnter))for(const M of Le.beforeEnter)j.push(nn(M,W,G));else j.push(nn(Le.beforeEnter,W,G));return j.push(fe),ei(j)}).then(()=>(W.matched.forEach(Le=>Le.enterCallbacks={}),j=Ms(be,"beforeRouteEnter",W,G),j.push(fe),ei(j))).then(()=>{j=[];for(const Le of m.list())j.push(nn(Le,W,G));return j.push(fe),ei(j)}).catch(Le=>en(Le,8)?Le:Promise.reject(Le))}function xe(W,G,j){for(const oe of b.list())oe(W,G,j)}function me(W,G,j,oe,ke){const be=ne(W,G);if(be)return be;const fe=G===Vr,Le=ni?history.state:{};j&&(oe||fe?c.replace(W.fullPath,et({scroll:fe&&Le&&Le.scroll},ke)):c.push(W.fullPath,ke)),y.value=W,Ye(W,G,j,fe),_e()}let We;function I(){We=c.listen((W,G,j)=>{const oe=te(W),ke=Fe(oe);if(ke){Ke(et(ke,{replace:!0}),oe).catch(no);return}x=oe;const be=y.value;ni&&gy(ac(be.fullPath,j.delta),Tl()),Be(oe,be).catch(fe=>en(fe,4|8)?fe:en(fe,2)?(Ke(fe.to,oe).then(Le=>{en(Le,4|16)&&!j.delta&&j.type===co.pop&&c.go(-1,!1)}).catch(no),Promise.reject()):(j.delta&&c.go(-j.delta,!1),K(fe,oe,be))).then(fe=>{fe=fe||me(oe,be,!1),fe&&(j.delta?c.go(-j.delta,!1):j.type===co.pop&&en(fe,4|16)&&c.go(-1,!1)),xe(oe,be,fe)}).catch(no)})}let U=Ji(),w=Ji(),Z;function K(W,G,j){_e(W);const oe=w.list();return oe.length?oe.forEach(ke=>ke(W,G,j)):console.error(W),Promise.reject(W)}function se(){return Z&&y.value!==Vr?Promise.resolve():new Promise((W,G)=>{U.add([W,G])})}function _e(W){return Z||(Z=!W,I(),U.list().forEach(([G,j])=>W?j(W):G()),U.reset()),W}function Ye(W,G,j,oe){const{scrollBehavior:ke}=r;if(!ni||!ke)return Promise.resolve();const be=!j&&vy(ac(W.fullPath,0))||(oe||!j)&&history.state&&history.state.scroll||null;return sa().then(()=>ke(W,G,be)).then(fe=>fe&&py(fe)).catch(fe=>K(fe,W,G))}const nt=W=>c.go(W);let ct;const Ne=new Set;return{currentRoute:y,addRoute:N,removeRoute:H,hasRoute:X,getRoutes:V,resolve:te,options:r,push:he,replace:Ae,go:nt,back:()=>nt(-1),forward:()=>nt(1),beforeEach:h.add,beforeResolve:m.add,afterEach:b.add,onError:w.add,isReady:se,install(W){const G=this;W.component("RouterLink",Vy),W.component("RouterView",n0),W.config.globalProperties.$router=G,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(y)}),ni&&!ct&&y.value===Vr&&(ct=!0,he(c.location).catch(ke=>{}));const j={};for(const ke in Vr)j[ke]=zt(()=>y.value[ke]);W.provide(ya,G),W.provide(ba,ho(j)),W.provide(js,y);const oe=W.unmount;Ne.add(W),W.unmount=function(){Ne.delete(W),Ne.size<1&&(x=Vr,We&&We(),y.value=Vr,ct=!1,Z=!1),oe()}}}}function ei(r){return r.reduce((l,s)=>l.then(()=>s()),Promise.resolve())}function i0(r,l){const s=[],u=[],c=[],h=Math.max(l.matched.length,r.matched.length);for(let m=0;m<h;m++){const b=l.matched[m];b&&(r.matched.find(x=>ui(x,b))?u.push(b):s.push(b));const y=r.matched[m];y&&(l.matched.find(x=>ui(x,y))||c.push(y))}return[s,u,c]}function O0(){return Fr(ba)}var o0=Object.defineProperty,l0=Object.defineProperties,s0=Object.getOwnPropertyDescriptors,pl=Object.getOwnPropertySymbols,Wd=Object.prototype.hasOwnProperty,Bd=Object.prototype.propertyIsEnumerable,bc=(r,l,s)=>l in r?o0(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,a0=(r,l)=>{for(var s in l||(l={}))Wd.call(l,s)&&bc(r,s,l[s]);if(pl)for(var s of pl(l))Bd.call(l,s)&&bc(r,s,l[s]);return r},u0=(r,l)=>l0(r,s0(l)),f0=(r,l)=>{var s={};for(var u in r)Wd.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&pl)for(var u of pl(r))l.indexOf(u)<0&&Bd.call(r,u)&&(s[u]=r[u]);return s};const E0={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,l)=>(r[l.id]=l)&&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,l){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=l},onMouseMove(r){this.touch.mouseDown&&(r.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(r)),this.$emit("resize",this.panes.map(l=>({min:l.min,max:l.max,size:l.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,l){"ontouchstart"in window&&(r.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===l?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(r,l),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=l,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[l])},onSplitterDblClick(r,l){let s=0;this.panes=this.panes.map((u,c)=>(u.size=c===l?u.max:u.min,c!==l&&(s+=u.min),u)),this.panes[l].size-=s,this.$emit("pane-maximize",this.panes[l])},onPaneClick(r,l){this.$emit("pane-click",this.indexedPanes[l])},getCurrentMouseDrag(r){const l=this.container.getBoundingClientRect(),{clientX:s,clientY:u}="ontouchstart"in window&&r.touches?r.touches[0]:r;return{x:s-l.left,y:u-l.top}},getCurrentDragPercentage(r){r=r[this.horizontal?"y":"x"];const l=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(r=l-r),r*100/l},calculatePanesSize(r){const l=this.touch.activeSplitter;let s={prevPanesSize:this.sumPrevPanesSize(l),nextPanesSize:this.sumNextPanesSize(l),prevReachedMinPanes:0,nextReachedMinPanes:0};const u=0+(this.pushOtherPanes?0:s.prevPanesSize),c=100-(this.pushOtherPanes?0:s.nextPanesSize),h=Math.max(Math.min(this.getCurrentDragPercentage(r),c),u);let m=[l,l+1],b=this.panes[m[0]]||null,y=this.panes[m[1]]||null;const x=b.max<100&&h>=b.max+s.prevPanesSize,S=y.max<100&&h<=100-(y.max+this.sumNextPanesSize(l+1));if(x||S){x?(b.size=b.max,y.size=Math.max(100-b.max-s.prevPanesSize-s.nextPanesSize,0)):(b.size=Math.max(100-y.max-s.prevPanesSize-this.sumNextPanesSize(l+1),0),y.size=y.max);return}if(this.pushOtherPanes){const P=this.doPushOtherPanes(s,h);if(!P)return;({sums:s,panesToResize:m}=P),b=this.panes[m[0]]||null,y=this.panes[m[1]]||null}b!==null&&(b.size=Math.min(Math.max(h-s.prevPanesSize-s.prevReachedMinPanes,b.min),b.max)),y!==null&&(y.size=Math.min(Math.max(100-h-s.nextPanesSize-s.nextReachedMinPanes,y.min),y.max))},doPushOtherPanes(r,l){const s=this.touch.activeSplitter,u=[s,s+1];return l<r.prevPanesSize+this.panes[u[0]].min&&(u[0]=this.findPrevExpandedPane(s).index,r.prevReachedMinPanes=0,u[0]<s&&this.panes.forEach((c,h)=>{h>u[0]&&h<=s&&(c.size=c.min,r.prevReachedMinPanes+=c.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((c,h)=>{h>0&&h<=s&&(c.size=c.min,r.prevReachedMinPanes+=c.min)}),this.panes[u[1]].size=100-r.prevReachedMinPanes-this.panes[0].min-r.prevPanesSize-r.nextPanesSize,null):l>100-r.nextPanesSize-this.panes[u[1]].min&&(u[1]=this.findNextExpandedPane(s).index,r.nextReachedMinPanes=0,u[1]>s+1&&this.panes.forEach((c,h)=>{h>s&&h<u[1]&&(c.size=c.min,r.nextReachedMinPanes+=c.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((c,h)=>{h<this.panesCount-1&&h>=s+1&&(c.size=c.min,r.nextReachedMinPanes+=c.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((l,s,u)=>l+(u<r?s.size:0),0)},sumNextPanesSize(r){return this.panes.reduce((l,s,u)=>l+(u>r+1?s.size:0),0)},findPrevExpandedPane(r){return[...this.panes].reverse().find(s=>s.index<r&&s.size>s.min)||{}},findNextExpandedPane(r){return this.panes.find(s=>s.index>r+1&&s.size>s.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(l=>{const s=l.classList.contains("splitpanes__pane"),u=l.classList.contains("splitpanes__splitter");if(!s&&!u){l.parentNode.removeChild(l),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter(r,l,s=!1){const u=r-1,c=document.createElement("div");c.classList.add("splitpanes__splitter"),s||(c.onmousedown=h=>this.onMouseDown(h,u),typeof window!="undefined"&&"ontouchstart"in window&&(c.ontouchstart=h=>this.onMouseDown(h,u)),c.onclick=h=>this.onSplitterClick(h,u+1)),this.dblClickSplitter&&(c.ondblclick=h=>this.onSplitterDblClick(h,u+1)),l.parentNode.insertBefore(c,l)},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(s=>{s.className.includes("splitpanes__splitter")&&this.removeSplitter(s)});let l=0;r.forEach(s=>{s.className.includes("splitpanes__pane")&&(!l&&this.firstSplitter?this.addSplitter(l,s,!0):l&&this.addSplitter(l,s),l++)})},requestUpdate(r){var l=r,{target:s}=l,u=f0(l,["target"]);const c=this.indexedPanes[s._.uid];Object.entries(u).forEach(([h,m])=>c[h]=m)},onPaneAdd(r){let l=-1;Array.from(r.$el.parentNode.children).some(c=>(c.className.includes("splitpanes__pane")&&l++,c===r.$el));const s=parseFloat(r.minSize),u=parseFloat(r.maxSize);this.panes.splice(l,0,{id:r._.uid,index:l,min:isNaN(s)?0:s,max:isNaN(u)?100:u,size:r.size===null?null:parseFloat(r.size),givenSize:r.size,update:r.update}),this.panes.forEach((c,h)=>c.index=h),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[l]}),this.$emit("pane-add",{index:l,panes:this.panes.map(c=>({min:c.min,max:c.max,size:c.size}))})})},onPaneRemove(r){const l=this.panes.findIndex(u=>u.id===r._.uid),s=this.panes.splice(l,1)[0];this.panes.forEach((u,c)=>u.index=c),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:u0(a0({},s),{index:l})}),this.$emit("pane-remove",{removed:s,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(l=>l.givenSize!==null||l.min||l.max<100)?this.equalizeAfterAddOrRemove(r):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(l=>({min:l.min,max:l.max,size:l.size})))},equalize(){const r=100/this.panesCount;let l=0,s=[],u=[];this.panes.forEach(c=>{c.size=Math.max(Math.min(r,c.max),c.min),l-=c.size,c.size>=c.max&&s.push(c.id),c.size<=c.min&&u.push(c.id)}),l>.1&&this.readjustSizes(l,s,u)},initialPanesSizing(){100/this.panesCount;let r=100,l=[],s=[],u=0;this.panes.forEach(h=>{r-=h.size,h.size!==null&&u++,h.size>=h.max&&l.push(h.id),h.size<=h.min&&s.push(h.id)});let c=100;r>.1&&(this.panes.forEach(h=>{h.size===null&&(h.size=Math.max(Math.min(r/(this.panesCount-u),h.max),h.min)),c-=h.size}),c>.1&&this.readjustSizes(r,l,s))},equalizeAfterAddOrRemove({addedPane:r,removedPane:l}={}){let s=100/this.panesCount,u=0,c=[],h=[];r&&r.givenSize!==null&&(s=(100-r.givenSize)/(this.panesCount-1)),this.panes.forEach(m=>{u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&h.push(m.id)}),!(Math.abs(u)<.1)&&(this.panes.forEach(m=>{r&&r.givenSize!==null&&r.id===m.id||(m.size=Math.max(Math.min(s,m.max),m.min)),u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&h.push(m.id)}),u>.1&&this.readjustSizes(u,c,h))},readjustSizes(r,l,s){let u;r>0?u=r/(this.panesCount-l.length):u=r/(this.panesCount-s.length),this.panes.forEach((c,h)=>{if(r>0&&!l.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}else if(!s.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}c.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[c.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((s,u)=>{s.ondblclick=r?c=>this.onSplitterDblClick(c,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 va("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};var c0=(r,l)=>{const s=r.__vccOpts||r;for(const[u,c]of l)s[u]=c;return s};const d0={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 h0(r,l,s,u,c,h){return ha(),Tv("div",{class:"splitpanes__pane",onClick:l[0]||(l[0]=m=>h.onPaneClick(m,r._.uid)),style:gl(r.style)},[Ov(r.$slots,"default")],4)}var A0=c0(d0,[["render",h0]]);export{y0 as A,S0 as B,M0 as C,x0 as D,A0 as E,pr as F,b0 as G,_0 as H,P0 as I,Mm as J,gt as K,g0 as L,k0 as M,E0 as _,ha as a,md as b,Tv as c,Vc as d,Ov as e,Ss as f,T0 as g,zt as h,ot as i,w0 as j,m0 as k,C0 as l,xm as m,$t as n,rd as o,Wg as p,Pv as q,Ut as r,gl as s,p0 as t,L0 as u,gd as v,Xt as w,$s as x,O0 as y,v0 as z};
28
+ */const _d=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",pi=r=>_d?Symbol(r):"_vr_"+r,ry=pi("rvlm"),oc=pi("rvd"),ya=pi("r"),ba=pi("rl"),js=pi("rvl"),ni=typeof window!="undefined";function ny(r){return r.__esModule||_d&&r[Symbol.toStringTag]==="Module"}const et=Object.assign;function Ts(r,l){const s={};for(const u in l){const c=l[u];s[u]=Array.isArray(c)?c.map(r):r(c)}return s}const io=()=>{},iy=/\/$/,oy=r=>r.replace(iy,"");function Ls(r,l,s="/"){let u,c={},h="",m="";const b=l.indexOf("?"),y=l.indexOf("#",b>-1?b:0);return b>-1&&(u=l.slice(0,b),h=l.slice(b+1,y>-1?y:l.length),c=r(h)),y>-1&&(u=u||l.slice(0,y),m=l.slice(y,l.length)),u=uy(u!=null?u:l,s),{fullPath:u+(h&&"?")+h+m,path:u,query:c,hash:m}}function ly(r,l){const s=l.query?r(l.query):"";return l.path+(s&&"?")+s+(l.hash||"")}function lc(r,l){return!l||!r.toLowerCase().startsWith(l.toLowerCase())?r:r.slice(l.length)||"/"}function sy(r,l,s){const u=l.matched.length-1,c=s.matched.length-1;return u>-1&&u===c&&ui(l.matched[u],s.matched[c])&&Od(l.params,s.params)&&r(l.query)===r(s.query)&&l.hash===s.hash}function ui(r,l){return(r.aliasOf||r)===(l.aliasOf||l)}function Od(r,l){if(Object.keys(r).length!==Object.keys(l).length)return!1;for(const s in r)if(!ay(r[s],l[s]))return!1;return!0}function ay(r,l){return Array.isArray(r)?sc(r,l):Array.isArray(l)?sc(l,r):r===l}function sc(r,l){return Array.isArray(l)?r.length===l.length&&r.every((s,u)=>s===l[u]):r.length===1&&r[0]===l}function uy(r,l){if(r.startsWith("/"))return r;if(!r)return l;const s=l.split("/"),u=r.split("/");let c=s.length-1,h,m;for(h=0;h<u.length;h++)if(m=u[h],!(c===1||m==="."))if(m==="..")c--;else break;return s.slice(0,c).join("/")+"/"+u.slice(h-(h===u.length?1:0)).join("/")}var ho;(function(r){r.pop="pop",r.push="push"})(ho||(ho={}));var oo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(oo||(oo={}));function fy(r){if(!r)if(ni){const l=document.querySelector("base");r=l&&l.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),oy(r)}const cy=/^[^#]+#/;function dy(r,l){return r.replace(cy,"#")+l}function hy(r,l){const s=document.documentElement.getBoundingClientRect(),u=r.getBoundingClientRect();return{behavior:l.behavior,left:u.left-s.left-(l.left||0),top:u.top-s.top-(l.top||0)}}const Tl=()=>({left:window.pageXOffset,top:window.pageYOffset});function py(r){let l;if("el"in r){const s=r.el,u=typeof s=="string"&&s.startsWith("#"),c=typeof s=="string"?u?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!c)return;l=hy(c,r)}else l=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(l):window.scrollTo(l.left!=null?l.left:window.pageXOffset,l.top!=null?l.top:window.pageYOffset)}function ac(r,l){return(history.state?history.state.position-l:-1)+r}const qs=new Map;function gy(r,l){qs.set(r,l)}function vy(r){const l=qs.get(r);return qs.delete(r),l}let my=()=>location.protocol+"//"+location.host;function Ed(r,l){const{pathname:s,search:u,hash:c}=l,h=r.indexOf("#");if(h>-1){let b=c.includes(r.slice(h))?r.slice(h).length:1,y=c.slice(b);return y[0]!=="/"&&(y="/"+y),lc(y,"")}return lc(s,r)+u+c}function yy(r,l,s,u){let c=[],h=[],m=null;const b=({state:_})=>{const N=Ed(r,location),H=s.value,V=l.value;let X=0;if(_){if(s.value=N,l.value=_,m&&m===H){m=null;return}X=V?_.position-V.position:0}else u(N);c.forEach(te=>{te(s.value,H,{delta:X,type:ho.pop,direction:X?X>0?oo.forward:oo.back:oo.unknown})})};function y(){m=s.value}function x(_){c.push(_);const N=()=>{const H=c.indexOf(_);H>-1&&c.splice(H,1)};return h.push(N),N}function S(){const{history:_}=window;!_.state||_.replaceState(et({},_.state,{scroll:Tl()}),"")}function P(){for(const _ of h)_();h=[],window.removeEventListener("popstate",b),window.removeEventListener("beforeunload",S)}return window.addEventListener("popstate",b),window.addEventListener("beforeunload",S),{pauseListeners:y,listen:x,destroy:P}}function uc(r,l,s,u=!1,c=!1){return{back:r,current:l,forward:s,replaced:u,position:window.history.length,scroll:c?Tl():null}}function by(r){const{history:l,location:s}=window,u={value:Ed(r,s)},c={value:l.state};c.value||h(u.value,{back:null,current:u.value,forward:null,position:l.length-1,replaced:!0,scroll:null},!0);function h(y,x,S){const P=r.indexOf("#"),_=P>-1?(s.host&&document.querySelector("base")?r:r.slice(P))+y:my()+r+y;try{l[S?"replaceState":"pushState"](x,"",_),c.value=x}catch(N){console.error(N),s[S?"replace":"assign"](_)}}function m(y,x){const S=et({},l.state,uc(c.value.back,y,c.value.forward,!0),x,{position:c.value.position});h(y,S,!0),u.value=y}function b(y,x){const S=et({},c.value,l.state,{forward:y,scroll:Tl()});h(S.current,S,!0);const P=et({},uc(u.value,y,null),{position:S.position+1},x);h(y,P,!1),u.value=y}return{location:u,state:c,push:b,replace:m}}function wy(r){r=fy(r);const l=by(r),s=yy(r,l.state,l.location,l.replace);function u(h,m=!0){m||s.pauseListeners(),history.go(h)}const c=et({location:"",base:r,go:u,createHref:dy.bind(null,r)},l,s);return Object.defineProperty(c,"location",{enumerable:!0,get:()=>l.location.value}),Object.defineProperty(c,"state",{enumerable:!0,get:()=>l.state.value}),c}function P0(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),wy(r)}function xy(r){return typeof r=="string"||r&&typeof r=="object"}function Ad(r){return typeof r=="string"||typeof r=="symbol"}const Vr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Nd=pi("nf");var fc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(fc||(fc={}));function fi(r,l){return et(new Error,{type:r,[Nd]:!0},l)}function en(r,l){return r instanceof Error&&Nd in r&&(l==null||!!(r.type&l))}const cc="[^/]+?",ky={sensitive:!1,strict:!1,start:!0,end:!0},Sy=/[.+*?^${}()[\]/\\]/g;function Cy(r,l){const s=et({},ky,l),u=[];let c=s.start?"^":"";const h=[];for(const x of r){const S=x.length?[]:[90];s.strict&&!x.length&&(c+="/");for(let P=0;P<x.length;P++){const _=x[P];let N=40+(s.sensitive?.25:0);if(_.type===0)P||(c+="/"),c+=_.value.replace(Sy,"\\$&"),N+=40;else if(_.type===1){const{value:H,repeatable:V,optional:X,regexp:te}=_;h.push({name:H,repeatable:V,optional:X});const J=te||cc;if(J!==cc){N+=10;try{new RegExp(`(${J})`)}catch(he){throw new Error(`Invalid custom RegExp for param "${H}" (${J}): `+he.message)}}let ne=V?`((?:${J})(?:/(?:${J}))*)`:`(${J})`;P||(ne=X&&x.length<2?`(?:/${ne})`:"/"+ne),X&&(ne+="?"),c+=ne,N+=20,X&&(N+=-8),V&&(N+=-20),J===".*"&&(N+=-50)}S.push(N)}u.push(S)}if(s.strict&&s.end){const x=u.length-1;u[x][u[x].length-1]+=.7000000000000001}s.strict||(c+="/?"),s.end?c+="$":s.strict&&(c+="(?:/|$)");const m=new RegExp(c,s.sensitive?"":"i");function b(x){const S=x.match(m),P={};if(!S)return null;for(let _=1;_<S.length;_++){const N=S[_]||"",H=h[_-1];P[H.name]=N&&H.repeatable?N.split("/"):N}return P}function y(x){let S="",P=!1;for(const _ of r){(!P||!S.endsWith("/"))&&(S+="/"),P=!1;for(const N of _)if(N.type===0)S+=N.value;else if(N.type===1){const{value:H,repeatable:V,optional:X}=N,te=H in x?x[H]:"";if(Array.isArray(te)&&!V)throw new Error(`Provided param "${H}" is an array but it is not repeatable (* or + modifiers)`);const J=Array.isArray(te)?te.join("/"):te;if(!J)if(X)_.length<2&&(S.endsWith("/")?S=S.slice(0,-1):P=!0);else throw new Error(`Missing required param "${H}"`);S+=J}}return S}return{re:m,score:u,keys:h,parse:b,stringify:y}}function Ty(r,l){let s=0;for(;s<r.length&&s<l.length;){const u=l[s]-r[s];if(u)return u;s++}return r.length<l.length?r.length===1&&r[0]===40+40?-1:1:r.length>l.length?l.length===1&&l[0]===40+40?1:-1:0}function Ly(r,l){let s=0;const u=r.score,c=l.score;for(;s<u.length&&s<c.length;){const h=Ty(u[s],c[s]);if(h)return h;s++}return c.length-u.length}const My={type:0,value:""},Py=/[a-zA-Z0-9_]/;function _y(r){if(!r)return[[]];if(r==="/")return[[My]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function l(N){throw new Error(`ERR (${s})/"${x}": ${N}`)}let s=0,u=s;const c=[];let h;function m(){h&&c.push(h),h=[]}let b=0,y,x="",S="";function P(){!x||(s===0?h.push({type:0,value:x}):s===1||s===2||s===3?(h.length>1&&(y==="*"||y==="+")&&l(`A repeatable param (${x}) must be alone in its segment. eg: '/:ids+.`),h.push({type:1,value:x,regexp:S,repeatable:y==="*"||y==="+",optional:y==="*"||y==="?"})):l("Invalid state to consume buffer"),x="")}function _(){x+=y}for(;b<r.length;){if(y=r[b++],y==="\\"&&s!==2){u=s,s=4;continue}switch(s){case 0:y==="/"?(x&&P(),m()):y===":"?(P(),s=1):_();break;case 4:_(),s=u;break;case 1:y==="("?s=2:Py.test(y)?_():(P(),s=0,y!=="*"&&y!=="?"&&y!=="+"&&b--);break;case 2:y===")"?S[S.length-1]=="\\"?S=S.slice(0,-1)+y:s=3:S+=y;break;case 3:P(),s=0,y!=="*"&&y!=="?"&&y!=="+"&&b--,S="";break;default:l("Unknown state");break}}return s===2&&l(`Unfinished custom RegExp for param "${x}"`),P(),m(),c}function Oy(r,l,s){const u=Cy(_y(r.path),s),c=et(u,{record:r,parent:l,children:[],alias:[]});return l&&!c.record.aliasOf==!l.record.aliasOf&&l.children.push(c),c}function Ey(r,l){const s=[],u=new Map;l=hc({strict:!1,end:!0,sensitive:!1},l);function c(S){return u.get(S)}function h(S,P,_){const N=!_,H=Ny(S);H.aliasOf=_&&_.record;const V=hc(l,S),X=[H];if("alias"in S){const ne=typeof S.alias=="string"?[S.alias]:S.alias;for(const he of ne)X.push(et({},H,{components:_?_.record.components:H.components,path:he,aliasOf:_?_.record:H}))}let te,J;for(const ne of X){const{path:he}=ne;if(P&&he[0]!=="/"){const Ae=P.record.path,Fe=Ae[Ae.length-1]==="/"?"":"/";ne.path=P.record.path+(he&&Fe+he)}if(te=Oy(ne,P,V),_?_.alias.push(te):(J=J||te,J!==te&&J.alias.push(te),N&&S.name&&!dc(te)&&m(S.name)),"children"in H){const Ae=H.children;for(let Fe=0;Fe<Ae.length;Fe++)h(Ae[Fe],te,_&&_.children[Fe])}_=_||te,y(te)}return J?()=>{m(J)}:io}function m(S){if(Ad(S)){const P=u.get(S);P&&(u.delete(S),s.splice(s.indexOf(P),1),P.children.forEach(m),P.alias.forEach(m))}else{const P=s.indexOf(S);P>-1&&(s.splice(P,1),S.record.name&&u.delete(S.record.name),S.children.forEach(m),S.alias.forEach(m))}}function b(){return s}function y(S){let P=0;for(;P<s.length&&Ly(S,s[P])>=0&&(S.record.path!==s[P].record.path||!zd(S,s[P]));)P++;s.splice(P,0,S),S.record.name&&!dc(S)&&u.set(S.record.name,S)}function x(S,P){let _,N={},H,V;if("name"in S&&S.name){if(_=u.get(S.name),!_)throw fi(1,{location:S});V=_.record.name,N=et(Ay(P.params,_.keys.filter(J=>!J.optional).map(J=>J.name)),S.params),H=_.stringify(N)}else if("path"in S)H=S.path,_=s.find(J=>J.re.test(H)),_&&(N=_.parse(H),V=_.record.name);else{if(_=P.name?u.get(P.name):s.find(J=>J.re.test(P.path)),!_)throw fi(1,{location:S,currentLocation:P});V=_.record.name,N=et({},P.params,S.params),H=_.stringify(N)}const X=[];let te=_;for(;te;)X.unshift(te.record),te=te.parent;return{name:V,path:H,params:N,matched:X,meta:Dy(X)}}return r.forEach(S=>h(S)),{addRoute:h,resolve:x,removeRoute:m,getRoutes:b,getRecordMatcher:c}}function Ay(r,l){const s={};for(const u of l)u in r&&(s[u]=r[u]);return s}function Ny(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:zy(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||{}:{default:r.component}}}function zy(r){const l={},s=r.props||!1;if("component"in r)l.default=s;else for(const u in r.components)l[u]=typeof s=="boolean"?s:s[u];return l}function dc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function Dy(r){return r.reduce((l,s)=>et(l,s.meta),{})}function hc(r,l){const s={};for(const u in r)s[u]=u in l?l[u]:r[u];return s}function zd(r,l){return l.children.some(s=>s===r||zd(r,s))}const Dd=/#/g,Ry=/&/g,Iy=/\//g,Fy=/=/g,Hy=/\?/g,Rd=/\+/g,Wy=/%5B/g,By=/%5D/g,Id=/%5E/g,Uy=/%60/g,Fd=/%7B/g,Ky=/%7C/g,Hd=/%7D/g,jy=/%20/g;function wa(r){return encodeURI(""+r).replace(Ky,"|").replace(Wy,"[").replace(By,"]")}function qy(r){return wa(r).replace(Fd,"{").replace(Hd,"}").replace(Id,"^")}function Gs(r){return wa(r).replace(Rd,"%2B").replace(jy,"+").replace(Dd,"%23").replace(Ry,"%26").replace(Uy,"`").replace(Fd,"{").replace(Hd,"}").replace(Id,"^")}function Gy(r){return Gs(r).replace(Fy,"%3D")}function Yy(r){return wa(r).replace(Dd,"%23").replace(Hy,"%3F")}function $y(r){return r==null?"":Yy(r).replace(Iy,"%2F")}function hl(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Xy(r){const l={};if(r===""||r==="?")return l;const u=(r[0]==="?"?r.slice(1):r).split("&");for(let c=0;c<u.length;++c){const h=u[c].replace(Rd," "),m=h.indexOf("="),b=hl(m<0?h:h.slice(0,m)),y=m<0?null:hl(h.slice(m+1));if(b in l){let x=l[b];Array.isArray(x)||(x=l[b]=[x]),x.push(y)}else l[b]=y}return l}function pc(r){let l="";for(let s in r){const u=r[s];if(s=Gy(s),u==null){u!==void 0&&(l+=(l.length?"&":"")+s);continue}(Array.isArray(u)?u.map(h=>h&&Gs(h)):[u&&Gs(u)]).forEach(h=>{h!==void 0&&(l+=(l.length?"&":"")+s,h!=null&&(l+="="+h))})}return l}function Zy(r){const l={};for(const s in r){const u=r[s];u!==void 0&&(l[s]=Array.isArray(u)?u.map(c=>c==null?null:""+c):u==null?u:""+u)}return l}function Ji(){let r=[];function l(u){return r.push(u),()=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}}function s(){r=[]}return{add:l,list:()=>r,reset:s}}function nn(r,l,s,u,c){const h=u&&(u.enterCallbacks[c]=u.enterCallbacks[c]||[]);return()=>new Promise((m,b)=>{const y=P=>{P===!1?b(fi(4,{from:s,to:l})):P instanceof Error?b(P):xy(P)?b(fi(2,{from:l,to:P})):(h&&u.enterCallbacks[c]===h&&typeof P=="function"&&h.push(P),m())},x=r.call(u&&u.instances[c],l,s,y);let S=Promise.resolve(x);r.length<3&&(S=S.then(y)),S.catch(P=>b(P))})}function Ms(r,l,s,u){const c=[];for(const h of r)for(const m in h.components){let b=h.components[m];if(!(l!=="beforeRouteEnter"&&!h.instances[m]))if(Jy(b)){const x=(b.__vccOpts||b)[l];x&&c.push(nn(x,s,u,h,m))}else{let y=b();c.push(()=>y.then(x=>{if(!x)return Promise.reject(new Error(`Couldn't resolve component "${m}" at "${h.path}"`));const S=ny(x)?x.default:x;h.components[m]=S;const _=(S.__vccOpts||S)[l];return _&&nn(_,s,u,h,m)()}))}}return c}function Jy(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function gc(r){const l=Fr(ya),s=Fr(ba),u=zt(()=>l.resolve(ot(r.to))),c=zt(()=>{const{matched:y}=u.value,{length:x}=y,S=y[x-1],P=s.matched;if(!S||!P.length)return-1;const _=P.findIndex(ui.bind(null,S));if(_>-1)return _;const N=vc(y[x-2]);return x>1&&vc(S)===N&&P[P.length-1].path!==N?P.findIndex(ui.bind(null,y[x-2])):_}),h=zt(()=>c.value>-1&&t0(s.params,u.value.params)),m=zt(()=>c.value>-1&&c.value===s.matched.length-1&&Od(s.params,u.value.params));function b(y={}){return e0(y)?l[ot(r.replace)?"replace":"push"](ot(r.to)).catch(io):Promise.resolve()}return{route:u,href:zt(()=>u.value.href),isActive:h,isExactActive:m,navigate:b}}const Qy=Vc({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:gc,setup(r,{slots:l}){const s=po(gc(r)),{options:u}=Fr(ya),c=zt(()=>({[mc(r.activeClass,u.linkActiveClass,"router-link-active")]:s.isActive,[mc(r.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const h=l.default&&l.default(s);return r.custom?h:va("a",{"aria-current":s.isExactActive?r.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:c.value},h)}}}),Vy=Qy;function e0(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 l=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(l))return}return r.preventDefault&&r.preventDefault(),!0}}function t0(r,l){for(const s in l){const u=l[s],c=r[s];if(typeof u=="string"){if(u!==c)return!1}else if(!Array.isArray(c)||c.length!==u.length||u.some((h,m)=>h!==c[m]))return!1}return!0}function vc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const mc=(r,l,s)=>r!=null?r:l!=null?l:s,r0=Vc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(r,{attrs:l,slots:s}){const u=Fr(js),c=zt(()=>r.route||u.value),h=Fr(oc,0),m=zt(()=>c.value.matched[h]);rl(oc,h+1),rl(ry,m),rl(js,c);const b=Yt();return Xt(()=>[b.value,m.value,r.name],([y,x,S],[P,_,N])=>{x&&(x.instances[S]=y,_&&_!==x&&y&&y===P&&(x.leaveGuards.size||(x.leaveGuards=_.leaveGuards),x.updateGuards.size||(x.updateGuards=_.updateGuards))),y&&x&&(!_||!ui(x,_)||!P)&&(x.enterCallbacks[S]||[]).forEach(H=>H(y))},{flush:"post"}),()=>{const y=c.value,x=m.value,S=x&&x.components[r.name],P=r.name;if(!S)return yc(s.default,{Component:S,route:y});const _=x.props[r.name],N=_?_===!0?y.params:typeof _=="function"?_(y):_:null,V=va(S,et({},N,l,{onVnodeUnmounted:X=>{X.component.isUnmounted&&(x.instances[P]=null)},ref:b}));return yc(s.default,{Component:V,route:y})||V}}});function yc(r,l){if(!r)return null;const s=r(l);return s.length===1?s[0]:s}const n0=r0;function _0(r){const l=Ey(r.routes,r),s=r.parseQuery||Xy,u=r.stringifyQuery||pc,c=r.history,h=Ji(),m=Ji(),b=Ji(),y=eo(Vr);let x=Vr;ni&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const S=Ts.bind(null,W=>""+W),P=Ts.bind(null,$y),_=Ts.bind(null,hl);function N(W,G){let j,oe;return Ad(W)?(j=l.getRecordMatcher(W),oe=G):oe=W,l.addRoute(oe,j)}function H(W){const G=l.getRecordMatcher(W);G&&l.removeRoute(G)}function V(){return l.getRoutes().map(W=>W.record)}function X(W){return!!l.getRecordMatcher(W)}function te(W,G){if(G=et({},G||y.value),typeof W=="string"){const Le=Ls(s,W,G.path),M=l.resolve({path:Le.path},G),E=c.createHref(Le.fullPath);return et(Le,M,{params:_(M.params),hash:hl(Le.hash),redirectedFrom:void 0,href:E})}let j;if("path"in W)j=et({},W,{path:Ls(s,W.path,G.path).path});else{const Le=et({},W.params);for(const M in Le)Le[M]==null&&delete Le[M];j=et({},W,{params:P(W.params)}),G.params=P(G.params)}const oe=l.resolve(j,G),ke=W.hash||"";oe.params=S(_(oe.params));const be=ly(u,et({},W,{hash:qy(ke),path:oe.path})),fe=c.createHref(be);return et({fullPath:be,hash:ke,query:u===pc?Zy(W.query):W.query||{}},oe,{redirectedFrom:void 0,href:fe})}function J(W){return typeof W=="string"?Ls(s,W,y.value.path):et({},W)}function ne(W,G){if(x!==W)return fi(8,{from:G,to:W})}function he(W){return Ke(W)}function Ae(W){return he(et(J(W),{replace:!0}))}function Fe(W){const G=W.matched[W.matched.length-1];if(G&&G.redirect){const{redirect:j}=G;let oe=typeof j=="function"?j(W):j;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=J(oe):{path:oe},oe.params={}),et({query:W.query,hash:W.hash,params:W.params},oe)}}function Ke(W,G){const j=x=te(W),oe=y.value,ke=W.state,be=W.force,fe=W.replace===!0,Le=Fe(j);if(Le)return Ke(et(J(Le),{state:ke,force:be,replace:fe}),G||j);const M=j;M.redirectedFrom=G;let E;return!be&&sy(u,oe,j)&&(E=fi(16,{to:M,from:oe}),Ye(oe,oe,!0,!1)),(E?Promise.resolve(E):Be(M,oe)).catch(D=>en(D)?en(D,2)?D:_e(D):K(D,M,oe)).then(D=>{if(D){if(en(D,2))return Ke(et(J(D.to),{state:ke,force:be,replace:fe}),G||M)}else D=me(M,oe,!0,fe,ke);return xe(M,oe,D),D})}function tt(W,G){const j=ne(W,G);return j?Promise.reject(j):Promise.resolve()}function Be(W,G){let j;const[oe,ke,be]=i0(W,G);j=Ms(oe.reverse(),"beforeRouteLeave",W,G);for(const Le of oe)Le.leaveGuards.forEach(M=>{j.push(nn(M,W,G))});const fe=tt.bind(null,W,G);return j.push(fe),ei(j).then(()=>{j=[];for(const Le of h.list())j.push(nn(Le,W,G));return j.push(fe),ei(j)}).then(()=>{j=Ms(ke,"beforeRouteUpdate",W,G);for(const Le of ke)Le.updateGuards.forEach(M=>{j.push(nn(M,W,G))});return j.push(fe),ei(j)}).then(()=>{j=[];for(const Le of W.matched)if(Le.beforeEnter&&!G.matched.includes(Le))if(Array.isArray(Le.beforeEnter))for(const M of Le.beforeEnter)j.push(nn(M,W,G));else j.push(nn(Le.beforeEnter,W,G));return j.push(fe),ei(j)}).then(()=>(W.matched.forEach(Le=>Le.enterCallbacks={}),j=Ms(be,"beforeRouteEnter",W,G),j.push(fe),ei(j))).then(()=>{j=[];for(const Le of m.list())j.push(nn(Le,W,G));return j.push(fe),ei(j)}).catch(Le=>en(Le,8)?Le:Promise.reject(Le))}function xe(W,G,j){for(const oe of b.list())oe(W,G,j)}function me(W,G,j,oe,ke){const be=ne(W,G);if(be)return be;const fe=G===Vr,Le=ni?history.state:{};j&&(oe||fe?c.replace(W.fullPath,et({scroll:fe&&Le&&Le.scroll},ke)):c.push(W.fullPath,ke)),y.value=W,Ye(W,G,j,fe),_e()}let We;function I(){We=c.listen((W,G,j)=>{const oe=te(W),ke=Fe(oe);if(ke){Ke(et(ke,{replace:!0}),oe).catch(io);return}x=oe;const be=y.value;ni&&gy(ac(be.fullPath,j.delta),Tl()),Be(oe,be).catch(fe=>en(fe,4|8)?fe:en(fe,2)?(Ke(fe.to,oe).then(Le=>{en(Le,4|16)&&!j.delta&&j.type===ho.pop&&c.go(-1,!1)}).catch(io),Promise.reject()):(j.delta&&c.go(-j.delta,!1),K(fe,oe,be))).then(fe=>{fe=fe||me(oe,be,!1),fe&&(j.delta?c.go(-j.delta,!1):j.type===ho.pop&&en(fe,4|16)&&c.go(-1,!1)),xe(oe,be,fe)}).catch(io)})}let U=Ji(),w=Ji(),Z;function K(W,G,j){_e(W);const oe=w.list();return oe.length?oe.forEach(ke=>ke(W,G,j)):console.error(W),Promise.reject(W)}function se(){return Z&&y.value!==Vr?Promise.resolve():new Promise((W,G)=>{U.add([W,G])})}function _e(W){return Z||(Z=!W,I(),U.list().forEach(([G,j])=>W?j(W):G()),U.reset()),W}function Ye(W,G,j,oe){const{scrollBehavior:ke}=r;if(!ni||!ke)return Promise.resolve();const be=!j&&vy(ac(W.fullPath,0))||(oe||!j)&&history.state&&history.state.scroll||null;return sa().then(()=>ke(W,G,be)).then(fe=>fe&&py(fe)).catch(fe=>K(fe,W,G))}const nt=W=>c.go(W);let ct;const Ne=new Set;return{currentRoute:y,addRoute:N,removeRoute:H,hasRoute:X,getRoutes:V,resolve:te,options:r,push:he,replace:Ae,go:nt,back:()=>nt(-1),forward:()=>nt(1),beforeEach:h.add,beforeResolve:m.add,afterEach:b.add,onError:w.add,isReady:se,install(W){const G=this;W.component("RouterLink",Vy),W.component("RouterView",n0),W.config.globalProperties.$router=G,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(y)}),ni&&!ct&&y.value===Vr&&(ct=!0,he(c.location).catch(ke=>{}));const j={};for(const ke in Vr)j[ke]=zt(()=>y.value[ke]);W.provide(ya,G),W.provide(ba,po(j)),W.provide(js,y);const oe=W.unmount;Ne.add(W),W.unmount=function(){Ne.delete(W),Ne.size<1&&(x=Vr,We&&We(),y.value=Vr,ct=!1,Z=!1),oe()}}}}function ei(r){return r.reduce((l,s)=>l.then(()=>s()),Promise.resolve())}function i0(r,l){const s=[],u=[],c=[],h=Math.max(l.matched.length,r.matched.length);for(let m=0;m<h;m++){const b=l.matched[m];b&&(r.matched.find(x=>ui(x,b))?u.push(b):s.push(b));const y=r.matched[m];y&&(l.matched.find(x=>ui(x,y))||c.push(y))}return[s,u,c]}function O0(){return Fr(ba)}var o0=Object.defineProperty,l0=Object.defineProperties,s0=Object.getOwnPropertyDescriptors,pl=Object.getOwnPropertySymbols,Wd=Object.prototype.hasOwnProperty,Bd=Object.prototype.propertyIsEnumerable,bc=(r,l,s)=>l in r?o0(r,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[l]=s,a0=(r,l)=>{for(var s in l||(l={}))Wd.call(l,s)&&bc(r,s,l[s]);if(pl)for(var s of pl(l))Bd.call(l,s)&&bc(r,s,l[s]);return r},u0=(r,l)=>l0(r,s0(l)),f0=(r,l)=>{var s={};for(var u in r)Wd.call(r,u)&&l.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&pl)for(var u of pl(r))l.indexOf(u)<0&&Bd.call(r,u)&&(s[u]=r[u]);return s};const E0={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,l)=>(r[l.id]=l)&&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,l){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=l},onMouseMove(r){this.touch.mouseDown&&(r.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(r)),this.$emit("resize",this.panes.map(l=>({min:l.min,max:l.max,size:l.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,l){"ontouchstart"in window&&(r.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===l?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(r,l),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=l,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[l])},onSplitterDblClick(r,l){let s=0;this.panes=this.panes.map((u,c)=>(u.size=c===l?u.max:u.min,c!==l&&(s+=u.min),u)),this.panes[l].size-=s,this.$emit("pane-maximize",this.panes[l])},onPaneClick(r,l){this.$emit("pane-click",this.indexedPanes[l])},getCurrentMouseDrag(r){const l=this.container.getBoundingClientRect(),{clientX:s,clientY:u}="ontouchstart"in window&&r.touches?r.touches[0]:r;return{x:s-l.left,y:u-l.top}},getCurrentDragPercentage(r){r=r[this.horizontal?"y":"x"];const l=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(r=l-r),r*100/l},calculatePanesSize(r){const l=this.touch.activeSplitter;let s={prevPanesSize:this.sumPrevPanesSize(l),nextPanesSize:this.sumNextPanesSize(l),prevReachedMinPanes:0,nextReachedMinPanes:0};const u=0+(this.pushOtherPanes?0:s.prevPanesSize),c=100-(this.pushOtherPanes?0:s.nextPanesSize),h=Math.max(Math.min(this.getCurrentDragPercentage(r),c),u);let m=[l,l+1],b=this.panes[m[0]]||null,y=this.panes[m[1]]||null;const x=b.max<100&&h>=b.max+s.prevPanesSize,S=y.max<100&&h<=100-(y.max+this.sumNextPanesSize(l+1));if(x||S){x?(b.size=b.max,y.size=Math.max(100-b.max-s.prevPanesSize-s.nextPanesSize,0)):(b.size=Math.max(100-y.max-s.prevPanesSize-this.sumNextPanesSize(l+1),0),y.size=y.max);return}if(this.pushOtherPanes){const P=this.doPushOtherPanes(s,h);if(!P)return;({sums:s,panesToResize:m}=P),b=this.panes[m[0]]||null,y=this.panes[m[1]]||null}b!==null&&(b.size=Math.min(Math.max(h-s.prevPanesSize-s.prevReachedMinPanes,b.min),b.max)),y!==null&&(y.size=Math.min(Math.max(100-h-s.nextPanesSize-s.nextReachedMinPanes,y.min),y.max))},doPushOtherPanes(r,l){const s=this.touch.activeSplitter,u=[s,s+1];return l<r.prevPanesSize+this.panes[u[0]].min&&(u[0]=this.findPrevExpandedPane(s).index,r.prevReachedMinPanes=0,u[0]<s&&this.panes.forEach((c,h)=>{h>u[0]&&h<=s&&(c.size=c.min,r.prevReachedMinPanes+=c.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((c,h)=>{h>0&&h<=s&&(c.size=c.min,r.prevReachedMinPanes+=c.min)}),this.panes[u[1]].size=100-r.prevReachedMinPanes-this.panes[0].min-r.prevPanesSize-r.nextPanesSize,null):l>100-r.nextPanesSize-this.panes[u[1]].min&&(u[1]=this.findNextExpandedPane(s).index,r.nextReachedMinPanes=0,u[1]>s+1&&this.panes.forEach((c,h)=>{h>s&&h<u[1]&&(c.size=c.min,r.nextReachedMinPanes+=c.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((c,h)=>{h<this.panesCount-1&&h>=s+1&&(c.size=c.min,r.nextReachedMinPanes+=c.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((l,s,u)=>l+(u<r?s.size:0),0)},sumNextPanesSize(r){return this.panes.reduce((l,s,u)=>l+(u>r+1?s.size:0),0)},findPrevExpandedPane(r){return[...this.panes].reverse().find(s=>s.index<r&&s.size>s.min)||{}},findNextExpandedPane(r){return this.panes.find(s=>s.index>r+1&&s.size>s.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(l=>{const s=l.classList.contains("splitpanes__pane"),u=l.classList.contains("splitpanes__splitter");if(!s&&!u){l.parentNode.removeChild(l),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter(r,l,s=!1){const u=r-1,c=document.createElement("div");c.classList.add("splitpanes__splitter"),s||(c.onmousedown=h=>this.onMouseDown(h,u),typeof window!="undefined"&&"ontouchstart"in window&&(c.ontouchstart=h=>this.onMouseDown(h,u)),c.onclick=h=>this.onSplitterClick(h,u+1)),this.dblClickSplitter&&(c.ondblclick=h=>this.onSplitterDblClick(h,u+1)),l.parentNode.insertBefore(c,l)},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(s=>{s.className.includes("splitpanes__splitter")&&this.removeSplitter(s)});let l=0;r.forEach(s=>{s.className.includes("splitpanes__pane")&&(!l&&this.firstSplitter?this.addSplitter(l,s,!0):l&&this.addSplitter(l,s),l++)})},requestUpdate(r){var l=r,{target:s}=l,u=f0(l,["target"]);const c=this.indexedPanes[s._.uid];Object.entries(u).forEach(([h,m])=>c[h]=m)},onPaneAdd(r){let l=-1;Array.from(r.$el.parentNode.children).some(c=>(c.className.includes("splitpanes__pane")&&l++,c===r.$el));const s=parseFloat(r.minSize),u=parseFloat(r.maxSize);this.panes.splice(l,0,{id:r._.uid,index:l,min:isNaN(s)?0:s,max:isNaN(u)?100:u,size:r.size===null?null:parseFloat(r.size),givenSize:r.size,update:r.update}),this.panes.forEach((c,h)=>c.index=h),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[l]}),this.$emit("pane-add",{index:l,panes:this.panes.map(c=>({min:c.min,max:c.max,size:c.size}))})})},onPaneRemove(r){const l=this.panes.findIndex(u=>u.id===r._.uid),s=this.panes.splice(l,1)[0];this.panes.forEach((u,c)=>u.index=c),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:u0(a0({},s),{index:l})}),this.$emit("pane-remove",{removed:s,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(l=>l.givenSize!==null||l.min||l.max<100)?this.equalizeAfterAddOrRemove(r):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(l=>({min:l.min,max:l.max,size:l.size})))},equalize(){const r=100/this.panesCount;let l=0,s=[],u=[];this.panes.forEach(c=>{c.size=Math.max(Math.min(r,c.max),c.min),l-=c.size,c.size>=c.max&&s.push(c.id),c.size<=c.min&&u.push(c.id)}),l>.1&&this.readjustSizes(l,s,u)},initialPanesSizing(){100/this.panesCount;let r=100,l=[],s=[],u=0;this.panes.forEach(h=>{r-=h.size,h.size!==null&&u++,h.size>=h.max&&l.push(h.id),h.size<=h.min&&s.push(h.id)});let c=100;r>.1&&(this.panes.forEach(h=>{h.size===null&&(h.size=Math.max(Math.min(r/(this.panesCount-u),h.max),h.min)),c-=h.size}),c>.1&&this.readjustSizes(r,l,s))},equalizeAfterAddOrRemove({addedPane:r,removedPane:l}={}){let s=100/this.panesCount,u=0,c=[],h=[];r&&r.givenSize!==null&&(s=(100-r.givenSize)/(this.panesCount-1)),this.panes.forEach(m=>{u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&h.push(m.id)}),!(Math.abs(u)<.1)&&(this.panes.forEach(m=>{r&&r.givenSize!==null&&r.id===m.id||(m.size=Math.max(Math.min(s,m.max),m.min)),u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&h.push(m.id)}),u>.1&&this.readjustSizes(u,c,h))},readjustSizes(r,l,s){let u;r>0?u=r/(this.panesCount-l.length):u=r/(this.panesCount-s.length),this.panes.forEach((c,h)=>{if(r>0&&!l.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}else if(!s.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}c.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[c.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((s,u)=>{s.ondblclick=r?c=>this.onSplitterDblClick(c,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 va("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};var c0=(r,l)=>{const s=r.__vccOpts||r;for(const[u,c]of l)s[u]=c;return s};const d0={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 h0(r,l,s,u,c,h){return ha(),Tv("div",{class:"splitpanes__pane",onClick:l[0]||(l[0]=m=>h.onPaneClick(m,r._.uid)),style:gl(r.style)},[Ov(r.$slots,"default")],4)}var A0=c0(d0,[["render",h0]]);export{y0 as A,S0 as B,M0 as C,x0 as D,A0 as E,pr as F,b0 as G,_0 as H,P0 as I,Mm as J,gt as K,g0 as L,k0 as M,E0 as _,ha as a,md as b,Tv as c,Vc as d,Ov as e,Ss as f,T0 as g,zt as h,ot as i,w0 as j,m0 as k,C0 as l,xm as m,$t as n,rd as o,Wg as p,Pv as q,Yt as r,gl as s,p0 as t,L0 as u,gd as v,Xt as w,$s as x,O0 as y,v0 as z};