mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-25 17:49:37 +01:00
1081 lines
427 KiB
HTML
1081 lines
427 KiB
HTML
<html class="TridactylThemeDark" data-lt-installed="true"><script src="flems_soubory/page-script.js"></script><head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><style type="text/css">@media print {
|
|
.TridactylStatusIndicator {
|
|
display: none !important;
|
|
}
|
|
}</style></head><body>/*
|
|
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script type="text/javascript" charset="UTF-8">
|
|
(function(){"use strict";var v=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function W(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var X={},Y=Object.freeze({__proto__:null,default:X}),Z=W(Y),A=typeof Map=="function"&&Map.prototype,M=Object.getOwnPropertyDescriptor&&A?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,P=A&&M&&typeof M.get=="function"?M.get:null,j=A&&Map.prototype.forEach,N=typeof Set=="function"&&Set.prototype,R=Object.getOwnPropertyDescriptor&&N?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,x=N&&R&&typeof R.get=="function"?R.get:null,ee=N&&Set.prototype.forEach,te=Boolean.prototype.valueOf,ne=Object.prototype.toString,re=typeof BigInt=="function"?BigInt.prototype.valueOf:null,T=Z.custom,I=T&&U(T)?T:null,oe=function e(t,n,r,o){if(n||(n={}),b(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ve(t,n);if(typeof t=="number")return t===0?1/0/t>0?"0":"-0":String(t);if(typeof t=="bigint")return String(t)+"n";var l=typeof n.depth=="undefined"?5:n.depth;if(typeof r=="undefined"&&(r=0),r>=l&&l>0&&typeof t=="object")return"[Object]";if(typeof o=="undefined")o=[];else if(ye(o,t)>=0)return"[Circular]";function c(h,y){return y&&(o=o.slice(),o.push(y)),e(h,n,r+1,o)}if(typeof t=="function"){var u=me(t);return"[Function"+(u?": "+u:"")+"]"}if(U(t)){var i=Symbol.prototype.toString.call(t);return typeof t=="object"?S(i):i}if(we(t)){for(var f="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],m=0;m<d.length;m++)f+=" "+d[m].name+"="+q(ie(d[m].value),"double",n);return f+=">",t.childNodes&&t.childNodes.length&&(f+="..."),f+="</"+String(t.nodeName).toLowerCase()+">",f}if(H(t))return t.length===0?"[]":"[ "+_(t,c).join(", ")+" ]";if(ue(t)){var s=_(t,c);return s.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+s.join(", ")+" }"}if(typeof t=="object"){if(I&&typeof t[I]=="function")return t[I]();if(typeof t.inspect=="function")return t.inspect()}if(ge(t)){var s=[];return j.call(t,function(y,Je){s.push(c(Je,t)+" => "+c(y,t))}),F("Map",P.call(t),s)}if(he(t)){var s=[];return ee.call(t,function(y){s.push(c(y,t))}),F("Set",x.call(t),s)}if(ae(t))return S(c(Number(t)));if(se(t))return S(c(re.call(t)));if(pe(t))return S(te.call(t));if(fe(t))return S(c(String(t)));if(!ce(t)&&!le(t)){var a=_(t,c);return a.length===0?"{}":"{ "+a.join(", ")+" }"}return String(t)};function q(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function ie(e){return String(e).replace(/"/g,""")}function H(e){return g(e)==="[object Array]"}function ce(e){return g(e)==="[object Date]"}function le(e){return g(e)==="[object RegExp]"}function ue(e){return g(e)==="[object Error]"}function U(e){return g(e)==="[object Symbol]"}function fe(e){return g(e)==="[object String]"}function ae(e){return g(e)==="[object Number]"}function se(e){return g(e)==="[object BigInt]"}function pe(e){return g(e)==="[object Boolean]"}var de=Object.prototype.hasOwnProperty||function(e){return e in this};function b(e,t){return de.call(e,t)}function g(e){return ne.call(e)}function me(e){if(e.name)return e.name;var t=String(e).match(/^function\s*([\w$]+)/);if(t)return t[1]}function ye(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ge(e){if(!P)return!1;try{P.call(e);try{x.call(e)}catch(t){return!0}return e instanceof Map}catch(t){}return!1}function he(e){if(!x)return!1;try{x.call(e);try{P.call(e)}catch(t){return!0}return e instanceof Set}catch(t){}return!1}function we(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function ve(e,t){var n=e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Se);return q(n,"single",t)}function Se(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16)}function S(e){return"Object("+e+")"}function F(e,t,n){return e+" ("+t+") {"+n.join(", ")+"}"}function _(e,t){var n=H(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=b(e,o)?t(e[o],e):""}for(var l in e)!b(e,l)||n&&String(Number(l))===l&&l<e.length||(/[^\w$]/.test(l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e)));return r}var p=function(e){if(!(this instanceof p))throw new Error("Promise must be called with `new`");if(typeof e!="function")throw new TypeError("executor must be a function");var t=this,n=[],r=[],o=i(n,!0),l=i(r,!1),c=t._instance={resolvers:n,rejectors:r},u=typeof setImmediate=="function"?setImmediate:setTimeout;function i(d,m){return function s(a){var h;try{if(m&&a!=null&&(typeof a=="object"||typeof a=="function")&&typeof(h=a.then)=="function"){if(a===t)throw new TypeError("Promise can't be resolved w/ itself");f(h.bind(a))}else u(function(){!m&&d.length===0&&console.error("Possible unhandled promise rejection:",a);for(var y=0;y<d.length;y++)d[y](a);n.length=0,r.length=0,c.state=m,c.retry=function(){s(a)}})}catch(y){l(y)}}}function f(d){var m=0;function s(h){return function(y){m++>0||h(y)}}var a=s(l);try{d(s(o),a)}catch(h){a(h)}}f(e)};p.prototype.then=function(e,t){var n=this,r=n._instance;function o(i,f,d,m){f.push(function(s){if(typeof i!="function")d(s);else try{l(i(s))}catch(a){c&&c(a)}}),typeof r.retry=="function"&&m===r.state&&r.retry()}var l,c,u=new p(function(i,f){l=i,c=f});return o(e,r.resolvers,l,!0),o(t,r.rejectors,c,!1),u},p.prototype.catch=function(e){return this.then(null,e)},p.prototype.finally=function(e){return this.then(function(t){return p.resolve(e()).then(function(){return t})},function(t){return p.resolve(e()).then(function(){return p.reject(t)})})},p.resolve=function(e){return e instanceof p?e:new p(function(t){t(e)})},p.reject=function(e){return new p(function(t,n){n(e)})},p.all=function(e){return new p(function(t,n){var r=e.length,o=0,l=[];if(e.length===0)t([]);else for(var c=0;c<e.length;c++)(function(u){function i(f){o++,l[u]=f,o===r&&t(l)}e[u]!=null&&(typeof e[u]=="object"||typeof e[u]=="function")&&typeof e[u].then=="function"?e[u].then(i,n):i(e[u])})(c)})},p.race=function(e){return new p(function(t,n){for(var r=0;r<e.length;r++)e[r].then(t,n)})};var Ee=p,L=Ee;typeof window!="undefined"?typeof window.Promise=="undefined"?window.Promise=L:window.Promise.prototype.finally||(window.Promise.prototype.finally=L.prototype.finally):typeof v!="undefined"&&(typeof v.Promise=="undefined"?v.Promise=L:v.Promise.prototype.finally||(v.Promise.prototype.finally=L.prototype.finally));function z(e,t){return arguments.length===1?n=>z(e,n):t.indexOf(e,t.length-e.length)>-1}function Oe(e){return Pe(xe(e),e)}function Pe(e,t){let n=e.length,r=n;const o=new Array(n),l={},c=Le(t),u=Ce(e);for(t.forEach(f=>{if(!(f[0]in u)||!(f[1]in u))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});r--;)l[r]||i(e[r],r,new Set);return o;function i(f,d,m){if(m[f]){let a;try{a=", node was:"+JSON.stringify(f)}catch(h){a=""}throw new Error("Cyclic dependency"+a)}if(!(f in u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(f));if(l[d])return;l[d]=!0;let s=c[f]||Object.create(null,{});if(s=Object.keys(s),s.length){d=s.length,m[f]=!0;do{const a=s[--d];i(a,u[a],m)}while(d);delete m[f]}o[--n]=f}}function xe(e){const t=Object.create(null,{});for(let n=0,r=e.length;n<r;n++){const o=e[n];t[o[0]]=!0,t[o[1]]=!0}return Object.keys(t)}function Le(e){const t=Object.create(null,{});for(let n=0,r=e.length;n<r;n++){const o=e[n];o[0]in t||(t[o[0]]=Object.create(null,{})),o[1]in t||(t[o[1]]=Object.create(null,{})),t[o[0]][o[1]]=!0}return t}function Ce(e){const t=Object.create(null,{});for(let n=0,r=e.length;n<r;n++)t[e[n]]=n;return t}let J=window.name,D={},$e=0;const ke=window.parent,C={},V=[],E={},Ae=/(^\s*|[});\n]\s*)(import\s*\(?(['"]|(\*[\s\S]+as[\s\S]+)?(?!type)([^"'()\n;]+)[\s\S]*from[\s\S]*['"]|\{)|export\s\s*(['"]|(\*[\s\S]+as[\s\S]+)?(?!type)([^"'()\n;]+)[\s\S]*from[\s\S]*['"]|\{|default|function|class|var|const|let|async[\s\S]+function|async[\s\S]+\())/,Me=new RegExp(`import\\s*[{}$\\w*,\\s]*\\s*(?: from |)['"]\\.?\\/(.*\\.?[a-z]*)['"]`,"g"),Ne=new RegExp(`(import\\s*[{}$\\w*,\\s]*\\s*(?: from |)['"])([\\w@][\\w@/.-]*)(['"])`,"g"),Re=new RegExp(`(import\\(['"])([\\w@][\\w@/.-]*)(['"]\\))`,"g");try{window.parent=null,window.frameElement=null,delete window.parent,delete window.frameElement}catch(e){}document.write=function(e){document.body.innerHTML+=e},Error.stackTraceLimit=1/0;const Te=["log","error","trace","warn","info","time","timeEnd"],B=window.console.log;Te.forEach(e=>{const t=window.console[e];window.console[e]=De(t,e)});function Ie(e){return Array.isArray(e)&&Array.isArray(e.raw)?function(t){const n=[e[0]].concat(Array.from(arguments));return B.apply(console,n),w(O(n),"log",new Error,1),t}:(B.apply(console,arguments),w(O(arguments),"log",new Error,1),e)}window.p=Ie,window.onerror=function(e,t,n,r,o){o=!o||typeof o=="string"?{message:e||o}:o,o.stack=!o.stack||String(o)===o.stack?"at "+(t||D.name||"unknown")+":"+n+":"+r:o.stack,o.currentScript=D.name,w(o.message||String(o),"error",o)},window.addEventListener("unhandledrejection",e=>window.p("Unhandled rejection:",e.reason));let G;window.addEventListener("resize",()=>$("resize"),{passive:!0}),window.addEventListener("scroll",()=>{clearTimeout(G),G=setTimeout(()=>$("scroll",[window.scrollX,window.scrollY]),400)},{passive:!0}),window.addEventListener("message",({data:e})=>{if(e.name==="init")be(e.content);else if(e.name==="css"){const t=document.getElementById(e.content.name);t?t.textContent=e.content.content:location.reload()}else if(e.name==="eval")try{w(O([window.eval(e.content)]),"log",{stack:""})}catch(t){w(O([String(t)]),"error",{stack:""})}});function $(e,t){ke.postMessage({flems:J,name:e,content:t},"*")}function be(e){J=e.id;const t=e.state,n=t.files.filter(i=>z(".html",i.name))[0],r=document.title;document.documentElement.innerHTML=n?n.content:"",document.title||(document.title=r);const o=Array.prototype.slice.call(document.getElementsByTagName("script")).map(i=>({url:i.src,name:".html",type:"script",module:i.type==="module",content:i.textContent,el:i}));t.links.filter(i=>i.type==="style"&&!i.content).forEach(He),t.files.filter(i=>i.type==="style").concat(t.links.filter(i=>i.type==="style"&&i.content)).forEach(Ue);const l=t.files.filter(i=>i.type==="script").map(Fe),c=l.filter(i=>i.module),u=_e(c);Promise.all(t.links.filter(i=>i.type==="script").map(Q).concat(o.map(i=>i.url?Q(i):flemsLoadScript(i)))).then(()=>Promise.all(l.filter(i=>!i.module).concat(c.sort((i,f)=>u.indexOf(i.name)-u.indexOf(f.name))).map(flemsLoadScript))).then(i=>{window.dispatchEvent(K("DOMContentLoaded")),window.dispatchEvent(K("load")),$("loaded"),t.scroll&&window.scrollTo.apply(window,t.scroll)}).catch(i=>{w(`Error loading:
|
|
`+(Array.isArray(i)?i.join(`
|
|
`):i),"error",{stack:""})})}function K(e){let t;return typeof Event=="function"?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}function _e(e){return Oe(e.reduce((t,n)=>{let r;for(;(r=Me.exec(n.content))!==null;){const o=ze(e,r[1]);o&&t.push([n.name,o.name])}return t},[])).reverse()}function ze(e,t){return e.filter(n=>n.name===t||n.name.substring(0,n.name.lastIndexOf("."))===t)[0]}function De(e,t,n){return function(r){return(e||B).apply(console,arguments),w(O(arguments),t,new Error,1),n&&r}}function O(e){return[].slice.apply(e).map(t=>typeof t=="string"||typeof t=="function"&&t.toString?(typeof t=="function"?"\u0192 ":"")+String(t):oe(t).replace(/\\n/g,`
|
|
`))}function w(e,t,n,r=0){const o=(n.stack||"").split(`
|
|
`).map(qe).filter(c=>c).slice(r);let l=-1;o.forEach((c,u)=>{l===-1&&c.function.indexOf("flemsLoadScript")>-1&&(l=u)}),$("console",{number:$e++,file:n.currentScript,content:(Array.isArray(e)?e:[e]).map(c=>c===""?"''":V.reduce((u,i)=>u.replace(i,C[i]?C[i].name:i),String(c))),stack:l>-1?o.slice(0,l):o,type:t,date:new Date})}const Be=/(.*)[ @(](.*):([\d]*):([\d]*)/i;function qe(e){const[t,n,r,o,l]=(" "+e.trim()).match(Be)||[],c=C[r];return t&&{function:n.trim().replace(/^(global code|at) ?/,""),select:c?c.url||c.name:r,file:c?c.name:r,line:parseInt(o,10),column:parseInt(l,10)}}function He(e){document.head.appendChild(k("link",{rel:"stylesheet",type:"text/css",href:e.url}))}function Ue(e){document.head.appendChild(k("style",{id:e.name,textContent:e.content}))}function Q(e){return new Promise((t,n)=>{if(e.content)return flemsLoadScript(e),t();const r=k("script",{charset:"utf-8",src:e.url});r.async=r.defer=!1,e.el&&Array.prototype.slice.call(e.el.attributes).forEach(o=>r.setAttribute(o.name,o.value)),r.onload=()=>t(),r.onerror=o=>n([e.url,o]),e.el?e.el.parentNode.replaceChild(r,e.el):document.body.appendChild(r)})}function Fe(e){return e.module=z(".mjs",e.name)||Ae.test(e.content),e}window.flemsLoadScript=function(t){return new Promise((n,r)=>{const o=t.module?Object.keys(E).reduce((u,i)=>u.replace(new RegExp(`(import\\s*[{}$\\w*,\\s]*\\s*(?: from |)['"])\\.?\\/`+i+`\\.?[a-z]*(['"])`,"i"),"$1"+E[i]+"$2").replace(new RegExp(`(import\\(['"])\\.?\\/${i}\\.?[a-z]*(['"]\\))`,"ig"),"$1"+E[i]+"$2"),t.content).replace(Ne,"$1https://unpkg.com/$2?module$3").replace(Re,"$1https://unpkg.com/$2?module$3"):t.content,l=URL.createObjectURL(new Blob([o],{type:"application/javascript"}));V.push(String(l)),C[l]=t,t.module&&(E[t.name]=E[t.name.substring(0,t.name.lastIndexOf("."))]=l);const c=k("script",{src:l,charset:"utf-8",type:t.module?"module":""});c.async=c.defer=!1,t.el&&Array.prototype.slice.call(t.el.attributes).forEach(u=>c.setAttribute(u.name,u.value)),c.onerror=r,c.onload=n,D=t,t.el?t.el.parentNode.replaceChild(c,t.el):document.body.appendChild(c)})};function k(e,t){const n=document.createElement(e);for(const r in t)t[r]&&(n[r]=t[r]);return n}})();
|
|
//# sourceURL=runtime.js
|
|
</script><style type="text/css">
|
|
html:before {
|
|
z-index: -2147483646;
|
|
}
|
|
html:before {
|
|
background: rgba(255,0,0,1);
|
|
opacity: 0.75;
|
|
transition: right 0.5s linear, opacity 0.85s ease-out;
|
|
position: fixed;
|
|
content: "";
|
|
z-index: 2147483647;
|
|
top: 0;
|
|
left: 0;
|
|
height: 2px;
|
|
}
|
|
</style>
|
|
<!-- */
|
|
(function(Hn,fn){typeof exports=="object"&&typeof module!="undefined"?module.exports=fn():typeof define=="function"&&define.amd?define(fn):(Hn=typeof globalThis!="undefined"?globalThis:Hn||self,Hn.Flems=fn())})(this,function(){"use strict";var Hn=[":active",":any",":checked",":default",":disabled",":empty",":enabled",":first",":first-child",":first-of-type",":fullscreen",":focus",":hover",":indeterminate",":in-range",":invalid",":last-child",":last-of-type",":left",":link",":only-child",":only-of-type",":optional",":out-of-range",":read-only",":read-write",":required",":right",":root",":scope",":target",":valid",":visited",":dir",":lang",":not",":nth-child",":nth-last-child",":nth-last-of-type",":nth-of-type","::after","::before","::first-letter","::first-line","::selection","::backdrop","::placeholder","::marker","::spelling-error","::grammar-error"],fn={ai:"alignItems",b:"bottom",bc:"backgroundColor",br:"borderRadius",bs:"boxShadow",bi:"backgroundImage",c:"color",d:"display",f:"float",fd:"flexDirection",ff:"fontFamily",fs:"fontSize",h:"height",jc:"justifyContent",l:"left",lh:"lineHeight",ls:"letterSpacing",m:"margin",mb:"marginBottom",ml:"marginLeft",mr:"marginRight",mt:"marginTop",o:"opacity",p:"padding",pb:"paddingBottom",pl:"paddingLeft",pr:"paddingRight",pt:"paddingTop",r:"right",t:"top",ta:"textAlign",td:"textDecoration",tt:"textTransform",w:"width"},oa=["float"].concat(Object.keys(typeof document=="undefined"?{}:la(document.documentElement.style)).filter(function(o){return o.indexOf("-")===-1&&o!=="length"}));function la(o){return o?o.hasOwnProperty("width")?o:la(Object.getPrototypeOf(o)):{}}var Of=/^-?-?[a-z][a-z-_0-9]*$/i,aa=function(o,a){return a===void 0&&(a={}),function(l){return l in a?a[l]:a[l]=o(l)}};function Ei(o,a,l){a in o?Ei(o,"!"+a,l):o[a]=fa(a,l)}var Po=Object.create(null,{}),zo=Object.create(null,{}),Do=/^(o|O|ms|MS|Ms|moz|Moz|webkit|Webkit|WebKit)([A-Z])/,_f=aa(function(o){var a=document.createElement("div");try{return a.style[o]="1px",a.style.setProperty(o,"1px"),a.style[o].slice(-3)==="1px"?"px":""}catch(l){return""}},{flex:"",boxShadow:"px",border:"px",borderTop:"px",borderRight:"px",borderBottom:"px",borderLeft:"px"});function Ef(o){return o.charAt(0).toLowerCase()+o.slice(1)}function hr(o,a){for(var l in a)a.hasOwnProperty(l)&&(o[l]=typeof a[l]=="string"?a[l]:hr(o[l]||{},a[l]));return o}var Nf=/-([a-z])/g;function sa(o){return o.slice(o.charAt(0)==="-"?1:0).replace(Nf,function(a){return a[1].toUpperCase()})}var Pf=/(\B[A-Z])/g;function zf(o){return o.replace(Pf,"-$1").toLowerCase()}var Df=/([A-Z])/g;function If(o){return o.charAt(0)+(o.match(Df)||[]).join("").toLowerCase()}var Rf=/&/g;function Ni(o,a,l,u){l===void 0&&(l="");var h={},p=l.indexOf("&")>-1&&l.indexOf(",")===-1?"":"&",S=[];return Object.keys(o).forEach(function(b){b.charAt(0)==="@"?S.push(b+"{"+Ni(o[b],a,l,u).join("")+"}"):typeof o[b]=="object"?S=S.concat(Ni(o[b],a,l+b,u)):h[b]=o[b]}),Object.keys(h).length&&S.unshift(((u||l.charAt(0)===" "?"":"&")+p+l).replace(Rf,a).trim()+"{"+ua(h)+"}"),S}var Ff=/,(?=(?:(?:[^"]*"){2})*[^"]*$)/;function ua(o){return Object.keys(o).reduce(function(a,l){return a+Bf(l.charAt(0)==="!"?l.slice(1):l,o[l])},"")}function Bf(o,a){return o=o in Po?Po[o]:o,(Do.test(o)?"-":"")+(ha(o)?o:zf(o))+":"+a+";"}function fa(o,a){return Array.isArray(a)?a.map(function(l){return ca(o,l)}).join(" "):typeof a=="string"?fa(o,a.split(" ")):ca(o,a)}function ca(o,a){return a in zo?zo[a]:a+(isNaN(a)||a===null||a===0||a==="0"||typeof a=="boolean"||ha(o)?"":_f(o))}function ha(o){return o.charAt(0)==="-"&&o.charAt(1)==="-"}var Pi="b"+("000"+(Math.random()*46656|0).toString(36)).slice(-3)+("000"+(Math.random()*46656|0).toString(36)).slice(-3),Xr=typeof document=="object"&&document.createElement("style");Xr&&document.head&&document.head.appendChild(Xr),Xr&&(Xr.id=Pi);var Io=Xr&&Xr.sheet,da=!1,zi=Object.create(null,{}),Wn=[],pa=0;function Hf(o){da=o}function Wf(){var o=Wn.join("");return Wn=[],zi=Object.create(null,{}),pa=0,o}function Uf(){return Wn}function Di(o,a){if(Wn.push(o),da)return Xr.textContent=Wn.join(`
|
|
`);try{Io&&Io.insertRule(o,arguments.length>1?a:Io.cssRules.length)}catch(l){}}function Kf(o){var a=JSON.stringify(o);if(a in zi)return zi[a];for(var l=Pi+ ++pa,u=Ni(o,"."+l),h=0;h<u.length;h++)Di(u[h]);return zi[a]=l,l}var Ro=Object.create(null);function le(o,a){var l=dr(le);return o&&hr(l.__style,pr.apply(null,arguments)),l}function Nt(o,a){Object.defineProperty(le,o,{configurable:!0,value:a})}Object.defineProperties(le,{__style:{configurable:!0,writable:!0,value:{}},valueOf:{configurable:!0,writable:!0,value:function(){return"."+this.class}},toString:{configurable:!0,writable:!0,value:function(){return this.class}}}),Nt("setDebug",Hf),Nt("$keyframes",Vf),Nt("$media",Gf),Nt("$import",qf),Nt("$nest",Xf),Nt("getSheet",Wf),Nt("getRules",Uf),Nt("helper",Kt),Nt("css",Yf),Nt("classPrefix",Pi);function dr(o){var a=Object.create(le,{__style:{value:hr({},o.__style)},style:{enumerable:!0,get:function(){var l=this;return Object.keys(this.__style).reduce(function(u,h){return(typeof l.__style[h]=="number"||typeof l.__style[h]=="string")&&(u[h.charAt(0)==="!"?h.slice(1):h]=l.__style[h]),u},{})}}});return o===le&&(le.__style={}),a}oa.forEach(function(o){var a=o.match(Do);if(a){var l=Ef(o.replace(Do,"$2"));if(oa.indexOf(l)===-1){l==="flexDirection"&&(zo.flex="-"+a[1].toLowerCase()+"-flex"),Po[l]=o,Nt(l,va(o)),Nt(ya(l),le[l]);return}}Nt(o,va(o)),Nt(ya(o),le[o])}),Nt("content",function(a){var l=dr(this);return a==null||a===!1?delete l.__style.content:l.__style.content='"'+a+'"',l}),Object.defineProperty(le,"class",{set:function(o){this.__class=o},get:function(){return this.__class||Kf(this.__style)}});function Gf(o,a){var l=dr(this);return o&&(l.__style["@media "+o]=pr(a)),l}var jf=/^('|"|url\('|url\(")/i;function qf(o){return o&&Di("@import "+(jf.test(o)?o:'"'+o+'"')+";",0),dr(this)}function Xf(o,a){var l=dr(this);return arguments.length===1?Object.keys(o).forEach(function(u){return ga(l.__style,u,o[u])}):o&&ga(l.__style,o,a),l}function ga(o,a,l){var u=a.split(Ff).map(function(h){return h=h.trim(),(h.charAt(0)===":"||h.charAt(0)==="["?"":" ")+h}).join(",&");u in o?hr(o[u],pr(l)):o[u]=pr(l)}Hn.forEach(function(o){return Nt("$"+sa(o.replace(/:/g,"")),function(l,u){var h=dr(this);return Bo(l)?h.__style[o]=pr.apply(null,arguments):(l||u)&&(h.__style[o+(u?"("+l+")":"")]=pr(u||l)),h})});function va(o){return function(l){var u=dr(this);return!l&&l!==0?delete u.__style[o]:arguments.length>0&&Ei(u.__style,o,Array.prototype.slice.call(arguments)),u}}function Yf(o,a){return arguments.length===1?Object.keys(o).forEach(function(l){return ma(l,o[l])}):ma(o,a),dr(this)}function ma(o,a){Ni(pr(a),o,"",!0).forEach(function(l){return Di(l)})}function Kt(o,a){if(arguments.length===1)return Object.keys(o).forEach(function(l){return Kt(l,o[l])});delete le[o],typeof a=="function"?(Kt[o]=a,Object.defineProperty(le,o,{configurable:!0,value:function(u){var h=dr(this),p=Bo(u)?a(wa(u,arguments)):a.apply(null,arguments);return hr(h.__style,p.__style),h}})):(Kt[o]=pr(a),Object.defineProperty(le,o,{configurable:!0,get:function(){var l=dr(this);return hr(l.__style,pr(a)),l}}))}le.helper("$animate",function(o,a){return le.animation(le.$keyframes(a)+" "+o)});function ya(o){var a=If(o),l=fn[a]&&fn[a]!==o?o:a;return Ro[l]=o,l}var Qf=/;(?![^("]*[)"])|\n/,$f=/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*(?![^("]*[)"])/g,Zf=/[ :]+/,ba=aa(function(o){var a="",l;return o.trim().replace($f,"").split(Qf).reduce(function(u,h){if(!h)return u;h=a+h.trim();var p=h.replace(Zf," ").split(" "),S=p[0],b=p.slice(1);if(a=h.charAt(h.length-1)===","?h:"",a)return u;if(h.charAt(0)===","||!Of.test(S))return u[l]+=" "+h,u;if(!S)return u;var g=S.charAt(0)==="-"&&S.charAt(1)==="-"?S:sa(S);return l=Ro[g]||g,S in Kt?typeof Kt[S]=="function"?hr(u,Kt[S].apply(Kt,b).__style):hr(u,Kt[S]):g in Kt?typeof Kt[g]=="function"?hr(u,Kt[g].apply(Kt,b).__style):hr(u,Kt[g]):b.length>0&&Ei(u,l,b),u},{})}),Jf=0,Fo={};function Vf(o){var a=Object.keys(o).reduce(function(u,h){return u+h+"{"+ua(pr(o[h]))+"}"},"");if(a in Fo)return Fo[a];var l=Pi+Jf++;return Fo[a]=l,Di("@keyframes "+l+"{"+a+"}"),l}function pr(o,a){var l;return typeof o=="string"?typeof a=="string"||typeof a=="number"?(l={},l[o]=a,l):ba(o):Bo(o)?ba(wa(o,arguments)):o.__style||xa(o)}function Bo(o){return Array.isArray(o)&&typeof o[0]=="string"}function wa(o,a){for(var l="",u=0;u<o.length;u++)l+=o[u]+(a[u+1]||a[u+1]===0?a[u+1]:"");return l}function xa(o){return Object.keys(o).reduce(function(a,l){var u=o[l];return l=Ro[l]||l,!u&&u!==0&&u!==""||(l==="content"&&u.charAt(0)!=='"'?a[l]='"'+u+'"':typeof u=="object"?a[l]=xa(u):Ei(a,l,u)),a},{})}le.helper("resize",o=>le({resize:o}));const Ho=document.createElement("style");Ho.textContent=`@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor{width:auto;background-color:#7e7}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:0!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.cm-s-material.CodeMirror{background-color:#263238;color:#e9eded}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e;border:0}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#537f7e}.cm-s-material .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-material div.CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-activeline-background{background:0 0}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#e9eded}.cm-s-material .cm-variable-2{color:#80cbc4}.cm-s-material .cm-builtin{color:#decb6b}.cm-s-material .cm-atom,.cm-s-material .cm-number{color:#f77669}.cm-s-material .cm-def{color:#e9eded}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#80cbc4}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#82b1ff}.cm-s-material .cm-meta{color:#80cbc4}.cm-s-material .cm-attribute{color:#ffcb6b}.cm-s-material .cm-property{color:#80cbae}.cm-s-material .cm-qualifier,.cm-s-material .cm-type,.cm-s-material .cm-variable-3{color:#decb6b}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-error{color:#fff;background-color:#ec5f67}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\u25BE"}.CodeMirror-foldgutter-folded:after{content:"\u25B8"}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:0 0;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}`,document.head.appendChild(Ho,Ho);var Yr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ec(o){if(o.__esModule)return o;var a=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(o).forEach(function(l){var u=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(a,l,u.get?u:{enumerable:!0,get:function(){return o[l]}})}),a}function Qr(o,a,l,u,h,p){return{tag:o,key:a,attrs:l,children:u,text:h,dom:p,domSize:void 0,state:void 0,events:void 0,instance:void 0}}Qr.normalize=function(o){return Array.isArray(o)?Qr("[",void 0,void 0,Qr.normalizeChildren(o),void 0,void 0):o==null||typeof o=="boolean"?null:typeof o=="object"?o:Qr("#",void 0,void 0,String(o),void 0,void 0)},Qr.normalizeChildren=function(o){var a=[];if(o.length){for(var l=o[0]!=null&&o[0].key!=null,u=1;u<o.length;u++)if((o[u]!=null&&o[u].key!=null)!==l)throw new TypeError("Vnodes must either always have keys or never have keys!");for(var u=0;u<o.length;u++)a[u]=Qr.normalize(o[u])}return a};var zr=Qr,tc=zr,ka=function(){var o=arguments[this],a=this+1,l;if(o==null?o={}:(typeof o!="object"||o.tag!=null||Array.isArray(o))&&(o={},a=this),arguments.length===a+1)l=arguments[a],Array.isArray(l)||(l=[l]);else for(l=[];a<arguments.length;)l.push(arguments[a++]);return tc("",o.key,o,l)},Sa=zr,rc=ka,nc=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,Ca={},cn={}.hasOwnProperty;function La(o){for(var a in o)if(cn.call(o,a))return!1;return!0}function ic(o){for(var a,l="div",u=[],h={};a=nc.exec(o);){var p=a[1],S=a[2];if(p===""&&S!=="")l=S;else if(p==="#")h.id=S;else if(p===".")u.push(S);else if(a[3][0]==="["){var b=a[6];b&&(b=b.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),a[4]==="class"?u.push(b):h[a[4]]=b===""?b:b||!0}}return u.length>0&&(h.className=u.join(" ")),Ca[o]={tag:l,attrs:h}}function oc(o,a){var l=a.attrs,u=Sa.normalizeChildren(a.children),h=cn.call(l,"class"),p=h?l.class:l.className;if(a.tag=o.tag,a.attrs=null,a.children=void 0,!La(o.attrs)&&!La(l)){var S={};for(var b in l)cn.call(l,b)&&(S[b]=l[b]);l=S}for(var b in o.attrs)cn.call(o.attrs,b)&&b!=="className"&&!cn.call(l,b)&&(l[b]=o.attrs[b]);(p!=null||o.attrs.className!=null)&&(l.className=p!=null?o.attrs.className!=null?String(o.attrs.className)+" "+String(p):p:o.attrs.className!=null?o.attrs.className:null),h&&(l.class=null);for(var b in l)if(cn.call(l,b)&&b!=="key"){a.attrs=l;break}return Array.isArray(u)&&u.length===1&&u[0]!=null&&u[0].tag==="#"?a.text=u[0].children:a.children=u,a}function lc(o){if(o==null||typeof o!="string"&&typeof o!="function"&&typeof o.view!="function")throw Error("The selector must be either a string or a component.");var a=rc.apply(1,arguments);return typeof o=="string"&&(a.children=Sa.normalizeChildren(a.children),o!=="[")?oc(Ca[o]||ic(o),a):(a.tag=o,a)}var Ta=lc,ac=zr,sc=function(o){return o==null&&(o=""),ac("<",void 0,void 0,o,void 0,void 0)},uc=zr,fc=ka,cc=function(){var o=fc.apply(0,arguments);return o.tag="[",o.children=uc.normalizeChildren(o.children),o},Wo=Ta;Wo.trust=sc,Wo.fragment=cc;var hc=Wo,Un={exports:{}},Lt=function(o){if(!(this instanceof Lt))throw new Error("Promise must be called with `new`");if(typeof o!="function")throw new TypeError("executor must be a function");var a=this,l=[],u=[],h=g(l,!0),p=g(u,!1),S=a._instance={resolvers:l,rejectors:u},b=typeof setImmediate=="function"?setImmediate:setTimeout;function g(y,A){return function m(_){var R;try{if(A&&_!=null&&(typeof _=="object"||typeof _=="function")&&typeof(R=_.then)=="function"){if(_===a)throw new TypeError("Promise can't be resolved w/ itself");x(R.bind(_))}else b(function(){!A&&y.length===0&&console.error("Possible unhandled promise rejection:",_);for(var I=0;I<y.length;I++)y[I](_);l.length=0,u.length=0,S.state=A,S.retry=function(){m(_)}})}catch(I){p(I)}}}function x(y){var A=0;function m(R){return function(I){A++>0||R(I)}}var _=m(p);try{y(m(h),_)}catch(R){_(R)}}x(o)};Lt.prototype.then=function(o,a){var l=this,u=l._instance;function h(g,x,y,A){x.push(function(m){if(typeof g!="function")y(m);else try{p(g(m))}catch(_){S&&S(_)}}),typeof u.retry=="function"&&A===u.state&&u.retry()}var p,S,b=new Lt(function(g,x){p=g,S=x});return h(o,u.resolvers,p,!0),h(a,u.rejectors,S,!1),b},Lt.prototype.catch=function(o){return this.then(null,o)},Lt.prototype.finally=function(o){return this.then(function(a){return Lt.resolve(o()).then(function(){return a})},function(a){return Lt.resolve(o()).then(function(){return Lt.reject(a)})})},Lt.resolve=function(o){return o instanceof Lt?o:new Lt(function(a){a(o)})},Lt.reject=function(o){return new Lt(function(a,l){l(o)})},Lt.all=function(o){return new Lt(function(a,l){var u=o.length,h=0,p=[];if(o.length===0)a([]);else for(var S=0;S<o.length;S++)(function(b){function g(x){h++,p[b]=x,h===u&&a(p)}o[b]!=null&&(typeof o[b]=="object"||typeof o[b]=="function")&&typeof o[b].then=="function"?o[b].then(g,l):g(o[b])})(S)})},Lt.race=function(o){return new Lt(function(a,l){for(var u=0;u<o.length;u++)o[u].then(a,l)})};var Ma=Lt,Kn=Ma;typeof window!="undefined"?(typeof window.Promise=="undefined"?window.Promise=Kn:window.Promise.prototype.finally||(window.Promise.prototype.finally=Kn.prototype.finally),Un.exports=window.Promise):typeof Yr!="undefined"?(typeof Yr.Promise=="undefined"?Yr.Promise=Kn:Yr.Promise.prototype.finally||(Yr.Promise.prototype.finally=Kn.prototype.finally),Un.exports=Yr.Promise):Un.exports=Kn;var hn=zr,dc=function(o){var a=o&&o.document,l,u={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function h(F){return F.attrs&&F.attrs.xmlns||u[F.tag]}function p(F,P){if(F.state!==P)throw new Error("`vnode.state` must not be modified")}function S(F){var P=F.state;try{return this.apply(P,arguments)}finally{p(F,P)}}function b(){try{return a.activeElement}catch(F){return null}}function g(F,P,Y,re,K,ee,J){for(var ge=Y;ge<re;ge++){var we=P[ge];we!=null&&x(F,we,K,J,ee)}}function x(F,P,Y,re,K){var ee=P.tag;if(typeof ee=="string")switch(P.state={},P.attrs!=null&&Pe(P.attrs,P,Y),ee){case"#":y(F,P,K);break;case"<":m(F,P,re,K);break;case"[":_(F,P,Y,re,K);break;default:R(F,P,Y,re,K)}else W(F,P,Y,re,K)}function y(F,P,Y){P.dom=a.createTextNode(P.children),D(F,P.dom,Y)}var A={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function m(F,P,Y,re){var K=P.children.match(/^\s*?<(\w+)/im)||[],ee=a.createElement(A[K[1]]||"div");Y==="http://www.w3.org/2000/svg"?(ee.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+P.children+"</svg>",ee=ee.firstChild):ee.innerHTML=P.children,P.dom=ee.firstChild,P.domSize=ee.childNodes.length,P.instance=[];for(var J=a.createDocumentFragment(),ge;ge=ee.firstChild;)P.instance.push(ge),J.appendChild(ge);D(F,J,re)}function _(F,P,Y,re,K){var ee=a.createDocumentFragment();if(P.children!=null){var J=P.children;g(ee,J,0,J.length,Y,null,re)}P.dom=ee.firstChild,P.domSize=ee.childNodes.length,D(F,ee,K)}function R(F,P,Y,re,K){var ee=P.tag,J=P.attrs,ge=J&&J.is;re=h(P)||re;var we=re?ge?a.createElementNS(re,ee,{is:ge}):a.createElementNS(re,ee):ge?a.createElement(ee,{is:ge}):a.createElement(ee);if(P.dom=we,J!=null&&pe(P,J,re),D(F,we,K),!z(P)&&(P.text!=null&&(P.text!==""?we.textContent=P.text:P.children=[hn("#",void 0,void 0,P.text,void 0,void 0)]),P.children!=null)){var Fe=P.children;g(we,Fe,0,Fe.length,Y,null,re),P.tag==="select"&&J!=null&&je(P,J)}}function I(F,P){var Y;if(typeof F.tag.view=="function"){if(F.state=Object.create(F.tag),Y=F.state.view,Y.$$reentrantLock$$!=null)return;Y.$$reentrantLock$$=!0}else{if(F.state=void 0,Y=F.tag,Y.$$reentrantLock$$!=null)return;Y.$$reentrantLock$$=!0,F.state=F.tag.prototype!=null&&typeof F.tag.prototype.view=="function"?new F.tag(F):F.tag(F)}if(Pe(F.state,F,P),F.attrs!=null&&Pe(F.attrs,F,P),F.instance=hn.normalize(S.call(F.state.view,F)),F.instance===F)throw Error("A view cannot return the vnode it received as argument");Y.$$reentrantLock$$=null}function W(F,P,Y,re,K){I(P,Y),P.instance!=null?(x(F,P.instance,Y,re,K),P.dom=P.instance.dom,P.domSize=P.dom!=null?P.instance.domSize:0):P.domSize=0}function N(F,P,Y,re,K,ee){if(!(P===Y||P==null&&Y==null))if(P==null||P.length===0)g(F,Y,0,Y.length,re,K,ee);else if(Y==null||Y.length===0)te(F,P,0,P.length);else{var J=P[0]!=null&&P[0].key!=null,ge=Y[0]!=null&&Y[0].key!=null,we=0,Fe=0;if(!J)for(;Fe<P.length&&P[Fe]==null;)Fe++;if(!ge)for(;we<Y.length&&Y[we]==null;)we++;if(ge===null&&J==null)return;if(J!==ge)te(F,P,Fe,P.length),g(F,Y,we,Y.length,re,K,ee);else if(ge){for(var Ve=P.length-1,Ie=Y.length-1,tr,$e,Ye,be,Qe,bt;Ve>=Fe&&Ie>=we&&(be=P[Ve],Qe=Y[Ie],be.key===Qe.key);)be!==Qe&&T(F,be,Qe,re,K,ee),Qe.dom!=null&&(K=Qe.dom),Ve--,Ie--;for(;Ve>=Fe&&Ie>=we&&($e=P[Fe],Ye=Y[we],$e.key===Ye.key);)Fe++,we++,$e!==Ye&&T(F,$e,Ye,re,U(P,Fe,K),ee);for(;Ve>=Fe&&Ie>=we&&!(we===Ie||$e.key!==Qe.key||be.key!==Ye.key);)bt=U(P,Fe,K),Q(F,be,bt),be!==Ye&&T(F,be,Ye,re,bt,ee),++we<=--Ie&&Q(F,$e,K),$e!==Qe&&T(F,$e,Qe,re,K,ee),Qe.dom!=null&&(K=Qe.dom),Fe++,Ve--,be=P[Ve],Qe=Y[Ie],$e=P[Fe],Ye=Y[we];for(;Ve>=Fe&&Ie>=we&&be.key===Qe.key;)be!==Qe&&T(F,be,Qe,re,K,ee),Qe.dom!=null&&(K=Qe.dom),Ve--,Ie--,be=P[Ve],Qe=Y[Ie];if(we>Ie)te(F,P,Fe,Ve+1);else if(Fe>Ve)g(F,Y,we,Ie+1,re,K,ee);else{var _e=K,nt=Ie-we+1,rr=new Array(nt),ut=0,Ge=0,pt=2147483647,vr=0,tr,At;for(Ge=0;Ge<nt;Ge++)rr[Ge]=-1;for(Ge=Ie;Ge>=we;Ge--){tr==null&&(tr=L(P,Fe,Ve+1)),Qe=Y[Ge];var Gt=tr[Qe.key];Gt!=null&&(pt=Gt<pt?Gt:-1,rr[Ge-we]=Gt,be=P[Gt],P[Gt]=null,be!==Qe&&T(F,be,Qe,re,K,ee),Qe.dom!=null&&(K=Qe.dom),vr++)}if(K=_e,vr!==Ve-Fe+1&&te(F,P,Fe,Ve+1),vr===0)g(F,Y,we,Ie+1,re,K,ee);else if(pt===-1)for(At=B(rr),ut=At.length-1,Ge=Ie;Ge>=we;Ge--)Ye=Y[Ge],rr[Ge-we]===-1?x(F,Ye,re,ee,K):At[ut]===Ge-we?ut--:Q(F,Ye,K),Ye.dom!=null&&(K=Y[Ge].dom);else for(Ge=Ie;Ge>=we;Ge--)Ye=Y[Ge],rr[Ge-we]===-1&&x(F,Ye,re,ee,K),Ye.dom!=null&&(K=Y[Ge].dom)}}else{var Zr=P.length<Y.length?P.length:Y.length;for(we=we<Fe?we:Fe;we<Zr;we++)$e=P[we],Ye=Y[we],!($e===Ye||$e==null&&Ye==null)&&($e==null?x(F,Ye,re,ee,U(P,we+1,K)):Ye==null?ue(F,$e):T(F,$e,Ye,re,U(P,we+1,K),ee));P.length>Zr&&te(F,P,we,P.length),Y.length>Zr&&g(F,Y,we,Y.length,re,K,ee)}}}function T(F,P,Y,re,K,ee){var J=P.tag,ge=Y.tag;if(J===ge){if(Y.state=P.state,Y.events=P.events,dt(Y,P))return;if(typeof J=="string")switch(Y.attrs!=null&&He(Y.attrs,Y,re),J){case"#":E(P,Y);break;case"<":c(F,P,Y,ee,K);break;case"[":w(F,P,Y,re,K,ee);break;default:k(P,Y,re,ee)}else O(F,P,Y,re,K,ee)}else ue(F,P),x(F,Y,re,ee,K)}function E(F,P){F.children.toString()!==P.children.toString()&&(F.dom.nodeValue=P.children),P.dom=F.dom}function c(F,P,Y,re,K){P.children!==Y.children?(de(F,P),m(F,Y,re,K)):(Y.dom=P.dom,Y.domSize=P.domSize)}function w(F,P,Y,re,K,ee){N(F,P.children,Y.children,re,K,ee);var J=0,ge=Y.children;if(Y.dom=null,ge!=null){for(var we=0;we<ge.length;we++){var Fe=ge[we];Fe!=null&&Fe.dom!=null&&(Y.dom==null&&(Y.dom=Fe.dom),J+=Fe.domSize||1)}J!==1&&(Y.domSize=J)}}function k(F,P,Y,re){var K=P.dom=F.dom;re=h(P)||re,P.tag==="textarea"&&(P.attrs==null&&(P.attrs={}),P.text!=null&&(P.attrs.value=P.text,P.text=void 0)),Je(P,F.attrs,P.attrs,re),z(P)||(F.text!=null&&P.text!=null&&P.text!==""?F.text.toString()!==P.text.toString()&&(F.dom.firstChild.nodeValue=P.text):(F.text!=null&&(F.children=[hn("#",void 0,void 0,F.text,void 0,F.dom.firstChild)]),P.text!=null&&(P.children=[hn("#",void 0,void 0,P.text,void 0,void 0)]),N(K,F.children,P.children,Y,null,re)))}function O(F,P,Y,re,K,ee){if(Y.instance=hn.normalize(S.call(Y.state.view,Y)),Y.instance===Y)throw Error("A view cannot return the vnode it received as argument");He(Y.state,Y,re),Y.attrs!=null&&He(Y.attrs,Y,re),Y.instance!=null?(P.instance==null?x(F,Y.instance,re,ee,K):T(F,P.instance,Y.instance,re,K,ee),Y.dom=Y.instance.dom,Y.domSize=Y.instance.domSize):P.instance!=null?(ue(F,P.instance),Y.dom=void 0,Y.domSize=0):(Y.dom=P.dom,Y.domSize=P.domSize)}function L(F,P,Y){for(var re=Object.create(null);P<Y;P++){var K=F[P];if(K!=null){var ee=K.key;ee!=null&&(re[ee]=P)}}return re}var j=[];function B(F){for(var P=[0],Y=0,re=0,K=0,ee=j.length=F.length,K=0;K<ee;K++)j[K]=F[K];for(var K=0;K<ee;++K)if(F[K]!==-1){var J=P[P.length-1];if(F[J]<F[K]){j[K]=J,P.push(K);continue}for(Y=0,re=P.length-1;Y<re;){var ge=(Y>>>1)+(re>>>1)+(Y&re&1);F[P[ge]]<F[K]?Y=ge+1:re=ge}F[K]<F[P[Y]]&&(Y>0&&(j[K]=P[Y-1]),P[Y]=K)}for(Y=P.length,re=P[Y-1];Y-- >0;)P[Y]=re,re=j[re];return j.length=0,P}function U(F,P,Y){for(;P<F.length;P++)if(F[P]!=null&&F[P].dom!=null)return F[P].dom;return Y}function Q(F,P,Y){var re=a.createDocumentFragment();X(F,re,P),D(F,re,Y)}function X(F,P,Y){for(;Y.dom!=null&&Y.dom.parentNode===F;){if(typeof Y.tag!="string"){if(Y=Y.instance,Y!=null)continue}else if(Y.tag==="<")for(var re=0;re<Y.instance.length;re++)P.appendChild(Y.instance[re]);else if(Y.tag!=="[")P.appendChild(Y.dom);else if(Y.children.length===1){if(Y=Y.children[0],Y!=null)continue}else for(var re=0;re<Y.children.length;re++){var K=Y.children[re];K!=null&&X(F,P,K)}break}}function D(F,P,Y){Y!=null?F.insertBefore(P,Y):F.appendChild(P)}function z(F){if(!(F.attrs==null||F.attrs.contenteditable==null&&F.attrs.contentEditable==null)){var P=F.children;if(P!=null&&P.length===1&&P[0].tag==="<"){var Y=P[0].children;F.dom.innerHTML!==Y&&(F.dom.innerHTML=Y)}else if(F.text!=null||P!=null&&P.length!==0)throw new Error("Child node of a contenteditable must be trusted")}}function te(F,P,Y,re){for(var K=Y;K<re;K++){var ee=P[K];ee!=null&&ue(F,ee)}}function ue(F,P){var Y=0,re=P.state,K,ee;if(typeof P.tag!="string"&&typeof P.state.onbeforeremove=="function"){var J=S.call(P.state.onbeforeremove,P);J!=null&&typeof J.then=="function"&&(Y=1,K=J)}if(P.attrs&&typeof P.attrs.onbeforeremove=="function"){var J=S.call(P.attrs.onbeforeremove,P);J!=null&&typeof J.then=="function"&&(Y|=2,ee=J)}if(p(P,re),!Y)V(P),Me(F,P);else{if(K!=null){var ge=function(){Y&1&&(Y&=2,Y||we())};K.then(ge,ge)}if(ee!=null){var ge=function(){Y&2&&(Y&=1,Y||we())};ee.then(ge,ge)}}function we(){p(P,re),V(P),Me(F,P)}}function de(F,P){for(var Y=0;Y<P.instance.length;Y++)F.removeChild(P.instance[Y])}function Me(F,P){for(;P.dom!=null&&P.dom.parentNode===F;){if(typeof P.tag!="string"){if(P=P.instance,P!=null)continue}else if(P.tag==="<")de(F,P);else{if(P.tag!=="["&&(F.removeChild(P.dom),!Array.isArray(P.children)))break;if(P.children.length===1){if(P=P.children[0],P!=null)continue}else for(var Y=0;Y<P.children.length;Y++){var re=P.children[Y];re!=null&&Me(F,re)}}break}}function V(F){if(typeof F.tag!="string"&&typeof F.state.onremove=="function"&&S.call(F.state.onremove,F),F.attrs&&typeof F.attrs.onremove=="function"&&S.call(F.attrs.onremove,F),typeof F.tag!="string")F.instance!=null&&V(F.instance);else{var P=F.children;if(Array.isArray(P))for(var Y=0;Y<P.length;Y++){var re=P[Y];re!=null&&V(re)}}}function pe(F,P,Y){for(var re in P)Ne(F,re,null,P[re],Y)}function Ne(F,P,Y,re,K){if(!(P==="key"||P==="is"||re==null||Ae(P)||Y===re&&!Se(F,P)&&typeof re!="object")){if(P[0]==="o"&&P[1]==="n")return lr(F,P,re);if(P.slice(0,6)==="xlink:")F.dom.setAttributeNS("http://www.w3.org/1999/xlink",P.slice(6),re);else if(P==="style")st(F.dom,Y,re);else if(ze(F,P,K)){if(P==="value"&&((F.tag==="input"||F.tag==="textarea")&&F.dom.value===""+re&&F.dom===b()||F.tag==="select"&&Y!==null&&F.dom.value===""+re||F.tag==="option"&&Y!==null&&F.dom.value===""+re))return;F.tag==="input"&&P==="type"?F.dom.setAttribute(P,re):F.dom[P]=re}else typeof re=="boolean"?re?F.dom.setAttribute(P,""):F.dom.removeAttribute(P):F.dom.setAttribute(P==="className"?"class":P,re)}}function Ke(F,P,Y,re){if(!(P==="key"||P==="is"||Y==null||Ae(P)))if(P[0]==="o"&&P[1]==="n"&&!Ae(P))lr(F,P,void 0);else if(P==="style")st(F.dom,Y,null);else if(ze(F,P,re)&&P!=="className"&&!(P==="value"&&(F.tag==="option"||F.tag==="select"&&F.dom.selectedIndex===-1&&F.dom===b()))&&!(F.tag==="input"&&P==="type"))F.dom[P]=null;else{var K=P.indexOf(":");K!==-1&&(P=P.slice(K+1)),Y!==!1&&F.dom.removeAttribute(P==="className"?"class":P)}}function je(F,P){if("value"in P)if(P.value===null)F.dom.selectedIndex!==-1&&(F.dom.value=null);else{var Y=""+P.value;(F.dom.value!==Y||F.dom.selectedIndex===-1)&&(F.dom.value=Y)}"selectedIndex"in P&&Ne(F,"selectedIndex",null,P.selectedIndex,void 0)}function Je(F,P,Y,re){if(Y!=null)for(var K in Y)Ne(F,K,P&&P[K],Y[K],re);var ee;if(P!=null)for(var K in P)(ee=P[K])!=null&&(Y==null||Y[K]==null)&&Ke(F,K,ee,re)}function Se(F,P){return P==="value"||P==="checked"||P==="selectedIndex"||P==="selected"&&F.dom===b()||F.tag==="option"&&F.dom.parentNode===a.activeElement}function Ae(F){return F==="oninit"||F==="oncreate"||F==="onupdate"||F==="onremove"||F==="onbeforeremove"||F==="onbeforeupdate"}function ze(F,P,Y){return Y===void 0&&(F.tag.indexOf("-")>-1||F.attrs!=null&&F.attrs.is||P!=="href"&&P!=="list"&&P!=="form"&&P!=="width"&&P!=="height")&&P in F.dom}var Be=/[A-Z]/g;function De(F){return"-"+F.toLowerCase()}function Oe(F){return F[0]==="-"&&F[1]==="-"?F:F==="cssFloat"?"float":F.replace(Be,De)}function st(F,P,Y){if(P!==Y)if(Y==null)F.style.cssText="";else if(typeof Y!="object")F.style.cssText=Y;else if(P==null||typeof P!="object"){F.style.cssText="";for(var re in Y){var K=Y[re];K!=null&&F.style.setProperty(Oe(re),String(K))}}else{for(var re in Y){var K=Y[re];K!=null&&(K=String(K))!==String(P[re])&&F.style.setProperty(Oe(re),K)}for(var re in P)P[re]!=null&&Y[re]==null&&F.style.removeProperty(Oe(re))}}function It(){this._=l}It.prototype=Object.create(null),It.prototype.handleEvent=function(F){var P=this["on"+F.type],Y;typeof P=="function"?Y=P.call(F.currentTarget,F):typeof P.handleEvent=="function"&&P.handleEvent(F),this._&&F.redraw!==!1&&(0,this._)(),Y===!1&&(F.preventDefault(),F.stopPropagation())};function lr(F,P,Y){if(F.events!=null){if(F.events[P]===Y)return;Y!=null&&(typeof Y=="function"||typeof Y=="object")?(F.events[P]==null&&F.dom.addEventListener(P.slice(2),F.events,!1),F.events[P]=Y):(F.events[P]!=null&&F.dom.removeEventListener(P.slice(2),F.events,!1),F.events[P]=void 0)}else Y!=null&&(typeof Y=="function"||typeof Y=="object")&&(F.events=new It,F.dom.addEventListener(P.slice(2),F.events,!1),F.events[P]=Y)}function Pe(F,P,Y){typeof F.oninit=="function"&&S.call(F.oninit,P),typeof F.oncreate=="function"&&Y.push(S.bind(F.oncreate,P))}function He(F,P,Y){typeof F.onupdate=="function"&&Y.push(S.bind(F.onupdate,P))}function dt(F,P){do{if(F.attrs!=null&&typeof F.attrs.onbeforeupdate=="function"){var Y=S.call(F.attrs.onbeforeupdate,F,P);if(Y!==void 0&&!Y)break}if(typeof F.tag!="string"&&typeof F.state.onbeforeupdate=="function"){var Y=S.call(F.state.onbeforeupdate,F,P);if(Y!==void 0&&!Y)break}return!1}while(!1);return F.dom=P.dom,F.domSize=P.domSize,F.instance=P.instance,F.attrs=P.attrs,F.children=P.children,F.text=P.text,!0}return function(F,P,Y){if(!F)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var re=[],K=b(),ee=F.namespaceURI;F.vnodes==null&&(F.textContent=""),P=hn.normalizeChildren(Array.isArray(P)?P:[P]);var J=l;try{l=typeof Y=="function"?Y:void 0,N(F,F.vnodes,P,re,null,ee==="http://www.w3.org/1999/xhtml"?void 0:ee)}finally{l=J}F.vnodes=P,K!=null&&b()!==K&&typeof K.focus=="function"&&K.focus();for(var ge=0;ge<re.length;ge++)re[ge]()}},Aa=dc(window),Oa=zr,pc=function(o,a,l){var u=[],h=!1,p=!1;function S(){if(h)throw new Error("Nested m.redraw.sync() call");h=!0;for(var x=0;x<u.length;x+=2)try{o(u[x],Oa(u[x+1]),b)}catch(y){l.error(y)}h=!1}function b(){p||(p=!0,a(function(){p=!1,S()}))}b.sync=S;function g(x,y){if(y!=null&&y.view==null&&typeof y!="function")throw new TypeError("m.mount(element, component) expects a component, not a vnode");var A=u.indexOf(x);A>=0&&(u.splice(A,2),o(x,[],b)),y!=null&&(u.push(x,y),o(x,Oa(y),b))}return{mount:g,redraw:b}},gc=Aa,Uo=pc(gc,requestAnimationFrame,console),_a=function(o){if(Object.prototype.toString.call(o)!=="[object Object]")return"";var a=[];for(var l in o)u(l,o[l]);return a.join("&");function u(h,p){if(Array.isArray(p))for(var S=0;S<p.length;S++)u(h+"["+S+"]",p[S]);else if(Object.prototype.toString.call(p)==="[object Object]")for(var S in p)u(h+"["+S+"]",p[S]);else a.push(encodeURIComponent(h)+(p!=null&&p!==""?"="+encodeURIComponent(p):""))}},Ea=Object.assign||function(o,a){a&&Object.keys(a).forEach(function(l){o[l]=a[l]})},vc=_a,mc=Ea,Ko=function(o,a){if(/:([^\/\.-]+)(\.{3})?:/.test(o))throw new SyntaxError("Template parameter names *must* be separated");if(a==null)return o;var l=o.indexOf("?"),u=o.indexOf("#"),h=u<0?o.length:u,p=l<0?h:l,S=o.slice(0,p),b={};mc(b,a);var g=S.replace(/:([^\/\.-]+)(\.{3})?/g,function(I,W,N){return delete b[W],a[W]==null?I:N?a[W]:encodeURIComponent(String(a[W]))}),x=g.indexOf("?"),y=g.indexOf("#"),A=y<0?g.length:y,m=x<0?A:x,_=g.slice(0,m);l>=0&&(_+=o.slice(l,h)),x>=0&&(_+=(l<0?"?":"&")+g.slice(x,A));var R=vc(b);return R&&(_+=(l<0&&x<0?"?":"&")+R),u>=0&&(_+=o.slice(u)),y>=0&&(_+=(u<0?"":"&")+g.slice(y)),_},yc=Ko,bc=function(o,a,l){var u=0;function h(b){return new a(b)}h.prototype=a.prototype,h.__proto__=a;function p(b){return function(g,x){typeof g!="string"?(x=g,g=g.url):x==null&&(x={});var y=new a(function(R,I){b(yc(g,x.params),x,function(W){if(typeof x.type=="function")if(Array.isArray(W))for(var N=0;N<W.length;N++)W[N]=new x.type(W[N]);else W=new x.type(W);R(W)},I)});if(x.background===!0)return y;var A=0;function m(){--A==0&&typeof l=="function"&&l()}return _(y);function _(R){var I=R.then;return R.constructor=h,R.then=function(){A++;var W=I.apply(R,arguments);return W.then(m,function(N){if(m(),A===0)throw N}),_(W)},R}}}function S(b,g){for(var x in b.headers)if({}.hasOwnProperty.call(b.headers,x)&&g.test(x))return!0;return!1}return{request:p(function(b,g,x,y){var A=g.method!=null?g.method.toUpperCase():"GET",m=g.body,_=(g.serialize==null||g.serialize===JSON.serialize)&&!(m instanceof o.FormData),R=g.responseType||(typeof g.extract=="function"?"":"json"),I=new o.XMLHttpRequest,W=!1,N=I,T,E=I.abort;I.abort=function(){W=!0,E.call(this)},I.open(A,b,g.async!==!1,typeof g.user=="string"?g.user:void 0,typeof g.password=="string"?g.password:void 0),_&&m!=null&&!S(g,/^content-type$/i)&&I.setRequestHeader("Content-Type","application/json; charset=utf-8"),typeof g.deserialize!="function"&&!S(g,/^accept$/i)&&I.setRequestHeader("Accept","application/json, text/*"),g.withCredentials&&(I.withCredentials=g.withCredentials),g.timeout&&(I.timeout=g.timeout),I.responseType=R;for(var c in g.headers)({}).hasOwnProperty.call(g.headers,c)&&I.setRequestHeader(c,g.headers[c]);I.onreadystatechange=function(w){if(!W&&w.target.readyState===4)try{var k=w.target.status>=200&&w.target.status<300||w.target.status===304||/^file:\/\//i.test(b),O=w.target.response,L;if(R==="json"?!w.target.responseType&&typeof g.extract!="function"&&(O=JSON.parse(w.target.responseText)):(!R||R==="text")&&O==null&&(O=w.target.responseText),typeof g.extract=="function"?(O=g.extract(w.target,g),k=!0):typeof g.deserialize=="function"&&(O=g.deserialize(O)),k)x(O);else{try{L=w.target.responseText}catch(B){L=O}var j=new Error(L);j.code=w.target.status,j.response=O,y(j)}}catch(B){y(B)}},typeof g.config=="function"&&(I=g.config(I,g,b)||I,I!==N&&(T=I.abort,I.abort=function(){W=!0,T.call(this)})),m==null?I.send():typeof g.serialize=="function"?I.send(g.serialize(m)):m instanceof o.FormData?I.send(m):I.send(JSON.stringify(m))}),jsonp:p(function(b,g,x,y){var A=g.callbackName||"_mithril_"+Math.round(Math.random()*1e16)+"_"+u++,m=o.document.createElement("script");o[A]=function(_){delete o[A],m.parentNode.removeChild(m),x(_)},m.onerror=function(){delete o[A],m.parentNode.removeChild(m),y(new Error("JSONP request failed"))},m.src=b+(b.indexOf("?")<0?"?":"&")+encodeURIComponent(g.callbackKey||"callback")+"="+encodeURIComponent(A),o.document.documentElement.appendChild(m)})}},wc=Un.exports,xc=Uo,kc=bc(window,wc,xc.redraw),Na=function(o){if(o===""||o==null)return{};o.charAt(0)==="?"&&(o=o.slice(1));for(var a=o.split("&"),l={},u={},h=0;h<a.length;h++){var p=a[h].split("="),S=decodeURIComponent(p[0]),b=p.length===2?decodeURIComponent(p[1]):"";b==="true"?b=!0:b==="false"&&(b=!1);var g=S.split(/\]\[?|\[/),x=u;S.indexOf("[")>-1&&g.pop();for(var y=0;y<g.length;y++){var A=g[y],m=g[y+1],_=m==""||!isNaN(parseInt(m,10));if(A===""){var S=g.slice(0,y).join();l[S]==null&&(l[S]=Array.isArray(x)?x.length:0),A=l[S]++}else if(A==="__proto__")break;if(y===g.length-1)x[A]=b;else{var R=Object.getOwnPropertyDescriptor(x,A);R!=null&&(R=R.value),R==null&&(x[A]=R=_?[]:{}),x=R}}}return u},Sc=Na,Go=function(o){var a=o.indexOf("?"),l=o.indexOf("#"),u=l<0?o.length:l,h=a<0?u:a,p=o.slice(0,h).replace(/\/{2,}/g,"/");return p?(p[0]!=="/"&&(p="/"+p),p.length>1&&p[p.length-1]==="/"&&(p=p.slice(0,-1))):p="/",{path:p,params:a<0?{}:Sc(o.slice(a+1,u))}},Cc=Go,Lc=function(o){var a=Cc(o),l=Object.keys(a.params),u=[],h=new RegExp("^"+a.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,function(p,S,b){return S==null?"\\"+p:(u.push({k:S,r:b==="..."}),b==="..."?"(.*)":b==="."?"([^/]+)\\.":"([^/]+)"+(b||""))})+"$");return function(p){for(var S=0;S<l.length;S++)if(a.params[l[S]]!==p.params[l[S]])return!1;if(!u.length)return h.test(p.path);var b=h.exec(p.path);if(b==null)return!1;for(var S=0;S<u.length;S++)p.params[u[S].k]=u[S].r?b[S+1]:decodeURIComponent(b[S+1]);return!0}},Tc=zr,Mc=Ta,Ac=Un.exports,Oc=Ko,Pa=Go,_c=Lc,za=Ea,jo={},Ec=function(o,a){var l;function u(A,m,_){if(A=Oc(A,m),l!=null){l();var R=_?_.state:null,I=_?_.title:null;_&&_.replace?o.history.replaceState(R,I,y.prefix+A):o.history.pushState(R,I,y.prefix+A)}else o.location.href=y.prefix+A}var h=jo,p,S,b,g,x=y.SKIP={};function y(A,m,_){if(A==null)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var R=0,I=Object.keys(_).map(function(k){if(k[0]!=="/")throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(k))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:k,component:_[k],check:_c(k)}}),W=typeof setImmediate=="function"?setImmediate:setTimeout,N=Ac.resolve(),T=!1,E;if(l=null,m!=null){var c=Pa(m);if(!I.some(function(k){return k.check(c)}))throw new ReferenceError("Default route doesn't match any known routes")}function w(){T=!1;var k=o.location.hash;y.prefix[0]!=="#"&&(k=o.location.search+k,y.prefix[0]!=="?"&&(k=o.location.pathname+k,k[0]!=="/"&&(k="/"+k)));var O=k.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),L=Pa(O);za(L.params,o.history.state);function j(){if(O===m)throw new Error("Could not resolve default route "+m);u(m,null,{replace:!0})}B(0);function B(U){for(;U<I.length;U++)if(I[U].check(L)){var Q=I[U].component,X=I[U].route,D=Q,z=g=function(te){if(z===g){if(te===x)return B(U+1);p=te!=null&&(typeof te.view=="function"||typeof te=="function")?te:"div",S=L.params,b=O,g=null,h=Q.render?Q:null,R===2?a.redraw():(R=2,a.redraw.sync())}};Q.view||typeof Q=="function"?(Q={},z(D)):Q.onmatch?N.then(function(){return Q.onmatch(L.params,O,X)}).then(z,j):z("div");return}j()}}return l=function(){T||(T=!0,W(w))},typeof o.history.pushState=="function"?(E=function(){o.removeEventListener("popstate",l,!1)},o.addEventListener("popstate",l,!1)):y.prefix[0]==="#"&&(l=null,E=function(){o.removeEventListener("hashchange",w,!1)},o.addEventListener("hashchange",w,!1)),a.mount(A,{onbeforeupdate:function(){return R=R?2:1,!(!R||jo===h)},oncreate:w,onremove:E,view:function(){if(!(!R||jo===h)){var k=[Tc(p,S.key,S)];return h&&(k=h.render(k[0])),k}}})}return y.set=function(A,m,_){g!=null&&(_=_||{},_.replace=!0),g=null,u(A,m,_)},y.get=function(){return b},y.prefix="#!",y.Link={view:function(A){var m=A.attrs.options,_={},R,I;za(_,A.attrs),_.selector=_.options=_.key=_.oninit=_.oncreate=_.onbeforeupdate=_.onupdate=_.onbeforeremove=_.onremove=null;var W=Mc(A.attrs.selector||"a",_,A.children);return(W.attrs.disabled=Boolean(W.attrs.disabled))?(W.attrs.href=null,W.attrs["aria-disabled"]="true",W.attrs.onclick=null):(R=W.attrs.onclick,I=W.attrs.href,W.attrs.href=y.prefix+I,W.attrs.onclick=function(N){var T;typeof R=="function"?T=R.call(N.currentTarget,N):R==null||typeof R!="object"||typeof R.handleEvent=="function"&&R.handleEvent(N),T!==!1&&!N.defaultPrevented&&(N.button===0||N.which===0||N.which===1)&&(!N.currentTarget.target||N.currentTarget.target==="_self")&&!N.ctrlKey&&!N.metaKey&&!N.shiftKey&&!N.altKey&&(N.preventDefault(),N.redraw=!1,y.set(I,null,m))}),W}},y.param=function(A){return S&&A!=null?S[A]:S},y},Nc=Uo,Pc=Ec(window,Nc),Ii=hc,Da=kc,Ia=Uo,Pt=function(){return Ii.apply(this,arguments)};Pt.m=Ii,Pt.trust=Ii.trust,Pt.fragment=Ii.fragment,Pt.mount=Ia.mount,Pt.route=Pc,Pt.render=Aa,Pt.redraw=Ia.redraw,Pt.request=Da.request,Pt.jsonp=Da.jsonp,Pt.parseQueryString=Na,Pt.buildQueryString=_a,Pt.parsePathname=Go,Pt.buildPathname=Ko,Pt.vnode=zr,Pt.PromisePolyfill=Ma;var Le=Pt;const Ri=o=>o.lastIndexOf(".")>-1&&o.slice(o.lastIndexOf(".")+1),zc=/^https?:\/\//,Gn=(o,a)=>o.files.filter(l=>l.name===a)[0]||o.links.filter(l=>l.url===a)[0];function jn(o,a){return arguments.length===1?l=>jn(o,l):a.indexOf(o,a.length-o.length)>-1}const Ra=o=>()=>new Promise(a=>setTimeout(a,o)),Dc=(o,a={})=>l=>l in a?a[l]:a[l]=o(l);var ct={exports:{}};(function(o,a){(function(l,u){o.exports=u()})(Yr,function(){var l=navigator.userAgent,u=navigator.platform,h=/gecko\/\d/i.test(l),p=/MSIE \d/.test(l),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),g=p||S||b,x=g&&(p?document.documentMode||6:+(b||S)[1]),y=!b&&/WebKit\//.test(l),A=y&&/Qt\/\d+\.\d+/.test(l),m=!b&&/Chrome\//.test(l),_=/Opera\//.test(l),R=/Apple Computer/.test(navigator.vendor),I=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),W=/PhantomJS/.test(l),N=R&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),T=/Android/.test(l),E=N||T||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),c=N||/Mac/.test(u),w=/\bCrOS\b/.test(l),k=/win/i.test(u),O=_&&l.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(_=!1,y=!0);var L=c&&(A||_&&(O==null||O<12.11)),j=h||g&&x>=9;function B(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var U=function(e,t){var n=e.className,r=B(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function Q(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function X(e,t){return Q(e).appendChild(t)}function D(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)i.appendChild(t[s]);return i}function z(e,t,n,r){var i=D(e,t,n,r);return i.setAttribute("role","presentation"),i}var te;document.createRange?te=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:te=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function ue(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 de(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Me(e,t){var n=e.className;B(t).test(n)||(e.className+=(n?" ":"")+t)}function V(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!B(n[r]).test(t)&&(t+=" "+n[r]);return t}var pe=function(e){e.select()};N?pe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:g&&(pe=function(e){try{e.select()}catch(t){}});function Ne(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ke(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function je(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=r||0,f=i||0;;){var d=e.indexOf(" ",s);if(d<0||d>=t)return f+(t-s);f+=d-s,f+=n-f%n,s=d+1}}var Je=function(){this.id=null,this.f=null,this.time=0,this.handler=Ne(this.onTimeout,this)};Je.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Je.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ae=50,ze={toString:function(){return"CodeMirror.Pass"}},Be={scroll:!1},De={origin:"*mouse"},Oe={origin:"+move"};function st(e,t,n){for(var r=0,i=0;;){var s=e.indexOf(" ",r);s==-1&&(s=e.length);var f=s-r;if(s==e.length||i+f>=t)return r+Math.min(f,t-i);if(i+=s-r,i+=n-i%n,r=s+1,i>=t)return r}}var It=[""];function lr(e){for(;It.length<=e;)It.push(Pe(It)+" ");return It[e]}function Pe(e){return e[e.length-1]}function He(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function dt(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function F(){}function P(e,t){var n;return Object.create?n=Object.create(e):(F.prototype=e,n=new F),t&&Ke(t,n),n}var Y=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function K(e,t){return t?t.source.indexOf("\\w")>-1&&re(e)?!0:t.test(e):re(e)}function ee(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var J=/[\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 ge(e){return e.charCodeAt(0)>=768&&J.test(e)}function we(e,t,n){for(;(n<0?t>0:t<e.length)&&ge(e.charAt(t));)t+=n;return t}function Fe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,s=r<0?Math.ceil(i):Math.floor(i);if(s==t)return e(s)?t:n;e(s)?n=s:t=s+r}}function Zr(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,s=0;s<e.length;++s){var f=e[s];(f.from<n&&f.to>t||t==n&&f.to==t)&&(r(Math.max(f.from,t),Math.min(f.to,n),f.level==1?"rtl":"ltr",s),i=!0)}i||r(t,n,"ltr")}var Ve=null;function Ie(e,t,n){var r;Ve=null;for(var i=0;i<e.length;++i){var s=e[i];if(s.from<t&&s.to>t)return i;s.to==t&&(s.from!=s.to&&n=="before"?r=i:Ve=i),s.from==t&&(s.from!=s.to&&n!="before"?r=i:Ve=i)}return r!=null?r:Ve}var tr=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?t.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,f=/[Lb1n]/,d=/[1n]/;function v(C,H,G){this.level=C,this.from=H,this.to=G}return function(C,H){var G=H=="ltr"?"L":"R";if(C.length==0||H=="ltr"&&!r.test(C))return!1;for(var Z=C.length,$=[],ne=0;ne<Z;++ne)$.push(n(C.charCodeAt(ne)));for(var oe=0,fe=G;oe<Z;++oe){var ce=$[oe];ce=="m"?$[oe]=fe:fe=ce}for(var me=0,he=G;me<Z;++me){var ye=$[me];ye=="1"&&he=="r"?$[me]="n":s.test(ye)&&(he=ye,ye=="r"&&($[me]="R"))}for(var Te=1,Ce=$[0];Te<Z-1;++Te){var Re=$[Te];Re=="+"&&Ce=="1"&&$[Te+1]=="1"?$[Te]="1":Re==","&&Ce==$[Te+1]&&(Ce=="1"||Ce=="n")&&($[Te]=Ce),Ce=Re}for(var et=0;et<Z;++et){var St=$[et];if(St==",")$[et]="N";else if(St=="%"){var it=void 0;for(it=et+1;it<Z&&$[it]=="%";++it);for(var Xt=et&&$[et-1]=="!"||it<Z&&$[it]=="1"?"1":"N",Ht=et;Ht<it;++Ht)$[Ht]=Xt;et=it-1}}for(var gt=0,Wt=G;gt<Z;++gt){var Tt=$[gt];Wt=="L"&&Tt=="1"?$[gt]="L":s.test(Tt)&&(Wt=Tt)}for(var yt=0;yt<Z;++yt)if(i.test($[yt])){var vt=void 0;for(vt=yt+1;vt<Z&&i.test($[vt]);++vt);for(var lt=(yt?$[yt-1]:G)=="L",Ut=(vt<Z?$[vt]:G)=="L",Fn=lt==Ut?lt?"L":"R":G,qr=yt;qr<vt;++qr)$[qr]=Fn;yt=vt-1}for(var Et=[],Cr,Ct=0;Ct<Z;)if(f.test($[Ct])){var na=Ct;for(++Ct;Ct<Z&&f.test($[Ct]);++Ct);Et.push(new v(0,na,Ct))}else{var Pr=Ct,sn=Et.length,un=H=="rtl"?1:0;for(++Ct;Ct<Z&&$[Ct]!="L";++Ct);for(var Dt=Pr;Dt<Ct;)if(d.test($[Dt])){Pr<Dt&&(Et.splice(sn,0,new v(1,Pr,Dt)),sn+=un);var Bn=Dt;for(++Dt;Dt<Ct&&d.test($[Dt]);++Dt);Et.splice(sn,0,new v(2,Bn,Dt)),sn+=un,Pr=Dt}else++Dt;Pr<Ct&&Et.splice(sn,0,new v(1,Pr,Ct))}return H=="ltr"&&(Et[0].level==1&&(Cr=C.match(/^\s+/))&&(Et[0].from=Cr[0].length,Et.unshift(new v(0,0,Cr[0].length))),Pe(Et).level==1&&(Cr=C.match(/\s+$/))&&(Pe(Et).to-=Cr[0].length,Et.push(new v(0,Z-Cr[0].length,Z)))),H=="rtl"?Et.reverse():Et}}();function $e(e,t){var n=e.order;return n==null&&(n=e.order=tr(e.text,t)),n}var Ye=[],be=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Ye).concat(n)}};function Qe(e,t){return e._handlers&&e._handlers[t]||Ye}function bt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var s=Se(i,n);s>-1&&(r[t]=i.slice(0,s).concat(i.slice(s+1)))}}}function _e(e,t){var n=Qe(e,t);if(!!n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function nt(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),_e(e,n||t.type,e,t),At(t)||t.codemirrorIgnore}function rr(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)Se(n,t[r])==-1&&n.push(t[r])}function ut(e,t){return Qe(e,t).length>0}function Ge(e){e.prototype.on=function(t,n){be(this,t,n)},e.prototype.off=function(t,n){bt(this,t,n)}}function pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function vr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function At(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Gt(e){pt(e),vr(e)}function Ir(e){return e.target||e.srcElement}function Ji(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),c&&e.ctrlKey&&t==1&&(t=3),t}var $n=function(){if(g&&x<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}(),Rt;function Vi(e){if(Rt==null){var t=D("span","\u200B");X(e,D("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Rt=t.offsetWidth<=1&&t.offsetHeight>2&&!(g&&x<8))}var n=Rt?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var Zn;function mr(e){if(Zn!=null)return Zn;var t=X(e,document.createTextNode("A\u062EA")),n=te(t,0,1).getBoundingClientRect(),r=te(t,1,2).getBoundingClientRect();return Q(e),!n||n.left==n.right?!1:Zn=r.right-n.right<3}var Jn=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),f=s.indexOf("\r");f!=-1?(n.push(s.slice(0,f)),t+=f+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},eo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},to=function(){var e=D("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Vn=null;function Rr(e){if(Vn!=null)return Vn;var t=X(e,D("span","x")),n=t.getBoundingClientRect(),r=te(t,0,1).getBoundingClientRect();return Vn=Math.abs(n.left-r.left)>1}var nr={},Qt={};function ro(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),nr[e]=t}function Ar(e,t){Qt[e]=t}function yn(e){if(typeof e=="string"&&Qt.hasOwnProperty(e))e=Qt[e];else if(e&&typeof e.name=="string"&&Qt.hasOwnProperty(e.name)){var t=Qt[e.name];typeof t=="string"&&(t={name:t}),e=P(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return yn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return yn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function bn(e,t){t=yn(t);var n=nr[t.name];if(!n)return bn(e,"text/plain");var r=n(e,t);if(ar.hasOwnProperty(t.name)){var i=ar[t.name];for(var s in i)!i.hasOwnProperty(s)||(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=i[s])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var f in t.modeProps)r[f]=t.modeProps[f];return r}var ar={};function sr(e,t){var n=ar.hasOwnProperty(e)?ar[e]:ar[e]={};Ke(t,n)}function $t(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ei(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function ti(e,t,n){return e.startState?e.startState(t,n):!0}var ot=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};ot.prototype.eol=function(){return this.pos>=this.string.length},ot.prototype.sol=function(){return this.pos==this.lineStart},ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ot.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ot.prototype.skipToEnd=function(){this.pos=this.string.length},ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ot.prototype.backUp=function(e){this.pos-=e},ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=je(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?je(this.string,this.lineStart,this.tabSize):0)},ot.prototype.indentation=function(){return je(this.string,null,this.tabSize)-(this.lineStart?je(this.string,this.lineStart,this.tabSize):0)},ot.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(f){return n?f.toLowerCase():f},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ot.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function xe(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],s=i.chunkSize();if(t<s){n=i;break}t-=s}return n.lines[t]}function yr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(s){var f=s.text;i==n.line&&(f=f.slice(0,n.ch)),i==t.line&&(f=f.slice(t.ch)),r.push(f),++i}),r}function ri(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function jt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function qe(e){if(e.parent==null)return null;for(var t=e.parent,n=Se(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function br(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],s=i.height;if(t<s){e=i;continue e}t-=s,n+=i.chunkSize()}return n}while(!e.lines);for(var f=0;f<e.lines.length;++f){var d=e.lines[f],v=d.height;if(t<v)break;t-=v}return n+f}function Jr(e,t){return t>=e.first&&t<e.first+e.size}function ni(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ae(e,t,n){if(n===void 0&&(n=null),!(this instanceof ae))return new ae(e,t,n);this.line=e,this.ch=t,this.sticky=n}function M(e,t){return e.line-t.line||e.ch-t.ch}function q(e,t){return e.sticky==t.sticky&&M(e,t)==0}function ie(e){return ae(e.line,e.ch)}function se(e,t){return M(e,t)<0?t:e}function Ee(e,t){return M(e,t)<0?e:t}function We(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 ae(e.first,0);var n=e.first+e.size-1;return t.line>n?ae(n,xe(e,n).text.length):Ot(t,xe(e,t.line).text.length)}function Ot(e,t){var n=e.ch;return n==null||n>t?ae(e.line,t):n<0?ae(e.line,0):e}function Zt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ve(e,t[r]);return n}var wn=function(e,t){this.state=e,this.lookAhead=t},wr=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};wr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wr.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}},wr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wr.fromSaved=function(e,t,n){return t instanceof wn?new wr(e,$t(e.mode,t.state),n,t.lookAhead):new wr(e,$t(e.mode,t),n)},wr.prototype.save=function(e){var t=e!==!1?$t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new wn(t,this.maxLookAhead):t};function Os(e,t,n,r){var i=[e.state.modeGen],s={};Ds(e,t.text,e.doc.mode,n,function(C,H){return i.push(C,H)},s,r);for(var f=n.state,d=function(C){n.baseTokens=i;var H=e.state.overlays[C],G=1,Z=0;n.state=!0,Ds(e,t.text,H.mode,n,function($,ne){for(var oe=G;Z<$;){var fe=i[G];fe>$&&i.splice(G,1,$,i[G+1],fe),G+=2,Z=Math.min($,fe)}if(!!ne)if(H.opaque)i.splice(oe,G-oe,$,"overlay "+ne),G=oe+2;else for(;oe<G;oe+=2){var ce=i[oe+1];i[oe+1]=(ce?ce+" ":"")+"overlay "+ne}},s),n.state=f,n.baseTokens=null,n.baseTokenPos=1},v=0;v<e.state.overlays.length;++v)d(v);return{styles:i,classes:s.bgClass||s.textClass?s:null}}function _s(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ii(e,qe(t)),i=t.text.length>e.options.maxHighlightLength&&$t(e.doc.mode,r.state),s=Os(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ii(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wr(r,!0,t);var s=Ed(e,t,n),f=s>r.first&&xe(r,s-1).stateAfter,d=f?wr.fromSaved(r,f,s):new wr(r,ti(r.mode),s);return r.iter(s,t,function(v){pl(e,v.text,d);var C=d.line;v.stateAfter=C==t-1||C%5==0||C>=i.viewFrom&&C<i.viewTo?d.save():null,d.nextLine()}),n&&(r.modeFrontier=d.line),d}function pl(e,t,n,r){var i=e.doc.mode,s=new ot(t,e.options.tabSize,n);for(s.start=s.pos=r||0,t==""&&Es(i,n.state);!s.eol();)gl(i,s,n.state),s.start=s.pos}function Es(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var n=ei(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function gl(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=ei(e,n).mode);var s=e.token(t,n);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ns=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ps(e,t,n,r){var i=e.doc,s=i.mode,f;t=ve(i,t);var d=xe(i,t.line),v=ii(e,t.line,n),C=new ot(d.text,e.options.tabSize,v),H;for(r&&(H=[]);(r||C.pos<t.ch)&&!C.eol();)C.start=C.pos,f=gl(s,C,v.state),r&&H.push(new Ns(C,f,$t(i.mode,v.state)));return r?H:new Ns(C,f,v.state)}function zs(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ds(e,t,n,r,i,s,f){var d=n.flattenSpans;d==null&&(d=e.options.flattenSpans);var v=0,C=null,H=new ot(t,e.options.tabSize,r),G,Z=e.options.addModeClass&&[null];for(t==""&&zs(Es(n,r.state),s);!H.eol();){if(H.pos>e.options.maxHighlightLength?(d=!1,f&&pl(e,t,r,H.pos),H.pos=t.length,G=null):G=zs(gl(n,H,r.state,Z),s),Z){var $=Z[0].name;$&&(G="m-"+(G?$+" "+G:$))}if(!d||C!=G){for(;v<H.start;)v=Math.min(H.start,v+5e3),i(v,C);C=G}H.start=H.pos}for(;v<H.pos;){var ne=Math.min(H.pos,v+5e3);i(ne,C),v=ne}}function Ed(e,t,n){for(var r,i,s=e.doc,f=n?-1:t-(e.doc.mode.innerMode?1e3:100),d=t;d>f;--d){if(d<=s.first)return s.first;var v=xe(s,d-1),C=v.stateAfter;if(C&&(!n||d+(C instanceof wn?C.lookAhead:0)<=s.modeFrontier))return d;var H=je(v.text,null,e.options.tabSize);(i==null||r>H)&&(i=d-1,r=H)}return i}function Nd(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=xe(e,r).stateAfter;if(i&&(!(i instanceof wn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Is=!1,Or=!1;function Pd(){Is=!0}function zd(){Or=!0}function no(e,t,n){this.marker=e,this.from=t,this.to=n}function oi(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Dd(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Id(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Rd(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var s=e[i],f=s.marker,d=s.from==null||(f.inclusiveLeft?s.from<=t:s.from<t);if(d||s.from==t&&f.type=="bookmark"&&(!n||!s.marker.insertLeft)){var v=s.to==null||(f.inclusiveRight?s.to>=t:s.to>t);(r||(r=[])).push(new no(f,s.from,v?null:s.to))}}return r}function Fd(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var s=e[i],f=s.marker,d=s.to==null||(f.inclusiveRight?s.to>=t:s.to>t);if(d||s.from==t&&f.type=="bookmark"&&(!n||s.marker.insertLeft)){var v=s.from==null||(f.inclusiveLeft?s.from<=t:s.from<t);(r||(r=[])).push(new no(f,v?null:s.from-t,s.to==null?null:s.to-t))}}return r}function vl(e,t){if(t.full)return null;var n=Jr(e,t.from.line)&&xe(e,t.from.line).markedSpans,r=Jr(e,t.to.line)&&xe(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,s=t.to.ch,f=M(t.from,t.to)==0,d=Rd(n,i,f),v=Fd(r,s,f),C=t.text.length==1,H=Pe(t.text).length+(C?i:0);if(d)for(var G=0;G<d.length;++G){var Z=d[G];if(Z.to==null){var $=oi(v,Z.marker);$?C&&(Z.to=$.to==null?null:$.to+H):Z.to=i}}if(v)for(var ne=0;ne<v.length;++ne){var oe=v[ne];if(oe.to!=null&&(oe.to+=H),oe.from==null){var fe=oi(d,oe.marker);fe||(oe.from=H,C&&(d||(d=[])).push(oe))}else oe.from+=H,C&&(d||(d=[])).push(oe)}d&&(d=Rs(d)),v&&v!=d&&(v=Rs(v));var ce=[d];if(!C){var me=t.text.length-2,he;if(me>0&&d)for(var ye=0;ye<d.length;++ye)d[ye].to==null&&(he||(he=[])).push(new no(d[ye].marker,null,null));for(var Te=0;Te<me;++Te)ce.push(he);ce.push(v)}return ce}function Rs(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Bd(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function($){if($.markedSpans)for(var ne=0;ne<$.markedSpans.length;++ne){var oe=$.markedSpans[ne].marker;oe.readOnly&&(!r||Se(r,oe)==-1)&&(r||(r=[])).push(oe)}}),!r)return null;for(var i=[{from:t,to:n}],s=0;s<r.length;++s)for(var f=r[s],d=f.find(0),v=0;v<i.length;++v){var C=i[v];if(!(M(C.to,d.from)<0||M(C.from,d.to)>0)){var H=[v,1],G=M(C.from,d.from),Z=M(C.to,d.to);(G<0||!f.inclusiveLeft&&!G)&&H.push({from:C.from,to:d.from}),(Z>0||!f.inclusiveRight&&!Z)&&H.push({from:d.to,to:C.to}),i.splice.apply(i,H),v+=H.length-3}}return i}function Fs(e){var t=e.markedSpans;if(!!t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Bs(e,t){if(!!t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function io(e){return e.inclusiveLeft?-1:0}function oo(e){return e.inclusiveRight?1:0}function ml(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),s=M(r.from,i.from)||io(e)-io(t);if(s)return-s;var f=M(r.to,i.to)||oo(e)-oo(t);return f||t.id-e.id}function Hs(e,t){var n=Or&&e.markedSpans,r;if(n)for(var i=void 0,s=0;s<n.length;++s)i=n[s],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||ml(r,i.marker)<0)&&(r=i.marker);return r}function Ws(e){return Hs(e,!0)}function lo(e){return Hs(e,!1)}function Hd(e,t){var n=Or&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var s=n[i];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!r||ml(r,s.marker)<0)&&(r=s.marker)}return r}function Us(e,t,n,r,i){var s=xe(e,t),f=Or&&s.markedSpans;if(f)for(var d=0;d<f.length;++d){var v=f[d];if(!!v.marker.collapsed){var C=v.marker.find(0),H=M(C.from,n)||io(v.marker)-io(i),G=M(C.to,r)||oo(v.marker)-oo(i);if(!(H>=0&&G<=0||H<=0&&G>=0)&&(H<=0&&(v.marker.inclusiveRight&&i.inclusiveLeft?M(C.to,n)>=0:M(C.to,n)>0)||H>=0&&(v.marker.inclusiveRight&&i.inclusiveLeft?M(C.from,r)<=0:M(C.from,r)<0)))return!0}}}function xr(e){for(var t;t=Ws(e);)e=t.find(-1,!0).line;return e}function Wd(e){for(var t;t=lo(e);)e=t.find(1,!0).line;return e}function Ud(e){for(var t,n;t=lo(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function yl(e,t){var n=xe(e,t),r=xr(n);return n==r?t:qe(r)}function Ks(e,t){if(t>e.lastLine())return t;var n=xe(e,t),r;if(!Fr(e,n))return t;for(;r=lo(n);)n=r.find(1,!0).line;return qe(n)+1}function Fr(e,t){var n=Or&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&bl(e,t,r))return!0}}}function bl(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return bl(e,r.line,oi(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,s=0;s<t.markedSpans.length;++s)if(i=t.markedSpans[s],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&bl(e,t,i))return!0}function _r(e){e=xr(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var s=n.parent;s;n=s,s=n.parent)for(var f=0;f<s.children.length;++f){var d=s.children[f];if(d==n)break;t+=d.height}return t}function ao(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Ws(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=lo(r);){var s=n.find(0,!0);t-=r.text.length-s.from.ch,r=s.to.line,t+=r.text.length-s.to.ch}return t}function wl(e){var t=e.display,n=e.doc;t.maxLine=xe(n,n.first),t.maxLineLength=ao(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=ao(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var xn=function(e,t,n){this.text=e,Bs(this,t),this.height=n?n(this):1};xn.prototype.lineNo=function(){return qe(this)},Ge(xn);function Kd(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Fs(e),Bs(e,n);var i=r?r(e):1;i!=e.height&&jt(e,i)}function Gd(e){e.parent=null,Fs(e)}var jd={},qd={};function Gs(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?qd:jd;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function js(e,t){var n=z("span",null,null,y?"padding-right: .1px":null),r={pre:z("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var s=i?t.rest[i-1]:t.line,f=void 0;r.pos=0,r.addToken=Yd,mr(e.display.measure)&&(f=$e(s,e.doc.direction))&&(r.addToken=$d(r.addToken,f)),r.map=[];var d=t!=e.display.externalMeasured&&qe(s);Zd(s,r,_s(e,s,d)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=V(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=V(s.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Vi(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(y){var v=r.content.lastChild;(/\bcm-tab\b/.test(v.className)||v.querySelector&&v.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return _e(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=V(r.pre.className,r.textClass||"")),r}function Xd(e){var t=D("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Yd(e,t,n,r,i,s,f){if(!!t){var d=e.splitSpaces?Qd(t,e.trailingSpace):t,v=e.cm.state.specialChars,C=!1,H;if(!v.test(t))e.col+=t.length,H=document.createTextNode(d),e.map.push(e.pos,e.pos+t.length,H),g&&x<9&&(C=!0),e.pos+=t.length;else{H=document.createDocumentFragment();for(var G=0;;){v.lastIndex=G;var Z=v.exec(t),$=Z?Z.index-G:t.length-G;if($){var ne=document.createTextNode(d.slice(G,G+$));g&&x<9?H.appendChild(D("span",[ne])):H.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!Z)break;G+=$+1;var oe=void 0;if(Z[0]==" "){var fe=e.cm.options.tabSize,ce=fe-e.col%fe;oe=H.appendChild(D("span",lr(ce),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),e.col+=ce}else Z[0]=="\r"||Z[0]==`
|
|
`?(oe=H.appendChild(D("span",Z[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oe.setAttribute("cm-text",Z[0]),e.col+=1):(oe=e.cm.options.specialCharPlaceholder(Z[0]),oe.setAttribute("cm-text",Z[0]),g&&x<9?H.appendChild(D("span",[oe])):H.appendChild(oe),e.col+=1);e.map.push(e.pos,e.pos+1,oe),e.pos++}}if(e.trailingSpace=d.charCodeAt(t.length-1)==32,n||r||i||C||s||f){var me=n||"";r&&(me+=r),i&&(me+=i);var he=D("span",[H],me,s);if(f)for(var ye in f)f.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&he.setAttribute(ye,f[ye]);return e.content.appendChild(he)}e.content.appendChild(H)}}function Qd(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var s=e.charAt(i);s==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(s="\xA0"),r+=s,n=s==" "}return r}function $d(e,t){return function(n,r,i,s,f,d,v){i=i?i+" cm-force-border":"cm-force-border";for(var C=n.pos,H=C+r.length;;){for(var G=void 0,Z=0;Z<t.length&&(G=t[Z],!(G.to>C&&G.from<=C));Z++);if(G.to>=H)return e(n,r,i,s,f,d,v);e(n,r.slice(0,G.to-C),i,s,null,d,v),s=null,r=r.slice(G.to-C),C=G.to}}}function qs(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Zd(e,t,n){var r=e.markedSpans,i=e.text,s=0;if(!r){for(var f=1;f<n.length;f+=2)t.addToken(t,i.slice(s,s=n[f]),Gs(n[f+1],t.cm.options));return}for(var d=i.length,v=0,C=1,H="",G,Z,$=0,ne,oe,fe,ce,me;;){if($==v){ne=oe=fe=Z="",me=null,ce=null,$=1/0;for(var he=[],ye=void 0,Te=0;Te<r.length;++Te){var Ce=r[Te],Re=Ce.marker;if(Re.type=="bookmark"&&Ce.from==v&&Re.widgetNode)he.push(Re);else if(Ce.from<=v&&(Ce.to==null||Ce.to>v||Re.collapsed&&Ce.to==v&&Ce.from==v)){if(Ce.to!=null&&Ce.to!=v&&$>Ce.to&&($=Ce.to,oe=""),Re.className&&(ne+=" "+Re.className),Re.css&&(Z=(Z?Z+";":"")+Re.css),Re.startStyle&&Ce.from==v&&(fe+=" "+Re.startStyle),Re.endStyle&&Ce.to==$&&(ye||(ye=[])).push(Re.endStyle,Ce.to),Re.title&&((me||(me={})).title=Re.title),Re.attributes)for(var et in Re.attributes)(me||(me={}))[et]=Re.attributes[et];Re.collapsed&&(!ce||ml(ce.marker,Re)<0)&&(ce=Ce)}else Ce.from>v&&$>Ce.from&&($=Ce.from)}if(ye)for(var St=0;St<ye.length;St+=2)ye[St+1]==$&&(oe+=" "+ye[St]);if(!ce||ce.from==v)for(var it=0;it<he.length;++it)qs(t,0,he[it]);if(ce&&(ce.from||0)==v){if(qs(t,(ce.to==null?d+1:ce.to)-v,ce.marker,ce.from==null),ce.to==null)return;ce.to==v&&(ce=!1)}}if(v>=d)break;for(var Xt=Math.min(d,$);;){if(H){var Ht=v+H.length;if(!ce){var gt=Ht>Xt?H.slice(0,Xt-v):H;t.addToken(t,gt,G?G+ne:ne,fe,v+gt.length==$?oe:"",Z,me)}if(Ht>=Xt){H=H.slice(Xt-v),v=Xt;break}v=Ht,fe=""}H=i.slice(s,s=n[C++]),G=Gs(n[C++],t.cm.options)}}}function Xs(e,t,n){this.line=t,this.rest=Ud(t),this.size=this.rest?qe(Pe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Fr(e,t)}function so(e,t,n){for(var r=[],i,s=t;s<n;s=i){var f=new Xs(e.doc,xe(e.doc,s),s);i=s+f.size,r.push(f)}return r}var kn=null;function Jd(e){kn?kn.ops.push(e):e.ownsGroup=kn={ops:[e],delayedCallbacks:[]}}function Vd(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function ep(e,t){var n=e.ownsGroup;if(!!n)try{Vd(n)}finally{kn=null,t(n)}}var li=null;function wt(e,t){var n=Qe(e,t);if(!!n.length){var r=Array.prototype.slice.call(arguments,2),i;kn?i=kn.delayedCallbacks:li?i=li:(i=li=[],setTimeout(tp,0));for(var s=function(d){i.push(function(){return n[d].apply(null,r)})},f=0;f<n.length;++f)s(f)}}function tp(){var e=li;li=null;for(var t=0;t<e.length;++t)e[t]()}function Ys(e,t,n,r){for(var i=0;i<t.changes.length;i++){var s=t.changes[i];s=="text"?np(e,t):s=="gutter"?$s(e,t,n,r):s=="class"?xl(e,t):s=="widget"&&ip(e,t,r)}t.changes=null}function ai(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),g&&x<8&&(e.node.style.zIndex=2)),e.node}function rp(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=ai(t);t.background=r.insertBefore(D("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Qs(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):js(e,t)}function np(e,t){var n=t.text.className,r=Qs(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,xl(e,t)):n&&(t.text.className=n)}function xl(e,t){rp(e,t),t.line.wrapClass?ai(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function $s(e,t,n,r){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 i=ai(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var f=ai(t),d=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.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&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=d.appendChild(D("div",ni(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var v=0;v<e.display.gutterSpecs.length;++v){var C=e.display.gutterSpecs[v].className,H=s.hasOwnProperty(C)&&s[C];H&&d.appendChild(D("div",[H],"CodeMirror-gutter-elt","left: "+r.gutterLeft[C]+"px; width: "+r.gutterWidth[C]+"px"))}}}function ip(e,t,n){t.alignable&&(t.alignable=null);for(var r=B("CodeMirror-linewidget"),i=t.node.firstChild,s=void 0;i;i=s)s=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Zs(e,t,n)}function op(e,t,n,r){var i=Qs(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),xl(e,t),$s(e,t,n,r),Zs(e,t,r),t.node}function Zs(e,t,n){if(Js(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Js(e,t.rest[r],t,n,!1)}function Js(e,t,n,r,i){if(!!t.widgets)for(var s=ai(n),f=0,d=t.widgets;f<d.length;++f){var v=d[f],C=D("div",[v.node],"CodeMirror-linewidget"+(v.className?" "+v.className:""));v.handleMouseEvents||C.setAttribute("cm-ignore-events","true"),lp(v,C,n,r),e.display.input.setUneditable(C),i&&v.above?s.insertBefore(C,n.gutter||n.text):s.appendChild(C),wt(v,"redraw")}}function lp(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function si(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ue(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),X(t.display.measure,D("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Er(e,t){for(var n=Ir(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function uo(e){return e.lineSpace.offsetTop}function kl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Vs(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(e.measure,D("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function kr(e){return Ae-e.display.nativeBarWidth}function Vr(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Sl(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function ap(e,t,n){var r=e.options.lineWrapping,i=r&&Vr(e);if(!t.measure.heights||r&&t.measure.width!=i){var s=t.measure.heights=[];if(r){t.measure.width=i;for(var f=t.text.firstChild.getClientRects(),d=0;d<f.length-1;d++){var v=f[d],C=f[d+1];Math.abs(v.bottom-C.bottom)>2&&s.push((v.bottom+C.top)/2-n.top)}}s.push(n.bottom-n.top)}}function eu(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(qe(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function sp(e,t){t=xr(t);var n=qe(t),r=e.display.externalMeasured=new Xs(e.doc,t,n);r.lineN=n;var i=r.built=js(e,r);return r.text=i.pre,X(e.display.lineMeasure,i.pre),r}function tu(e,t,n,r){return Sr(e,Sn(e,t),n,r)}function Cl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[rn(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Sn(e,t){var n=qe(t),r=Cl(e,n);r&&!r.text?r=null:r&&r.changes&&(Ys(e,r,n,Ol(e)),e.curOp.forceUpdate=!0),r||(r=sp(e,t));var i=eu(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Sr(e,t,n,r,i){t.before&&(n=-1);var s=n+(r||""),f;return t.cache.hasOwnProperty(s)?f=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ap(e,t.view,t.rect),t.hasHeights=!0),f=fp(e,t,n,r),f.bogus||(t.cache[s]=f)),{left:f.left,right:f.right,top:i?f.rtop:f.top,bottom:i?f.rbottom:f.bottom}}var ru={left:0,right:0,top:0,bottom:0};function nu(e,t,n){for(var r,i,s,f,d,v,C=0;C<e.length;C+=3)if(d=e[C],v=e[C+1],t<d?(i=0,s=1,f="left"):t<v?(i=t-d,s=i+1):(C==e.length-3||t==v&&e[C+3]>t)&&(s=v-d,i=s-1,t>=v&&(f="right")),i!=null){if(r=e[C+2],d==v&&n==(r.insertLeft?"left":"right")&&(f=n),n=="left"&&i==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)r=e[(C-=3)+2],f="left";if(n=="right"&&i==v-d)for(;C<e.length-3&&e[C+3]==e[C+4]&&!e[C+5].insertLeft;)r=e[(C+=3)+2],f="right";break}return{node:r,start:i,end:s,collapse:f,coverStart:d,coverEnd:v}}function up(e,t){var n=ru;if(t=="left")for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function fp(e,t,n,r){var i=nu(t.map,n,r),s=i.node,f=i.start,d=i.end,v=i.collapse,C;if(s.nodeType==3){for(var H=0;H<4;H++){for(;f&&ge(t.line.text.charAt(i.coverStart+f));)--f;for(;i.coverStart+d<i.coverEnd&&ge(t.line.text.charAt(i.coverStart+d));)++d;if(g&&x<9&&f==0&&d==i.coverEnd-i.coverStart?C=s.parentNode.getBoundingClientRect():C=up(te(s,f,d).getClientRects(),r),C.left||C.right||f==0)break;d=f,f=f-1,v="right"}g&&x<11&&(C=cp(e.display.measure,C))}else{f>0&&(v=r="right");var G;e.options.lineWrapping&&(G=s.getClientRects()).length>1?C=G[r=="right"?G.length-1:0]:C=s.getBoundingClientRect()}if(g&&x<9&&!f&&(!C||!C.left&&!C.right)){var Z=s.parentNode.getClientRects()[0];Z?C={left:Z.left,right:Z.left+Ln(e.display),top:Z.top,bottom:Z.bottom}:C=ru}for(var $=C.top-t.rect.top,ne=C.bottom-t.rect.top,oe=($+ne)/2,fe=t.view.measure.heights,ce=0;ce<fe.length-1&&!(oe<fe[ce]);ce++);var me=ce?fe[ce-1]:0,he=fe[ce],ye={left:(v=="right"?C.right:C.left)-t.rect.left,right:(v=="left"?C.left:C.right)-t.rect.left,top:me,bottom:he};return!C.left&&!C.right&&(ye.bogus=!0),e.options.singleCursorHeightPerLine||(ye.rtop=$,ye.rbottom=ne),ye}function cp(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rr(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function iu(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 ou(e){e.display.externalMeasure=null,Q(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)iu(e.display.view[t])}function ui(e){ou(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function lu(){return m&&T?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function au(){return m&&T?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ll(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=si(e.widgets[n]));return t}function fo(e,t,n,r,i){if(!i){var s=Ll(t);n.top+=s,n.bottom+=s}if(r=="line")return n;r||(r="local");var f=_r(t);if(r=="local"?f+=uo(e.display):f-=e.display.viewOffset,r=="page"||r=="window"){var d=e.display.lineSpace.getBoundingClientRect();f+=d.top+(r=="window"?0:au());var v=d.left+(r=="window"?0:lu());n.left+=v,n.right+=v}return n.top+=f,n.bottom+=f,n}function su(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=lu(),i-=au();else if(n=="local"||!n){var s=e.display.sizer.getBoundingClientRect();r+=s.left,i+=s.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:r-f.left,top:i-f.top}}function co(e,t,n,r,i){return r||(r=xe(e.doc,t.line)),fo(e,r,tu(e,r,t.ch,i),n)}function ur(e,t,n,r,i,s){r=r||xe(e.doc,t.line),i||(i=Sn(e,r));function f(ne,oe){var fe=Sr(e,i,ne,oe?"right":"left",s);return oe?fe.left=fe.right:fe.right=fe.left,fo(e,r,fe,n)}var d=$e(r,e.doc.direction),v=t.ch,C=t.sticky;if(v>=r.text.length?(v=r.text.length,C="before"):v<=0&&(v=0,C="after"),!d)return f(C=="before"?v-1:v,C=="before");function H(ne,oe,fe){var ce=d[oe],me=ce.level==1;return f(fe?ne-1:ne,me!=fe)}var G=Ie(d,v,C),Z=Ve,$=H(v,G,C=="before");return Z!=null&&($.other=H(v,Z,C!="before")),$}function uu(e,t){var n=0;t=ve(e.doc,t),e.options.lineWrapping||(n=Ln(e.display)*t.ch);var r=xe(e.doc,t.line),i=_r(r)+uo(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Tl(e,t,n,r,i){var s=ae(e,t,n);return s.xRel=i,r&&(s.outside=r),s}function Ml(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Tl(r.first,0,null,-1,-1);var i=br(r,n),s=r.first+r.size-1;if(i>s)return Tl(r.first+r.size-1,xe(r,s).text.length,null,1,1);t<0&&(t=0);for(var f=xe(r,i);;){var d=hp(e,f,i,t,n),v=Hd(f,d.ch+(d.xRel>0||d.outside>0?1:0));if(!v)return d;var C=v.find(1);if(C.line==i)return C;f=xe(r,i=C.line)}}function fu(e,t,n,r){r-=Ll(t);var i=t.text.length,s=Fe(function(f){return Sr(e,n,f-1).bottom<=r},i,0);return i=Fe(function(f){return Sr(e,n,f).top>r},s,i),{begin:s,end:i}}function cu(e,t,n,r){n||(n=Sn(e,t));var i=fo(e,t,Sr(e,n,r),"line").top;return fu(e,t,n,i)}function Al(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function hp(e,t,n,r,i){i-=_r(t);var s=Sn(e,t),f=Ll(t),d=0,v=t.text.length,C=!0,H=$e(t,e.doc.direction);if(H){var G=(e.options.lineWrapping?pp:dp)(e,t,n,s,H,r,i);C=G.level!=1,d=C?G.from:G.to-1,v=C?G.to:G.from-1}var Z=null,$=null,ne=Fe(function(Te){var Ce=Sr(e,s,Te);return Ce.top+=f,Ce.bottom+=f,Al(Ce,r,i,!1)?(Ce.top<=i&&Ce.left<=r&&(Z=Te,$=Ce),!0):!1},d,v),oe,fe,ce=!1;if($){var me=r-$.left<$.right-r,he=me==C;ne=Z+(he?0:1),fe=he?"after":"before",oe=me?$.left:$.right}else{!C&&(ne==v||ne==d)&&ne++,fe=ne==0?"after":ne==t.text.length?"before":Sr(e,s,ne-(C?1:0)).bottom+f<=i==C?"after":"before";var ye=ur(e,ae(n,ne,fe),"line",t,s);oe=ye.left,ce=i<ye.top?-1:i>=ye.bottom?1:0}return ne=we(t.text,ne,1),Tl(n,ne,fe,ce,r-oe)}function dp(e,t,n,r,i,s,f){var d=Fe(function(G){var Z=i[G],$=Z.level!=1;return Al(ur(e,ae(n,$?Z.to:Z.from,$?"before":"after"),"line",t,r),s,f,!0)},0,i.length-1),v=i[d];if(d>0){var C=v.level!=1,H=ur(e,ae(n,C?v.from:v.to,C?"after":"before"),"line",t,r);Al(H,s,f,!0)&&H.top>f&&(v=i[d-1])}return v}function pp(e,t,n,r,i,s,f){var d=fu(e,t,r,f),v=d.begin,C=d.end;/\s/.test(t.text.charAt(C-1))&&C--;for(var H=null,G=null,Z=0;Z<i.length;Z++){var $=i[Z];if(!($.from>=C||$.to<=v)){var ne=$.level!=1,oe=Sr(e,r,ne?Math.min(C,$.to)-1:Math.max(v,$.from)).right,fe=oe<s?s-oe+1e9:oe-s;(!H||G>fe)&&(H=$,G=fe)}}return H||(H=i[i.length-1]),H.from<v&&(H={from:v,to:H.to,level:H.level}),H.to>C&&(H={from:H.from,to:C,level:H.level}),H}var en;function Cn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(en==null){en=D("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)en.appendChild(document.createTextNode("x")),en.appendChild(D("br"));en.appendChild(document.createTextNode("x"))}X(e.measure,en);var n=en.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Q(e.measure),n||1}function Ln(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),n=D("pre",[t],"CodeMirror-line-like");X(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ol(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,s=t.gutters.firstChild,f=0;s;s=s.nextSibling,++f){var d=e.display.gutterSpecs[f].className;n[d]=s.offsetLeft+s.clientLeft+i,r[d]=s.clientWidth}return{fixedPos:_l(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function _l(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function hu(e){var t=Cn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ln(e.display)-3);return function(i){if(Fr(e.doc,i))return 0;var s=0;if(i.widgets)for(var f=0;f<i.widgets.length;f++)i.widgets[f].height&&(s+=i.widgets[f].height);return n?s+(Math.ceil(i.text.length/r)||1)*t:s+t}}function El(e){var t=e.doc,n=hu(e);t.iter(function(r){var i=n(r);i!=r.height&&jt(r,i)})}function tn(e,t,n,r){var i=e.display;if(!n&&Ir(t).getAttribute("cm-not-content")=="true")return null;var s,f,d=i.lineSpace.getBoundingClientRect();try{s=t.clientX-d.left,f=t.clientY-d.top}catch(G){return null}var v=Ml(e,s,f),C;if(r&&v.xRel>0&&(C=xe(e.doc,v.line).text).length==v.ch){var H=je(C,C.length,e.options.tabSize)-C.length;v=ae(v.line,Math.max(0,Math.round((s-Vs(e.display).left)/Ln(e.display))-H))}return v}function rn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Ft(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Or&&yl(e.doc,t)<i.viewTo&&Hr(e);else if(n<=i.viewFrom)Or&&Ks(e.doc,n+r)>i.viewFrom?Hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Hr(e);else if(t<=i.viewFrom){var s=ho(e,n,n+r,1);s?(i.view=i.view.slice(s.index),i.viewFrom=s.lineN,i.viewTo+=r):Hr(e)}else if(n>=i.viewTo){var f=ho(e,t,t,-1);f?(i.view=i.view.slice(0,f.index),i.viewTo=f.lineN):Hr(e)}else{var d=ho(e,t,t,-1),v=ho(e,n,n+r,1);d&&v?(i.view=i.view.slice(0,d.index).concat(so(e,d.lineN,v.lineN)).concat(i.view.slice(v.index)),i.viewTo+=r):Hr(e)}var C=i.externalMeasured;C&&(n<C.lineN?C.lineN+=r:t<C.lineN+C.size&&(i.externalMeasured=null))}function Br(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var s=r.view[rn(e,t)];if(s.node!=null){var f=s.changes||(s.changes=[]);Se(f,n)==-1&&f.push(n)}}}function Hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ho(e,t,n,r){var i=rn(e,t),s,f=e.display.view;if(!Or||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var d=e.display.viewFrom,v=0;v<i;v++)d+=f[v].size;if(d!=t){if(r>0){if(i==f.length-1)return null;s=d+f[i].size-t,i++}else s=d-t;t+=s,n+=s}for(;yl(e.doc,n)!=n;){if(i==(r<0?0:f.length-1))return null;n+=r*f[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function gp(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=so(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=so(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(rn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(so(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,rn(e,n)))),r.viewTo=n}function du(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function fi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pu(e,t){t===void 0&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),s=r.selection=document.createDocumentFragment(),f=0;f<n.sel.ranges.length;f++)if(!(!t&&f==n.sel.primIndex)){var d=n.sel.ranges[f];if(!(d.from().line>=e.display.viewTo||d.to().line<e.display.viewFrom)){var v=d.empty();(v||e.options.showCursorWhenSelecting)&&gu(e,d.head,i),v||vp(e,d,s)}}return r}function gu(e,t,n){var r=ur(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(D("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var s=co(e,t,"div",null,null);i.style.width=Math.max(0,s.right-s.left)+"px"}if(r.other){var f=n.appendChild(D("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=r.other.left+"px",f.style.top=r.other.top+"px",f.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function po(e,t){return e.top-t.top||e.left-t.left}function vp(e,t,n){var r=e.display,i=e.doc,s=document.createDocumentFragment(),f=Vs(e.display),d=f.left,v=Math.max(r.sizerWidth,Vr(e)-r.sizer.offsetLeft)-f.right,C=i.direction=="ltr";function H(he,ye,Te,Ce){ye<0&&(ye=0),ye=Math.round(ye),Ce=Math.round(Ce),s.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+he+`px;
|
|
top: `+ye+"px; width: "+(Te==null?v-he:Te)+`px;
|
|
height: `+(Ce-ye)+"px"))}function G(he,ye,Te){var Ce=xe(i,he),Re=Ce.text.length,et,St;function it(gt,Wt){return co(e,ae(he,gt),"div",Ce,Wt)}function Xt(gt,Wt,Tt){var yt=cu(e,Ce,null,gt),vt=Wt=="ltr"==(Tt=="after")?"left":"right",lt=Tt=="after"?yt.begin:yt.end-(/\s/.test(Ce.text.charAt(yt.end-1))?2:1);return it(lt,vt)[vt]}var Ht=$e(Ce,i.direction);return Zr(Ht,ye||0,Te==null?Re:Te,function(gt,Wt,Tt,yt){var vt=Tt=="ltr",lt=it(gt,vt?"left":"right"),Ut=it(Wt-1,vt?"right":"left"),Fn=ye==null&>==0,qr=Te==null&&Wt==Re,Et=yt==0,Cr=!Ht||yt==Ht.length-1;if(Ut.top-lt.top<=3){var Ct=(C?Fn:qr)&&Et,na=(C?qr:Fn)&&Cr,Pr=Ct?d:(vt?lt:Ut).left,sn=na?v:(vt?Ut:lt).right;H(Pr,lt.top,sn-Pr,lt.bottom)}else{var un,Dt,Bn,ia;vt?(un=C&&Fn&&Et?d:lt.left,Dt=C?v:Xt(gt,Tt,"before"),Bn=C?d:Xt(Wt,Tt,"after"),ia=C&&qr&&Cr?v:Ut.right):(un=C?Xt(gt,Tt,"before"):d,Dt=!C&&Fn&&Et?v:lt.right,Bn=!C&&qr&&Cr?d:Ut.left,ia=C?Xt(Wt,Tt,"after"):v),H(un,lt.top,Dt-un,lt.bottom),lt.bottom<Ut.top&&H(d,lt.bottom,null,Ut.top),H(Bn,Ut.top,ia-Bn,Ut.bottom)}(!et||po(lt,et)<0)&&(et=lt),po(Ut,et)<0&&(et=Ut),(!St||po(lt,St)<0)&&(St=lt),po(Ut,St)<0&&(St=Ut)}),{start:et,end:St}}var Z=t.from(),$=t.to();if(Z.line==$.line)G(Z.line,Z.ch,$.ch);else{var ne=xe(i,Z.line),oe=xe(i,$.line),fe=xr(ne)==xr(oe),ce=G(Z.line,Z.ch,fe?ne.text.length+1:null).end,me=G($.line,fe?0:null,$.ch).start;fe&&(ce.top<me.top-2?(H(ce.right,ce.top,null,ce.bottom),H(d,me.top,me.left,me.bottom)):H(ce.right,ce.top,me.left-ce.right,ce.bottom)),ce.bottom<me.top&&H(d,ce.bottom,null,me.top)}n.appendChild(s)}function Nl(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Tn(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function vu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||zl(e))}function Pl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Tn(e))},100)}function zl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(_e(e,"focus",e,t),e.state.focused=!0,Me(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Nl(e))}function Tn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(_e(e,"blur",e,t),e.state.focused=!1,U(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function go(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],s=e.options.lineWrapping,f=void 0,d=0;if(!i.hidden){if(g&&x<8){var v=i.node.offsetTop+i.node.offsetHeight;f=v-n,n=v}else{var C=i.node.getBoundingClientRect();f=C.bottom-C.top,!s&&i.text.firstChild&&(d=i.text.firstChild.getBoundingClientRect().right-C.left-1)}var H=i.line.height-f;if((H>.005||H<-.005)&&(jt(i.line,f),mu(i.line),i.rest))for(var G=0;G<i.rest.length;G++)mu(i.rest[G]);if(d>e.display.sizerWidth){var Z=Math.ceil(d/Ln(e.display));Z>e.display.maxLineLength&&(e.display.maxLineLength=Z,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function mu(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function vo(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-uo(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,s=br(t,r),f=br(t,i);if(n&&n.ensure){var d=n.ensure.from.line,v=n.ensure.to.line;d<s?(s=d,f=br(t,_r(xe(t,d))+e.wrapper.clientHeight)):Math.min(v,t.lastLine())>=f&&(s=br(t,_r(xe(t,v))-e.wrapper.clientHeight),f=v)}return{from:s,to:Math.max(f,s+1)}}function mp(e,t){if(!nt(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!W){var s=D("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-n.viewOffset-uo(e.display))+`px;
|
|
height: `+(t.bottom-t.top+kr(e)+n.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(i),e.display.lineSpace.removeChild(s)}}}function yp(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?ae(t.line,t.ch+1,"before"):t,t=t.ch?ae(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var s=0;s<5;s++){var f=!1,d=ur(e,t),v=!n||n==t?d:ur(e,n);i={left:Math.min(d.left,v.left),top:Math.min(d.top,v.top)-r,right:Math.max(d.left,v.left),bottom:Math.max(d.bottom,v.bottom)+r};var C=Dl(e,i),H=e.doc.scrollTop,G=e.doc.scrollLeft;if(C.scrollTop!=null&&(hi(e,C.scrollTop),Math.abs(e.doc.scrollTop-H)>1&&(f=!0)),C.scrollLeft!=null&&(nn(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-G)>1&&(f=!0)),!f)break}return i}function bp(e,t){var n=Dl(e,t);n.scrollTop!=null&&hi(e,n.scrollTop),n.scrollLeft!=null&&nn(e,n.scrollLeft)}function Dl(e,t){var n=e.display,r=Cn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,s=Sl(e),f={};t.bottom-t.top>s&&(t.bottom=t.top+s);var d=e.doc.height+kl(n),v=t.top<r,C=t.bottom>d-r;if(t.top<i)f.scrollTop=v?0:t.top;else if(t.bottom>i+s){var H=Math.min(t.top,(C?d:t.bottom)-s);H!=i&&(f.scrollTop=H)}var G=e.options.fixedGutter?0:n.gutters.offsetWidth,Z=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-G,$=Vr(e)-n.gutters.offsetWidth,ne=t.right-t.left>$;return ne&&(t.right=t.left+$),t.left<10?f.scrollLeft=0:t.left<Z?f.scrollLeft=Math.max(0,t.left+G-(ne?0:10)):t.right>$+Z-3&&(f.scrollLeft=t.right+(ne?0:10)-$),f}function Il(e,t){t!=null&&(mo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mn(e){mo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ci(e,t,n){(t!=null||n!=null)&&mo(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function wp(e,t){mo(e),e.curOp.scrollToPos=t}function mo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=uu(e,t.from),r=uu(e,t.to);yu(e,n,r,t.margin)}}function yu(e,t,n,r){var i=Dl(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});ci(e,i.scrollLeft,i.scrollTop)}function hi(e,t){Math.abs(e.doc.scrollTop-t)<2||(h||Fl(e,{top:t}),bu(e,t,!0),h&&Fl(e),gi(e,100))}function bu(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function nn(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,Cu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function di(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kl(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?n:0,docHeight:r,scrollHeight:r+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var on=function(e,t,n){this.cm=n;var r=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,g&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};on.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},on.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},on.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},on.prototype.zeroWidthHack=function(){var e=c&&!I?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Je,this.disableVert=new Je},on.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var i=e.getBoundingClientRect(),s=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},on.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var pi=function(){};pi.prototype.update=function(){return{bottom:0,right:0}},pi.prototype.setScrollLeft=function(){},pi.prototype.setScrollTop=function(){},pi.prototype.clear=function(){};function An(e,t){t||(t=di(e));var n=e.display.barWidth,r=e.display.barHeight;wu(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&go(e),wu(e,di(e)),n=e.display.barWidth,r=e.display.barHeight}function wu(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var xu={native:on,null:pi};function ku(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xu[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?nn(e,t):hi(e,t)},e),e.display.scrollbars.addClass&&Me(e.display.wrapper,e.display.scrollbars.addClass)}var xp=0;function ln(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:++xp,markArrays:null},Jd(e.curOp)}function an(e){var t=e.curOp;t&&ep(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;kp(n)})}function kp(e){for(var t=e.ops,n=0;n<t.length;n++)Sp(t[n]);for(var r=0;r<t.length;r++)Cp(t[r]);for(var i=0;i<t.length;i++)Lp(t[i]);for(var s=0;s<t.length;s++)Tp(t[s]);for(var f=0;f<t.length;f++)Mp(t[f])}function Sp(e){var t=e.cm,n=t.display;Op(t),e.updateMaxLine&&wl(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new yo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Cp(e){e.updatedDisplay=e.mustUpdate&&Rl(e.cm,e.update)}function Lp(e){var t=e.cm,n=t.display;e.updatedDisplay&&go(t),e.barMeasure=di(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=tu(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Vr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Tp(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&nn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==de();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&An(t,e.barMeasure),e.updatedDisplay&&Hl(t,e.barMeasure),e.selectionChanged&&Nl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&vu(e.cm)}function Mp(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Su(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&bu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&nn(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=yp(t,ve(r,e.scrollToPos.from),ve(r,e.scrollToPos.to),e.scrollToPos.margin);mp(t,i)}var s=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(s)for(var d=0;d<s.length;++d)s[d].lines.length||_e(s[d],"hide");if(f)for(var v=0;v<f.length;++v)f[v].lines.length&&_e(f[v],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&_e(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function qt(e,t){if(e.curOp)return t();ln(e);try{return t()}finally{an(e)}}function xt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ln(e);try{return t.apply(e,arguments)}finally{an(e)}}}function zt(e){return function(){if(this.curOp)return e.apply(this,arguments);ln(this);try{return e.apply(this,arguments)}finally{an(this)}}}function kt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ln(t);try{return e.apply(this,arguments)}finally{an(t)}}}function gi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Ne(Ap,e))}function Ap(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ii(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(r.line>=e.display.viewFrom){var f=s.styles,d=s.text.length>e.options.maxHighlightLength?$t(t.mode,r.state):null,v=Os(e,s,r,!0);d&&(r.state=d),s.styles=v.styles;var C=s.styleClasses,H=v.classes;H?s.styleClasses=H:C&&(s.styleClasses=null);for(var G=!f||f.length!=s.styles.length||C!=H&&(!C||!H||C.bgClass!=H.bgClass||C.textClass!=H.textClass),Z=0;!G&&Z<f.length;++Z)G=f[Z]!=s.styles[Z];G&&i.push(r.line),s.stateAfter=r.save(),r.nextLine()}else s.text.length<=e.options.maxHighlightLength&&pl(e,s.text,r),s.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return gi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&qt(e,function(){for(var s=0;s<i.length;s++)Br(e,i[s],"text")})}}var yo=function(e,t,n){var r=e.display;this.viewport=t,this.visible=vo(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Vr(e),this.force=n,this.dims=Ol(e),this.events=[]};yo.prototype.signal=function(e,t){ut(e,t)&&this.events.push(arguments)},yo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)_e.apply(null,this.events[e])};function Op(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 _p(e){if(e.hasFocus())return null;var t=de();if(!t||!ue(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&ue(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ep(e){if(!(!e||!e.activeElt||e.activeElt==de())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&ue(document.body,e.anchorNode)&&ue(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Rl(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Hr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&du(e)==0)return!1;Lu(e)&&(Hr(e),t.dims=Ol(e));var i=r.first+r.size,s=Math.max(t.visible.from-e.options.viewportMargin,r.first),f=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(r.first,n.viewFrom)),n.viewTo>f&&n.viewTo-f<20&&(f=Math.min(i,n.viewTo)),Or&&(s=yl(e.doc,s),f=Ks(e.doc,f));var d=s!=n.viewFrom||f!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;gp(e,s,f),n.viewOffset=_r(xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var v=du(e);if(!d&&v==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var C=_p(e);return v>4&&(n.lineDiv.style.display="none"),Np(e,n.updateLineNumbers,t.dims),v>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ep(C),Q(n.cursorDiv),Q(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,d&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,gi(e,400)),n.updateLineNumbers=null,!0}function Su(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Vr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+kl(e.display)-Sl(e),n.top)}),t.visible=vo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=vo(e.display,e.doc,n));if(!Rl(e,t))break;go(e);var i=di(e);fi(e),An(e,i),Hl(e,i),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 Fl(e,t){var n=new yo(e,t);if(Rl(e,n)){go(e),Su(e,n);var r=di(e);fi(e),An(e,r),Hl(e,r),n.finish()}}function Np(e,t,n){var r=e.display,i=e.options.lineNumbers,s=r.lineDiv,f=s.firstChild;function d(ne){var oe=ne.nextSibling;return y&&c&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),oe}for(var v=r.view,C=r.viewFrom,H=0;H<v.length;H++){var G=v[H];if(!G.hidden)if(!G.node||G.node.parentNode!=s){var Z=op(e,G,C,n);s.insertBefore(Z,f)}else{for(;f!=G.node;)f=d(f);var $=i&&t!=null&&t<=C&&G.lineNumber;G.changes&&(Se(G.changes,"gutter")>-1&&($=!1),Ys(e,G,C,n)),$&&(Q(G.lineNumber),G.lineNumber.appendChild(document.createTextNode(ni(e.options,C)))),f=G.node.nextSibling}C+=G.size}for(;f;)f=d(f)}function Bl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",wt(e,"gutterChanged",e)}function Hl(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 Cu(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=_l(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,s=r+"px",f=0;f<n.length;f++)if(!n[f].hidden){e.options.fixedGutter&&(n[f].gutter&&(n[f].gutter.style.left=s),n[f].gutterBackground&&(n[f].gutterBackground.style.left=s));var d=n[f].alignable;if(d)for(var v=0;v<d.length;v++)d[v].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Lu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ni(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(D("div",[D("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=i.firstChild.offsetWidth,f=i.offsetWidth-s;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(s,r.lineGutter.offsetWidth-f)+1,r.lineNumWidth=r.lineNumInnerWidth+f,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Bl(e.display),!0}return!1}function Wl(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var s=e[i],f=null;if(typeof s!="string"&&(f=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:s,style:f})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Tu(e){var t=e.gutters,n=e.gutterSpecs;Q(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],s=i.className,f=i.style,d=t.appendChild(D("div",null,"CodeMirror-gutter "+s));f&&(d.style.cssText=f),s=="CodeMirror-linenumbers"&&(e.lineGutter=d,d.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Bl(e)}function vi(e){Tu(e.display),Ft(e),Cu(e)}function Pp(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=z("div",null,"CodeMirror-code"),i.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=D("div",null,"CodeMirror-cursors"),i.measure=D("div",null,"CodeMirror-measure"),i.lineMeasure=D("div",null,"CodeMirror-measure"),i.lineSpace=z("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var s=z("div",[i.lineSpace],"CodeMirror-lines");i.mover=D("div",[s],null,"position: relative"),i.sizer=D("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=D("div",null,null,"position: absolute; height: "+Ae+"px; width: 1px;"),i.gutters=D("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=D("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=D("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),g&&x<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!y&&!(h&&E)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Wl(r.gutters,r.lineNumbers),Tu(i),n.init(i)}var bo=0,Jt=null;g?Jt=-.53:h?Jt=15:m?Jt=-.7:R&&(Jt=-1/3);function Mu(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function zp(e){var t=Mu(e);return t.x*=Jt,t.y*=Jt,t}function Au(e,t){var n=Mu(t),r=n.x,i=n.y,s=e.display,f=s.scroller,d=f.scrollWidth>f.clientWidth,v=f.scrollHeight>f.clientHeight;if(!!(r&&d||i&&v)){if(i&&c&&y){e:for(var C=t.target,H=s.view;C!=f;C=C.parentNode)for(var G=0;G<H.length;G++)if(H[G].node==C){e.display.currentWheelTarget=C;break e}}if(r&&!h&&!_&&Jt!=null){i&&v&&hi(e,Math.max(0,f.scrollTop+i*Jt)),nn(e,Math.max(0,f.scrollLeft+r*Jt)),(!i||i&&v)&&pt(t),s.wheelStartX=null;return}if(i&&Jt!=null){var Z=i*Jt,$=e.doc.scrollTop,ne=$+s.wrapper.clientHeight;Z<0?$=Math.max(0,$+Z-50):ne=Math.min(e.doc.height,ne+Z+50),Fl(e,{top:$,bottom:ne})}bo<20&&(s.wheelStartX==null?(s.wheelStartX=f.scrollLeft,s.wheelStartY=f.scrollTop,s.wheelDX=r,s.wheelDY=i,setTimeout(function(){if(s.wheelStartX!=null){var oe=f.scrollLeft-s.wheelStartX,fe=f.scrollTop-s.wheelStartY,ce=fe&&s.wheelDY&&fe/s.wheelDY||oe&&s.wheelDX&&oe/s.wheelDX;s.wheelStartX=s.wheelStartY=null,!!ce&&(Jt=(Jt*bo+ce)/(bo+1),++bo)}},200)):(s.wheelDX+=r,s.wheelDY+=i))}}var Vt=function(e,t){this.ranges=e,this.primIndex=t};Vt.prototype.primary=function(){return this.ranges[this.primIndex]},Vt.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 n=this.ranges[t],r=e.ranges[t];if(!q(n.anchor,r.anchor)||!q(n.head,r.head))return!1}return!0},Vt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Xe(ie(this.ranges[t].anchor),ie(this.ranges[t].head));return new Vt(e,this.primIndex)},Vt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Vt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(M(t,r.from())>=0&&M(e,r.to())<=0)return n}return-1};var Xe=function(e,t){this.anchor=e,this.head=t};Xe.prototype.from=function(){return Ee(this.anchor,this.head)},Xe.prototype.to=function(){return se(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fr(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(Z,$){return M(Z.from(),$.from())}),n=Se(t,i);for(var s=1;s<t.length;s++){var f=t[s],d=t[s-1],v=M(d.to(),f.from());if(r&&!f.empty()?v>0:v>=0){var C=Ee(d.from(),f.from()),H=se(d.to(),f.to()),G=d.empty()?f.from()==f.head:d.from()==d.head;s<=n&&--n,t.splice(--s,2,new Xe(G?H:C,G?C:H))}}return new Vt(t,n)}function Wr(e,t){return new Vt([new Xe(e,t||e)],0)}function Ur(e){return e.text?ae(e.from.line+e.text.length-1,Pe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ou(e,t){if(M(e,t.from)<0)return e;if(M(e,t.to)<=0)return Ur(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ur(t).ch-t.to.ch),ae(n,r)}function Ul(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Xe(Ou(i.anchor,t),Ou(i.head,t)))}return fr(e.cm,n,e.sel.primIndex)}function _u(e,t,n){return e.line==t.line?ae(n.line,e.ch-t.ch+n.ch):ae(n.line+(e.line-t.line),e.ch)}function Dp(e,t,n){for(var r=[],i=ae(e.first,0),s=i,f=0;f<t.length;f++){var d=t[f],v=_u(d.from,i,s),C=_u(Ur(d),i,s);if(i=d.to,s=C,n=="around"){var H=e.sel.ranges[f],G=M(H.head,H.anchor)<0;r[f]=new Xe(G?C:v,G?v:C)}else r[f]=new Xe(v,v)}return new Vt(r,e.sel.primIndex)}function Kl(e){e.doc.mode=bn(e.options,e.doc.modeOption),mi(e)}function mi(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,gi(e,100),e.state.modeGen++,e.curOp&&Ft(e)}function Eu(e,t){return t.from.ch==0&&t.to.ch==0&&Pe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Gl(e,t,n,r){function i(me){return n?n[me]:null}function s(me,he,ye){Kd(me,he,ye,r),wt(me,"change",me,t)}function f(me,he){for(var ye=[],Te=me;Te<he;++Te)ye.push(new xn(C[Te],i(Te),r));return ye}var d=t.from,v=t.to,C=t.text,H=xe(e,d.line),G=xe(e,v.line),Z=Pe(C),$=i(C.length-1),ne=v.line-d.line;if(t.full)e.insert(0,f(0,C.length)),e.remove(C.length,e.size-C.length);else if(Eu(e,t)){var oe=f(0,C.length-1);s(G,G.text,$),ne&&e.remove(d.line,ne),oe.length&&e.insert(d.line,oe)}else if(H==G)if(C.length==1)s(H,H.text.slice(0,d.ch)+Z+H.text.slice(v.ch),$);else{var fe=f(1,C.length-1);fe.push(new xn(Z+H.text.slice(v.ch),$,r)),s(H,H.text.slice(0,d.ch)+C[0],i(0)),e.insert(d.line+1,fe)}else if(C.length==1)s(H,H.text.slice(0,d.ch)+C[0]+G.text.slice(v.ch),i(0)),e.remove(d.line+1,ne);else{s(H,H.text.slice(0,d.ch)+C[0],i(0)),s(G,Z+G.text.slice(v.ch),$);var ce=f(1,C.length-1);ne>1&&e.remove(d.line+1,ne-1),e.insert(d.line+1,ce)}wt(e,"change",e,t)}function Kr(e,t,n){function r(i,s,f){if(i.linked)for(var d=0;d<i.linked.length;++d){var v=i.linked[d];if(v.doc!=s){var C=f&&v.sharedHist;n&&!C||(t(v.doc,C),r(v.doc,i,C))}}}r(e,null,!0)}function Nu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,El(e),Kl(e),Pu(e),e.options.direction=t.direction,e.options.lineWrapping||wl(e),e.options.mode=t.modeOption,Ft(e)}function Pu(e){(e.doc.direction=="rtl"?Me:U)(e.display.lineDiv,"CodeMirror-rtl")}function Ip(e){qt(e,function(){Pu(e),Ft(e)})}function wo(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 jl(e,t){var n={from:ie(t.from),to:Ur(t),text:yr(e,t.from,t.to)};return Iu(e,n,t.from.line,t.to.line+1),Kr(e,function(r){return Iu(r,n,t.from.line,t.to.line+1)},!0),n}function zu(e){for(;e.length;){var t=Pe(e);if(t.ranges)e.pop();else break}}function Rp(e,t){if(t)return zu(e.done),Pe(e.done);if(e.done.length&&!Pe(e.done).ranges)return Pe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Pe(e.done)}function Du(e,t,n,r){var i=e.history;i.undone.length=0;var s=+new Date,f,d;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(f=Rp(i,i.lastOp==r)))d=Pe(f.changes),M(t.from,t.to)==0&&M(t.from,d.to)==0?d.to=Ur(t):f.changes.push(jl(e,t));else{var v=Pe(i.done);for((!v||!v.ranges)&&xo(e.sel,i.done),f={changes:[jl(e,t)],generation:i.generation},i.done.push(f);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,d||_e(e,"historyAdded")}function Fp(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Bp(e,t,n,r){var i=e.history,s=r&&r.origin;n==i.lastSelOp||s&&i.lastSelOrigin==s&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==s||Fp(e,s,Pe(i.done),t))?i.done[i.done.length-1]=t:xo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=s,i.lastSelOp=n,r&&r.clearRedo!==!1&&zu(i.undone)}function xo(e,t){var n=Pe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Iu(e,t,n,r){var i=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(f){f.markedSpans&&((i||(i=t["spans_"+e.id]={}))[s]=f.markedSpans),++s})}function Hp(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Wp(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Hp(n[i]));return r}function Ru(e,t){var n=Wp(e,t),r=vl(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var s=n[i],f=r[i];if(s&&f){e:for(var d=0;d<f.length;++d){for(var v=f[d],C=0;C<s.length;++C)if(s[C].marker==v.marker)continue e;s.push(v)}}else f&&(n[i]=f)}return n}function On(e,t,n){for(var r=[],i=0;i<e.length;++i){var s=e[i];if(s.ranges){r.push(n?Vt.prototype.deepCopy.call(s):s);continue}var f=s.changes,d=[];r.push({changes:d});for(var v=0;v<f.length;++v){var C=f[v],H=void 0;if(d.push({from:C.from,to:C.to,text:C.text}),t)for(var G in C)(H=G.match(/^spans_(\d+)$/))&&Se(t,Number(H[1]))>-1&&(Pe(d)[G]=C[G],delete C[G])}}return r}function ql(e,t,n,r){if(r){var i=e.anchor;if(n){var s=M(t,i)<0;s!=M(n,i)<0?(i=t,t=n):s!=M(t,n)<0&&(t=n)}return new Xe(i,t)}else return new Xe(n||t,t)}function ko(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),_t(e,new Vt([ql(e.sel.primary(),t,n,i)],0),r)}function Fu(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)r[s]=ql(e.sel.ranges[s],t[s],null,i);var f=fr(e.cm,r,e.sel.primIndex);_t(e,f,n)}function Xl(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,_t(e,fr(e.cm,i,e.sel.primIndex),r)}function Bu(e,t,n,r){_t(e,Wr(t,n),r)}function Up(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var s=0;s<i.length;s++)this.ranges[s]=new Xe(ve(e,i[s].anchor),ve(e,i[s].head))},origin:n&&n.origin};return _e(e,"beforeSelectionChange",e,r),e.cm&&_e(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?fr(e.cm,r.ranges,r.ranges.length-1):t}function Hu(e,t,n){var r=e.history.done,i=Pe(r);i&&i.ranges?(r[r.length-1]=t,So(e,t,n)):_t(e,t,n)}function _t(e,t,n){So(e,t,n),Bp(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function So(e,t,n){(ut(e,"beforeSelectionChange")||e.cm&&ut(e.cm,"beforeSelectionChange"))&&(t=Up(e,t,n));var r=n&&n.bias||(M(t.primary().head,e.sel.primary().head)<0?-1:1);Wu(e,Ku(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Mn(e.cm)}function Wu(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,rr(e.cm)),wt(e,"cursorActivity",e))}function Uu(e){Wu(e,Ku(e,e.sel,null,!1))}function Ku(e,t,n,r){for(var i,s=0;s<t.ranges.length;s++){var f=t.ranges[s],d=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],v=Co(e,f.anchor,d&&d.anchor,n,r),C=Co(e,f.head,d&&d.head,n,r);(i||v!=f.anchor||C!=f.head)&&(i||(i=t.ranges.slice(0,s)),i[s]=new Xe(v,C))}return i?fr(e.cm,i,t.primIndex):t}function _n(e,t,n,r,i){var s=xe(e,t.line);if(s.markedSpans)for(var f=0;f<s.markedSpans.length;++f){var d=s.markedSpans[f],v=d.marker,C="selectLeft"in v?!v.selectLeft:v.inclusiveLeft,H="selectRight"in v?!v.selectRight:v.inclusiveRight;if((d.from==null||(C?d.from<=t.ch:d.from<t.ch))&&(d.to==null||(H?d.to>=t.ch:d.to>t.ch))){if(i&&(_e(v,"beforeCursorEnter"),v.explicitlyCleared))if(s.markedSpans){--f;continue}else break;if(!v.atomic)continue;if(n){var G=v.find(r<0?1:-1),Z=void 0;if((r<0?H:C)&&(G=Gu(e,G,-r,G&&G.line==t.line?s:null)),G&&G.line==t.line&&(Z=M(G,n))&&(r<0?Z<0:Z>0))return _n(e,G,t,r,i)}var $=v.find(r<0?-1:1);return(r<0?C:H)&&($=Gu(e,$,r,$.line==t.line?s:null)),$?_n(e,$,t,r,i):null}}return t}function Co(e,t,n,r,i){var s=r||1,f=_n(e,t,n,s,i)||!i&&_n(e,t,n,s,!0)||_n(e,t,n,-s,i)||!i&&_n(e,t,n,-s,!0);return f||(e.cantEdit=!0,ae(e.first,0))}function Gu(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?ve(e,ae(t.line-1)):null:n>0&&t.ch==(r||xe(e,t.line)).text.length?t.line<e.first+e.size-1?ae(t.line+1,0):null:new ae(t.line,t.ch+n)}function ju(e){e.setSelection(ae(e.firstLine(),0),ae(e.lastLine()),Be)}function qu(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,s,f,d){i&&(r.from=ve(e,i)),s&&(r.to=ve(e,s)),f&&(r.text=f),d!==void 0&&(r.origin=d)}),_e(e,"beforeChange",e,r),e.cm&&_e(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function En(e,t,n){if(e.cm){if(!e.cm.curOp)return xt(e.cm,En)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((ut(e,"beforeChange")||e.cm&&ut(e.cm,"beforeChange"))&&(t=qu(e,t,!0),!t))){var r=Is&&!n&&Bd(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Xu(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Xu(e,t)}}function Xu(e,t){if(!(t.text.length==1&&t.text[0]==""&&M(t.from,t.to)==0)){var n=Ul(e,t);Du(e,t,n,e.cm?e.cm.curOp.id:NaN),yi(e,t,n,vl(e,t));var r=[];Kr(e,function(i,s){!s&&Se(r,i.history)==-1&&(Zu(i.history,t),r.push(i.history)),yi(i,t,null,vl(i,t))})}}function Lo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,s,f=e.sel,d=t=="undo"?i.done:i.undone,v=t=="undo"?i.undone:i.done,C=0;C<d.length&&(s=d[C],!(n?s.ranges&&!s.equals(e.sel):!s.ranges));C++);if(C!=d.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(s=d.pop(),s.ranges){if(xo(s,v),n&&!s.equals(e.sel)){_t(e,s,{clearRedo:!1});return}f=s}else if(r){d.push(s);return}else break;var H=[];xo(f,v),v.push({changes:H,generation:i.generation}),i.generation=s.generation||++i.maxGeneration;for(var G=ut(e,"beforeChange")||e.cm&&ut(e.cm,"beforeChange"),Z=function(oe){var fe=s.changes[oe];if(fe.origin=t,G&&!qu(e,fe,!1))return d.length=0,{};H.push(jl(e,fe));var ce=oe?Ul(e,fe):Pe(d);yi(e,fe,ce,Ru(e,fe)),!oe&&e.cm&&e.cm.scrollIntoView({from:fe.from,to:Ur(fe)});var me=[];Kr(e,function(he,ye){!ye&&Se(me,he.history)==-1&&(Zu(he.history,fe),me.push(he.history)),yi(he,fe,null,Ru(he,fe))})},$=s.changes.length-1;$>=0;--$){var ne=Z($);if(ne)return ne.v}}}}function Yu(e,t){if(t!=0&&(e.first+=t,e.sel=new Vt(He(e.sel.ranges,function(i){return new Xe(ae(i.anchor.line+t,i.anchor.ch),ae(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Ft(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Br(e.cm,r,"gutter")}}function yi(e,t,n,r){if(e.cm&&!e.cm.curOp)return xt(e.cm,yi)(e,t,n,r);if(t.to.line<e.first){Yu(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 i=t.text.length-1-(e.first-t.from.line);Yu(e,i),t={from:ae(e.first,0),to:ae(t.to.line+i,t.to.ch),text:[Pe(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:ae(s,xe(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=yr(e,t.from,t.to),n||(n=Ul(e,t)),e.cm?Kp(e.cm,t,r):Gl(e,t,r),So(e,n,Be),e.cantEdit&&Co(e,ae(e.firstLine(),0))&&(e.cantEdit=!1)}}function Kp(e,t,n){var r=e.doc,i=e.display,s=t.from,f=t.to,d=!1,v=s.line;e.options.lineWrapping||(v=qe(xr(xe(r,s.line))),r.iter(v,f.line+1,function($){if($==i.maxLine)return d=!0,!0})),r.sel.contains(t.from,t.to)>-1&&rr(e),Gl(r,t,n,hu(e)),e.options.lineWrapping||(r.iter(v,s.line+t.text.length,function($){var ne=ao($);ne>i.maxLineLength&&(i.maxLine=$,i.maxLineLength=ne,i.maxLineChanged=!0,d=!1)}),d&&(e.curOp.updateMaxLine=!0)),Nd(r,s.line),gi(e,400);var C=t.text.length-(f.line-s.line)-1;t.full?Ft(e):s.line==f.line&&t.text.length==1&&!Eu(e.doc,t)?Br(e,s.line,"text"):Ft(e,s.line,f.line+1,C);var H=ut(e,"changes"),G=ut(e,"change");if(G||H){var Z={from:s,to:f,text:t.text,removed:t.removed,origin:t.origin};G&&wt(e,"change",e,Z),H&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Z)}e.display.selForContextMenu=null}function Nn(e,t,n,r,i){var s;r||(r=n),M(r,n)<0&&(s=[r,n],n=s[0],r=s[1]),typeof t=="string"&&(t=e.splitLines(t)),En(e,{from:n,to:r,text:t,origin:i})}function Qu(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function $u(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i],f=!0;if(s.ranges){s.copied||(s=e[i]=s.deepCopy(),s.copied=!0);for(var d=0;d<s.ranges.length;d++)Qu(s.ranges[d].anchor,t,n,r),Qu(s.ranges[d].head,t,n,r);continue}for(var v=0;v<s.changes.length;++v){var C=s.changes[v];if(n<C.from.line)C.from=ae(C.from.line+r,C.from.ch),C.to=ae(C.to.line+r,C.to.ch);else if(t<=C.to.line){f=!1;break}}f||(e.splice(0,i+1),i=0)}}function Zu(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;$u(e.done,n,r,i),$u(e.undone,n,r,i)}function bi(e,t,n,r){var i=t,s=t;return typeof t=="number"?s=xe(e,We(e,t)):i=qe(t),i==null?null:(r(s,i)&&e.cm&&Br(e.cm,i,n),s)}function wi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}wi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Gd(i),wt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function xi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}xi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var s=Math.min(t,i-e),f=r.height;if(r.removeInner(e,s),this.height-=f-r.height,i==s&&(this.children.splice(n--,1),r.parent=null),(t-=s)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof wi))){var d=[];this.collapse(d),this.children=[new wi(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,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],s=i.chunkSize();if(e<=s){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var f=i.lines.length%25+25,d=f;d<i.lines.length;){var v=new wi(i.lines.slice(d,d+=25));i.height-=v.height,this.children.splice(++r,0,v),v.parent=this}i.lines=i.lines.slice(0,f),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new xi(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=Se(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new xi(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],s=i.chunkSize();if(e<s){var f=Math.min(t,s-e);if(i.iterN(e,f,n))return!0;if((t-=f)==0)break;e=0}else e-=s}}};var ki=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ki.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=qe(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var s=si(this);jt(n,Math.max(0,n.height-s)),e&&(qt(e,function(){Ju(e,n,-s),Br(e,r,"widget")}),wt(e,"lineWidgetCleared",e,this,r))}},ki.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=si(this)-t;!i||(Fr(this.doc,r)||jt(r,r.height+i),n&&qt(n,function(){n.curOp.forceUpdate=!0,Ju(n,r,i),wt(n,"lineWidgetChanged",n,e,qe(r))}))},Ge(ki);function Ju(e,t,n){_r(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Il(e,n)}function Gp(e,t,n,r){var i=new ki(e,n,r),s=e.cm;return s&&i.noHScroll&&(s.display.alignWidgets=!0),bi(e,t,"widget",function(f){var d=f.widgets||(f.widgets=[]);if(i.insertAt==null?d.push(i):d.splice(Math.min(d.length,Math.max(0,i.insertAt)),0,i),i.line=f,s&&!Fr(e,f)){var v=_r(f)<e.scrollTop;jt(f,f.height+si(i)),v&&Il(s,i.height),s.curOp.forceUpdate=!0}return!0}),s&&wt(s,"lineWidgetAdded",s,i,typeof t=="number"?t:qe(t)),i}var Vu=0,Gr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Vu};Gr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ln(e),ut(this,"clear")){var n=this.find();n&&wt(this,"clear",n.from,n.to)}for(var r=null,i=null,s=0;s<this.lines.length;++s){var f=this.lines[s],d=oi(f.markedSpans,this);e&&!this.collapsed?Br(e,qe(f),"text"):e&&(d.to!=null&&(i=qe(f)),d.from!=null&&(r=qe(f))),f.markedSpans=Dd(f.markedSpans,d),d.from==null&&this.collapsed&&!Fr(this.doc,f)&&e&&jt(f,Cn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var v=0;v<this.lines.length;++v){var C=xr(this.lines[v]),H=ao(C);H>e.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=H,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Ft(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uu(e.doc)),e&&wt(e,"markerCleared",e,this,r,i),t&&an(e),this.parent&&this.parent.clear()}},Gr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var s=this.lines[i],f=oi(s.markedSpans,this);if(f.from!=null&&(n=ae(t?s:qe(s),f.from),e==-1))return n;if(f.to!=null&&(r=ae(t?s:qe(s),f.to),e==1))return r}return n&&{from:n,to:r}},Gr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||qt(r,function(){var i=t.line,s=qe(t.line),f=Cl(r,s);if(f&&(iu(f),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Fr(n.doc,i)&&n.height!=null){var d=n.height;n.height=null;var v=si(n)-d;v&&jt(i,i.height+v)}wt(r,"markerChanged",r,e)})},Gr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Se(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Gr.prototype.detachLine=function(e){if(this.lines.splice(Se(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ge(Gr);function Pn(e,t,n,r,i){if(r&&r.shared)return jp(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return xt(e.cm,Pn)(e,t,n,r,i);var s=new Gr(e,i),f=M(t,n);if(r&&Ke(r,s,!1),f>0||f==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=z("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Us(e,t.line,t,n,s)||t.line!=n.line&&Us(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");zd()}s.addToHistory&&Du(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var d=t.line,v=e.cm,C;if(e.iter(d,n.line+1,function(G){v&&s.collapsed&&!v.options.lineWrapping&&xr(G)==v.display.maxLine&&(C=!0),s.collapsed&&d!=t.line&&jt(G,0),Id(G,new no(s,d==t.line?t.ch:null,d==n.line?n.ch:null),e.cm&&e.cm.curOp),++d}),s.collapsed&&e.iter(t.line,n.line+1,function(G){Fr(e,G)&&jt(G,0)}),s.clearOnEnter&&be(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(Pd(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Vu,s.atomic=!0),v){if(C&&(v.curOp.updateMaxLine=!0),s.collapsed)Ft(v,t.line,n.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var H=t.line;H<=n.line;H++)Br(v,H,"text");s.atomic&&Uu(v.doc),wt(v,"markerAdded",v,s)}return s}var Si=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Si.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();wt(this,"clear")}},Si.prototype.find=function(e,t){return this.primary.find(e,t)},Ge(Si);function jp(e,t,n,r,i){r=Ke(r),r.shared=!1;var s=[Pn(e,t,n,r,i)],f=s[0],d=r.widgetNode;return Kr(e,function(v){d&&(r.widgetNode=d.cloneNode(!0)),s.push(Pn(v,ve(v,t),ve(v,n),r,i));for(var C=0;C<v.linked.length;++C)if(v.linked[C].isParent)return;f=Pe(s)}),new Si(s,f)}function ef(e){return e.findMarks(ae(e.first,0),e.clipPos(ae(e.lastLine())),function(t){return t.parent})}function qp(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),s=e.clipPos(i.from),f=e.clipPos(i.to);if(M(s,f)){var d=Pn(e,s,f,r.primary,r.primary.type);r.markers.push(d),d.parent=r}}}function Xp(e){for(var t=function(r){var i=e[r],s=[i.primary.doc];Kr(i.primary.doc,function(v){return s.push(v)});for(var f=0;f<i.markers.length;f++){var d=i.markers[f];Se(s,d.doc)==-1&&(d.parent=null,i.markers.splice(f--,1))}},n=0;n<e.length;n++)t(n)}var Yp=0,Bt=function(e,t,n,r,i){if(!(this instanceof Bt))return new Bt(e,t,n,r,i);n==null&&(n=0),xi.call(this,[new wi([new xn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var s=ae(n,0);this.sel=Wr(s),this.history=new wo(null),this.id=++Yp,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Gl(this,{from:s,to:s,text:e}),_t(this,Wr(s),Be)};Bt.prototype=P(xi.prototype,{constructor:Bt,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ri(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:kt(function(e){var t=ae(this.first,0),n=this.first+this.size-1;En(this,{from:t,to:ae(n,xe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ci(this.cm,0,0),_t(this,Wr(t),Be)}),replaceRange:function(e,t,n,r){t=ve(this,t),n=n?ve(this,n):t,Nn(this,e,t,n,r)},getRange:function(e,t,n){var r=yr(this,ve(this,e),ve(this,t));return n===!1?r:n===""?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Jr(this,e))return xe(this,e)},getLineNumber:function(e){return qe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=xe(this,e)),xr(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(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:kt(function(e,t,n){Bu(this,ve(this,typeof e=="number"?ae(e,t||0):e),null,n)}),setSelection:kt(function(e,t,n){Bu(this,ve(this,e),ve(this,t||e),n)}),extendSelection:kt(function(e,t,n){ko(this,ve(this,e),t&&ve(this,t),n)}),extendSelections:kt(function(e,t){Fu(this,Zt(this,e),t)}),extendSelectionsBy:kt(function(e,t){var n=He(this.sel.ranges,e);Fu(this,Zt(this,n),t)}),setSelections:kt(function(e,t,n){if(!!e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Xe(ve(this,e[i].anchor),ve(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),_t(this,fr(this.cm,r,t),n)}}),addSelection:kt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Xe(ve(this,e),ve(this,t||e))),_t(this,fr(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=yr(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=yr(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:kt(function(e,t,n){for(var r=[],i=this.sel,s=0;s<i.ranges.length;s++){var f=i.ranges[s];r[s]={from:f.from(),to:f.to(),text:this.splitLines(e[s]),origin:n}}for(var d=t&&t!="end"&&Dp(this,r,t),v=r.length-1;v>=0;v--)En(this,r[v]);d?Hu(this,d):this.cm&&Mn(this.cm)}),undo:kt(function(){Lo(this,"undo")}),redo:kt(function(){Lo(this,"redo")}),undoSelection:kt(function(){Lo(this,"undo",!0)}),redoSelection:kt(function(){Lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new wo(this.history),Kr(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:On(this.history.done),undone:On(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history);t.done=On(e.done.slice(0),null,!0),t.undone=On(e.undone.slice(0),null,!0)},setGutterMarker:kt(function(e,t,n){return bi(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&ee(i)&&(r.gutterMarkers=null),!0})}),clearGutter:kt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bi(t,n,"gutter",function(){return n.gutterMarkers[e]=null,ee(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Jr(this,e)||(t=e,e=xe(this,e),!e))return null}else if(t=qe(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:kt(function(e,t,n){return bi(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(B(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:kt(function(e,t,n){return bi(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=r[i];if(s)if(n==null)r[i]=null;else{var f=s.match(B(n));if(!f)return!1;var d=f.index+f[0].length;r[i]=s.slice(0,f.index)+(!f.index||d==s.length?"":" ")+s.slice(d)||null}else return!1;return!0})}),addLineWidget:kt(function(e,t,n){return Gp(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Pn(this,ve(this,e),ve(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={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),Pn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ve(this,e);var t=[],n=xe(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ve(this,e),t=ve(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(s){var f=s.markedSpans;if(f)for(var d=0;d<f.length;d++){var v=f[d];!(v.to!=null&&i==e.line&&e.ch>=v.to||v.from==null&&i!=e.line||v.from!=null&&i==t.line&&v.from>=t.ch)&&(!n||n(v.marker))&&r.push(v.marker.parent||v.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var s=i.text.length+r;if(s>e)return t=e,!0;e-=s,++n}),ve(this,ae(n,t))},indexFromPos:function(e){e=ve(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new Bt(ri(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,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Bt(ri(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],qp(r,ef(this)),r},unlinkDoc:function(e){if(e instanceof rt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Xp(ef(this));break}}if(e.history==this.history){var r=[e.id];Kr(e,function(i){return r.push(i.id)},!0),e.history=new wo(null),e.history.done=On(this.history.done,r),e.history.undone=On(this.history.undone,r)}},iterLinkedDocs:function(e){Kr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Jn(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:kt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Ip(this.cm))})}),Bt.prototype.eachLine=Bt.prototype.iter;var tf=0;function Qp(e){var t=this;if(rf(t),!(nt(t,e)||Er(t.display,e))){pt(e),g&&(tf=+new Date);var n=tn(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,s=Array(i),f=0,d=function(){++f==i&&xt(t,function(){n=ve(t.doc,n);var $={from:n,to:n,text:t.doc.splitLines(s.filter(function(ne){return ne!=null}).join(t.doc.lineSeparator())),origin:"paste"};En(t.doc,$),Hu(t.doc,Wr(ve(t.doc,n),ve(t.doc,Ur($))))})()},v=function($,ne){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,$.type)==-1){d();return}var oe=new FileReader;oe.onerror=function(){return d()},oe.onload=function(){var fe=oe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(fe)){d();return}s[ne]=fe,d()},oe.readAsText($)},C=0;C<r.length;C++)v(r[C],C);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var H=e.dataTransfer.getData("Text");if(H){var G;if(t.state.draggingText&&!t.state.draggingText.copy&&(G=t.listSelections()),So(t.doc,Wr(n,n)),G)for(var Z=0;Z<G.length;++Z)Nn(t.doc,"",G[Z].anchor,G[Z].head,"drag");t.replaceSelection(H,"around","paste"),t.display.input.focus()}}catch($){}}}}function $p(e,t){if(g&&(!e.state.draggingText||+new Date-tf<100)){Gt(t);return}if(!(nt(e,t)||Er(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!R)){var n=D("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),_&&n.parentNode.removeChild(n)}}function Zp(e,t){var n=tn(e,t);if(!!n){var r=document.createDocumentFragment();gu(e,n,r),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),X(e.display.dragCursor,r)}}function rf(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function nf(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var s=0;s<n.length;s++)e(n[s])})}}var of=!1;function Jp(){of||(Vp(),of=!0)}function Vp(){var e;be(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,nf(eg)},100))}),be(window,"blur",function(){return nf(Tn)})}function eg(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var jr={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"},Ci=0;Ci<10;Ci++)jr[Ci+48]=jr[Ci+96]=String(Ci);for(var To=65;To<=90;To++)jr[To]=String.fromCharCode(To);for(var Li=1;Li<=12;Li++)jr[Li+111]=jr[Li+63235]="F"+Li;var Nr={};Nr.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"},Nr.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"},Nr.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"},Nr.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"]},Nr.default=c?Nr.macDefault:Nr.pcDefault;function tg(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,s,f=0;f<t.length-1;f++){var d=t[f];if(/^(cmd|meta|m)$/i.test(d))s=!0;else if(/^a(lt)?$/i.test(d))n=!0;else if(/^(c|ctrl|control)$/i.test(d))r=!0;else if(/^s(hift)?$/i.test(d))i=!0;else throw new Error("Unrecognized modifier name: "+d)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function rg(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=He(n.split(" "),tg),s=0;s<i.length;s++){var f=void 0,d=void 0;s==i.length-1?(d=i.join(" "),f=r):(d=i.slice(0,s+1).join(" "),f="...");var v=t[d];if(!v)t[d]=f;else if(v!=f)throw new Error("Inconsistent bindings for "+d)}delete e[n]}for(var C in t)e[C]=t[C];return e}function zn(e,t,n,r){t=Mo(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return zn(e,t.fallthrough,n,r);for(var s=0;s<t.fallthrough.length;s++){var f=zn(e,t.fallthrough[s],n,r);if(f)return f}}}function lf(e){var t=typeof e=="string"?e:jr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function af(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(L?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(L?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function sf(e,t){if(_&&e.keyCode==34&&e.char)return!1;var n=jr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),af(n,e,t))}function Mo(e){return typeof e=="string"?Nr[e]:e}function Dn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var s=t(n[i]);r.length&&M(s.from,Pe(r).to)<=0;){var f=r.pop();if(M(f.from,s.from)<0){s.from=f.from;break}}r.push(s)}qt(e,function(){for(var d=r.length-1;d>=0;d--)Nn(e.doc,"",r[d].from,r[d].to,"+delete");Mn(e)})}function Yl(e,t,n){var r=we(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ql(e,t,n){var r=Yl(e,t.ch,n);return r==null?null:new ae(t.line,r,n<0?"after":"before")}function $l(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var s=$e(n,t.doc.direction);if(s){var f=i<0?Pe(s):s[0],d=i<0==(f.level==1),v=d?"after":"before",C;if(f.level>0||t.doc.direction=="rtl"){var H=Sn(t,n);C=i<0?n.text.length-1:0;var G=Sr(t,H,C).top;C=Fe(function(Z){return Sr(t,H,Z).top==G},i<0==(f.level==1)?f.from:f.to-1,C),v=="before"&&(C=Yl(n,C,1))}else C=i<0?f.to:f.from;return new ae(r,C,v)}}return new ae(r,i<0?n.text.length:0,i<0?"before":"after")}function ng(e,t,n,r){var i=$e(t,e.doc.direction);if(!i)return Ql(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var s=Ie(i,n.ch,n.sticky),f=i[s];if(e.doc.direction=="ltr"&&f.level%2==0&&(r>0?f.to>n.ch:f.from<n.ch))return Ql(t,n,r);var d=function(ce,me){return Yl(t,ce instanceof ae?ce.ch:ce,me)},v,C=function(ce){return e.options.lineWrapping?(v=v||Sn(e,t),cu(e,t,v,ce)):{begin:0,end:t.text.length}},H=C(n.sticky=="before"?d(n,-1):n.ch);if(e.doc.direction=="rtl"||f.level==1){var G=f.level==1==r<0,Z=d(n,G?1:-1);if(Z!=null&&(G?Z<=f.to&&Z<=H.end:Z>=f.from&&Z>=H.begin)){var $=G?"before":"after";return new ae(n.line,Z,$)}}var ne=function(ce,me,he){for(var ye=function(et,St){return St?new ae(n.line,d(et,1),"before"):new ae(n.line,et,"after")};ce>=0&&ce<i.length;ce+=me){var Te=i[ce],Ce=me>0==(Te.level!=1),Re=Ce?he.begin:d(he.end,-1);if(Te.from<=Re&&Re<Te.to||(Re=Ce?Te.from:d(Te.to,-1),he.begin<=Re&&Re<he.end))return ye(Re,Ce)}},oe=ne(s+r,r,H);if(oe)return oe;var fe=r>0?H.end:d(H.begin,-1);return fe!=null&&!(r>0&&fe==t.text.length)&&(oe=ne(r>0?0:i.length-1,r,C(fe)),oe)?oe:null}var Ti={selectAll:ju,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Be)},killLine:function(e){return Dn(e,function(t){if(t.empty()){var n=xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ae(t.head.line+1,0)}:{from:t.head,to:ae(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Dn(e,function(t){return{from:ae(t.from().line,0),to:ve(e.doc,ae(t.to().line+1,0))}})},delLineLeft:function(e){return Dn(e,function(t){return{from:ae(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Dn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Dn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},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(ae(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ae(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return uf(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ff(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ig(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ff(e,t.head):r},Oe)},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var s=n[i].from(),f=je(e.getLine(s.line),s.ch,r);t.push(lr(r-f%r))}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(),n=[],r=0;r<t.length;r++)if(!!t[r].empty()){var i=t[r].head,s=xe(e.doc,i.line).text;if(s){if(i.ch==s.length&&(i=new ae(i.line,i.ch-1)),i.ch>0)i=new ae(i.line,i.ch+1),e.replaceRange(s.charAt(i.ch-1)+s.charAt(i.ch-2),ae(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var f=xe(e.doc,i.line-1).text;f&&(i=new ae(i.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ae(i.line-1,f.length-1),i,"+transpose"))}}n.push(new Xe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return qt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Mn(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function uf(e,t){var n=xe(e.doc,t),r=xr(n);return r!=n&&(t=qe(r)),$l(!0,e,r,t,1)}function ig(e,t){var n=xe(e.doc,t),r=Wd(n);return r!=n&&(t=qe(r)),$l(!0,e,n,t,-1)}function ff(e,t){var n=uf(e,t.line),r=xe(e.doc,n.line),i=$e(r,e.doc.direction);if(!i||i[0].level==0){var s=Math.max(n.ch,r.text.search(/\S/)),f=t.line==n.line&&t.ch<=s&&t.ch;return ae(n.line,f?0:s,n.sticky)}return n}function Ao(e,t,n){if(typeof t=="string"&&(t=Ti[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=ze}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function og(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=zn(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&zn(t,e.options.extraKeys,n,e)||zn(t,e.options.keyMap,n,e)}var lg=new Je;function Mi(e,t,n,r){var i=e.state.keySeq;if(i){if(lf(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:lg.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),cf(e,i+" "+t,n,r))return!0}return cf(e,t,n,r)}function cf(e,t,n,r){var i=og(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&wt(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(pt(n),Nl(e)),!!i}function hf(e,t){var n=sf(t,!0);return n?t.shiftKey&&!e.state.keySeq?Mi(e,"Shift-"+n,t,function(r){return Ao(e,r,!0)})||Mi(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Ao(e,r)}):Mi(e,n,t,function(r){return Ao(e,r)}):!1}function ag(e,t,n){return Mi(e,"'"+n+"'",t,function(r){return Ao(e,r,!0)})}var Zl=null;function df(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=de(),!nt(t,e))){g&&x<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=hf(t,e);_&&(Zl=r?n:null,!r&&n==88&&!to&&(c?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),h&&!c&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&sg(t)}}function sg(e){var t=e.display.lineDiv;Me(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(U(t,"CodeMirror-crosshair"),bt(document,"keyup",n),bt(document,"mouseover",n))}be(document,"keyup",n),be(document,"mouseover",n)}function pf(e){e.keyCode==16&&(this.doc.sel.shift=!1),nt(this,e)}function gf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Er(t.display,e)||nt(t,e)||e.ctrlKey&&!e.altKey||c&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(_&&n==Zl){Zl=null,pt(e);return}if(!(_&&(!e.which||e.which<10)&&hf(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(ag(t,e,i)||t.display.input.onKeyPress(e))}}}var ug=400,Jl=function(e,t,n){this.time=e,this.pos=t,this.button=n};Jl.prototype.compare=function(e,t,n){return this.time+ug>e&&M(t,this.pos)==0&&n==this.button};var Ai,Oi;function fg(e,t){var n=+new Date;return Oi&&Oi.compare(n,e,t)?(Ai=Oi=null,"triple"):Ai&&Ai.compare(n,e,t)?(Oi=new Jl(n,e,t),Ai=null,"double"):(Ai=new Jl(n,e,t),Oi=null,"single")}function vf(e){var t=this,n=t.display;if(!(nt(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Er(n,e)){y||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Vl(t,e)){var r=tn(t,e),i=Ji(e),s=r?fg(r,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&cg(t,i,r,s,e))&&(i==1?r?dg(t,r,s,e):Ir(e)==n.scroller&&pt(e):i==2?(r&&ko(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(j?t.display.input.onContextMenu(e):Pl(t)))}}}function cg(e,t,n,r,i){var s="Click";return r=="double"?s="Double"+s:r=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,Mi(e,af(s,i),i,function(f){if(typeof f=="string"&&(f=Ti[f]),!f)return!1;var d=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),d=f(e,n)!=ze}finally{e.state.suppressEdits=!1}return d})}function hg(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var s=w?n.shiftKey&&n.metaKey:n.altKey;i.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=c?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(c?n.altKey:n.ctrlKey)),i}function dg(e,t,n,r){g?setTimeout(Ne(vu,e),0):e.curOp.focus=de();var i=hg(e,n,r),s=e.doc.sel,f;e.options.dragDrop&&$n&&!e.isReadOnly()&&n=="single"&&(f=s.contains(t))>-1&&(M((f=s.ranges[f]).from(),t)<0||t.xRel>0)&&(M(f.to(),t)>0||t.xRel<0)?pg(e,r,t,i):gg(e,r,t,i)}function pg(e,t,n,r){var i=e.display,s=!1,f=xt(e,function(C){y&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Pl(e)),bt(i.wrapper.ownerDocument,"mouseup",f),bt(i.wrapper.ownerDocument,"mousemove",d),bt(i.scroller,"dragstart",v),bt(i.scroller,"drop",f),s||(pt(C),r.addNew||ko(e.doc,n,null,null,r.extend),y&&!R||g&&x==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),d=function(C){s=s||Math.abs(t.clientX-C.clientX)+Math.abs(t.clientY-C.clientY)>=10},v=function(){return s=!0};y&&(i.scroller.draggable=!0),e.state.draggingText=f,f.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",f),be(i.wrapper.ownerDocument,"mousemove",d),be(i.scroller,"dragstart",v),be(i.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function mf(e,t,n){if(n=="char")return new Xe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Xe(ae(t.line,0),ve(e.doc,ae(t.line+1,0)));var r=n(e,t);return new Xe(r.from,r.to)}function gg(e,t,n,r){g&&Pl(e);var i=e.display,s=e.doc;pt(t);var f,d,v=s.sel,C=v.ranges;if(r.addNew&&!r.extend?(d=s.sel.contains(n),d>-1?f=C[d]:f=new Xe(n,n)):(f=s.sel.primary(),d=s.sel.primIndex),r.unit=="rectangle")r.addNew||(f=new Xe(n,n)),n=tn(e,t,!0,!0),d=-1;else{var H=mf(e,n,r.unit);r.extend?f=ql(f,H.anchor,H.head,r.extend):f=H}r.addNew?d==-1?(d=C.length,_t(s,fr(e,C.concat([f]),d),{scroll:!1,origin:"*mouse"})):C.length>1&&C[d].empty()&&r.unit=="char"&&!r.extend?(_t(s,fr(e,C.slice(0,d).concat(C.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),v=s.sel):Xl(s,d,f,De):(d=0,_t(s,new Vt([f],0),De),v=s.sel);var G=n;function Z(he){if(M(G,he)!=0)if(G=he,r.unit=="rectangle"){for(var ye=[],Te=e.options.tabSize,Ce=je(xe(s,n.line).text,n.ch,Te),Re=je(xe(s,he.line).text,he.ch,Te),et=Math.min(Ce,Re),St=Math.max(Ce,Re),it=Math.min(n.line,he.line),Xt=Math.min(e.lastLine(),Math.max(n.line,he.line));it<=Xt;it++){var Ht=xe(s,it).text,gt=st(Ht,et,Te);et==St?ye.push(new Xe(ae(it,gt),ae(it,gt))):Ht.length>gt&&ye.push(new Xe(ae(it,gt),ae(it,st(Ht,St,Te))))}ye.length||ye.push(new Xe(n,n)),_t(s,fr(e,v.ranges.slice(0,d).concat(ye),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(he)}else{var Wt=f,Tt=mf(e,he,r.unit),yt=Wt.anchor,vt;M(Tt.anchor,yt)>0?(vt=Tt.head,yt=Ee(Wt.from(),Tt.anchor)):(vt=Tt.anchor,yt=se(Wt.to(),Tt.head));var lt=v.ranges.slice(0);lt[d]=vg(e,new Xe(ve(s,yt),vt)),_t(s,fr(e,lt,d),De)}}var $=i.wrapper.getBoundingClientRect(),ne=0;function oe(he){var ye=++ne,Te=tn(e,he,!0,r.unit=="rectangle");if(!!Te)if(M(Te,G)!=0){e.curOp.focus=de(),Z(Te);var Ce=vo(i,s);(Te.line>=Ce.to||Te.line<Ce.from)&&setTimeout(xt(e,function(){ne==ye&&oe(he)}),150)}else{var Re=he.clientY<$.top?-20:he.clientY>$.bottom?20:0;Re&&setTimeout(xt(e,function(){ne==ye&&(i.scroller.scrollTop+=Re,oe(he))}),50)}}function fe(he){e.state.selectingText=!1,ne=1/0,he&&(pt(he),i.input.focus()),bt(i.wrapper.ownerDocument,"mousemove",ce),bt(i.wrapper.ownerDocument,"mouseup",me),s.history.lastSelOrigin=null}var ce=xt(e,function(he){he.buttons===0||!Ji(he)?fe(he):oe(he)}),me=xt(e,fe);e.state.selectingText=me,be(i.wrapper.ownerDocument,"mousemove",ce),be(i.wrapper.ownerDocument,"mouseup",me)}function vg(e,t){var n=t.anchor,r=t.head,i=xe(e.doc,n.line);if(M(n,r)==0&&n.sticky==r.sticky)return t;var s=$e(i);if(!s)return t;var f=Ie(s,n.ch,n.sticky),d=s[f];if(d.from!=n.ch&&d.to!=n.ch)return t;var v=f+(d.from==n.ch==(d.level!=1)?0:1);if(v==0||v==s.length)return t;var C;if(r.line!=n.line)C=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var H=Ie(s,r.ch,r.sticky),G=H-f||(r.ch-n.ch)*(d.level==1?-1:1);H==v-1||H==v?C=G<0:C=G>0}var Z=s[v+(C?-1:0)],$=C==(Z.level==1),ne=$?Z.from:Z.to,oe=$?"after":"before";return n.ch==ne&&n.sticky==oe?t:new Xe(new ae(n.line,ne,oe),r)}function yf(e,t,n,r){var i,s;if(t.touches)i=t.touches[0].clientX,s=t.touches[0].clientY;else try{i=t.clientX,s=t.clientY}catch(Z){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&pt(t);var f=e.display,d=f.lineDiv.getBoundingClientRect();if(s>d.bottom||!ut(e,n))return At(t);s-=d.top-f.viewOffset;for(var v=0;v<e.display.gutterSpecs.length;++v){var C=f.gutters.childNodes[v];if(C&&C.getBoundingClientRect().right>=i){var H=br(e.doc,s),G=e.display.gutterSpecs[v];return _e(e,n,e,H,G.className,t),At(t)}}}function Vl(e,t){return yf(e,t,"gutterClick",!0)}function bf(e,t){Er(e.display,t)||mg(e,t)||nt(e,t,"contextmenu")||j||e.display.input.onContextMenu(t)}function mg(e,t){return ut(e,"gutterContextMenu")?yf(e,t,"gutterContextMenu",!1):!1}function wf(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ui(e)}var In={toString:function(){return"CodeMirror.Init"}},xf={},Oo={};function yg(e){var t=e.optionHandlers;function n(r,i,s,f){e.defaults[r]=i,s&&(t[r]=f?function(d,v,C){C!=In&&s(d,v,C)}:s)}e.defineOption=n,e.Init=In,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Kl(r)},!0),n("indentUnit",2,Kl,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){mi(r),ui(r),Ft(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var s=[],f=r.doc.first;r.doc.iter(function(v){for(var C=0;;){var H=v.text.indexOf(i,C);if(H==-1)break;C=H+i.length,s.push(ae(f,H))}f++});for(var d=s.length-1;d>=0;d--)Nn(r.doc,i,s[d],ae(s[d].line,s[d].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,i,s){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),s!=In&&r.refresh()}),n("specialCharPlaceholder",Xd,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",E?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!k),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){wf(r),vi(r)},!0),n("keyMap","default",function(r,i,s){var f=Mo(i),d=s!=In&&Mo(s);d&&d.detach&&d.detach(r,f),f.attach&&f.attach(r,d||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,wg,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Wl(i,r.options.lineNumbers),vi(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?_l(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return An(r)},!0),n("scrollbarStyle","native",function(r){ku(r),An(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Wl(r.options.gutters,i),vi(r)},!0),n("firstLineNumber",1,vi,!0),n("lineNumberFormatter",function(r){return r},vi,!0),n("showCursorWhenSelecting",!1,fi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Tn(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,bg),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,fi,!0),n("singleCursorHeightPerLine",!0,fi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mi,!0),n("addModeClass",!1,mi,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,mi,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function bg(e,t,n){var r=n&&n!=In;if(!t!=!r){var i=e.display.dragFunctions,s=t?be:bt;s(e.display.scroller,"dragstart",i.start),s(e.display.scroller,"dragenter",i.enter),s(e.display.scroller,"dragover",i.over),s(e.display.scroller,"dragleave",i.leave),s(e.display.scroller,"drop",i.drop)}}function wg(e){e.options.lineWrapping?(Me(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(U(e.display.wrapper,"CodeMirror-wrap"),wl(e)),El(e),Ft(e),ui(e),setTimeout(function(){return An(e)},100)}function rt(e,t){var n=this;if(!(this instanceof rt))return new rt(e,t);this.options=t=t?Ke(t):{},Ke(xf,t,!1);var r=t.value;typeof r=="string"?r=new Bt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new rt.inputStyles[t.inputStyle](this),s=this.display=new Pp(e,r,i,t);s.wrapper.CodeMirror=this,wf(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ku(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 Je,keySeq:null,specialChars:null},t.autofocus&&!E&&s.input.focus(),g&&x<11&&setTimeout(function(){return n.display.input.reset(!0)},20),xg(this),Jp(),ln(this),this.curOp.forceUpdate=!0,Nu(this,r),t.autofocus&&!E||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&zl(n)},20):Tn(this);for(var f in Oo)Oo.hasOwnProperty(f)&&Oo[f](this,t[f],In);Lu(this),t.finishInit&&t.finishInit(this);for(var d=0;d<ea.length;++d)ea[d](this);an(this),y&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}rt.defaults=xf,rt.optionHandlers=Oo;function xg(e){var t=e.display;be(t.scroller,"mousedown",xt(e,vf)),g&&x<11?be(t.scroller,"dblclick",xt(e,function(v){if(!nt(e,v)){var C=tn(e,v);if(!(!C||Vl(e,v)||Er(e.display,v))){pt(v);var H=e.findWordAt(C);ko(e.doc,H.anchor,H.head)}}})):be(t.scroller,"dblclick",function(v){return nt(e,v)||pt(v)}),be(t.scroller,"contextmenu",function(v){return bf(e,v)}),be(t.input.getField(),"contextmenu",function(v){t.scroller.contains(v.target)||bf(e,v)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function s(v){if(v.touches.length!=1)return!1;var C=v.touches[0];return C.radiusX<=1&&C.radiusY<=1}function f(v,C){if(C.left==null)return!0;var H=C.left-v.left,G=C.top-v.top;return H*H+G*G>20*20}be(t.scroller,"touchstart",function(v){if(!nt(e,v)&&!s(v)&&!Vl(e,v)){t.input.ensurePolled(),clearTimeout(n);var C=+new Date;t.activeTouch={start:C,moved:!1,prev:C-r.end<=300?r:null},v.touches.length==1&&(t.activeTouch.left=v.touches[0].pageX,t.activeTouch.top=v.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(v){var C=t.activeTouch;if(C&&!Er(t,v)&&C.left!=null&&!C.moved&&new Date-C.start<300){var H=e.coordsChar(t.activeTouch,"page"),G;!C.prev||f(C,C.prev)?G=new Xe(H,H):!C.prev.prev||f(C,C.prev.prev)?G=e.findWordAt(H):G=new Xe(ae(H.line,0),ve(e.doc,ae(H.line+1,0))),e.setSelection(G.anchor,G.head),e.focus(),pt(v)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(hi(e,t.scroller.scrollTop),nn(e,t.scroller.scrollLeft,!0),_e(e,"scroll",e))}),be(t.scroller,"mousewheel",function(v){return Au(e,v)}),be(t.scroller,"DOMMouseScroll",function(v){return Au(e,v)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(v){nt(e,v)||Gt(v)},over:function(v){nt(e,v)||(Zp(e,v),Gt(v))},start:function(v){return $p(e,v)},drop:xt(e,Qp),leave:function(v){nt(e,v)||rf(e)}};var d=t.input.getField();be(d,"keyup",function(v){return pf.call(e,v)}),be(d,"keydown",xt(e,df)),be(d,"keypress",xt(e,gf)),be(d,"focus",function(v){return zl(e,v)}),be(d,"blur",function(v){return Tn(e,v)})}var ea=[];rt.defineInitHook=function(e){return ea.push(e)};function _i(e,t,n,r){var i=e.doc,s;n==null&&(n="add"),n=="smart"&&(i.mode.indent?s=ii(e,t).state:n="prev");var f=e.options.tabSize,d=xe(i,t),v=je(d.text,null,f);d.stateAfter&&(d.stateAfter=null);var C=d.text.match(/^\s*/)[0],H;if(!r&&!/\S/.test(d.text))H=0,n="not";else if(n=="smart"&&(H=i.mode.indent(s,d.text.slice(C.length),d.text),H==ze||H>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?H=je(xe(i,t-1).text,null,f):H=0:n=="add"?H=v+e.options.indentUnit:n=="subtract"?H=v-e.options.indentUnit:typeof n=="number"&&(H=v+n),H=Math.max(0,H);var G="",Z=0;if(e.options.indentWithTabs)for(var $=Math.floor(H/f);$;--$)Z+=f,G+=" ";if(Z<H&&(G+=lr(H-Z)),G!=C)return Nn(i,G,ae(t,0),ae(t,C.length),"+input"),d.stateAfter=null,!0;for(var ne=0;ne<i.sel.ranges.length;ne++){var oe=i.sel.ranges[ne];if(oe.head.line==t&&oe.head.ch<C.length){var fe=ae(t,C.length);Xl(i,ne,new Xe(fe,fe));break}}}var cr=null;function _o(e){cr=e}function ta(e,t,n,r,i){var s=e.doc;e.display.shift=!1,r||(r=s.sel);var f=+new Date-200,d=i=="paste"||e.state.pasteIncoming>f,v=Jn(t),C=null;if(d&&r.ranges.length>1)if(cr&&cr.text.join(`
|
|
`)==t){if(r.ranges.length%cr.text.length==0){C=[];for(var H=0;H<cr.text.length;H++)C.push(s.splitLines(cr.text[H]))}}else v.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(C=He(v,function(ce){return[ce]}));for(var G=e.curOp.updateInput,Z=r.ranges.length-1;Z>=0;Z--){var $=r.ranges[Z],ne=$.from(),oe=$.to();$.empty()&&(n&&n>0?ne=ae(ne.line,ne.ch-n):e.state.overwrite&&!d?oe=ae(oe.line,Math.min(xe(s,oe.line).text.length,oe.ch+Pe(v).length)):d&&cr&&cr.lineWise&&cr.text.join(`
|
|
`)==v.join(`
|
|
`)&&(ne=oe=ae(ne.line,0)));var fe={from:ne,to:oe,text:C?C[Z%C.length]:v,origin:i||(d?"paste":e.state.cutIncoming>f?"cut":"+input")};En(e.doc,fe),wt(e,"inputRead",e,fe)}t&&!d&&Sf(e,t),Mn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=G),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function kf(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&qt(t,function(){return ta(t,n,0,null,"paste")}),!0}function Sf(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var s=e.getModeAt(i.head),f=!1;if(s.electricChars){for(var d=0;d<s.electricChars.length;d++)if(t.indexOf(s.electricChars.charAt(d))>-1){f=_i(e,i.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(f=_i(e,i.head.line,"smart"));f&&wt(e,"electricInput",e,i.head.line)}}}function Cf(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,s={anchor:ae(i,0),head:ae(i+1,0)};n.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:n}}function Lf(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Tf(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),Lf(e),t}function kg(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,i){var s=this.options,f=s[r];s[r]==i&&r!="mode"||(s[r]=i,t.hasOwnProperty(r)&&xt(this,t[r])(this,i,f),_e(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](Mo(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,s=0;s<i.length;++s)if(i[s]==r||i[s].name==r)return i.splice(s,1),!0},addOverlay:zt(function(r,i){var s=r.token?r:e.getMode(this.options,r);if(s.startState)throw new Error("Overlays may not be stateful.");dt(this.state.overlays,{mode:s,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(f){return f.priority}),this.state.modeGen++,Ft(this)}),removeOverlay:zt(function(r){for(var i=this.state.overlays,s=0;s<i.length;++s){var f=i[s].modeSpec;if(f==r||typeof r=="string"&&f.name==r){i.splice(s,1),this.state.modeGen++,Ft(this);return}}}),indentLine:zt(function(r,i,s){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Jr(this.doc,r)&&_i(this,r,i,s)}),indentSelection:zt(function(r){for(var i=this.doc.sel.ranges,s=-1,f=0;f<i.length;f++){var d=i[f];if(d.empty())d.head.line>s&&(_i(this,d.head.line,r,!0),s=d.head.line,f==this.doc.sel.primIndex&&Mn(this));else{var v=d.from(),C=d.to(),H=Math.max(s,v.line);s=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var G=H;G<s;++G)_i(this,G,r);var Z=this.doc.sel.ranges;v.ch==0&&i.length==Z.length&&Z[f].from().ch>0&&Xl(this.doc,f,new Xe(v,Z[f].to()),Be)}}}),getTokenAt:function(r,i){return Ps(this,r,i)},getLineTokens:function(r,i){return Ps(this,ae(r),i,!0)},getTokenTypeAt:function(r){r=ve(this.doc,r);var i=_s(this,xe(this.doc,r.line)),s=0,f=(i.length-1)/2,d=r.ch,v;if(d==0)v=i[2];else for(;;){var C=s+f>>1;if((C?i[C*2-1]:0)>=d)f=C;else if(i[C*2+1]<d)s=C+1;else{v=i[C*2+2];break}}var H=v?v.indexOf("overlay "):-1;return H<0?v:H==0?null:v.slice(0,H-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var s=[];if(!n.hasOwnProperty(i))return s;var f=n[i],d=this.getModeAt(r);if(typeof d[i]=="string")f[d[i]]&&s.push(f[d[i]]);else if(d[i])for(var v=0;v<d[i].length;v++){var C=f[d[i][v]];C&&s.push(C)}else d.helperType&&f[d.helperType]?s.push(f[d.helperType]):f[d.name]&&s.push(f[d.name]);for(var H=0;H<f._global.length;H++){var G=f._global[H];G.pred(d,this)&&Se(s,G.val)==-1&&s.push(G.val)}return s},getStateAfter:function(r,i){var s=this.doc;return r=We(s,r==null?s.first+s.size-1:r),ii(this,r+1,i).state},cursorCoords:function(r,i){var s,f=this.doc.sel.primary();return r==null?s=f.head:typeof r=="object"?s=ve(this.doc,r):s=r?f.from():f.to(),ur(this,s,i||"page")},charCoords:function(r,i){return co(this,ve(this.doc,r),i||"page")},coordsChar:function(r,i){return r=su(this,r,i||"page"),Ml(this,r.left,r.top)},lineAtHeight:function(r,i){return r=su(this,{top:r,left:0},i||"page").top,br(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,s){var f=!1,d;if(typeof r=="number"){var v=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>v&&(r=v,f=!0),d=xe(this.doc,r)}else d=r;return fo(this,d,{top:0,left:0},i||"page",s||f).top+(f?this.doc.height-_r(d):0)},defaultTextHeight:function(){return Cn(this.display)},defaultCharWidth:function(){return Ln(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,s,f,d){var v=this.display;r=ur(this,ve(this.doc,r));var C=r.bottom,H=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),v.sizer.appendChild(i),f=="over")C=r.top;else if(f=="above"||f=="near"){var G=Math.max(v.wrapper.clientHeight,this.doc.height),Z=Math.max(v.sizer.clientWidth,v.lineSpace.clientWidth);(f=="above"||r.bottom+i.offsetHeight>G)&&r.top>i.offsetHeight?C=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=G&&(C=r.bottom),H+i.offsetWidth>Z&&(H=Z-i.offsetWidth)}i.style.top=C+"px",i.style.left=i.style.right="",d=="right"?(H=v.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(d=="left"?H=0:d=="middle"&&(H=(v.sizer.clientWidth-i.offsetWidth)/2),i.style.left=H+"px"),s&&bp(this,{left:H,top:C,right:H+i.offsetWidth,bottom:C+i.offsetHeight})},triggerOnKeyDown:zt(df),triggerOnKeyPress:zt(gf),triggerOnKeyUp:pf,triggerOnMouseDown:zt(vf),execCommand:function(r){if(Ti.hasOwnProperty(r))return Ti[r].call(null,this)},triggerElectric:zt(function(r){Sf(this,r)}),findPosH:function(r,i,s,f){var d=1;i<0&&(d=-1,i=-i);for(var v=ve(this.doc,r),C=0;C<i&&(v=ra(this.doc,v,d,s,f),!v.hitSide);++C);return v},moveH:zt(function(r,i){var s=this;this.extendSelectionsBy(function(f){return s.display.shift||s.doc.extend||f.empty()?ra(s.doc,f.head,r,i,s.options.rtlMoveVisually):r<0?f.from():f.to()},Oe)}),deleteH:zt(function(r,i){var s=this.doc.sel,f=this.doc;s.somethingSelected()?f.replaceSelection("",null,"+delete"):Dn(this,function(d){var v=ra(f,d.head,r,i,!1);return r<0?{from:v,to:d.head}:{from:d.head,to:v}})}),findPosV:function(r,i,s,f){var d=1,v=f;i<0&&(d=-1,i=-i);for(var C=ve(this.doc,r),H=0;H<i;++H){var G=ur(this,C,"div");if(v==null?v=G.left:G.left=v,C=Mf(this,G,d,s),C.hitSide)break}return C},moveV:zt(function(r,i){var s=this,f=this.doc,d=[],v=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(H){if(v)return r<0?H.from():H.to();var G=ur(s,H.head,"div");H.goalColumn!=null&&(G.left=H.goalColumn),d.push(G.left);var Z=Mf(s,G,r,i);return i=="page"&&H==f.sel.primary()&&Il(s,co(s,Z,"div").top-G.top),Z},Oe),d.length)for(var C=0;C<f.sel.ranges.length;C++)f.sel.ranges[C].goalColumn=d[C]}),findWordAt:function(r){var i=this.doc,s=xe(i,r.line).text,f=r.ch,d=r.ch;if(s){var v=this.getHelper(r,"wordChars");(r.sticky=="before"||d==s.length)&&f?--f:++d;for(var C=s.charAt(f),H=K(C,v)?function(G){return K(G,v)}:/\s/.test(C)?function(G){return/\s/.test(G)}:function(G){return!/\s/.test(G)&&!K(G)};f>0&&H(s.charAt(f-1));)--f;for(;d<s.length&&H(s.charAt(d));)++d}return new Xe(ae(r.line,f),ae(r.line,d))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Me(this.display.cursorDiv,"CodeMirror-overwrite"):U(this.display.cursorDiv,"CodeMirror-overwrite"),_e(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==de()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:zt(function(r,i){ci(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-kr(this)-this.display.barHeight,width:r.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Sl(this),clientWidth:Vr(this)}},scrollIntoView:zt(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:ae(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?wp(this,r):yu(this,r.from,r.to,r.margin)}),setSize:zt(function(r,i){var s=this,f=function(v){return typeof v=="number"||/^\d+$/.test(String(v))?v+"px":v};r!=null&&(this.display.wrapper.style.width=f(r)),i!=null&&(this.display.wrapper.style.height=f(i)),this.options.lineWrapping&&ou(this);var d=this.display.viewFrom;this.doc.iter(d,this.display.viewTo,function(v){if(v.widgets){for(var C=0;C<v.widgets.length;C++)if(v.widgets[C].noHScroll){Br(s,d,"widget");break}}++d}),this.curOp.forceUpdate=!0,_e(this,"refresh",this)}),operation:function(r){return qt(this,r)},startOperation:function(){return ln(this)},endOperation:function(){return an(this)},refresh:zt(function(){var r=this.display.cachedTextHeight;Ft(this),this.curOp.forceUpdate=!0,ui(this),ci(this,this.doc.scrollLeft,this.doc.scrollTop),Bl(this.display),(r==null||Math.abs(r-Cn(this.display))>.5||this.options.lineWrapping)&&El(this),_e(this,"refresh",this)}),swapDoc:zt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Nu(this,r),ui(this),this.display.input.reset(),ci(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},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}},Ge(e),e.registerHelper=function(r,i,s){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=s},e.registerGlobalHelper=function(r,i,s,f){e.registerHelper(r,i,f),n[r]._global.push({pred:s,val:f})}}function ra(e,t,n,r,i){var s=t,f=n,d=xe(e,t.line),v=i&&e.direction=="rtl"?-n:n;function C(){var me=t.line+v;return me<e.first||me>=e.first+e.size?!1:(t=new ae(me,t.ch,t.sticky),d=xe(e,me))}function H(me){var he;if(r=="codepoint"){var ye=d.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ye))he=null;else{var Te=n>0?ye>=55296&&ye<56320:ye>=56320&&ye<57343;he=new ae(t.line,Math.max(0,Math.min(d.text.length,t.ch+n*(Te?2:1))),-n)}}else i?he=ng(e.cm,d,t,n):he=Ql(d,t,n);if(he==null)if(!me&&C())t=$l(i,e.cm,d,t.line,v);else return!1;else t=he;return!0}if(r=="char"||r=="codepoint")H();else if(r=="column")H(!0);else if(r=="word"||r=="group")for(var G=null,Z=r=="group",$=e.cm&&e.cm.getHelper(t,"wordChars"),ne=!0;!(n<0&&!H(!ne));ne=!1){var oe=d.text.charAt(t.ch)||`
|
|
`,fe=K(oe,$)?"w":Z&&oe==`
|
|
`?"n":!Z||/\s/.test(oe)?null:"p";if(Z&&!ne&&!fe&&(fe="s"),G&&G!=fe){n<0&&(n=1,H(),t.sticky="after");break}if(fe&&(G=fe),n>0&&!H(!ne))break}var ce=Co(e,t,s,f,!0);return q(s,ce)&&(ce.hitSide=!0),ce}function Mf(e,t,n,r){var i=e.doc,s=t.left,f;if(r=="page"){var d=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),v=Math.max(d-.5*Cn(e.display),3);f=(n>0?t.bottom:t.top)+n*v}else r=="line"&&(f=n>0?t.bottom+3:t.top-3);for(var C;C=Ml(e,s,f),!!C.outside;){if(n<0?f<=0:f>=i.height){C.hitSide=!0;break}f+=n*5}return C}var Ze=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Je,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ze.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Lf(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function s(d){for(var v=d.target;v;v=v.parentNode){if(v==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(v.className))break}return!1}be(i,"paste",function(d){!s(d)||nt(r,d)||kf(d,r)||x<=11&&setTimeout(xt(r,function(){return t.updateFromDOM()}),20)}),be(i,"compositionstart",function(d){t.composing={data:d.data,done:!1}}),be(i,"compositionupdate",function(d){t.composing||(t.composing={data:d.data,done:!1})}),be(i,"compositionend",function(d){t.composing&&(d.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),be(i,"touchstart",function(){return n.forceCompositionEnd()}),be(i,"input",function(){t.composing||t.readFromDOMSoon()});function f(d){if(!(!s(d)||nt(r,d))){if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()}),d.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var v=Cf(r);_o({lineWise:!0,text:v.text}),d.type=="cut"&&r.operation(function(){r.setSelections(v.ranges,0,Be),r.replaceSelection("",null,"cut")})}else return;if(d.clipboardData){d.clipboardData.clearData();var C=cr.text.join(`
|
|
`);if(d.clipboardData.setData("Text",C),d.clipboardData.getData("Text")==C){d.preventDefault();return}}var H=Tf(),G=H.firstChild;r.display.lineSpace.insertBefore(H,r.display.lineSpace.firstChild),G.value=cr.text.join(`
|
|
`);var Z=de();pe(G),setTimeout(function(){r.display.lineSpace.removeChild(H),Z.focus(),Z==i&&n.showPrimarySelection()},50)}}be(i,"copy",f),be(i,"cut",f)},Ze.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ze.prototype.prepareSelection=function(){var e=pu(this.cm,!1);return e.focus=de()==this.div,e},Ze.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ze.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ze.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var s=Eo(t,e.anchorNode,e.anchorOffset),f=Eo(t,e.focusNode,e.focusOffset);if(!(s&&!s.bad&&f&&!f.bad&&M(Ee(s,f),r)==0&&M(se(s,f),i)==0)){var d=t.display.view,v=r.line>=t.display.viewFrom&&Af(t,r)||{node:d[0].measure.map[2],offset:0},C=i.line<t.display.viewTo&&Af(t,i);if(!C){var H=d[d.length-1].measure,G=H.maps?H.maps[H.maps.length-1]:H.map;C={node:G[G.length-1],offset:G[G.length-2]-G[G.length-3]}}if(!v||!C){e.removeAllRanges();return}var Z=e.rangeCount&&e.getRangeAt(0),$;try{$=te(v.node,v.offset,C.offset,C.node)}catch(ne){}$&&(!h&&t.state.focused?(e.collapse(v.node,v.offset),$.collapsed||(e.removeAllRanges(),e.addRange($))):(e.removeAllRanges(),e.addRange($)),Z&&e.anchorNode==null?e.addRange(Z):h&&this.startGracePeriod()),this.rememberSelection()}},Ze.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)},Ze.prototype.showMultipleSelections=function(e){X(this.cm.display.cursorDiv,e.cursors),X(this.cm.display.selectionDiv,e.selection)},Ze.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ze.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ue(this.div,t)},Ze.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||de()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ze.prototype.blur=function(){this.div.blur()},Ze.prototype.getField=function(){return this.div},Ze.prototype.supportsTouch=function(){return!0},Ze.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():qt(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Ze.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ze.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(T&&m&&this.cm.display.gutterSpecs.length&&Sg(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Eo(t,e.anchorNode,e.anchorOffset),r=Eo(t,e.focusNode,e.focusOffset);n&&r&&qt(t,function(){_t(t.doc,Wr(n,r),Be),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ze.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ae(r.line-1,xe(e.doc,r.line-1).length)),i.ch==xe(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=ae(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var s,f,d;r.line==t.viewFrom||(s=rn(e,r.line))==0?(f=qe(t.view[0].line),d=t.view[0].node):(f=qe(t.view[s].line),d=t.view[s-1].node.nextSibling);var v=rn(e,i.line),C,H;if(v==t.view.length-1?(C=t.viewTo-1,H=t.lineDiv.lastChild):(C=qe(t.view[v+1].line)-1,H=t.view[v+1].node.previousSibling),!d)return!1;for(var G=e.doc.splitLines(Cg(e,d,H,f,C)),Z=yr(e.doc,ae(f,0),ae(C,xe(e.doc,C).text.length));G.length>1&&Z.length>1;)if(Pe(G)==Pe(Z))G.pop(),Z.pop(),C--;else if(G[0]==Z[0])G.shift(),Z.shift(),f++;else break;for(var $=0,ne=0,oe=G[0],fe=Z[0],ce=Math.min(oe.length,fe.length);$<ce&&oe.charCodeAt($)==fe.charCodeAt($);)++$;for(var me=Pe(G),he=Pe(Z),ye=Math.min(me.length-(G.length==1?$:0),he.length-(Z.length==1?$:0));ne<ye&&me.charCodeAt(me.length-ne-1)==he.charCodeAt(he.length-ne-1);)++ne;if(G.length==1&&Z.length==1&&f==r.line)for(;$&&$>r.ch&&me.charCodeAt(me.length-ne-1)==he.charCodeAt(he.length-ne-1);)$--,ne++;G[G.length-1]=me.slice(0,me.length-ne).replace(/^\u200b+/,""),G[0]=G[0].slice($).replace(/\u200b+$/,"");var Te=ae(f,$),Ce=ae(C,Z.length?Pe(Z).length-ne:0);if(G.length>1||G[0]||M(Te,Ce))return Nn(e.doc,G,Te,Ce,"+input"),!0},Ze.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ze.prototype.reset=function(){this.forceCompositionEnd()},Ze.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ze.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))},Ze.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&qt(this.cm,function(){return Ft(e.cm)})},Ze.prototype.setUneditable=function(e){e.contentEditable="false"},Ze.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||xt(this.cm,ta)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ze.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ze.prototype.onContextMenu=function(){},Ze.prototype.resetPosition=function(){},Ze.prototype.needsContentAttribute=!0;function Af(e,t){var n=Cl(e,t.line);if(!n||n.hidden)return null;var r=xe(e.doc,t.line),i=eu(n,r,t.line),s=$e(r,e.doc.direction),f="left";if(s){var d=Ie(s,t.ch);f=d%2?"right":"left"}var v=nu(i.map,t.ch,f);return v.offset=v.collapse=="right"?v.end:v.start,v}function Sg(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Rn(e,t){return t&&(e.bad=!0),e}function Cg(e,t,n,r,i){var s="",f=!1,d=e.doc.lineSeparator(),v=!1;function C($){return function(ne){return ne.id==$}}function H(){f&&(s+=d,v&&(s+=d),f=v=!1)}function G($){$&&(H(),s+=$)}function Z($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){G(ne);return}var oe=$.getAttribute("cm-marker"),fe;if(oe){var ce=e.findMarks(ae(r,0),ae(i+1,0),C(+oe));ce.length&&(fe=ce[0].find(0))&&G(yr(e.doc,fe.from,fe.to).join(d));return}if($.getAttribute("contenteditable")=="false")return;var me=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;me&&H();for(var he=0;he<$.childNodes.length;he++)Z($.childNodes[he]);/^(pre|p)$/i.test($.nodeName)&&(v=!0),me&&(f=!0)}else $.nodeType==3&&G($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Z(t),t!=n;)t=t.nextSibling,v=!1;return s}function Eo(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Rn(e.clipPos(ae(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var s=e.display.view[i];if(s.node==r)return Lg(s,t,n)}}function Lg(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!ue(r,t))return Rn(ae(qe(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var s=e.rest?Pe(e.rest):e.line;return Rn(ae(qe(s),s.text.length),i)}var f=t.nodeType==3?t:null,d=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,n&&(n=f.nodeValue.length));d.parentNode!=r;)d=d.parentNode;var v=e.measure,C=v.maps;function H(fe,ce,me){for(var he=-1;he<(C?C.length:0);he++)for(var ye=he<0?v.map:C[he],Te=0;Te<ye.length;Te+=3){var Ce=ye[Te+2];if(Ce==fe||Ce==ce){var Re=qe(he<0?e.line:e.rest[he]),et=ye[Te]+me;return(me<0||Ce!=fe)&&(et=ye[Te+(me?1:0)]),ae(Re,et)}}}var G=H(f,d,n);if(G)return Rn(G,i);for(var Z=d.nextSibling,$=f?f.nodeValue.length-n:0;Z;Z=Z.nextSibling){if(G=H(Z,Z.firstChild,0),G)return Rn(ae(G.line,G.ch-$),i);$+=Z.textContent.length}for(var ne=d.previousSibling,oe=n;ne;ne=ne.previousSibling){if(G=H(ne,ne.firstChild,-1),G)return Rn(ae(G.line,G.ch+oe),i);oe+=ne.textContent.length}}var ft=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Je,this.hasSelection=!1,this.composing=null};ft.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),N&&(i.style.width="0px"),be(i,"input",function(){g&&x>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(i,"paste",function(f){nt(r,f)||kf(f,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function s(f){if(!nt(r,f)){if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var d=Cf(r);_o({lineWise:!0,text:d.text}),f.type=="cut"?r.setSelections(d.ranges,null,Be):(n.prevInput="",i.value=d.text.join(`
|
|
`),pe(i))}else return;f.type=="cut"&&(r.state.cutIncoming=+new Date)}}be(i,"cut",s),be(i,"copy",s),be(e.scroller,"paste",function(f){if(!(Er(e,f)||nt(r,f))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var d=new Event("paste");d.clipboardData=f.clipboardData,i.dispatchEvent(d)}}),be(e.lineSpace,"selectstart",function(f){Er(e,f)||pt(f)}),be(i,"compositionstart",function(){var f=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:f,range:r.markText(f,r.getCursor("to"),{className:"CodeMirror-composing"})}}),be(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ft.prototype.createField=function(e){this.wrapper=Tf(),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,n=e.doc,r=pu(e);if(e.options.moveInputWithCursor){var i=ur(e,n.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+f.top-s.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+f.left-s.left))}return r},ft.prototype.showSelection=function(e){var t=this.cm,n=t.display;X(n.cursorDiv,e.cursors),X(n.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 n=t.getSelection();this.textarea.value=n,t.state.focused&&pe(this.textarea),g&&x>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",g&&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"&&(!E||de()!=this.textarea))try{this.textarea.focus()}catch(e){}},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 n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},ft.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||eo(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(g&&x>=9&&this.hasSelection===i||c&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=i.charCodeAt(0);if(s==8203&&!r&&(r="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var f=0,d=Math.min(r.length,i.length);f<d&&r.charCodeAt(f)==i.charCodeAt(f);)++f;return qt(t,function(){ta(t,i.slice(f),r.length-f,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?n.value=e.prevInput="":e.prevInput=i,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(){g&&x>=9&&(this.hasSelection=null),this.fastPoll()},ft.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=tn(n,e),f=r.scroller.scrollTop;if(!s||_)return;var d=n.options.resetSelectionOnContextMenu;d&&n.doc.sel.contains(s)==-1&&xt(n,_t)(n.doc,Wr(s),Be);var v=i.style.cssText,C=t.wrapper.style.cssText,H=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-H.top-5)+"px; left: "+(e.clientX-H.left-5)+`px;
|
|
z-index: 1000; background: `+(g?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var G;y&&(G=window.scrollY),r.input.focus(),y&&window.scrollTo(null,G),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=$,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function Z(){if(i.selectionStart!=null){var oe=n.somethingSelected(),fe="\u200B"+(oe?i.value:"");i.value="\u21DA",i.value=fe,t.prevInput=oe?"":"\u200B",i.selectionStart=1,i.selectionEnd=fe.length,r.selForContextMenu=n.doc.sel}}function $(){if(t.contextMenuPending==$&&(t.contextMenuPending=!1,t.wrapper.style.cssText=C,i.style.cssText=v,g&&x<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=f),i.selectionStart!=null)){(!g||g&&x<9)&&Z();var oe=0,fe=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?xt(n,ju)(n):oe++<10?r.detectingSelectAll=setTimeout(fe,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(fe,200)}}if(g&&x>=9&&Z(),j){Gt(e);var ne=function(){bt(window,"mouseup",ne),setTimeout($,20)};be(window,"mouseup",ne)}else setTimeout($,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 Tg(e,t){if(t=t?Ke(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 n=de();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=d.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var s=e.form;i=s.submit;try{var f=s.submit=function(){r(),s.submit=i,s.submit(),s.submit=f}}catch(v){}}t.finishInit=function(v){v.save=r,v.getTextArea=function(){return e},v.toTextArea=function(){v.toTextArea=isNaN,r(),e.parentNode.removeChild(v.getWrapperElement()),e.style.display="",e.form&&(bt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var d=rt(function(v){return e.parentNode.insertBefore(v,e.nextSibling)},t);return d}function Mg(e){e.off=bt,e.on=be,e.wheelEventPixels=zp,e.Doc=Bt,e.splitLines=Jn,e.countColumn=je,e.findColumn=st,e.isWordChar=re,e.Pass=ze,e.signal=_e,e.Line=xn,e.changeEnd=Ur,e.scrollbarModel=xu,e.Pos=ae,e.cmpPos=M,e.modes=nr,e.mimeModes=Qt,e.resolveMode=yn,e.getMode=bn,e.modeExtensions=ar,e.extendMode=sr,e.copyState=$t,e.startState=ti,e.innerMode=ei,e.commands=Ti,e.keyMap=Nr,e.keyName=sf,e.isModifierKey=lf,e.lookupKey=zn,e.normalizeKeyMap=rg,e.StringStream=ot,e.SharedTextMarker=Si,e.TextMarker=Gr,e.LineWidget=ki,e.e_preventDefault=pt,e.e_stopPropagation=vr,e.e_stop=Gt,e.addClass=Me,e.contains=ue,e.rmClass=U,e.keyNames=jr}yg(rt),kg(rt);var Ag="iter insert remove copy getEditor constructor".split(" ");for(var No in Bt.prototype)Bt.prototype.hasOwnProperty(No)&&Se(Ag,No)<0&&(rt.prototype[No]=function(e){return function(){return e.apply(this.doc,arguments)}}(Bt.prototype[No]));return Ge(Bt),rt.inputStyles={textarea:ft,contenteditable:Ze},rt.defineMode=function(e){!rt.defaults.mode&&e!="null"&&(rt.defaults.mode=e),ro.apply(this,arguments)},rt.defineMIME=Ar,rt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),rt.defineMIME("text/plain","null"),rt.defineExtension=function(e,t){rt.prototype[e]=t},rt.defineDocExtension=function(e,t){Bt.prototype[e]=t},rt.fromTextArea=Tg,Mg(rt),rt.version="5.62.3",rt})})(ct);var dn=ct.exports,Ic={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){l.defineMode("javascript",function(u,h){var p=u.indentUnit,S=h.statementIndent,b=h.jsonld,g=h.json||b,x=h.trackScope!==!1,y=h.typescript,A=h.wordCharacters||/[\w$\xa1-\uffff]/,m=function(){function M(Ot){return{type:Ot,style:"keyword"}}var q=M("keyword a"),ie=M("keyword b"),se=M("keyword c"),Ee=M("keyword d"),We=M("operator"),ve={type:"atom",style:"atom"};return{if:M("if"),while:q,with:q,else:ie,do:ie,try:ie,finally:ie,return:Ee,break:Ee,continue:Ee,new:M("new"),delete:se,void:se,throw:se,debugger:M("debugger"),var:M("var"),const:M("var"),let:M("var"),function:M("function"),catch:M("catch"),for:M("for"),switch:M("switch"),case:M("case"),default:M("default"),in:We,typeof:We,instanceof:We,true:ve,false:ve,null:ve,undefined:ve,NaN:ve,Infinity:ve,this:M("this"),class:M("class"),super:M("atom"),yield:se,export:M("export"),import:M("import"),extends:se,await:se}}(),_=/[+\-*&%=<>!?|~^@]/,R=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function I(M){for(var q=!1,ie,se=!1;(ie=M.next())!=null;){if(!q){if(ie=="/"&&!se)return;ie=="["?se=!0:se&&ie=="]"&&(se=!1)}q=!q&&ie=="\\"}}var W,N;function T(M,q,ie){return W=M,N=ie,q}function E(M,q){var ie=M.next();if(ie=='"'||ie=="'")return q.tokenize=c(ie),q.tokenize(M,q);if(ie=="."&&M.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return T("number","number");if(ie=="."&&M.match(".."))return T("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ie))return T(ie);if(ie=="="&&M.eat(">"))return T("=>","operator");if(ie=="0"&&M.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return T("number","number");if(/\d/.test(ie))return M.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),T("number","number");if(ie=="/")return M.eat("*")?(q.tokenize=w,w(M,q)):M.eat("/")?(M.skipToEnd(),T("comment","comment")):ae(M,q,1)?(I(M),M.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),T("regexp","string-2")):(M.eat("="),T("operator","operator",M.current()));if(ie=="`")return q.tokenize=k,k(M,q);if(ie=="#"&&M.peek()=="!")return M.skipToEnd(),T("meta","meta");if(ie=="#"&&M.eatWhile(A))return T("variable","property");if(ie=="<"&&M.match("!--")||ie=="-"&&M.match("->")&&!/\S/.test(M.string.slice(0,M.start)))return M.skipToEnd(),T("comment","comment");if(_.test(ie))return(ie!=">"||!q.lexical||q.lexical.type!=">")&&(M.eat("=")?(ie=="!"||ie=="=")&&M.eat("="):/[<>*+\-|&?]/.test(ie)&&(M.eat(ie),ie==">"&&M.eat(ie))),ie=="?"&&M.eat(".")?T("."):T("operator","operator",M.current());if(A.test(ie)){M.eatWhile(A);var se=M.current();if(q.lastType!="."){if(m.propertyIsEnumerable(se)){var Ee=m[se];return T(Ee.type,Ee.style,se)}if(se=="async"&&M.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return T("async","keyword",se)}return T("variable","variable",se)}}function c(M){return function(q,ie){var se=!1,Ee;if(b&&q.peek()=="@"&&q.match(R))return ie.tokenize=E,T("jsonld-keyword","meta");for(;(Ee=q.next())!=null&&!(Ee==M&&!se);)se=!se&&Ee=="\\";return se||(ie.tokenize=E),T("string","string")}}function w(M,q){for(var ie=!1,se;se=M.next();){if(se=="/"&&ie){q.tokenize=E;break}ie=se=="*"}return T("comment","comment")}function k(M,q){for(var ie=!1,se;(se=M.next())!=null;){if(!ie&&(se=="`"||se=="$"&&M.eat("{"))){q.tokenize=E;break}ie=!ie&&se=="\\"}return T("quasi","string-2",M.current())}var O="([{}])";function L(M,q){q.fatArrowAt&&(q.fatArrowAt=null);var ie=M.string.indexOf("=>",M.start);if(!(ie<0)){if(y){var se=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(M.string.slice(M.start,ie));se&&(ie=se.index)}for(var Ee=0,We=!1,ve=ie-1;ve>=0;--ve){var Ot=M.string.charAt(ve),Zt=O.indexOf(Ot);if(Zt>=0&&Zt<3){if(!Ee){++ve;break}if(--Ee==0){Ot=="("&&(We=!0);break}}else if(Zt>=3&&Zt<6)++Ee;else if(A.test(Ot))We=!0;else if(/["'\/`]/.test(Ot))for(;;--ve){if(ve==0)return;var wn=M.string.charAt(ve-1);if(wn==Ot&&M.string.charAt(ve-2)!="\\"){ve--;break}}else if(We&&!Ee){++ve;break}}We&&!Ee&&(q.fatArrowAt=ve)}}var j={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function B(M,q,ie,se,Ee,We){this.indented=M,this.column=q,this.type=ie,this.prev=Ee,this.info=We,se!=null&&(this.align=se)}function U(M,q){if(!x)return!1;for(var ie=M.localVars;ie;ie=ie.next)if(ie.name==q)return!0;for(var se=M.context;se;se=se.prev)for(var ie=se.vars;ie;ie=ie.next)if(ie.name==q)return!0}function Q(M,q,ie,se,Ee){var We=M.cc;for(X.state=M,X.stream=Ee,X.marked=null,X.cc=We,X.style=q,M.lexical.hasOwnProperty("align")||(M.lexical.align=!0);;){var ve=We.length?We.pop():g?Oe:Be;if(ve(ie,se)){for(;We.length&&We[We.length-1].lex;)We.pop()();return X.marked?X.marked:ie=="variable"&&U(M,se)?"variable-2":q}}}var X={state:null,column:null,marked:null,cc:null};function D(){for(var M=arguments.length-1;M>=0;M--)X.cc.push(arguments[M])}function z(){return D.apply(null,arguments),!0}function te(M,q){for(var ie=q;ie;ie=ie.next)if(ie.name==M)return!0;return!1}function ue(M){var q=X.state;if(X.marked="def",!!x){if(q.context){if(q.lexical.info=="var"&&q.context&&q.context.block){var ie=de(M,q.context);if(ie!=null){q.context=ie;return}}else if(!te(M,q.localVars)){q.localVars=new pe(M,q.localVars);return}}h.globalVars&&!te(M,q.globalVars)&&(q.globalVars=new pe(M,q.globalVars))}}function de(M,q){if(q)if(q.block){var ie=de(M,q.prev);return ie?ie==q.prev?q:new V(ie,q.vars,!0):null}else return te(M,q.vars)?q:new V(q.prev,new pe(M,q.vars),!1);else return null}function Me(M){return M=="public"||M=="private"||M=="protected"||M=="abstract"||M=="readonly"}function V(M,q,ie){this.prev=M,this.vars=q,this.block=ie}function pe(M,q){this.name=M,this.next=q}var Ne=new pe("this",new pe("arguments",null));function Ke(){X.state.context=new V(X.state.context,X.state.localVars,!1),X.state.localVars=Ne}function je(){X.state.context=new V(X.state.context,X.state.localVars,!0),X.state.localVars=null}function Je(){X.state.localVars=X.state.context.vars,X.state.context=X.state.context.prev}Je.lex=!0;function Se(M,q){var ie=function(){var se=X.state,Ee=se.indented;if(se.lexical.type=="stat")Ee=se.lexical.indented;else for(var We=se.lexical;We&&We.type==")"&&We.align;We=We.prev)Ee=We.indented;se.lexical=new B(Ee,X.stream.column(),M,null,se.lexical,q)};return ie.lex=!0,ie}function Ae(){var M=X.state;M.lexical.prev&&(M.lexical.type==")"&&(M.indented=M.lexical.indented),M.lexical=M.lexical.prev)}Ae.lex=!0;function ze(M){function q(ie){return ie==M?z():M==";"||ie=="}"||ie==")"||ie=="]"?D():z(q)}return q}function Be(M,q){return M=="var"?z(Se("vardef",q),$n,ze(";"),Ae):M=="keyword a"?z(Se("form"),It,Be,Ae):M=="keyword b"?z(Se("form"),Be,Ae):M=="keyword d"?X.stream.match(/^\s*$/,!1)?z():z(Se("stat"),Pe,ze(";"),Ae):M=="debugger"?z(ze(";")):M=="{"?z(Se("}"),je,$e,Ae,Je):M==";"?z():M=="if"?(X.state.lexical.info=="else"&&X.state.cc[X.state.cc.length-1]==Ae&&X.state.cc.pop()(),z(Se("form"),It,Be,Ae,eo)):M=="function"?z(nr):M=="for"?z(Se("form"),je,to,Be,Je,Ae):M=="class"||y&&q=="interface"?(X.marked="keyword",z(Se("form",M=="class"?M:q),bn,Ae)):M=="variable"?y&&q=="declare"?(X.marked="keyword",z(Be)):y&&(q=="module"||q=="enum"||q=="type")&&X.stream.match(/^\s*\w/,!1)?(X.marked="keyword",q=="enum"?z(br):q=="type"?z(ro,ze("operator"),_e,ze(";")):z(Se("form"),Rt,ze("{"),Se("}"),$e,Ae,Ae)):y&&q=="namespace"?(X.marked="keyword",z(Se("form"),Oe,Be,Ae)):y&&q=="abstract"?(X.marked="keyword",z(Be)):z(Se("stat"),ge):M=="switch"?z(Se("form"),It,ze("{"),Se("}","switch"),je,$e,Ae,Ae,Je):M=="case"?z(Oe,ze(":")):M=="default"?z(ze(":")):M=="catch"?z(Se("form"),Ke,De,Be,Ae,Je):M=="export"?z(Se("stat"),ei,Ae):M=="import"?z(Se("stat"),ot,Ae):M=="async"?z(Be):q=="@"?z(Oe,Be):D(Se("stat"),Oe,ze(";"),Ae)}function De(M){if(M=="(")return z(Ar,ze(")"))}function Oe(M,q){return lr(M,q,!1)}function st(M,q){return lr(M,q,!0)}function It(M){return M!="("?D():z(Se(")"),Pe,ze(")"),Ae)}function lr(M,q,ie){if(X.state.fatArrowAt==X.stream.start){var se=ie?re:Y;if(M=="(")return z(Ke,Se(")"),Ie(Ar,")"),Ae,ze("=>"),se,Je);if(M=="variable")return D(Ke,Rt,ze("=>"),se,Je)}var Ee=ie?dt:He;return j.hasOwnProperty(M)?z(Ee):M=="function"?z(nr,Ee):M=="class"||y&&q=="interface"?(X.marked="keyword",z(Se("form"),yn,Ae)):M=="keyword c"||M=="async"?z(ie?st:Oe):M=="("?z(Se(")"),Pe,ze(")"),Ae,Ee):M=="operator"||M=="spread"?z(ie?st:Oe):M=="["?z(Se("]"),qe,Ae,Ee):M=="{"?tr(Fe,"}",null,Ee):M=="quasi"?D(F,Ee):M=="new"?z(K(ie)):z()}function Pe(M){return M.match(/[;\}\)\],]/)?D():D(Oe)}function He(M,q){return M==","?z(Pe):dt(M,q,!1)}function dt(M,q,ie){var se=ie==!1?He:dt,Ee=ie==!1?Oe:st;if(M=="=>")return z(Ke,ie?re:Y,Je);if(M=="operator")return/\+\+|--/.test(q)||y&&q=="!"?z(se):y&&q=="<"&&X.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?z(Se(">"),Ie(_e,">"),Ae,se):q=="?"?z(Oe,ze(":"),Ee):z(Ee);if(M=="quasi")return D(F,se);if(M!=";"){if(M=="(")return tr(st,")","call",se);if(M==".")return z(we,se);if(M=="[")return z(Se("]"),Pe,ze("]"),Ae,se);if(y&&q=="as")return X.marked="keyword",z(_e,se);if(M=="regexp")return X.state.lastType=X.marked="operator",X.stream.backUp(X.stream.pos-X.stream.start-1),z(Ee)}}function F(M,q){return M!="quasi"?D():q.slice(q.length-2)!="${"?z(F):z(Pe,P)}function P(M){if(M=="}")return X.marked="string-2",X.state.tokenize=k,z(F)}function Y(M){return L(X.stream,X.state),D(M=="{"?Be:Oe)}function re(M){return L(X.stream,X.state),D(M=="{"?Be:st)}function K(M){return function(q){return q=="."?z(M?J:ee):q=="variable"&&y?z(Gt,M?dt:He):D(M?st:Oe)}}function ee(M,q){if(q=="target")return X.marked="keyword",z(He)}function J(M,q){if(q=="target")return X.marked="keyword",z(dt)}function ge(M){return M==":"?z(Ae,Be):D(He,ze(";"),Ae)}function we(M){if(M=="variable")return X.marked="property",z()}function Fe(M,q){if(M=="async")return X.marked="property",z(Fe);if(M=="variable"||X.style=="keyword"){if(X.marked="property",q=="get"||q=="set")return z(Zr);var ie;return y&&X.state.fatArrowAt==X.stream.start&&(ie=X.stream.match(/^\s*:\s*/,!1))&&(X.state.fatArrowAt=X.stream.pos+ie[0].length),z(Ve)}else{if(M=="number"||M=="string")return X.marked=b?"property":X.style+" property",z(Ve);if(M=="jsonld-keyword")return z(Ve);if(y&&Me(q))return X.marked="keyword",z(Fe);if(M=="[")return z(Oe,Ye,ze("]"),Ve);if(M=="spread")return z(st,Ve);if(q=="*")return X.marked="keyword",z(Fe);if(M==":")return D(Ve)}}function Zr(M){return M!="variable"?D(Ve):(X.marked="property",z(nr))}function Ve(M){if(M==":")return z(st);if(M=="(")return D(nr)}function Ie(M,q,ie){function se(Ee,We){if(ie?ie.indexOf(Ee)>-1:Ee==","){var ve=X.state.lexical;return ve.info=="call"&&(ve.pos=(ve.pos||0)+1),z(function(Ot,Zt){return Ot==q||Zt==q?D():D(M)},se)}return Ee==q||We==q?z():ie&&ie.indexOf(";")>-1?D(M):z(ze(q))}return function(Ee,We){return Ee==q||We==q?z():D(M,se)}}function tr(M,q,ie){for(var se=3;se<arguments.length;se++)X.cc.push(arguments[se]);return z(Se(q,ie),Ie(M,q),Ae)}function $e(M){return M=="}"?z():D(Be,$e)}function Ye(M,q){if(y){if(M==":")return z(_e);if(q=="?")return z(Ye)}}function be(M,q){if(y&&(M==":"||q=="in"))return z(_e)}function Qe(M){if(y&&M==":")return X.stream.match(/^\s*\w+\s+is\b/,!1)?z(Oe,bt,_e):z(_e)}function bt(M,q){if(q=="is")return X.marked="keyword",z()}function _e(M,q){if(q=="keyof"||q=="typeof"||q=="infer"||q=="readonly")return X.marked="keyword",z(q=="typeof"?st:_e);if(M=="variable"||q=="void")return X.marked="type",z(At);if(q=="|"||q=="&")return z(_e);if(M=="string"||M=="number"||M=="atom")return z(At);if(M=="[")return z(Se("]"),Ie(_e,"]",","),Ae,At);if(M=="{")return z(Se("}"),rr,Ae,At);if(M=="(")return z(Ie(vr,")"),nt,At);if(M=="<")return z(Ie(_e,">"),_e);if(M=="quasi")return D(Ge,At)}function nt(M){if(M=="=>")return z(_e)}function rr(M){return M.match(/[\}\)\]]/)?z():M==","||M==";"?z(rr):D(ut,rr)}function ut(M,q){if(M=="variable"||X.style=="keyword")return X.marked="property",z(ut);if(q=="?"||M=="number"||M=="string")return z(ut);if(M==":")return z(_e);if(M=="[")return z(ze("variable"),be,ze("]"),ut);if(M=="(")return D(Qt,ut);if(!M.match(/[;\}\)\],]/))return z()}function Ge(M,q){return M!="quasi"?D():q.slice(q.length-2)!="${"?z(Ge):z(_e,pt)}function pt(M){if(M=="}")return X.marked="string-2",X.state.tokenize=k,z(Ge)}function vr(M,q){return M=="variable"&&X.stream.match(/^\s*[?:]/,!1)||q=="?"?z(vr):M==":"?z(_e):M=="spread"?z(vr):D(_e)}function At(M,q){if(q=="<")return z(Se(">"),Ie(_e,">"),Ae,At);if(q=="|"||M=="."||q=="&")return z(_e);if(M=="[")return z(_e,ze("]"),At);if(q=="extends"||q=="implements")return X.marked="keyword",z(_e);if(q=="?")return z(_e,ze(":"),_e)}function Gt(M,q){if(q=="<")return z(Se(">"),Ie(_e,">"),Ae,At)}function Ir(){return D(_e,Ji)}function Ji(M,q){if(q=="=")return z(_e)}function $n(M,q){return q=="enum"?(X.marked="keyword",z(br)):D(Rt,Ye,mr,Jn)}function Rt(M,q){if(y&&Me(q))return X.marked="keyword",z(Rt);if(M=="variable")return ue(q),z();if(M=="spread")return z(Rt);if(M=="[")return tr(Zn,"]");if(M=="{")return tr(Vi,"}")}function Vi(M,q){return M=="variable"&&!X.stream.match(/^\s*:/,!1)?(ue(q),z(mr)):(M=="variable"&&(X.marked="property"),M=="spread"?z(Rt):M=="}"?D():M=="["?z(Oe,ze("]"),ze(":"),Vi):z(ze(":"),Rt,mr))}function Zn(){return D(Rt,mr)}function mr(M,q){if(q=="=")return z(st)}function Jn(M){if(M==",")return z($n)}function eo(M,q){if(M=="keyword b"&&q=="else")return z(Se("form","else"),Be,Ae)}function to(M,q){if(q=="await")return z(to);if(M=="(")return z(Se(")"),Vn,Ae)}function Vn(M){return M=="var"?z($n,Rr):M=="variable"?z(Rr):D(Rr)}function Rr(M,q){return M==")"?z():M==";"?z(Rr):q=="in"||q=="of"?(X.marked="keyword",z(Oe,Rr)):D(Oe,Rr)}function nr(M,q){if(q=="*")return X.marked="keyword",z(nr);if(M=="variable")return ue(q),z(nr);if(M=="(")return z(Ke,Se(")"),Ie(Ar,")"),Ae,Qe,Be,Je);if(y&&q=="<")return z(Se(">"),Ie(Ir,">"),Ae,nr)}function Qt(M,q){if(q=="*")return X.marked="keyword",z(Qt);if(M=="variable")return ue(q),z(Qt);if(M=="(")return z(Ke,Se(")"),Ie(Ar,")"),Ae,Qe,Je);if(y&&q=="<")return z(Se(">"),Ie(Ir,">"),Ae,Qt)}function ro(M,q){if(M=="keyword"||M=="variable")return X.marked="type",z(ro);if(q=="<")return z(Se(">"),Ie(Ir,">"),Ae)}function Ar(M,q){return q=="@"&&z(Oe,Ar),M=="spread"?z(Ar):y&&Me(q)?(X.marked="keyword",z(Ar)):y&&M=="this"?z(Ye,mr):D(Rt,Ye,mr)}function yn(M,q){return M=="variable"?bn(M,q):ar(M,q)}function bn(M,q){if(M=="variable")return ue(q),z(ar)}function ar(M,q){if(q=="<")return z(Se(">"),Ie(Ir,">"),Ae,ar);if(q=="extends"||q=="implements"||y&&M==",")return q=="implements"&&(X.marked="keyword"),z(y?_e:Oe,ar);if(M=="{")return z(Se("}"),sr,Ae)}function sr(M,q){if(M=="async"||M=="variable"&&(q=="static"||q=="get"||q=="set"||y&&Me(q))&&X.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return X.marked="keyword",z(sr);if(M=="variable"||X.style=="keyword")return X.marked="property",z($t,sr);if(M=="number"||M=="string")return z($t,sr);if(M=="[")return z(Oe,Ye,ze("]"),$t,sr);if(q=="*")return X.marked="keyword",z(sr);if(y&&M=="(")return D(Qt,sr);if(M==";"||M==",")return z(sr);if(M=="}")return z();if(q=="@")return z(Oe,sr)}function $t(M,q){if(q=="!"||q=="?")return z($t);if(M==":")return z(_e,mr);if(q=="=")return z(st);var ie=X.state.lexical.prev,se=ie&&ie.info=="interface";return D(se?Qt:nr)}function ei(M,q){return q=="*"?(X.marked="keyword",z(jt,ze(";"))):q=="default"?(X.marked="keyword",z(Oe,ze(";"))):M=="{"?z(Ie(ti,"}"),jt,ze(";")):D(Be)}function ti(M,q){if(q=="as")return X.marked="keyword",z(ze("variable"));if(M=="variable")return D(st,ti)}function ot(M){return M=="string"?z():M=="("?D(Oe):M=="."?D(He):D(xe,yr,jt)}function xe(M,q){return M=="{"?tr(xe,"}"):(M=="variable"&&ue(q),q=="*"&&(X.marked="keyword"),z(ri))}function yr(M){if(M==",")return z(xe,yr)}function ri(M,q){if(q=="as")return X.marked="keyword",z(xe)}function jt(M,q){if(q=="from")return X.marked="keyword",z(Oe)}function qe(M){return M=="]"?z():D(Ie(st,"]"))}function br(){return D(Se("form"),Rt,ze("{"),Se("}"),Ie(Jr,"}"),Ae,Ae)}function Jr(){return D(Rt,mr)}function ni(M,q){return M.lastType=="operator"||M.lastType==","||_.test(q.charAt(0))||/[,.]/.test(q.charAt(0))}function ae(M,q,ie){return q.tokenize==E&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(q.lastType)||q.lastType=="quasi"&&/\{\s*$/.test(M.string.slice(0,M.pos-(ie||0)))}return{startState:function(M){var q={tokenize:E,lastType:"sof",cc:[],lexical:new B((M||0)-p,0,"block",!1),localVars:h.localVars,context:h.localVars&&new V(null,null,!1),indented:M||0};return h.globalVars&&typeof h.globalVars=="object"&&(q.globalVars=h.globalVars),q},token:function(M,q){if(M.sol()&&(q.lexical.hasOwnProperty("align")||(q.lexical.align=!1),q.indented=M.indentation(),L(M,q)),q.tokenize!=w&&M.eatSpace())return null;var ie=q.tokenize(M,q);return W=="comment"?ie:(q.lastType=W=="operator"&&(N=="++"||N=="--")?"incdec":W,Q(q,ie,W,N,M))},indent:function(M,q){if(M.tokenize==w||M.tokenize==k)return l.Pass;if(M.tokenize!=E)return 0;var ie=q&&q.charAt(0),se=M.lexical,Ee;if(!/^\s*else\b/.test(q))for(var We=M.cc.length-1;We>=0;--We){var ve=M.cc[We];if(ve==Ae)se=se.prev;else if(ve!=eo&&ve!=Je)break}for(;(se.type=="stat"||se.type=="form")&&(ie=="}"||(Ee=M.cc[M.cc.length-1])&&(Ee==He||Ee==dt)&&!/^[,\.=+\-*:?[\(]/.test(q));)se=se.prev;S&&se.type==")"&&se.prev.type=="stat"&&(se=se.prev);var Ot=se.type,Zt=ie==Ot;return Ot=="vardef"?se.indented+(M.lastType=="operator"||M.lastType==","?se.info.length+1:0):Ot=="form"&&ie=="{"?se.indented:Ot=="form"?se.indented+p:Ot=="stat"?se.indented+(ni(M,q)?S||p:0):se.info=="switch"&&!Zt&&h.doubleIndentSwitch!=!1?se.indented+(/^(?:case|default)\b/.test(q)?p:2*p):se.align?se.column+(Zt?0:1):se.indented+(Zt?0:p)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:g?null:"/*",blockCommentEnd:g?null:"*/",blockCommentContinue:g?null:" * ",lineComment:g?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:g?"json":"javascript",jsonldMode:b,jsonMode:g,expressionAllowed:ae,skipExpression:function(M){Q(M,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})(),function(o,a){(function(l){l(ct.exports)})(function(l){l.defineMode("coffeescript",function(u,h){var p="error";function S(B){return new RegExp("^(("+B.join(")|(")+"))\\b")}var b=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,g=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,x=/^[_A-Za-z$][_A-Za-z$0-9]*/,y=/^@[_A-Za-z$][_A-Za-z$0-9]*/,A=S(["and","or","not","is","isnt","in","instanceof","typeof"]),m=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],_=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],R=S(m.concat(_));m=S(m);var I=/^('{3}|\"{3}|['\"])/,W=/^(\/{3}|\/)/,N=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],T=S(N);function E(B,U){if(B.sol()){U.scope.align===null&&(U.scope.align=!1);var Q=U.scope.offset;if(B.eatSpace()){var X=B.indentation();return X>Q&&U.scope.type=="coffee"?"indent":X<Q?"dedent":null}else Q>0&&O(B,U)}if(B.eatSpace())return null;var D=B.peek();if(B.match("####"))return B.skipToEnd(),"comment";if(B.match("###"))return U.tokenize=w,U.tokenize(B,U);if(D==="#")return B.skipToEnd(),"comment";if(B.match(/^-?[0-9\.]/,!1)){var z=!1;if(B.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(z=!0),B.match(/^-?\d+\.\d*/)&&(z=!0),B.match(/^-?\.\d+/)&&(z=!0),z)return B.peek()=="."&&B.backUp(1),"number";var te=!1;if(B.match(/^-?0x[0-9a-f]+/i)&&(te=!0),B.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(te=!0),B.match(/^-?0(?![\dx])/i)&&(te=!0),te)return"number"}if(B.match(I))return U.tokenize=c(B.current(),!1,"string"),U.tokenize(B,U);if(B.match(W)){if(B.current()!="/"||B.match(/^.*\//,!1))return U.tokenize=c(B.current(),!0,"string-2"),U.tokenize(B,U);B.backUp(1)}return B.match(b)||B.match(A)?"operator":B.match(g)?"punctuation":B.match(T)?"atom":B.match(y)||U.prop&&B.match(x)?"property":B.match(R)?"keyword":B.match(x)?"variable":(B.next(),p)}function c(B,U,Q){return function(X,D){for(;!X.eol();)if(X.eatWhile(/[^'"\/\\]/),X.eat("\\")){if(X.next(),U&&X.eol())return Q}else{if(X.match(B))return D.tokenize=E,Q;X.eat(/['"\/]/)}return U&&(h.singleLineStringErrors?Q=p:D.tokenize=E),Q}}function w(B,U){for(;!B.eol();){if(B.eatWhile(/[^#]/),B.match("###")){U.tokenize=E;break}B.eatWhile("#")}return"comment"}function k(B,U,Q){Q=Q||"coffee";for(var X=0,D=!1,z=null,te=U.scope;te;te=te.prev)if(te.type==="coffee"||te.type=="}"){X=te.offset+u.indentUnit;break}Q!=="coffee"?(D=null,z=B.column()+B.current().length):U.scope.align&&(U.scope.align=!1),U.scope={offset:X,type:Q,prev:U.scope,align:D,alignOffset:z}}function O(B,U){if(!!U.scope.prev)if(U.scope.type==="coffee"){for(var Q=B.indentation(),X=!1,D=U.scope;D;D=D.prev)if(Q===D.offset){X=!0;break}if(!X)return!0;for(;U.scope.prev&&U.scope.offset!==Q;)U.scope=U.scope.prev;return!1}else return U.scope=U.scope.prev,!1}function L(B,U){var Q=U.tokenize(B,U),X=B.current();X==="return"&&(U.dedent=!0),((X==="->"||X==="=>")&&B.eol()||Q==="indent")&&k(B,U);var D="[({".indexOf(X);if(D!==-1&&k(B,U,"])}".slice(D,D+1)),m.exec(X)&&k(B,U),X=="then"&&O(B,U),Q==="dedent"&&O(B,U))return p;if(D="])}".indexOf(X),D!==-1){for(;U.scope.type=="coffee"&&U.scope.prev;)U.scope=U.scope.prev;U.scope.type==X&&(U.scope=U.scope.prev)}return U.dedent&&B.eol()&&(U.scope.type=="coffee"&&U.scope.prev&&(U.scope=U.scope.prev),U.dedent=!1),Q}var j={startState:function(B){return{tokenize:E,scope:{offset:B||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(B,U){var Q=U.scope.align===null&&U.scope;Q&&B.sol()&&(Q.align=!1);var X=L(B,U);return X&&X!="comment"&&(Q&&(Q.align=!0),U.prop=X=="punctuation"&&B.current()=="."),X},indent:function(B,U){if(B.tokenize!=E)return 0;var Q=B.scope,X=U&&"])}".indexOf(U.charAt(0))>-1;if(X)for(;Q.type=="coffee"&&Q.prev;)Q=Q.prev;var D=X&&Q.type===U.charAt(0);return Q.align?Q.alignOffset-(D?1:0):(D?Q.prev:Q).offset},lineComment:"#",fold:"indent"};return j}),l.defineMIME("application/vnd.coffeescript","coffeescript"),l.defineMIME("text/x-coffeescript","coffeescript"),l.defineMIME("text/coffeescript","coffeescript")})}();var Rc={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){l.defineMode("css",function(B,U){var Q=U.inline;U.propertyKeywords||(U=l.resolveMode("text/css"));var X=B.indentUnit,D=U.tokenHooks,z=U.documentTypes||{},te=U.mediaTypes||{},ue=U.mediaFeatures||{},de=U.mediaValueKeywords||{},Me=U.propertyKeywords||{},V=U.nonStandardPropertyKeywords||{},pe=U.fontProperties||{},Ne=U.counterDescriptors||{},Ke=U.colorKeywords||{},je=U.valueKeywords||{},Je=U.allowNested,Se=U.lineComment,Ae=U.supportsAtComponent===!0,ze=B.highlightNonStandardPropertyKeywords!==!1,Be,De;function Oe(K,ee){return Be=ee,K}function st(K,ee){var J=K.next();if(D[J]){var ge=D[J](K,ee);if(ge!==!1)return ge}if(J=="@")return K.eatWhile(/[\w\\\-]/),Oe("def",K.current());if(J=="="||(J=="~"||J=="|")&&K.eat("="))return Oe(null,"compare");if(J=='"'||J=="'")return ee.tokenize=It(J),ee.tokenize(K,ee);if(J=="#")return K.eatWhile(/[\w\\\-]/),Oe("atom","hash");if(J=="!")return K.match(/^\s*\w*/),Oe("keyword","important");if(/\d/.test(J)||J=="."&&K.eat(/\d/))return K.eatWhile(/[\w.%]/),Oe("number","unit");if(J==="-"){if(/[\d.]/.test(K.peek()))return K.eatWhile(/[\w.%]/),Oe("number","unit");if(K.match(/^-[\w\\\-]*/))return K.eatWhile(/[\w\\\-]/),K.match(/^\s*:/,!1)?Oe("variable-2","variable-definition"):Oe("variable-2","variable");if(K.match(/^\w+-/))return Oe("meta","meta")}else return/[,+>*\/]/.test(J)?Oe(null,"select-op"):J=="."&&K.match(/^-?[_a-z][_a-z0-9-]*/i)?Oe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(J)?Oe(null,J):K.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(K.current())&&(ee.tokenize=lr),Oe("variable callee","variable")):/[\w\\\-]/.test(J)?(K.eatWhile(/[\w\\\-]/),Oe("property","word")):Oe(null,null)}function It(K){return function(ee,J){for(var ge=!1,we;(we=ee.next())!=null;){if(we==K&&!ge){K==")"&&ee.backUp(1);break}ge=!ge&&we=="\\"}return(we==K||!ge&&K!=")")&&(J.tokenize=null),Oe("string","string")}}function lr(K,ee){return K.next(),K.match(/^\s*[\"\')]/,!1)?ee.tokenize=null:ee.tokenize=It(")"),Oe(null,"(")}function Pe(K,ee,J){this.type=K,this.indent=ee,this.prev=J}function He(K,ee,J,ge){return K.context=new Pe(J,ee.indentation()+(ge===!1?0:X),K.context),J}function dt(K){return K.context.prev&&(K.context=K.context.prev),K.context.type}function F(K,ee,J){return re[J.context.type](K,ee,J)}function P(K,ee,J,ge){for(var we=ge||1;we>0;we--)J.context=J.context.prev;return F(K,ee,J)}function Y(K){var ee=K.current().toLowerCase();je.hasOwnProperty(ee)?De="atom":Ke.hasOwnProperty(ee)?De="keyword":De="variable"}var re={};return re.top=function(K,ee,J){if(K=="{")return He(J,ee,"block");if(K=="}"&&J.context.prev)return dt(J);if(Ae&&/@component/i.test(K))return He(J,ee,"atComponentBlock");if(/^@(-moz-)?document$/i.test(K))return He(J,ee,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(K))return He(J,ee,"atBlock");if(/^@(font-face|counter-style)/i.test(K))return J.stateArg=K,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(K))return"keyframes";if(K&&K.charAt(0)=="@")return He(J,ee,"at");if(K=="hash")De="builtin";else if(K=="word")De="tag";else{if(K=="variable-definition")return"maybeprop";if(K=="interpolation")return He(J,ee,"interpolation");if(K==":")return"pseudo";if(Je&&K=="(")return He(J,ee,"parens")}return J.context.type},re.block=function(K,ee,J){if(K=="word"){var ge=ee.current().toLowerCase();return Me.hasOwnProperty(ge)?(De="property","maybeprop"):V.hasOwnProperty(ge)?(De=ze?"string-2":"property","maybeprop"):Je?(De=ee.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(De+=" error","maybeprop")}else return K=="meta"?"block":!Je&&(K=="hash"||K=="qualifier")?(De="error","block"):re.top(K,ee,J)},re.maybeprop=function(K,ee,J){return K==":"?He(J,ee,"prop"):F(K,ee,J)},re.prop=function(K,ee,J){if(K==";")return dt(J);if(K=="{"&&Je)return He(J,ee,"propBlock");if(K=="}"||K=="{")return P(K,ee,J);if(K=="(")return He(J,ee,"parens");if(K=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ee.current()))De+=" error";else if(K=="word")Y(ee);else if(K=="interpolation")return He(J,ee,"interpolation");return"prop"},re.propBlock=function(K,ee,J){return K=="}"?dt(J):K=="word"?(De="property","maybeprop"):J.context.type},re.parens=function(K,ee,J){return K=="{"||K=="}"?P(K,ee,J):K==")"?dt(J):K=="("?He(J,ee,"parens"):K=="interpolation"?He(J,ee,"interpolation"):(K=="word"&&Y(ee),"parens")},re.pseudo=function(K,ee,J){return K=="meta"?"pseudo":K=="word"?(De="variable-3",J.context.type):F(K,ee,J)},re.documentTypes=function(K,ee,J){return K=="word"&&z.hasOwnProperty(ee.current())?(De="tag",J.context.type):re.atBlock(K,ee,J)},re.atBlock=function(K,ee,J){if(K=="(")return He(J,ee,"atBlock_parens");if(K=="}"||K==";")return P(K,ee,J);if(K=="{")return dt(J)&&He(J,ee,Je?"block":"top");if(K=="interpolation")return He(J,ee,"interpolation");if(K=="word"){var ge=ee.current().toLowerCase();ge=="only"||ge=="not"||ge=="and"||ge=="or"?De="keyword":te.hasOwnProperty(ge)?De="attribute":ue.hasOwnProperty(ge)?De="property":de.hasOwnProperty(ge)?De="keyword":Me.hasOwnProperty(ge)?De="property":V.hasOwnProperty(ge)?De=ze?"string-2":"property":je.hasOwnProperty(ge)?De="atom":Ke.hasOwnProperty(ge)?De="keyword":De="error"}return J.context.type},re.atComponentBlock=function(K,ee,J){return K=="}"?P(K,ee,J):K=="{"?dt(J)&&He(J,ee,Je?"block":"top",!1):(K=="word"&&(De="error"),J.context.type)},re.atBlock_parens=function(K,ee,J){return K==")"?dt(J):K=="{"||K=="}"?P(K,ee,J,2):re.atBlock(K,ee,J)},re.restricted_atBlock_before=function(K,ee,J){return K=="{"?He(J,ee,"restricted_atBlock"):K=="word"&&J.stateArg=="@counter-style"?(De="variable","restricted_atBlock_before"):F(K,ee,J)},re.restricted_atBlock=function(K,ee,J){return K=="}"?(J.stateArg=null,dt(J)):K=="word"?(J.stateArg=="@font-face"&&!pe.hasOwnProperty(ee.current().toLowerCase())||J.stateArg=="@counter-style"&&!Ne.hasOwnProperty(ee.current().toLowerCase())?De="error":De="property","maybeprop"):"restricted_atBlock"},re.keyframes=function(K,ee,J){return K=="word"?(De="variable","keyframes"):K=="{"?He(J,ee,"top"):F(K,ee,J)},re.at=function(K,ee,J){return K==";"?dt(J):K=="{"||K=="}"?P(K,ee,J):(K=="word"?De="tag":K=="hash"&&(De="builtin"),"at")},re.interpolation=function(K,ee,J){return K=="}"?dt(J):K=="{"||K==";"?P(K,ee,J):(K=="word"?De="variable":K!="variable"&&K!="("&&K!=")"&&(De="error"),"interpolation")},{startState:function(K){return{tokenize:null,state:Q?"block":"top",stateArg:null,context:new Pe(Q?"block":"top",K||0,null)}},token:function(K,ee){if(!ee.tokenize&&K.eatSpace())return null;var J=(ee.tokenize||st)(K,ee);return J&&typeof J=="object"&&(Be=J[1],J=J[0]),De=J,Be!="comment"&&(ee.state=re[ee.state](Be,K,ee)),De},indent:function(K,ee){var J=K.context,ge=ee&&ee.charAt(0),we=J.indent;return J.type=="prop"&&(ge=="}"||ge==")")&&(J=J.prev),J.prev&&(ge=="}"&&(J.type=="block"||J.type=="top"||J.type=="interpolation"||J.type=="restricted_atBlock")?(J=J.prev,we=J.indent):(ge==")"&&(J.type=="parens"||J.type=="atBlock_parens")||ge=="{"&&(J.type=="at"||J.type=="atBlock"))&&(we=Math.max(0,J.indent-X))),we},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Se,fold:"brace"}});function u(B){for(var U={},Q=0;Q<B.length;++Q)U[B[Q].toLowerCase()]=!0;return U}var h=["domain","regexp","url","url-prefix"],p=u(h),S=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(S),g=["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"],x=u(g),y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],A=u(y),m=["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"],_=u(m),R=["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"],I=u(R),W=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],N=u(W),T=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],E=u(T),c=["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"],w=u(c),k=["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","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","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"],O=u(k),L=h.concat(S).concat(g).concat(y).concat(m).concat(R).concat(c).concat(k);l.registerHelper("hintWords","css",L);function j(B,U){for(var Q=!1,X;(X=B.next())!=null;){if(Q&&X=="/"){U.tokenize=null;break}Q=X=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:p,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:A,propertyKeywords:_,nonStandardPropertyKeywords:I,fontProperties:N,counterDescriptors:E,colorKeywords:w,valueKeywords:O,tokenHooks:{"/":function(B,U){return B.eat("*")?(U.tokenize=j,j(B,U)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:A,propertyKeywords:_,nonStandardPropertyKeywords:I,colorKeywords:w,valueKeywords:O,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(B,U){return B.eat("/")?(B.skipToEnd(),["comment","comment"]):B.eat("*")?(U.tokenize=j,j(B,U)):["operator","operator"]},":":function(B){return B.match(/^\s*\{/,!1)?[null,null]:!1},$:function(B){return B.match(/^[\w-]+/),B.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(B){return B.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:A,propertyKeywords:_,nonStandardPropertyKeywords:I,colorKeywords:w,valueKeywords:O,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(B,U){return B.eat("/")?(B.skipToEnd(),["comment","comment"]):B.eat("*")?(U.tokenize=j,j(B,U)):["operator","operator"]},"@":function(B){return B.eat("{")?[null,"interpolation"]:B.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(B.eatWhile(/[\w\\\-]/),B.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:p,mediaTypes:b,mediaFeatures:x,propertyKeywords:_,nonStandardPropertyKeywords:I,fontProperties:N,counterDescriptors:E,colorKeywords:w,valueKeywords:O,supportsAtComponent:!0,tokenHooks:{"/":function(B,U){return B.eat("*")?(U.tokenize=j,j(B,U)):!1}},name:"css",helperType:"gss"})})})();var Fc={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},h={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(p,S){var b=p.indentUnit,g={},x=S.htmlMode?u:h;for(var y in x)g[y]=x[y];for(var y in S)g[y]=S[y];var A,m;function _(D,z){function te(Me){return z.tokenize=Me,Me(D,z)}var ue=D.next();if(ue=="<")return D.eat("!")?D.eat("[")?D.match("CDATA[")?te(W("atom","]]>")):null:D.match("--")?te(W("comment","-->")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),te(N(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),z.tokenize=W("meta","?>"),"meta"):(A=D.eat("/")?"closeTag":"openTag",z.tokenize=R,"tag
|
|
bracket");if(ue=="&"){var de;return
|
|
D.eat("#")?D.eat("x")?de=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):de=D.eatWhile(/[\d]/)&&D.eat(";"):de=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),de?"atom":"error"}else
|
|
return D.eatWhile(/[^&<]/),null}_.isInText=!0;function
|
|
R(D,z){var
|
|
te=D.next();if(te==">"||te=="/"&&D.eat(">"))return
|
|
z.tokenize=_,A=te==">"?"endTag":"selfcloseTag","tag
|
|
bracket";if(te=="=")return
|
|
A="equals",null;if(te=="<"){z.tokenize=_,z.state=w,z.tagName=z.tagStart=null;var
|
|
ue=z.tokenize(D,z);return ue?ue+" tag error":"tag error"}else
|
|
return/[\'\"]/.test(te)?(z.tokenize=I(te),z.stringStartCol=D.column(),z.tokenize(D,z)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function
|
|
I(D){var
|
|
z=function(te,ue){for(;!te.eol();)if(te.next()==D){ue.tokenize=R;break}return"string"};return
|
|
z.isInAttribute=!0,z}function W(D,z){return
|
|
function(te,ue){for(;!te.eol();){if(te.match(z)){ue.tokenize=_;break}te.next()}return
|
|
D}}function N(D){return function(z,te){for(var
|
|
ue;(ue=z.next())!=null;){if(ue=="<")return
|
|
te.tokenize=N(D+1),te.tokenize(z,te);if(ue==">")if(D==1){te.tokenize=_;break}else
|
|
return te.tokenize=N(D-1),te.tokenize(z,te)}return"meta"}}function
|
|
T(D,z,te){this.prev=D.context,this.tagName=z||"",this.indent=D.indented,this.startOfLine=te,(g.doNotIndent.hasOwnProperty(z)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function
|
|
E(D){D.context&&(D.context=D.context.prev)}function
|
|
c(D,z){for(var
|
|
te;;){if(!D.context||(te=D.context.tagName,!g.contextGrabbers.hasOwnProperty(te)||!g.contextGrabbers[te].hasOwnProperty(z)))return;E(D)}}function
|
|
w(D,z,te){return
|
|
D=="openTag"?(te.tagStart=z.column(),k):D=="closeTag"?O:w}function
|
|
k(D,z,te){return
|
|
D=="word"?(te.tagName=z.current(),m="tag",B):g.allowMissingTagName&&D=="endTag"?(m="tag
|
|
bracket",B(D,z,te)):(m="error",k)}function O(D,z,te){if(D=="word"){var
|
|
ue=z.current();return
|
|
te.context&&te.context.tagName!=ue&&g.implicitlyClosed.hasOwnProperty(te.context.tagName)&&E(te),te.context&&te.context.tagName==ue||g.matchClosing===!1?(m="tag",L):(m="tag
|
|
error",j)}else return
|
|
g.allowMissingTagName&&D=="endTag"?(m="tag
|
|
bracket",L(D,z,te)):(m="error",j)}function L(D,z,te){return
|
|
D!="endTag"?(m="error",L):(E(te),w)}function j(D,z,te){return
|
|
m="error",L(D,z,te)}function B(D,z,te){if(D=="word")return
|
|
m="attribute",U;if(D=="endTag"||D=="selfcloseTag"){var
|
|
ue=te.tagName,de=te.tagStart;return
|
|
te.tagName=te.tagStart=null,D=="selfcloseTag"||g.autoSelfClosers.hasOwnProperty(ue)?c(te,ue):(c(te,ue),te.context=new
|
|
T(te,ue,de==te.indented)),w}return m="error",B}function
|
|
U(D,z,te){return
|
|
D=="equals"?Q:(g.allowMissing||(m="error"),B(D,z,te))}function
|
|
Q(D,z,te){return
|
|
D=="string"?X:D=="word"&&g.allowUnquoted?(m="string",B):(m="error",B(D,z,te))}function
|
|
X(D,z,te){return
|
|
D=="string"?X:B(D,z,te)}return{startState:function(D){var
|
|
z={tokenize:_,state:w,indented:D||0,tagName:null,tagStart:null,context:null};return
|
|
|
|
D!=null&&(z.baseIndent=D),z},token:function(D,z){if(!z.tagName&&D.sol()&&(z.indented=D.indentation()),D.eatSpace())return
|
|
null;A=null;var
|
|
te=z.tokenize(D,z);return(te||A)&&te!="comment"&&(m=null,z.state=z.state(A||te,D,z),m&&(te=m=="error"?te+"
|
|
error":m)),te},indent:function(D,z,te){var
|
|
ue=D.context;if(D.tokenize.isInAttribute)return
|
|
D.tagStart==D.indented?D.stringStartCol+1:D.indented+b;if(ue&&ue.noIndent)return
|
|
l.Pass;if(D.tokenize!=R&&D.tokenize!=_)return
|
|
te?te.match(/^(\s*)/)[0].length:0;if(D.tagName)return
|
|
g.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+b*(g.multilineTagIndentFactor||1);if(g.alignCDATA&&/<!--\[CDATA\[/.test(z))return 0;var de=z&&/^<(\/)?([\w_:\.-]*)/.exec(z);if(de&&de[1])for(;ue;)if(ue.tagName==de[2]){ue=ue.prev;break}else if(g.implicitlyClosed.hasOwnProperty(ue.tagName))ue=ue.prev;else break;else if(de)for(;ue;){var Me=g.contextGrabbers[ue.tagName];if(Me&&Me.hasOwnProperty(de[2]))ue=ue.prev;else break}for(;ue&&ue.prev&&!ue.startOfLine;)ue=ue.prev;return ue?ue.indent+b:D.baseIndent||0},electricInput:/<\/[\s\w:]+-->$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(D){D.state==Q&&(D.state=B)},xmlCurrentTag:function(D){return
|
|
|
|
D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var
|
|
z=[],te=D.context;te;te=te.prev)z.push(te.tagName);return
|
|
z.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})(),function(o,a){(function(l){l(ct.exports,Fc.exports,Ic.exports,Rc.exports)})(function(l){var
|
|
|
|
u={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function
|
|
h(A,m,_){var R=A.current(),I=R.search(m);return
|
|
I>-1?A.backUp(R.length-I):R.match(/<\/?$/)&&(A.backUp(R.length),A.match(m,!1)||A.match(R)),_}var
|
|
p={};function S(A){var m=p[A];return m||(p[A]=new
|
|
RegExp("\\s+"+A+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function
|
|
b(A,m){var _=A.match(S(m));return
|
|
_?/^\s*(.*?)\s*$/.exec(_[2])[1]:""}function g(A,m){return new
|
|
RegExp((m?"^":"")+"","i")}function x(A,m){for(var _ in A)for(var
|
|
R=m[_]||(m[_]=[]),I=A[_],W=I.length-1;W>=0;W--)R.unshift(I[W])}function
|
|
y(A,m){for(var _=0;_<a.length;_++){var r="A[_];if(!R[0]||R[1].test(b(m,R[0])))return" r[2]}}l.definemode("htmlmixed",function(a,m){var="" _="l.getMode(A,{name:"xml",htmlMode:!0,multilineTagIndentFactor:m.multilineTagIndentFactor,multilineTagIndentPastTag:m.multilineTagIndentPastTag,allowMissingTagName:m.allowMissingTagName}),R={},I=m&&m.tags,W=m&&m.scriptTypes;if(x(u,R),I&&x(I,R),W)for(var" n="W.length-1;N">=0;N--)R.script.unshift(["type",W[N].matches,W[N].mode]);function
|
|
T(E,c){var
|
|
w=_.token(E,c.htmlState),k=/\btag\b/.test(w),O;if(k&&!/[<>\s\/]/.test(E.current())&&(O=c.htmlState.tagName&&c.htmlState.tagName.toLowerCase())&&R.hasOwnProperty(O))c.inTag=O+"
|
|
";else if(c.inTag&&k&&/>$/.test(E.current())){var
|
|
L=/^([\S]+) (.*)/.exec(c.inTag);c.inTag=null;var
|
|
j=E.current()==">"&&y(R[L[1]],L[2]),B=l.getMode(A,j),U=g(L[1],!0),Q=g(L[1],!1);c.token=function(X,D){return
|
|
|
|
X.match(U,!1)?(D.token=T,D.localState=D.localMode=null,null):h(X,Q,D.localMode.token(X,D.localState))},c.localMode=B,c.localState=l.startState(B,_.indent(c.htmlState,"",""))}else
|
|
c.inTag&&(c.inTag+=E.current(),E.eol()&&(c.inTag+="
|
|
"));return w}return{startState:function(){var
|
|
E=l.startState(_);return{token:T,inTag:null,localMode:null,localState:null,htmlState:E}},copyState:function(E){var
|
|
c;return
|
|
E.localState&&(c=l.copyState(E.localMode,E.localState)),{token:E.token,inTag:E.inTag,localMode:E.localMode,localState:c,htmlState:l.copyState(_,E.htmlState)}},token:function(E,c){return
|
|
|
|
c.token(E,c)},indent:function(E,c,w){return!E.localMode||/^\s*<\//.test(c)?_.indent(E.htmlState,c,w):E.localMode.indent?E.localMode.indent(E.localState,c,w):l.Pass},innerMode:function(E){return{state:E.localState||E.htmlState,mode:E.localMode||_}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})}();var
|
|
|
|
Fa={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var
|
|
u=l.Pos;function h(T){var E=T.flags;return
|
|
E!=null?E:(T.ignoreCase?"i":"")+(T.global?"g":"")+(T.multiline?"m":"")}function
|
|
p(T,E){for(var c=h(T),w=c,k=0;k<e.length;k++)w.indexof(e.charat(k))==-1&&(w+=e.charat(k));return c="=w?T:new" regexp(t.source,w)}function="" s(t){return="" \\s|\\n|\n|\\w|\\d|\[\^="" .test(t.source)}function="" b(t,e,c){e="p(E,"g");for(var" w="c.line,k=c.ch,O=T.lastLine();w<=O;w++,k=0){E.lastIndex=k;var" l="T.getLine(w),j=E.exec(L);if(j)return{from:u(w,j.index),to:u(w,j.index+j[0].length),match:j}}}function" g(t,e,c){if(!s(e))return="" b(t,e,c);e="p(E,"gm");for(var" w,k="1,O=c.line,L=T.lastLine();O<=L;){for(var" j="0;j<k&&!(O">L);j++){var
|
|
B=T.getLine(O++);w=w==null?B:w+`
|
|
`+B}k=k*2,E.lastIndex=c.ch;var U=E.exec(w);if(U){var
|
|
Q=w.slice(0,U.index).split(`
|
|
`),X=U[0].split(`
|
|
`),D=c.line+Q.length-1,z=Q[Q.length-1].length;return{from:u(D,z),to:u(D+X.length-1,X.length==1?z+X[0].length:X[X.length-1].length),match:U}}}}function
|
|
x(T,E,c){for(var w,k=0;k<=T.length;){E.lastIndex=k;var
|
|
O=E.exec(T);if(!O)break;var
|
|
L=O.index+O[0].length;if(L>T.length-c)break;(!w||L>w.index+w[0].length)&&(w=O),k=O.index+1}return
|
|
w}function y(T,E,c){E=p(E,"g");for(var
|
|
w=c.line,k=c.ch,O=T.firstLine();w>=O;w--,k=-1){var
|
|
L=T.getLine(w),j=x(L,E,k<0?0:L.length-k);if(j)return{from:u(w,j.index),to:u(w,j.index+j[0].length),match:j}}}function
|
|
A(T,E,c){if(!S(E))return y(T,E,c);E=p(E,"gm");for(var
|
|
w,k=1,O=T.getLine(c.line).length-c.ch,L=c.line,j=T.firstLine();L>=j;){for(var
|
|
B=0;B<k&&l>=j;B++){var U=T.getLine(L--);w=w==null?U:U+`
|
|
`+w}k*=2;var Q=x(w,E,O);if(Q){var X=w.slice(0,Q.index).split(`
|
|
`),D=Q[0].split(`
|
|
`),z=L+X.length,te=X[X.length-1].length;return{from:u(z,te),to:u(z+D.length-1,D.length==1?te+D[0].length:D[D.length-1].length),match:Q}}}}var
|
|
m,_;String.prototype.normalize?(m=function(T){return
|
|
T.normalize("NFD").toLowerCase()},_=function(T){return
|
|
T.normalize("NFD")}):(m=function(T){return
|
|
T.toLowerCase()},_=function(T){return T});function
|
|
R(T,E,c,w){if(T.length==E.length)return c;for(var
|
|
k=0,O=c+Math.max(0,T.length-E.length);;){if(k==O)return k;var
|
|
L=k+O>>1,j=w(T.slice(0,L)).length;if(j==c)return
|
|
L;j>c?O=L:k=L+1}}function I(T,E,c,w){if(!E.length)return null;var
|
|
k=w?m:_,O=k(E).split(/\r|\n\r?/);e:for(var
|
|
L=c.line,j=c.ch,B=T.lastLine()+1-O.length;L<=B;L++,j=0){var
|
|
U=T.getLine(L).slice(j),Q=k(U);if(O.length==1){var
|
|
X=Q.indexOf(O[0]);if(X==-1)continue e;var
|
|
c=R(U,Q,X,k)+j;return{from:u(L,R(U,Q,X,k)+j),to:u(L,R(U,Q,X+O[0].length,k)+j)}}else{var
|
|
D=Q.length-O[0].length;if(Q.slice(D)!=O[0])continue e;for(var z=1;z<o.length-1;z++)if(k(t.getline(l+z))!=o[z])continue e;var="" te="T.getLine(L+O.length-1),ue=k(te),de=O[O.length-1];if(ue.slice(0,de.length)!=de)continue" e;return{from:u(l,r(u,q,d,k)+j),to:u(l+o.length-1,r(te,ue,de.length,k))}}}}function="" w(t,e,c,w){if(!e.length)return="" null;var="" k="w?m:_,O=k(E).split(/\r|\n\r?/);e:for(var" l="c.line,j=c.ch,B=T.firstLine()-1+O.length;L">=B;L--,j=-1){var
|
|
U=T.getLine(L);j>-1&&(U=U.slice(0,j));var
|
|
Q=k(U);if(O.length==1){var X=Q.lastIndexOf(O[0]);if(X==-1)continue
|
|
e;return{from:u(L,R(U,Q,X,k)),to:u(L,R(U,Q,X+O[0].length,k))}}else{var
|
|
D=O[O.length-1];if(Q.slice(0,D.length)!=D)continue e;for(var
|
|
z=1,c=L-O.length+1;z<o.length-1;z++)if(k(t.getline(c+z))!=o[z])continue e;var="" te="T.getLine(L+1-O.length),ue=k(te);if(ue.slice(ue.length-O[0].length)!=O[0])continue" e;return{from:u(l+1-o.length,r(te,ue,te.length-o[0].length,k)),to:u(l,r(u,q,d.length,k))}}}}function="" n(t,e,c,w){this.atoccurrence="!1,this.doc=T,c=c?T.clipPos(c):u(0,0),this.pos={from:c,to:c};var" k;typeof="" w="="object"?k=w.caseFold:(k=w,w=null),typeof" e="="string"?(k==null&&(k=!1),this.matches=function(O,L){return(O?W:I)(T,E,L,k)}):(E=p(E,"gm"),!w||w.multiline!==!1?this.matches=function(O,L){return(O?A:g)(T,E,L)}:this.matches=function(O,L){return(O?y:b)(T,E,L)})}N.prototype={findNext:function(){return" this.find(!1)},findprevious:function(){return="" this.find(!0)},find:function(t){for(var="" this.pos="E,this.atOccurrence=!0,this.pos.match||!0;var" c="u(T?this.doc.firstLine():this.doc.lastLine()+1,0);return" this.pos.from},to:function(){if(this.atoccurrence)return="" this.pos.to},replace:function(t,e){if(!!this.atoccurrence){var="" new="" n(this.doc,t,e,c)}),l.definedocextension("getsearchcursor",function(t,e,c){return="" n(this,t,e,c)}),l.defineextension("selectmatches",function(t,e){for(var="">0);)c.push({anchor:w.from(),head:w.to()});c.length&&this.setSelections(c,0)})})})();var
|
|
|
|
Bc={exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var
|
|
u=/MSIE
|
|
\d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),h=l.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function
|
|
S(m){return m&&m.bracketRegex||/[(){}[\]]/}function
|
|
b(m,_,R){var
|
|
I=m.getLineHandle(_.line),W=_.ch-1,N=R&&R.afterCursor;N==null&&(N=/(^|
|
|
)cm-fat-cursor($| )/.test(m.getWrapperElement().className));var
|
|
T=S(R),E=!N&&W>=0&&T.test(I.text.charAt(W))&&p[I.text.charAt(W)]||T.test(I.text.charAt(W+1))&&p[I.text.charAt(++W)];if(!E)return
|
|
null;var
|
|
c=E.charAt(1)==">"?1:-1;if(R&&R.strict&&c>0!=(W==_.ch))return
|
|
null;var
|
|
w=m.getTokenTypeAt(h(_.line,W+1)),k=g(m,h(_.line,W+(c>0?1:0)),c,w,R);return
|
|
|
|
k==null?null:{from:h(_.line,W),to:k&&k.pos,match:k&&k.ch==E.charAt(0),forward:c>0}}function
|
|
g(m,_,R,I,W){for(var
|
|
N=W&&W.maxScanLineLength||1e4,T=W&&W.maxScanLines||1e3,E=[],c=S(W),w=R>0?Math.min(_.line+T,m.lastLine()+1):Math.max(m.firstLine()-1,_.line-T),k=_.line;k!=w;k+=R){var
|
|
O=m.getLine(k);if(!!O){var
|
|
L=R>0?0:O.length-1,j=R>0?O.length:-1;if(!(O.length>N))for(k==_.line&&(L=_.ch-(R<0?1:0));L!=j;L+=R){var
|
|
B=O.charAt(L);if(c.test(B)&&(I===void
|
|
0||(m.getTokenTypeAt(h(k,L+1))||"")==(I||""))){var
|
|
U=p[B];if(U&&U.charAt(1)==">"==R>0)E.push(B);else
|
|
if(E.length)E.pop();else return{pos:h(k,L),ch:B}}}}}return
|
|
k-R==(R>0?m.lastLine():m.firstLine())?!1:null}function
|
|
x(m,_,R){for(var
|
|
I=m.state.matchBrackets.maxHighlightLineLength||1e3,W=R&&R.highlightNonMatching,N=[],T=m.listSelections(),E=0;E<t.length;e++){var c="T[E].empty()&&b(m,T[E].head,R);if(c&&(c.match||W!==!1)&&m.getLine(c.from.line).length<=I){var" w="c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";N.push(m.markText(c.from,h(c.from.line,c.from.ch+1),{className:w})),c.to&&m.getLine(c.to.line).length<=I&&N.push(m.markText(c.to,h(c.to.line,c.to.ch+1),{className:w}))}}if(N.length){u&&m.state.focused&&m.focus();var" k="function(){m.operation(function(){for(var" o="0;O<N.length;O++)N[O].clear()})};if(_)setTimeout(k,800);else" return="" k}}function="" y(m){m.operation(function(){m.state.matchbrackets.currentlyhighlighted&&(m.state.matchbrackets.currentlyhighlighted(),m.state.matchbrackets.currentlyhighlighted="null),m.state.matchBrackets.currentlyHighlighted=x(m,!1,m.state.matchBrackets)})}function" a(m){m.state.matchbrackets&&m.state.matchbrackets.currentlyhighlighted&&(m.state.matchbrackets.currentlyhighlighted(),m.state.matchbrackets.currentlyhighlighted="null)}l.defineOption("matchBrackets",!1,function(m,_,R){R&&R!=l.Init&&(m.off("cursorActivity",y),m.off("focus",y),m.off("blur",A),A(m)),_&&(m.state.matchBrackets=typeof" _="="object"?_:{},m.on("cursorActivity",y),m.on("focus",y),m.on("blur",A))}),l.defineExtension("matchBrackets",function(){x(this,!0)}),l.defineExtension("findMatchingBracket",function(m,_,R){return(R||typeof" g(this,m,_,r,i)})})})(),function(o,a){(function(l){l(ct.exports,fa.exports,bc.exports)})(function(l){var="" u="l.commands,h=l.Pos;function" p(c,w,k){if(k<0&&w.ch="=0)return" c.clippos(h(w.line-1));var="">0&&w.ch>=O.length)return
|
|
c.clipPos(h(w.line+1,0));for(var
|
|
L="start",j,B=w.ch,U=B,Q=k<0?0:O.length,X=0;U!=Q;U+=k,X++){var
|
|
D=O.charAt(k<0?U-1:U),z=D!="_"&&l.isWordChar(D)?"w":"o";if(z=="w"&&D.toUpperCase()==D&&(z="W"),L=="start")z!="o"?(L="in",j=z):B=U+k;else
|
|
|
|
if(L=="in"&&j!=z){if(j=="w"&&z=="W"&&k<0&&U--,j=="W"&&z=="w"&&k>0)if(U==B+1){j="w";continue}else
|
|
U--;break}}return h(w.line,U)}function
|
|
S(c,w){c.extendSelectionsBy(function(k){return
|
|
c.display.shift||c.doc.extend||k.empty()?p(c.doc,k.head,w):w<0?k.from():k.to()})}u.goSubwordLeft=function(c){S(c,-1)},u.goSubwordRight=function(c){S(c,1)},u.scrollLineUp=function(c){var
|
|
w=c.getScrollInfo();if(!c.somethingSelected()){var
|
|
k=c.lineAtHeight(w.top+w.clientHeight,"local");c.getCursor().line>=k&&c.execCommand("goLineUp")}c.scrollTo(null,w.top-c.defaultTextHeight())},u.scrollLineDown=function(c){var
|
|
w=c.getScrollInfo();if(!c.somethingSelected()){var
|
|
k=c.lineAtHeight(w.top,"local")+1;c.getCursor().line<=k&&c.execCommand("goLineDown")}c.scrollTo(null,w.top+c.defaultTextHeight())},u.splitSelectionByLine=function(c){for(var
|
|
w=c.listSelections(),k=[],O=0;O<w.length;o++)for(var l="w[O].from(),j=w[O].to(),B=L.line;B<=j.line;++B)j.line">L.line&&B==j.line&&j.ch==0||k.push({anchor:B==L.line?L:h(B,0),head:B==j.line?j:h(B)});c.setSelections(k,0)},u.singleSelectionTop=function(c){var
|
|
|
|
w=c.listSelections()[0];c.setSelection(w.anchor,w.head,{scroll:!1})},u.selectLine=function(c){for(var
|
|
w=c.listSelections(),k=[],O=0;O<w.length;o++){var l="w[O];k.push({anchor:h(L.from().line,0),head:h(L.to().line+1,0)})}c.setSelections(k)};function" b(c,w){if(c.isreadonly())return="" l.pass;c.operation(function(){for(var="" k="c.listSelections().length,O=[],L=-1,j=0;j<k;j++){var" b="c.listSelections()[j].head;if(!(B.line<=L)){var" u="h(B.line+(w?0:1),0);c.replaceRange(`" `,u,null,"+insertline"),c.indentline(u.line,null,!0),o.push({head:u,anchor:u}),l="B.line+1}}c.setSelections(O)}),c.execCommand("indentAuto")}u.insertLineAfter=function(c){return" b(c,!1)},u.insertlinebefore="function(c){return" b(c,!0)};function="" g(c,w){for(var="" w="c.getCursor("from"),k=c.getCursor("to"),O=c.state.sublimeFindFullWord==c.doc.sel;if(l.cmpPos(w,k)==0){var" j="c.getRange(w,k),B=O?new" regexp("\\b"+j+"\\b"):j,u="c.getSearchCursor(B,k),Q=U.findNext();if(Q||(U=c.getSearchCursor(B,h(c.firstLine(),0)),Q=U.findNext()),!Q||y(c.listSelections(),U.from(),U.to()))return;c.addSelection(U.from(),U.to())}O&&(c.state.sublimeFindFullWord=c.doc.sel)},u.skipAndSelectNextOccurrence=function(c){var" o.anchor!="w||O.head!=k}))};function" x(c,w){for(var="" q="{anchor:B,head:U};O.push(j),O.push(Q)}c.setSelections(O)}u.addCursorToPrevLine=function(c){x(c,-1)},u.addCursorToNextLine=function(c){x(c,1)};function" y(c,w,k){for(var="" o="0;O<c.length;O++)if(l.cmpPos(c[O].from(),w)==0&&l.cmpPos(c[O].to(),k)==0)return!0;return!1}var" a="(){}[]" ;function="" m(c){for(var="" c.setselections(k),!0}u.selectscope="function(c){m(c)||c.execCommand("selectAll")},u.selectBetweenBrackets=function(c){if(!m(c))return" l.pass};function="" _(c){return="" c?="" \bpunctuation\b="" .test(c)?c:void="" 0:null}u.gotobracket="function(c){c.extendSelectionsBy(function(w){var" k.pos;var="" o&&h(o.pos.line,o.pos.ch+1)||w.head})},u.swaplineup="function(c){if(c.isReadOnly())return" l.pass;for(var="">O?k.push(U,Q):k.length&&(k[k.length-1]=Q),O=Q}c.operation(function(){for(var X=0;X<k.length;x+=2){var d="k[X],z=k[X+1],te=c.getLine(D);c.replaceRange("",h(D,0),h(D+1,0),"+swapLine"),z">c.lastLine()?c.replaceRange(`
|
|
`+te,h(c.lastLine()),null,"+swapLine"):c.replaceRange(te+`
|
|
`,h(z,0),null,"+swapLine")}c.setSelections(L),c.scrollIntoView()})},u.swapLineDown=function(c){if(c.isReadOnly())return
|
|
l.Pass;for(var
|
|
w=c.listSelections(),k=[],O=c.lastLine()+1,L=w.length-1;L>=0;L--){var
|
|
|
|
j=w[L],B=j.to().line+1,U=j.from().line;j.to().ch==0&&!j.empty()&&B--,B<o?k.push(b,u):k.length&&(k[k.length-1]=u),o=u}c.operation(function(){for(var q="k.length-2;Q">=0;Q-=2){var
|
|
|
|
X=k[Q],D=k[Q+1],z=c.getLine(X);X==c.lastLine()?c.replaceRange("",h(X-1),h(X),"+swapLine"):c.replaceRange("",h(X,0),h(X+1,0),"+swapLine"),c.replaceRange(z+`
|
|
`,h(D,0),null,"+swapLine")}c.scrollIntoView()})},u.toggleCommentIndented=function(c){c.toggleComment({indent:!0})},u.joinLines=function(c){for(var
|
|
w=c.listSelections(),k=[],O=0;O<w.length;o++){for(var l="w[O],j=L.from(),B=j.line,U=L.to().line;O<w.length-1&&w[O+1].from().line==U;)U=w[++O].to().line;k.push({start:B,end:U,anchor:!L.empty()&&j})}c.operation(function(){for(var" q="0,X=[],D=0;D<k.length;D++){for(var" z="k[D],te=z.anchor&&h(z.anchor.line-Q,z.anchor.ch),ue,de=z.start;de<=z.end;de++){var" me="de-Q;de==z.end&&(ue=h(Me,c.getLine(Me).length+1)),Me<c.lastLine()&&(c.replaceRange("" ",h(me),h(me+1,="" ^\s*="" .exec(c.getline(me+1))[0].length)),++q)}x.push({anchor:te||ue,head:ue})}c.setselections(x,0)})},u.duplicateline="function(c){c.operation(function(){for(var" w="c.listSelections().length,k=0;k<w;k++){var" o="c.listSelections()[k];O.empty()?c.replaceRange(c.getLine(O.head.line)+`" `,h(o.head.line,0)):c.replacerange(c.getrange(o.from(),o.to()),o.from())}c.scrollintoview()})};function="" r(c,w,k){if(c.isreadonly())return="" l.pass;for(var="" u="O[B];if(!U.empty()){for(var" d="[],z=0;z<L.length;z+=2){var" te="L[z],ue=L[z+1],de=h(te,0),Me=h(ue),V=c.getRange(de,Me,!1);w?V.sort(function(pe,Ne){return" pe<ne?-k:pe="=Ne?0:k}):V.sort(function(pe,Ne){var" ke="pe.toUpperCase(),je=Ne.toUpperCase();return" ke!="je&&(pe=Ke,Ne=je),pe<Ne?-k:pe==Ne?0:k}),c.replaceRange(V,de,Me),j&&D.push({anchor:de,head:h(ue+1,0)})}j&&c.setSelections(D,0)})}u.sortLines=function(c){R(c,!0,1)},u.reverseSortLines=function(c){R(c,!0,-1)},u.sortLinesInsensitive=function(c){R(c,!1,1)},u.reverseSortLinesInsensitive=function(c){R(c,!1,-1)},u.nextBookmark=function(c){var" k="w.shift(),O=k.find();if(O)return" w.push(k),c.setselection(o.from,o.to)}},u.prevbookmark="function(c){var" return="" c.setselection(k.from,k.to)}},u.togglebookmark="function(c){for(var" i(c,w){c.operation(function(){for(var="" b="k[j];B.empty()?(O.push(j),L.push("")):L.push(w(c.getRange(B.from(),B.to())))}c.replaceSelections(L,"around","case");for(var" j="O.length-1,U;j">=0;j--){var
|
|
B=k[O[j]];if(!(U&&l.cmpPos(B.head,U)>0)){var
|
|
Q=g(c,B.head);U=Q.from,c.replaceRange(w(Q.word),Q.from,Q.to)}}})}u.smartBackspace=function(c){if(c.somethingSelected())return
|
|
l.Pass;c.operation(function(){for(var
|
|
w=c.listSelections(),k=c.getOption("indentUnit"),O=w.length-1;O>=0;O--){var
|
|
|
|
L=w[O].head,j=c.getRange({line:L.line,ch:0},L),B=l.countColumn(j,null,c.getOption("tabSize")),U=c.findPosH(L,-1,"char",!1);if(j&&!/\S/.test(j)&&B%k==0){var
|
|
Q=new
|
|
h(L.line,l.findColumn(j,B-k,k));Q.ch!=L.ch&&(U=Q)}c.replaceRange("",U,L,"+delete")}})},u.delLineRight=function(c){c.operation(function(){for(var
|
|
|
|
w=c.listSelections(),k=w.length-1;k>=0;k--)c.replaceRange("",w[k].anchor,h(w[k].to().line),"+delete");c.scrollIntoView()})},u.upcaseAtCursor=function(c){I(c,function(w){return
|
|
|
|
w.toUpperCase()})},u.downcaseAtCursor=function(c){I(c,function(w){return
|
|
|
|
w.toLowerCase()})},u.setSublimeMark=function(c){c.state.sublimeMark&&c.state.sublimeMark.clear(),c.state.sublimeMark=c.setBookmark(c.getCursor())},u.selectToSublimeMark=function(c){var
|
|
|
|
w=c.state.sublimeMark&&c.state.sublimeMark.find();w&&c.setSelection(c.getCursor(),w)},u.deleteToSublimeMark=function(c){var
|
|
w=c.state.sublimeMark&&c.state.sublimeMark.find();if(w){var
|
|
k=c.getCursor(),O=w;if(l.cmpPos(k,O)>0){var
|
|
L=O;O=k,k=L}c.state.sublimeKilled=c.getRange(k,O),c.replaceRange("",k,O)}},u.swapWithSublimeMark=function(c){var
|
|
|
|
w=c.state.sublimeMark&&c.state.sublimeMark.find();w&&(c.state.sublimeMark.clear(),c.state.sublimeMark=c.setBookmark(c.getCursor()),c.setCursor(w))},u.sublimeYank=function(c){c.state.sublimeKilled!=null&&c.replaceSelection(c.state.sublimeKilled,null,"paste")},u.showInCenter=function(c){var
|
|
|
|
w=c.cursorCoords(null,"local");c.scrollTo(null,(w.top+w.bottom)/2-c.getScrollInfo().clientHeight/2)};function
|
|
W(c){var
|
|
w=c.getCursor("from"),k=c.getCursor("to");if(l.cmpPos(w,k)==0){var
|
|
O=g(c,w);if(!O.word)return;w=O.from,k=O.to}return{from:w,to:k,query:c.getRange(w,k),word:O}}function
|
|
N(c,w){var k=W(c);if(!!k){var
|
|
O=k.query,L=c.getSearchCursor(O,w?k.to:k.from);(w?L.findNext():L.findPrevious())?c.setSelection(L.from(),L.to()):(L=c.getSearchCursor(O,w?h(c.firstLine(),0):c.clipPos(h(c.lastLine()))),(w?L.findNext():L.findPrevious())?c.setSelection(L.from(),L.to()):k.word&&c.setSelection(k.from,k.to))}}u.findUnder=function(c){N(c,!0)},u.findUnderPrevious=function(c){N(c,!1)},u.findAllUnder=function(c){var
|
|
w=W(c);if(!!w){for(var
|
|
k=c.getSearchCursor(w.query),O=[],L=-1;k.findNext();)O.push({anchor:k.from(),head:k.to()}),k.from().line<=w.from.line&&k.from().ch<=w.from.ch&&L++;c.setSelections(O,L)}};var
|
|
|
|
T=l.keyMap;T.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K
|
|
Cmd-D":"skipAndSelectNextOccurrence","Cmd-K
|
|
Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K
|
|
Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K
|
|
Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K
|
|
Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K
|
|
Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K
|
|
Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K
|
|
Cmd-0":"unfoldAll","Cmd-K
|
|
Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},l.normalizeKeyMap(T.macSublime),T.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K
|
|
Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K
|
|
Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K
|
|
Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K
|
|
Ctrl-A":"selectToSublimeMark","Ctrl-K
|
|
Ctrl-W":"deleteToSublimeMark","Ctrl-K
|
|
Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K
|
|
Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K
|
|
Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K
|
|
Ctrl-0":"unfoldAll","Ctrl-K
|
|
Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},l.normalizeKeyMap(T.pcSublime);var
|
|
|
|
E=T.default==T.macDefault;T.sublime=E?T.macSublime:T.pcSublime})}(),function(o,a){(function(l){l(ct.exports)})(function(l){var
|
|
u={},h=/[^\s\u00a0]/,p=l.Pos,S=l.cmpPos;function b(y){var
|
|
A=y.search(h);return
|
|
A==-1?0:A}l.commands.toggleComment=function(y){y.toggleComment()},l.defineExtension("toggleComment",function(y){y||(y=u);for(var
|
|
|
|
A=this,m=1/0,_=this.listSelections(),R=null,I=_.length-1;I>=0;I--){var
|
|
|
|
W=_[I].from(),N=_[I].to();W.line>=m||(N.line>=m&&(N=p(m,0)),m=W.line,R==null?A.uncomment(W,N,y)?R="un":(A.lineComment(W,N,y),R="line"):R=="un"?A.uncomment(W,N,y):A.lineComment(W,N,y))}});function
|
|
|
|
g(y,A,m){return/\bstring\b/.test(y.getTokenTypeAt(p(A.line,0)))&&!/^[\'\"\`]/.test(m)}function
|
|
x(y,A){var m=y.getMode();return
|
|
m.useInnerComments===!1||!m.innerMode?m:y.getModeAt(A)}l.defineExtension("lineComment",function(y,A,m){m||(m=u);var
|
|
_=this,R=x(_,y),I=_.getLine(y.line);if(!(I==null||g(_,y,I))){var
|
|
W=m.lineComment||R.lineComment;if(!W){(m.blockCommentStart||R.blockCommentStart)&&(m.fullLines=!0,_.blockComment(y,A,m));return}var
|
|
|
|
N=Math.min(A.ch!=0||A.line==y.line?A.line+1:A.line,_.lastLine()+1),T=m.padding==null?"
|
|
|
|
":m.padding,E=m.commentBlankLines||y.line==A.line;_.operation(function(){if(m.indent){for(var
|
|
c=null,w=y.line;w<n;++w){var k="_.getLine(w),O=k.slice(0,b(k));(c==null||c.length">O.length)&&(c=O)}for(var w=y.line;w<n;++w){var k="_.getLine(w),L=c.length;!E&&!h.test(k)||(k.slice(0,L)!=c&&(L=b(k)),_.replaceRange(c+W+T,p(w,0),p(w,L)))}}else" for(var="" w="y.line;w<N;++w)(E||h.test(_.getLine(w)))&&_.replaceRange(W+T,p(w,0))})}}),l.defineExtension("blockComment",function(y,A,m){m||(m=u);var" _="this,R=x(_,y),I=m.blockCommentStart||R.blockCommentStart,W=m.blockCommentEnd||R.blockCommentEnd;if(!I||!W){(m.lineComment||R.lineComment)&&m.fullLines!=!1&&_.lineComment(y,A,m);return}if(!/\bcomment\b/.test(_.getTokenTypeAt(p(y.line,0)))){var" n="Math.min(A.line,_.lastLine());N!=y.line&&A.ch==0&&h.test(_.getLine(N))&&--N;var" t="m.padding==null?"" ":m.padding;y.line="">N||_.operation(function(){if(m.fullLines!=!1){var
|
|
|
|
E=h.test(_.getLine(N));_.replaceRange(T+W,p(N)),_.replaceRange(I+T,p(y.line,0));var
|
|
c=m.blockCommentLead||R.blockCommentLead;if(c!=null)for(var
|
|
w=y.line+1;w<=N;++w)(w!=N||E)&&_.replaceRange(c+T,p(w,0))}else{var
|
|
|
|
k=S(_.getCursor("to"),A)==0,O=!_.somethingSelected();_.replaceRange(W,A),k&&_.setSelection(O?A:_.getCursor("from"),A),_.replaceRange(I,y)}})}}),l.defineExtension("uncomment",function(y,A,m){m||(m=u);var
|
|
|
|
_=this,R=x(_,y),I=Math.min(A.ch!=0||A.line==y.line?A.line:A.line-1,_.lastLine()),W=Math.min(y.line,I),N=m.lineComment||R.lineComment,T=[],E=m.padding==null?"
|
|
":m.padding,c;e:{if(!N)break e;for(var w=W;w<=I;++w){var
|
|
k=_.getLine(w),O=k.indexOf(N);if(O>-1&&!/comment/.test(_.getTokenTypeAt(p(w,O+1)))&&(O=-1),O==-1&&h.test(k)||O>-1&&h.test(k.slice(0,O)))break
|
|
e;T.push(k)}if(_.operation(function(){for(var V=W;V<=I;++V){var
|
|
pe=T[V-W],Ne=pe.indexOf(N),Ke=Ne+N.length;Ne<0||(pe.slice(Ke,Ke+E.length)==E&&(Ke+=E.length),c=!0,_.replaceRange("",p(V,Ne),p(V,Ke)))}}),c)return!0}var
|
|
|
|
L=m.blockCommentStart||R.blockCommentStart,j=m.blockCommentEnd||R.blockCommentEnd;if(!L||!j)return!1;var
|
|
|
|
B=m.blockCommentLead||R.blockCommentLead,U=_.getLine(W),Q=U.indexOf(L);if(Q==-1)return!1;var
|
|
|
|
X=I==W?U:_.getLine(I),D=X.indexOf(j,I==W?Q+L.length:0),z=p(W,Q+1),te=p(I,D+1);if(D==-1||!/comment/.test(_.getTokenTypeAt(z))||!/comment/.test(_.getTokenTypeAt(te))||_.getRange(z,te,`
|
|
`).indexOf(j)>-1)return!1;var
|
|
|
|
ue=U.lastIndexOf(L,y.ch),de=ue==-1?-1:U.slice(0,y.ch).indexOf(j,ue+L.length);if(ue!=-1&&de!=-1&&de+j.length!=y.ch)return!1;de=X.indexOf(j,A.ch);var
|
|
Me=X.slice(A.ch).lastIndexOf(L,de-A.ch);return
|
|
ue=de==-1||Me==-1?-1:A.ch+Me,de!=-1&&ue!=-1&&ue!=A.ch?!1:(_.operation(function(){_.replaceRange("",p(I,D-(E&&X.slice(D-E.length,D)==E?E.length:0)),p(I,D+j.length));var
|
|
|
|
V=Q+L.length;if(E&&U.slice(V,V+E.length)==E&&(V+=E.length),_.replaceRange("",p(W,Q),p(W,V)),B)for(var
|
|
pe=W+1;pe<=I;++pe){var
|
|
Ne=_.getLine(pe),Ke=Ne.indexOf(B);if(!(Ke==-1||h.test(Ne.slice(0,Ke)))){var
|
|
|
|
je=Ke+B.length;E&&Ne.slice(je,je+E.length)==E&&(je+=E.length),_.replaceRange("",p(pe,Ke),p(pe,je))}}}),!0)})})}(),function(o,a){(function(l){l(ct.exports)})(function(l){var
|
|
|
|
u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},h=l.Pos;l.defineOption("autoCloseBrackets",!1,function(N,T,E){E&&E!=l.Init&&(N.removeKeyMap(S),N.state.closeBrackets=null),T&&(b(p(T,"pairs")),N.state.closeBrackets=T,N.addKeyMap(S))});function
|
|
p(N,T){return T=="pairs"&&typeof N=="string"?N:typeof
|
|
N=="object"&&N[T]!=null?N[T]:u[T]}var
|
|
S={Backspace:y,Enter:A};function b(N){for(var T=0;T<n.length;t++){var e="N.charAt(T),c="'"+E+"'";S[c]||(S[c]=g(E))}}b(u.pairs+"`");function" g(n){return="" function(t){return="" r(t,n)}}function="" x(n){var="" t="N.state.closeBrackets;if(!T||T.override)return" t;var="" e.closebrackets||t}function="" y(n){var="" l.pass;for(var="" l.pass;var="" k="I(N,c[w].head);if(!k||E.indexOf(k)%2!=0)return" l.pass}for(var="" w="c.length-1;w">=0;w--){var
|
|
|
|
O=c[w].head;N.replaceRange("",h(O.line,O.ch-1),h(O.line,O.ch+1),"+delete")}}function
|
|
A(N){var
|
|
T=x(N),E=T&&p(T,"explode");if(!E||N.getOption("disableInput"))return
|
|
l.Pass;for(var c=N.listSelections(),w=0;w<c.length;w++){if(!c[w].empty())return l.pass;var="" k="I(N,c[w].head);if(!k||E.indexOf(k)%2!=0)return" l.pass}n.operation(function(){var="" o="N.lineSeparator()||`" `;n.replaceselection(o+o,null),m(n,-1),c="N.listSelections();for(var" l="0;L<c.length;L++){var" j="c[L].head.line;N.indentLine(j,null,!0),N.indentLine(j+1,null,!0)}})}function" m(n,t){for(var="" e="[],c=N.listSelections(),w=0,k=0;k<c.length;k++){var">0?{line:O.head.line,ch:O.head.ch+T}:{line:O.head.line-1};E.push({anchor:L,head:L})}N.setSelections(E,w)}function
|
|
_(N){var T=l.cmpPos(N.anchor,N.head)>0;return{anchor:new
|
|
h(N.anchor.line,N.anchor.ch+(T?-1:1)),head:new
|
|
h(N.head.line,N.head.ch+(T?1:-1))}}function R(N,T){var
|
|
E=x(N);if(!E||N.getOption("disableInput"))return l.Pass;var
|
|
c=p(E,"pairs"),w=c.indexOf(T);if(w==-1)return l.Pass;for(var
|
|
k=p(E,"closeBefore"),O=p(E,"triples"),L=c.charAt(w+1)==T,j=N.listSelections(),B=w%2==0,U,Q=0;Q<j.length;q++){var x="j[Q],D=X.head,z,te=N.getRange(D,h(D.line,D.ch+1));if(B&&!X.empty())z="surround";else" if((l||!b)&&te="=T)L&&W(N,D)?z="both":O.indexOf(T)">=0&&N.getRange(D,h(D.line,D.ch+3))==T+T+T?z="skipThree":z="skip";else
|
|
|
|
if(L&&D.ch>1&&O.indexOf(T)>=0&&N.getRange(h(D.line,D.ch-2),D)==T+T){if(D.ch>2&&/\bstring/.test(N.getTokenTypeAt(h(D.line,D.ch-2))))return
|
|
l.Pass;z="addFour"}else if(L){var ue=D.ch==0?"
|
|
":N.getRange(h(D.line,D.ch-1),D);if(!l.isWordChar(te)&&ue!=T&&!l.isWordChar(ue))z="both";else
|
|
return l.Pass}else
|
|
if(B&&(te.length===0||/\s/.test(te)||k.indexOf(te)>-1))z="both";else
|
|
return l.Pass;if(!U)U=z;else if(U!=z)return l.Pass}var
|
|
de=w%2?c.charAt(w-1):T,Me=w%2?T:c.charAt(w+1);N.operation(function(){if(U=="skip")m(N,1);else
|
|
if(U=="skipThree")m(N,3);else if(U=="surround"){for(var
|
|
V=N.getSelections(),pe=0;pe<v.length;pe++)v[pe]=de+v[pe]+me;n.replaceselections(v,"around"),v=n.listselections().slice();for(var pe="0;pe<V.length;pe++)V[pe]=_(V[pe]);N.setSelections(V)}else" u="="both"?(N.replaceSelection(de+Me,null),N.triggerElectric(de+Me),m(N,-1)):U=="addFour"&&(N.replaceSelection(de+de+de+de,"before"),m(N,1))})}function" i(n,t){var="" e="N.getRange(h(T.line,T.ch-1),h(T.line,T.ch+1));return" e.length="=2?E:null}function" w(n,t){var="" hc="{exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){var" h(t,e){return="" t.line-e.line||t.ch-e.ch}var="" p="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD" ,s="p+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",b=new" regexp("<(="" ?)(["+p+"]["+s+"]*)","g");function="" g(t,e,c,w){this.line="E,this.ch=c,this.cm=T,this.text=T.getLine(E),this.min=w?Math.max(w.from,T.firstLine()):T.firstLine(),this.max=w?Math.min(w.to-1,T.lastLine()):T.lastLine()}function" x(t,e){var="" c="T.cm.getTokenTypeAt(u(T.line,E));return" c&&="" \btag\b="" .test(c)}function="" y(t){if(!(t.line="">=T.max))return
|
|
T.ch=0,T.text=T.cm.getLine(++T.line),!0}function
|
|
A(T){if(!(T.line<=T.min))return
|
|
T.text=T.cm.getLine(--T.line),T.ch=T.text.length,!0}function
|
|
m(T){for(;;){var
|
|
E=T.text.indexOf(">",T.ch);if(E==-1){if(y(T))continue;return}if(!x(T,E+1)){T.ch=E+1;continue}var
|
|
|
|
c=T.text.lastIndexOf("/",E),w=c>-1&&!/\S/.test(T.text.slice(c+1,E));return
|
|
T.ch=E+1,w?"selfClose":"regular"}}function _(T){for(;;){var
|
|
E=T.ch?T.text.lastIndexOf("<",T.ch-1):-1;if(E==-1){if(A(T))continue;return}if(!x(T,E+1)){T.ch=E;continue}b.lastIndex=E,T.ch=E;var
|
|
c=b.exec(T.text);if(c&&c.index==E)return c}}function
|
|
R(T){for(;;){b.lastIndex=T.ch;var
|
|
E=b.exec(T.text);if(!E){if(y(T))continue;return}if(!x(T,E.index+1)){T.ch=E.index+1;continue}return
|
|
T.ch=E.index+E[0].length,E}}function I(T){for(;;){var
|
|
E=T.ch?T.text.lastIndexOf(">",T.ch-1):-1;if(E==-1){if(A(T))continue;return}if(!x(T,E+1)){T.ch=E;continue}var
|
|
|
|
c=T.text.lastIndexOf("/",E),w=c>-1&&!/\S/.test(T.text.slice(c+1,E));return
|
|
T.ch=E+1,w?"selfClose":"regular"}}function W(T,E){for(var c=[];;){var
|
|
w=R(T),k,O=T.line,L=T.ch-(w?w[0].length:0);if(!w||!(k=m(T)))return;if(k!="selfClose")if(w[1]){for(var
|
|
|
|
j=c.length-1;j>=0;--j)if(c[j]==w[2]){c.length=j;break}if(j<0&&(!E||E==w[2]))return{tag:w[2],from:u(O,L),to:u(T.line,T.ch)}}else
|
|
c.push(w[2])}}function N(T,E){for(var c=[];;){var
|
|
w=I(T);if(!w)return;if(w=="selfClose"){_(T);continue}var
|
|
k=T.line,O=T.ch,L=_(T);if(!L)return;if(L[1])c.push(L[2]);else{for(var
|
|
j=c.length-1;j>=0;--j)if(c[j]==L[2]){c.length=j;break}if(j<0&&(!E||E==L[2]))return{tag:L[2],from:u(T.line,T.ch),to:u(k,O)}}}}l.registerHelper("fold","xml",function(T,E){for(var
|
|
c=new g(T,E.line,0);;){var w=R(c);if(!w||c.line!=E.line)return;var
|
|
k=m(c);if(!k)return;if(!w[1]&&k!="selfClose"){var
|
|
O=u(c.line,c.ch),L=W(c,w[2]);return
|
|
L&&h(L.from,O)>0?{from:O,to:L.from}:null}}}),l.findMatchingTag=function(T,E,c){var
|
|
w=new
|
|
g(T,E.line,E.ch,c);if(!(w.text.indexOf(">")==-1&&w.text.indexOf("<")==-1)){var
|
|
|
|
k=m(w),O=k&&u(w.line,w.ch),L=k&&_(w);if(!(!k||!L||h(w,E)>0)){var
|
|
j={from:u(w.line,w.ch),to:O,tag:L[2]};return
|
|
k=="selfClose"?{open:j,close:null,at:"open"}:L[1]?{open:N(w,L[2]),close:j,at:"close"}:(w=new
|
|
|
|
g(T,O.line,O.ch,c),{open:j,close:W(w,L[2]),at:"open"})}}},l.findEnclosingTag=function(T,E,c,w){for(var
|
|
k=new g(T,E.line,E.ch,c);;){var O=N(k,w);if(!O)break;var L=new
|
|
g(T,E.line,E.ch,c),j=W(L,O.tag);if(j)return{open:O,close:j}}},l.scanForClosingTag=function(T,E,c,w){var
|
|
k=new g(T,E.line,E.ch,w?{from:0,to:w}:null);return
|
|
W(k,c)}})})(),function(o,a){(function(l){l(ct.exports,Hc.exports)})(function(l){l.defineOption("autoCloseTags",!1,function(y,A,m){if(m!=l.Init&&m&&y.removeKeyMap("autoCloseTags"),!!A){var
|
|
_={name:"autoCloseTags"};(typeof
|
|
A!="object"||A.whenClosing!==!1)&&(_["'/'"]=function(R){return
|
|
b(R)}),(typeof
|
|
A!="object"||A.whenOpening!==!1)&&(_["'>'"]=function(R){return
|
|
p(R)}),y.addKeyMap(_)}});var
|
|
u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function
|
|
p(y){if(y.getOption("disableInput"))return l.Pass;for(var
|
|
A=y.listSelections(),m=[],_=y.getOption("autoCloseTags"),R=0;R<a.length;r++){if(!a[r].empty())return l.pass;var="" i="A[R].head,W=y.getTokenAt(I),N=l.innerMode(y.getMode(),W.state),T=N.state,E=N.mode.xmlCurrentTag&&N.mode.xmlCurrentTag(T),c=E&&E.name;if(!c)return" w="N.mode.configuration=="html",k=typeof" _="="object"&&_.dontCloseTags||w&&u,O=typeof">I.ch&&(c=c.slice(0,c.length-W.end+I.ch));var
|
|
|
|
L=c.toLowerCase();if(!c||W.type=="string"&&(W.end!=I.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&E.close||W.string.indexOf("/")==I.ch-W.start-1||k&&g(k,L)>-1||x(y,N.mode.xmlCurrentContext&&N.mode.xmlCurrentContext(T)||[],c,I,!0))return
|
|
l.Pass;var j=typeof
|
|
_=="object"&&_.emptyTags;if(j&&g(j,c)>-1){m[R]={text:"/>",newPos:l.Pos(I.line,I.ch+2)};continue}var
|
|
B=O&&g(O,L)>-1;m[R]={indent:B,text:">"+(B?`
|
|
|
|
`:"")+"<!--"+c+"-->",newPos:B?l.Pos(I.line+1,0):l.Pos(I.line,I.ch+1)}}for(var
|
|
U=typeof
|
|
_=="object"&&_.dontIndentOnAutoClose,R=A.length-1;R>=0;R--){var
|
|
Q=m[R];y.replaceRange(Q.text,A[R].head,A[R].anchor,"+insert");var
|
|
X=y.listSelections().slice(0);X[R]={head:Q.newPos,anchor:Q.newPos},y.setSelections(X),!U&&Q.indent&&(y.indentLine(Q.newPos.line,null,!0),y.indentLine(Q.newPos.line+1,null,!0))}}function
|
|
S(y,A){for(var m=y.listSelections(),_=[],R=A?"/":"<!--",I=y.getOption("autoCloseTags"),W=typeof I=="object"&&I.dontIndentOnSlash,N=0;N<m.length;N++){if(!m[N].empty())return l.Pass;var T=m[N].head,E=y.getTokenAt(T),c=l.innerMode(y.getMode(),E.state),w=c.state;if(A&&(E.type=="string"||E.string.charAt(0)!="<"||E.start!=T.ch-1))return l.Pass;var k,O=c.mode.name!="xml"&&y.getMode().name=="htmlmixed";if(O&&c.mode.name=="javascript")k=R+"script";else if(O&&c.mode.name=="css")k=R+"style";else{var L=c.mode.xmlCurrentContext&&c.mode.xmlCurrentContext(w),j=L.length?L[L.length-1]:"";if(!L||L.length&&x(y,L,j,T))return l.Pass;k=R+j}y.getLine(T.line).charAt(E.end)!="-->"&&(k+=">"),_[N]=k}if(y.replaceSelections(_),m=y.listSelections(),!W)for(var N=0;N<m.length;n++)(n==m.length-1||m[n].head.line<m[n+1].head.line)&&y.indentline(m[n].head.line)}function b(y){return="" y.getoption("disableinput")?l.pass:s(y,!0)}l.commands.closetag="function(y){return" s(y)};function="" g(y,a){if(y.indexof)return="" y.indexof(a);for(var="" m="0,_=y.length;m<_;++m)if(y[m]==A)return" m;return-1}function="" x(y,a,m,_,r){if(!l.scanforclosingtag)return!1;var="" i="Math.min(y.lastLine()+1,_.line+500),W=l.scanForClosingTag(y,_,null,I);if(!W||W.tag!=m)return!1;for(var" n="R?1:0,T=A.length-1;T">=0&&A[T]==m;T--)++N;_=W.to;for(var T=1;T<n;t++){var e="l.scanForClosingTag(y,_,null,I);if(!E||E.tag!=m)return!1;_=E.to}return!0}})}(),function(o,a){(function(l){l(ct.exports)})(function(l){var" u="CodeMirror-activeline" ,h="CodeMirror-activeline-background" ,p="CodeMirror-activeline-gutter" ;l.defineoption("styleactiveline",!1,function(y,a,m){var="" _="m==l.Init?!1:m;A!=_&&(_&&(y.off("beforeSelectionChange",x),S(y),delete" y.state.activelines),a&&(y.state.activelines="[],g(y,y.listSelections()),y.on("beforeSelectionChange",x)))});function" s(y){for(var="" a="0;A<y.state.activeLines.length;A++)y.removeLineClass(y.state.activeLines[A],"wrap",u),y.removeLineClass(y.state.activeLines[A],"background",h),y.removeLineClass(y.state.activeLines[A],"gutter",p)}function" b(y,a){if(y.length!="A.length)return!1;for(var" m="0;m<y.length;m++)if(y[m]!=A[m])return!1;return!0}function" g(y,a){for(var="" r="A[_],I=y.getOption("styleActiveLine");if(!(typeof" i="="object"&&I.nonEmpty?R.anchor.line!=R.head.line:!R.empty())){var" w="y.getLineHandleVisualStart(R.head.line);m[m.length-1]!=W&&m.push(W)}}b(y.state.activeLines,m)||y.operation(function(){S(y);for(var" n="0;N<m.length;N++)y.addLineClass(m[N],"wrap",u),y.addLineClass(m[N],"background",h),y.addLineClass(m[N],"gutter",p);y.state.activeLines=m})}function" x(y,a){g(y,a.ranges)}})}();var="" wc="{exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){function" u(p,s,b){var="" g="p.getWrapperElement(),x;return" x="g.appendChild(document.createElement("div")),b?x.className="CodeMirror-dialog" codemirror-dialog-bottom":x.classname="CodeMirror-dialog CodeMirror-dialog-top" ,typeof="" s="="string"?x.innerHTML=S:x.appendChild(S),l.addClass(g,"dialog-opened"),x}function" h(p,s){p.state.currentnotificationclose&&p.state.currentnotificationclose(),p.state.currentnotificationclose="S}l.defineExtension("openDialog",function(p,S,b){b||(b={}),h(this,null);var" a(r){if(typeof="" m?(m.focus(),b.value&&(m.value="b.value,b.selectValueOnOpen!==!1&&m.select()),b.onInput&&l.on(m,"input",function(R){b.onInput(R,m.value,A)}),b.onKeyUp&&l.on(m,"keyup",function(R){b.onKeyUp(R,m.value,A)}),l.on(m,"keydown",function(R){b&&b.onKeyDown&&b.onKeyDown(R,m.value,A)||((R.keyCode==27||b.closeOnEnter!==!1&&R.keyCode==13)&&(m.blur(),l.e_stop(R),A()),R.keyCode==13&&S(m.value,R))}),b.closeOnBlur!==!1&&l.on(g,"focusout",function(R){R.relatedTarget!==null&&A()})):(_=g.getElementsByTagName("button")[0])&&(l.on(_,"click",function(){A(),y.focus()}),b.closeOnBlur!==!1&&l.on(_,"blur",A),_.focus()),A}),l.defineExtension("openConfirm",function(p,S,b){h(this,null);var" _(){y||(y="!0,l.rmClass(g.parentNode,"dialog-opened"),g.parentNode.removeChild(g),A.focus())}x[0].focus();for(var" b="u(this,p,S&&S.bottom),g=!1,x,y=S&&typeof" s.duration!="undefined" ?s.duration:5e3;function="" a(){g||(g="!0,clearTimeout(x),l.rmClass(b.parentNode,"dialog-opened"),b.parentNode.removeChild(b))}return" l.on(b,"click",function(m){l.e_preventdefault(m),a()}),y&&(x="setTimeout(A,y)),A})})})(),function(o,a){(function(l){l(ct.exports,Fa.exports,Wc.exports)})(function(l){l.defineOption("search",{bottom:!1});function" u(l,j){return="" typeof="" l="="string"?L=new" regexp(l.replace(="" [\-\[\]\="" \{\}\(\)\*\+\?\.\\\^\$\|]="" g,"\\$&"),j?"gi":"g"):l.global||(l="new" regexp(l.source,l.ignorecase?"gi":"g")),{token:function(b){l.lastindex="B.pos;var" b.pos+="U[0].length||1,"searching";U?B.pos=U.index:B.skipToEnd()}}}function" h(){this.posfrom="this.posTo=this.lastQuery=this.query=null,this.overlay=null}function" p(l){return="" l.state.search||(l.state.search="new" h)}function="" s(l){return="" b(l,j,b){return="" l.getsearchcursor(j,b,{casefold:s(j),multiline:!0})}function="" g(l,j,b,u,q){l.opendialog(j,u,{value:b,selectvalueonopen:!0,closeonenter:!1,onclose:function(){w(l)},onkeydown:q,bottom:l.options.search.bottom})}function="" x(l,j,b,u,q){l.opendialog?l.opendialog(j,q,{value:u,selectvalueonopen:!0,bottom:l.options.search.bottom}):q(prompt(b,u))}function="" y(l,j,b,u){l.openconfirm?l.openconfirm(j,u):confirm(b)&&u[0]()}function="" a(l){return="" l.replace(="" \\([nrt\\])="" g,function(j,b){return="" `:b="="r"?"\r":B=="t"?"" ":b="="\\"?"\\":j})}function" m(l){var="" j="L.match(/^\/(.*)\/([a-z]*)$/);if(j)try{L=new" regexp(j[1],j[2].indexof("i")="=-1?"":"i")}catch(B){}else" _(l,j,b){j.querytext="B,j.query=m(B),L.removeOverlay(j.overlay,S(j.query)),j.overlay=u(j.query,S(j.query)),L.addOverlay(j.overlay),L.showMatchesOnScrollbar&&(j.annotate&&(j.annotate.clear(),j.annotate=null),j.annotate=L.showMatchesOnScrollbar(j.query,S(j.query)))}function" r(l,j,b,u){var="" q="p(L);if(Q.query)return" i(l,j);var="" instanceof="" regexp&&x.source="="x^"&&(X=null),B&&L.openDialog){var" d="null,z=function(te,ue){l.e_stop(ue),!!te&&(te!=Q.queryText&&(_(L,Q,te),Q.posFrom=Q.posTo=L.getCursor()),D&&(D.style.opacity=1),I(L,ue.shiftKey,function(de,Me){var" v;me.line<3&&document.queryselector&&(v="L.display.wrapper.querySelector(".CodeMirror-dialog"))&&V.getBoundingClientRect().bottom-4">L.cursorCoords(Me,"window").top&&((D=V).style.opacity=.4)}))};g(L,T(L),X,z,function(te,ue){var
|
|
|
|
de=l.keyName(te),Me=L.getOption("extraKeys"),V=Me&&Me[de]||l.keyMap[L.getOption("keyMap")][de];V=="findNext"||V=="findPrev"||V=="findPersistentNext"||V=="findPersistentPrev"?(l.e_stop(te),_(L,p(L),ue),L.execCommand(V)):(V=="find"||V=="findPersistent")&&(l.e_stop(te),z(ue,te))}),U&&X&&(_(L,Q,X),I(L,j))}else
|
|
x(L,T(L),"Search
|
|
for:",X,function(te){te&&!Q.query&&L.operation(function(){_(L,Q,te),Q.posFrom=Q.posTo=L.getCursor(),I(L,j)})})}function
|
|
I(L,j,B){L.operation(function(){var
|
|
U=p(L),Q=b(L,U.query,j?U.posFrom:U.posTo);!Q.find(j)&&(Q=b(L,U.query,j?l.Pos(L.lastLine()):l.Pos(L.firstLine(),0)),!Q.find(j))||(L.setSelection(Q.from(),Q.to()),L.scrollIntoView({from:Q.from(),to:Q.to()},20),U.posFrom=Q.from(),U.posTo=Q.to(),B&&B(Q.from(),Q.to()))})}function
|
|
W(L){L.operation(function(){var
|
|
j=p(L);j.lastQuery=j.query,!!j.query&&(j.query=j.queryText=null,L.removeOverlay(j.overlay),j.annotate&&(j.annotate.clear(),j.annotate=null))})}function
|
|
N(L,j){var
|
|
B=L?document.createElement(L):document.createDocumentFragment();for(var U
|
|
in j)B[U]=j[U];for(var Q=2;Q<arguments.length;q++){var x="arguments[Q];B.appendChild(typeof" b}function="" t(l){return="" n("",null,n("span",{classname:"codemirror-search-label"},l.phrase("search:")),"="" ",n("input",{type:"text",style:"width:="" 10em",classname:"codemirror-search-field"}),"="" ",n("span",{style:"color:="" #888",classname:"codemirror-search-hint"},l.phrase("(use="" re="" syntax="" for="" regexp="" search)")))}function="" e(l){return="" n("",null,"="" c(l){return="" n("",null,n("span",{classname:"codemirror-search-label"},l.phrase("with:")),"="" 10em",classname:"codemirror-search-field"}))}function="" w(l){return="" n("",null,n("span",{classname:"codemirror-search-label"},l.phrase("replace?")),"="" ",n("button",{},l.phrase("yes")),"="" ",n("button",{},l.phrase("no")),"="" ",n("button",{},l.phrase("all")),"="" ",n("button",{},l.phrase("stop")))}function="" k(l,j,b){l.operation(function(){for(var="" u="b(L,j);U.findNext();)if(typeof" j!="string" ){var="" q="L.getRange(U.from(),U.to()).match(j);U.replace(B.replace(/\$(\d)/g,function(X,D){return" q[d]}))}else="" u.replace(b)})}function="" o(l,j){if(!l.getoption("readonly")){var="" b="L.getSelection()||p(L).lastQuery,U=j?L.phrase("Replace" all:"):l.phrase("replace:"),q="N("",null,N("span",{className:"CodeMirror-search-label"},U),E(L));x(L,Q,U,B,function(X){!X||(X=m(X),x(L,c(L),L.phrase("Replace" with:"),"",function(d){if(d="A(D),j)k(L,X,D);else{W(L);var" z="b(L,X,L.getCursor("from")),te=function(){var" de="z.from(),Me;!(Me=z.findNext())&&(z=b(L,X),!(Me=z.findNext())||de&&z.from().line==de.line&&z.from().ch==de.ch)||(L.setSelection(z.from(),z.to()),L.scrollIntoView({from:z.from(),to:z.to()}),y(L,w(L),L.phrase("Replace?"),[function(){ue(Me)},te,function(){k(L,X,D)}]))},ue=function(de){z.replace(typeof" de[v]})),te()};te()}}))})}}l.commands.find="function(L){W(L),R(L)},l.commands.findPersistent=function(L){W(L),R(L,!1,!0)},l.commands.findPersistentNext=function(L){R(L,!1,!0,!0)},l.commands.findPersistentPrev=function(L){R(L,!0,!0,!0)},l.commands.findNext=R,l.commands.findPrev=function(L){R(L,!0)},l.commands.clearSearch=W,l.commands.replace=O,l.commands.replaceAll=function(L){O(L,!0)}})}();var" uc="{exports:{}};(function(o,a){(function(l){l(ct.exports)})(function(l){function" u(b,g,x,y){if(x&&x.call){var="" a="x;x=null}else" var="" g="="number"&&(g=l.Pos(g,0));var" m="S(b,x,"minFoldSize");function" _(n){var="" t="A(b,g);if(!T||T.to.line-T.from.line<m)return" null;if(y="=="fold")return" t;for(var="" e="b.findMarksAt(T.from),c=0;c<E.length;++c)if(E[c].__isFold){if(!N)return" null;t.cleared="!0,E[c].clear()}return" t}var="" r="_(!0);if(S(b,x,"scanUp"))for(;!R&&g.line">b.firstLine();)g=l.Pos(g.line-1,0),R=_(!1);if(!(!R||R.cleared||y==="unfold")){var
|
|
|
|
I=h(b,x,R);l.on(I,"mousedown",function(N){W.clear(),l.e_preventDefault(N)});var
|
|
|
|
W=b.markText(R.from,R.to,{replacedWith:I,clearOnEnter:S(b,x,"clearOnEnter"),__isFold:!0});W.on("clear",function(N,T){l.signal(b,"unfold",b,N,T)}),l.signal(b,"fold",b,R.from,R.to)}}function
|
|
h(b,g,x){var y=S(b,g,"widget");if(typeof
|
|
y=="function"&&(y=y(x.from,x.to)),typeof y=="string"){var
|
|
A=document.createTextNode(y);y=document.createElement("span"),y.appendChild(A),y.className="CodeMirror-foldmarker"}else
|
|
y&&(y=y.cloneNode(!0));return
|
|
y}l.newFoldFunction=function(b,g){return
|
|
function(x,y){u(x,y,{rangeFinder:b,widget:g})}},l.defineExtension("foldCode",function(b,g,x){u(this,b,g,x)}),l.defineExtension("isFolded",function(b){for(var
|
|
g=this.findMarksAt(b),x=0;x<g.length;++x)if(g[x].__isfold)return!0}),l.commands.togglefold=function(b){b.foldcode(b.getcursor())},l.commands.fold=function(b){b.foldcode(b.getcursor(),null,"fold")},l.commands.unfold=function(b){b.foldcode(b.getcursor(),{scanup:!1},"unfold")},l.commands.foldall=function(b){b.operation(function(){for(var g="b.firstLine(),x=b.lastLine();g<=x;g++)b.foldCode(l.Pos(g,0),{scanUp:!1},"fold")})},l.commands.unfoldAll=function(b){b.operation(function(){for(var" b="Array.prototype.slice.call(arguments,0);return" function(g,x){for(var="" y="0;y<b.length;++y){var" a="b[y](g,x);if(A)return" a}}}),l.registerhelper("fold","auto",function(b,g){for(var="" x="b.getHelpers(g,"fold"),y=0;y<x.length;y++){var" a}});var="" p="{rangeFinder:l.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};l.defineOption("foldOptions",null);function" s(b,g,x){if(g&&g[x]!="=void" 0)return="" g[x];var="" y&&y[x]!="=void" 0?y[x]:p[x]}l.defineextension("foldoption",function(b,g){return="" s(this,b,g)})})})(),function(o,a){(function(l){l(ct.exports,uc.exports)})(function(l){l.defineoption("foldgutter",!1,function(i,w,n){n&&n!="l.Init&&(I.clearGutter(I.state.foldGutter.options.gutter),I.state.foldGutter=null,I.off("gutterClick",A),I.off("changes",m),I.off("viewportChange",_),I.off("fold",R),I.off("unfold",R),I.off("swapDoc",m)),W&&(I.state.foldGutter=new" h(p(w)),y(i),i.on("gutterclick",a),i.on("changes",m),i.on("viewportchange",_),i.on("fold",r),i.on("unfold",r),i.on("swapdoc",m))});var="" u="l.Pos;function" h(i){this.options="I,this.from=this.to=0}function" p(i){return="" i="==!0&&(I={}),I.gutter==null&&(I.gutter="CodeMirror-foldgutter"),I.indicatorOpen==null&&(I.indicatorOpen="CodeMirror-foldgutter-open"),I.indicatorFolded==null&&(I.indicatorFolded="CodeMirror-foldgutter-folded"),I}function" s(i,w){for(var="" n="I.findMarks(u(W,0),u(W+1,0)),T=0;T<N.length;++T)if(N[T].__isFold){var" e="N[T].find(-1);if(E&&E.line===W)return" n[t]}}function="" b(i){if(typeof="" w="document.createElement("div");return" w.classname="I+"" codemirror-guttermarker-subtle",w}else="" return="" i.clonenode(!0)}function="" g(i,w,n){var="" t="I.state.foldGutter.options,E=W-1,c=I.foldOption(T,"minFoldSize"),w=I.foldOption(T,"rangeFinder"),k=typeof" t.indicatorfolded="="string"&&x(T.indicatorFolded),O=typeof" t.indicatoropen="="string"&&x(T.indicatorOpen);I.eachLine(W,N,function(L){++E;var" j="null,B=L.gutterMarkers;if(B&&(B=B[T.gutter]),S(I,E)){if(k&&B&&k.test(B.className))return;j=b(T.indicatorFolded)}else{var">=c){if(O&&B&&O.test(B.className))return;j=b(T.indicatorOpen)}}!j&&!B||I.setGutterMarker(L,T.gutter,j)})}function
|
|
x(I){return new RegExp("(^|\\s)"+I+"(?:$|\\s)\\s*")}function y(I){var
|
|
W=I.getViewport(),N=I.state.foldGutter;!N||(I.operation(function(){g(I,W.from,W.to)}),N.from=W.from,N.to=W.to)}function
|
|
A(I,W,N){var T=I.state.foldGutter;if(!!T){var
|
|
E=T.options;if(N==E.gutter){var
|
|
c=S(I,W);c?c.clear():I.foldCode(u(W,0),E)}}}function m(I){var
|
|
W=I.state.foldGutter;if(!!W){var
|
|
N=W.options;W.from=W.to=0,clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){y(I)},N.foldOnChangeTimeSpan||600)}}function
|
|
_(I){var W=I.state.foldGutter;if(!!W){var
|
|
N=W.options;clearTimeout(W.changeUpdate),W.changeUpdate=setTimeout(function(){var
|
|
|
|
T=I.getViewport();W.from==W.to||T.from-W.to>20||W.from-T.to>20?y(I):I.operation(function(){T.from<w.from&&(g(i,t.from,w.from),w.from=t.from),t.to>W.to&&(g(I,W.to,T.to),W.to=T.to)})},N.updateViewportTimeSpan||400)}}function
|
|
R(I,W){var N=I.state.foldGutter;if(!!N){var
|
|
T=W.line;T>=N.from&&T<n.to&&g(i,t,t+1)}}})}(),function(o,a){(function(l){l(ct.exports)})(function(l){l.registerhelper("fold","brace",function(u,h){var p="h.line,S=u.getLine(p),b;function" g(o){for(var="" l="h.ch,j=0;;){var" b="L<=0?-1:S.lastIndexOf(O,L-1);if(B==-1){if(j==1)break;j=1,L=S.length;continue}if(j==1&&B<h.ch)break;if(b=u.getTokenTypeAt(l.Pos(p,B+1)),!/^(comment|string)/.test(b))return" b+1;l="B-1}}var" x="g("{"),y=g("["),A,m,_;if(x!=null&&(y==null||y">x))_=x,A="{",m="}";else
|
|
if(y!=null)_=y,A="[",m="]";else return;var
|
|
R=1,I=u.lastLine(),W,N;e:for(var T=p;T<=I;++T)for(var
|
|
E=u.getLine(T),c=T==p?_:0;;){var
|
|
w=E.indexOf(A,c),k=E.indexOf(m,c);if(w<0&&(w=E.length),k<0&&(k=E.length),c=Math.min(w,k),c==E.length)break;if(u.getTokenTypeAt(l.Pos(T,c+1))==b){if(c==w)++R;else
|
|
if(!--R){W=T,N=c;break
|
|
e}}++c}if(!(W==null||p==W))return{from:l.Pos(p,_),to:l.Pos(W,N)}}),l.registerHelper("fold","import",function(u,h){function
|
|
p(A){if(A<u.firstline()||a>u.lastLine())return null;var
|
|
m=u.getTokenAt(l.Pos(A,1));if(/\S/.test(m.string)||(m=u.getTokenAt(l.Pos(A,m.end+1))),m.type!="keyword"||m.string!="import")return
|
|
null;for(var _=A,R=Math.min(u.lastLine(),A+10);_<=R;++_){var
|
|
I=u.getLine(_),W=I.indexOf(";");if(W!=-1)return{startCh:m.end,end:l.Pos(_,W)}}}var
|
|
|
|
S=h.line,b=p(S),g;if(!b||p(S-1)||(g=p(S-2))&&g.end.line==S-1)return
|
|
null;for(var x=b.end;;){var
|
|
y=p(x.line+1);if(y==null)break;x=y.end}return{from:u.clipPos(l.Pos(S,b.startCh+1)),to:x}}),l.registerHelper("fold","include",function(u,h){function
|
|
p(y){if(y<u.firstline()||y>u.lastLine())return null;var
|
|
A=u.getTokenAt(l.Pos(y,1));if(/\S/.test(A.string)||(A=u.getTokenAt(l.Pos(y,A.end+1))),A.type=="meta"&&A.string.slice(0,8)=="#include")return
|
|
A.start+8}var S=h.line,b=p(S);if(b==null||p(S-1)!=null)return
|
|
null;for(var g=S;;){var
|
|
x=p(g+1);if(x==null)break;++g}return{from:l.Pos(S,b+1),to:u.clipPos(l.Pos(g))}})})}(),function(o,a){(function(l){l(ct.exports)})(function(l){l.registerGlobalHelper("fold","comment",function(u){return
|
|
u.blockCommentStart&&u.blockCommentEnd},function(u,h){var
|
|
p=u.getModeAt(h),S=p.blockCommentStart,b=p.blockCommentEnd;if(!S||!b)return;for(var
|
|
g=h.line,x=u.getLine(g),y,A=h.ch,m=0;;){var
|
|
_=A<=0?-1:x.lastIndexOf(S,A-1);if(_==-1){if(m==1)return;m=1,A=x.length;continue}if(m==1&&_<h.ch)return;if( comment="" .test(u.gettokentypeat(l.pos(g,_+1)))&&(_="=0||x.slice(_-b.length,_)==b||!/comment/.test(u.getTokenTypeAt(l.Pos(g,_))))){y=_+S.length;break}A=_-1}var" r="1,I=u.lastLine(),W,N;e:for(var" t="g;T<=I;++T)for(var" e="u.getLine(T),c=T==g?y:0;;){var" w="E.indexOf(S,c),k=E.indexOf(b,c);if(w<0&&(w=E.length),k<0&&(k=E.length),c=Math.min(w,k),c==E.length)break;if(c==w)++R;else" if(!--r){w="T,N=c;break" e}++c}if(!(w="=null||g==W&&N==y))return{from:l.Pos(g,y),to:l.Pos(W,N)}})})}();var" kc="<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M985.5 465.1L759.1 238.7c-4.6-4.6-11-7.3-17.5-7.3h-27.5c-34.5 0-65.2 22.1-76 54.9l-42.7 128.9c-3.3 10 4.1 20.4 14.7 20.4h76.2c10.5 0 17.9 10.3 14.6 20.2l-30.4 91.6c-3.4 10.1-12.8 17-23.5 17h-83.1c-10.7 0-20.2 6.8-23.5 17l-61.2 184.5c-18.8 56.4-61 99.5-114.5 119.4 11.7 11.7 21.1 12 28.5 12H613c6.6 0 12.9-2.6 17.5-7.3l355.2-355.2c19.1-19.2 19.1-50.4-.2-69.7zM403.5 584.5c3.3-9.9-4.1-20.1-14.5-20.1h-74.6c-10.2 0-17.5-10-14.3-19.7l30.5-92.1c3.4-10.1 12.8-17 23.5-17H435c10.7 0 20.2-6.8 23.5-17l61.1-184.1c18.7-56.5 61-99.9 114.6-119.8-11.7-11.7-21.1-12-28.5-12H387.2c-6.6 0-12.9 2.6-17.5 7.3L14.5 465.1c-19.3 19.3-19.3 50.6 0 69.9l226.4 226.4c4.6 4.6 11 7.3 17.5 7.3h26.2c34.6 0 65.2-22.2 76.1-55l42.8-129.2z"/></svg>" ;const="" gc="btoa(Kc),pn={document:{name:"htmlmixed",lineWrapping:!0},script:{name:"javascript",statementIndent:2},ts:{name:"text/typescript",statementIndent:2},coffee:{name:"text/coffeescript",statementIndent:2},style:"css"};pn.js=pn.script,pn.html=pn.document;var" jc="(o,a)=">Le("div"+le.position("absolute").w("100%").top(o.toolbar()).left(0).bottom(0).right(0).overflow("hidden").$after(le.content("").position("absolute").top("-7vh").width("100%").height("100vh").zIndex(3).opacity(.1).pointerEvents("none").backgroundImage("url(data:image/svg+xml;base64,"+Gc+")").backgroundSize("120%
|
|
auto").backgroundRepeat("no-repeat").backgroundPosition("center
|
|
center")).$nest(".CodeMirror",le.fontFamily("Source Code Pro,
|
|
monospace").lineHeight("22px").cursor("text").w("100%").h("100%").fontSize(14)).$nest(".cm-s-material.CodeMirror,
|
|
.cm-s-material
|
|
div.CodeMirror-gutters",le.backgroundColor(o.state.color)).$nest(".CodeMirror-activeline",le.background("rgba(255,255,255,0.07)")),{oncreate:({dom:l})=>{const
|
|
|
|
u=/[{([]$/,h=/[^{}[\]()]/g,p=dn(l,{theme:o.state.theme||"material",readOnly:!o.state.editable,autoCloseBrackets:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0,lineNumbers:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],tabSize:2,viewportMargin:o.state.autoHeight?1/0:10,keyMap:"sublime",extraKeys:{"Alt-F":"findPersistent","Shift-Tab":"indentLess","Cmd-L":!1,"Cmd-M":!1,"Ctrl-L":!1,Enter:b=>{const
|
|
|
|
g=b.getCursor(),x=b.getRange({line:g.line,ch:0},g).trim(),y=u.test(x),A=!y&&u.test(x.replace(h,"")),m=jn("=>",x),_=jn(",",x);b.setOption("smartIndent",A&&!_),b.execCommand("newlineAndIndent"),b.setOption("smartIndent",!0),(m||y)&&b.execCommand("insertSoftTab")},Tab:b=>{b.somethingSelected()?b.indentSelection("add"):b.execCommand("insertSoftTab")},Backspace:b=>{const
|
|
|
|
g=b.getCursor(),x=b.getRange({line:g.line,ch:0},g);x.length%2==0&&jn("
|
|
|
|
",x)&&dn.commands.delCharBefore(b),dn.commands.delCharBefore(b)}}});p.on("gutterClick",qc),p.on("scrollCursorIntoView",(b,g)=>{g.codemirrorIgnore=!0});const
|
|
|
|
S=p.getDoc();o.refreshCm.map(()=>p.refresh()),o.focus.map(({line:b=0,column:g=0,scrollTo:x=!1}={})=>{p.setCursor(b-1,g-1),p.focus(),x&&requestAnimationFrame(()=>p.scrollIntoView({line:b,ch:g},100))}),o.selected.map(b=>{if(!b)return;const
|
|
|
|
g=b.patched||b.content||"",x=pn[Ri(b.name)]||pn[b.type]||"javascript",y=o.state.editable&&b.editable!==!1;p.setOption("lineWrapping",x.lineWrapping||!1),p.setOption("readOnly",!y),b.doc||(b.doc=dn.Doc(g,x),b.doc.ignoreCursor=!0,b.doc.on("change",(_,R)=>{R.origin!=="setValue"&&(b.doc.ignoreCursor=!0,Promise.resolve().then(()=>b.doc.ignoreCursor=!1),a.fileChange(b,b.doc.getValue(),Ba(b.doc.listSelections())))}),b.doc.on("cursorActivity",(_,R)=>{b.doc.ignoreCursor||a.fileSelectionChange(b,Ba(b.doc.listSelections()))})),b.doc.ignoreCursor=!0,Promise.resolve().then(()=>b.doc.ignoreCursor=!1),g!==b.doc.getValue()&&b.doc.setValue(g);const
|
|
|
|
A=p.getDoc()!==S||o.state.autoFocus;p.getDoc()!==b.doc&&p.swapDoc(b.doc);const
|
|
|
|
m=Xc(b.selections);m&&m.length&&(b.doc.setSelections(m),requestAnimationFrame(()=>{p.scrollIntoView(m[0].head,500)})),A&&p.focus(),!o.cmHeight&&o.state.autoHeight&&requestAnimationFrame(()=>o.cmHeight=l.querySelector(".CodeMirror-sizer").offsetHeight*(o.vertical()?2:1)+o.toolbar()*(o.vertical()?4:3))})}});function
|
|
qc(o,a,l,u){if(l==="CodeMirror-foldgutter")return;const
|
|
h=o.listSelections(),p=u.ctrlKey||u.metaKey?h:[],S=u.shiftKey&&h.length?h[0].anchor.line:a;let
|
|
b=u.shiftKey&&h.length&&S>a?a:a+1;y();const
|
|
g=function(A){const
|
|
m=o.lineAtHeight(A.clientY,"client");m!==b&&(b=m,y())},x=A=>{window.removeEventListener("mouseup",x),window.removeEventListener("mousemove",g)};window.addEventListener("mousemove",g),window.addEventListener("mouseup",x);function
|
|
|
|
y(){o.setSelections(p.concat([{anchor:dn.Pos(S,b>S?0:null),head:dn.Pos(b,0)}]),p.length,{origin:"*mouse"})}}function
|
|
Xc(o=""){return
|
|
o.split(",").map(a=>(a=a.split("-").map(l=>(l=l.split(":"),{line:parseInt(l[0])||0,ch:parseInt(l[1])||0})),{anchor:a[0],head:a[1]||a[0]}))}function
|
|
Ba(o){return
|
|
o.map(a=>a.anchor.line+":"+a.anchor.ch+(a.head&&(a.anchor.line!==a.head.line||a.anchor.ch!==a.head.ch)?"-"+a.head.line+":"+a.head.ch:"")).join(",")}var
|
|
|
|
qn=(o,a)=>Le("i"+le.w(o.size||18).h(o.size||18).display("flex").jc("center").ai("center").$nest("svg",le.w("100%").h("100%")),o,Le.trust(a)),Ha='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M784.2 355.2v-76.9c0-72.7-28.3-141.1-79.7-192.5C653.1 34.3 584.7 6 512 6S370.9 34.3 319.5 85.7c-51.4 51.4-79.7 119.8-79.7 192.5v76.9c-67.5 25-115.6 89.9-115.6 165.9v322.3c0 97.5 79.2 176.7 176.7 176.7h422.3c97.5 0 176.7-79.3 176.7-176.7V521c-.1-76-48.2-140.9-115.7-165.8zM512 90c103.8 0 188.2 84.4 188.2 188.2v66.1H323.8v-66.1C323.8 174.4 408.2 90 512 90zm302 753.3c0 50.1-40.8 90.9-90.9 90.9H300.8c-50.1 0-90.9-40.8-90.9-90.9V521c0-50.1 40.8-90.9 90.9-90.9h422.3c50.1 0 90.9 40.8 90.9 90.9v322.3z"></path></svg>',Yc=(o,a)=>Le("nav.toolbar"+le.position("relative").f("left").display("flex").c("gray").w("100%").minHeight(o.toolbar()).background("rgb(246,246,246)").fontSize(14).zi(20).boxShadow("0
|
|
1px 1px
|
|
rgba(0,0,0,0.35)").$after(le.content("").w(2).h("100%").position("absolute").right(-2).bc("inherit")),Le(".tabs"+le.display("flex").overflowX("auto").overflowY("hidden").flexGrow(1),o.state.fileTabs&&$c(o,a),o.state.linkTabs&&Qc(o,a)));function
|
|
Qc(o,a){return
|
|
o.state.links.map(l=>Wa(Le("div"+le.display("flex"),Le("a"+le.c("inherit"),{href:l.url,target:"_blank",onclick:u=>l.content&&u.preventDefault()},l.name),l.patches&&Le("span"+le.$animate("0.3s",{from:le.maxWidth(0).o(0),to:le.maxWidth(120).o(1)}).fontStyle("italic").ml(2).mt(2).fs(12),{onbeforeremove:({dom:u})=>(u.style.animation=le.$animate("0.3s",{from:le.maxWidth(120).o(1),to:le.maxWidth(0).o(0)}).style.animation,new
|
|
|
|
Promise(h=>setTimeout(h,300)))},"(modified)"),l.editable===!1&&qn({size:16,class:le.ml(6).class},Ha)),()=>l.content&&a.select(l),l===o.selected(),o))}function
|
|
$c(o,a){return
|
|
o.state.files.map(l=>Wa(Le("div"+le.display("flex"),l.name,l.editable===!1&&qn({size:16,class:le.ml(6).class},Ha)),()=>a.select(l),l===o.selected(),o))}function
|
|
Wa(o,a,l,u){return
|
|
Le(".tab"+le.display("flex").ai("center").transition("background .3s,
|
|
color
|
|
.3s").minWidth(40).maxWidth(200).cursor("pointer").flexShrink(2).$hover(le.flexShrink(0).background("#ddd").c("#333")),{style:l?le.background(u.state.color).zi(1).c("white").flexShrink(0).style:{},onclick:a},Le("span"+le.flexGrow(1).overflow("hidden").ta("center").whiteSpace("nowrap").p("0
|
|
12px"),o))}var
|
|
Ua=(o,a)=>Le("div"+le.position("absolute").w("100%").h("100%").zi(50).t(0).cursor("pointer").background("rgb(255,255,255)").transition("opacity
|
|
0.5s").$animate("0.5s",{from:le.o(0),to:le.o(1)}).boxShadow("0 0 10px
|
|
rgba(0,0,0,.35)").display("flex").jc("center").ai("center"),{onbeforeremove:l=>(l.dom.style.opacity=0,new
|
|
|
|
Promise(u=>setTimeout(u,500))),onclick:a},qn({class:le.h(28).w(28).class},o)),Zc='<svg viewBox="0 0 1024 1024"><path d="M295 590.5l-96 246.6 242.3-100.3L295 590.5zM998.5 63.8l-30.7-30.7c-33.9-34-89-34-123 0l-61.5 61.5L937 248.4l61.5-61.5c34-34 34-89.1 0-123.1zM299.9 578l22-22 153.7 153.7 430.6-430.6-153.7-153.7 30.7-30.8L299.9 578zM831 929.6l-740.5.3.1-740.5 518.5-.2 81.2-86.1H46.4c-24 0-43.5 19.4-43.5 43.5V973c0 24.1 19.5 43.5 43.5 43.5h826.4c24.1 0 43.5-19.4 43.5-43.5V361.5l-87.6 86 2.3 482.1z"></path></svg>',Jc=(o,a)=>Le(".handle"+le.position("absolute").zi(40),{style:o.vertical()?le.height(6).bottom(0).left(0).cursor("row-resize").w("100%").style:le.top(0).width("6px").right(0).cursor("col-resize").h("100%").style,onmousedown:l=>{a.startDragging(!0),window.addEventListener("mouseup",function
|
|
|
|
u(h){l.pageX===h.pageX&&l.pageY===h.pageY&&a.setMiddle(0),window.removeEventListener("mousemove",a.changeMiddle,!1),window.removeEventListener("mouseup",u,!1),a.stopDragging(!1),Le.redraw()},!1),window.addEventListener("mousemove",a.changeMiddle,!1)}}),Vc=(o,a)=>[(o.vertical()&&o.editor?o.editor.offsetHeight<=o.toolbar():o.state.middle<3)&&Ua(Zc,a.resetSize),o.state.toolbar&&Yc(o,a),jc(o,a),o.state.resizeable&&Jc(o,a)];const
|
|
|
|
Ka=(o,a)=>Le("iframe"+le.flexGrow(1).userSelect("none").minHeight(50).width("100%").h(0),{name:o.id,title:"Runtime
|
|
|
|
iframe",style:le.pointerEvents(o.dragging&&"none").style,sandbox:"allow-modals
|
|
allow-forms allow-same-origin allow-scripts
|
|
allow-popups",allow:"geolocation; microphone; camera; midi;
|
|
encrypted-media",allowfullscreen:!0,frameborder:"0",oncreate:l=>a.initIframe(l.dom)}),eh=(o,a)=>Le(".iframeScroller"+le.overflowScrolling("touch").flexGrow(1).overflowY("scroll").display("flex").fd("column").w("100%"),Ka(o,a));var
|
|
|
|
th=(o,a)=>o.iOS?eh(o,a):Ka(o,a),rh=(o,a)=>Le(".size"+le.position("absolute").fontFamily("Source
|
|
Code Pro, monospace").zi(1).fontSize(14).top(o.toolbar()+8).p("4px
|
|
8px").right(8).background("white").o(.65).transition("opacity
|
|
0.3s").$animate(".3s",{from:le.o(0),to:le.o(1)}).boxShadow("0 0 3px
|
|
rgba(0, 0, 0, .35)"),{onbeforeremove:nh},o.iframe.clientWidth," x
|
|
",o.iframe.clientHeight);function nh(o){return o.dom.style.opacity=0,new
|
|
Promise(a=>setTimeout(a,300))}var ih='<svg viewBox="0 0 448 512"><path d="M160 96h32v32h-32V96zm-64 0h32v32H96V96zm-64 0h32v32H32V96zm384 320H32V160h384v256zm0-288H224V96h192v32zm32-32c0-17.675-14.325-32-32-32H32C14.325 64 0 78.325 0 96v320c0 17.675 14.325 32 32 32h384c17.675 0 32-14.325 32-32V96z"></path></svg>';function
|
|
Ga(o,a){return
|
|
o.querySelector(a)||(o.parentElement?Ga(o.parentElement,a):null)}const
|
|
ja=o=>{const
|
|
l=(Ga(o,".flems")||document.body).parentElement.getBoundingClientRect(),u=o.parentElement.getBoundingClientRect();return{top:u.top-l.top,bottom:u.bottom-l.bottom,right:u.right-l.right,width:u.width}},oh=({dom:o})=>{ja(o).top<40?(o.style.bottom=0,o.style.borderBottom="5px
|
|
solid white"):(o.style.top=0,o.style.borderTop="5px solid
|
|
white")},lh=({dom:o})=>{const
|
|
a=ja(o),l=Math.min(-o.clientWidth/2+o.parentElement.clientWidth/2,-o.clientWidth+a.width+(-a.right-4));o.style.left=l+"px",a.top<40?(o.style.transformOrigin=Math.abs(l)+a.width/2+"px
|
|
|
|
0px",o.style.bottom="-26px"):(o.style.transformOrigin=Math.abs(l)+a.width/2+"px
|
|
|
|
26px",o.style.top="-26px")},ah=({dom:o})=>{o.parentElement.classList.add(le.$nest(":hover
|
|
.tooltip",le.o(1).transform("scale(1)")).class),lh({dom:o})};var
|
|
sh=({zIndex:o=11,title:a=""})=>Le(".tooltip"+le.position("absolute").o(0).c("gray").zi(o).transform("scale(0)").w("auto").h(26).fontSize(12).br(2).p("5px
|
|
8px").bc("white").bs("0 2px 8px rgba(0,0,0,0.35)").transition("opacity
|
|
0.3s, transform
|
|
0.3s").pointerEvents("none").textTransform("uppercase").textAlign("right").whiteSpace("nowrap"),{key:"tooltip",oncreate:ah},a,Le(".tooltip_triangle"+le.pointerEvents("none").o(0).zi(o+1).transform("scale(0)").position("absolute").transformOrigin("bottom
|
|
center").transition("opacity 0.3s, transform 0.3s").l("calc(50% -
|
|
5px)").w(0).h(0).borderLeft("5px solid transparent").borderRight("5px
|
|
solid
|
|
transparent").textAlign("right"),{oncreate:oh})),Fi=(o,a={})=>Le(".icon"+le.position("relative").cursor("pointer").borderRadius(3).$hover(le.background("#ddd").color("gray")),{style:a.attention?le.$animate("1s
|
|
linear
|
|
infinite",{"0%":le.transform("scale(1)").o(1),"50%":le.transform("scale(1.2)").o(.5),"100%":le.transform("scale(1)").o(1)}).style:{}},qn({key:"icon_"+o,style:le.o(a.disabled&&.65).style,onclick:a.onclick,size:26,class:le.p(5).position("relative").class+"
|
|
|
|
"+(a.iconClass?a.iconClass.class:"")},o),Le.fragment({key:"badge"},Boolean(a.badge)&&Le(".badge"+le.position("absolute").background("red").borderRadius(7).pointerEvents("none").p("0
|
|
|
|
3px").minWidth(14).h(14).top(0).right(0).c("white").fontStyle("normal").fontSize(10).textAlign("center"),a.badge)),sh({title:a.title})),uh='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M462.9 192.5v504.3h100V192.5L739.5 369l70.7-70.7L512.9 1 215.6 298.3l70.7 70.7z"></path><path d="M924 450v405.3c0 37.9-30.8 68.7-68.7 68.7H168.7c-37.9 0-68.7-30.8-68.7-68.7V450H0v405.3C0 948.5 75.5 1024 168.7 1024h686.6c93.2 0 168.7-75.5 168.7-168.7V450H924z"></path></svg>',qa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M589.7 512l387.8-387.8c11.7-11.7 11.7-30.5 0-42.1l-35.6-35.6c-11.7-11.7-30.5-11.7-42.1 0L512 434.3 124.2 46.5c-11.7-11.7-30.5-11.7-42.1 0L46.5 82.1c-11.7 11.7-11.7 30.5 0 42.1L434.3 512 46.5 899.8c-11.7 11.7-11.7 30.5 0 42.1l35.6 35.6c11.7 11.7 30.6 11.7 42.1 0L512 589.7l387.8 387.8c11.7 11.7 30.5 11.7 42.1 0l35.6-35.6c11.7-11.7 11.7-30.6 0-42.1L589.7 512z"></path></svg>',fh='<svg viewBox="0 0 768 768"><path d="M616.5 151.3l96.2-96.2v288.5H424.2l132.7-132.7c-44.2-44.2-105.8-73.1-173.1-73.1-136.5 0-246.2 109.6-246.2 246.2s109.6 246.2 246.2 246.2c107.7 0 200-67.3 232.7-163.5h84.6C664.6 609 537.7 712.9 383.8 712.9c-180.8 0-327-148.1-327-328.9S203 55.1 383.8 55.1c90.4 0 173.1 36.6 232.7 96.2z"></path></svg>',ch='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M265.6 164.7L811.7 511 265.6 857.3V164.7M233.2 38c-35.2 0-67.7 28-67.7 67.7v810.7c0 39.7 32.6 67.7 67.7 67.7 12.1 0 24.5-3.3 36-10.6L908.5 568c41.8-26.5 41.8-87.5 0-114.1L269.3 48.6C257.8 41.4 245.4 38 233.2 38z"></path></svg>',hh='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M286.1 933.1h-50.3c-16.5 0-29.8-13.3-29.8-29.8V120.9c0-16.5 13.3-29.8 29.8-29.8h50.3c16.5 0 29.8 13.3 29.8 29.8v782.4c.1 16.4-13.3 29.8-29.8 29.8zM797.7 929.9h-50.8c-16.4 0-29.6-13.2-29.6-29.6V123.8c0-16.4 13.2-29.6 29.6-29.6h50.8c16.4 0 29.6 13.2 29.6 29.6v776.5c0 16.3-13.2 29.6-29.6 29.6z"></path></svg>',dh=(o,a)=>Le(".toolbar"+le.w("100%").h(o.toolbar()).p(4,6).position("relative").flexShrink(0).justifyContent("flex-end").alignItems("center").display("flex").c("gray").zi(20).background("rgb(246,246,246)").boxShadow("0
|
|
1px 1px
|
|
rgba(0,0,0,0.35)"),Fi(o.state.autoReload?hh:ch,{title:(o.state.autoReload?"Disable":"Enable")+"
|
|
auto
|
|
reload",onclick:a.toggleAutoReload}),o.state.reloadButton&&Fi(o.loading?qa:fh,{onclick:l=>a.refresh({force:!0}),attention:o.hasChanges,title:"Refresh"}),o.state.shareButton&&Le("a"+le.color("inherit"),{href:"https://flems.io",target:"_blank",oncreate:a.setShareUrl},Fi(uh,{title:"Open
|
|
/ share on
|
|
flems.io"}))),ph=o=>Le(".loading"+le.position("absolute").background("white").pointerEvents("none").top(o.toolbar()+1).left(0).bottom(0).right(0).display("flex").jc("center").ai("center").transition("opacity
|
|
|
|
0.3s"),{style:le.o(o.loading?1:0).style},Le("div"+le.w(120).h(120).borderRadius(30).bc("gray").o(.25).$animate("2s
|
|
linear
|
|
infinite",{from:le.transform("rotate(0deg)"),to:le.transform("rotate(360deg)")}))),gh=(o,a)=>[o.state.toolbar&&dh(o,a),th(o,a),o.state.middle>97&&Ua(ih,a.resetSize),ph(o),o.resizing&&o.state.middle<=98&&rh(o)],vh=(o,a)=>Le(".input"+le.display("flex").p(2,0).flexShrink(0).w("100%").ff("Source
|
|
Code Pro,
|
|
monospace"),{onbeforeremove:Ra(300)},Le("label"+le.display("flex").ai("center").m("0
|
|
6px 0
|
|
10px").flexShrink(0).c("blue"),{for:"input"},">"),Le("textarea#input"+le.p(0).flexGrow(1).fs(12).lineHeight(o.console.lineHeight).bc("transparent").resize("none").outline("none").maxHeight(o.console.lineHeight*5).border("none"),{resize:!1,style:le.minHeight(o.console.inputHeight()).maxHeight(o.console.inputHeight()).style,oninput:a.onConsoleInput,onkeydown:a.onConsoleKeyDown},o.console.input)),mh='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="M505.2 292c11.5 0 22.9 3.6 32.7 10.7l447.2 330c24.4 18 29.6 52.5 11.6 76.9s-52.5 29.6-76.9 11.6L505 415.2 104 707.7c-24.5 17.9-58.9 12.5-76.8-12s-12.5-58.9 12-76.8l433.6-316.3c9.6-7.1 21-10.6 32.4-10.6z"></path></svg>',yh=(o,a)=>Le(".console"+le.bs("0
|
|
0 8px
|
|
rgba(0,0,0,.2)").position("relative").maxHeight(34).zi(30).display("flex").transition("max-height
|
|
|
|
0.3s").fd("column").background("rgb(246,246,246)"),{oncreate:({dom:l})=>o.console.dom=l,style:le.maxHeight(o.state.console===!0&&"50%").style},Le("div"+le.display("flex").jc("space-between").c("#777").flexShrink(0),{onclick:a.toggleConsole},Le("div"+le.display("flex").fs(12).tt("uppercase").p("8px
|
|
|
|
10px"),Le("span"+le.mr(4),"Console"),Xa("#d82c2c",a.clearErrors,o.console.errors()),Xa("gray",a.clearLogs,o.console.infos())),Le("div"+le.display("flex").p(2,6),Fi(mh,{iconClass:le.transition("transform
|
|
|
|
0.3s").transform(o.state.console===!0&&"rotate(180deg)"),title:o.state.console===!0?"Hide
|
|
console":"Show
|
|
console"}))),o.state.console===!0&&Le(".scroll"+le.overflow("auto"),{onscroll:l=>{if(l.redraw=!1,o.ignoreScroll){o.ignoreScroll=!1;return}o.console.manualScroll=l.target.scrollTop!==l.target.scrollHeight-l.target.offsetHeight},onbeforeremove:Ra(300),oncreate:({dom:l})=>{l.scrollTop=l.scrollHeight-l.clientHeight},onupdate:({state:l,dom:u})=>{o.console.manualScroll||(o.ignoreScroll=!0,u.scrollTop=u.scrollHeight-u.clientHeight)}},o.console.output.slice(-200).map(l=>Le(".logLine"+le.display("flex").ff("Source
|
|
Code Pro,
|
|
monospace").alignItems("center").p(2,10).minHeight(22).fs(12).borderBottom("1px
|
|
solid
|
|
#eee").c("#555").whiteSpace("pre-wrap").alignItems("center"),{key:l.number,onclick:()=>l.expand=!l.expand,title:l.date},[Le("div"+le.flexGrow(1).$nest(">span",le.mr(10)),l.content.length>1&&l.content[0].indexOf("%c")>-1&&Le("span",l.content[0].split("%c").filter(u=>u).map((u,h)=>Le("span"+le(l.content[h+1]||""),u))),l.content.slice(l.content.length>1&&l.content[0].indexOf("%c")>-1?l.content[0].match(/%c/g).length+1:0).map((u,h)=>Le("span",u))),l.stack&&Le(".stack"+le.ta("right").flexShrink(0).overflow("hidden"),l.stack.slice(0,!l.expand&&l.type!=="error"?1:void
|
|
0).map(u=>Le("div",(u.function||"")+" at
|
|
",Le("a"+(u.file?le.textDecoration("underline").cursor("pointer"):""),{onclick:h=>{h.stopPropagation(),u.select&&a.select(u.select),o.focus({line:u.line,column:u.column,scrollTo:!0})}},(u.file||0)+":"+(u.line||0)+":"+(u.column||0)))))]))),o.state.console===!0&&vh(o,a));function
|
|
Xa(o,a,l){return
|
|
Le("span"+le.bc(o).position("relative").m(0,4).p(0,10).ta("center").c("white").display("flex").ai("center").br(50).o(.2).transition("opacity
|
|
|
|
0.5s"),{style:le.o(l>0&&1).style},l,l>0&&qn({size:14,onclick:u=>{u.stopPropagation(),a(u)},class:le.p(3).ml(4).mr(-8).br(20).cursor("pointer").transition("opacity
|
|
|
|
0.3s").$hover(le.transform("scale").bc("rgba(255,255,255,0.25)")).class},qa))}var
|
|
bh=(o,a)=>Le(".flems"+le.fontFamily('-apple-system,
|
|
BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
|
|
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI
|
|
Symbol"').overflow("hidden").position("relative").display("flex").fd("column").boxSizing("border-box").lh(18).fs(16).$nest({"input,
|
|
textarea":le.fontFamily("inherit").m(0).p(0),"*, *:before,
|
|
*:after":le.boxSizing("inherit").fw("normal"),svg:le.fill("currentColor").va("middle"),"svg:not(:root)":le.overflow("hidden"),"a,
|
|
a:link,
|
|
a:visited":le.c("inherit").td("none").border("none")}),{style:le.h(o.state.autoHeight?o.cmHeight:"100%").userSelect(o.dragging&&"none").style},Le("main"+le.flexGrow(1).display("flex").flexDirection(o.vertical()&&"column").position(o.vertical()&&"relative"),{style:le.ai(!o.vertical()&&"stretch").style},Le(".editor"+le.position("relative").minWidth(50).minHeight(o.toolbar()).zIndex(30).flexGrow(1),{style:le.position(o.vertical()&&"absolute").width(o.vertical()&&"100%").height(o.vertical()&&o.state.middle+"%").maxWidth(!o.vertical()&&o.state.middle+"%").style},Vc(o,a)),Le(".runtime"+le.position("relative").minWidth(50).minHeight(o.toolbar()).b(0).r(0).display("flex").fd("column").flexGrow(1),{style:le.position(o.vertical()&&"absolute").width(o.vertical()&&"100%").height(o.vertical()&&100-o.state.middle+"%").maxHeight(o.vertical()&&"calc(100%
|
|
-
|
|
"+o.toolbar()+"px").maxWidth(!o.vertical()&&100-o.state.middle+"%").style},gh(o,a))),o.state.console&&yh(o,a)),Ya={exports:{}};(function(o){var
|
|
a=function(){var
|
|
l=String.fromCharCode,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",p={};function
|
|
S(g,x){if(!p[g]){p[g]={};for(var y=0;y<g.length;y++)p[g][g.charat(y)]=y}return p[g][x]}var="" b="{compressToBase64:function(g){if(g==null)return"";var" x="b._compress(g,6,function(y){return" u.charat(y)});switch(x.length%4){default:case="" 0:return="" x;case="" 1:return="" x+"="==";case" 2:return="" 3:return="" ":g="=""?null:b._decompress(g.length,32,function(x){return" s(u,g.charat(x))})},compresstoutf16:function(g){return="" g="=null?"":b._compress(g,15,function(x){return" l(x+32)})+"="" "},decompressfromutf16:function(g){return="" g.charcodeat(x)-32})},compresstouint8array:function(g){for(var="" uint8array(x.length*2),a="0,m=x.length;A<m;A++){var" _="x.charCodeAt(A);y[A*2]=_">>>8,y[A*2+1]=_%256}return
|
|
y},decompressFromUint8Array:function(g){if(g==null)return
|
|
b.decompress(g);for(var x=new Array(g.length/2),y=0,A=x.length;y<a;y++)x[y]=g[y*2]*256+g[y*2+1];var m="[];return" x.foreach(function(_){m.push(l(_))}),b.decompress(m.join(""))},compresstoencodeduricomponent:function(g){return="" g="=null?"":b._compress(g,6,function(x){return" h.charat(x)})},decompressfromencodeduricomponent:function(g){return="" g,"+"),b._decompress(g.length,32,function(x){return="" s(h,g.charat(x))}))},compress:function(g){return="" b._compress(g,16,function(x){return="" l(x)})},_compress:function(g,x,y){if(g="=null)return"";var" a,m,_="{},R={},I="",W="",N="",T=2,E=3,c=2,w=[],k=0,O=0,L;for(L=0;L<g.length;L+=1)if(I=g.charAt(L),Object.prototype.hasOwnProperty.call(_,I)||(_[I]=E++,R[I]=!0),W=N+I,Object.prototype.hasOwnProperty.call(_,W))N=W;else{if(Object.prototype.hasOwnProperty.call(R,N)){if(N.charCodeAt(0)<256){for(A=0;A<c;A++)k=k<<1,O==x-1?(O=0,w.push(y(k)),k=0):O++;for(m=N.charCodeAt(0),A=0;A<8;A++)k=k<<1|m&1,O==x-1?(O=0,w.push(y(k)),k=0):O++,m=m">>1}else{for(m=1,A=0;A<c;a++)k=k<<1|m,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=0;for(m=n.charcodeat(0),a=0;a<16;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1}T--,T==0&&(T=Math.pow(2,c),c++),delete R[N]}else for(m=_[N],A=0;A<c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1;T--,T==0&&(T=Math.pow(2,c),c++),_[W]=E++,N=String(I)}if(N!==""){if(Object.prototype.hasOwnProperty.call(R,N)){if(N.charCodeAt(0)<256){for(A=0;A<c;a++)k=k<<1,o==x-1?(o=0,w.push(y(k)),k=0):o++;for(m=n.charcodeat(0),a=0;a<8;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1}else{for(m=1,A=0;A<c;a++)k=k<<1|m,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=0;for(m=n.charcodeat(0),a=0;a<16;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1}T--,T==0&&(T=Math.pow(2,c),c++),delete R[N]}else for(m=_[N],A=0;A<c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1;T--,T==0&&(T=Math.pow(2,c),c++)}for(m=2,A=0;A<c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m>>1;for(;;)if(k=k<<1,O==x-1){w.push(y(k));break}else
|
|
O++;return w.join("")},decompress:function(g){return
|
|
g==null?"":g==""?null:b._decompress(g.length,32768,function(x){return
|
|
g.charCodeAt(x)})},_decompress:function(g,x,y){var
|
|
A=[],m=4,_=4,R=3,I="",W=[],N,T,E,c,w,k,O,L={val:y(0),position:x,index:1};for(N=0;N<3;N+=1)A[N]=N;for(E=0,w=Math.pow(2,2),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;switch(E){case
|
|
|
|
0:for(E=0,w=Math.pow(2,8),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;O=l(E);break;case
|
|
|
|
1:for(E=0,w=Math.pow(2,16),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;O=l(E);break;case
|
|
|
|
2:return""}for(A[3]=O,T=O,W.push(O);;){if(L.index>g)return"";for(E=0,w=Math.pow(2,R),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;switch(O=E){case
|
|
|
|
0:for(E=0,w=Math.pow(2,8),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;A[_++]=l(E),O=_-1,m--;break;case
|
|
|
|
1:for(E=0,w=Math.pow(2,16),k=1;k!=w;)c=L.val&L.position,L.position>>=1,L.position==0&&(L.position=x,L.val=y(L.index++)),E|=(c>0?1:0)*k,k<<=1;A[_++]=l(E),O=_-1,m--;break;case
|
|
2:return
|
|
W.join("")}if(m==0&&(m=Math.pow(2,R),R++),A[O])I=A[O];else
|
|
if(O===_)I=T+T.charAt(0);else return
|
|
null;W.push(I),A[_++]=T+I.charAt(0),m--,T=I,m==0&&(m=Math.pow(2,R),R++)}}};return
|
|
b}();o!=null&&(o.exports=a)})(Ya);var wh=Ya.exports;const
|
|
gr=Dc(o=>new Promise((a,l)=>{const
|
|
u=document.createElement("script");u.async=!1,u.charset="utf-8",u.src=o,document.body.appendChild(u),u.onload=a,u.onerror=h=>l("Could
|
|
not load compiler from
|
|
"+o)})),Qa={styl:o=>gr("https://static.flems.io/compilers/stylus.min.js").then(()=>({code:window.stylus.render(o.content)})),scss:o=>gr("https://static.flems.io/compilers/sass.sync.js").then(()=>new
|
|
|
|
Promise((a,l)=>window.Sass.compile(o.content,u=>{u.message?l(u.message):a({code:u.text})}))),sass:o=>gr("https://static.flems.io/compilers/sass.sync.js").then(()=>new
|
|
|
|
Promise((a,l)=>window.Sass.compile(o.content,{indentedSyntax:!0},u=>{u.message?l(u.message):a({code:u.text})}))),less:o=>gr("https://static.flems.io/compilers/less.min.js").then(()=>window.less.render(o.content).then(a=>({code:a.css}))),ts:o=>gr("https://static.flems.io/compilers/typescriptServices.js").then(()=>{const
|
|
|
|
a=window.ts.transpileModule(o.content,{fileName:o.name,compilerOptions:{module:"ESNext",sourceMap:!0,jsx:"react"}});return{code:a.outputText.substring(0,a.outputText.lastIndexOf(`
|
|
`)),map:a.sourceMapText}}),babel:o=>gr("https://static.flems.io/compilers/babel.min.js").then(()=>window.Babel.transform(o.content,{presets:[["es2015",{modules:!1}],"stage-2","react"],sourceMaps:!0,sourceType:"unambiguous",sourceFileName:o.name})),ls:o=>gr("https://static.flems.io/compilers/livescript-min.js").then(()=>{window.livescript||(window.livescript=window.require("livescript"));const
|
|
|
|
a=window.livescript.compile(o.content,{map:"linked",filename:o.name});return{code:a.code,map:a.map.toString()}}),coffee:o=>Promise.all([gr("https://static.flems.io/compilers/babel.min.js"),gr("https://static.flems.io/compilers/coffeescript.js")]).then(()=>{const
|
|
|
|
a=window.CoffeeScript.compile(o.content,{sourceMap:!0,filename:o.name});return
|
|
|
|
window.Babel.transform(a.js,{presets:[["es2015",{modules:!1}],"stage-2","react"],sourceMaps:!0,inputSourceMap:JSON.parse(a.v3SourceMap),sourceFileName:o.name})}),sibilant:o=>gr("https://static.flems.io/compilers/sibilant.js").then(()=>({code:window.sibilant.sibilize(o.content)}))},qo={html:"document",js:"script",mjs:"script",ts:"script",ls:"script",coffee:"script",sibilant:"script",css:"style",styl:"style",less:"style",scss:"style",sass:"style"},Bi=()=>({middle:50,selected:".js",color:"rgb(38,50,56)",theme:"material",layout:"auto",resizeable:!0,editable:!0,toolbar:!0,fileTabs:!0,linkTabs:!0,shareButton:!0,reloadButton:!0,console:!0,autoReload:!0,autoReloadDelay:400,autoFocus:!1,autoHeight:!1,scroll:null,files:[{name:".html",content:""},{name:".js",content:""},{name:".css",content:""}],links:[]});function
|
|
$a(o){const a=Bi();return Object.keys(a).forEach(l=>{l in
|
|
o||(o[l]=a[l])}),o.middle=Math.min(Math.max(o.middle,0),100),o.files.forEach(l=>{if(l.type=l.type||qo[Ri(l.name)],l.content=l.content||"",typeof
|
|
l.compiler=="string"&&!(l.compiler in Qa))throw new
|
|
Error("Unknown compler:
|
|
"+l.compiler)}),o.files.reduce((l,u)=>{if(l.indexOf(u.name)>-1)throw
|
|
new Error("Multiple files with the same name: "+name);return
|
|
l.concat(u.name)},[]),o.links.forEach(l=>{if(!zc.test(l.url))throw
|
|
new Error("Link url's should start with http:// or
|
|
https://");l.type=qo[l.type]||l.type||qo[Ri(l.url)]||"script",l.name=l.name||l.url.slice(l.url.lastIndexOf("/")+1)}),Gn(o,o.selected)||(o.selected=(o.files[0]||{}).name||(o.links[0]||{}).url),o}const
|
|
|
|
Za=o=>"https://flems.io/#0="+wh.compressToEncodedURIComponent(JSON.stringify(xh(o)));function
|
|
xh(o){const a=Object.keys(Bi()).reduce((l,u)=>(u in
|
|
o&&o[u]!==Bi[u]&&(l[u]=o[u]),l),{});return
|
|
o.files&&o.files.length&&(a.files=Ja(o.files,["name","content","compiler","selections"])),o.links&&(a.links=Ja(o.links,["name","url","type","patches","selections"])),a}function
|
|
Ja(o=[],a){return o.map(l=>a.reduce((u,h)=>(u[h]=l[h],u),{}))}var
|
|
|
|
Va={exports:{}};(function(o){(function(){l.SKIP={},l.lift=b,l.scan=p,l.merge=h,l.combine=u,l.scanMerge=S,l["fantasy-land/of"]=l;var
|
|
a=!1;Object.defineProperty(l,"HALT",{get:function(){return
|
|
a||console.log("HALT is deprecated and has been renamed to
|
|
SKIP"),a=!0,l.SKIP}});function l(x){var y=[],A=[];function m(I){return
|
|
arguments.length&&I!==l.SKIP&&(x=I,g(m)&&(m._changing(),m._state="active",y.forEach(function(W,N){W(A[N](x))}))),x}m.constructor=l,m._state=arguments.length&&x!==l.SKIP?"active":"pending",m._parents=[],m._changing=function(){g(m)&&(m._state="changing"),y.forEach(function(I){I._changing()})},m._map=function(I,W){var
|
|
N=W?l():l(I(x));return
|
|
N._parents.push(m),y.push(N),A.push(I),N},m.map=function(I){return
|
|
m._map(I,m._state!=="active")};var _;function R(){return
|
|
_=l(),_.map(function(I){return
|
|
I===!0&&(m._parents.forEach(function(W){W._unregisterChild(m)}),m._state="ended",m._parents.length=y.length=A.length=0),I}),_}return
|
|
m.toJSON=function(){return x!=null&&typeof
|
|
x.toJSON=="function"?x.toJSON():x},m["fantasy-land/map"]=m.map,m["fantasy-land/ap"]=function(I){return
|
|
u(function(W,N){return
|
|
W()(N())},[I,m])},m._unregisterChild=function(I){var
|
|
W=y.indexOf(I);W!==-1&&(y.splice(W,1),A.splice(W,1))},Object.defineProperty(m,"end",{get:function(){return
|
|
_||R()}}),m}function u(x,y){var
|
|
A=y.every(function(W){if(W.constructor!==l)throw new Error("Ensure that
|
|
each item passed to stream.combine/stream.merge/lift is a
|
|
stream");return
|
|
W._state==="active"}),m=A?l(x.apply(null,y.concat([y]))):l(),_=[],R=y.map(function(W){return
|
|
W._map(function(N){return _.push(W),(A||y.every(function(T){return
|
|
T._state!=="pending"}))&&(A=!0,m(x.apply(null,y.concat([_]))),_=[]),N},!0)}),I=m.end.map(function(W){W===!0&&(R.forEach(function(N){N.end(!0)}),I.end(!0))});return
|
|
m}function h(x){return u(function(){return x.map(function(y){return
|
|
y()})},x)}function p(x,y,A){var m=A.map(function(_){var R=x(y,_);return
|
|
R!==l.SKIP&&(y=R),R});return m(y),m}function S(x,y){var
|
|
A=x.map(function(_){return _[0]}),m=u(function(){var
|
|
_=arguments[arguments.length-1];return
|
|
A.forEach(function(R,I){_.indexOf(R)>-1&&(y=x[I][1](y,R()))}),y},A);return
|
|
m(y),m}function b(){var
|
|
x=arguments[0],y=Array.prototype.slice.call(arguments,1);return
|
|
h(y).map(function(A){return x.apply(void 0,A)})}function g(x){return
|
|
x._state==="pending"||x._state==="active"||x._state==="changing"}o.exports=l})()})(Va);var
|
|
Xo=Va.exports;const
|
|
es=document.getElementsByTagName("script"),Yo=es[es.length-1],kh=jn("flems.html",Yo?Yo.src:"")&&Yo.src;function
|
|
Sh(o,a,l){a=$a(a);const
|
|
h={id:Ch(),dom:o,state:a,selected:Xo(Gn(a,a.selected)),iOS:"overflowScrolling"in
|
|
|
|
le,runtimeUrl:l||kh||"flems.html",console:{input:"",inputNumber:0,output:[],history:[],position:0,manualScroll:!1,lineHeight:22,errors:()=>h.console.output.filter(p=>p.type==="error").length,infos:()=>h.console.output.filter(p=>p.type!=="error").length,inputHeight:()=>Math.min(h.console.lineHeight*h.console.input.split(`
|
|
`).length,h.console.lineHeight*5)},cmHeight:null,iframe:null,loading:!0,resizing:!1,hideError:!0,dragging:!1,refreshCm:Xo(),focus:Xo(),vertical:()=>o.offsetWidth*1.25<o.offsetheight,toolbar:()=>h.state.toolbar?40:0};return
|
|
h}function
|
|
Ch(){return("000"+(Math.random()*46656|0).toString(36)).slice(-3)+("000"+(Math.random()*46656|0).toString(36)).slice(-3)}var
|
|
Lh={},Th=Object.freeze({__proto__:null,default:Lh}),Mh=ec(Th),Qo=typeof
|
|
|
|
Map=="function"&&Map.prototype,$o=Object.getOwnPropertyDescriptor&&Qo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Hi=Qo&&$o&&typeof
|
|
|
|
$o.get=="function"?$o.get:null,Ah=Qo&&Map.prototype.forEach,Zo=typeof
|
|
|
|
Set=="function"&&Set.prototype,Jo=Object.getOwnPropertyDescriptor&&Zo?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wi=Zo&&Jo&&typeof
|
|
|
|
Jo.get=="function"?Jo.get:null,Oh=Zo&&Set.prototype.forEach,_h=Boolean.prototype.valueOf,Eh=Object.prototype.toString,Nh=typeof
|
|
|
|
BigInt=="function"?BigInt.prototype.valueOf:null,Vo=Mh.custom,el=Vo&&ns(Vo)?Vo:null,Ph=function
|
|
|
|
o(a,l,u,h){if(l||(l={}),tl(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw
|
|
new TypeError('option "quoteStyle" must be "single" or
|
|
"double"');if(typeof
|
|
a=="undefined")return"undefined";if(a===null)return"null";if(typeof
|
|
a=="boolean")return a?"true":"false";if(typeof a=="string")return
|
|
Yh(a,l);if(typeof a=="number")return
|
|
a===0?1/0/a>0?"0":"-0":String(a);if(typeof a=="bigint")return
|
|
String(a)+"n";var p=typeof l.depth=="undefined"?5:l.depth;if(typeof
|
|
u=="undefined"&&(u=0),u>=p&&p>0&&typeof
|
|
a=="object")return"[Object]";if(typeof h=="undefined")h=[];else
|
|
if(Gh(h,a)>=0)return"[Circular]";function S(R,I){return
|
|
I&&(h=h.slice(),h.push(I)),o(R,l,u+1,h)}if(typeof
|
|
a=="function"){var b=Kh(a);return"[Function"+(b?":
|
|
"+b:"")+"]"}if(ns(a)){var g=Symbol.prototype.toString.call(a);return
|
|
typeof a=="object"?Xn(g):g}if(Xh(a)){for(var
|
|
x="<"+String(a.nodeName).toLowerCase(),y=a.attributes||[],A=0;A<y.length;a++)x+=" "+y[a].name+"="+ts(zh(y[A].value)," double",l);return="" x+=">" ,a.childnodes&&a.childnodes.length&&(x+="..." ),x+="</" +string(a.nodename).tolowercase()+"="">",x}if(rs(a))return
|
|
a.length===0?"[]":"[ "+rl(a,S).join(", ")+" ]";if(Rh(a)){var
|
|
m=rl(a,S);return m.length===0?"["+String(a)+"]":"{ ["+String(a)+"]
|
|
"+m.join(", ")+" }"}if(typeof a=="object"){if(el&&typeof
|
|
a[el]=="function")return a[el]();if(typeof a.inspect=="function")return
|
|
a.inspect()}if(jh(a)){var m=[];return
|
|
Ah.call(a,function(I,W){m.push(S(W,a)+" =>
|
|
"+S(I,a))}),is("Map",Hi.call(a),m)}if(qh(a)){var m=[];return
|
|
Oh.call(a,function(I){m.push(S(I,a))}),is("Set",Wi.call(a),m)}if(Bh(a))return
|
|
Xn(S(Number(a)));if(Hh(a))return Xn(S(Nh.call(a)));if(Wh(a))return
|
|
Xn(_h.call(a));if(Fh(a))return
|
|
Xn(S(String(a)));if(!Dh(a)&&!Ih(a)){var _=rl(a,S);return
|
|
_.length===0?"{}":"{ "+_.join(", ")+" }"}return String(a)};function
|
|
ts(o,a,l){var u=(l.quoteStyle||a)==="double"?'"':"'";return
|
|
u+o+u}function zh(o){return String(o).replace(/"/g,""")}function
|
|
rs(o){return Lr(o)==="[object Array]"}function Dh(o){return
|
|
Lr(o)==="[object Date]"}function Ih(o){return Lr(o)==="[object
|
|
RegExp]"}function Rh(o){return Lr(o)==="[object Error]"}function
|
|
ns(o){return Lr(o)==="[object Symbol]"}function Fh(o){return
|
|
Lr(o)==="[object String]"}function Bh(o){return Lr(o)==="[object
|
|
Number]"}function Hh(o){return Lr(o)==="[object BigInt]"}function
|
|
Wh(o){return Lr(o)==="[object Boolean]"}var
|
|
Uh=Object.prototype.hasOwnProperty||function(o){return o in
|
|
this};function tl(o,a){return Uh.call(o,a)}function Lr(o){return
|
|
Eh.call(o)}function Kh(o){if(o.name)return o.name;var
|
|
a=String(o).match(/^function\s*([\w$]+)/);if(a)return a[1]}function
|
|
Gh(o,a){if(o.indexOf)return o.indexOf(a);for(var l=0,u=o.length;l<u;l++)if(o[l]===a)return l;return-1}function="" jh(o){if(!hi)return!1;try{hi.call(o);try{wi.call(o)}catch(a){return!0}return="" o="" instanceof="" map}catch(a){}return!1}function="" qh(o){if(!wi)return!1;try{wi.call(o);try{hi.call(o)}catch(a){return!0}return="" set}catch(a){}return!1}function="" xh(o){return!o||typeof="" o!="object" ?!1:typeof="" htmlelement!="undefined" &&o="" htmlelement?!0:typeof="" o.nodename="="string"&&typeof" o.getattribute="="function"}function" yh(o,a){var="" l="o.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Qh);return" ts(l,"single",a)}function="" qh(o){var="" a="o.charCodeAt(0),l={8:"b",9:"t",10:"n",12:"f",13:"r"}[a];return" l?"\\"+l:"\\x"+(a<16?"0":"")+a.tostring(16)}function="" xn(o){return"object("+o+")"}function="" is(o,a,l){return="" o+"="" ("+a+")="" {"+l.join(",="" ")+"}"}function="" rl(o,a){var="" h="0;h<o.length;h++)u[h]=tl(o,h)?a(o[h],o):""}for(var" p="" in="" o)!tl(o,p)||l&&string(number(p))="==p&&p<o.length||(/[^\w$]/.test(p)?u.push(a(p,o)+":" "+a(o[p],o)):u.push(p+":="" "+a(o[p],o)));return="" u}const="" $h="1,os=4,Zh=.5,ir=4,Tr=32,Jh=.5,Vh=1e3,ls=/[^a-zA-Z0-9]/,as=/\s/,ss=/[\r\n]/,ed=/\n\r?\n$/,td=/^\r?\n\r?\n/,at=-1,ht=1,Ue=0;function" dr(o,a,l,u){typeof="" u="="undefined"&&(u=new" date().gettime()+$h*1e3);const="" o?[[ue,o]]:[];typeof="" s="nl(o,a);const" b="o.substring(0,S);o=o.substring(S),a=a.substring(S),S=Ui(o,a);const" g="o.substring(o.length-S);o=o.substring(0,o.length-S),a=a.substring(0,a.length-S);const" x="rd(o,a,p,h);return" b&&x.unshift([ue,b]),g&&x.push([ue,g]),ki(x),x}function="" rd(o,a,l,u){let="" h;if(!o)return[[ht,a]];if(!a)return[[at,o]];const="">a.length?o:a,S=o.length>a.length?a:o,b=p.indexOf(S);if(b!==-1)return
|
|
|
|
h=[[ht,p.substring(0,b)],[Ue,S],[ht,p.substring(b+S.length)]],o.length>a.length&&(h[0][0]=h[2][0]=at),h;if(S.length===1)return[[at,o],[ht,a]];const
|
|
g=ad(o,a);if(g){const
|
|
x=g[0],y=g[1],A=g[2],m=g[3],_=g[4],R=Dr(x,A,l,u),I=Dr(y,m,l,u);return
|
|
R.concat([[Ue,_]],I)}return
|
|
l&&o.length>100&&a.length>100?nd(o,a,u):id(o,a,u)}function
|
|
nd(o,a,l){const u=od(o,a);o=u.chars1,a=u.chars2;const
|
|
h=u.lineArray,p=Dr(o,a,!1,l);ld(p,h),cs(p),p.push([Ue,""]);let
|
|
S=0,b=0,g=0,x="",y="";for(;S<p.length;){if(p[s][0]===ht)g++,y+=p[s][1];else if(p[s][0]="==at)b++,x+=p[S][1];else">=1&&g>=1){p.splice(S-b-g,b+g),S=S-b-g;const
|
|
A=Dr(x,y,!1,l);for(let
|
|
m=A.length-1;m>=0;m--)p.splice(S,0,A[m]);S=S+A.length}g=0,b=0,x="",y=""}S++}return
|
|
p.pop(),p}function id(o,a,l){const
|
|
u=o.length,h=a.length,p=Math.ceil((u+h)/2),S=p,b=2*p,g=new
|
|
Array(b),x=new Array(b);for(let W=0;W<b;w++)g[w]=-1,x[w]=-1;g[s+1]=0,x[s+1]=0;const y="u-h,A=y%2!=0;let" m="0,_=0,R=0,I=0;for(let" w="0;W<p&&!(new" date().gettime()="">l);W++){for(let N=-W+m;N<=W-_;N+=2){const T=S+N;let E;N===-W||N!==W&&g[T-1]<g[t+1]?e=g[t+1]:e=g[t-1]+1;let c="E-N;for(;E<u&&c<h&&o.charAt(E)===a.charAt(c);)E++,c++;if(g[T]=E,E">u)_+=2;else if(c>h)m+=2;else if(A){const w=S+y-N;if(w>=0&&w<b&&x[w]!==-1){const k="u-x[w];if(E">=k)return us(o,a,E,c,l)}}}for(let N=-W+R;N<=W-I;N+=2){const T=S+N;let E;N===-W||N!==W&&x[T-1]<x[t+1]?e=x[t+1]:e=x[t-1]+1;let c="E-N;for(;E<u&&c<h&&o.charAt(u-E-1)===a.charAt(h-c-1);)E++,c++;if(x[T]=E,E">u)I+=2;else if(c>h)R+=2;else if(!A){const w=S+y-N;if(w>=0&&w<b&&g[w]!==-1){const k="g[w],O=S+k-w;if(E=u-E,k">=E)return
|
|
us(o,a,k,O,l)}}}}return[[at,o],[ht,a]]}function us(o,a,l,u,h){const
|
|
p=o.substring(0,l),S=a.substring(0,u),b=o.substring(l),g=a.substring(u),x=Dr(p,S,!1,h),y=Dr(b,g,!1,h);return
|
|
x.concat(y)}function od(o,a){const l=[],u={};l[0]="";function h(b){let
|
|
g="",x=0,y=-1,A=l.length;for(;y<b.length-1;){y=b.indexof(` `,x),y="==-1&&(y=b.length-1);const" m="b.substring(x,y+1);x=y+1,(u.hasOwnProperty?u.hasOwnProperty(m):u[m]!==void" 0)?g+="String.fromCharCode(u[m]):(g+=String.fromCharCode(A),u[m]=A,l[A++]=m)}return" g}const="" p="h(o),S=h(a);return{chars1:p,chars2:S,lineArray:l}}function" ld(o,a){for(let="" l="0;l<o.length;l++){const" u="o[l][1],h=[];for(let" nl(o,a){if(!o||!a||o.charat(0)!="=a.charAt(0))return" 0;let="" h}function="" ui(o,a){if(!o||!a||o.charat(o.length-1)!="=a.charAt(a.length-1))return" fs(o,a){const="" 0;l="">u?o=o.substring(l-u):l<u&&(a=a.substring(0,l));const h="Math.min(l,u);if(o===a)return" h;let="" p="0,S=1;for(;;){const" b="o.substring(h-S),g=a.indexOf(b);if(g===-1)return" p;s+="g,(g===0||o.substring(h-S)===a.substring(0,S))&&(p=S,S++)}}function" ad(o,a){const="" l="o.length">a.length?o:a,u=o.length>a.length?a:o;if(l.length<4||u.length*2<l.length)return null;function="" h(_,r,i){const="" w="_.substring(I,I+Math.floor(_.length/4));let" n="-1,T="",E,c,w,k;for(;(N=R.indexOf(W,N+1))!==-1;){const" o="nl(_.substring(I),R.substring(N)),L=Ui(_.substring(0,I),R.substring(0,N));T.length<L+O&&(T=R.substring(N-L,N)+R.substring(N,N+O),E=_.substring(0,I-L),c=_.substring(I+O),w=R.substring(0,N-L),k=R.substring(N+O))}return" t.length*2="">=_.length?[E,c,w,k,T]:null}const
|
|
p=h(l,u,Math.ceil(l.length/4)),S=h(l,u,Math.ceil(l.length/2));let
|
|
b;if(!p&&!S)return
|
|
null;S?p?b=p[4].length>S[4].length?p:S:b=S:b=p;let
|
|
g,x,y,A;o.length>a.length?(g=b[0],x=b[1],y=b[2],A=b[3]):(y=b[0],A=b[1],g=b[2],x=b[3]);const
|
|
m=b[4];return[g,x,y,A,m]}function cs(o){let a=!1;const l=[];let
|
|
u=0,h=null,p=0,S=0,b=0,g=0,x=0;for(;p<o.length;)o[p][0]===ue?(l[u++]=p,s=g,b=x,g=0,x=0,h=o[p][1]):(o[p][0]===ht?g+=o[p][1].length:x+=o[p][1].length,h&&h.length<=math.max(s,b)&&h.length<=math.max(g,x)&&(o.splice(l[u-1],0,[at,h]),o[l[u-1]+1][0]=ht,u--,u--,p=u>0?l[u-1]:-1,S=0,b=0,g=0,x=0,h=null,a=!0)),p++;for(a&&Ki(o),hs(o),p=1;p<o.length;){if(o[p-1][0]===at&&o[p][0]===ht){const y="o[p-1][1],A=o[p][1],m=fs(y,A),_=fs(A,y);m">=_?(m>=y.length/2||m>=A.length/2)&&(o.splice(p,0,[Ue,A.substring(0,m)]),o[p-1][1]=y.substring(0,y.length-m),o[p+1][1]=A.substring(m),p++):(_>=y.length/2||_>=A.length/2)&&(o.splice(p,0,[Ue,y.substring(0,_)]),o[p-1][0]=ht,o[p-1][1]=A.substring(0,A.length-_),o[p+1][0]=at,o[p+1][1]=y.substring(_),p++),p++}p++}}function
|
|
hs(o){function a(u,h){if(!u||!h)return 6;const
|
|
p=u.charAt(u.length-1),S=h.charAt(0),b=p.match(ls),g=S.match(ls),x=b&&p.match(as),y=g&&S.match(as),A=x&&p.match(ss),m=y&&S.match(ss),_=A&&u.match(ed),R=m&&h.match(td);return
|
|
_||R?5:A||m?4:b&&!x&&y?3:x||y?2:b||g?1:0}let l=1;for(;l<o.length-1;){if(o[l-1][0]===ue&&o[l+1][0]===ue){let u="o[l-1][1],h=o[l][1],p=o[l+1][1];const" s="Ui(u,h);if(S){const" a="h.substring(h.length-S);u=u.substring(0,u.length-S),h=A+h.substring(0,h.length-S),p=A+p}let" b="u,g=h,x=p,y=a(u,h)+a(h,p);for(;h.charAt(0)===p.charAt(0);){u+=h.charAt(0),h=h.substring(1)+p.charAt(0),p=p.substring(1);const">=y&&(y=A,b=u,g=h,x=p)}o[l-1][1]!==b&&(b?o[l-1][1]=b:(o.splice(l-1,1),l--),o[l][1]=g,x?o[l+1][1]=x:(o.splice(l+1,1),l--))}l++}}function
|
|
sd(o){let a=!1;const l=[];let u=0,h=null,p=0,S=!1,b=!1,g=!1,x=!1;for(;p<o.length;)o[p][0]===ue?(o[p][1].length<os&&(g||x)?(l[u++]=p,s=g,b=x,h=o[p][1]):(u=0,h=null),g=x=!1):(o[p][0]===at?x=!0:g=!0,h&&(s&&b&&g&&x||h.length<os 2&&s+b+g+x="==3)&&(o.splice(l[u-1],0,[at,h]),o[l[u-1]+1][0]=ht,u--,h=null,S&&b?(g=x=!0,u=0):(u--,p=u">0?l[u-1]:-1,g=x=!1),a=!0)),p++;a&&Ki(o)}function Ki(o){o.push([Ue,""]);let a=0,l=0,u=0,h="",p="",S;for(;a<o.length;)o[a][0]===ht&&(u++,p+=o[a][1],a++),o[a][0]===at&&(l++,h+=o[a][1],a++),o[a][0]===ue&&(l+u>1?(l!==0&&u!==0&&(S=nl(p,h),S!==0&&(a-l-u>0&&o[a-l-u-1][0]===Ue?o[a-l-u-1][1]+=p.substring(0,S):(o.splice(0,0,[Ue,p.substring(0,S)]),a++),p=p.substring(S),h=h.substring(S)),S=Ui(p,h),S!==0&&(o[a][1]=p.substring(p.length-S)+o[a][1],p=p.substring(0,p.length-S),h=h.substring(0,h.length-S))),l===0?o.splice(a-u,l+u,[ht,p]):u===0?o.splice(a-l,l+u,[at,h]):o.splice(a-l-u,l+u,[at,h],[ht,p]),a=a-l-u+(l?1:0)+(u?1:0)+1):a!==0&&o[a-1][0]===Ue?(o[a-1][1]+=o[a][1],o.splice(a,1)):a++,u=0,l=0,h="",p="");o[o.length-1][1]===""&&o.pop();let
|
|
b=!1;for(a=1;a<o.length-1;)o[a-1][0]===ue&&o[a+1][0]===ue&&(o[a][1].substring(o[a][1].length-o[a-1][1].length)===o[a-1][1]?(o[a][1]=o[a-1][1]+o[a][1].substring(0,o[a][1].length-o[a-1][1].length),o[a+1][1]=o[a-1][1]+o[a+1][1],o.splice(a-1,1),b=!0):o[a][1].substring(0,o[a+1][1].length)===o[a+1][1]&&(o[a-1][1]+=o[a+1][1],o[a][1]=o[a][1].substring(o[a+1][1].length)+o[a+1][1],o.splice(a+1,1),b=!0)),a++;b&&ki(o)}function ds(o){const="" a="[];for(let" l="0;l<o.length;l++)o[l][0]!==ht&&(a[l]=o[l][1]);return" a.join("")}function="" ps(o){const="" il(o,a,l){if(l="Math.max(0,Math.min(l,o.length)),o===a)return" 0;if(o.length){if(o.substring(l,l+a.length)="==a)return" l}else="" return-1;return="" fd(o,a,l)}function="" ud(o){const="" a}function="" fd(o,a,l){if(a.length="">Tr)throw
|
|
new Error("Pattern too long for this browser.");const u=ud(a);function
|
|
h(m,_){const R=m/a.length,I=Math.abs(l-_);return R+I/Vh}let
|
|
p=Jh,S=o.indexOf(a,l);S!==-1&&(p=Math.min(h(0,S),p),S=o.lastIndexOf(a,l+a.length),S!==-1&&(p=Math.min(h(0,S),p)));const
|
|
b=1<<a.length-1;s=-1;let g,x,y="a.length+o.length,A;for(let" m="0;m<a.length;m++){for(g=0,x=y;g<x;)h(m,l+x)<=p?g=x:y=x,x=Math.floor((y-g)/2+g);y=x;let" _="Math.max(1,l-x+1);const" r="Math.min(l+x,o.length)+a.length,I=Array(R+2);I[R+1]=(1<<m)-1;for(let" w="R;W">=_;W--){const
|
|
|
|
N=u[o.charAt(W-1)];if(m===0?I[W]=(I[W+1]<<1|1)&N:I[W]=(I[W+1]<<1|1)&N|((A[W+1]|A[W])<<1|1)|A[W+1],I[W]&b){const
|
|
T=h(m,W-1);if(T<=p)if(p=T,S=W-1,S>l)_=Math.max(1,2*l-S);else
|
|
break}}if(h(m+1,l)>p)break;A=I}return S}function
|
|
gs(o,a){if(a.length===0)return;let
|
|
l=a.substring(o.start2,o.start2+o.length1),u=0;for(;a.indexOf(l)!==a.lastIndexOf(l)&&l.length<tr-ir-ir;)u+=ir,l=a.substring(o.start2-u,o.start2+o.length1+u);u+=ir;const h="a.substring(o.start2-u,o.start2);h&&o.diffs.unshift([Ue,h]);const" p="a.substring(o.start2+o.length1,o.start2+o.length1+u);p&&o.diffs.push([Ue,p]),o.start1-=h.length,o.start2-=h.length,o.length1+=h.length+p.length,o.length2+=h.length+p.length}function" cd(o,a,l){let="" u,h;typeof="" o="="string"&&typeof" a="="string"&&typeof" l="="undefined"&&(u=o,h=Dr(u,a,!0,void" 0),h.length="">2&&(cs(h),sd(h)));const p=[];let S=Gi(),b=0,g=0,x=0,y=u,A=u;for(let m=0;m<h.length;m++){const _="h[m][0],R=h[m][1];!b&&_!==Ue&&(S.start1=g,S.start2=x),_===ht&&(S.diffs[b++]=h[m],S.length2+=R.length,A=A.substring(0,x)+R+A.substring(x)),_===at&&(S.length1+=R.length,S.diffs[b++]=h[m],A=A.substring(0,x)+A.substring(x+R.length)),_===Ue&&(R.length<=2*ir&&b&&h.length!==m+1?(S.diffs[b++]=h[m],S.length1+=R.length,S.length2+=R.length):R.length">=2*ir&&b&&(gs(S,y),p.push(S),S=Gi(),b=0,y=A,g=x)),_!==ht&&(g+=R.length),_!==at&&(x+=R.length)}return
|
|
b&&(gs(S,y),p.push(S)),md(p)}function hd(o){const a=[];for(let
|
|
l=0;l<o.length;l++){const u="o[l],h=Gi();h.diffs=[];for(let" p="0;p<u.diffs.length;p++)h.diffs[p]=u.diffs[p].slice();h.start1=u.start1,h.start2=u.start2,h.length1=u.length1,h.length2=u.length2,a[l]=h}return" a}function="" dd(o){let="" a="0,l=0,u=0;for(let" h="0;h<o.length;h++){const" a+="Math.max(l,u),a}function" pd(o,a){if(a="yd(a),a.length===0)return[o,[]];a=hd(a);const" l="gd(a);o=l+o+l,vd(a);let" s="a[p].start2+u,b=ds(a[p].diffs);let" g,x="-1;if(b.length">Tr?(g=il(o,b.substring(0,Tr),S),g!==-1&&(x=il(o,b.substring(b.length-Tr),S+b.length-Tr),(x===-1||g>=x)&&(g=-1))):g=il(o,b,S),g===-1)h[p]=!1,u-=a[p].length2-a[p].length1;else{h[p]=!0,u=g-S;let
|
|
|
|
y;if(x===-1?y=o.substring(g,g+b.length):y=o.substring(g,x+Tr),b===y)o=o.substring(0,g)+ps(a[p].diffs)+o.substring(g+b.length);else{const
|
|
A=Dr(b,y,!1,void
|
|
0);if(b.length>Tr&&dd(A)/b.length>Zh)h[p]=!1;else{hs(A);let
|
|
m=0,_;for(let R=0;R<a[p].diffs.length;r++){const i="a[p].diffs[R];I[0]!==Ue&&(_=vs(A,m)),I[0]===ht?o=o.substring(0,g+_)+I[1]+o.substring(g+_):I[0]===at&&(o=o.substring(0,g+_)+o.substring(g+vs(A,m+I[1].length))),I[0]!==at&&(m+=I[1].length)}}}}}return" o="o.substring(l.length,o.length-l.length),[o,h]}function" vs(o,a){let="" l="0,u=0,h=0,p=0,S;for(S=0;S<o.length&&(o[S][0]!==ht&&(l+=o[S][1].length),o[S][0]!==at&&(u+=o[S][1].length),!(l">a));S++)h=l,p=u;return
|
|
o.length!==S&&o[S][0]===at?p:p+(a-h)}function gd(o){const
|
|
a=ir;let l="";for(let p=1;p<=a;p++)l+=String.fromCharCode(p);for(let
|
|
p=0;p<o.length;p++)o[p].start1+=a,o[p].start2+=a;let u="o[0],h=u.diffs;if(h.length===0||h[0][0]!==Ue)h.unshift([Ue,l]),u.start1-=a,u.start2-=a,u.length1+=a,u.length2+=a;else" if(a="">h[0][1].length){const
|
|
|
|
p=a-h[0][1].length;h[0][1]=l.substring(h[0][1].length)+h[0][1],u.start1-=p,u.start2-=p,u.length1+=p,u.length2+=p}if(u=o[o.length-1],h=u.diffs,h.length===0||h[h.length-1][0]!==Ue)h.push([Ue,l]),u.length1+=a,u.length2+=a;else
|
|
if(a>h[h.length-1][1].length){const
|
|
p=a-h[h.length-1][1].length;h[h.length-1][1]+=l.substring(0,p),u.length1+=p,u.length2+=p}return
|
|
l}function vd(o){const a=Tr;for(let l=0;l<o.length;l++){if(o[l].length1<=a)continue;const u="o[l];o.splice(l--,1);let" h="u.start1,p=u.start2,S="";for(;u.diffs.length!==0;){const" b="Gi();let" g="!0;for(b.start1=h-S.length,b.start2=p-S.length,S!==""&&(b.length1=b.length2=S.length,b.diffs.push([Ue,S]));u.diffs.length!==0&&b.length1<a-ir;){const" y="u.diffs[0][0];let" a="u.diffs[0][1];y===ht?(b.length2+=A.length,p+=A.length,b.diffs.push(u.diffs.shift()),g=!1):y===at&&b.diffs.length===1&&b.diffs[0][0]===Ue&&A.length">2*a?(b.length1+=A.length,h+=A.length,g=!1,b.diffs.push([y,A]),u.diffs.shift()):(A=A.substring(0,a-b.length1-ir),b.length1+=A.length,h+=A.length,y===Ue?(b.length2+=A.length,p+=A.length):g=!1,b.diffs.push([y,A]),A===u.diffs[0][1]?u.diffs.shift():u.diffs[0][1]=u.diffs[0][1].substring(A.length))}S=ps(b.diffs),S=S.substring(S.length-ir);const
|
|
|
|
x=ds(u.diffs).substring(0,ir);x!==""&&(b.length1+=x.length,b.length2+=x.length,b.diffs.length!==0&&b.diffs[b.diffs.length-1][0]===Ue?b.diffs[b.diffs.length-1][1]+=x:b.diffs.push([Ue,x])),g||o.splice(++l,0,b)}}}function
|
|
|
|
Gi(){return{diffs:[],start1:null,start2:null,length1:0,length2:0}}function
|
|
md(o){return
|
|
o.length?o.map(a=>a.diffs.concat([a.length1,a.length2,a.start1,a.start2])):void
|
|
0}function yd(o){return
|
|
o.map(a=>({diffs:Array.isArray(a[0])?a.slice(0,-4):[[0,a[1]],[a[0],a[2]],[0,a[3]]],length1:a[a.length-4],length2:a[a.length-3],start1:a[a.length-2],start2:a[a.length-1]}))}var
|
|
|
|
ji={},ol={},qi={},ll={},ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ll.encode=function(o){if(0<=o&&o<ms.length)return ms[o];throw="" new="" typeerror("must="" be="" between="" 0="" and="" 63:="" "+o)},ll.decode="function(o){var" a="65,l=90,u=97,h=122,p=48,S=57,b=43,g=47,x=26,y=52;return" a<="o&&o<=l?o-a:u<=o&&o<=h?o-u+x:p<=o&&o<=S?o-p+y:o==b?62:o==g?63:-1};var" ys="ll,al=5,bs=1<<al,ws=bs-1,xs=bs;function" bd(o){return="" o<0?(-o<<1)+1:(o<<1)+0}function="" wd(o){var="">>1;return
|
|
a?-l:l}qi.encode=function(a){var l="",u,h=bd(a);do
|
|
u=h&ws,h>>>=al,h>0&&(u|=xs),l+=ys.encode(u);while(h>0);return
|
|
l},qi.decode=function(a,l,u){var
|
|
h=a.length,p=0,S=0,b,g;do{if(l>=h)throw new Error("Expected more
|
|
digits in base 64 VLQ
|
|
value.");if(g=ys.decode(a.charCodeAt(l++)),g===-1)throw new
|
|
Error("Invalid base64 digit:
|
|
"+a.charAt(l-1));b=!!(g&xs),g&=ws,p=p+(g<<s),s+=al}while(b);u.value=wd(p),u.rest=l};var gn="{};(function(o){function" a(c,w,k){if(w="" in="" c)return="" c[w];if(arguments.length="==3)return" k;throw="" new="" error('"'+w+'"="" is="" a="" required="" argument.')}o.getarg="a;var" l="/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,u=/^data:.+\,.+$/;function" h(c){var="" w="c.match(l);return" w?{scheme:w[1],auth:w[2],host:w[3],port:w[4],path:w[5]}:null}o.urlparse="h;function" p(c){var="" ;return="" c.scheme&&(w+="c.scheme+":"),w+="//",c.auth&&(w+=c.auth+"@"),c.host&&(w+=c.host),c.port&&(w+=":"+c.port),c.path&&(w+=c.path),w}o.urlGenerate=p;function" s(c){var="" c;w="k.path}for(var" o="o.isAbsolute(w),L=w.split(/\/+/),j,B=0,U=L.length-1;U">=0;U--)j=L[U],j==="."?L.splice(U,1):j===".."?B++:B>0&&(j===""?(L.splice(U+1,B),B=0):(L.splice(U,2),B--));return
|
|
|
|
w=L.join("/"),w===""&&(w=O?"/":"."),k?(k.path=w,p(k)):w}o.normalize=S;function
|
|
b(c,w){c===""&&(c="."),w===""&&(w=".");var
|
|
k=h(w),O=h(c);if(O&&(c=O.path||"/"),k&&!k.scheme)return
|
|
O&&(k.scheme=O.scheme),p(k);if(k||w.match(u))return
|
|
w;if(O&&!O.host&&!O.path)return O.host=w,p(O);var
|
|
L=w.charAt(0)==="/"?w:S(c.replace(/\/+$/,"")+"/"+w);return
|
|
O?(O.path=L,p(O)):L}o.join=b,o.isAbsolute=function(c){return
|
|
c.charAt(0)==="/"||l.test(c)};function
|
|
g(c,w){c===""&&(c="."),c=c.replace(/\/$/,"");for(var
|
|
k=0;w.indexOf(c+"/")!==0;){var
|
|
O=c.lastIndexOf("/");if(O<0||(c=c.slice(0,O),c.match(/^([^\/]+:\/)?\/*$/)))return
|
|
w;++k}return
|
|
Array(k+1).join("../")+w.substr(c.length+1)}o.relative=g;var
|
|
x=function(){var c=Object.create(null);return!("__proto__"in
|
|
c)}();function y(c){return c}function A(c){return
|
|
_(c)?"$"+c:c}o.toSetString=x?y:A;function m(c){return
|
|
_(c)?c.slice(1):c}o.fromSetString=x?y:m;function _(c){if(!c)return!1;var
|
|
|
|
w=c.length;if(w<9||c.charCodeAt(w-1)!==95||c.charCodeAt(w-2)!==95||c.charCodeAt(w-3)!==111||c.charCodeAt(w-4)!==116||c.charCodeAt(w-5)!==111||c.charCodeAt(w-6)!==114||c.charCodeAt(w-7)!==112||c.charCodeAt(w-8)!==95||c.charCodeAt(w-9)!==95)return!1;for(var
|
|
k=w-10;k>=0;k--)if(c.charCodeAt(k)!==36)return!1;return!0}function
|
|
R(c,w,k){var O=W(c.source,w.source);return
|
|
O!==0||(O=c.originalLine-w.originalLine,O!==0)||(O=c.originalColumn-w.originalColumn,O!==0||k)||(O=c.generatedColumn-w.generatedColumn,O!==0)||(O=c.generatedLine-w.generatedLine,O!==0)?O:W(c.name,w.name)}o.compareByOriginalPositions=R;function
|
|
I(c,w,k){var O=c.generatedLine-w.generatedLine;return
|
|
O!==0||(O=c.generatedColumn-w.generatedColumn,O!==0||k)||(O=W(c.source,w.source),O!==0)||(O=c.originalLine-w.originalLine,O!==0)||(O=c.originalColumn-w.originalColumn,O!==0)?O:W(c.name,w.name)}o.compareByGeneratedPositionsDeflated=I;function
|
|
W(c,w){return c===w?0:c===null?1:w===null?-1:c>w?1:-1}function
|
|
N(c,w){var k=c.generatedLine-w.generatedLine;return
|
|
k!==0||(k=c.generatedColumn-w.generatedColumn,k!==0)||(k=W(c.source,w.source),k!==0)||(k=c.originalLine-w.originalLine,k!==0)||(k=c.originalColumn-w.originalColumn,k!==0)?k:W(c.name,w.name)}o.compareByGeneratedPositionsInflated=N;function
|
|
T(c){return
|
|
JSON.parse(c.replace(/^\)]}'[^\n]*\n/,""))}o.parseSourceMapInput=T;function
|
|
|
|
E(c,w,k){if(w=w||"",c&&(c[c.length-1]!=="/"&&w[0]!=="/"&&(c+="/"),w=c+w),k){var
|
|
O=h(k);if(!O)throw new Error("sourceMapURL could not be
|
|
parsed");if(O.path){var
|
|
L=O.path.lastIndexOf("/");L>=0&&(O.path=O.path.substring(0,L+1))}w=b(p(O),w)}return
|
|
S(w)}o.computeSourceURL=E})(gn);var
|
|
sl={},ul=gn,fl=Object.prototype.hasOwnProperty,$r=typeof
|
|
Map!="undefined";function Mr(){this._array=[],this._set=$r?new
|
|
Map:Object.create(null)}Mr.fromArray=function(a,l){for(var u=new
|
|
Mr,h=0,p=a.length;h<p;h++)u.add(a[h],l);return u},mr.prototype.size="function(){return" $r?this._set.size:object.getownpropertynames(this._set).length},mr.prototype.add="function(a,l){var" u="$r?a:ul.toSetString(a),h=$r?this.has(a):fl.call(this._set,u),p=this._array.length;(!h||l)&&this._array.push(a),h||($r?this._set.set(a,p):this._set[u]=p)},Mr.prototype.has=function(a){if($r)return" this._set.has(a);var="" l="ul.toSetString(a);return" fl.call(this._set,l)},mr.prototype.indexof="function(a){if($r){var">=0)return
|
|
l}else{var u=ul.toSetString(a);if(fl.call(this._set,u))return
|
|
this._set[u]}throw new Error('"'+a+'" is not in the
|
|
set.')},Mr.prototype.at=function(a){if(a>=0&&a<this._array.length)return this._array[a];throw="" new="" error("no="" element="" indexed="" by="" "+a)},mr.prototype.toarray="function(){return" this._array.slice()},sl.arrayset="Mr;var" ks="{},Ss=gn;function" xd(o,a){var="" l="o.generatedLine,u=a.generatedLine,h=o.generatedColumn,p=a.generatedColumn;return" u="">l||u==l&&p>=h||Ss.compareByGeneratedPositionsInflated(o,a)<=0}function
|
|
|
|
Xi(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Xi.prototype.unsortedForEach=function(a,l){this._array.forEach(a,l)},Xi.prototype.add=function(a){xd(this._last,a)?(this._last=a,this._array.push(a)):(this._sorted=!1,this._array.push(a))},Xi.prototype.toArray=function(){return
|
|
|
|
this._sorted||(this._array.sort(Ss.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},ks.MappingList=Xi;var
|
|
Yn=qi,mt=gn,Yi=sl.ArraySet,kd=ks.MappingList;function
|
|
er(o){o||(o={}),this._file=mt.getArg(o,"file",null),this._sourceRoot=mt.getArg(o,"sourceRoot",null),this._skipValidation=mt.getArg(o,"skipValidation",!1),this._sources=new
|
|
Yi,this._names=new Yi,this._mappings=new
|
|
kd,this._sourcesContents=null}er.prototype._version=3,er.fromSourceMap=function(a){var
|
|
l=a.sourceRoot,u=new er({file:a.file,sourceRoot:l});return
|
|
a.eachMapping(function(h){var
|
|
p={generated:{line:h.generatedLine,column:h.generatedColumn}};h.source!=null&&(p.source=h.source,l!=null&&(p.source=mt.relative(l,p.source)),p.original={line:h.originalLine,column:h.originalColumn},h.name!=null&&(p.name=h.name)),u.addMapping(p)}),a.sources.forEach(function(h){var
|
|
|
|
p=h;l!==null&&(p=mt.relative(l,h)),u._sources.has(p)||u._sources.add(p);var
|
|
|
|
S=a.sourceContentFor(h);S!=null&&u.setSourceContent(h,S)}),u},er.prototype.addMapping=function(a){var
|
|
|
|
l=mt.getArg(a,"generated"),u=mt.getArg(a,"original",null),h=mt.getArg(a,"source",null),p=mt.getArg(a,"name",null);this._skipValidation||this._validateMapping(l,u,h,p),h!=null&&(h=String(h),this._sources.has(h)||this._sources.add(h)),p!=null&&(p=String(p),this._names.has(p)||this._names.add(p)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:h,name:p})},er.prototype.setSourceContent=function(a,l){var
|
|
|
|
u=a;this._sourceRoot!=null&&(u=mt.relative(this._sourceRoot,u)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[mt.toSetString(u)]=l):this._sourcesContents&&(delete
|
|
|
|
this._sourcesContents[mt.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},er.prototype.applySourceMap=function(a,l,u){var
|
|
h=l;if(l==null){if(a.file==null)throw new
|
|
Error(`SourceMapGenerator.prototype.applySourceMap requires either an
|
|
explicit source file, or the source map's "file" property. Both were
|
|
omitted.`);h=a.file}var
|
|
p=this._sourceRoot;p!=null&&(h=mt.relative(p,h));var S=new
|
|
Yi,b=new
|
|
Yi;this._mappings.unsortedForEach(function(g){if(g.source===h&&g.originalLine!=null){var
|
|
|
|
x=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});x.source!=null&&(g.source=x.source,u!=null&&(g.source=mt.join(u,g.source)),p!=null&&(g.source=mt.relative(p,g.source)),g.originalLine=x.line,g.originalColumn=x.column,x.name!=null&&(g.name=x.name))}var
|
|
y=g.source;y!=null&&!S.has(y)&&S.add(y);var
|
|
A=g.name;A!=null&&!b.has(A)&&b.add(A)},this),this._sources=S,this._names=b,a.sources.forEach(function(g){var
|
|
|
|
x=a.sourceContentFor(g);x!=null&&(u!=null&&(g=mt.join(u,g)),p!=null&&(g=mt.relative(p,g)),this.setSourceContent(g,x))},this)},er.prototype._validateMapping=function(a,l,u,h){if(l&&typeof
|
|
l.line!="number"&&typeof l.column!="number")throw new
|
|
Error("original.line and original.column are not numbers -- you probably
|
|
meant to omit the original mapping entirely and only map the generated
|
|
position. If so, pass null for the original mapping instead of an object
|
|
with empty or null values.");if(!(a&&"line"in
|
|
a&&"column"in
|
|
a&&a.line>0&&a.column>=0&&!l&&!u&&!h)){if(a&&"line"in
|
|
a&&"column"in a&&l&&"line"in
|
|
l&&"column"in
|
|
l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&u)return;throw
|
|
new Error("Invalid mapping:
|
|
"+JSON.stringify({generated:a,source:u,original:l,name:h}))}},er.prototype._serializeMappings=function(){for(var
|
|
|
|
a=0,l=1,u=0,h=0,p=0,S=0,b="",g,x,y,A,m=this._mappings.toArray(),_=0,R=m.length;_<r;_++){if(x=m[_],g="",x.generatedline!==l)for(a=0;x.generatedline!==l;)g+=";",l++;else if(_="">0){if(!mt.compareByGeneratedPositionsInflated(x,m[_-1]))continue;g+=","}g+=Yn.encode(x.generatedColumn-a),a=x.generatedColumn,x.source!=null&&(A=this._sources.indexOf(x.source),g+=Yn.encode(A-S),S=A,g+=Yn.encode(x.originalLine-1-h),h=x.originalLine-1,g+=Yn.encode(x.originalColumn-u),u=x.originalColumn,x.name!=null&&(y=this._names.indexOf(x.name),g+=Yn.encode(y-p),p=y)),b+=g}return
|
|
b},er.prototype._generateSourcesContent=function(a,l){return
|
|
a.map(function(u){if(!this._sourcesContents)return
|
|
null;l!=null&&(u=mt.relative(l,u));var
|
|
h=mt.toSetString(u);return
|
|
Object.prototype.hasOwnProperty.call(this._sourcesContents,h)?this._sourcesContents[h]:null},this)},er.prototype.toJSON=function(){var
|
|
|
|
a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return
|
|
|
|
this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},er.prototype.toString=function(){return
|
|
JSON.stringify(this.toJSON())},ol.SourceMapGenerator=er;var
|
|
Qi={},Cs={};(function(o){o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2;function
|
|
a(l,u,h,p,S,b){var g=Math.floor((u-l)/2)+l,x=S(h,p[g],!0);return
|
|
x===0?g:x>0?u-g>1?a(g,u,h,p,S,b):b==o.LEAST_UPPER_BOUND?u<p.length?u:-1:g:g-l>1?a(l,g,h,p,S,b):b==o.LEAST_UPPER_BOUND?g:l<0?-1:l}o.search=function(u,h,p,S){if(h.length===0)return-1;var
|
|
|
|
b=a(-1,h.length,u,h,p,S||o.GREATEST_LOWER_BOUND);if(b<0)return-1;for(;b-1>=0&&p(h[b],h[b-1],!0)===0;)--b;return
|
|
b}})(Cs);var Ls={};function cl(o,a,l){var
|
|
u=o[a];o[a]=o[l],o[l]=u}function Sd(o,a){return
|
|
Math.round(o+Math.random()*(a-o))}function hl(o,a,l,u){if(l<u){var h="Sd(l,u),p=l-1;cl(o,h,u);for(var" s="o[u],b=l;b<u;b++)a(o[b],S)<=0&&(p+=1,cl(o,p,b));cl(o,p+1,b);var" g="p+1;hl(o,a,l,g-1),hl(o,a,g+1,u)}}Ls.quickSort=function(o,a){hl(o,a,0,o.length-1)};var" ke="gn,dl=Cs,vn=sl.ArraySet,Cd=qi,Qn=Ls.quickSort;function" tt(o,a){var="" l="o;return" typeof="" o="="string"&&(l=ke.parseSourceMapInput(o)),l.sections!=null?new" or(l,a):new="" mt(l,a)}tt.fromsourcemap="function(o,a){return" mt.fromsourcemap(o,a)},tt.prototype._version="3,tt.prototype.__generatedMappings=null,Object.defineProperty(tt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return" this.__generatedmappings||this._parsemappings(this._mappings,this.sourceroot),this.__generatedmappings}}),tt.prototype.__originalmappings="null,Object.defineProperty(tt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return" this.__originalmappings||this._parsemappings(this._mappings,this.sourceroot),this.__originalmappings}}),tt.prototype._charismappingseparator="function(a,l){var" u="a.charAt(l);return" new="" error("subclasses="" must="" implement="" _parsemappings")},tt.generated_order="1,tt.ORIGINAL_ORDER=2,tt.GREATEST_LOWER_BOUND=1,tt.LEAST_UPPER_BOUND=2,tt.prototype.eachMapping=function(a,l,u){var" tt.generated_order:s="this._generatedMappings;break;case" tt.original_order:s="this._originalMappings;break;default:throw" error("unknown="" order="" of="" iteration.")}var="" b="this.sourceRoot;S.map(function(g){var" x="g.source===null?null:this._sources.at(g.source);return">=0){var
|
|
S=this._originalMappings[p];if(a.column===void 0)for(var
|
|
b=S.originalLine;S&&S.originalLine===b;)h.push({line:ke.getArg(S,"generatedLine",null),column:ke.getArg(S,"generatedColumn",null),lastColumn:ke.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++p];else
|
|
for(var
|
|
g=S.originalColumn;S&&S.originalLine===l&&S.originalColumn==g;)h.push({line:ke.getArg(S,"generatedLine",null),column:ke.getArg(S,"generatedColumn",null),lastColumn:ke.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++p]}return
|
|
h},Qi.SourceMapConsumer=tt;function Mt(o,a){var l=o;typeof
|
|
o=="string"&&(l=ke.parseSourceMapInput(o));var
|
|
u=ke.getArg(l,"version"),h=ke.getArg(l,"sources"),p=ke.getArg(l,"names",[]),S=ke.getArg(l,"sourceRoot",null),b=ke.getArg(l,"sourcesContent",null),g=ke.getArg(l,"mappings"),x=ke.getArg(l,"file",null);if(u!=this._version)throw
|
|
new Error("Unsupported version:
|
|
"+u);S&&(S=ke.normalize(S)),h=h.map(String).map(ke.normalize).map(function(y){return
|
|
|
|
S&&ke.isAbsolute(S)&&ke.isAbsolute(y)?ke.relative(S,y):y}),this._names=vn.fromArray(p.map(String),!0),this._sources=vn.fromArray(h,!0),this._absoluteSources=this._sources.toArray().map(function(y){return
|
|
|
|
ke.computeSourceURL(S,y,a)}),this.sourceRoot=S,this.sourcesContent=b,this._mappings=g,this._sourceMapURL=a,this.file=x}Mt.prototype=Object.create(tt.prototype),Mt.prototype.consumer=tt,Mt.prototype._findSourceIndex=function(o){var
|
|
|
|
a=o;if(this.sourceRoot!=null&&(a=ke.relative(this.sourceRoot,a)),this._sources.has(a))return
|
|
this._sources.indexOf(a);var l;for(l=0;l<this._absolutesources.length;++l)if(this._absolutesources[l]==o)return l;return-1},mt.fromsourcemap="function(a,l){var" u="Object.create(Mt.prototype),h=u._names=vn.fromArray(a._names.toArray(),!0),p=u._sources=vn.fromArray(a._sources.toArray(),!0);u.sourceRoot=a._sourceRoot,u.sourcesContent=a._generateSourcesContent(u._sources.toArray(),u.sourceRoot),u.file=a._file,u._sourceMapURL=l,u._absoluteSources=u._sources.toArray().map(function(_){return" ke.computesourceurl(u.sourceroot,_,l)});for(var="" s="a._mappings.toArray().slice(),b=u.__generatedMappings=[],g=u.__originalMappings=[],x=0,y=S.length;x<y;x++){var" a="S[x],m=new" ts;m.generatedline="A.generatedLine,m.generatedColumn=A.generatedColumn,A.source&&(m.source=p.indexOf(A.source),m.originalLine=A.originalLine,m.originalColumn=A.originalColumn,A.name&&(m.name=h.indexOf(A.name)),g.push(m)),b.push(m)}return" qn(u.__originalmappings,ke.comparebyoriginalpositions),u},mt.prototype._version="3,Object.defineProperty(Mt.prototype,"sources",{get:function(){return" this._absolutesources.slice()}});function="" ts(){this.generatedline="0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Mt.prototype._parseMappings=function(a,l){for(var" if(a.charat(y)="==",")y++;else{for(I=new" ts,i.generatedline="u,T=y;T<x&&!this._charIsMappingSeparator(a,T);T++);if(W=a.slice(y,T),N=A[W],N)y+=W.length;else{for(N=[];y<T;)Cd.decode(a,y,m),E=m.value,y=m.rest,N.push(E);if(N.length===2)throw" new="" error("found="" source,="" but="" no="" line="" and="" column");if(n.length="==3)throw" source="" line,="" column");a[w]="N}I.generatedColumn=h+N[0],h=I.generatedColumn,N.length">1&&(I.source=b+N[1],b+=N[1],I.originalLine=p+N[2],p=I.originalLine,I.originalLine+=1,I.originalColumn=S+N[3],S=I.originalColumn,N.length>4&&(I.name=g+N[4],g+=N[4])),R.push(I),typeof
|
|
|
|
I.originalLine=="number"&&_.push(I)}Qn(R,ke.compareByGeneratedPositionsDeflated),this.__generatedMappings=R,Qn(_,ke.compareByOriginalPositions),this.__originalMappings=_},Mt.prototype._findMapping=function(a,l,u,h,p,S){if(a[u]<=0)throw
|
|
new TypeError("Line must be greater than or equal to 1, got
|
|
"+a[u]);if(a[h]<0)throw new TypeError("Column must be greater than or
|
|
equal to 0, got "+a[h]);return
|
|
dl.search(a,l,p,S)},Mt.prototype.computeColumnSpans=function(){for(var
|
|
a=0;a<this._generatedmappings.length;++a){var l="this._generatedMappings[a];if(a+1<this._generatedMappings.length){var" u="this._generatedMappings[a+1];if(l.generatedLine===u.generatedLine){l.lastGeneratedColumn=u.generatedColumn-1;continue}}l.lastGeneratedColumn=1/0}},Mt.prototype.originalPositionFor=function(a){var">=0){var
|
|
h=this._generatedMappings[u];if(h.generatedLine===l.generatedLine){var
|
|
p=ke.getArg(h,"source",null);p!==null&&(p=this._sources.at(p),p=ke.computeSourceURL(this.sourceRoot,p,this._sourceMapURL));var
|
|
S=ke.getArg(h,"name",null);return
|
|
S!==null&&(S=this._names.at(S)),{source:p,line:ke.getArg(h,"originalLine",null),column:ke.getArg(h,"originalColumn",null),name:S}}}return{source:null,line:null,column:null,name:null}},Mt.prototype.hasContentsOfAllSources=function(){return
|
|
|
|
this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return
|
|
|
|
a==null}):!1},Mt.prototype.sourceContentFor=function(a,l){if(!this.sourcesContent)return
|
|
null;var u=this._findSourceIndex(a);if(u>=0)return
|
|
this.sourcesContent[u];var
|
|
h=a;this.sourceRoot!=null&&(h=ke.relative(this.sourceRoot,h));var
|
|
|
|
p;if(this.sourceRoot!=null&&(p=ke.urlParse(this.sourceRoot))){var
|
|
|
|
S=h.replace(/^file:\/\//,"");if(p.scheme=="file"&&this._sources.has(S))return
|
|
|
|
this.sourcesContent[this._sources.indexOf(S)];if((!p.path||p.path=="/")&&this._sources.has("/"+h))return
|
|
this.sourcesContent[this._sources.indexOf("/"+h)]}if(l)return
|
|
null;throw new Error('"'+h+'" is not in the
|
|
SourceMap.')},Mt.prototype.generatedPositionFor=function(a){var
|
|
l=ke.getArg(a,"source");if(l=this._findSourceIndex(l),l<0)return{line:null,column:null,lastColumn:null};var
|
|
|
|
u={source:l,originalLine:ke.getArg(a,"line"),originalColumn:ke.getArg(a,"column")},h=this._findMapping(u,this._originalMappings,"originalLine","originalColumn",ke.compareByOriginalPositions,ke.getArg(a,"bias",tt.GREATEST_LOWER_BOUND));if(h>=0){var
|
|
|
|
p=this._originalMappings[h];if(p.source===u.source)return{line:ke.getArg(p,"generatedLine",null),column:ke.getArg(p,"generatedColumn",null),lastColumn:ke.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Qi.BasicSourceMapConsumer=Mt;function
|
|
or(o,a){var l=o;typeof
|
|
o=="string"&&(l=ke.parseSourceMapInput(o));var
|
|
u=ke.getArg(l,"version"),h=ke.getArg(l,"sections");if(u!=this._version)throw
|
|
new Error("Unsupported version: "+u);this._sources=new
|
|
vn,this._names=new vn;var
|
|
p={line:-1,column:0};this._sections=h.map(function(S){if(S.url)throw new
|
|
Error("Support for url field in sections not implemented.");var
|
|
b=ke.getArg(S,"offset"),g=ke.getArg(b,"line"),x=ke.getArg(b,"column");if(g<p.line||g===p.line&&x<p.column)throw new="" error("section="" offsets="" must="" be="" ordered="" and="" non-overlapping.");return="" p="b,{generatedOffset:{generatedLine:g+1,generatedColumn:x+1},consumer:new" tt(ke.getarg(s,"map"),a)}})}or.prototype="Object.create(tt.prototype),or.prototype.constructor=tt,or.prototype._version=3,Object.defineProperty(or.prototype,"sources",{get:function(){for(var" o="[],a=0;a<this._sections.length;a++)for(var" l="0;l<this._sections[a].consumer.sources.length;l++)o.push(this._sections[a].consumer.sources[l]);return" o}}),or.prototype.originalpositionfor="function(a){var" b="p.generatedLine-S.generatedOffset.generatedLine;return" b||p.generatedcolumn-s.generatedoffset.generatedcolumn}),h="this._sections[u];return" h?h.consumer.originalpositionfor({line:l.generatedline-(h.generatedoffset.generatedline-1),column:l.generatedcolumn-(h.generatedoffset.generatedline="==l.generatedLine?h.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},or.prototype.hasContentsOfAllSources=function(){return" this._sections.every(function(a){return="" a.consumer.hascontentsofallsources()})},or.prototype.sourcecontentfor="function(a,l){for(var" u="0;u<this._sections.length;u++){var" h="this._sections[u],p=h.consumer.sourceContentFor(a,!0);if(p)return" p}if(l)return="" null;throw="" error('"'+a+'"="" is="" not="" in="" the="" sourcemap.')},or.prototype.generatedpositionfor="function(a){for(var" p}}}return{line:null,column:null}},or.prototype._parsemappings="function(a,l){this.__generatedMappings=[],this.__originalMappings=[];for(var" x="null;b.name&&(x=h.consumer._names.at(b.name),this._names.add(x),x=this._names.indexOf(x));var" y="{source:g,generatedLine:b.generatedLine+(h.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(h.generatedOffset.generatedLine===b.generatedLine?h.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:x};this.__generatedMappings.push(y),typeof" y.originalline="="number"&&this.__originalMappings.push(y)}Qn(this.__generatedMappings,ke.compareByGeneratedPositionsDeflated),Qn(this.__originalMappings,ke.compareByOriginalPositions)},Qi.IndexedSourceMapConsumer=or;var" ms="{},Ld=ol.SourceMapGenerator,$i=gn,Td=/(\r?\n)/,Md=10,mn="$$$isSourceNode$$$";function" yt(o,a,l,u,h){this.children="[],this.sourceContents={},this.line=o==null?null:o,this.column=a==null?null:a,this.source=l==null?null:l,this.name=h==null?null:h,this[mn]=!0,u!=null&&this.add(u)}Yt.fromStringWithSourceMap=function(a,l,u){var" yt,p="a.split(Td),S=0,b=function(){var" m="R(),_=R()||"";return" m+_;function="" r(){return="" s<p.length?p[s++]:void="" 0}},g="1,x=0,y=null;return" l.eachmapping(function(m){if(y!="=null)if(g<m.generatedLine)A(y,b()),g++,x=0;else{var" _="p[S]||"",R=_.substr(0,m.generatedColumn-x);p[S]=_.substr(m.generatedColumn-x),x=m.generatedColumn,A(y,R),y=m;return}for(;g<m.generatedLine;)h.add(b()),g++;if(x<m.generatedColumn){var" a(m,_){if(m="==null||m.source===void" 0)h.add(_);else{var="" r="u?$i.join(u,m.source):m.source;h.add(new" yt(m.originalline,m.originalcolumn,r,_,m.name))}}},yt.prototype.add="function(a){if(Array.isArray(a))a.forEach(function(l){this.add(l)},this);else" if(a[mn]||typeof="" a="="string")a&&this.children.push(a);else" throw="" typeerror("expected="" sourcenode,="" string,="" or="" an="" array="" of="" sourcenodes="" strings.="" got="" "+a);return="" this},yt.prototype.prepend="function(a){if(Array.isArray(a))for(var">=0;l--)this.prepend(a[l]);else
|
|
if(a[mn]||typeof a=="string")this.children.unshift(a);else throw new
|
|
TypeError("Expected a SourceNode, string, or an array of SourceNodes and
|
|
strings. Got "+a);return this},Yt.prototype.walk=function(a){for(var
|
|
l,u=0,h=this.children.length;u<h;u++)l=this.children[u],l[mn]?l.walk(a):l!==""&&a(l,{source:this.source,line:this.line,column:this.column,name:this.name})},yt.prototype.join=function(a){var l,u,h="this.children.length;if(h">0){for(l=[],u=0;u<h-1;u++)l.push(this.children[u]),l.push(a);l.push(this.children[u]),this.children=l}return this},yt.prototype.replaceright="function(a,l){var" u="this.children[this.children.length-1];return" u[mn]?u.replaceright(a,l):typeof="" l="0,u=this.children.length;l<u;l++)this.children[l][mn]&&this.children[l].walkSourceContents(a);for(var" h="Object.keys(this.sourceContents),l=0,u=h.length;l<u;l++)a($i.fromSetString(h[l]),this.sourceContents[h[l]])},Yt.prototype.toString=function(){var" a="" ;return="" this.walk(function(l){a+="l}),a},Yt.prototype.toStringWithSourceMap=function(a){var" ld(a),h="!1,p=null,S=null,b=null,g=null;return" this.walk(function(x,y){l.code+="x,y.source!==null&&y.line!==null&&y.column!==null?((p!==y.source||S!==y.line||b!==y.column||g!==y.name)&&u.addMapping({source:y.source,original:{line:y.line,column:y.column},generated:{line:l.line,column:l.column},name:y.name}),p=y.source,S=y.line,b=y.column,g=y.name,h=!0):h&&(u.addMapping({generated:{line:l.line,column:l.column}}),p=null,h=!1);for(var" ad="navigator.userAgent.indexOf("Firefox")!==-1;function" od(o){let="">S.onchange(o.state),p=V=>pe=>(V(pe),h());o.selected.map(V=>o.state.selected=V.url||V.name);const
|
|
|
|
S={onchange:()=>{},setMiddle:V=>o.state.middle=V,toggleConsole:p(V=>o.state.console=o.state.console===!0?"collapsed":!0),resetSize:p(()=>S.setMiddle(50)),loaded:()=>{o.loading=!1,o.console.clearOnNext&&(o.console.output=[],o.console.clearOnNext=!1),typeof
|
|
|
|
S.onloaded=="function"&&S.onloaded(o.state)},fileSelectionChange:z,selectFileByIndex:L,toggleAutoReload:I,onConsoleKeyDown:T,onConsoleInput:N,consoleOutput:Q,startDragging:_,stopDragging:R,changeMiddle:te,setShareUrl:m,clearErrors:x,clearLogs:y,fileChange:X,initIframe:j,setState:A,resizing:ue,refresh:de,getLink:k,select:O,scroll:W};return
|
|
b(),S;function
|
|
b(){Promise.all(o.state.links.map(k)).then(()=>de({force:!0}))}function
|
|
g(){o.console.output=[{content:[Le("i","Console was
|
|
cleared")]}]}function
|
|
x(){o.console.output=o.console.output.filter(V=>V.type!=="error")}function
|
|
|
|
y(){o.console.output=o.console.output.filter(V=>V.type==="error")}function
|
|
|
|
A(V){o.state=$a(V),O(Gn(o.state,o.state.selected),!0),D(),Le.redraw()}function
|
|
|
|
m({dom:V}){V.addEventListener("mousedown",pe=>{V.href=Za(o.state)},!0)}function
|
|
_(){o.dragging=!0}function
|
|
R(){o.dragging=!1,o.refreshCm(!0),h()}function
|
|
I(){o.state.autoReload=!o.state.autoReload,h(),o.state.autoReload&&de()}function
|
|
W(V){o.state.scroll=V,h()}function
|
|
N(V){o.console.input=V.target.value}function
|
|
T(V){if((V.key==="Enter"||V.keyCode===13)&&!V.shiftKey&&!V.altKey)return
|
|
V.preventDefault(),o.console.output.push({type:"input",content:[">
|
|
"+o.console.input],number:"i"+o.console.inputNumber++}),o.console.input.indexOf("console.clear()")===0&&g(),E(),!1;(V.key==="ArrowUp"||V.keyCode===38)&&(o.console.historyNavigated||V.target.selectionStart===0)?(V.preventDefault(),c()):(V.key==="ArrowDown"||V.keyCode===40)&&(o.console.historyNavigated||o.console.input==="")?(V.preventDefault(),w()):o.console.historyNavigated=!1}function
|
|
|
|
E(V){!o.console.input||(o.iframe.contentWindow.postMessage({name:"eval",content:o.console.input},"*"),o.console.position=o.console.history.push(o.console.input),o.console.input="")}function
|
|
|
|
c(){o.console.historyNavigated=!0,o.console.position>=0&&(o.console.position-=1),o.console.input=o.console.history[o.console.position]||""}function
|
|
w(){o.console.historyNavigated=!0,o.console.position<o.console.history.length&&(o.console.position+=1),o.console.input=o.console.history[o.console.position]||""}function k(v){if(!v.content)return="" le.request(v.url,{responsetype:"text"}).then(pe="">{pe=pe.replace(/\r\n/g,`
|
|
`),!(pe.length>3e5)&&(V.content=pe,V.patched=V.patches?pd(pe,V.patches)[0]:pe,o.selected()===V&&O(V))}).catch(()=>{})}function
|
|
O(V,pe){typeof
|
|
V=="string"&&(V=Gn(o.state,V)),o.selected(V),!pe&&h()}function
|
|
L(V){const
|
|
pe=o.state.files.concat(o.state.links)[V];pe&&O(pe)}function
|
|
j(V){o.iframe=V,o.iframe.addEventListener("load",B)}function
|
|
B(){o.iframe.contentWindow.postMessage({name:"init",content:{id:o.id,state:{scroll:o.state.scroll,files:u,links:o.state.links.map(V=>({type:V.type,name:V.name,url:V.url,content:V.patched||V.content}))}}},"*")}function
|
|
U(V){const
|
|
pe=V.compiler==="function"?V.compiler:Qa[V.compiler||Ri(V.name)];return
|
|
pe?pe(V).then(Ne=>(Ne.error&&Q(Ne.error),Ne.map&&(V.map=Ne.map),{name:V.name,type:V.type,content:Ne.code})).catch(Ne=>(Q({content:["Error
|
|
compiling
|
|
"+V.compiler+":",Ph(Ne)],type:"error",stack:[]}),{name:V.name,type:V.type,content:V.content})):{name:V.name,type:V.type,content:V.content}}function
|
|
|
|
Q(V){o.console.clearOnNext&&(o.console.output=[],o.console.clearOnNext=!1),V.stack.forEach(pe=>{const
|
|
Ne=Gn(o.state,pe.file);if(!Ne||!Ne.map)return;const je=new
|
|
ji.SourceMapConsumer(Ne.map).originalPositionFor({line:pe.line,column:pe.column});pe.line=je.line,pe.column=je.column}),V.content&&!Array.isArray(V.content)&&(V.content=[V.content]),o.console.output.push(V)}function
|
|
|
|
X(V,pe,Ne){V.url?V.patched=pe:V.content=pe,Ne&&(V.selections=Ne==="0:0"?void
|
|
0:Ne),typeof S.onload=="function"&&S.onload(),D(V),h()}function
|
|
D(V){clearTimeout(l),l=setTimeout(()=>{if(!V)return
|
|
de();V.url&&(V.patches=cd(V.content,V.patched)),o.state.autoReload&&(V.type==="style"||V.type==="css")?(o.iframe.contentWindow.postMessage({name:"css",content:{name:V.name,url:V.url,content:V.patched||V.content}},"*"),typeof
|
|
|
|
S.onloaded=="function"&&S.onloaded(o.state),h()):de()},o.state.autoReloadDelay||400)}function
|
|
z(V,pe){pe=pe==="0:0"?void
|
|
0:pe,pe!==V.selections&&(V.selections=pe,h())}function
|
|
te(V){const{top:pe,left:Ne}=o.dom.getBoundingClientRect();o.state.middle=Math.min(Math.max(Math.round((o.vertical()?(V.clientY-pe+5)/(o.dom.offsetHeight-o.console.dom.offsetHeight):(V.clientX-Ne+5)/o.dom.offsetWidth)*1e4)/100,0),100),Le.redraw()}function
|
|
|
|
ue(){o.iOS||(o.resizing=!0,clearTimeout(a),a=setTimeout(()=>{o.resizing=!1,Le.redraw()},1e3))}function
|
|
de(V={}){if(!V.force&&!o.state.autoReload)return
|
|
o.hasChanges=!0;o.hasChanges=!1,o.loading=!0,o.console.clearOnNext=!0,Promise.all(o.state.files.map(U)).then(Me),Le.redraw()}function
|
|
Me(V){if(!o.iframe)return
|
|
setTimeout(Me,10,V);Ad&&(o.iframe.src+="?"),u=V,o.iframe.src=o.runtimeUrl}}var
|
|
_d={listen:(o,a)=>{const
|
|
l={loaded:a.loaded,console:a.consoleOutput,resize:a.resizing,scroll:a.scroll};window.addEventListener("message",({data:u})=>{u.flems!==o.id||!(u.name
|
|
in l)||(l[u.name](u.content),Le.redraw())})}};let As=!1;function
|
|
Zi(o,a={},l){const u=Sh(o,a,l),h=Od(u);return
|
|
As||(window.addEventListener("resize",()=>Le.redraw()),As=!0),_d.listen(u,h),Le.mount(o,{view:()=>bh(u,h)}),{focus:u.focus,reload:()=>h.refresh({force:!0}),onchange:p=>h.onchange=p,onload:p=>h.onload=p,onloaded:p=>h.onloaded=p,getLink:h.getLink,set:h.setState,redraw:Le.redraw}}return
|
|
Zi.defaults=Bi,Zi.createFlemsIoLink=Za,Zi.version="1.5.8",Zi});
|
|
//# sourceMappingURL=flems.js.map
|
|
// --></o.console.history.length&&(o.console.position+=1),o.console.input=o.console.history[o.console.position]||""}function></h-1;u++)l.push(this.children[u]),l.push(a);l.push(this.children[u]),this.children=l}return></h;u++)l=this.children[u],l[mn]?l.walk(a):l!==""&&a(l,{source:this.source,line:this.line,column:this.column,name:this.name})},yt.prototype.join=function(a){var></p.line||g===p.line&&x<p.column)throw></this._generatedmappings.length;++a){var></this._absolutesources.length;++l)if(this._absolutesources[l]==o)return></u){var></p.length?u:-1:g:g-l></r;_++){if(x=m[_],g="",x.generatedline!==l)for(a=0;x.generatedline!==l;)g+=";",l++;else></this._array.length)return></p;h++)u.add(a[h],l);return></s),s+=al}while(b);u.value=wd(p),u.rest=l};var></ms.length)return></o.length;l++){if(o[l].length1<=a)continue;const></o.length;p++)o[p].start1+=a,o[p].start2+=a;let></a[p].diffs.length;r++){const></o.length;l++){const></h.length;m++){const></tr-ir-ir;)u+=ir,l=a.substring(o.start2-u,o.start2+o.length1+u);u+=ir;const></a.length-1;s=-1;let></o.length-1;)o[a-1][0]===ue&&o[a+1][0]===ue&&(o[a][1].substring(o[a][1].length-o[a-1][1].length)===o[a-1][1]?(o[a][1]=o[a-1][1]+o[a][1].substring(0,o[a][1].length-o[a-1][1].length),o[a+1][1]=o[a-1][1]+o[a+1][1],o.splice(a-1,1),b=!0):o[a][1].substring(0,o[a+1][1].length)===o[a+1][1]&&(o[a-1][1]+=o[a+1][1],o[a][1]=o[a][1].substring(o[a+1][1].length)+o[a+1][1],o.splice(a+1,1),b=!0)),a++;b&&ki(o)}function></o.length;)o[a][0]===ht&&(u++,p+=o[a][1],a++),o[a][0]===at&&(l++,h+=o[a][1],a++),o[a][0]===ue&&(l+u></o.length;)o[p][0]===ue?(o[p][1].length<os&&(g||x)?(l[u++]=p,s=g,b=x,h=o[p][1]):(u=0,h=null),g=x=!1):(o[p][0]===at?x=!0:g=!0,h&&(s&&b&&g&&x||h.length<os></o.length-1;){if(o[l-1][0]===ue&&o[l+1][0]===ue){let></o.length;){if(o[p-1][0]===at&&o[p][0]===ht){const></o.length;)o[p][0]===ue?(l[u++]=p,s=g,b=x,g=0,x=0,h=o[p][1]):(o[p][0]===ht?g+=o[p][1].length:x+=o[p][1].length,h&&h.length<=math.max(s,b)&&h.length<=math.max(g,x)&&(o.splice(l[u-1],0,[at,h]),o[l[u-1]+1][0]=ht,u--,u--,p=u></l.length)return></u&&(a=a.substring(0,l));const></b.length-1;){y=b.indexof(`></b&&g[w]!==-1){const></x[t+1]?e=x[t+1]:e=x[t-1]+1;let></b&&x[w]!==-1){const></g[t+1]?e=g[t+1]:e=g[t-1]+1;let></b;w++)g[w]=-1,x[w]=-1;g[s+1]=0,x[s+1]=0;const></p.length;){if(p[s][0]===ht)g++,y+=p[s][1];else></u;l++)if(o[l]===a)return></y.length;a++)x+="></o.offsetheight,toolbar:()=></c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></c;a++)k=k<<1|m,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=0;for(m=n.charcodeat(0),a=0;a<16;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></c;a++)k=k<<1,o==x-1?(o=0,w.push(y(k)),k=0):o++;for(m=n.charcodeat(0),a=0;a<8;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></c;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></c;a++)k=k<<1|m,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=0;for(m=n.charcodeat(0),a=0;a<16;a++)k=k<<1|m&1,o==x-1?(o=0,w.push(y(k)),k=0):o++,m=m></a;y++)x[y]=g[y*2]*256+g[y*2+1];var></g.length;y++)p[g][g.charat(y)]=y}return></h.ch)return;if(></u.firstline()||y></u.firstline()||a></n.to&&g(i,t,t+1)}}})}(),function(o,a){(function(l){l(ct.exports)})(function(l){l.registerhelper("fold","brace",function(u,h){var></w.from&&(g(i,t.from,w.from),w.from=t.from),t.to></g.length;++x)if(g[x].__isfold)return!0}),l.commands.togglefold=function(b){b.foldcode(b.getcursor())},l.commands.fold=function(b){b.foldcode(b.getcursor(),null,"fold")},l.commands.unfold=function(b){b.foldcode(b.getcursor(),{scanup:!1},"unfold")},l.commands.foldall=function(b){b.operation(function(){for(var></arguments.length;q++){var></n;t++){var></m.length;n++)(n==m.length-1||m[n].head.line<m[n+1].head.line)&&y.indentline(m[n].head.line)}function></a.length;r++){if(!a[r].empty())return></v.length;pe++)v[pe]=de+v[pe]+me;n.replaceselections(v,"around"),v=n.listselections().slice();for(var></j.length;q++){var></c.length;w++){if(!c[w].empty())return></n.length;t++){var></n;++w){var></n;++w){var></w.length;o++){for(var></o?k.push(b,u):k.length&&(k[k.length-1]=u),o=u}c.operation(function(){for(var></k.length;x+=2){var></w.length;o++){var></w.length;o++)for(var></t.length;e++){var></o.length-1;z++)if(k(t.getline(c+z))!=o[z])continue></o.length-1;z++)if(k(t.getline(l+z))!=o[z])continue></k&&l></e.length;k++)w.indexof(e.charat(k))==-1&&(w+=e.charat(k));return></a.length;_++){var><span class="cleanslate TridactylStatusIndicator TridactylModenormal">normal</span></body><iframe class="cleanslate hidden" src="flems_soubory/commandline.html" id="cmdline_iframe" loading="lazy" style="height: 0px !important;"></iframe></html> |