mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Docs.git
synced 2025-11-19 21:16:31 +08:00
483 lines
468 KiB
JavaScript
483 lines
468 KiB
JavaScript
import{_ as Qp}from"./app-3f5e2946.js";import{af as ed,ag as td,ah as Hc,b as L1,ai as jc,B as yo,c as $r,m as zr,r as jn,o as E1,x as Ua,G as nd,H as Ht,I as hn,Q as N1,U as rd,F as Ft,O as Br,W as fl,M as Bi,K as Ss,Z as ho,$ as zc,ae as $a,aj as id,ak as sd,al as od,am as ad,an as ld,ao as ud,ap as cd,h as Ts,aq as qc,ar as P1,N as Uc,u as Rt,J as Lo,P as Wi,T as fd,L as O1,S as hd,as as $c,at as pd,au as dd}from"./framework-3390b3d8.js";const md=["onMousedown"],gd=$r({__name:"SplitPane",props:{layout:null},setup(n){const o=n,l=Ts(()=>o.layout==="vertical"),c=jn(),h=zr("store"),k=jn(h.initialShowOutput),I=L1({dragging:!1,split:50}),S=Ts(()=>{const{split:_}=I;return _<20?20:_>80?80:_});let w=0,x=0;function y(_){I.dragging=!0,w=l.value?_.pageY:_.pageX,x=S.value}function E(_){if(I.dragging){const F=l.value?_.pageY:_.pageX,D=l.value?c.value.offsetHeight:c.value.offsetWidth,H=F-w;I.split=x+~~(H/D*100)}}function L(){I.dragging=!1}return(_,F)=>(Ht(),hn("div",{ref_key:"container",ref:c,class:Wi(["split-pane",{dragging:I.dragging,"show-output":k.value,vertical:Rt(l)}]),onMousemove:E,onMouseup:L,onMouseleave:L},[Ft("div",{class:"left",style:Uc({[Rt(l)?"height":"width"]:Rt(S)+"%"})},[qc(_.$slots,"left",{},void 0,!0),Ft("div",{class:"dragger",onMousedown:P1(y,["prevent"])},null,40,md)],4),Ft("div",{class:"right",style:Uc({[Rt(l)?"height":"width"]:100-Rt(S)+"%"})},[qc(_.$slots,"right",{},void 0,!0)],4),Ft("button",{class:"toggler",onClick:F[0]||(F[0]=D=>k.value=!k.value)},Lo(k.value?"< Code":"Output >"),1)],34))}}),hi=(n,o)=>{const l=n.__vccOpts||n;for(const[c,h]of o)l[c]=h;return l},vd=hi(gd,[["__scopeId","data-v-3102671e"]]),D1=n=>(pd("data-v-cbb0a4e5"),n=n(),dd(),n),kd=["onClick"],yd={class:"label"},bd=["onClick"],wd=D1(()=>Ft("svg",{class:"icon",width:"12",height:"12",viewBox:"0 0 24 24"},[Ft("line",{stroke:"#999",x1:"18",y1:"6",x2:"6",y2:"18"}),Ft("line",{stroke:"#999",x1:"6",y1:"6",x2:"18",y2:"18"})],-1)),xd=[wd],_d={key:0,class:"file pending"},Sd=["onKeyup"],Td={key:1,class:"import-map-wrapper"},Id=D1(()=>Ft("span",{class:"label"},"Import Map",-1)),Cd=[Id],Ad=$r({__name:"FileSelector",setup(n){const o=zr("store"),l=jn(!1),c=jn("Comp.vue"),h="import-map.json",k=zr("import-map"),I=Ts(()=>Object.entries(o.state.files).filter(([_,F])=>_!==h&&!F.hidden).map(([_])=>_));function S(){let _=0,F="Comp.vue";for(;;){let D=!1;for(const H in o.state.files)if(H===F){D=!0,F=`Comp${++_}.vue`;break}if(!D)break}c.value=F,l.value=!0}function w(){l.value=!1}function x({el:_}){_.focus()}function y(){if(!l.value)return;const _=c.value;if(!/\.(vue|js|ts|css)$/.test(_)){o.state.errors=["Playground only supports *.vue, *.js, *.ts, *.css files."];return}if(_ in o.state.files){o.state.errors=[`File "${_}" already exists.`];return}o.state.errors=[],w(),o.addFile(_)}const E=jn(null);function L(_){_.preventDefault();const F=E.value,H=30*((Math.abs(_.deltaX)>=Math.abs(_.deltaY)?_.deltaX:_.deltaY)>0?1:-1);F.scrollTo({left:F.scrollLeft+H})}return(_,F)=>(Ht(),hn("div",{class:Wi(["file-selector",{"has-import-map":Rt(k)}]),onWheel:L,ref_key:"fileSel",ref:E},[(Ht(!0),hn(Ss,null,O1(Rt(I),(D,H)=>(Ht(),hn("div",{class:Wi(["file",{active:Rt(o).state.activeFile.filename===D}]),onClick:O=>Rt(o).setActive(D)},[Ft("span",yd,Lo(D===h?"Import Map":D),1),H>0?(Ht(),hn("span",{key:0,class:"remove",onClick:P1(O=>Rt(o).deleteFile(D),["stop"])},xd,8,bd)):Bi("",!0)],10,kd))),256)),l.value?(Ht(),hn("div",_d,[N1(Ft("input",{"onUpdate:modelValue":F[0]||(F[0]=D=>c.value=D),spellcheck:"false",onBlur:y,onKeyup:[$c(y,["enter"]),$c(w,["esc"])],onVnodeMounted:x},null,40,Sd),[[hd,c.value]])])):Bi("",!0),Ft("button",{class:"add",onClick:S},"+"),Rt(k)?(Ht(),hn("div",Td,[Ft("div",{class:Wi(["file import-map",{active:Rt(o).state.activeFile.filename===h}]),onClick:F[1]||(F[1]=D=>Rt(o).setActive(h))},Cd,2)])):Bi("",!0)],34))}}),Ld=hi(Ad,[["__scopeId","data-v-cbb0a4e5"]]);var jt=Uint8Array,yn=Uint16Array,Eo=Uint32Array,No=new jt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Po=new jt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ga=new jt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M1=function(n,o){for(var l=new yn(31),c=0;c<31;++c)l[c]=o+=1<<n[c-1];for(var h=new Eo(l[30]),c=1;c<30;++c)for(var k=l[c];k<l[c+1];++k)h[k]=k-l[c]<<5|c;return[l,h]},R1=M1(No,2),F1=R1[0],Ka=R1[1];F1[28]=258,Ka[258]=28;var B1=M1(Po,0),Ed=B1[0],Gc=B1[1],Xa=new yn(32768);for(var gt=0;gt<32768;++gt){var Rr=(gt&43690)>>>1|(gt&21845)<<1;Rr=(Rr&52428)>>>2|(Rr&13107)<<2,Rr=(Rr&61680)>>>4|(Rr&3855)<<4,Xa[gt]=((Rr&65280)>>>8|(Rr&255)<<8)>>>1}var er=function(n,o,l){for(var c=n.length,h=0,k=new yn(o);h<c;++h)n[h]&&++k[n[h]-1];var I=new yn(o);for(h=0;h<o;++h)I[h]=I[h-1]+k[h-1]<<1;var S;if(l){S=new yn(1<<o);var w=15-o;for(h=0;h<c;++h)if(n[h])for(var x=h<<4|n[h],y=o-n[h],E=I[n[h]-1]++<<y,L=E|(1<<y)-1;E<=L;++E)S[Xa[E]>>>w]=x}else for(S=new yn(c),h=0;h<c;++h)n[h]&&(S[h]=Xa[I[n[h]-1]++]>>>15-n[h]);return S},qr=new jt(288);for(var gt=0;gt<144;++gt)qr[gt]=8;for(var gt=144;gt<256;++gt)qr[gt]=9;for(var gt=256;gt<280;++gt)qr[gt]=7;for(var gt=280;gt<288;++gt)qr[gt]=8;var Is=new jt(32);for(var gt=0;gt<32;++gt)Is[gt]=5;var Nd=er(qr,9,0),Pd=er(qr,9,1),Od=er(Is,5,0),Dd=er(Is,5,1),Ma=function(n){for(var o=n[0],l=1;l<n.length;++l)n[l]>o&&(o=n[l]);return o},Wn=function(n,o,l){var c=o/8|0;return(n[c]|n[c+1]<<8)>>(o&7)&l},Ra=function(n,o){var l=o/8|0;return(n[l]|n[l+1]<<8|n[l+2]<<16)>>(o&7)},hl=function(n){return(n+7)/8|0},Oo=function(n,o,l){(o==null||o<0)&&(o=0),(l==null||l>n.length)&&(l=n.length);var c=new(n.BYTES_PER_ELEMENT==2?yn:n.BYTES_PER_ELEMENT==4?Eo:jt)(l-o);return c.set(n.subarray(o,l)),c},Md=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Hn=function(n,o,l){var c=new Error(o||Md[n]);if(c.code=n,Error.captureStackTrace&&Error.captureStackTrace(c,Hn),!l)throw c;return c},Rd=function(n,o,l){var c=n.length;if(!c||l&&l.f&&!l.l)return o||new jt(0);var h=!o||l,k=!l||l.i;l||(l={}),o||(o=new jt(c*3));var I=function(z){var V=o.length;if(z>V){var ee=new jt(Math.max(V*2,z));ee.set(o),o=ee}},S=l.f||0,w=l.p||0,x=l.b||0,y=l.l,E=l.d,L=l.m,_=l.n,F=c*8;do{if(!y){S=Wn(n,w,1);var D=Wn(n,w+1,3);if(w+=3,D)if(D==1)y=Pd,E=Dd,L=9,_=5;else if(D==2){var M=Wn(n,w,31)+257,B=Wn(n,w+10,15)+4,$=M+Wn(n,w+5,31)+1;w+=14;for(var ae=new jt($),ue=new jt(19),te=0;te<B;++te)ue[Ga[te]]=Wn(n,w+te*3,7);w+=B*3;for(var ye=Ma(ue),ge=(1<<ye)-1,ke=er(ue,ye,1),te=0;te<$;){var Te=ke[Wn(n,w,ge)];w+=Te&15;var H=Te>>>4;if(H<16)ae[te++]=H;else{var G=0,K=0;for(H==16?(K=3+Wn(n,w,3),w+=2,G=ae[te-1]):H==17?(K=3+Wn(n,w,7),w+=3):H==18&&(K=11+Wn(n,w,127),w+=7);K--;)ae[te++]=G}}var b=ae.subarray(0,M),se=ae.subarray(M);L=Ma(b),_=Ma(se),y=er(b,L,1),E=er(se,_,1)}else Hn(1);else{var H=hl(w)+4,O=n[H-4]|n[H-3]<<8,T=H+O;if(T>c){k&&Hn(0);break}h&&I(x+O),o.set(n.subarray(H,T),x),l.b=x+=O,l.p=w=T*8,l.f=S;continue}if(w>F){k&&Hn(0);break}}h&&I(x+131072);for(var J=(1<<L)-1,le=(1<<_)-1,Oe=w;;Oe=w){var G=y[Ra(n,w)&J],Ne=G>>>4;if(w+=G&15,w>F){k&&Hn(0);break}if(G||Hn(2),Ne<256)o[x++]=Ne;else if(Ne==256){Oe=w,y=null;break}else{var Fe=Ne-254;if(Ne>264){var te=Ne-257,tt=No[te];Fe=Wn(n,w,(1<<tt)-1)+F1[te],w+=tt}var ze=E[Ra(n,w)&le],qe=ze>>>4;ze||Hn(3),w+=ze&15;var se=Ed[qe];if(qe>3){var tt=Po[qe];se+=Ra(n,w)&(1<<tt)-1,w+=tt}if(w>F){k&&Hn(0);break}h&&I(x+131072);for(var X=x+Fe;x<X;x+=4)o[x]=o[x-se],o[x+1]=o[x+1-se],o[x+2]=o[x+2-se],o[x+3]=o[x+3-se];x=X}}l.l=y,l.p=Oe,l.b=x,l.f=S,y&&(S=1,l.m=L,l.d=E,l.n=_)}while(!S);return x==o.length?o:Oo(o,0,x)},kr=function(n,o,l){l<<=o&7;var c=o/8|0;n[c]|=l,n[c+1]|=l>>>8},vs=function(n,o,l){l<<=o&7;var c=o/8|0;n[c]|=l,n[c+1]|=l>>>8,n[c+2]|=l>>>16},Fa=function(n,o){for(var l=[],c=0;c<n.length;++c)n[c]&&l.push({s:c,f:n[c]});var h=l.length,k=l.slice();if(!h)return[pl,0];if(h==1){var I=new jt(l[0].s+1);return I[l[0].s]=1,[I,1]}l.sort(function($,ae){return $.f-ae.f}),l.push({s:-1,f:25001});var S=l[0],w=l[1],x=0,y=1,E=2;for(l[0]={s:-1,f:S.f+w.f,l:S,r:w};y!=h-1;)S=l[l[x].f<l[E].f?x++:E++],w=l[x!=y&&l[x].f<l[E].f?x++:E++],l[y++]={s:-1,f:S.f+w.f,l:S,r:w};for(var L=k[0].s,c=1;c<h;++c)k[c].s>L&&(L=k[c].s);var _=new yn(L+1),F=Va(l[y-1],_,0);if(F>o){var c=0,D=0,H=F-o,O=1<<H;for(k.sort(function(ae,ue){return _[ue.s]-_[ae.s]||ae.f-ue.f});c<h;++c){var T=k[c].s;if(_[T]>o)D+=O-(1<<F-_[T]),_[T]=o;else break}for(D>>>=H;D>0;){var M=k[c].s;_[M]<o?D-=1<<o-_[M]++-1:++c}for(;c>=0&&D;--c){var B=k[c].s;_[B]==o&&(--_[B],++D)}F=o}return[new jt(_),F]},Va=function(n,o,l){return n.s==-1?Math.max(Va(n.l,o,l+1),Va(n.r,o,l+1)):o[n.s]=l},Kc=function(n){for(var o=n.length;o&&!n[--o];);for(var l=new yn(++o),c=0,h=n[0],k=1,I=function(w){l[c++]=w},S=1;S<=o;++S)if(n[S]==h&&S!=o)++k;else{if(!h&&k>2){for(;k>138;k-=138)I(32754);k>2&&(I(k>10?k-11<<5|28690:k-3<<5|12305),k=0)}else if(k>3){for(I(h),--k;k>6;k-=6)I(8304);k>2&&(I(k-3<<5|8208),k=0)}for(;k--;)I(h);k=1,h=n[S]}return[l.subarray(0,c),o]},ks=function(n,o){for(var l=0,c=0;c<o.length;++c)l+=n[c]*o[c];return l},Ya=function(n,o,l){var c=l.length,h=hl(o+2);n[h]=c&255,n[h+1]=c>>>8,n[h+2]=n[h]^255,n[h+3]=n[h+1]^255;for(var k=0;k<c;++k)n[h+k+4]=l[k];return(h+4+c)*8},Xc=function(n,o,l,c,h,k,I,S,w,x,y){kr(o,y++,l),++h[256];for(var E=Fa(h,15),L=E[0],_=E[1],F=Fa(k,15),D=F[0],H=F[1],O=Kc(L),T=O[0],M=O[1],B=Kc(D),$=B[0],ae=B[1],ue=new yn(19),te=0;te<T.length;++te)ue[T[te]&31]++;for(var te=0;te<$.length;++te)ue[$[te]&31]++;for(var ye=Fa(ue,7),ge=ye[0],ke=ye[1],Te=19;Te>4&&!ge[Ga[Te-1]];--Te);var G=x+5<<3,K=ks(h,qr)+ks(k,Is)+I,b=ks(h,L)+ks(k,D)+I+14+3*Te+ks(ue,ge)+(2*ue[16]+3*ue[17]+7*ue[18]);if(G<=K&&G<=b)return Ya(o,y,n.subarray(w,w+x));var se,J,le,Oe;if(kr(o,y,1+(b<K)),y+=2,b<K){se=er(L,_,0),J=L,le=er(D,H,0),Oe=D;var Ne=er(ge,ke,0);kr(o,y,M-257),kr(o,y+5,ae-1),kr(o,y+10,Te-4),y+=14;for(var te=0;te<Te;++te)kr(o,y+3*te,ge[Ga[te]]);y+=3*Te;for(var Fe=[T,$],tt=0;tt<2;++tt)for(var ze=Fe[tt],te=0;te<ze.length;++te){var qe=ze[te]&31;kr(o,y,Ne[qe]),y+=ge[qe],qe>15&&(kr(o,y,ze[te]>>>5&127),y+=ze[te]>>>12)}}else se=Nd,J=qr,le=Od,Oe=Is;for(var te=0;te<S;++te)if(c[te]>255){var qe=c[te]>>>18&31;vs(o,y,se[qe+257]),y+=J[qe+257],qe>7&&(kr(o,y,c[te]>>>23&31),y+=No[qe]);var X=c[te]&31;vs(o,y,le[X]),y+=Oe[X],X>3&&(vs(o,y,c[te]>>>5&8191),y+=Po[X])}else vs(o,y,se[c[te]]),y+=J[c[te]];return vs(o,y,se[256]),y+J[256]},Fd=new Eo([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),pl=new jt(0),Bd=function(n,o,l,c,h,k){var I=n.length,S=new jt(c+I+5*(1+Math.ceil(I/7e3))+h),w=S.subarray(c,S.length-h),x=0;if(!o||I<8)for(var y=0;y<=I;y+=65535){var E=y+65535;E>=I&&(w[x>>3]=k),x=Ya(w,x+1,n.subarray(y,E))}else{for(var L=Fd[o-1],_=L>>>13,F=L&8191,D=(1<<l)-1,H=new yn(32768),O=new yn(D+1),T=Math.ceil(l/3),M=2*T,B=function(Je){return(n[Je]^n[Je+1]<<T^n[Je+2]<<M)&D},$=new Eo(25e3),ae=new yn(288),ue=new yn(32),te=0,ye=0,y=0,ge=0,ke=0,Te=0;y<I;++y){var G=B(y),K=y&32767,b=O[G];if(H[K]=b,O[G]=K,ke<=y){var se=I-y;if((te>7e3||ge>24576)&&se>423){x=Xc(n,w,0,$,ae,ue,ye,ge,Te,y-Te,x),ge=te=ye=0,Te=y;for(var J=0;J<286;++J)ae[J]=0;for(var J=0;J<30;++J)ue[J]=0}var le=2,Oe=0,Ne=F,Fe=K-b&32767;if(se>2&&G==B(y-Fe))for(var tt=Math.min(_,se)-1,ze=Math.min(32767,y),qe=Math.min(258,se);Fe<=ze&&--Ne&&K!=b;){if(n[y+le]==n[y+le-Fe]){for(var X=0;X<qe&&n[y+X]==n[y+X-Fe];++X);if(X>le){if(le=X,Oe=Fe,X>tt)break;for(var z=Math.min(Fe,X-2),V=0,J=0;J<z;++J){var ee=y-Fe+J+32768&32767,fe=H[ee],ve=ee-fe+32768&32767;ve>V&&(V=ve,b=ee)}}}K=b,b=H[K],Fe+=K-b+32768&32767}if(Oe){$[ge++]=268435456|Ka[le]<<18|Gc[Oe];var pe=Ka[le]&31,De=Gc[Oe]&31;ye+=No[pe]+Po[De],++ae[257+pe],++ue[De],ke=y+le,++te}else $[ge++]=n[y],++ae[n[y]]}}x=Xc(n,w,k,$,ae,ue,ye,ge,Te,y-Te,x),!k&&x&7&&(x=Ya(w,x+1,pl))}return Oo(S,0,c+hl(x)+h)},Wd=function(){var n=1,o=0;return{p:function(l){for(var c=n,h=o,k=l.length|0,I=0;I!=k;){for(var S=Math.min(I+2655,k);I<S;++I)h+=c+=l[I];c=(c&65535)+15*(c>>16),h=(h&65535)+15*(h>>16)}n=c,o=h},d:function(){return n%=65521,o%=65521,(n&255)<<24|n>>>8<<16|(o&255)<<8|o>>>8}}},Hd=function(n,o,l,c,h){return Bd(n,o.level==null?6:o.level,o.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+o.mem,l,c,!h)},jd=function(n,o,l){for(;l;++o)n[o]=l,l>>>=8},zd=function(n,o){var l=o.level,c=l==0?0:l<6?1:l==9?3:2;n[0]=120,n[1]=c<<6|(c?32-2*c:1)},qd=function(n){((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&Hn(6,"invalid zlib data"),n[1]&32&&Hn(6,"invalid zlib data: preset dictionaries not supported")};function Ud(n,o){o||(o={});var l=Wd();l.p(n);var c=Hd(n,o,2,4);return zd(c,o),jd(c,c.length-4,l.d()),c}function $d(n,o){return Rd((qd(n),n.subarray(2,-4)),o)}var Vc=typeof TextEncoder<"u"&&new TextEncoder,Ja=typeof TextDecoder<"u"&&new TextDecoder,Gd=0;try{Ja.decode(pl,{stream:!0}),Gd=1}catch{}var Kd=function(n){for(var o="",l=0;;){var c=n[l++],h=(c>127)+(c>223)+(c>239);if(l+h>n.length)return[o,Oo(n,l-1)];h?h==3?(c=((c&15)<<18|(n[l++]&63)<<12|(n[l++]&63)<<6|n[l++]&63)-65536,o+=String.fromCharCode(55296|c>>10,56320|c&1023)):h&1?o+=String.fromCharCode((c&31)<<6|n[l++]&63):o+=String.fromCharCode((c&15)<<12|(n[l++]&63)<<6|n[l++]&63):o+=String.fromCharCode(c)}};function W1(n,o){if(o){for(var l=new jt(n.length),c=0;c<n.length;++c)l[c]=n.charCodeAt(c);return l}if(Vc)return Vc.encode(n);for(var h=n.length,k=new jt(n.length+(n.length>>1)),I=0,S=function(y){k[I++]=y},c=0;c<h;++c){if(I+5>k.length){var w=new jt(I+8+(h-c<<1));w.set(k),k=w}var x=n.charCodeAt(c);x<128||o?S(x):x<2048?(S(192|x>>6),S(128|x&63)):x>55295&&x<57344?(x=65536+(x&1023<<10)|n.charCodeAt(++c)&1023,S(240|x>>18),S(128|x>>12&63),S(128|x>>6&63),S(128|x&63)):(S(224|x>>12),S(128|x>>6&63),S(128|x&63))}return Oo(k,0,I)}function H1(n,o){if(o){for(var l="",c=0;c<n.length;c+=16384)l+=String.fromCharCode.apply(null,n.subarray(c,c+16384));return l}else{if(Ja)return Ja.decode(n);var h=Kd(n),k=h[0],I=h[1];return I.length&&Hn(8),k}}function j1(n,o=100){let l;return(...c)=>{l&&clearTimeout(l),l=setTimeout(()=>{n(...c)},o)}}function Xd(n){const o=W1(n),l=Ud(o,{level:9}),c=H1(l,!0);return btoa(c)}function Vd(n){const o=atob(n);if(o.startsWith("xÚ")){const l=W1(o,!0),c=$d(l);return H1(c)}return decodeURIComponent(escape(o))}var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ba={exports:{}},Yc;function wn(){return Yc||(Yc=1,function(n,o){(function(l,c){n.exports=c()})(li,function(){var l=navigator.userAgent,c=navigator.platform,h=/gecko\/\d/i.test(l),k=/MSIE \d/.test(l),I=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),S=/Edge\/(\d+)/.exec(l),w=k||I||S,x=w&&(k?document.documentMode||6:+(S||I)[1]),y=!S&&/WebKit\//.test(l),E=y&&/Qt\/\d+\.\d+/.test(l),L=!S&&/Chrome\//.test(l),_=/Opera\//.test(l),F=/Apple Computer/.test(navigator.vendor),D=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),H=/PhantomJS/.test(l),O=F&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),T=/Android/.test(l),M=O||T||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),B=O||/Mac/.test(c),$=/\bCrOS\b/.test(l),ae=/win/i.test(c),ue=_&&l.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(_=!1,y=!0);var te=B&&(E||_&&(ue==null||ue<12.11)),ye=h||w&&x>=9;function ge(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ke=function(e,t){var i=e.className,r=ge(t).exec(i);if(r){var a=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(a?r[1]+a:"")}};function Te(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return Te(e).appendChild(t)}function K(e,t,i,r){var a=document.createElement(e);if(i&&(a.className=i),r&&(a.style.cssText=r),typeof t=="string")a.appendChild(document.createTextNode(t));else if(t)for(var u=0;u<t.length;++u)a.appendChild(t[u]);return a}function b(e,t,i,r){var a=K(e,t,i,r);return a.setAttribute("role","presentation"),a}var se;document.createRange?se=function(e,t,i,r){var a=document.createRange();return a.setEnd(r||e,i),a.setStart(e,t),a}:se=function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r};function J(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 le(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Oe(e,t){var i=e.className;ge(t).test(i)||(e.className+=(i?" ":"")+t)}function Ne(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ge(i[r]).test(t)&&(t+=" "+i[r]);return t}var Fe=function(e){e.select()};O?Fe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(Fe=function(e){try{e.select()}catch{}});function tt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ze(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function qe(e,t,i,r,a){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var u=r||0,f=a||0;;){var p=e.indexOf(" ",u);if(p<0||p>=t)return f+(t-u);f+=p-u,f+=i-f%i,u=p+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=tt(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var V=50,ee={toString:function(){return"CodeMirror.Pass"}},fe={scroll:!1},ve={origin:"*mouse"},pe={origin:"+move"};function De(e,t,i){for(var r=0,a=0;;){var u=e.indexOf(" ",r);u==-1&&(u=e.length);var f=u-r;if(u==e.length||a+f>=t)return r+Math.min(f,t-a);if(a+=u-r,a+=i-a%i,r=u+1,a>=t)return r}}var Ze=[""];function Je(e){for(;Ze.length<=e;)Ze.push(Ae(Ze)+" ");return Ze[e]}function Ae(e){return e[e.length-1]}function He(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}function Ke(e,t,i){for(var r=0,a=i(t);r<e.length&&i(e[r])<=a;)r++;e.splice(r,0,t)}function ot(){}function lt(e,t){var i;return Object.create?i=Object.create(e):(ot.prototype=e,i=new ot),t&&ze(t,i),i}var rn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function nt(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||rn.test(e))}function U(e,t){return t?t.source.indexOf("\\w")>-1&&nt(e)?!0:t.test(e):nt(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Q=/[\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 Xe(e){return e.charCodeAt(0)>=768&&Q.test(e)}function It(e,t,i){for(;(i<0?t>0:t<e.length)&&Xe(e.charAt(t));)t+=i;return t}function pn(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var a=(t+i)/2,u=r<0?Math.ceil(a):Math.floor(a);if(u==t)return e(u)?t:i;e(u)?i=u:t=u+r}}function Kr(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var a=!1,u=0;u<e.length;++u){var f=e[u];(f.from<i&&f.to>t||t==i&&f.to==t)&&(r(Math.max(f.from,t),Math.min(f.to,i),f.level==1?"rtl":"ltr",u),a=!0)}a||r(t,i,"ltr")}var Ut=null;function ft(e,t,i){var r;Ut=null;for(var a=0;a<e.length;++a){var u=e[a];if(u.from<t&&u.to>t)return a;u.to==t&&(u.from!=u.to&&i=="before"?r=a:Ut=a),u.from==t&&(u.from!=u.to&&i!="before"?r=a:Ut=a)}return r??Ut}var On=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,u=/[LRr]/,f=/[Lb1n]/,p=/[1n]/;function m(g,A,N){this.level=g,this.from=A,this.to=N}return function(g,A){var N=A=="ltr"?"L":"R";if(g.length==0||A=="ltr"&&!r.test(g))return!1;for(var j=g.length,W=[],Y=0;Y<j;++Y)W.push(i(g.charCodeAt(Y)));for(var re=0,me=N;re<j;++re){var be=W[re];be=="m"?W[re]=me:me=be}for(var _e=0,we=N;_e<j;++_e){var Ie=W[_e];Ie=="1"&&we=="r"?W[_e]="n":u.test(Ie)&&(we=Ie,Ie=="r"&&(W[_e]="R"))}for(var Pe=1,Le=W[0];Pe<j-1;++Pe){var Ve=W[Pe];Ve=="+"&&Le=="1"&&W[Pe+1]=="1"?W[Pe]="1":Ve==","&&Le==W[Pe+1]&&(Le=="1"||Le=="n")&&(W[Pe]=Le),Le=Ve}for(var ut=0;ut<j;++ut){var Dt=W[ut];if(Dt==",")W[ut]="N";else if(Dt=="%"){var vt=void 0;for(vt=ut+1;vt<j&&W[vt]=="%";++vt);for(var vn=ut&&W[ut-1]=="!"||vt<j&&W[vt]=="1"?"1":"N",un=ut;un<vt;++un)W[un]=vn;ut=vt-1}}for(var St=0,cn=N;St<j;++St){var Wt=W[St];cn=="L"&&Wt=="1"?W[St]="L":u.test(Wt)&&(cn=Wt)}for(var Ct=0;Ct<j;++Ct)if(a.test(W[Ct])){var Tt=void 0;for(Tt=Ct+1;Tt<j&&a.test(W[Tt]);++Tt);for(var yt=(Ct?W[Ct-1]:N)=="L",fn=(Tt<j?W[Tt]:N)=="L",Oi=yt==fn?yt?"L":"R":N,Mr=Ct;Mr<Tt;++Mr)W[Mr]=Oi;Ct=Tt-1}for(var Yt=[],Qn,Mt=0;Mt<j;)if(f.test(W[Mt])){var Oa=Mt;for(++Mt;Mt<j&&f.test(W[Mt]);++Mt);Yt.push(new m(0,Oa,Mt))}else{var vr=Mt,si=Yt.length,oi=A=="rtl"?1:0;for(++Mt;Mt<j&&W[Mt]!="L";++Mt);for(var tn=vr;tn<Mt;)if(p.test(W[tn])){vr<tn&&(Yt.splice(si,0,new m(1,vr,tn)),si+=oi);var Di=tn;for(++tn;tn<Mt&&p.test(W[tn]);++tn);Yt.splice(si,0,new m(2,Di,tn)),si+=oi,vr=tn}else++tn;vr<Mt&&Yt.splice(si,0,new m(1,vr,Mt))}return A=="ltr"&&(Yt[0].level==1&&(Qn=g.match(/^\s+/))&&(Yt[0].from=Qn[0].length,Yt.unshift(new m(0,0,Qn[0].length))),Ae(Yt).level==1&&(Qn=g.match(/\s+$/))&&(Ae(Yt).to-=Qn[0].length,Yt.push(new m(0,j-Qn[0].length,j)))),A=="rtl"?Yt.reverse():Yt}}();function Bt(e,t){var i=e.order;return i==null&&(i=e.order=On(e.text,t)),i}var xn=[],Ee=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||xn).concat(i)}};function $n(e,t){return e._handlers&&e._handlers[t]||xn}function Lt(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,a=r&&r[t];if(a){var u=z(a,i);u>-1&&(r[t]=a.slice(0,u).concat(a.slice(u+1)))}}}function Me(e,t){var i=$n(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),a=0;a<i.length;++a)i[a].apply(null,r)}function pt(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Me(e,i||t.type,e,t),$t(t)||t.codemirrorIgnore}function Gn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)z(i,t[r])==-1&&i.push(t[r])}function wt(e,t){return $n(e,t).length>0}function dn(e){e.prototype.on=function(t,i){Ee(this,t,i)},e.prototype.off=function(t,i){Lt(this,t,i)}}function _t(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Kn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function $t(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Dn(e){_t(e),Kn(e)}function An(e){return e.target||e.srcElement}function xr(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var or=function(){if(w&&x<9)return!1;var e=K("div");return"draggable"in e||"dragDrop"in e}(),Et;function _r(e){if(Et==null){var t=K("span","");G(e,K("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Et=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&x<8))}var i=Et?K("span",""):K("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var ar;function mn(e){if(ar!=null)return ar;var t=G(e,document.createTextNode("AخA")),i=se(t,0,1).getBoundingClientRect(),r=se(t,1,2).getBoundingClientRect();return Te(e),!i||i.left==i.right?!1:ar=r.right-i.right<3}var lr=`
|
||
|
||
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var a=e.indexOf(`
|
||
`,t);a==-1&&(a=e.length);var u=e.slice(t,e.charAt(a-1)=="\r"?a-1:a),f=u.indexOf("\r");f!=-1?(i.push(u.slice(0,f)),t+=f+1):(i.push(u),t=a+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Sr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Tr=function(){var e=K("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ur=null;function Ln(e){if(ur!=null)return ur;var t=G(e,K("span","x")),i=t.getBoundingClientRect(),r=se(t,0,1).getBoundingClientRect();return ur=Math.abs(i.left-r.left)>1}var Zt={},Gt={};function Ir(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=t}function _n(e,t){Gt[e]=t}function Xn(e){if(typeof e=="string"&&Gt.hasOwnProperty(e))e=Gt[e];else if(e&&typeof e.name=="string"&&Gt.hasOwnProperty(e.name)){var t=Gt[e.name];typeof t=="string"&&(t={name:t}),e=lt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Vn(e,t){t=Xn(t);var i=Zt[t.name];if(!i)return Vn(e,"text/plain");var r=i(e,t);if(sn.hasOwnProperty(t.name)){var a=sn[t.name];for(var u in a)a.hasOwnProperty(u)&&(r.hasOwnProperty(u)&&(r["_"+u]=r[u]),r[u]=a[u])}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 sn={};function on(e,t){var i=sn.hasOwnProperty(e)?sn[e]:sn[e]={};ze(t,i)}function Kt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var a=t[r];a instanceof Array&&(a=a.concat([])),i[r]=a}return i}function cr(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Xr(e,t,i){return e.startState?e.startState(t,i):!0}var dt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};dt.prototype.eol=function(){return this.pos>=this.string.length},dt.prototype.sol=function(){return this.pos==this.lineStart},dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dt.prototype.skipToEnd=function(){this.pos=this.string.length},dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},dt.prototype.backUp=function(e){this.pos-=e},dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},dt.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},dt.prototype.match=function(e,t,i){if(typeof e=="string"){var r=function(f){return i?f.toLowerCase():f},a=this.string.substr(this.pos,e.length);if(r(a)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var u=this.string.slice(this.pos).match(e);return u&&u.index>0?null:(u&&t!==!1&&(this.pos+=u[0].length),u)}},dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var a=i.children[r],u=a.chunkSize();if(t<u){i=a;break}t-=u}return i.lines[t]}function En(e,t,i){var r=[],a=t.line;return e.iter(t.line,i.line+1,function(u){var f=u.text;a==i.line&&(f=f.slice(0,i.ch)),a==t.line&&(f=f.slice(t.ch)),r.push(f),++a}),r}function Vr(e,t,i){var r=[];return e.iter(t,i,function(a){r.push(a.text)}),r}function Qt(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}function rt(e){if(e.parent==null)return null;for(var t=e.parent,i=z(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var a=0;r.children[a]!=t;++a)i+=r.children[a].chunkSize();return i+t.first}function Nn(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var a=e.children[r],u=a.height;if(t<u){e=a;continue e}t-=u,i+=a.chunkSize()}return i}while(!e.lines);for(var f=0;f<e.lines.length;++f){var p=e.lines[f],m=p.height;if(t<m)break;t-=m}return i+f}function fr(e,t){return t>=e.first&&t<e.first+e.size}function Yr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ce(e,t,i){if(i===void 0&&(i=null),!(this instanceof ce))return new ce(e,t,i);this.line=e,this.ch=t,this.sticky=i}function v(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&v(e,t)==0}function ne(e){return ce(e.line,e.ch)}function de(e,t){return v(e,t)<0?t:e}function Be(e,t){return v(e,t)<0?e:t}function Qe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ce(e.first,0);var i=e.first+e.size-1;return t.line>i?ce(i,Ce(e,i).text.length):Xt(t,Ce(e,t.line).text.length)}function Xt(e,t){var i=e.ch;return i==null||i>t?ce(e.line,t):i<0?ce(e.line,0):e}function Sn(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=Se(e,t[r]);return i}var mi=function(e,t){this.state=e,this.lookAhead=t},Yn=function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Yn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Yn.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}},Yn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Yn.fromSaved=function(e,t,i){return t instanceof mi?new Yn(e,Kt(e.mode,t.state),i,t.lookAhead):new Yn(e,Kt(e.mode,t),i)},Yn.prototype.save=function(e){var t=e!==!1?Kt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mi(t,this.maxLookAhead):t};function zl(e,t,i,r){var a=[e.state.modeGen],u={};Xl(e,t.text,e.doc.mode,i,function(g,A){return a.push(g,A)},u,r);for(var f=i.state,p=function(g){i.baseTokens=a;var A=e.state.overlays[g],N=1,j=0;i.state=!0,Xl(e,t.text,A.mode,i,function(W,Y){for(var re=N;j<W;){var me=a[N];me>W&&a.splice(N,1,W,a[N+1],me),N+=2,j=Math.min(W,me)}if(Y)if(A.opaque)a.splice(re,N-re,W,"overlay "+Y),N=re+2;else for(;re<N;re+=2){var be=a[re+1];a[re+1]=(be?be+" ":"")+"overlay "+Y}},u),i.state=f,i.baseTokens=null,i.baseTokenPos=1},m=0;m<e.state.overlays.length;++m)p(m);return{styles:a,classes:u.bgClass||u.textClass?u:null}}function ql(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ui(e,rt(t)),a=t.text.length>e.options.maxHighlightLength&&Kt(e.doc.mode,r.state),u=zl(e,t,r);a&&(r.state=a),t.stateAfter=r.save(!a),t.styles=u.styles,u.classes?t.styleClasses=u.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ui(e,t,i){var r=e.doc,a=e.display;if(!r.mode.startState)return new Yn(r,!0,t);var u=th(e,t,i),f=u>r.first&&Ce(r,u-1).stateAfter,p=f?Yn.fromSaved(r,f,u):new Yn(r,Xr(r.mode),u);return r.iter(u,t,function(m){qo(e,m.text,p);var g=p.line;m.stateAfter=g==t-1||g%5==0||g>=a.viewFrom&&g<a.viewTo?p.save():null,p.nextLine()}),i&&(r.modeFrontier=p.line),p}function qo(e,t,i,r){var a=e.doc.mode,u=new dt(t,e.options.tabSize,i);for(u.start=u.pos=r||0,t==""&&Ul(a,i.state);!u.eol();)Uo(a,u,i.state),u.start=u.pos}function Ul(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=cr(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Uo(e,t,i,r){for(var a=0;a<10;a++){r&&(r[0]=cr(e,i).mode);var u=e.token(t,i);if(t.pos>t.start)return u}throw new Error("Mode "+e.name+" failed to advance stream.")}var $l=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Gl(e,t,i,r){var a=e.doc,u=a.mode,f;t=Se(a,t);var p=Ce(a,t.line),m=Ui(e,t.line,i),g=new dt(p.text,e.options.tabSize,m),A;for(r&&(A=[]);(r||g.pos<t.ch)&&!g.eol();)g.start=g.pos,f=Uo(u,g,m.state),r&&A.push(new $l(g,f,Kt(a.mode,m.state)));return r?A:new $l(g,f,m.state)}function Kl(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}function Xl(e,t,i,r,a,u,f){var p=i.flattenSpans;p==null&&(p=e.options.flattenSpans);var m=0,g=null,A=new dt(t,e.options.tabSize,r),N,j=e.options.addModeClass&&[null];for(t==""&&Kl(Ul(i,r.state),u);!A.eol();){if(A.pos>e.options.maxHighlightLength?(p=!1,f&&qo(e,t,r,A.pos),A.pos=t.length,N=null):N=Kl(Uo(i,A,r.state,j),u),j){var W=j[0].name;W&&(N="m-"+(N?W+" "+N:W))}if(!p||g!=N){for(;m<A.start;)m=Math.min(A.start,m+5e3),a(m,g);g=N}A.start=A.pos}for(;m<A.pos;){var Y=Math.min(A.pos,m+5e3);a(Y,g),m=Y}}function th(e,t,i){for(var r,a,u=e.doc,f=i?-1:t-(e.doc.mode.innerMode?1e3:100),p=t;p>f;--p){if(p<=u.first)return u.first;var m=Ce(u,p-1),g=m.stateAfter;if(g&&(!i||p+(g instanceof mi?g.lookAhead:0)<=u.modeFrontier))return p;var A=qe(m.text,null,e.options.tabSize);(a==null||r>A)&&(a=p-1,r=A)}return a}function nh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var a=Ce(e,r).stateAfter;if(a&&(!(a instanceof mi)||r+a.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Vl=!1,hr=!1;function rh(){Vl=!0}function ih(){hr=!0}function Fs(e,t,i){this.marker=e,this.from=t,this.to=i}function $i(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}function sh(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}function oh(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));r&&e.markedSpans&&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 ah(e,t,i){var r;if(e)for(var a=0;a<e.length;++a){var u=e[a],f=u.marker,p=u.from==null||(f.inclusiveLeft?u.from<=t:u.from<t);if(p||u.from==t&&f.type=="bookmark"&&(!i||!u.marker.insertLeft)){var m=u.to==null||(f.inclusiveRight?u.to>=t:u.to>t);(r||(r=[])).push(new Fs(f,u.from,m?null:u.to))}}return r}function lh(e,t,i){var r;if(e)for(var a=0;a<e.length;++a){var u=e[a],f=u.marker,p=u.to==null||(f.inclusiveRight?u.to>=t:u.to>t);if(p||u.from==t&&f.type=="bookmark"&&(!i||u.marker.insertLeft)){var m=u.from==null||(f.inclusiveLeft?u.from<=t:u.from<t);(r||(r=[])).push(new Fs(f,m?null:u.from-t,u.to==null?null:u.to-t))}}return r}function $o(e,t){if(t.full)return null;var i=fr(e,t.from.line)&&Ce(e,t.from.line).markedSpans,r=fr(e,t.to.line)&&Ce(e,t.to.line).markedSpans;if(!i&&!r)return null;var a=t.from.ch,u=t.to.ch,f=v(t.from,t.to)==0,p=ah(i,a,f),m=lh(r,u,f),g=t.text.length==1,A=Ae(t.text).length+(g?a:0);if(p)for(var N=0;N<p.length;++N){var j=p[N];if(j.to==null){var W=$i(m,j.marker);W?g&&(j.to=W.to==null?null:W.to+A):j.to=a}}if(m)for(var Y=0;Y<m.length;++Y){var re=m[Y];if(re.to!=null&&(re.to+=A),re.from==null){var me=$i(p,re.marker);me||(re.from=A,g&&(p||(p=[])).push(re))}else re.from+=A,g&&(p||(p=[])).push(re)}p&&(p=Yl(p)),m&&m!=p&&(m=Yl(m));var be=[p];if(!g){var _e=t.text.length-2,we;if(_e>0&&p)for(var Ie=0;Ie<p.length;++Ie)p[Ie].to==null&&(we||(we=[])).push(new Fs(p[Ie].marker,null,null));for(var Pe=0;Pe<_e;++Pe)be.push(we);be.push(m)}return be}function Yl(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function uh(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(W){if(W.markedSpans)for(var Y=0;Y<W.markedSpans.length;++Y){var re=W.markedSpans[Y].marker;re.readOnly&&(!r||z(r,re)==-1)&&(r||(r=[])).push(re)}}),!r)return null;for(var a=[{from:t,to:i}],u=0;u<r.length;++u)for(var f=r[u],p=f.find(0),m=0;m<a.length;++m){var g=a[m];if(!(v(g.to,p.from)<0||v(g.from,p.to)>0)){var A=[m,1],N=v(g.from,p.from),j=v(g.to,p.to);(N<0||!f.inclusiveLeft&&!N)&&A.push({from:g.from,to:p.from}),(j>0||!f.inclusiveRight&&!j)&&A.push({from:p.to,to:g.to}),a.splice.apply(a,A),m+=A.length-3}}return a}function Jl(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Zl(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function Bs(e){return e.inclusiveLeft?-1:0}function Ws(e){return e.inclusiveRight?1:0}function Go(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),a=t.find(),u=v(r.from,a.from)||Bs(e)-Bs(t);if(u)return-u;var f=v(r.to,a.to)||Ws(e)-Ws(t);return f||t.id-e.id}function Ql(e,t){var i=hr&&e.markedSpans,r;if(i)for(var a=void 0,u=0;u<i.length;++u)a=i[u],a.marker.collapsed&&(t?a.from:a.to)==null&&(!r||Go(r,a.marker)<0)&&(r=a.marker);return r}function eu(e){return Ql(e,!0)}function Hs(e){return Ql(e,!1)}function ch(e,t){var i=hr&&e.markedSpans,r;if(i)for(var a=0;a<i.length;++a){var u=i[a];u.marker.collapsed&&(u.from==null||u.from<t)&&(u.to==null||u.to>t)&&(!r||Go(r,u.marker)<0)&&(r=u.marker)}return r}function tu(e,t,i,r,a){var u=Ce(e,t),f=hr&&u.markedSpans;if(f)for(var p=0;p<f.length;++p){var m=f[p];if(m.marker.collapsed){var g=m.marker.find(0),A=v(g.from,i)||Bs(m.marker)-Bs(a),N=v(g.to,r)||Ws(m.marker)-Ws(a);if(!(A>=0&&N<=0||A<=0&&N>=0)&&(A<=0&&(m.marker.inclusiveRight&&a.inclusiveLeft?v(g.to,i)>=0:v(g.to,i)>0)||A>=0&&(m.marker.inclusiveRight&&a.inclusiveLeft?v(g.from,r)<=0:v(g.from,r)<0)))return!0}}}function Mn(e){for(var t;t=eu(e);)e=t.find(-1,!0).line;return e}function fh(e){for(var t;t=Hs(e);)e=t.find(1,!0).line;return e}function hh(e){for(var t,i;t=Hs(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Ko(e,t){var i=Ce(e,t),r=Mn(i);return i==r?t:rt(r)}function nu(e,t){if(t>e.lastLine())return t;var i=Ce(e,t),r;if(!Cr(e,i))return t;for(;r=Hs(i);)i=r.find(1,!0).line;return rt(i)+1}function Cr(e,t){var i=hr&&t.markedSpans;if(i){for(var r=void 0,a=0;a<i.length;++a)if(r=i[a],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Xo(e,t,r))return!0}}}function Xo(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return Xo(e,r.line,$i(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var a=void 0,u=0;u<t.markedSpans.length;++u)if(a=t.markedSpans[u],a.marker.collapsed&&!a.marker.widgetNode&&a.from==i.to&&(a.to==null||a.to!=i.from)&&(a.marker.inclusiveLeft||i.marker.inclusiveRight)&&Xo(e,t,a))return!0}function pr(e){e=Mn(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var a=i.lines[r];if(a==e)break;t+=a.height}for(var u=i.parent;u;i=u,u=i.parent)for(var f=0;f<u.children.length;++f){var p=u.children[f];if(p==i)break;t+=p.height}return t}function js(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=eu(r);){var a=i.find(0,!0);r=a.from.line,t+=a.from.ch-a.to.ch}for(r=e;i=Hs(r);){var u=i.find(0,!0);t-=r.text.length-u.from.ch,r=u.to.line,t+=r.text.length-u.to.ch}return t}function Vo(e){var t=e.display,i=e.doc;t.maxLine=Ce(i,i.first),t.maxLineLength=js(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var a=js(r);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=r)})}var gi=function(e,t,i){this.text=e,Zl(this,t),this.height=i?i(this):1};gi.prototype.lineNo=function(){return rt(this)},dn(gi);function ph(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Jl(e),Zl(e,i);var a=r?r(e):1;a!=e.height&&Qt(e,a)}function dh(e){e.parent=null,Jl(e)}var mh={},gh={};function ru(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?gh:mh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function iu(e,t){var i=b("span",null,null,y?"padding-right: .1px":null),r={pre:b("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var u=a?t.rest[a-1]:t.line,f=void 0;r.pos=0,r.addToken=kh,mn(e.display.measure)&&(f=Bt(u,e.doc.direction))&&(r.addToken=bh(r.addToken,f)),r.map=[];var p=t!=e.display.externalMeasured&&rt(u);wh(u,r,ql(e,u,p)),u.styleClasses&&(u.styleClasses.bgClass&&(r.bgClass=Ne(u.styleClasses.bgClass,r.bgClass||"")),u.styleClasses.textClass&&(r.textClass=Ne(u.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(_r(e.display.measure))),a==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 m=r.content.lastChild;(/\bcm-tab\b/.test(m.className)||m.querySelector&&m.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Ne(r.pre.className,r.textClass||"")),r}function vh(e){var t=K("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function kh(e,t,i,r,a,u,f){if(t){var p=e.splitSpaces?yh(t,e.trailingSpace):t,m=e.cm.state.specialChars,g=!1,A;if(!m.test(t))e.col+=t.length,A=document.createTextNode(p),e.map.push(e.pos,e.pos+t.length,A),w&&x<9&&(g=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var N=0;;){m.lastIndex=N;var j=m.exec(t),W=j?j.index-N:t.length-N;if(W){var Y=document.createTextNode(p.slice(N,N+W));w&&x<9?A.appendChild(K("span",[Y])):A.appendChild(Y),e.map.push(e.pos,e.pos+W,Y),e.col+=W,e.pos+=W}if(!j)break;N+=W+1;var re=void 0;if(j[0]==" "){var me=e.cm.options.tabSize,be=me-e.col%me;re=A.appendChild(K("span",Je(be),"cm-tab")),re.setAttribute("role","presentation"),re.setAttribute("cm-text"," "),e.col+=be}else j[0]=="\r"||j[0]==`
|
||
`?(re=A.appendChild(K("span",j[0]=="\r"?"␍":"","cm-invalidchar")),re.setAttribute("cm-text",j[0]),e.col+=1):(re=e.cm.options.specialCharPlaceholder(j[0]),re.setAttribute("cm-text",j[0]),w&&x<9?A.appendChild(K("span",[re])):A.appendChild(re),e.col+=1);e.map.push(e.pos,e.pos+1,re),e.pos++}}if(e.trailingSpace=p.charCodeAt(t.length-1)==32,i||r||a||g||u||f){var _e=i||"";r&&(_e+=r),a&&(_e+=a);var we=K("span",[A],_e,u);if(f)for(var Ie in f)f.hasOwnProperty(Ie)&&Ie!="style"&&Ie!="class"&&we.setAttribute(Ie,f[Ie]);return e.content.appendChild(we)}e.content.appendChild(A)}}function yh(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",a=0;a<e.length;a++){var u=e.charAt(a);u==" "&&i&&(a==e.length-1||e.charCodeAt(a+1)==32)&&(u=" "),r+=u,i=u==" "}return r}function bh(e,t){return function(i,r,a,u,f,p,m){a=a?a+" cm-force-border":"cm-force-border";for(var g=i.pos,A=g+r.length;;){for(var N=void 0,j=0;j<t.length&&(N=t[j],!(N.to>g&&N.from<=g));j++);if(N.to>=A)return e(i,r,a,u,f,p,m);e(i,r.slice(0,N.to-g),a,u,null,p,m),u=null,r=r.slice(N.to-g),g=N.to}}}function su(e,t,i,r){var a=!r&&i.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!r&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",i.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function wh(e,t,i){var r=e.markedSpans,a=e.text,u=0;if(!r){for(var f=1;f<i.length;f+=2)t.addToken(t,a.slice(u,u=i[f]),ru(i[f+1],t.cm.options));return}for(var p=a.length,m=0,g=1,A="",N,j,W=0,Y,re,me,be,_e;;){if(W==m){Y=re=me=j="",_e=null,be=null,W=1/0;for(var we=[],Ie=void 0,Pe=0;Pe<r.length;++Pe){var Le=r[Pe],Ve=Le.marker;if(Ve.type=="bookmark"&&Le.from==m&&Ve.widgetNode)we.push(Ve);else if(Le.from<=m&&(Le.to==null||Le.to>m||Ve.collapsed&&Le.to==m&&Le.from==m)){if(Le.to!=null&&Le.to!=m&&W>Le.to&&(W=Le.to,re=""),Ve.className&&(Y+=" "+Ve.className),Ve.css&&(j=(j?j+";":"")+Ve.css),Ve.startStyle&&Le.from==m&&(me+=" "+Ve.startStyle),Ve.endStyle&&Le.to==W&&(Ie||(Ie=[])).push(Ve.endStyle,Le.to),Ve.title&&((_e||(_e={})).title=Ve.title),Ve.attributes)for(var ut in Ve.attributes)(_e||(_e={}))[ut]=Ve.attributes[ut];Ve.collapsed&&(!be||Go(be.marker,Ve)<0)&&(be=Le)}else Le.from>m&&W>Le.from&&(W=Le.from)}if(Ie)for(var Dt=0;Dt<Ie.length;Dt+=2)Ie[Dt+1]==W&&(re+=" "+Ie[Dt]);if(!be||be.from==m)for(var vt=0;vt<we.length;++vt)su(t,0,we[vt]);if(be&&(be.from||0)==m){if(su(t,(be.to==null?p+1:be.to)-m,be.marker,be.from==null),be.to==null)return;be.to==m&&(be=!1)}}if(m>=p)break;for(var vn=Math.min(p,W);;){if(A){var un=m+A.length;if(!be){var St=un>vn?A.slice(0,vn-m):A;t.addToken(t,St,N?N+Y:Y,me,m+St.length==W?re:"",j,_e)}if(un>=vn){A=A.slice(vn-m),m=vn;break}m=un,me=""}A=a.slice(u,u=i[g++]),N=ru(i[g++],t.cm.options)}}}function ou(e,t,i){this.line=t,this.rest=hh(t),this.size=this.rest?rt(Ae(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Cr(e,t)}function zs(e,t,i){for(var r=[],a,u=t;u<i;u=a){var f=new ou(e.doc,Ce(e.doc,u),u);a=u+f.size,r.push(f)}return r}var vi=null;function xh(e){vi?vi.ops.push(e):e.ownsGroup=vi={ops:[e],delayedCallbacks:[]}}function _h(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var a=e.ops[r];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(i<t.length)}function Sh(e,t){var i=e.ownsGroup;if(i)try{_h(i)}finally{vi=null,t(i)}}var Gi=null;function Nt(e,t){var i=$n(e,t);if(i.length){var r=Array.prototype.slice.call(arguments,2),a;vi?a=vi.delayedCallbacks:Gi?a=Gi:(a=Gi=[],setTimeout(Th,0));for(var u=function(p){a.push(function(){return i[p].apply(null,r)})},f=0;f<i.length;++f)u(f)}}function Th(){var e=Gi;Gi=null;for(var t=0;t<e.length;++t)e[t]()}function au(e,t,i,r){for(var a=0;a<t.changes.length;a++){var u=t.changes[a];u=="text"?Ch(e,t):u=="gutter"?uu(e,t,i,r):u=="class"?Yo(e,t):u=="widget"&&Ah(e,t,r)}t.changes=null}function Ki(e){return e.node==e.text&&(e.node=K("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&x<8&&(e.node.style.zIndex=2)),e.node}function Ih(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var r=Ki(t);t.background=r.insertBefore(K("div",null,i),r.firstChild),e.display.input.setUneditable(t.background)}}function lu(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):iu(e,t)}function Ch(e,t){var i=t.text.className,r=lu(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,Yo(e,t)):i&&(t.text.className=i)}function Yo(e,t){Ih(e,t),t.line.wrapClass?Ki(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function uu(e,t,i,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 a=Ki(t);t.gutterBackground=K("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),a.insertBefore(t.gutterBackground,t.text)}var u=t.line.gutterMarkers;if(e.options.lineNumbers||u){var f=Ki(t),p=t.gutter=K("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(p.setAttribute("aria-hidden","true"),e.display.input.setUneditable(p),f.insertBefore(p,t.text),t.line.gutterClass&&(p.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!u||!u["CodeMirror-linenumbers"])&&(t.lineNumber=p.appendChild(K("div",Yr(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),u)for(var m=0;m<e.display.gutterSpecs.length;++m){var g=e.display.gutterSpecs[m].className,A=u.hasOwnProperty(g)&&u[g];A&&p.appendChild(K("div",[A],"CodeMirror-gutter-elt","left: "+r.gutterLeft[g]+"px; width: "+r.gutterWidth[g]+"px"))}}}function Ah(e,t,i){t.alignable&&(t.alignable=null);for(var r=ge("CodeMirror-linewidget"),a=t.node.firstChild,u=void 0;a;a=u)u=a.nextSibling,r.test(a.className)&&t.node.removeChild(a);cu(e,t,i)}function Lh(e,t,i,r){var a=lu(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),Yo(e,t),uu(e,t,i,r),cu(e,t,r),t.node}function cu(e,t,i){if(fu(e,t.line,t,i,!0),t.rest)for(var r=0;r<t.rest.length;r++)fu(e,t.rest[r],t,i,!1)}function fu(e,t,i,r,a){if(t.widgets)for(var u=Ki(i),f=0,p=t.widgets;f<p.length;++f){var m=p[f],g=K("div",[m.node],"CodeMirror-linewidget"+(m.className?" "+m.className:""));m.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),Eh(m,g,i,r),e.display.input.setUneditable(g),a&&m.above?u.insertBefore(g,i.gutter||i.text):u.appendChild(g),Nt(m,"redraw")}}function Eh(e,t,i,r){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var a=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(a-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Xi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!J(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),G(t.display.measure,K("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function dr(e,t){for(var i=An(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function qs(e){return e.lineSpace.offsetTop}function Jo(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function hu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=G(e.measure,K("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Jn(e){return V-e.display.nativeBarWidth}function Jr(e){return e.display.scroller.clientWidth-Jn(e)-e.display.barWidth}function Zo(e){return e.display.scroller.clientHeight-Jn(e)-e.display.barHeight}function Nh(e,t,i){var r=e.options.lineWrapping,a=r&&Jr(e);if(!t.measure.heights||r&&t.measure.width!=a){var u=t.measure.heights=[];if(r){t.measure.width=a;for(var f=t.text.firstChild.getClientRects(),p=0;p<f.length-1;p++){var m=f[p],g=f[p+1];Math.abs(m.bottom-g.bottom)>2&&u.push((m.bottom+g.top)/2-i.top)}}u.push(i.bottom-i.top)}}function pu(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){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 a=0;a<e.rest.length;a++)if(rt(e.rest[a])>i)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}}function Ph(e,t){t=Mn(t);var i=rt(t),r=e.display.externalMeasured=new ou(e.doc,t,i);r.lineN=i;var a=r.built=iu(e,r);return r.text=a.pre,G(e.display.lineMeasure,a.pre),r}function du(e,t,i,r){return Zn(e,ki(e,t),i,r)}function Qo(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ei(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function ki(e,t){var i=rt(t),r=Qo(e,i);r&&!r.text?r=null:r&&r.changes&&(au(e,r,i,ia(e)),e.curOp.forceUpdate=!0),r||(r=Ph(e,t));var a=pu(r,t,i);return{line:t,view:r,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function Zn(e,t,i,r,a){t.before&&(i=-1);var u=i+(r||""),f;return t.cache.hasOwnProperty(u)?f=t.cache[u]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Nh(e,t.view,t.rect),t.hasHeights=!0),f=Dh(e,t,i,r),f.bogus||(t.cache[u]=f)),{left:f.left,right:f.right,top:a?f.rtop:f.top,bottom:a?f.rbottom:f.bottom}}var mu={left:0,right:0,top:0,bottom:0};function gu(e,t,i){for(var r,a,u,f,p,m,g=0;g<e.length;g+=3)if(p=e[g],m=e[g+1],t<p?(a=0,u=1,f="left"):t<m?(a=t-p,u=a+1):(g==e.length-3||t==m&&e[g+3]>t)&&(u=m-p,a=u-1,t>=m&&(f="right")),a!=null){if(r=e[g+2],p==m&&i==(r.insertLeft?"left":"right")&&(f=i),i=="left"&&a==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)r=e[(g-=3)+2],f="left";if(i=="right"&&a==m-p)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)r=e[(g+=3)+2],f="right";break}return{node:r,start:a,end:u,collapse:f,coverStart:p,coverEnd:m}}function Oh(e,t){var i=mu;if(t=="left")for(var r=0;r<e.length&&(i=e[r]).left==i.right;r++);else for(var a=e.length-1;a>=0&&(i=e[a]).left==i.right;a--);return i}function Dh(e,t,i,r){var a=gu(t.map,i,r),u=a.node,f=a.start,p=a.end,m=a.collapse,g;if(u.nodeType==3){for(var A=0;A<4;A++){for(;f&&Xe(t.line.text.charAt(a.coverStart+f));)--f;for(;a.coverStart+p<a.coverEnd&&Xe(t.line.text.charAt(a.coverStart+p));)++p;if(w&&x<9&&f==0&&p==a.coverEnd-a.coverStart?g=u.parentNode.getBoundingClientRect():g=Oh(se(u,f,p).getClientRects(),r),g.left||g.right||f==0)break;p=f,f=f-1,m="right"}w&&x<11&&(g=Mh(e.display.measure,g))}else{f>0&&(m=r="right");var N;e.options.lineWrapping&&(N=u.getClientRects()).length>1?g=N[r=="right"?N.length-1:0]:g=u.getBoundingClientRect()}if(w&&x<9&&!f&&(!g||!g.left&&!g.right)){var j=u.parentNode.getClientRects()[0];j?g={left:j.left,right:j.left+bi(e.display),top:j.top,bottom:j.bottom}:g=mu}for(var W=g.top-t.rect.top,Y=g.bottom-t.rect.top,re=(W+Y)/2,me=t.view.measure.heights,be=0;be<me.length-1&&!(re<me[be]);be++);var _e=be?me[be-1]:0,we=me[be],Ie={left:(m=="right"?g.right:g.left)-t.rect.left,right:(m=="left"?g.left:g.right)-t.rect.left,top:_e,bottom:we};return!g.left&&!g.right&&(Ie.bogus=!0),e.options.singleCursorHeightPerLine||(Ie.rtop=W,Ie.rbottom=Y),Ie}function Mh(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ln(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*r,bottom:t.bottom*r}}function vu(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 ku(e){e.display.externalMeasure=null,Te(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vu(e.display.view[t])}function Vi(e){ku(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yu(){return L&&T?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function bu(){return L&&T?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ea(e){var t=Mn(e),i=t.widgets,r=0;if(i)for(var a=0;a<i.length;++a)i[a].above&&(r+=Xi(i[a]));return r}function Us(e,t,i,r,a){if(!a){var u=ea(t);i.top+=u,i.bottom+=u}if(r=="line")return i;r||(r="local");var f=pr(t);if(r=="local"?f+=qs(e.display):f-=e.display.viewOffset,r=="page"||r=="window"){var p=e.display.lineSpace.getBoundingClientRect();f+=p.top+(r=="window"?0:bu());var m=p.left+(r=="window"?0:yu());i.left+=m,i.right+=m}return i.top+=f,i.bottom+=f,i}function wu(e,t,i){if(i=="div")return t;var r=t.left,a=t.top;if(i=="page")r-=yu(),a-=bu();else if(i=="local"||!i){var u=e.display.sizer.getBoundingClientRect();r+=u.left,a+=u.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:r-f.left,top:a-f.top}}function $s(e,t,i,r,a){return r||(r=Ce(e.doc,t.line)),Us(e,r,du(e,r,t.ch,a),i)}function Rn(e,t,i,r,a,u){r=r||Ce(e.doc,t.line),a||(a=ki(e,r));function f(Y,re){var me=Zn(e,a,Y,re?"right":"left",u);return re?me.left=me.right:me.right=me.left,Us(e,r,me,i)}var p=Bt(r,e.doc.direction),m=t.ch,g=t.sticky;if(m>=r.text.length?(m=r.text.length,g="before"):m<=0&&(m=0,g="after"),!p)return f(g=="before"?m-1:m,g=="before");function A(Y,re,me){var be=p[re],_e=be.level==1;return f(me?Y-1:Y,_e!=me)}var N=ft(p,m,g),j=Ut,W=A(m,N,g=="before");return j!=null&&(W.other=A(m,j,g!="before")),W}function xu(e,t){var i=0;t=Se(e.doc,t),e.options.lineWrapping||(i=bi(e.display)*t.ch);var r=Ce(e.doc,t.line),a=pr(r)+qs(e.display);return{left:i,right:i,top:a,bottom:a+r.height}}function ta(e,t,i,r,a){var u=ce(e,t,i);return u.xRel=a,r&&(u.outside=r),u}function na(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return ta(r.first,0,null,-1,-1);var a=Nn(r,i),u=r.first+r.size-1;if(a>u)return ta(r.first+r.size-1,Ce(r,u).text.length,null,1,1);t<0&&(t=0);for(var f=Ce(r,a);;){var p=Rh(e,f,a,t,i),m=ch(f,p.ch+(p.xRel>0||p.outside>0?1:0));if(!m)return p;var g=m.find(1);if(g.line==a)return g;f=Ce(r,a=g.line)}}function _u(e,t,i,r){r-=ea(t);var a=t.text.length,u=pn(function(f){return Zn(e,i,f-1).bottom<=r},a,0);return a=pn(function(f){return Zn(e,i,f).top>r},u,a),{begin:u,end:a}}function Su(e,t,i,r){i||(i=ki(e,t));var a=Us(e,t,Zn(e,i,r),"line").top;return _u(e,t,i,a)}function ra(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function Rh(e,t,i,r,a){a-=pr(t);var u=ki(e,t),f=ea(t),p=0,m=t.text.length,g=!0,A=Bt(t,e.doc.direction);if(A){var N=(e.options.lineWrapping?Bh:Fh)(e,t,i,u,A,r,a);g=N.level!=1,p=g?N.from:N.to-1,m=g?N.to:N.from-1}var j=null,W=null,Y=pn(function(Pe){var Le=Zn(e,u,Pe);return Le.top+=f,Le.bottom+=f,ra(Le,r,a,!1)?(Le.top<=a&&Le.left<=r&&(j=Pe,W=Le),!0):!1},p,m),re,me,be=!1;if(W){var _e=r-W.left<W.right-r,we=_e==g;Y=j+(we?0:1),me=we?"after":"before",re=_e?W.left:W.right}else{!g&&(Y==m||Y==p)&&Y++,me=Y==0?"after":Y==t.text.length?"before":Zn(e,u,Y-(g?1:0)).bottom+f<=a==g?"after":"before";var Ie=Rn(e,ce(i,Y,me),"line",t,u);re=Ie.left,be=a<Ie.top?-1:a>=Ie.bottom?1:0}return Y=It(t.text,Y,1),ta(i,Y,me,be,r-re)}function Fh(e,t,i,r,a,u,f){var p=pn(function(N){var j=a[N],W=j.level!=1;return ra(Rn(e,ce(i,W?j.to:j.from,W?"before":"after"),"line",t,r),u,f,!0)},0,a.length-1),m=a[p];if(p>0){var g=m.level!=1,A=Rn(e,ce(i,g?m.from:m.to,g?"after":"before"),"line",t,r);ra(A,u,f,!0)&&A.top>f&&(m=a[p-1])}return m}function Bh(e,t,i,r,a,u,f){var p=_u(e,t,r,f),m=p.begin,g=p.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var A=null,N=null,j=0;j<a.length;j++){var W=a[j];if(!(W.from>=g||W.to<=m)){var Y=W.level!=1,re=Zn(e,r,Y?Math.min(g,W.to)-1:Math.max(m,W.from)).right,me=re<u?u-re+1e9:re-u;(!A||N>me)&&(A=W,N=me)}}return A||(A=a[a.length-1]),A.from<m&&(A={from:m,to:A.to,level:A.level}),A.to>g&&(A={from:A.from,to:g,level:A.level}),A}var Zr;function yi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Zr==null){Zr=K("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Zr.appendChild(document.createTextNode("x")),Zr.appendChild(K("br"));Zr.appendChild(document.createTextNode("x"))}G(e.measure,Zr);var i=Zr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Te(e.measure),i||1}function bi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=K("span","xxxxxxxxxx"),i=K("pre",[t],"CodeMirror-line-like");G(e.measure,i);var r=t.getBoundingClientRect(),a=(r.right-r.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function ia(e){for(var t=e.display,i={},r={},a=t.gutters.clientLeft,u=t.gutters.firstChild,f=0;u;u=u.nextSibling,++f){var p=e.display.gutterSpecs[f].className;i[p]=u.offsetLeft+u.clientLeft+a,r[p]=u.clientWidth}return{fixedPos:sa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function sa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Tu(e){var t=yi(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/bi(e.display)-3);return function(a){if(Cr(e.doc,a))return 0;var u=0;if(a.widgets)for(var f=0;f<a.widgets.length;f++)a.widgets[f].height&&(u+=a.widgets[f].height);return i?u+(Math.ceil(a.text.length/r)||1)*t:u+t}}function oa(e){var t=e.doc,i=Tu(e);t.iter(function(r){var a=i(r);a!=r.height&&Qt(r,a)})}function Qr(e,t,i,r){var a=e.display;if(!i&&An(t).getAttribute("cm-not-content")=="true")return null;var u,f,p=a.lineSpace.getBoundingClientRect();try{u=t.clientX-p.left,f=t.clientY-p.top}catch{return null}var m=na(e,u,f),g;if(r&&m.xRel>0&&(g=Ce(e.doc,m.line).text).length==m.ch){var A=qe(g,g.length,e.options.tabSize)-g.length;m=ce(m.line,Math.max(0,Math.round((u-hu(e.display).left)/bi(e.display))-A))}return m}function ei(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;r<i.length;r++)if(t-=i[r].size,t<0)return r}function an(e,t,i,r){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),r||(r=0);var a=e.display;if(r&&i<a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)hr&&Ko(e.doc,t)<a.viewTo&&Lr(e);else if(i<=a.viewFrom)hr&&nu(e.doc,i+r)>a.viewFrom?Lr(e):(a.viewFrom+=r,a.viewTo+=r);else if(t<=a.viewFrom&&i>=a.viewTo)Lr(e);else if(t<=a.viewFrom){var u=Gs(e,i,i+r,1);u?(a.view=a.view.slice(u.index),a.viewFrom=u.lineN,a.viewTo+=r):Lr(e)}else if(i>=a.viewTo){var f=Gs(e,t,t,-1);f?(a.view=a.view.slice(0,f.index),a.viewTo=f.lineN):Lr(e)}else{var p=Gs(e,t,t,-1),m=Gs(e,i,i+r,1);p&&m?(a.view=a.view.slice(0,p.index).concat(zs(e,p.lineN,m.lineN)).concat(a.view.slice(m.index)),a.viewTo+=r):Lr(e)}var g=a.externalMeasured;g&&(i<g.lineN?g.lineN+=r:t<g.lineN+g.size&&(a.externalMeasured=null))}function Ar(e,t,i){e.curOp.viewChanged=!0;var r=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var u=r.view[ei(e,t)];if(u.node!=null){var f=u.changes||(u.changes=[]);z(f,i)==-1&&f.push(i)}}}function Lr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gs(e,t,i,r){var a=ei(e,t),u,f=e.display.view;if(!hr||i==e.doc.first+e.doc.size)return{index:a,lineN:i};for(var p=e.display.viewFrom,m=0;m<a;m++)p+=f[m].size;if(p!=t){if(r>0){if(a==f.length-1)return null;u=p+f[a].size-t,a++}else u=p-t;t+=u,i+=u}for(;Ko(e.doc,i)!=i;){if(a==(r<0?0:f.length-1))return null;i+=r*f[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:i}}function Wh(e,t,i){var r=e.display,a=r.view;a.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=zs(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=zs(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ei(e,t))),r.viewFrom=t,r.viewTo<i?r.view=r.view.concat(zs(e,r.viewTo,i)):r.viewTo>i&&(r.view=r.view.slice(0,ei(e,i)))),r.viewTo=i}function Iu(e){for(var t=e.display.view,i=0,r=0;r<t.length;r++){var a=t[r];!a.hidden&&(!a.node||a.changes)&&++i}return i}function Yi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Cu(e,t){t===void 0&&(t=!0);var i=e.doc,r={},a=r.cursors=document.createDocumentFragment(),u=r.selection=document.createDocumentFragment(),f=e.options.$customCursor;f&&(t=!0);for(var p=0;p<i.sel.ranges.length;p++)if(!(!t&&p==i.sel.primIndex)){var m=i.sel.ranges[p];if(!(m.from().line>=e.display.viewTo||m.to().line<e.display.viewFrom)){var g=m.empty();if(f){var A=f(e,m);A&&aa(e,A,a)}else(g||e.options.showCursorWhenSelecting)&&aa(e,m.head,a);g||Hh(e,m,u)}}return r}function aa(e,t,i){var r=Rn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=i.appendChild(K("div"," ","CodeMirror-cursor"));if(a.style.left=r.left+"px",a.style.top=r.top+"px",a.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var u=$s(e,t,"div",null,null),f=u.right-u.left;a.style.width=(f>0?f:e.defaultCharWidth())+"px"}if(r.other){var p=i.appendChild(K("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));p.style.display="",p.style.left=r.other.left+"px",p.style.top=r.other.top+"px",p.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Ks(e,t){return e.top-t.top||e.left-t.left}function Hh(e,t,i){var r=e.display,a=e.doc,u=document.createDocumentFragment(),f=hu(e.display),p=f.left,m=Math.max(r.sizerWidth,Jr(e)-r.sizer.offsetLeft)-f.right,g=a.direction=="ltr";function A(we,Ie,Pe,Le){Ie<0&&(Ie=0),Ie=Math.round(Ie),Le=Math.round(Le),u.appendChild(K("div",null,"CodeMirror-selected","position: absolute; left: "+we+`px;
|
||
top: `+Ie+"px; width: "+(Pe??m-we)+`px;
|
||
height: `+(Le-Ie)+"px"))}function N(we,Ie,Pe){var Le=Ce(a,we),Ve=Le.text.length,ut,Dt;function vt(St,cn){return $s(e,ce(we,St),"div",Le,cn)}function vn(St,cn,Wt){var Ct=Su(e,Le,null,St),Tt=cn=="ltr"==(Wt=="after")?"left":"right",yt=Wt=="after"?Ct.begin:Ct.end-(/\s/.test(Le.text.charAt(Ct.end-1))?2:1);return vt(yt,Tt)[Tt]}var un=Bt(Le,a.direction);return Kr(un,Ie||0,Pe??Ve,function(St,cn,Wt,Ct){var Tt=Wt=="ltr",yt=vt(St,Tt?"left":"right"),fn=vt(cn-1,Tt?"right":"left"),Oi=Ie==null&&St==0,Mr=Pe==null&&cn==Ve,Yt=Ct==0,Qn=!un||Ct==un.length-1;if(fn.top-yt.top<=3){var Mt=(g?Oi:Mr)&&Yt,Oa=(g?Mr:Oi)&&Qn,vr=Mt?p:(Tt?yt:fn).left,si=Oa?m:(Tt?fn:yt).right;A(vr,yt.top,si-vr,yt.bottom)}else{var oi,tn,Di,Da;Tt?(oi=g&&Oi&&Yt?p:yt.left,tn=g?m:vn(St,Wt,"before"),Di=g?p:vn(cn,Wt,"after"),Da=g&&Mr&&Qn?m:fn.right):(oi=g?vn(St,Wt,"before"):p,tn=!g&&Oi&&Yt?m:yt.right,Di=!g&&Mr&&Qn?p:fn.left,Da=g?vn(cn,Wt,"after"):m),A(oi,yt.top,tn-oi,yt.bottom),yt.bottom<fn.top&&A(p,yt.bottom,null,fn.top),A(Di,fn.top,Da-Di,fn.bottom)}(!ut||Ks(yt,ut)<0)&&(ut=yt),Ks(fn,ut)<0&&(ut=fn),(!Dt||Ks(yt,Dt)<0)&&(Dt=yt),Ks(fn,Dt)<0&&(Dt=fn)}),{start:ut,end:Dt}}var j=t.from(),W=t.to();if(j.line==W.line)N(j.line,j.ch,W.ch);else{var Y=Ce(a,j.line),re=Ce(a,W.line),me=Mn(Y)==Mn(re),be=N(j.line,j.ch,me?Y.text.length+1:null).end,_e=N(W.line,me?0:null,W.ch).start;me&&(be.top<_e.top-2?(A(be.right,be.top,null,be.bottom),A(p,_e.top,_e.left,_e.bottom)):A(be.right,be.top,_e.left-be.right,be.bottom)),be.bottom<_e.top&&A(p,be.bottom,null,_e.top)}i.appendChild(u)}function la(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||wi(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Au(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ca(e))}function ua(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&wi(e))},100)}function ca(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Me(e,"focus",e,t),e.state.focused=!0,Oe(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()),la(e))}function wi(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Me(e,"blur",e,t),e.state.focused=!1,ke(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Xs(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),a=t.lineDiv.getBoundingClientRect().top,u=0,f=0;f<t.view.length;f++){var p=t.view[f],m=e.options.lineWrapping,g=void 0,A=0;if(!p.hidden){if(a+=p.line.height,w&&x<8){var N=p.node.offsetTop+p.node.offsetHeight;g=N-i,i=N}else{var j=p.node.getBoundingClientRect();g=j.bottom-j.top,!m&&p.text.firstChild&&(A=p.text.firstChild.getBoundingClientRect().right-j.left-1)}var W=p.line.height-g;if((W>.005||W<-.005)&&(a<r&&(u-=W),Qt(p.line,g),Lu(p.line),p.rest))for(var Y=0;Y<p.rest.length;Y++)Lu(p.rest[Y]);if(A>e.display.sizerWidth){var re=Math.ceil(A/bi(e.display));re>e.display.maxLineLength&&(e.display.maxLineLength=re,e.display.maxLine=p.line,e.display.maxLineChanged=!0)}}}Math.abs(u)>2&&(t.scroller.scrollTop+=u)}function Lu(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}function Vs(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-qs(e));var a=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,u=Nn(t,r),f=Nn(t,a);if(i&&i.ensure){var p=i.ensure.from.line,m=i.ensure.to.line;p<u?(u=p,f=Nn(t,pr(Ce(t,p))+e.wrapper.clientHeight)):Math.min(m,t.lastLine())>=f&&(u=Nn(t,pr(Ce(t,m))-e.wrapper.clientHeight),f=m)}return{from:u,to:Math.max(f,u+1)}}function jh(e,t){if(!pt(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),a=null;if(t.top+r.top<0?a=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),a!=null&&!H){var u=K("div","",null,`position: absolute;
|
||
top: `+(t.top-i.viewOffset-qs(e.display))+`px;
|
||
height: `+(t.bottom-t.top+Jn(e)+i.barHeight)+`px;
|
||
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(u),u.scrollIntoView(a),e.display.lineSpace.removeChild(u)}}}function zh(e,t,i,r){r==null&&(r=0);var a;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ce(t.line,t.ch+1,"before"):t,t=t.ch?ce(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var u=0;u<5;u++){var f=!1,p=Rn(e,t),m=!i||i==t?p:Rn(e,i);a={left:Math.min(p.left,m.left),top:Math.min(p.top,m.top)-r,right:Math.max(p.left,m.left),bottom:Math.max(p.bottom,m.bottom)+r};var g=fa(e,a),A=e.doc.scrollTop,N=e.doc.scrollLeft;if(g.scrollTop!=null&&(Zi(e,g.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(f=!0)),g.scrollLeft!=null&&(ti(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-N)>1&&(f=!0)),!f)break}return a}function qh(e,t){var i=fa(e,t);i.scrollTop!=null&&Zi(e,i.scrollTop),i.scrollLeft!=null&&ti(e,i.scrollLeft)}function fa(e,t){var i=e.display,r=yi(e.display);t.top<0&&(t.top=0);var a=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,u=Zo(e),f={};t.bottom-t.top>u&&(t.bottom=t.top+u);var p=e.doc.height+Jo(i),m=t.top<r,g=t.bottom>p-r;if(t.top<a)f.scrollTop=m?0:t.top;else if(t.bottom>a+u){var A=Math.min(t.top,(g?p:t.bottom)-u);A!=a&&(f.scrollTop=A)}var N=e.options.fixedGutter?0:i.gutters.offsetWidth,j=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-N,W=Jr(e)-i.gutters.offsetWidth,Y=t.right-t.left>W;return Y&&(t.right=t.left+W),t.left<10?f.scrollLeft=0:t.left<j?f.scrollLeft=Math.max(0,t.left+N-(Y?0:10)):t.right>W+j-3&&(f.scrollLeft=t.right+(Y?0:10)-W),f}function ha(e,t){t!=null&&(Ys(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function xi(e){Ys(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ji(e,t,i){(t!=null||i!=null)&&Ys(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Uh(e,t){Ys(e),e.curOp.scrollToPos=t}function Ys(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=xu(e,t.from),r=xu(e,t.to);Eu(e,i,r,t.margin)}}function Eu(e,t,i,r){var a=fa(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});Ji(e,a.scrollLeft,a.scrollTop)}function Zi(e,t){Math.abs(e.doc.scrollTop-t)<2||(h||da(e,{top:t}),Nu(e,t,!0),h&&da(e),ts(e,100))}function Nu(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ti(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,Ru(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Qi(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+Jo(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var ni=function(e,t,i){this.cm=i;var r=this.vert=K("div",[K("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=K("div",[K("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=a.tabIndex=-1,e(r),e(a),Ee(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ee(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ni.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var a=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var u=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+u)+"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:i?r:0,bottom:t?r:0}},ni.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ni.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ni.prototype.zeroWidthHack=function(){var e=B&&!D?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},ni.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function r(){var a=e.getBoundingClientRect(),u=i=="vert"?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1);u!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},ni.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var es=function(){};es.prototype.update=function(){return{bottom:0,right:0}},es.prototype.setScrollLeft=function(){},es.prototype.setScrollTop=function(){},es.prototype.clear=function(){};function _i(e,t){t||(t=Qi(e));var i=e.display.barWidth,r=e.display.barHeight;Pu(e,t);for(var a=0;a<4&&i!=e.display.barWidth||r!=e.display.barHeight;a++)i!=e.display.barWidth&&e.options.lineWrapping&&Xs(e),Pu(e,Qi(e)),i=e.display.barWidth,r=e.display.barHeight}function Pu(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Ou={native:ni,null:es};function Du(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ou[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ee(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?ti(e,t):Zi(e,t)},e),e.display.scrollbars.addClass&&Oe(e.display.wrapper,e.display.scrollbars.addClass)}var $h=0;function ri(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:++$h,markArrays:null},xh(e.curOp)}function ii(e){var t=e.curOp;t&&Sh(t,function(i){for(var r=0;r<i.ops.length;r++)i.ops[r].cm.curOp=null;Gh(i)})}function Gh(e){for(var t=e.ops,i=0;i<t.length;i++)Kh(t[i]);for(var r=0;r<t.length;r++)Xh(t[r]);for(var a=0;a<t.length;a++)Vh(t[a]);for(var u=0;u<t.length;u++)Yh(t[u]);for(var f=0;f<t.length;f++)Jh(t[f])}function Kh(e){var t=e.cm,i=t.display;Qh(t),e.updateMaxLine&&Vo(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Js(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xh(e){e.updatedDisplay=e.mustUpdate&&pa(e.cm,e.update)}function Vh(e){var t=e.cm,i=t.display;e.updatedDisplay&&Xs(t),e.barMeasure=Qi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=du(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Jr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Yh(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ti(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==le();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&_i(t,e.barMeasure),e.updatedDisplay&&ga(t,e.barMeasure),e.selectionChanged&&la(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Au(e.cm)}function Jh(e){var t=e.cm,i=t.display,r=t.doc;if(e.updatedDisplay&&Mu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Nu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ti(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=zh(t,Se(r,e.scrollToPos.from),Se(r,e.scrollToPos.to),e.scrollToPos.margin);jh(t,a)}var u=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(u)for(var p=0;p<u.length;++p)u[p].lines.length||Me(u[p],"hide");if(f)for(var m=0;m<f.length;++m)f[m].lines.length&&Me(f[m],"unhide");i.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Me(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function gn(e,t){if(e.curOp)return t();ri(e);try{return t()}finally{ii(e)}}function Pt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ri(e);try{return t.apply(e,arguments)}finally{ii(e)}}}function en(e){return function(){if(this.curOp)return e.apply(this,arguments);ri(this);try{return e.apply(this,arguments)}finally{ii(this)}}}function Ot(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ri(t);try{return e.apply(this,arguments)}finally{ii(t)}}}function ts(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,tt(Zh,e))}function Zh(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,r=Ui(e,t.highlightFrontier),a=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(u){if(r.line>=e.display.viewFrom){var f=u.styles,p=u.text.length>e.options.maxHighlightLength?Kt(t.mode,r.state):null,m=zl(e,u,r,!0);p&&(r.state=p),u.styles=m.styles;var g=u.styleClasses,A=m.classes;A?u.styleClasses=A:g&&(u.styleClasses=null);for(var N=!f||f.length!=u.styles.length||g!=A&&(!g||!A||g.bgClass!=A.bgClass||g.textClass!=A.textClass),j=0;!N&&j<f.length;++j)N=f[j]!=u.styles[j];N&&a.push(r.line),u.stateAfter=r.save(),r.nextLine()}else u.text.length<=e.options.maxHighlightLength&&qo(e,u.text,r),u.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>i)return ts(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),a.length&&gn(e,function(){for(var u=0;u<a.length;u++)Ar(e,a[u],"text")})}}var Js=function(e,t,i){var r=e.display;this.viewport=t,this.visible=Vs(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Jr(e),this.force=i,this.dims=ia(e),this.events=[]};Js.prototype.signal=function(e,t){wt(e,t)&&this.events.push(arguments)},Js.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Me.apply(null,this.events[e])};function Qh(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Jn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Jn(e)+"px",t.scrollbarsClipped=!0)}function ep(e){if(e.hasFocus())return null;var t=le();if(!t||!J(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&J(e.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}function tp(e){if(!(!e||!e.activeElt||e.activeElt==le())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&J(document.body,e.anchorNode)&&J(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function pa(e,t){var i=e.display,r=e.doc;if(t.editorIsHidden)return Lr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Iu(e)==0)return!1;Fu(e)&&(Lr(e),t.dims=ia(e));var a=r.first+r.size,u=Math.max(t.visible.from-e.options.viewportMargin,r.first),f=Math.min(a,t.visible.to+e.options.viewportMargin);i.viewFrom<u&&u-i.viewFrom<20&&(u=Math.max(r.first,i.viewFrom)),i.viewTo>f&&i.viewTo-f<20&&(f=Math.min(a,i.viewTo)),hr&&(u=Ko(e.doc,u),f=nu(e.doc,f));var p=u!=i.viewFrom||f!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Wh(e,u,f),i.viewOffset=pr(Ce(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var m=Iu(e);if(!p&&m==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=ep(e);return m>4&&(i.lineDiv.style.display="none"),np(e,i.updateLineNumbers,t.dims),m>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,tp(g),Te(i.cursorDiv),Te(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,p&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,ts(e,400)),i.updateLineNumbers=null,!0}function Mu(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Jr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+Jo(e.display)-Zo(e),i.top)}),t.visible=Vs(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Vs(e.display,e.doc,i));if(!pa(e,t))break;Xs(e);var a=Qi(e);Yi(e),_i(e,a),ga(e,a),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 da(e,t){var i=new Js(e,t);if(pa(e,i)){Xs(e),Mu(e,i);var r=Qi(e);Yi(e),_i(e,r),ga(e,r),i.finish()}}function np(e,t,i){var r=e.display,a=e.options.lineNumbers,u=r.lineDiv,f=u.firstChild;function p(Y){var re=Y.nextSibling;return y&&B&&e.display.currentWheelTarget==Y?Y.style.display="none":Y.parentNode.removeChild(Y),re}for(var m=r.view,g=r.viewFrom,A=0;A<m.length;A++){var N=m[A];if(!N.hidden)if(!N.node||N.node.parentNode!=u){var j=Lh(e,N,g,i);u.insertBefore(j,f)}else{for(;f!=N.node;)f=p(f);var W=a&&t!=null&&t<=g&&N.lineNumber;N.changes&&(z(N.changes,"gutter")>-1&&(W=!1),au(e,N,g,i)),W&&(Te(N.lineNumber),N.lineNumber.appendChild(document.createTextNode(Yr(e.options,g)))),f=N.node.nextSibling}g+=N.size}for(;f;)f=p(f)}function ma(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Nt(e,"gutterChanged",e)}function ga(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+Jn(e)+"px"}function Ru(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=sa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,u=r+"px",f=0;f<i.length;f++)if(!i[f].hidden){e.options.fixedGutter&&(i[f].gutter&&(i[f].gutter.style.left=u),i[f].gutterBackground&&(i[f].gutterBackground.style.left=u));var p=i[f].alignable;if(p)for(var m=0;m<p.length;m++)p[m].style.left=u}e.options.fixedGutter&&(t.gutters.style.left=r+a+"px")}}function Fu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=Yr(e.options,t.first+t.size-1),r=e.display;if(i.length!=r.lineNumChars){var a=r.measure.appendChild(K("div",[K("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),u=a.firstChild.offsetWidth,f=a.offsetWidth-u;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(u,r.lineGutter.offsetWidth-f)+1,r.lineNumWidth=r.lineNumInnerWidth+f,r.lineNumChars=r.lineNumInnerWidth?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ma(e.display),!0}return!1}function va(e,t){for(var i=[],r=!1,a=0;a<e.length;a++){var u=e[a],f=null;if(typeof u!="string"&&(f=u.style,u=u.className),u=="CodeMirror-linenumbers")if(t)r=!0;else continue;i.push({className:u,style:f})}return t&&!r&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Bu(e){var t=e.gutters,i=e.gutterSpecs;Te(t),e.lineGutter=null;for(var r=0;r<i.length;++r){var a=i[r],u=a.className,f=a.style,p=t.appendChild(K("div",null,"CodeMirror-gutter "+u));f&&(p.style.cssText=f),u=="CodeMirror-linenumbers"&&(e.lineGutter=p,p.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",ma(e)}function ns(e){Bu(e.display),an(e),Ru(e)}function rp(e,t,i,r){var a=this;this.input=i,a.scrollbarFiller=K("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=K("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=b("div",null,"CodeMirror-code"),a.selectionDiv=K("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=K("div",null,"CodeMirror-cursors"),a.measure=K("div",null,"CodeMirror-measure"),a.lineMeasure=K("div",null,"CodeMirror-measure"),a.lineSpace=b("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var u=b("div",[a.lineSpace],"CodeMirror-lines");a.mover=K("div",[u],null,"position: relative"),a.sizer=K("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=K("div",null,null,"position: absolute; height: "+V+"px; width: 1px;"),a.gutters=K("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=K("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=K("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),a.wrapper.setAttribute("translate","no"),w&&x<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!y&&!(h&&M)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=va(r.gutters,r.lineNumbers),Bu(a),i.init(a)}var Zs=0,mr=null;w?mr=-.53:h?mr=15:L?mr=-.7:F&&(mr=-1/3);function Wu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function ip(e){var t=Wu(e);return t.x*=mr,t.y*=mr,t}function Hu(e,t){var i=Wu(t),r=i.x,a=i.y,u=mr;t.deltaMode===0&&(r=t.deltaX,a=t.deltaY,u=1);var f=e.display,p=f.scroller,m=p.scrollWidth>p.clientWidth,g=p.scrollHeight>p.clientHeight;if(r&&m||a&&g){if(a&&B&&y){e:for(var A=t.target,N=f.view;A!=p;A=A.parentNode)for(var j=0;j<N.length;j++)if(N[j].node==A){e.display.currentWheelTarget=A;break e}}if(r&&!h&&!_&&u!=null){a&&g&&Zi(e,Math.max(0,p.scrollTop+a*u)),ti(e,Math.max(0,p.scrollLeft+r*u)),(!a||a&&g)&&_t(t),f.wheelStartX=null;return}if(a&&u!=null){var W=a*u,Y=e.doc.scrollTop,re=Y+f.wrapper.clientHeight;W<0?Y=Math.max(0,Y+W-50):re=Math.min(e.doc.height,re+W+50),da(e,{top:Y,bottom:re})}Zs<20&&t.deltaMode!==0&&(f.wheelStartX==null?(f.wheelStartX=p.scrollLeft,f.wheelStartY=p.scrollTop,f.wheelDX=r,f.wheelDY=a,setTimeout(function(){if(f.wheelStartX!=null){var me=p.scrollLeft-f.wheelStartX,be=p.scrollTop-f.wheelStartY,_e=be&&f.wheelDY&&be/f.wheelDY||me&&f.wheelDX&&me/f.wheelDX;f.wheelStartX=f.wheelStartY=null,_e&&(mr=(mr*Zs+_e)/(Zs+1),++Zs)}},200)):(f.wheelDX+=r,f.wheelDY+=a))}}var Tn=function(e,t){this.ranges=e,this.primIndex=t};Tn.prototype.primary=function(){return this.ranges[this.primIndex]},Tn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],r=e.ranges[t];if(!P(i.anchor,r.anchor)||!P(i.head,r.head))return!1}return!0},Tn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new it(ne(this.ranges[t].anchor),ne(this.ranges[t].head));return new Tn(e,this.primIndex)},Tn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Tn.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var r=this.ranges[i];if(v(t,r.from())>=0&&v(e,r.to())<=0)return i}return-1};var it=function(e,t){this.anchor=e,this.head=t};it.prototype.from=function(){return Be(this.anchor,this.head)},it.prototype.to=function(){return de(this.anchor,this.head)},it.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Fn(e,t,i){var r=e&&e.options.selectionsMayTouch,a=t[i];t.sort(function(j,W){return v(j.from(),W.from())}),i=z(t,a);for(var u=1;u<t.length;u++){var f=t[u],p=t[u-1],m=v(p.to(),f.from());if(r&&!f.empty()?m>0:m>=0){var g=Be(p.from(),f.from()),A=de(p.to(),f.to()),N=p.empty()?f.from()==f.head:p.from()==p.head;u<=i&&--i,t.splice(--u,2,new it(N?A:g,N?g:A))}}return new Tn(t,i)}function Er(e,t){return new Tn([new it(e,t||e)],0)}function Nr(e){return e.text?ce(e.from.line+e.text.length-1,Ae(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ju(e,t){if(v(e,t.from)<0)return e;if(v(e,t.to)<=0)return Nr(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Nr(t).ch-t.to.ch),ce(i,r)}function ka(e,t){for(var i=[],r=0;r<e.sel.ranges.length;r++){var a=e.sel.ranges[r];i.push(new it(ju(a.anchor,t),ju(a.head,t)))}return Fn(e.cm,i,e.sel.primIndex)}function zu(e,t,i){return e.line==t.line?ce(i.line,e.ch-t.ch+i.ch):ce(i.line+(e.line-t.line),e.ch)}function sp(e,t,i){for(var r=[],a=ce(e.first,0),u=a,f=0;f<t.length;f++){var p=t[f],m=zu(p.from,a,u),g=zu(Nr(p),a,u);if(a=p.to,u=g,i=="around"){var A=e.sel.ranges[f],N=v(A.head,A.anchor)<0;r[f]=new it(N?g:m,N?m:g)}else r[f]=new it(m,m)}return new Tn(r,e.sel.primIndex)}function ya(e){e.doc.mode=Vn(e.options,e.doc.modeOption),rs(e)}function rs(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,ts(e,100),e.state.modeGen++,e.curOp&&an(e)}function qu(e,t){return t.from.ch==0&&t.to.ch==0&&Ae(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ba(e,t,i,r){function a(_e){return i?i[_e]:null}function u(_e,we,Ie){ph(_e,we,Ie,r),Nt(_e,"change",_e,t)}function f(_e,we){for(var Ie=[],Pe=_e;Pe<we;++Pe)Ie.push(new gi(g[Pe],a(Pe),r));return Ie}var p=t.from,m=t.to,g=t.text,A=Ce(e,p.line),N=Ce(e,m.line),j=Ae(g),W=a(g.length-1),Y=m.line-p.line;if(t.full)e.insert(0,f(0,g.length)),e.remove(g.length,e.size-g.length);else if(qu(e,t)){var re=f(0,g.length-1);u(N,N.text,W),Y&&e.remove(p.line,Y),re.length&&e.insert(p.line,re)}else if(A==N)if(g.length==1)u(A,A.text.slice(0,p.ch)+j+A.text.slice(m.ch),W);else{var me=f(1,g.length-1);me.push(new gi(j+A.text.slice(m.ch),W,r)),u(A,A.text.slice(0,p.ch)+g[0],a(0)),e.insert(p.line+1,me)}else if(g.length==1)u(A,A.text.slice(0,p.ch)+g[0]+N.text.slice(m.ch),a(0)),e.remove(p.line+1,Y);else{u(A,A.text.slice(0,p.ch)+g[0],a(0)),u(N,j+N.text.slice(m.ch),W);var be=f(1,g.length-1);Y>1&&e.remove(p.line+1,Y-1),e.insert(p.line+1,be)}Nt(e,"change",e,t)}function Pr(e,t,i){function r(a,u,f){if(a.linked)for(var p=0;p<a.linked.length;++p){var m=a.linked[p];if(m.doc!=u){var g=f&&m.sharedHist;i&&!g||(t(m.doc,g),r(m.doc,a,g))}}}r(e,null,!0)}function Uu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,oa(e),ya(e),$u(e),e.options.direction=t.direction,e.options.lineWrapping||Vo(e),e.options.mode=t.modeOption,an(e)}function $u(e){(e.doc.direction=="rtl"?Oe:ke)(e.display.lineDiv,"CodeMirror-rtl")}function op(e){gn(e,function(){$u(e),an(e)})}function Qs(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 wa(e,t){var i={from:ne(t.from),to:Nr(t),text:En(e,t.from,t.to)};return Xu(e,i,t.from.line,t.to.line+1),Pr(e,function(r){return Xu(r,i,t.from.line,t.to.line+1)},!0),i}function Gu(e){for(;e.length;){var t=Ae(e);if(t.ranges)e.pop();else break}}function ap(e,t){if(t)return Gu(e.done),Ae(e.done);if(e.done.length&&!Ae(e.done).ranges)return Ae(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ae(e.done)}function Ku(e,t,i,r){var a=e.history;a.undone.length=0;var u=+new Date,f,p;if((a.lastOp==r||a.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&a.lastModTime>u-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(f=ap(a,a.lastOp==r)))p=Ae(f.changes),v(t.from,t.to)==0&&v(t.from,p.to)==0?p.to=Nr(t):f.changes.push(wa(e,t));else{var m=Ae(a.done);for((!m||!m.ranges)&&eo(e.sel,a.done),f={changes:[wa(e,t)],generation:a.generation},a.done.push(f);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(i),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=u,a.lastOp=a.lastSelOp=r,a.lastOrigin=a.lastSelOrigin=t.origin,p||Me(e,"historyAdded")}function lp(e,t,i,r){var a=t.charAt(0);return a=="*"||a=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function up(e,t,i,r){var a=e.history,u=r&&r.origin;i==a.lastSelOp||u&&a.lastSelOrigin==u&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==u||lp(e,u,Ae(a.done),t))?a.done[a.done.length-1]=t:eo(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=u,a.lastSelOp=i,r&&r.clearRedo!==!1&&Gu(a.undone)}function eo(e,t){var i=Ae(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Xu(e,t,i,r){var a=t["spans_"+e.id],u=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(f){f.markedSpans&&((a||(a=t["spans_"+e.id]={}))[u]=f.markedSpans),++u})}function cp(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function fp(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var r=[],a=0;a<t.text.length;++a)r.push(cp(i[a]));return r}function Vu(e,t){var i=fp(e,t),r=$o(e,t);if(!i)return r;if(!r)return i;for(var a=0;a<i.length;++a){var u=i[a],f=r[a];if(u&&f){e:for(var p=0;p<f.length;++p){for(var m=f[p],g=0;g<u.length;++g)if(u[g].marker==m.marker)continue e;u.push(m)}}else f&&(i[a]=f)}return i}function Si(e,t,i){for(var r=[],a=0;a<e.length;++a){var u=e[a];if(u.ranges){r.push(i?Tn.prototype.deepCopy.call(u):u);continue}var f=u.changes,p=[];r.push({changes:p});for(var m=0;m<f.length;++m){var g=f[m],A=void 0;if(p.push({from:g.from,to:g.to,text:g.text}),t)for(var N in g)(A=N.match(/^spans_(\d+)$/))&&z(t,Number(A[1]))>-1&&(Ae(p)[N]=g[N],delete g[N])}}return r}function xa(e,t,i,r){if(r){var a=e.anchor;if(i){var u=v(t,a)<0;u!=v(i,a)<0?(a=t,t=i):u!=v(t,i)<0&&(t=i)}return new it(a,t)}else return new it(i||t,t)}function to(e,t,i,r,a){a==null&&(a=e.cm&&(e.cm.display.shift||e.extend)),Vt(e,new Tn([xa(e.sel.primary(),t,i,a)],0),r)}function Yu(e,t,i){for(var r=[],a=e.cm&&(e.cm.display.shift||e.extend),u=0;u<e.sel.ranges.length;u++)r[u]=xa(e.sel.ranges[u],t[u],null,a);var f=Fn(e.cm,r,e.sel.primIndex);Vt(e,f,i)}function _a(e,t,i,r){var a=e.sel.ranges.slice(0);a[t]=i,Vt(e,Fn(e.cm,a,e.sel.primIndex),r)}function Ju(e,t,i,r){Vt(e,Er(t,i),r)}function hp(e,t,i){var r={ranges:t.ranges,update:function(a){this.ranges=[];for(var u=0;u<a.length;u++)this.ranges[u]=new it(Se(e,a[u].anchor),Se(e,a[u].head))},origin:i&&i.origin};return Me(e,"beforeSelectionChange",e,r),e.cm&&Me(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Fn(e.cm,r.ranges,r.ranges.length-1):t}function Zu(e,t,i){var r=e.history.done,a=Ae(r);a&&a.ranges?(r[r.length-1]=t,no(e,t,i)):Vt(e,t,i)}function Vt(e,t,i){no(e,t,i),up(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function no(e,t,i){(wt(e,"beforeSelectionChange")||e.cm&&wt(e.cm,"beforeSelectionChange"))&&(t=hp(e,t,i));var r=i&&i.bias||(v(t.primary().head,e.sel.primary().head)<0?-1:1);Qu(e,tc(e,t,r,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&xi(e.cm)}function Qu(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Gn(e.cm)),Nt(e,"cursorActivity",e))}function ec(e){Qu(e,tc(e,e.sel,null,!1))}function tc(e,t,i,r){for(var a,u=0;u<t.ranges.length;u++){var f=t.ranges[u],p=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[u],m=ro(e,f.anchor,p&&p.anchor,i,r),g=ro(e,f.head,p&&p.head,i,r);(a||m!=f.anchor||g!=f.head)&&(a||(a=t.ranges.slice(0,u)),a[u]=new it(m,g))}return a?Fn(e.cm,a,t.primIndex):t}function Ti(e,t,i,r,a){var u=Ce(e,t.line);if(u.markedSpans)for(var f=0;f<u.markedSpans.length;++f){var p=u.markedSpans[f],m=p.marker,g="selectLeft"in m?!m.selectLeft:m.inclusiveLeft,A="selectRight"in m?!m.selectRight:m.inclusiveRight;if((p.from==null||(g?p.from<=t.ch:p.from<t.ch))&&(p.to==null||(A?p.to>=t.ch:p.to>t.ch))){if(a&&(Me(m,"beforeCursorEnter"),m.explicitlyCleared))if(u.markedSpans){--f;continue}else break;if(!m.atomic)continue;if(i){var N=m.find(r<0?1:-1),j=void 0;if((r<0?A:g)&&(N=nc(e,N,-r,N&&N.line==t.line?u:null)),N&&N.line==t.line&&(j=v(N,i))&&(r<0?j<0:j>0))return Ti(e,N,t,r,a)}var W=m.find(r<0?-1:1);return(r<0?g:A)&&(W=nc(e,W,r,W.line==t.line?u:null)),W?Ti(e,W,t,r,a):null}}return t}function ro(e,t,i,r,a){var u=r||1,f=Ti(e,t,i,u,a)||!a&&Ti(e,t,i,u,!0)||Ti(e,t,i,-u,a)||!a&&Ti(e,t,i,-u,!0);return f||(e.cantEdit=!0,ce(e.first,0))}function nc(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?Se(e,ce(t.line-1)):null:i>0&&t.ch==(r||Ce(e,t.line)).text.length?t.line<e.first+e.size-1?ce(t.line+1,0):null:new ce(t.line,t.ch+i)}function rc(e){e.setSelection(ce(e.firstLine(),0),ce(e.lastLine()),fe)}function ic(e,t,i){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return i&&(r.update=function(a,u,f,p){a&&(r.from=Se(e,a)),u&&(r.to=Se(e,u)),f&&(r.text=f),p!==void 0&&(r.origin=p)}),Me(e,"beforeChange",e,r),e.cm&&Me(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 Ii(e,t,i){if(e.cm){if(!e.cm.curOp)return Pt(e.cm,Ii)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"))&&(t=ic(e,t,!0),!t))){var r=Vl&&!i&&uh(e,t.from,t.to);if(r)for(var a=r.length-1;a>=0;--a)sc(e,{from:r[a].from,to:r[a].to,text:a?[""]:t.text,origin:t.origin});else sc(e,t)}}function sc(e,t){if(!(t.text.length==1&&t.text[0]==""&&v(t.from,t.to)==0)){var i=ka(e,t);Ku(e,t,i,e.cm?e.cm.curOp.id:NaN),is(e,t,i,$o(e,t));var r=[];Pr(e,function(a,u){!u&&z(r,a.history)==-1&&(uc(a.history,t),r.push(a.history)),is(a,t,null,$o(a,t))})}}function io(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var a=e.history,u,f=e.sel,p=t=="undo"?a.done:a.undone,m=t=="undo"?a.undone:a.done,g=0;g<p.length&&(u=p[g],!(i?u.ranges&&!u.equals(e.sel):!u.ranges));g++);if(g!=p.length){for(a.lastOrigin=a.lastSelOrigin=null;;)if(u=p.pop(),u.ranges){if(eo(u,m),i&&!u.equals(e.sel)){Vt(e,u,{clearRedo:!1});return}f=u}else if(r){p.push(u);return}else break;var A=[];eo(f,m),m.push({changes:A,generation:a.generation}),a.generation=u.generation||++a.maxGeneration;for(var N=wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"),j=function(re){var me=u.changes[re];if(me.origin=t,N&&!ic(e,me,!1))return p.length=0,{};A.push(wa(e,me));var be=re?ka(e,me):Ae(p);is(e,me,be,Vu(e,me)),!re&&e.cm&&e.cm.scrollIntoView({from:me.from,to:Nr(me)});var _e=[];Pr(e,function(we,Ie){!Ie&&z(_e,we.history)==-1&&(uc(we.history,me),_e.push(we.history)),is(we,me,null,Vu(we,me))})},W=u.changes.length-1;W>=0;--W){var Y=j(W);if(Y)return Y.v}}}}function oc(e,t){if(t!=0&&(e.first+=t,e.sel=new Tn(He(e.sel.ranges,function(a){return new it(ce(a.anchor.line+t,a.anchor.ch),ce(a.head.line+t,a.head.ch))}),e.sel.primIndex),e.cm)){an(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;r<i.viewTo;r++)Ar(e.cm,r,"gutter")}}function is(e,t,i,r){if(e.cm&&!e.cm.curOp)return Pt(e.cm,is)(e,t,i,r);if(t.to.line<e.first){oc(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 a=t.text.length-1-(e.first-t.from.line);oc(e,a),t={from:ce(e.first,0),to:ce(t.to.line+a,t.to.ch),text:[Ae(t.text)],origin:t.origin}}var u=e.lastLine();t.to.line>u&&(t={from:t.from,to:ce(u,Ce(e,u).text.length),text:[t.text[0]],origin:t.origin}),t.removed=En(e,t.from,t.to),i||(i=ka(e,t)),e.cm?pp(e.cm,t,r):ba(e,t,r),no(e,i,fe),e.cantEdit&&ro(e,ce(e.firstLine(),0))&&(e.cantEdit=!1)}}function pp(e,t,i){var r=e.doc,a=e.display,u=t.from,f=t.to,p=!1,m=u.line;e.options.lineWrapping||(m=rt(Mn(Ce(r,u.line))),r.iter(m,f.line+1,function(W){if(W==a.maxLine)return p=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Gn(e),ba(r,t,i,Tu(e)),e.options.lineWrapping||(r.iter(m,u.line+t.text.length,function(W){var Y=js(W);Y>a.maxLineLength&&(a.maxLine=W,a.maxLineLength=Y,a.maxLineChanged=!0,p=!1)}),p&&(e.curOp.updateMaxLine=!0)),nh(r,u.line),ts(e,400);var g=t.text.length-(f.line-u.line)-1;t.full?an(e):u.line==f.line&&t.text.length==1&&!qu(e.doc,t)?Ar(e,u.line,"text"):an(e,u.line,f.line+1,g);var A=wt(e,"changes"),N=wt(e,"change");if(N||A){var j={from:u,to:f,text:t.text,removed:t.removed,origin:t.origin};N&&Nt(e,"change",e,j),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(j)}e.display.selForContextMenu=null}function Ci(e,t,i,r,a){var u;r||(r=i),v(r,i)<0&&(u=[r,i],i=u[0],r=u[1]),typeof t=="string"&&(t=e.splitLines(t)),Ii(e,{from:i,to:r,text:t,origin:a})}function ac(e,t,i,r){i<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function lc(e,t,i,r){for(var a=0;a<e.length;++a){var u=e[a],f=!0;if(u.ranges){u.copied||(u=e[a]=u.deepCopy(),u.copied=!0);for(var p=0;p<u.ranges.length;p++)ac(u.ranges[p].anchor,t,i,r),ac(u.ranges[p].head,t,i,r);continue}for(var m=0;m<u.changes.length;++m){var g=u.changes[m];if(i<g.from.line)g.from=ce(g.from.line+r,g.from.ch),g.to=ce(g.to.line+r,g.to.ch);else if(t<=g.to.line){f=!1;break}}f||(e.splice(0,a+1),a=0)}}function uc(e,t){var i=t.from.line,r=t.to.line,a=t.text.length-(r-i)-1;lc(e.done,i,r,a),lc(e.undone,i,r,a)}function ss(e,t,i,r){var a=t,u=t;return typeof t=="number"?u=Ce(e,Qe(e,t)):a=rt(t),a==null?null:(r(u,a)&&e.cm&&Ar(e.cm,a,i),u)}function os(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}os.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,r=e+t;i<r;++i){var a=this.lines[i];this.height-=a.height,dh(a),Nt(a,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,i){for(var r=e+t;e<r;++e)if(i(this.lines[e]))return!0}};function as(e){this.children=e;for(var t=0,i=0,r=0;r<e.length;++r){var a=e[r];t+=a.chunkSize(),i+=a.height,a.parent=this}this.size=t,this.height=i,this.parent=null}as.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var r=this.children[i],a=r.chunkSize();if(e<a){var u=Math.min(t,a-e),f=r.height;if(r.removeInner(e,u),this.height-=f-r.height,a==u&&(this.children.splice(i--,1),r.parent=null),(t-=u)==0)break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof os))){var p=[];this.collapse(p),this.children=[new os(p)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var r=0;r<this.children.length;++r){var a=this.children[r],u=a.chunkSize();if(e<=u){if(a.insertInner(e,t,i),a.lines&&a.lines.length>50){for(var f=a.lines.length%25+25,p=f;p<a.lines.length;){var m=new os(a.lines.slice(p,p+=25));a.height-=m.height,this.children.splice(++r,0,m),m.parent=this}a.lines=a.lines.slice(0,f),this.maybeSpill()}break}e-=u}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new as(t);if(e.parent){e.size-=i.size,e.height-=i.height;var a=z(e.parent.children,e);e.parent.children.splice(a+1,0,i)}else{var r=new as(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;r<this.children.length;++r){var a=this.children[r],u=a.chunkSize();if(e<u){var f=Math.min(t,u-e);if(a.iterN(e,f,i))return!0;if((t-=f)==0)break;e=0}else e-=u}}};var ls=function(e,t,i){if(i)for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);this.doc=e,this.node=t};ls.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,r=rt(i);if(!(r==null||!t)){for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(i.widgets=null);var u=Xi(this);Qt(i,Math.max(0,i.height-u)),e&&(gn(e,function(){cc(e,i,-u),Ar(e,r,"widget")}),Nt(e,"lineWidgetCleared",e,this,r))}},ls.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,r=this.line;this.height=null;var a=Xi(this)-t;a&&(Cr(this.doc,r)||Qt(r,r.height+a),i&&gn(i,function(){i.curOp.forceUpdate=!0,cc(i,r,a),Nt(i,"lineWidgetChanged",i,e,rt(r))}))},dn(ls);function cc(e,t,i){pr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ha(e,i)}function dp(e,t,i,r){var a=new ls(e,i,r),u=e.cm;return u&&a.noHScroll&&(u.display.alignWidgets=!0),ss(e,t,"widget",function(f){var p=f.widgets||(f.widgets=[]);if(a.insertAt==null?p.push(a):p.splice(Math.min(p.length,Math.max(0,a.insertAt)),0,a),a.line=f,u&&!Cr(e,f)){var m=pr(f)<e.scrollTop;Qt(f,f.height+Xi(a)),m&&ha(u,a.height),u.curOp.forceUpdate=!0}return!0}),u&&Nt(u,"lineWidgetAdded",u,a,typeof t=="number"?t:rt(t)),a}var fc=0,Or=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++fc};Or.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ri(e),wt(this,"clear")){var i=this.find();i&&Nt(this,"clear",i.from,i.to)}for(var r=null,a=null,u=0;u<this.lines.length;++u){var f=this.lines[u],p=$i(f.markedSpans,this);e&&!this.collapsed?Ar(e,rt(f),"text"):e&&(p.to!=null&&(a=rt(f)),p.from!=null&&(r=rt(f))),f.markedSpans=sh(f.markedSpans,p),p.from==null&&this.collapsed&&!Cr(this.doc,f)&&e&&Qt(f,yi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var m=0;m<this.lines.length;++m){var g=Mn(this.lines[m]),A=js(g);A>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&an(e,r,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ec(e.doc)),e&&Nt(e,"markerCleared",e,this,r,a),t&&ii(e),this.parent&&this.parent.clear()}},Or.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,a=0;a<this.lines.length;++a){var u=this.lines[a],f=$i(u.markedSpans,this);if(f.from!=null&&(i=ce(t?u:rt(u),f.from),e==-1))return i;if(f.to!=null&&(r=ce(t?u:rt(u),f.to),e==1))return r}return i&&{from:i,to:r}},Or.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,r=this.doc.cm;!t||!r||gn(r,function(){var a=t.line,u=rt(t.line),f=Qo(r,u);if(f&&(vu(f),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Cr(i.doc,a)&&i.height!=null){var p=i.height;i.height=null;var m=Xi(i)-p;m&&Qt(a,a.height+m)}Nt(r,"markerChanged",r,e)})},Or.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Or.prototype.detachLine=function(e){if(this.lines.splice(z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},dn(Or);function Ai(e,t,i,r,a){if(r&&r.shared)return mp(e,t,i,r,a);if(e.cm&&!e.cm.curOp)return Pt(e.cm,Ai)(e,t,i,r,a);var u=new Or(e,a),f=v(t,i);if(r&&ze(r,u,!1),f>0||f==0&&u.clearWhenEmpty!==!1)return u;if(u.replacedWith&&(u.collapsed=!0,u.widgetNode=b("span",[u.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||u.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(u.widgetNode.insertLeft=!0)),u.collapsed){if(tu(e,t.line,t,i,u)||t.line!=i.line&&tu(e,i.line,t,i,u))throw new Error("Inserting collapsed marker partially overlapping an existing one");ih()}u.addToHistory&&Ku(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var p=t.line,m=e.cm,g;if(e.iter(p,i.line+1,function(N){m&&u.collapsed&&!m.options.lineWrapping&&Mn(N)==m.display.maxLine&&(g=!0),u.collapsed&&p!=t.line&&Qt(N,0),oh(N,new Fs(u,p==t.line?t.ch:null,p==i.line?i.ch:null),e.cm&&e.cm.curOp),++p}),u.collapsed&&e.iter(t.line,i.line+1,function(N){Cr(e,N)&&Qt(N,0)}),u.clearOnEnter&&Ee(u,"beforeCursorEnter",function(){return u.clear()}),u.readOnly&&(rh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),u.collapsed&&(u.id=++fc,u.atomic=!0),m){if(g&&(m.curOp.updateMaxLine=!0),u.collapsed)an(m,t.line,i.line+1);else if(u.className||u.startStyle||u.endStyle||u.css||u.attributes||u.title)for(var A=t.line;A<=i.line;A++)Ar(m,A,"text");u.atomic&&ec(m.doc),Nt(m,"markerAdded",m,u)}return u}var us=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};us.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Nt(this,"clear")}},us.prototype.find=function(e,t){return this.primary.find(e,t)},dn(us);function mp(e,t,i,r,a){r=ze(r),r.shared=!1;var u=[Ai(e,t,i,r,a)],f=u[0],p=r.widgetNode;return Pr(e,function(m){p&&(r.widgetNode=p.cloneNode(!0)),u.push(Ai(m,Se(m,t),Se(m,i),r,a));for(var g=0;g<m.linked.length;++g)if(m.linked[g].isParent)return;f=Ae(u)}),new us(u,f)}function hc(e){return e.findMarks(ce(e.first,0),e.clipPos(ce(e.lastLine())),function(t){return t.parent})}function gp(e,t){for(var i=0;i<t.length;i++){var r=t[i],a=r.find(),u=e.clipPos(a.from),f=e.clipPos(a.to);if(v(u,f)){var p=Ai(e,u,f,r.primary,r.primary.type);r.markers.push(p),p.parent=r}}}function vp(e){for(var t=function(r){var a=e[r],u=[a.primary.doc];Pr(a.primary.doc,function(m){return u.push(m)});for(var f=0;f<a.markers.length;f++){var p=a.markers[f];z(u,p.doc)==-1&&(p.parent=null,a.markers.splice(f--,1))}},i=0;i<e.length;i++)t(i)}var kp=0,ln=function(e,t,i,r,a){if(!(this instanceof ln))return new ln(e,t,i,r,a);i==null&&(i=0),as.call(this,[new os([new gi("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var u=ce(i,0);this.sel=Er(u),this.history=new Qs(null),this.id=++kp,this.modeOption=t,this.lineSep=r,this.direction=a=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ba(this,{from:u,to:u,text:e}),Vt(this,Er(u),fe)};ln.prototype=lt(as.prototype,{constructor:ln,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,r=0;r<t.length;++r)i+=t[r].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Vr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ot(function(e){var t=ce(this.first,0),i=this.first+this.size-1;Ii(this,{from:t,to:ce(i,Ce(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ji(this.cm,0,0),Vt(this,Er(t),fe)}),replaceRange:function(e,t,i,r){t=Se(this,t),i=i?Se(this,i):t,Ci(this,e,t,i,r)},getRange:function(e,t,i){var r=En(this,Se(this,e),Se(this,t));return i===!1?r:i===""?r.join(""):r.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(fr(this,e))return Ce(this,e)},getLineNumber:function(e){return rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ce(this,e)),Mn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ot(function(e,t,i){Ju(this,Se(this,typeof e=="number"?ce(e,t||0):e),null,i)}),setSelection:Ot(function(e,t,i){Ju(this,Se(this,e),Se(this,t||e),i)}),extendSelection:Ot(function(e,t,i){to(this,Se(this,e),t&&Se(this,t),i)}),extendSelections:Ot(function(e,t){Yu(this,Sn(this,e),t)}),extendSelectionsBy:Ot(function(e,t){var i=He(this.sel.ranges,e);Yu(this,Sn(this,i),t)}),setSelections:Ot(function(e,t,i){if(e.length){for(var r=[],a=0;a<e.length;a++)r[a]=new it(Se(this,e[a].anchor),Se(this,e[a].head||e[a].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Vt(this,Fn(this.cm,r,t),i)}}),addSelection:Ot(function(e,t,i){var r=this.sel.ranges.slice(0);r.push(new it(Se(this,e),Se(this,t||e))),Vt(this,Fn(this.cm,r,r.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,r=0;r<t.length;r++){var a=En(this,t[r].from(),t[r].to());i=i?i.concat(a):a}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,r=0;r<i.length;r++){var a=En(this,i[r].from(),i[r].to());e!==!1&&(a=a.join(e||this.lineSeparator())),t[r]=a}return t},replaceSelection:function(e,t,i){for(var r=[],a=0;a<this.sel.ranges.length;a++)r[a]=e;this.replaceSelections(r,t,i||"+input")},replaceSelections:Ot(function(e,t,i){for(var r=[],a=this.sel,u=0;u<a.ranges.length;u++){var f=a.ranges[u];r[u]={from:f.from(),to:f.to(),text:this.splitLines(e[u]),origin:i}}for(var p=t&&t!="end"&&sp(this,r,t),m=r.length-1;m>=0;m--)Ii(this,r[m]);p?Zu(this,p):this.cm&&xi(this.cm)}),undo:Ot(function(){io(this,"undo")}),redo:Ot(function(){io(this,"redo")}),undoSelection:Ot(function(){io(this,"undo",!0)}),redoSelection:Ot(function(){io(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var a=0;a<e.undone.length;a++)e.undone[a].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Qs(this.history),Pr(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:Si(this.history.done),undone:Si(this.history.undone)}},setHistory:function(e){var t=this.history=new Qs(this.history);t.done=Si(e.done.slice(0),null,!0),t.undone=Si(e.undone.slice(0),null,!0)},setGutterMarker:Ot(function(e,t,i){return ss(this,e,"gutter",function(r){var a=r.gutterMarkers||(r.gutterMarkers={});return a[t]=i,!i&&he(a)&&(r.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&ss(t,i,"gutter",function(){return i.gutterMarkers[e]=null,he(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!fr(this,e)||(t=e,e=Ce(this,e),!e))return null}else if(t=rt(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:Ot(function(e,t,i){return ss(this,e,t=="gutter"?"gutter":"class",function(r){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[a])r[a]=i;else{if(ge(i).test(r[a]))return!1;r[a]+=" "+i}return!0})}),removeLineClass:Ot(function(e,t,i){return ss(this,e,t=="gutter"?"gutter":"class",function(r){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",u=r[a];if(u)if(i==null)r[a]=null;else{var f=u.match(ge(i));if(!f)return!1;var p=f.index+f[0].length;r[a]=u.slice(0,f.index)+(!f.index||p==u.length?"":" ")+u.slice(p)||null}else return!1;return!0})}),addLineWidget:Ot(function(e,t,i){return dp(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Ai(this,Se(this,e),Se(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Se(this,e),Ai(this,e,e,i,"bookmark")},findMarksAt:function(e){e=Se(this,e);var t=[],i=Ce(this,e.line).markedSpans;if(i)for(var r=0;r<i.length;++r){var a=i[r];(a.from==null||a.from<=e.ch)&&(a.to==null||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,i){e=Se(this,e),t=Se(this,t);var r=[],a=e.line;return this.iter(e.line,t.line+1,function(u){var f=u.markedSpans;if(f)for(var p=0;p<f.length;p++){var m=f[p];!(m.to!=null&&a==e.line&&e.ch>=m.to||m.from==null&&a!=e.line||m.from!=null&&a==t.line&&m.from>=t.ch)&&(!i||i(m.marker))&&r.push(m.marker.parent||m.marker)}++a}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;r<i.length;++r)i[r].from!=null&&e.push(i[r].marker)}),e},posFromIndex:function(e){var t,i=this.first,r=this.lineSeparator().length;return this.iter(function(a){var u=a.text.length+r;if(u>e)return t=e,!0;e-=u,++i}),Se(this,ce(i,t))},indexFromPos:function(e){e=Se(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+i}),t},copy:function(e){var t=new ln(Vr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var r=new ln(Vr(this,t,i),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}],gp(r,hc(this)),r},unlinkDoc:function(e){if(e instanceof mt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),vp(hc(this));break}}if(e.history==this.history){var r=[e.id];Pr(e,function(a){return r.push(a.id)},!0),e.history=new Qs(null),e.history.done=Si(this.history.done,r),e.history.undone=Si(this.history.undone,r)}},iterLinkedDocs:function(e){Pr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):lr(e)},lineSeparator:function(){return this.lineSep||`
|
||
`},setDirection:Ot(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&op(this.cm))})}),ln.prototype.eachLine=ln.prototype.iter;var pc=0;function yp(e){var t=this;if(dc(t),!(pt(t,e)||dr(t.display,e))){_t(e),w&&(pc=+new Date);var i=Qr(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var a=r.length,u=Array(a),f=0,p=function(){++f==a&&Pt(t,function(){i=Se(t.doc,i);var W={from:i,to:i,text:t.doc.splitLines(u.filter(function(Y){return Y!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ii(t.doc,W),Zu(t.doc,Er(Se(t.doc,i),Se(t.doc,Nr(W))))})()},m=function(W,Y){if(t.options.allowDropFileTypes&&z(t.options.allowDropFileTypes,W.type)==-1){p();return}var re=new FileReader;re.onerror=function(){return p()},re.onload=function(){var me=re.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(me)){p();return}u[Y]=me,p()},re.readAsText(W)},g=0;g<r.length;g++)m(r[g],g);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var N;if(t.state.draggingText&&!t.state.draggingText.copy&&(N=t.listSelections()),no(t.doc,Er(i,i)),N)for(var j=0;j<N.length;++j)Ci(t.doc,"",N[j].anchor,N[j].head,"drag");t.replaceSelection(A,"around","paste"),t.display.input.focus()}}catch{}}}}function bp(e,t){if(w&&(!e.state.draggingText||+new Date-pc<100)){Dn(t);return}if(!(pt(e,t)||dr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!F)){var i=K("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),_&&i.parentNode.removeChild(i)}}function wp(e,t){var i=Qr(e,t);if(i){var r=document.createDocumentFragment();aa(e,i,r),e.display.dragCursor||(e.display.dragCursor=K("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),G(e.display.dragCursor,r)}}function dc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function mc(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var a=t[r].CodeMirror;a&&i.push(a)}i.length&&i[0].operation(function(){for(var u=0;u<i.length;u++)e(i[u])})}}var gc=!1;function xp(){gc||(_p(),gc=!0)}function _p(){var e;Ee(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,mc(Sp)},100))}),Ee(window,"blur",function(){return mc(wi)})}function Sp(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Dr={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"},cs=0;cs<10;cs++)Dr[cs+48]=Dr[cs+96]=String(cs);for(var so=65;so<=90;so++)Dr[so]=String.fromCharCode(so);for(var fs=1;fs<=12;fs++)Dr[fs+111]=Dr[fs+63235]="F"+fs;var gr={};gr.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"},gr.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"},gr.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"},gr.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"]},gr.default=B?gr.macDefault:gr.pcDefault;function Tp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,r,a,u,f=0;f<t.length-1;f++){var p=t[f];if(/^(cmd|meta|m)$/i.test(p))u=!0;else if(/^a(lt)?$/i.test(p))i=!0;else if(/^(c|ctrl|control)$/i.test(p))r=!0;else if(/^s(hift)?$/i.test(p))a=!0;else throw new Error("Unrecognized modifier name: "+p)}return i&&(e="Alt-"+e),r&&(e="Ctrl-"+e),u&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function Ip(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(r=="..."){delete e[i];continue}for(var a=He(i.split(" "),Tp),u=0;u<a.length;u++){var f=void 0,p=void 0;u==a.length-1?(p=a.join(" "),f=r):(p=a.slice(0,u+1).join(" "),f="...");var m=t[p];if(!m)t[p]=f;else if(m!=f)throw new Error("Inconsistent bindings for "+p)}delete e[i]}for(var g in t)e[g]=t[g];return e}function Li(e,t,i,r){t=oo(t);var a=t.call?t.call(e,r):t[e];if(a===!1)return"nothing";if(a==="...")return"multi";if(a!=null&&i(a))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Li(e,t.fallthrough,i,r);for(var u=0;u<t.fallthrough.length;u++){var f=Li(e,t.fallthrough[u],i,r);if(f)return f}}}function vc(e){var t=typeof e=="string"?e:Dr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function kc(e,t,i){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(te?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(te?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function yc(e,t){if(_&&e.keyCode==34&&e.char)return!1;var i=Dr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),kc(i,e,t))}function oo(e){return typeof e=="string"?gr[e]:e}function Ei(e,t){for(var i=e.doc.sel.ranges,r=[],a=0;a<i.length;a++){for(var u=t(i[a]);r.length&&v(u.from,Ae(r).to)<=0;){var f=r.pop();if(v(f.from,u.from)<0){u.from=f.from;break}}r.push(u)}gn(e,function(){for(var p=r.length-1;p>=0;p--)Ci(e.doc,"",r[p].from,r[p].to,"+delete");xi(e)})}function Sa(e,t,i){var r=It(e.text,t+i,i);return r<0||r>e.text.length?null:r}function Ta(e,t,i){var r=Sa(e,t.ch,i);return r==null?null:new ce(t.line,r,i<0?"after":"before")}function Ia(e,t,i,r,a){if(e){t.doc.direction=="rtl"&&(a=-a);var u=Bt(i,t.doc.direction);if(u){var f=a<0?Ae(u):u[0],p=a<0==(f.level==1),m=p?"after":"before",g;if(f.level>0||t.doc.direction=="rtl"){var A=ki(t,i);g=a<0?i.text.length-1:0;var N=Zn(t,A,g).top;g=pn(function(j){return Zn(t,A,j).top==N},a<0==(f.level==1)?f.from:f.to-1,g),m=="before"&&(g=Sa(i,g,1))}else g=a<0?f.to:f.from;return new ce(r,g,m)}}return new ce(r,a<0?i.text.length:0,a<0?"before":"after")}function Cp(e,t,i,r){var a=Bt(t,e.doc.direction);if(!a)return Ta(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var u=ft(a,i.ch,i.sticky),f=a[u];if(e.doc.direction=="ltr"&&f.level%2==0&&(r>0?f.to>i.ch:f.from<i.ch))return Ta(t,i,r);var p=function(be,_e){return Sa(t,be instanceof ce?be.ch:be,_e)},m,g=function(be){return e.options.lineWrapping?(m=m||ki(e,t),Su(e,t,m,be)):{begin:0,end:t.text.length}},A=g(i.sticky=="before"?p(i,-1):i.ch);if(e.doc.direction=="rtl"||f.level==1){var N=f.level==1==r<0,j=p(i,N?1:-1);if(j!=null&&(N?j<=f.to&&j<=A.end:j>=f.from&&j>=A.begin)){var W=N?"before":"after";return new ce(i.line,j,W)}}var Y=function(be,_e,we){for(var Ie=function(ut,Dt){return Dt?new ce(i.line,p(ut,1),"before"):new ce(i.line,ut,"after")};be>=0&&be<a.length;be+=_e){var Pe=a[be],Le=_e>0==(Pe.level!=1),Ve=Le?we.begin:p(we.end,-1);if(Pe.from<=Ve&&Ve<Pe.to||(Ve=Le?Pe.from:p(Pe.to,-1),we.begin<=Ve&&Ve<we.end))return Ie(Ve,Le)}},re=Y(u+r,r,A);if(re)return re;var me=r>0?A.end:p(A.begin,-1);return me!=null&&!(r>0&&me==t.text.length)&&(re=Y(r>0?0:a.length-1,r,g(me)),re)?re:null}var hs={selectAll:rc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),fe)},killLine:function(e){return Ei(e,function(t){if(t.empty()){var i=Ce(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ce(t.head.line+1,0)}:{from:t.head,to:ce(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ei(e,function(t){return{from:ce(t.from().line,0),to:Se(e.doc,ce(t.to().line+1,0))}})},delLineLeft:function(e){return Ei(e,function(t){return{from:ce(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ei(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Ei(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"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(ce(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ce(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return bc(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return wc(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ap(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},pe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},pe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return r.ch<e.getLine(r.line).search(/\S/)?wc(e,t.head):r},pe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),r=e.options.tabSize,a=0;a<i.length;a++){var u=i[a].from(),f=qe(e.getLine(u.line),u.ch,r);t.push(Je(r-f%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return gn(e,function(){for(var t=e.listSelections(),i=[],r=0;r<t.length;r++)if(t[r].empty()){var a=t[r].head,u=Ce(e.doc,a.line).text;if(u){if(a.ch==u.length&&(a=new ce(a.line,a.ch-1)),a.ch>0)a=new ce(a.line,a.ch+1),e.replaceRange(u.charAt(a.ch-1)+u.charAt(a.ch-2),ce(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var f=Ce(e.doc,a.line-1).text;f&&(a=new ce(a.line,1),e.replaceRange(u.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ce(a.line-1,f.length-1),a,"+transpose"))}}i.push(new it(a,a))}e.setSelections(i)})},newlineAndIndent:function(e){return gn(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);xi(e)})},openLine:function(e){return e.replaceSelection(`
|
||
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function bc(e,t){var i=Ce(e.doc,t),r=Mn(i);return r!=i&&(t=rt(r)),Ia(!0,e,r,t,1)}function Ap(e,t){var i=Ce(e.doc,t),r=fh(i);return r!=i&&(t=rt(r)),Ia(!0,e,i,t,-1)}function wc(e,t){var i=bc(e,t.line),r=Ce(e.doc,i.line),a=Bt(r,e.doc.direction);if(!a||a[0].level==0){var u=Math.max(i.ch,r.text.search(/\S/)),f=t.line==i.line&&t.ch<=u&&t.ch;return ce(i.line,f?0:u,i.sticky)}return i}function ao(e,t,i){if(typeof t=="string"&&(t=hs[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),a=t(e)!=ee}finally{e.display.shift=r,e.state.suppressEdits=!1}return a}function Lp(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var a=Li(t,e.state.keyMaps[r],i,e);if(a)return a}return e.options.extraKeys&&Li(t,e.options.extraKeys,i,e)||Li(t,e.options.keyMap,i,e)}var Ep=new X;function ps(e,t,i,r){var a=e.state.keySeq;if(a){if(vc(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ep.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),xc(e,a+" "+t,i,r))return!0}return xc(e,t,i,r)}function xc(e,t,i,r){var a=Lp(e,t,r);return a=="multi"&&(e.state.keySeq=t),a=="handled"&&Nt(e,"keyHandled",e,t,i),(a=="handled"||a=="multi")&&(_t(i),la(e)),!!a}function _c(e,t){var i=yc(t,!0);return i?t.shiftKey&&!e.state.keySeq?ps(e,"Shift-"+i,t,function(r){return ao(e,r,!0)})||ps(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ao(e,r)}):ps(e,i,t,function(r){return ao(e,r)}):!1}function Np(e,t,i){return ps(e,"'"+i+"'",t,function(r){return ao(e,r,!0)})}var Ca=null;function Sc(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=le(),!pt(t,e))){w&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=_c(t,e);_&&(Ca=r?i:null,!r&&i==88&&!Tr&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),h&&!B&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Pp(t)}}function Pp(e){var t=e.display.lineDiv;Oe(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(ke(t,"CodeMirror-crosshair"),Lt(document,"keyup",i),Lt(document,"mouseover",i))}Ee(document,"keyup",i),Ee(document,"mouseover",i)}function Tc(e){e.keyCode==16&&(this.doc.sel.shift=!1),pt(this,e)}function Ic(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(dr(t.display,e)||pt(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(_&&i==Ca){Ca=null,_t(e);return}if(!(_&&(!e.which||e.which<10)&&_c(t,e))){var a=String.fromCharCode(r??i);a!="\b"&&(Np(t,e,a)||t.display.input.onKeyPress(e))}}}var Op=400,Aa=function(e,t,i){this.time=e,this.pos=t,this.button=i};Aa.prototype.compare=function(e,t,i){return this.time+Op>e&&v(t,this.pos)==0&&i==this.button};var ds,ms;function Dp(e,t){var i=+new Date;return ms&&ms.compare(i,e,t)?(ds=ms=null,"triple"):ds&&ds.compare(i,e,t)?(ms=new Aa(i,e,t),ds=null,"double"):(ds=new Aa(i,e,t),ms=null,"single")}function Cc(e){var t=this,i=t.display;if(!(pt(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,dr(i,e)){y||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!La(t,e)){var r=Qr(t,e),a=xr(e),u=r?Dp(r,a):"single";window.focus(),a==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Mp(t,a,r,u,e))&&(a==1?r?Fp(t,r,u,e):An(e)==i.scroller&&_t(e):a==2?(r&&to(t.doc,r),setTimeout(function(){return i.input.focus()},20)):a==3&&(ye?t.display.input.onContextMenu(e):ua(t)))}}}function Mp(e,t,i,r,a){var u="Click";return r=="double"?u="Double"+u:r=="triple"&&(u="Triple"+u),u=(t==1?"Left":t==2?"Middle":"Right")+u,ps(e,kc(u,a),a,function(f){if(typeof f=="string"&&(f=hs[f]),!f)return!1;var p=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),p=f(e,i)!=ee}finally{e.state.suppressEdits=!1}return p})}function Rp(e,t,i){var r=e.getOption("configureMouse"),a=r?r(e,t,i):{};if(a.unit==null){var u=$?i.shiftKey&&i.metaKey:i.altKey;a.unit=u?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(a.extend==null||e.doc.extend)&&(a.extend=e.doc.extend||i.shiftKey),a.addNew==null&&(a.addNew=B?i.metaKey:i.ctrlKey),a.moveOnDrag==null&&(a.moveOnDrag=!(B?i.altKey:i.ctrlKey)),a}function Fp(e,t,i,r){w?setTimeout(tt(Au,e),0):e.curOp.focus=le();var a=Rp(e,i,r),u=e.doc.sel,f;e.options.dragDrop&&or&&!e.isReadOnly()&&i=="single"&&(f=u.contains(t))>-1&&(v((f=u.ranges[f]).from(),t)<0||t.xRel>0)&&(v(f.to(),t)>0||t.xRel<0)?Bp(e,r,t,a):Wp(e,r,t,a)}function Bp(e,t,i,r){var a=e.display,u=!1,f=Pt(e,function(g){y&&(a.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ua(e)),Lt(a.wrapper.ownerDocument,"mouseup",f),Lt(a.wrapper.ownerDocument,"mousemove",p),Lt(a.scroller,"dragstart",m),Lt(a.scroller,"drop",f),u||(_t(g),r.addNew||to(e.doc,i,null,null,r.extend),y&&!F||w&&x==9?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),p=function(g){u=u||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},m=function(){return u=!0};y&&(a.scroller.draggable=!0),e.state.draggingText=f,f.copy=!r.moveOnDrag,Ee(a.wrapper.ownerDocument,"mouseup",f),Ee(a.wrapper.ownerDocument,"mousemove",p),Ee(a.scroller,"dragstart",m),Ee(a.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return a.input.focus()},20),a.scroller.dragDrop&&a.scroller.dragDrop()}function Ac(e,t,i){if(i=="char")return new it(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new it(ce(t.line,0),Se(e.doc,ce(t.line+1,0)));var r=i(e,t);return new it(r.from,r.to)}function Wp(e,t,i,r){w&&ua(e);var a=e.display,u=e.doc;_t(t);var f,p,m=u.sel,g=m.ranges;if(r.addNew&&!r.extend?(p=u.sel.contains(i),p>-1?f=g[p]:f=new it(i,i)):(f=u.sel.primary(),p=u.sel.primIndex),r.unit=="rectangle")r.addNew||(f=new it(i,i)),i=Qr(e,t,!0,!0),p=-1;else{var A=Ac(e,i,r.unit);r.extend?f=xa(f,A.anchor,A.head,r.extend):f=A}r.addNew?p==-1?(p=g.length,Vt(u,Fn(e,g.concat([f]),p),{scroll:!1,origin:"*mouse"})):g.length>1&&g[p].empty()&&r.unit=="char"&&!r.extend?(Vt(u,Fn(e,g.slice(0,p).concat(g.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),m=u.sel):_a(u,p,f,ve):(p=0,Vt(u,new Tn([f],0),ve),m=u.sel);var N=i;function j(we){if(v(N,we)!=0)if(N=we,r.unit=="rectangle"){for(var Ie=[],Pe=e.options.tabSize,Le=qe(Ce(u,i.line).text,i.ch,Pe),Ve=qe(Ce(u,we.line).text,we.ch,Pe),ut=Math.min(Le,Ve),Dt=Math.max(Le,Ve),vt=Math.min(i.line,we.line),vn=Math.min(e.lastLine(),Math.max(i.line,we.line));vt<=vn;vt++){var un=Ce(u,vt).text,St=De(un,ut,Pe);ut==Dt?Ie.push(new it(ce(vt,St),ce(vt,St))):un.length>St&&Ie.push(new it(ce(vt,St),ce(vt,De(un,Dt,Pe))))}Ie.length||Ie.push(new it(i,i)),Vt(u,Fn(e,m.ranges.slice(0,p).concat(Ie),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(we)}else{var cn=f,Wt=Ac(e,we,r.unit),Ct=cn.anchor,Tt;v(Wt.anchor,Ct)>0?(Tt=Wt.head,Ct=Be(cn.from(),Wt.anchor)):(Tt=Wt.anchor,Ct=de(cn.to(),Wt.head));var yt=m.ranges.slice(0);yt[p]=Hp(e,new it(Se(u,Ct),Tt)),Vt(u,Fn(e,yt,p),ve)}}var W=a.wrapper.getBoundingClientRect(),Y=0;function re(we){var Ie=++Y,Pe=Qr(e,we,!0,r.unit=="rectangle");if(Pe)if(v(Pe,N)!=0){e.curOp.focus=le(),j(Pe);var Le=Vs(a,u);(Pe.line>=Le.to||Pe.line<Le.from)&&setTimeout(Pt(e,function(){Y==Ie&&re(we)}),150)}else{var Ve=we.clientY<W.top?-20:we.clientY>W.bottom?20:0;Ve&&setTimeout(Pt(e,function(){Y==Ie&&(a.scroller.scrollTop+=Ve,re(we))}),50)}}function me(we){e.state.selectingText=!1,Y=1/0,we&&(_t(we),a.input.focus()),Lt(a.wrapper.ownerDocument,"mousemove",be),Lt(a.wrapper.ownerDocument,"mouseup",_e),u.history.lastSelOrigin=null}var be=Pt(e,function(we){we.buttons===0||!xr(we)?me(we):re(we)}),_e=Pt(e,me);e.state.selectingText=_e,Ee(a.wrapper.ownerDocument,"mousemove",be),Ee(a.wrapper.ownerDocument,"mouseup",_e)}function Hp(e,t){var i=t.anchor,r=t.head,a=Ce(e.doc,i.line);if(v(i,r)==0&&i.sticky==r.sticky)return t;var u=Bt(a);if(!u)return t;var f=ft(u,i.ch,i.sticky),p=u[f];if(p.from!=i.ch&&p.to!=i.ch)return t;var m=f+(p.from==i.ch==(p.level!=1)?0:1);if(m==0||m==u.length)return t;var g;if(r.line!=i.line)g=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=ft(u,r.ch,r.sticky),N=A-f||(r.ch-i.ch)*(p.level==1?-1:1);A==m-1||A==m?g=N<0:g=N>0}var j=u[m+(g?-1:0)],W=g==(j.level==1),Y=W?j.from:j.to,re=W?"after":"before";return i.ch==Y&&i.sticky==re?t:new it(new ce(i.line,Y,re),r)}function Lc(e,t,i,r){var a,u;if(t.touches)a=t.touches[0].clientX,u=t.touches[0].clientY;else try{a=t.clientX,u=t.clientY}catch{return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&_t(t);var f=e.display,p=f.lineDiv.getBoundingClientRect();if(u>p.bottom||!wt(e,i))return $t(t);u-=p.top-f.viewOffset;for(var m=0;m<e.display.gutterSpecs.length;++m){var g=f.gutters.childNodes[m];if(g&&g.getBoundingClientRect().right>=a){var A=Nn(e.doc,u),N=e.display.gutterSpecs[m];return Me(e,i,e,A,N.className,t),$t(t)}}}function La(e,t){return Lc(e,t,"gutterClick",!0)}function Ec(e,t){dr(e.display,t)||jp(e,t)||pt(e,t,"contextmenu")||ye||e.display.input.onContextMenu(t)}function jp(e,t){return wt(e,"gutterContextMenu")?Lc(e,t,"gutterContextMenu",!1):!1}function Nc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vi(e)}var Ni={toString:function(){return"CodeMirror.Init"}},Pc={},lo={};function zp(e){var t=e.optionHandlers;function i(r,a,u,f){e.defaults[r]=a,u&&(t[r]=f?function(p,m,g){g!=Ni&&u(p,m,g)}:u)}e.defineOption=i,e.Init=Ni,i("value","",function(r,a){return r.setValue(a)},!0),i("mode",null,function(r,a){r.doc.modeOption=a,ya(r)},!0),i("indentUnit",2,ya,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){rs(r),Vi(r),an(r)},!0),i("lineSeparator",null,function(r,a){if(r.doc.lineSep=a,!!a){var u=[],f=r.doc.first;r.doc.iter(function(m){for(var g=0;;){var A=m.text.indexOf(a,g);if(A==-1)break;g=A+a.length,u.push(ce(f,A))}f++});for(var p=u.length-1;p>=0;p--)Ci(r.doc,a,u[p],ce(u[p].line,u[p].ch+a.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,a,u){r.state.specialChars=new RegExp(a.source+(a.test(" ")?"":"| "),"g"),u!=Ni&&r.refresh()}),i("specialCharPlaceholder",vh,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",M?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,a){return r.getInputField().spellcheck=a},!0),i("autocorrect",!1,function(r,a){return r.getInputField().autocorrect=a},!0),i("autocapitalize",!1,function(r,a){return r.getInputField().autocapitalize=a},!0),i("rtlMoveVisually",!ae),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){Nc(r),ns(r)},!0),i("keyMap","default",function(r,a,u){var f=oo(a),p=u!=Ni&&oo(u);p&&p.detach&&p.detach(r,f),f.attach&&f.attach(r,p||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Up,!0),i("gutters",[],function(r,a){r.display.gutterSpecs=va(a,r.options.lineNumbers),ns(r)},!0),i("fixedGutter",!0,function(r,a){r.display.gutters.style.left=a?sa(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return _i(r)},!0),i("scrollbarStyle","native",function(r){Du(r),_i(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,a){r.display.gutterSpecs=va(r.options.gutters,a),ns(r)},!0),i("firstLineNumber",1,ns,!0),i("lineNumberFormatter",function(r){return r},ns,!0),i("showCursorWhenSelecting",!1,Yi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,a){a=="nocursor"&&(wi(r),r.display.input.blur()),r.display.input.readOnlyChanged(a)}),i("screenReaderLabel",null,function(r,a){a=a===""?null:a,r.display.input.screenReaderLabelChanged(a)}),i("disableInput",!1,function(r,a){a||r.display.input.reset()},!0),i("dragDrop",!0,qp),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Yi,!0),i("singleCursorHeightPerLine",!0,Yi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,rs,!0),i("addModeClass",!1,rs,!0),i("pollInterval",100),i("undoDepth",200,function(r,a){return r.doc.history.undoDepth=a}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,rs,!0),i("moveInputWithCursor",!0,function(r,a){a||r.display.input.resetPosition()}),i("tabindex",null,function(r,a){return r.display.input.getField().tabIndex=a||""}),i("autofocus",null),i("direction","ltr",function(r,a){return r.doc.setDirection(a)},!0),i("phrases",null)}function qp(e,t,i){var r=i&&i!=Ni;if(!t!=!r){var a=e.display.dragFunctions,u=t?Ee:Lt;u(e.display.scroller,"dragstart",a.start),u(e.display.scroller,"dragenter",a.enter),u(e.display.scroller,"dragover",a.over),u(e.display.scroller,"dragleave",a.leave),u(e.display.scroller,"drop",a.drop)}}function Up(e){e.options.lineWrapping?(Oe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ke(e.display.wrapper,"CodeMirror-wrap"),Vo(e)),oa(e),an(e),Vi(e),setTimeout(function(){return _i(e)},100)}function mt(e,t){var i=this;if(!(this instanceof mt))return new mt(e,t);this.options=t=t?ze(t):{},ze(Pc,t,!1);var r=t.value;typeof r=="string"?r=new ln(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var a=new mt.inputStyles[t.inputStyle](this),u=this.display=new rp(e,r,a,t);u.wrapper.CodeMirror=this,Nc(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Du(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 X,keySeq:null,specialChars:null},t.autofocus&&!M&&u.input.focus(),w&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),$p(this),xp(),ri(this),this.curOp.forceUpdate=!0,Uu(this,r),t.autofocus&&!M||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&ca(i)},20):wi(this);for(var f in lo)lo.hasOwnProperty(f)&&lo[f](this,t[f],Ni);Fu(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Ea.length;++p)Ea[p](this);ii(this),y&&t.lineWrapping&&getComputedStyle(u.lineDiv).textRendering=="optimizelegibility"&&(u.lineDiv.style.textRendering="auto")}mt.defaults=Pc,mt.optionHandlers=lo;function $p(e){var t=e.display;Ee(t.scroller,"mousedown",Pt(e,Cc)),w&&x<11?Ee(t.scroller,"dblclick",Pt(e,function(m){if(!pt(e,m)){var g=Qr(e,m);if(!(!g||La(e,m)||dr(e.display,m))){_t(m);var A=e.findWordAt(g);to(e.doc,A.anchor,A.head)}}})):Ee(t.scroller,"dblclick",function(m){return pt(e,m)||_t(m)}),Ee(t.scroller,"contextmenu",function(m){return Ec(e,m)}),Ee(t.input.getField(),"contextmenu",function(m){t.scroller.contains(m.target)||Ec(e,m)});var i,r={end:0};function a(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function u(m){if(m.touches.length!=1)return!1;var g=m.touches[0];return g.radiusX<=1&&g.radiusY<=1}function f(m,g){if(g.left==null)return!0;var A=g.left-m.left,N=g.top-m.top;return A*A+N*N>20*20}Ee(t.scroller,"touchstart",function(m){if(!pt(e,m)&&!u(m)&&!La(e,m)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-r.end<=300?r:null},m.touches.length==1&&(t.activeTouch.left=m.touches[0].pageX,t.activeTouch.top=m.touches[0].pageY)}}),Ee(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ee(t.scroller,"touchend",function(m){var g=t.activeTouch;if(g&&!dr(t,m)&&g.left!=null&&!g.moved&&new Date-g.start<300){var A=e.coordsChar(t.activeTouch,"page"),N;!g.prev||f(g,g.prev)?N=new it(A,A):!g.prev.prev||f(g,g.prev.prev)?N=e.findWordAt(A):N=new it(ce(A.line,0),Se(e.doc,ce(A.line+1,0))),e.setSelection(N.anchor,N.head),e.focus(),_t(m)}a()}),Ee(t.scroller,"touchcancel",a),Ee(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Zi(e,t.scroller.scrollTop),ti(e,t.scroller.scrollLeft,!0),Me(e,"scroll",e))}),Ee(t.scroller,"mousewheel",function(m){return Hu(e,m)}),Ee(t.scroller,"DOMMouseScroll",function(m){return Hu(e,m)}),Ee(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(m){pt(e,m)||Dn(m)},over:function(m){pt(e,m)||(wp(e,m),Dn(m))},start:function(m){return bp(e,m)},drop:Pt(e,yp),leave:function(m){pt(e,m)||dc(e)}};var p=t.input.getField();Ee(p,"keyup",function(m){return Tc.call(e,m)}),Ee(p,"keydown",Pt(e,Sc)),Ee(p,"keypress",Pt(e,Ic)),Ee(p,"focus",function(m){return ca(e,m)}),Ee(p,"blur",function(m){return wi(e,m)})}var Ea=[];mt.defineInitHook=function(e){return Ea.push(e)};function gs(e,t,i,r){var a=e.doc,u;i==null&&(i="add"),i=="smart"&&(a.mode.indent?u=Ui(e,t).state:i="prev");var f=e.options.tabSize,p=Ce(a,t),m=qe(p.text,null,f);p.stateAfter&&(p.stateAfter=null);var g=p.text.match(/^\s*/)[0],A;if(!r&&!/\S/.test(p.text))A=0,i="not";else if(i=="smart"&&(A=a.mode.indent(u,p.text.slice(g.length),p.text),A==ee||A>150)){if(!r)return;i="prev"}i=="prev"?t>a.first?A=qe(Ce(a,t-1).text,null,f):A=0:i=="add"?A=m+e.options.indentUnit:i=="subtract"?A=m-e.options.indentUnit:typeof i=="number"&&(A=m+i),A=Math.max(0,A);var N="",j=0;if(e.options.indentWithTabs)for(var W=Math.floor(A/f);W;--W)j+=f,N+=" ";if(j<A&&(N+=Je(A-j)),N!=g)return Ci(a,N,ce(t,0),ce(t,g.length),"+input"),p.stateAfter=null,!0;for(var Y=0;Y<a.sel.ranges.length;Y++){var re=a.sel.ranges[Y];if(re.head.line==t&&re.head.ch<g.length){var me=ce(t,g.length);_a(a,Y,new it(me,me));break}}}var Bn=null;function uo(e){Bn=e}function Na(e,t,i,r,a){var u=e.doc;e.display.shift=!1,r||(r=u.sel);var f=+new Date-200,p=a=="paste"||e.state.pasteIncoming>f,m=lr(t),g=null;if(p&&r.ranges.length>1)if(Bn&&Bn.text.join(`
|
||
`)==t){if(r.ranges.length%Bn.text.length==0){g=[];for(var A=0;A<Bn.text.length;A++)g.push(u.splitLines(Bn.text[A]))}}else m.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(g=He(m,function(be){return[be]}));for(var N=e.curOp.updateInput,j=r.ranges.length-1;j>=0;j--){var W=r.ranges[j],Y=W.from(),re=W.to();W.empty()&&(i&&i>0?Y=ce(Y.line,Y.ch-i):e.state.overwrite&&!p?re=ce(re.line,Math.min(Ce(u,re.line).text.length,re.ch+Ae(m).length)):p&&Bn&&Bn.lineWise&&Bn.text.join(`
|
||
`)==m.join(`
|
||
`)&&(Y=re=ce(Y.line,0)));var me={from:Y,to:re,text:g?g[j%g.length]:m,origin:a||(p?"paste":e.state.cutIncoming>f?"cut":"+input")};Ii(e.doc,me),Nt(e,"inputRead",e,me)}t&&!p&&Dc(e,t),xi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=N),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Oc(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&gn(t,function(){return Na(t,i,0,null,"paste")}),!0}function Dc(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var a=i.ranges[r];if(!(a.head.ch>100||r&&i.ranges[r-1].head.line==a.head.line)){var u=e.getModeAt(a.head),f=!1;if(u.electricChars){for(var p=0;p<u.electricChars.length;p++)if(t.indexOf(u.electricChars.charAt(p))>-1){f=gs(e,a.head.line,"smart");break}}else u.electricInput&&u.electricInput.test(Ce(e.doc,a.head.line).text.slice(0,a.head.ch))&&(f=gs(e,a.head.line,"smart"));f&&Nt(e,"electricInput",e,a.head.line)}}}function Mc(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var a=e.doc.sel.ranges[r].head.line,u={anchor:ce(a,0),head:ce(a+1,0)};i.push(u),t.push(e.getRange(u.anchor,u.head))}return{text:t,ranges:i}}function Rc(e,t,i,r){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Fc(){var e=K("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=K("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?e.style.width="1000px":e.setAttribute("wrap","off"),O&&(e.style.border="1px solid black"),Rc(e),t}function Gp(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,a){var u=this.options,f=u[r];u[r]==a&&r!="mode"||(u[r]=a,t.hasOwnProperty(r)&&Pt(this,t[r])(this,a,f),Me(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,a){this.state.keyMaps[a?"push":"unshift"](oo(r))},removeKeyMap:function(r){for(var a=this.state.keyMaps,u=0;u<a.length;++u)if(a[u]==r||a[u].name==r)return a.splice(u,1),!0},addOverlay:en(function(r,a){var u=r.token?r:e.getMode(this.options,r);if(u.startState)throw new Error("Overlays may not be stateful.");Ke(this.state.overlays,{mode:u,modeSpec:r,opaque:a&&a.opaque,priority:a&&a.priority||0},function(f){return f.priority}),this.state.modeGen++,an(this)}),removeOverlay:en(function(r){for(var a=this.state.overlays,u=0;u<a.length;++u){var f=a[u].modeSpec;if(f==r||typeof r=="string"&&f.name==r){a.splice(u,1),this.state.modeGen++,an(this);return}}}),indentLine:en(function(r,a,u){typeof a!="string"&&typeof a!="number"&&(a==null?a=this.options.smartIndent?"smart":"prev":a=a?"add":"subtract"),fr(this.doc,r)&&gs(this,r,a,u)}),indentSelection:en(function(r){for(var a=this.doc.sel.ranges,u=-1,f=0;f<a.length;f++){var p=a[f];if(p.empty())p.head.line>u&&(gs(this,p.head.line,r,!0),u=p.head.line,f==this.doc.sel.primIndex&&xi(this));else{var m=p.from(),g=p.to(),A=Math.max(u,m.line);u=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var N=A;N<u;++N)gs(this,N,r);var j=this.doc.sel.ranges;m.ch==0&&a.length==j.length&&j[f].from().ch>0&&_a(this.doc,f,new it(m,j[f].to()),fe)}}}),getTokenAt:function(r,a){return Gl(this,r,a)},getLineTokens:function(r,a){return Gl(this,ce(r),a,!0)},getTokenTypeAt:function(r){r=Se(this.doc,r);var a=ql(this,Ce(this.doc,r.line)),u=0,f=(a.length-1)/2,p=r.ch,m;if(p==0)m=a[2];else for(;;){var g=u+f>>1;if((g?a[g*2-1]:0)>=p)f=g;else if(a[g*2+1]<p)u=g+1;else{m=a[g*2+2];break}}var A=m?m.indexOf("overlay "):-1;return A<0?m:A==0?null:m.slice(0,A-1)},getModeAt:function(r){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(r).state).mode:a},getHelper:function(r,a){return this.getHelpers(r,a)[0]},getHelpers:function(r,a){var u=[];if(!i.hasOwnProperty(a))return u;var f=i[a],p=this.getModeAt(r);if(typeof p[a]=="string")f[p[a]]&&u.push(f[p[a]]);else if(p[a])for(var m=0;m<p[a].length;m++){var g=f[p[a][m]];g&&u.push(g)}else p.helperType&&f[p.helperType]?u.push(f[p.helperType]):f[p.name]&&u.push(f[p.name]);for(var A=0;A<f._global.length;A++){var N=f._global[A];N.pred(p,this)&&z(u,N.val)==-1&&u.push(N.val)}return u},getStateAfter:function(r,a){var u=this.doc;return r=Qe(u,r??u.first+u.size-1),Ui(this,r+1,a).state},cursorCoords:function(r,a){var u,f=this.doc.sel.primary();return r==null?u=f.head:typeof r=="object"?u=Se(this.doc,r):u=r?f.from():f.to(),Rn(this,u,a||"page")},charCoords:function(r,a){return $s(this,Se(this.doc,r),a||"page")},coordsChar:function(r,a){return r=wu(this,r,a||"page"),na(this,r.left,r.top)},lineAtHeight:function(r,a){return r=wu(this,{top:r,left:0},a||"page").top,Nn(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,a,u){var f=!1,p;if(typeof r=="number"){var m=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>m&&(r=m,f=!0),p=Ce(this.doc,r)}else p=r;return Us(this,p,{top:0,left:0},a||"page",u||f).top+(f?this.doc.height-pr(p):0)},defaultTextHeight:function(){return yi(this.display)},defaultCharWidth:function(){return bi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,a,u,f,p){var m=this.display;r=Rn(this,Se(this.doc,r));var g=r.bottom,A=r.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),m.sizer.appendChild(a),f=="over")g=r.top;else if(f=="above"||f=="near"){var N=Math.max(m.wrapper.clientHeight,this.doc.height),j=Math.max(m.sizer.clientWidth,m.lineSpace.clientWidth);(f=="above"||r.bottom+a.offsetHeight>N)&&r.top>a.offsetHeight?g=r.top-a.offsetHeight:r.bottom+a.offsetHeight<=N&&(g=r.bottom),A+a.offsetWidth>j&&(A=j-a.offsetWidth)}a.style.top=g+"px",a.style.left=a.style.right="",p=="right"?(A=m.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):(p=="left"?A=0:p=="middle"&&(A=(m.sizer.clientWidth-a.offsetWidth)/2),a.style.left=A+"px"),u&&qh(this,{left:A,top:g,right:A+a.offsetWidth,bottom:g+a.offsetHeight})},triggerOnKeyDown:en(Sc),triggerOnKeyPress:en(Ic),triggerOnKeyUp:Tc,triggerOnMouseDown:en(Cc),execCommand:function(r){if(hs.hasOwnProperty(r))return hs[r].call(null,this)},triggerElectric:en(function(r){Dc(this,r)}),findPosH:function(r,a,u,f){var p=1;a<0&&(p=-1,a=-a);for(var m=Se(this.doc,r),g=0;g<a&&(m=Pa(this.doc,m,p,u,f),!m.hitSide);++g);return m},moveH:en(function(r,a){var u=this;this.extendSelectionsBy(function(f){return u.display.shift||u.doc.extend||f.empty()?Pa(u.doc,f.head,r,a,u.options.rtlMoveVisually):r<0?f.from():f.to()},pe)}),deleteH:en(function(r,a){var u=this.doc.sel,f=this.doc;u.somethingSelected()?f.replaceSelection("",null,"+delete"):Ei(this,function(p){var m=Pa(f,p.head,r,a,!1);return r<0?{from:m,to:p.head}:{from:p.head,to:m}})}),findPosV:function(r,a,u,f){var p=1,m=f;a<0&&(p=-1,a=-a);for(var g=Se(this.doc,r),A=0;A<a;++A){var N=Rn(this,g,"div");if(m==null?m=N.left:N.left=m,g=Bc(this,N,p,u),g.hitSide)break}return g},moveV:en(function(r,a){var u=this,f=this.doc,p=[],m=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(A){if(m)return r<0?A.from():A.to();var N=Rn(u,A.head,"div");A.goalColumn!=null&&(N.left=A.goalColumn),p.push(N.left);var j=Bc(u,N,r,a);return a=="page"&&A==f.sel.primary()&&ha(u,$s(u,j,"div").top-N.top),j},pe),p.length)for(var g=0;g<f.sel.ranges.length;g++)f.sel.ranges[g].goalColumn=p[g]}),findWordAt:function(r){var a=this.doc,u=Ce(a,r.line).text,f=r.ch,p=r.ch;if(u){var m=this.getHelper(r,"wordChars");(r.sticky=="before"||p==u.length)&&f?--f:++p;for(var g=u.charAt(f),A=U(g,m)?function(N){return U(N,m)}:/\s/.test(g)?function(N){return/\s/.test(N)}:function(N){return!/\s/.test(N)&&!U(N)};f>0&&A(u.charAt(f-1));)--f;for(;p<u.length&&A(u.charAt(p));)++p}return new it(ce(r.line,f),ce(r.line,p))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Oe(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),Me(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==le()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:en(function(r,a){Ji(this,r,a)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Jn(this)-this.display.barHeight,width:r.scrollWidth-Jn(this)-this.display.barWidth,clientHeight:Zo(this),clientWidth:Jr(this)}},scrollIntoView:en(function(r,a){r==null?(r={from:this.doc.sel.primary().head,to:null},a==null&&(a=this.options.cursorScrollMargin)):typeof r=="number"?r={from:ce(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=a||0,r.from.line!=null?Uh(this,r):Eu(this,r.from,r.to,r.margin)}),setSize:en(function(r,a){var u=this,f=function(m){return typeof m=="number"||/^\d+$/.test(String(m))?m+"px":m};r!=null&&(this.display.wrapper.style.width=f(r)),a!=null&&(this.display.wrapper.style.height=f(a)),this.options.lineWrapping&&ku(this);var p=this.display.viewFrom;this.doc.iter(p,this.display.viewTo,function(m){if(m.widgets){for(var g=0;g<m.widgets.length;g++)if(m.widgets[g].noHScroll){Ar(u,p,"widget");break}}++p}),this.curOp.forceUpdate=!0,Me(this,"refresh",this)}),operation:function(r){return gn(this,r)},startOperation:function(){return ri(this)},endOperation:function(){return ii(this)},refresh:en(function(){var r=this.display.cachedTextHeight;an(this),this.curOp.forceUpdate=!0,Vi(this),Ji(this,this.doc.scrollLeft,this.doc.scrollTop),ma(this.display),(r==null||Math.abs(r-yi(this.display))>.5||this.options.lineWrapping)&&oa(this),Me(this,"refresh",this)}),swapDoc:en(function(r){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Uu(this,r),Vi(this),this.display.input.reset(),Ji(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Nt(this,"swapDoc",this,a),a}),phrase:function(r){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,r)?a[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}},dn(e),e.registerHelper=function(r,a,u){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][a]=u},e.registerGlobalHelper=function(r,a,u,f){e.registerHelper(r,a,f),i[r]._global.push({pred:u,val:f})}}function Pa(e,t,i,r,a){var u=t,f=i,p=Ce(e,t.line),m=a&&e.direction=="rtl"?-i:i;function g(){var _e=t.line+m;return _e<e.first||_e>=e.first+e.size?!1:(t=new ce(_e,t.ch,t.sticky),p=Ce(e,_e))}function A(_e){var we;if(r=="codepoint"){var Ie=p.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(Ie))we=null;else{var Pe=i>0?Ie>=55296&&Ie<56320:Ie>=56320&&Ie<57343;we=new ce(t.line,Math.max(0,Math.min(p.text.length,t.ch+i*(Pe?2:1))),-i)}}else a?we=Cp(e.cm,p,t,i):we=Ta(p,t,i);if(we==null)if(!_e&&g())t=Ia(a,e.cm,p,t.line,m);else return!1;else t=we;return!0}if(r=="char"||r=="codepoint")A();else if(r=="column")A(!0);else if(r=="word"||r=="group")for(var N=null,j=r=="group",W=e.cm&&e.cm.getHelper(t,"wordChars"),Y=!0;!(i<0&&!A(!Y));Y=!1){var re=p.text.charAt(t.ch)||`
|
||
`,me=U(re,W)?"w":j&&re==`
|
||
`?"n":!j||/\s/.test(re)?null:"p";if(j&&!Y&&!me&&(me="s"),N&&N!=me){i<0&&(i=1,A(),t.sticky="after");break}if(me&&(N=me),i>0&&!A(!Y))break}var be=ro(e,t,u,f,!0);return P(u,be)&&(be.hitSide=!0),be}function Bc(e,t,i,r){var a=e.doc,u=t.left,f;if(r=="page"){var p=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),m=Math.max(p-.5*yi(e.display),3);f=(i>0?t.bottom:t.top)+i*m}else r=="line"&&(f=i>0?t.bottom+3:t.top-3);for(var g;g=na(e,u,f),!!g.outside;){if(i<0?f<=0:f>=a.height){g.hitSide=!0;break}f+=i*5}return g}var at=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};at.prototype.init=function(e){var t=this,i=this,r=i.cm,a=i.div=e.lineDiv;a.contentEditable=!0,Rc(a,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function u(p){for(var m=p.target;m;m=m.parentNode){if(m==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(m.className))break}return!1}Ee(a,"paste",function(p){!u(p)||pt(r,p)||Oc(p,r)||x<=11&&setTimeout(Pt(r,function(){return t.updateFromDOM()}),20)}),Ee(a,"compositionstart",function(p){t.composing={data:p.data,done:!1}}),Ee(a,"compositionupdate",function(p){t.composing||(t.composing={data:p.data,done:!1})}),Ee(a,"compositionend",function(p){t.composing&&(p.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ee(a,"touchstart",function(){return i.forceCompositionEnd()}),Ee(a,"input",function(){t.composing||t.readFromDOMSoon()});function f(p){if(!(!u(p)||pt(r,p))){if(r.somethingSelected())uo({lineWise:!1,text:r.getSelections()}),p.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var m=Mc(r);uo({lineWise:!0,text:m.text}),p.type=="cut"&&r.operation(function(){r.setSelections(m.ranges,0,fe),r.replaceSelection("",null,"cut")})}else return;if(p.clipboardData){p.clipboardData.clearData();var g=Bn.text.join(`
|
||
`);if(p.clipboardData.setData("Text",g),p.clipboardData.getData("Text")==g){p.preventDefault();return}}var A=Fc(),N=A.firstChild;r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),N.value=Bn.text.join(`
|
||
`);var j=le();Fe(N),setTimeout(function(){r.display.lineSpace.removeChild(A),j.focus(),j==a&&i.showPrimarySelection()},50)}}Ee(a,"copy",f),Ee(a,"cut",f)},at.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},at.prototype.prepareSelection=function(){var e=Cu(this.cm,!1);return e.focus=le()==this.div,e},at.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},at.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},at.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),a=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var u=co(t,e.anchorNode,e.anchorOffset),f=co(t,e.focusNode,e.focusOffset);if(!(u&&!u.bad&&f&&!f.bad&&v(Be(u,f),r)==0&&v(de(u,f),a)==0)){var p=t.display.view,m=r.line>=t.display.viewFrom&&Wc(t,r)||{node:p[0].measure.map[2],offset:0},g=a.line<t.display.viewTo&&Wc(t,a);if(!g){var A=p[p.length-1].measure,N=A.maps?A.maps[A.maps.length-1]:A.map;g={node:N[N.length-1],offset:N[N.length-2]-N[N.length-3]}}if(!m||!g){e.removeAllRanges();return}var j=e.rangeCount&&e.getRangeAt(0),W;try{W=se(m.node,m.offset,g.offset,g.node)}catch{}W&&(!h&&t.state.focused?(e.collapse(m.node,m.offset),W.collapsed||(e.removeAllRanges(),e.addRange(W))):(e.removeAllRanges(),e.addRange(W)),j&&e.anchorNode==null?e.addRange(j):h&&this.startGracePeriod()),this.rememberSelection()}},at.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)},at.prototype.showMultipleSelections=function(e){G(this.cm.display.cursorDiv,e.cursors),G(this.cm.display.selectionDiv,e.selection)},at.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},at.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return J(this.div,t)},at.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||le()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},at.prototype.blur=function(){this.div.blur()},at.prototype.getField=function(){return this.div},at.prototype.supportsTouch=function(){return!0},at.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):gn(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},at.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},at.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(T&&L&&this.cm.display.gutterSpecs.length&&Kp(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=co(t,e.anchorNode,e.anchorOffset),r=co(t,e.focusNode,e.focusOffset);i&&r&&gn(t,function(){Vt(t.doc,Er(i,r),fe),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},at.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),a=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=ce(r.line-1,Ce(e.doc,r.line-1).length)),a.ch==Ce(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=ce(a.line+1,0)),r.line<t.viewFrom||a.line>t.viewTo-1)return!1;var u,f,p;r.line==t.viewFrom||(u=ei(e,r.line))==0?(f=rt(t.view[0].line),p=t.view[0].node):(f=rt(t.view[u].line),p=t.view[u-1].node.nextSibling);var m=ei(e,a.line),g,A;if(m==t.view.length-1?(g=t.viewTo-1,A=t.lineDiv.lastChild):(g=rt(t.view[m+1].line)-1,A=t.view[m+1].node.previousSibling),!p)return!1;for(var N=e.doc.splitLines(Xp(e,p,A,f,g)),j=En(e.doc,ce(f,0),ce(g,Ce(e.doc,g).text.length));N.length>1&&j.length>1;)if(Ae(N)==Ae(j))N.pop(),j.pop(),g--;else if(N[0]==j[0])N.shift(),j.shift(),f++;else break;for(var W=0,Y=0,re=N[0],me=j[0],be=Math.min(re.length,me.length);W<be&&re.charCodeAt(W)==me.charCodeAt(W);)++W;for(var _e=Ae(N),we=Ae(j),Ie=Math.min(_e.length-(N.length==1?W:0),we.length-(j.length==1?W:0));Y<Ie&&_e.charCodeAt(_e.length-Y-1)==we.charCodeAt(we.length-Y-1);)++Y;if(N.length==1&&j.length==1&&f==r.line)for(;W&&W>r.ch&&_e.charCodeAt(_e.length-Y-1)==we.charCodeAt(we.length-Y-1);)W--,Y++;N[N.length-1]=_e.slice(0,_e.length-Y).replace(/^\u200b+/,""),N[0]=N[0].slice(W).replace(/\u200b+$/,"");var Pe=ce(f,W),Le=ce(g,j.length?Ae(j).length-Y:0);if(N.length>1||N[0]||v(Pe,Le))return Ci(e.doc,N,Pe,Le,"+input"),!0},at.prototype.ensurePolled=function(){this.forceCompositionEnd()},at.prototype.reset=function(){this.forceCompositionEnd()},at.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},at.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))},at.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&gn(this.cm,function(){return an(e.cm)})},at.prototype.setUneditable=function(e){e.contentEditable="false"},at.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pt(this.cm,Na)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},at.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},at.prototype.onContextMenu=function(){},at.prototype.resetPosition=function(){},at.prototype.needsContentAttribute=!0;function Wc(e,t){var i=Qo(e,t.line);if(!i||i.hidden)return null;var r=Ce(e.doc,t.line),a=pu(i,r,t.line),u=Bt(r,e.doc.direction),f="left";if(u){var p=ft(u,t.ch);f=p%2?"right":"left"}var m=gu(a.map,t.ch,f);return m.offset=m.collapse=="right"?m.end:m.start,m}function Kp(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Pi(e,t){return t&&(e.bad=!0),e}function Xp(e,t,i,r,a){var u="",f=!1,p=e.doc.lineSeparator(),m=!1;function g(W){return function(Y){return Y.id==W}}function A(){f&&(u+=p,m&&(u+=p),f=m=!1)}function N(W){W&&(A(),u+=W)}function j(W){if(W.nodeType==1){var Y=W.getAttribute("cm-text");if(Y){N(Y);return}var re=W.getAttribute("cm-marker"),me;if(re){var be=e.findMarks(ce(r,0),ce(a+1,0),g(+re));be.length&&(me=be[0].find(0))&&N(En(e.doc,me.from,me.to).join(p));return}if(W.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(W.nodeName);if(!/^br$/i.test(W.nodeName)&&W.textContent.length==0)return;_e&&A();for(var we=0;we<W.childNodes.length;we++)j(W.childNodes[we]);/^(pre|p)$/i.test(W.nodeName)&&(m=!0),_e&&(f=!0)}else W.nodeType==3&&N(W.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;j(t),t!=i;)t=t.nextSibling,m=!1;return u}function co(e,t,i){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[i],!r)return Pi(e.clipPos(ce(e.display.viewTo-1)),!0);t=null,i=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 a=0;a<e.display.view.length;a++){var u=e.display.view[a];if(u.node==r)return Vp(u,t,i)}}function Vp(e,t,i){var r=e.text.firstChild,a=!1;if(!t||!J(r,t))return Pi(ce(rt(e.line),0),!0);if(t==r&&(a=!0,t=r.childNodes[i],i=0,!t)){var u=e.rest?Ae(e.rest):e.line;return Pi(ce(rt(u),u.text.length),a)}var f=t.nodeType==3?t:null,p=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,i&&(i=f.nodeValue.length));p.parentNode!=r;)p=p.parentNode;var m=e.measure,g=m.maps;function A(me,be,_e){for(var we=-1;we<(g?g.length:0);we++)for(var Ie=we<0?m.map:g[we],Pe=0;Pe<Ie.length;Pe+=3){var Le=Ie[Pe+2];if(Le==me||Le==be){var Ve=rt(we<0?e.line:e.rest[we]),ut=Ie[Pe]+_e;return(_e<0||Le!=me)&&(ut=Ie[Pe+(_e?1:0)]),ce(Ve,ut)}}}var N=A(f,p,i);if(N)return Pi(N,a);for(var j=p.nextSibling,W=f?f.nodeValue.length-i:0;j;j=j.nextSibling){if(N=A(j,j.firstChild,0),N)return Pi(ce(N.line,N.ch-W),a);W+=j.textContent.length}for(var Y=p.previousSibling,re=i;Y;Y=Y.previousSibling){if(N=A(Y,Y.firstChild,-1),N)return Pi(ce(N.line,N.ch+re),a);re+=Y.textContent.length}}var xt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};xt.prototype.init=function(e){var t=this,i=this,r=this.cm;this.createField(e);var a=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),O&&(a.style.width="0px"),Ee(a,"input",function(){w&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Ee(a,"paste",function(f){pt(r,f)||Oc(f,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function u(f){if(!pt(r,f)){if(r.somethingSelected())uo({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var p=Mc(r);uo({lineWise:!0,text:p.text}),f.type=="cut"?r.setSelections(p.ranges,null,fe):(i.prevInput="",a.value=p.text.join(`
|
||
`),Fe(a))}else return;f.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ee(a,"cut",u),Ee(a,"copy",u),Ee(e.scroller,"paste",function(f){if(!(dr(e,f)||pt(r,f))){if(!a.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var p=new Event("paste");p.clipboardData=f.clipboardData,a.dispatchEvent(p)}}),Ee(e.lineSpace,"selectstart",function(f){dr(e,f)||_t(f)}),Ee(a,"compositionstart",function(){var f=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:f,range:r.markText(f,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ee(a,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},xt.prototype.createField=function(e){this.wrapper=Fc(),this.textarea=this.wrapper.firstChild},xt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},xt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=Cu(e);if(e.options.moveInputWithCursor){var a=Rn(e,i.sel.primary().head,"div"),u=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+f.top-u.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+f.left-u.left))}return r},xt.prototype.showSelection=function(e){var t=this.cm,i=t.display;G(i.cursorDiv,e.cursors),G(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},xt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&Fe(this.textarea),w&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",w&&x>=9&&(this.hasSelection=null))}},xt.prototype.getField=function(){return this.textarea},xt.prototype.supportsTouch=function(){return!1},xt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!M||le()!=this.textarea))try{this.textarea.focus()}catch{}},xt.prototype.blur=function(){this.textarea.blur()},xt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},xt.prototype.receivedFocus=function(){this.slowPoll()},xt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},xt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},xt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Sr(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=i.value;if(a==r&&!t.somethingSelected())return!1;if(w&&x>=9&&this.hasSelection===a||B&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var u=a.charCodeAt(0);if(u==8203&&!r&&(r=""),u==8666)return this.reset(),this.cm.execCommand("undo")}for(var f=0,p=Math.min(r.length,a.length);f<p&&r.charCodeAt(f)==a.charCodeAt(f);)++f;return gn(t,function(){Na(t,a.slice(f),r.length-f,null,e.composing?"*compose":null),a.length>1e3||a.indexOf(`
|
||
`)>-1?i.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},xt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},xt.prototype.onKeyPress=function(){w&&x>=9&&(this.hasSelection=null),this.fastPoll()},xt.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var u=Qr(i,e),f=r.scroller.scrollTop;if(!u||_)return;var p=i.options.resetSelectionOnContextMenu;p&&i.doc.sel.contains(u)==-1&&Pt(i,Vt)(i.doc,Er(u),fe);var m=a.style.cssText,g=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",a.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
|
||
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var N;y&&(N=window.scrollY),r.input.focus(),y&&window.scrollTo(null,N),r.input.reset(),i.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=W,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function j(){if(a.selectionStart!=null){var re=i.somethingSelected(),me=""+(re?a.value:"");a.value="⇚",a.value=me,t.prevInput=re?"":"",a.selectionStart=1,a.selectionEnd=me.length,r.selForContextMenu=i.doc.sel}}function W(){if(t.contextMenuPending==W&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,a.style.cssText=m,w&&x<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=f),a.selectionStart!=null)){(!w||w&&x<9)&&j();var re=0,me=function(){r.selForContextMenu==i.doc.sel&&a.selectionStart==0&&a.selectionEnd>0&&t.prevInput==""?Pt(i,rc)(i):re++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(w&&x>=9&&j(),ye){Dn(e);var Y=function(){Lt(window,"mouseup",Y),setTimeout(W,20)};Ee(window,"mouseup",Y)}else setTimeout(W,50)},xt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},xt.prototype.setUneditable=function(){},xt.prototype.needsContentAttribute=!1;function Yp(e,t){if(t=t?ze(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=le();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=p.getValue()}var a;if(e.form&&(Ee(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var u=e.form;a=u.submit;try{var f=u.submit=function(){r(),u.submit=a,u.submit(),u.submit=f}}catch{}}t.finishInit=function(m){m.save=r,m.getTextArea=function(){return e},m.toTextArea=function(){m.toTextArea=isNaN,r(),e.parentNode.removeChild(m.getWrapperElement()),e.style.display="",e.form&&(Lt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=a))}},e.style.display="none";var p=mt(function(m){return e.parentNode.insertBefore(m,e.nextSibling)},t);return p}function Jp(e){e.off=Lt,e.on=Ee,e.wheelEventPixels=ip,e.Doc=ln,e.splitLines=lr,e.countColumn=qe,e.findColumn=De,e.isWordChar=nt,e.Pass=ee,e.signal=Me,e.Line=gi,e.changeEnd=Nr,e.scrollbarModel=Ou,e.Pos=ce,e.cmpPos=v,e.modes=Zt,e.mimeModes=Gt,e.resolveMode=Xn,e.getMode=Vn,e.modeExtensions=sn,e.extendMode=on,e.copyState=Kt,e.startState=Xr,e.innerMode=cr,e.commands=hs,e.keyMap=gr,e.keyName=yc,e.isModifierKey=vc,e.lookupKey=Li,e.normalizeKeyMap=Ip,e.StringStream=dt,e.SharedTextMarker=us,e.TextMarker=Or,e.LineWidget=ls,e.e_preventDefault=_t,e.e_stopPropagation=Kn,e.e_stop=Dn,e.addClass=Oe,e.contains=J,e.rmClass=ke,e.keyNames=Dr}zp(mt),Gp(mt);var Zp="iter insert remove copy getEditor constructor".split(" ");for(var fo in ln.prototype)ln.prototype.hasOwnProperty(fo)&&z(Zp,fo)<0&&(mt.prototype[fo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ln.prototype[fo]));return dn(ln),mt.inputStyles={textarea:xt,contenteditable:at},mt.defineMode=function(e){!mt.defaults.mode&&e!="null"&&(mt.defaults.mode=e),Ir.apply(this,arguments)},mt.defineMIME=_n,mt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),mt.defineMIME("text/plain","null"),mt.defineExtension=function(e,t){mt.prototype[e]=t},mt.defineDocExtension=function(e,t){ln.prototype[e]=t},mt.fromTextArea=Yp,Jp(mt),mt.version="5.65.3",mt})}(Ba)),Ba.exports}var Yd=wn(),Jc={exports:{}},Zc;function z1(){return Zc||(Zc=1,function(n,o){(function(l){l(wn())})(function(l){l.defineMode("javascript",function(c,h){var k=c.indentUnit,I=h.statementIndent,S=h.jsonld,w=h.json||S,x=h.trackScope!==!1,y=h.typescript,E=h.wordCharacters||/[\w$\xa1-\uffff]/,L=function(){function v(Xt){return{type:Xt,style:"keyword"}}var P=v("keyword a"),ne=v("keyword b"),de=v("keyword c"),Be=v("keyword d"),Qe=v("operator"),Se={type:"atom",style:"atom"};return{if:v("if"),while:P,with:P,else:ne,do:ne,try:ne,finally:ne,return:Be,break:Be,continue:Be,new:v("new"),delete:de,void:de,throw:de,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:Qe,typeof:Qe,instanceof:Qe,true:Se,false:Se,null:Se,undefined:Se,NaN:Se,Infinity:Se,this:v("this"),class:v("class"),super:v("atom"),yield:de,export:v("export"),import:v("import"),extends:de,await:de}}(),_=/[+\-*&%=<>!?|~^@]/,F=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function D(v){for(var P=!1,ne,de=!1;(ne=v.next())!=null;){if(!P){if(ne=="/"&&!de)return;ne=="["?de=!0:de&&ne=="]"&&(de=!1)}P=!P&&ne=="\\"}}var H,O;function T(v,P,ne){return H=v,O=ne,P}function M(v,P){var ne=v.next();if(ne=='"'||ne=="'")return P.tokenize=B(ne),P.tokenize(v,P);if(ne=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return T("number","number");if(ne=="."&&v.match(".."))return T("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ne))return T(ne);if(ne=="="&&v.eat(">"))return T("=>","operator");if(ne=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return T("number","number");if(/\d/.test(ne))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),T("number","number");if(ne=="/")return v.eat("*")?(P.tokenize=$,$(v,P)):v.eat("/")?(v.skipToEnd(),T("comment","comment")):ce(v,P,1)?(D(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),T("regexp","string-2")):(v.eat("="),T("operator","operator",v.current()));if(ne=="`")return P.tokenize=ae,ae(v,P);if(ne=="#"&&v.peek()=="!")return v.skipToEnd(),T("meta","meta");if(ne=="#"&&v.eatWhile(E))return T("variable","property");if(ne=="<"&&v.match("!--")||ne=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),T("comment","comment");if(_.test(ne))return(ne!=">"||!P.lexical||P.lexical.type!=">")&&(v.eat("=")?(ne=="!"||ne=="=")&&v.eat("="):/[<>*+\-|&?]/.test(ne)&&(v.eat(ne),ne==">"&&v.eat(ne))),ne=="?"&&v.eat(".")?T("."):T("operator","operator",v.current());if(E.test(ne)){v.eatWhile(E);var de=v.current();if(P.lastType!="."){if(L.propertyIsEnumerable(de)){var Be=L[de];return T(Be.type,Be.style,de)}if(de=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return T("async","keyword",de)}return T("variable","variable",de)}}function B(v){return function(P,ne){var de=!1,Be;if(S&&P.peek()=="@"&&P.match(F))return ne.tokenize=M,T("jsonld-keyword","meta");for(;(Be=P.next())!=null&&!(Be==v&&!de);)de=!de&&Be=="\\";return de||(ne.tokenize=M),T("string","string")}}function $(v,P){for(var ne=!1,de;de=v.next();){if(de=="/"&&ne){P.tokenize=M;break}ne=de=="*"}return T("comment","comment")}function ae(v,P){for(var ne=!1,de;(de=v.next())!=null;){if(!ne&&(de=="`"||de=="$"&&v.eat("{"))){P.tokenize=M;break}ne=!ne&&de=="\\"}return T("quasi","string-2",v.current())}var ue="([{}])";function te(v,P){P.fatArrowAt&&(P.fatArrowAt=null);var ne=v.string.indexOf("=>",v.start);if(!(ne<0)){if(y){var de=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,ne));de&&(ne=de.index)}for(var Be=0,Qe=!1,Se=ne-1;Se>=0;--Se){var Xt=v.string.charAt(Se),Sn=ue.indexOf(Xt);if(Sn>=0&&Sn<3){if(!Be){++Se;break}if(--Be==0){Xt=="("&&(Qe=!0);break}}else if(Sn>=3&&Sn<6)++Be;else if(E.test(Xt))Qe=!0;else if(/["'\/`]/.test(Xt))for(;;--Se){if(Se==0)return;var mi=v.string.charAt(Se-1);if(mi==Xt&&v.string.charAt(Se-2)!="\\"){Se--;break}}else if(Qe&&!Be){++Se;break}}Qe&&!Be&&(P.fatArrowAt=Se)}}var ye={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function ge(v,P,ne,de,Be,Qe){this.indented=v,this.column=P,this.type=ne,this.prev=Be,this.info=Qe,de!=null&&(this.align=de)}function ke(v,P){if(!x)return!1;for(var ne=v.localVars;ne;ne=ne.next)if(ne.name==P)return!0;for(var de=v.context;de;de=de.prev)for(var ne=de.vars;ne;ne=ne.next)if(ne.name==P)return!0}function Te(v,P,ne,de,Be){var Qe=v.cc;for(G.state=v,G.stream=Be,G.marked=null,G.cc=Qe,G.style=P,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var Se=Qe.length?Qe.pop():w?pe:fe;if(Se(ne,de)){for(;Qe.length&&Qe[Qe.length-1].lex;)Qe.pop()();return G.marked?G.marked:ne=="variable"&&ke(v,de)?"variable-2":P}}}var G={state:null,column:null,marked:null,cc:null};function K(){for(var v=arguments.length-1;v>=0;v--)G.cc.push(arguments[v])}function b(){return K.apply(null,arguments),!0}function se(v,P){for(var ne=P;ne;ne=ne.next)if(ne.name==v)return!0;return!1}function J(v){var P=G.state;if(G.marked="def",!!x){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var ne=le(v,P.context);if(ne!=null){P.context=ne;return}}else if(!se(v,P.localVars)){P.localVars=new Fe(v,P.localVars);return}}h.globalVars&&!se(v,P.globalVars)&&(P.globalVars=new Fe(v,P.globalVars))}}function le(v,P){if(P)if(P.block){var ne=le(v,P.prev);return ne?ne==P.prev?P:new Ne(ne,P.vars,!0):null}else return se(v,P.vars)?P:new Ne(P.prev,new Fe(v,P.vars),!1);else return null}function Oe(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function Ne(v,P,ne){this.prev=v,this.vars=P,this.block=ne}function Fe(v,P){this.name=v,this.next=P}var tt=new Fe("this",new Fe("arguments",null));function ze(){G.state.context=new Ne(G.state.context,G.state.localVars,!1),G.state.localVars=tt}function qe(){G.state.context=new Ne(G.state.context,G.state.localVars,!0),G.state.localVars=null}ze.lex=qe.lex=!0;function X(){G.state.localVars=G.state.context.vars,G.state.context=G.state.context.prev}X.lex=!0;function z(v,P){var ne=function(){var de=G.state,Be=de.indented;if(de.lexical.type=="stat")Be=de.lexical.indented;else for(var Qe=de.lexical;Qe&&Qe.type==")"&&Qe.align;Qe=Qe.prev)Be=Qe.indented;de.lexical=new ge(Be,G.stream.column(),v,null,de.lexical,P)};return ne.lex=!0,ne}function V(){var v=G.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}V.lex=!0;function ee(v){function P(ne){return ne==v?b():v==";"||ne=="}"||ne==")"||ne=="]"?K():b(P)}return P}function fe(v,P){return v=="var"?b(z("vardef",P),or,ee(";"),V):v=="keyword a"?b(z("form"),Ze,fe,V):v=="keyword b"?b(z("form"),fe,V):v=="keyword d"?G.stream.match(/^\s*$/,!1)?b():b(z("stat"),Ae,ee(";"),V):v=="debugger"?b(ee(";")):v=="{"?b(z("}"),qe,Bt,V,X):v==";"?b():v=="if"?(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==V&&G.state.cc.pop()(),b(z("form"),Ze,fe,V,Sr)):v=="function"?b(Zt):v=="for"?b(z("form"),qe,Tr,fe,X,V):v=="class"||y&&P=="interface"?(G.marked="keyword",b(z("form",v=="class"?v:P),Vn,V)):v=="variable"?y&&P=="declare"?(G.marked="keyword",b(fe)):y&&(P=="module"||P=="enum"||P=="type")&&G.stream.match(/^\s*\w/,!1)?(G.marked="keyword",P=="enum"?b(Nn):P=="type"?b(Ir,ee("operator"),Me,ee(";")):b(z("form"),Et,ee("{"),z("}"),Bt,V,V)):y&&P=="namespace"?(G.marked="keyword",b(z("form"),pe,fe,V)):y&&P=="abstract"?(G.marked="keyword",b(fe)):b(z("stat"),Xe):v=="switch"?b(z("form"),Ze,ee("{"),z("}","switch"),qe,Bt,V,V,X):v=="case"?b(pe,ee(":")):v=="default"?b(ee(":")):v=="catch"?b(z("form"),ze,ve,fe,V,X):v=="export"?b(z("stat"),cr,V):v=="import"?b(z("stat"),dt,V):v=="async"?b(fe):P=="@"?b(pe,fe):K(z("stat"),pe,ee(";"),V)}function ve(v){if(v=="(")return b(_n,ee(")"))}function pe(v,P){return Je(v,P,!1)}function De(v,P){return Je(v,P,!0)}function Ze(v){return v!="("?K():b(z(")"),Ae,ee(")"),V)}function Je(v,P,ne){if(G.state.fatArrowAt==G.stream.start){var de=ne?nt:rn;if(v=="(")return b(ze,z(")"),ft(_n,")"),V,ee("=>"),de,X);if(v=="variable")return K(ze,Et,ee("=>"),de,X)}var Be=ne?Ke:He;return ye.hasOwnProperty(v)?b(Be):v=="function"?b(Zt,Be):v=="class"||y&&P=="interface"?(G.marked="keyword",b(z("form"),Xn,V)):v=="keyword c"||v=="async"?b(ne?De:pe):v=="("?b(z(")"),Ae,ee(")"),V,Be):v=="operator"||v=="spread"?b(ne?De:pe):v=="["?b(z("]"),rt,V,Be):v=="{"?On(pn,"}",null,Be):v=="quasi"?K(ot,Be):v=="new"?b(U(ne)):b()}function Ae(v){return v.match(/[;\}\)\],]/)?K():K(pe)}function He(v,P){return v==","?b(Ae):Ke(v,P,!1)}function Ke(v,P,ne){var de=ne==!1?He:Ke,Be=ne==!1?pe:De;if(v=="=>")return b(ze,ne?nt:rn,X);if(v=="operator")return/\+\+|--/.test(P)||y&&P=="!"?b(de):y&&P=="<"&&G.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?b(z(">"),ft(Me,">"),V,de):P=="?"?b(pe,ee(":"),Be):b(Be);if(v=="quasi")return K(ot,de);if(v!=";"){if(v=="(")return On(De,")","call",de);if(v==".")return b(It,de);if(v=="[")return b(z("]"),Ae,ee("]"),V,de);if(y&&P=="as")return G.marked="keyword",b(Me,de);if(v=="regexp")return G.state.lastType=G.marked="operator",G.stream.backUp(G.stream.pos-G.stream.start-1),b(Be)}}function ot(v,P){return v!="quasi"?K():P.slice(P.length-2)!="${"?b(ot):b(Ae,lt)}function lt(v){if(v=="}")return G.marked="string-2",G.state.tokenize=ae,b(ot)}function rn(v){return te(G.stream,G.state),K(v=="{"?fe:pe)}function nt(v){return te(G.stream,G.state),K(v=="{"?fe:De)}function U(v){return function(P){return P=="."?b(v?Q:he):P=="variable"&&y?b(Dn,v?Ke:He):K(v?De:pe)}}function he(v,P){if(P=="target")return G.marked="keyword",b(He)}function Q(v,P){if(P=="target")return G.marked="keyword",b(Ke)}function Xe(v){return v==":"?b(V,fe):K(He,ee(";"),V)}function It(v){if(v=="variable")return G.marked="property",b()}function pn(v,P){if(v=="async")return G.marked="property",b(pn);if(v=="variable"||G.style=="keyword"){if(G.marked="property",P=="get"||P=="set")return b(Kr);var ne;return y&&G.state.fatArrowAt==G.stream.start&&(ne=G.stream.match(/^\s*:\s*/,!1))&&(G.state.fatArrowAt=G.stream.pos+ne[0].length),b(Ut)}else{if(v=="number"||v=="string")return G.marked=S?"property":G.style+" property",b(Ut);if(v=="jsonld-keyword")return b(Ut);if(y&&Oe(P))return G.marked="keyword",b(pn);if(v=="[")return b(pe,xn,ee("]"),Ut);if(v=="spread")return b(De,Ut);if(P=="*")return G.marked="keyword",b(pn);if(v==":")return K(Ut)}}function Kr(v){return v!="variable"?K(Ut):(G.marked="property",b(Zt))}function Ut(v){if(v==":")return b(De);if(v=="(")return K(Zt)}function ft(v,P,ne){function de(Be,Qe){if(ne?ne.indexOf(Be)>-1:Be==","){var Se=G.state.lexical;return Se.info=="call"&&(Se.pos=(Se.pos||0)+1),b(function(Xt,Sn){return Xt==P||Sn==P?K():K(v)},de)}return Be==P||Qe==P?b():ne&&ne.indexOf(";")>-1?K(v):b(ee(P))}return function(Be,Qe){return Be==P||Qe==P?b():K(v,de)}}function On(v,P,ne){for(var de=3;de<arguments.length;de++)G.cc.push(arguments[de]);return b(z(P,ne),ft(v,P),V)}function Bt(v){return v=="}"?b():K(fe,Bt)}function xn(v,P){if(y){if(v==":")return b(Me);if(P=="?")return b(xn)}}function Ee(v,P){if(y&&(v==":"||P=="in"))return b(Me)}function $n(v){if(y&&v==":")return G.stream.match(/^\s*\w+\s+is\b/,!1)?b(pe,Lt,Me):b(Me)}function Lt(v,P){if(P=="is")return G.marked="keyword",b()}function Me(v,P){if(P=="keyof"||P=="typeof"||P=="infer"||P=="readonly")return G.marked="keyword",b(P=="typeof"?De:Me);if(v=="variable"||P=="void")return G.marked="type",b($t);if(P=="|"||P=="&")return b(Me);if(v=="string"||v=="number"||v=="atom")return b($t);if(v=="[")return b(z("]"),ft(Me,"]",","),V,$t);if(v=="{")return b(z("}"),Gn,V,$t);if(v=="(")return b(ft(Kn,")"),pt,$t);if(v=="<")return b(ft(Me,">"),Me);if(v=="quasi")return K(dn,$t)}function pt(v){if(v=="=>")return b(Me)}function Gn(v){return v.match(/[\}\)\]]/)?b():v==","||v==";"?b(Gn):K(wt,Gn)}function wt(v,P){if(v=="variable"||G.style=="keyword")return G.marked="property",b(wt);if(P=="?"||v=="number"||v=="string")return b(wt);if(v==":")return b(Me);if(v=="[")return b(ee("variable"),Ee,ee("]"),wt);if(v=="(")return K(Gt,wt);if(!v.match(/[;\}\)\],]/))return b()}function dn(v,P){return v!="quasi"?K():P.slice(P.length-2)!="${"?b(dn):b(Me,_t)}function _t(v){if(v=="}")return G.marked="string-2",G.state.tokenize=ae,b(dn)}function Kn(v,P){return v=="variable"&&G.stream.match(/^\s*[?:]/,!1)||P=="?"?b(Kn):v==":"?b(Me):v=="spread"?b(Kn):K(Me)}function $t(v,P){if(P=="<")return b(z(">"),ft(Me,">"),V,$t);if(P=="|"||v=="."||P=="&")return b(Me);if(v=="[")return b(Me,ee("]"),$t);if(P=="extends"||P=="implements")return G.marked="keyword",b(Me);if(P=="?")return b(Me,ee(":"),Me)}function Dn(v,P){if(P=="<")return b(z(">"),ft(Me,">"),V,$t)}function An(){return K(Me,xr)}function xr(v,P){if(P=="=")return b(Me)}function or(v,P){return P=="enum"?(G.marked="keyword",b(Nn)):K(Et,xn,mn,lr)}function Et(v,P){if(y&&Oe(P))return G.marked="keyword",b(Et);if(v=="variable")return J(P),b();if(v=="spread")return b(Et);if(v=="[")return On(ar,"]");if(v=="{")return On(_r,"}")}function _r(v,P){return v=="variable"&&!G.stream.match(/^\s*:/,!1)?(J(P),b(mn)):(v=="variable"&&(G.marked="property"),v=="spread"?b(Et):v=="}"?K():v=="["?b(pe,ee("]"),ee(":"),_r):b(ee(":"),Et,mn))}function ar(){return K(Et,mn)}function mn(v,P){if(P=="=")return b(De)}function lr(v){if(v==",")return b(or)}function Sr(v,P){if(v=="keyword b"&&P=="else")return b(z("form","else"),fe,V)}function Tr(v,P){if(P=="await")return b(Tr);if(v=="(")return b(z(")"),ur,V)}function ur(v){return v=="var"?b(or,Ln):v=="variable"?b(Ln):K(Ln)}function Ln(v,P){return v==")"?b():v==";"?b(Ln):P=="in"||P=="of"?(G.marked="keyword",b(pe,Ln)):K(pe,Ln)}function Zt(v,P){if(P=="*")return G.marked="keyword",b(Zt);if(v=="variable")return J(P),b(Zt);if(v=="(")return b(ze,z(")"),ft(_n,")"),V,$n,fe,X);if(y&&P=="<")return b(z(">"),ft(An,">"),V,Zt)}function Gt(v,P){if(P=="*")return G.marked="keyword",b(Gt);if(v=="variable")return J(P),b(Gt);if(v=="(")return b(ze,z(")"),ft(_n,")"),V,$n,X);if(y&&P=="<")return b(z(">"),ft(An,">"),V,Gt)}function Ir(v,P){if(v=="keyword"||v=="variable")return G.marked="type",b(Ir);if(P=="<")return b(z(">"),ft(An,">"),V)}function _n(v,P){return P=="@"&&b(pe,_n),v=="spread"?b(_n):y&&Oe(P)?(G.marked="keyword",b(_n)):y&&v=="this"?b(xn,mn):K(Et,xn,mn)}function Xn(v,P){return v=="variable"?Vn(v,P):sn(v,P)}function Vn(v,P){if(v=="variable")return J(P),b(sn)}function sn(v,P){if(P=="<")return b(z(">"),ft(An,">"),V,sn);if(P=="extends"||P=="implements"||y&&v==",")return P=="implements"&&(G.marked="keyword"),b(y?Me:pe,sn);if(v=="{")return b(z("}"),on,V)}function on(v,P){if(v=="async"||v=="variable"&&(P=="static"||P=="get"||P=="set"||y&&Oe(P))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return G.marked="keyword",b(on);if(v=="variable"||G.style=="keyword")return G.marked="property",b(Kt,on);if(v=="number"||v=="string")return b(Kt,on);if(v=="[")return b(pe,xn,ee("]"),Kt,on);if(P=="*")return G.marked="keyword",b(on);if(y&&v=="(")return K(Gt,on);if(v==";"||v==",")return b(on);if(v=="}")return b();if(P=="@")return b(pe,on)}function Kt(v,P){if(P=="!"||P=="?")return b(Kt);if(v==":")return b(Me,mn);if(P=="=")return b(De);var ne=G.state.lexical.prev,de=ne&&ne.info=="interface";return K(de?Gt:Zt)}function cr(v,P){return P=="*"?(G.marked="keyword",b(Qt,ee(";"))):P=="default"?(G.marked="keyword",b(pe,ee(";"))):v=="{"?b(ft(Xr,"}"),Qt,ee(";")):K(fe)}function Xr(v,P){if(P=="as")return G.marked="keyword",b(ee("variable"));if(v=="variable")return K(De,Xr)}function dt(v){return v=="string"?b():v=="("?K(pe):v=="."?K(He):K(Ce,En,Qt)}function Ce(v,P){return v=="{"?On(Ce,"}"):(v=="variable"&&J(P),P=="*"&&(G.marked="keyword"),b(Vr))}function En(v){if(v==",")return b(Ce,En)}function Vr(v,P){if(P=="as")return G.marked="keyword",b(Ce)}function Qt(v,P){if(P=="from")return G.marked="keyword",b(pe)}function rt(v){return v=="]"?b():K(ft(De,"]"))}function Nn(){return K(z("form"),Et,ee("{"),z("}"),ft(fr,"}"),V,V)}function fr(){return K(Et,mn)}function Yr(v,P){return v.lastType=="operator"||v.lastType==","||_.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function ce(v,P,ne){return P.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-(ne||0)))}return{startState:function(v){var P={tokenize:M,lastType:"sof",cc:[],lexical:new ge((v||0)-k,0,"block",!1),localVars:h.localVars,context:h.localVars&&new Ne(null,null,!1),indented:v||0};return h.globalVars&&typeof h.globalVars=="object"&&(P.globalVars=h.globalVars),P},token:function(v,P){if(v.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=v.indentation(),te(v,P)),P.tokenize!=$&&v.eatSpace())return null;var ne=P.tokenize(v,P);return H=="comment"?ne:(P.lastType=H=="operator"&&(O=="++"||O=="--")?"incdec":H,Te(P,ne,H,O,v))},indent:function(v,P){if(v.tokenize==$||v.tokenize==ae)return l.Pass;if(v.tokenize!=M)return 0;var ne=P&&P.charAt(0),de=v.lexical,Be;if(!/^\s*else\b/.test(P))for(var Qe=v.cc.length-1;Qe>=0;--Qe){var Se=v.cc[Qe];if(Se==V)de=de.prev;else if(Se!=Sr&&Se!=X)break}for(;(de.type=="stat"||de.type=="form")&&(ne=="}"||(Be=v.cc[v.cc.length-1])&&(Be==He||Be==Ke)&&!/^[,\.=+\-*:?[\(]/.test(P));)de=de.prev;I&&de.type==")"&&de.prev.type=="stat"&&(de=de.prev);var Xt=de.type,Sn=ne==Xt;return Xt=="vardef"?de.indented+(v.lastType=="operator"||v.lastType==","?de.info.length+1:0):Xt=="form"&&ne=="{"?de.indented:Xt=="form"?de.indented+k:Xt=="stat"?de.indented+(Yr(v,P)?I||k:0):de.info=="switch"&&!Sn&&h.doubleIndentSwitch!=!1?de.indented+(/^(?:case|default)\b/.test(P)?k:2*k):de.align?de.column+(Sn?0:1):de.indented+(Sn?0:k)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",blockCommentContinue:w?null:" * ",lineComment:w?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:w?"json":"javascript",jsonldMode:S,jsonMode:w,expressionAllowed:ce,skipExpression:function(v){Te(v,"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})})}()),Jc.exports}z1();var Qc={exports:{}},e1;function q1(){return e1||(e1=1,function(n,o){(function(l){l(wn())})(function(l){l.defineMode("css",function(ge,ke){var Te=ke.inline;ke.propertyKeywords||(ke=l.resolveMode("text/css"));var G=ge.indentUnit,K=ke.tokenHooks,b=ke.documentTypes||{},se=ke.mediaTypes||{},J=ke.mediaFeatures||{},le=ke.mediaValueKeywords||{},Oe=ke.propertyKeywords||{},Ne=ke.nonStandardPropertyKeywords||{},Fe=ke.fontProperties||{},tt=ke.counterDescriptors||{},ze=ke.colorKeywords||{},qe=ke.valueKeywords||{},X=ke.allowNested,z=ke.lineComment,V=ke.supportsAtComponent===!0,ee=ge.highlightNonStandardPropertyKeywords!==!1,fe,ve;function pe(U,he){return fe=he,U}function De(U,he){var Q=U.next();if(K[Q]){var Xe=K[Q](U,he);if(Xe!==!1)return Xe}if(Q=="@")return U.eatWhile(/[\w\\\-]/),pe("def",U.current());if(Q=="="||(Q=="~"||Q=="|")&&U.eat("="))return pe(null,"compare");if(Q=='"'||Q=="'")return he.tokenize=Ze(Q),he.tokenize(U,he);if(Q=="#")return U.eatWhile(/[\w\\\-]/),pe("atom","hash");if(Q=="!")return U.match(/^\s*\w*/),pe("keyword","important");if(/\d/.test(Q)||Q=="."&&U.eat(/\d/))return U.eatWhile(/[\w.%]/),pe("number","unit");if(Q==="-"){if(/[\d.]/.test(U.peek()))return U.eatWhile(/[\w.%]/),pe("number","unit");if(U.match(/^-[\w\\\-]*/))return U.eatWhile(/[\w\\\-]/),U.match(/^\s*:/,!1)?pe("variable-2","variable-definition"):pe("variable-2","variable");if(U.match(/^\w+-/))return pe("meta","meta")}else return/[,+>*\/]/.test(Q)?pe(null,"select-op"):Q=="."&&U.match(/^-?[_a-z][_a-z0-9-]*/i)?pe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(Q)?pe(null,Q):U.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(U.current())&&(he.tokenize=Je),pe("variable callee","variable")):/[\w\\\-]/.test(Q)?(U.eatWhile(/[\w\\\-]/),pe("property","word")):pe(null,null)}function Ze(U){return function(he,Q){for(var Xe=!1,It;(It=he.next())!=null;){if(It==U&&!Xe){U==")"&&he.backUp(1);break}Xe=!Xe&&It=="\\"}return(It==U||!Xe&&U!=")")&&(Q.tokenize=null),pe("string","string")}}function Je(U,he){return U.next(),U.match(/^\s*[\"\')]/,!1)?he.tokenize=null:he.tokenize=Ze(")"),pe(null,"(")}function Ae(U,he,Q){this.type=U,this.indent=he,this.prev=Q}function He(U,he,Q,Xe){return U.context=new Ae(Q,he.indentation()+(Xe===!1?0:G),U.context),Q}function Ke(U){return U.context.prev&&(U.context=U.context.prev),U.context.type}function ot(U,he,Q){return nt[Q.context.type](U,he,Q)}function lt(U,he,Q,Xe){for(var It=Xe||1;It>0;It--)Q.context=Q.context.prev;return ot(U,he,Q)}function rn(U){var he=U.current().toLowerCase();qe.hasOwnProperty(he)?ve="atom":ze.hasOwnProperty(he)?ve="keyword":ve="variable"}var nt={};return nt.top=function(U,he,Q){if(U=="{")return He(Q,he,"block");if(U=="}"&&Q.context.prev)return Ke(Q);if(V&&/@component/i.test(U))return He(Q,he,"atComponentBlock");if(/^@(-moz-)?document$/i.test(U))return He(Q,he,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(U))return He(Q,he,"atBlock");if(/^@(font-face|counter-style)/i.test(U))return Q.stateArg=U,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(U))return"keyframes";if(U&&U.charAt(0)=="@")return He(Q,he,"at");if(U=="hash")ve="builtin";else if(U=="word")ve="tag";else{if(U=="variable-definition")return"maybeprop";if(U=="interpolation")return He(Q,he,"interpolation");if(U==":")return"pseudo";if(X&&U=="(")return He(Q,he,"parens")}return Q.context.type},nt.block=function(U,he,Q){if(U=="word"){var Xe=he.current().toLowerCase();return Oe.hasOwnProperty(Xe)?(ve="property","maybeprop"):Ne.hasOwnProperty(Xe)?(ve=ee?"string-2":"property","maybeprop"):X?(ve=he.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ve+=" error","maybeprop")}else return U=="meta"?"block":!X&&(U=="hash"||U=="qualifier")?(ve="error","block"):nt.top(U,he,Q)},nt.maybeprop=function(U,he,Q){return U==":"?He(Q,he,"prop"):ot(U,he,Q)},nt.prop=function(U,he,Q){if(U==";")return Ke(Q);if(U=="{"&&X)return He(Q,he,"propBlock");if(U=="}"||U=="{")return lt(U,he,Q);if(U=="(")return He(Q,he,"parens");if(U=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(he.current()))ve+=" error";else if(U=="word")rn(he);else if(U=="interpolation")return He(Q,he,"interpolation");return"prop"},nt.propBlock=function(U,he,Q){return U=="}"?Ke(Q):U=="word"?(ve="property","maybeprop"):Q.context.type},nt.parens=function(U,he,Q){return U=="{"||U=="}"?lt(U,he,Q):U==")"?Ke(Q):U=="("?He(Q,he,"parens"):U=="interpolation"?He(Q,he,"interpolation"):(U=="word"&&rn(he),"parens")},nt.pseudo=function(U,he,Q){return U=="meta"?"pseudo":U=="word"?(ve="variable-3",Q.context.type):ot(U,he,Q)},nt.documentTypes=function(U,he,Q){return U=="word"&&b.hasOwnProperty(he.current())?(ve="tag",Q.context.type):nt.atBlock(U,he,Q)},nt.atBlock=function(U,he,Q){if(U=="(")return He(Q,he,"atBlock_parens");if(U=="}"||U==";")return lt(U,he,Q);if(U=="{")return Ke(Q)&&He(Q,he,X?"block":"top");if(U=="interpolation")return He(Q,he,"interpolation");if(U=="word"){var Xe=he.current().toLowerCase();Xe=="only"||Xe=="not"||Xe=="and"||Xe=="or"?ve="keyword":se.hasOwnProperty(Xe)?ve="attribute":J.hasOwnProperty(Xe)?ve="property":le.hasOwnProperty(Xe)?ve="keyword":Oe.hasOwnProperty(Xe)?ve="property":Ne.hasOwnProperty(Xe)?ve=ee?"string-2":"property":qe.hasOwnProperty(Xe)?ve="atom":ze.hasOwnProperty(Xe)?ve="keyword":ve="error"}return Q.context.type},nt.atComponentBlock=function(U,he,Q){return U=="}"?lt(U,he,Q):U=="{"?Ke(Q)&&He(Q,he,X?"block":"top",!1):(U=="word"&&(ve="error"),Q.context.type)},nt.atBlock_parens=function(U,he,Q){return U==")"?Ke(Q):U=="{"||U=="}"?lt(U,he,Q,2):nt.atBlock(U,he,Q)},nt.restricted_atBlock_before=function(U,he,Q){return U=="{"?He(Q,he,"restricted_atBlock"):U=="word"&&Q.stateArg=="@counter-style"?(ve="variable","restricted_atBlock_before"):ot(U,he,Q)},nt.restricted_atBlock=function(U,he,Q){return U=="}"?(Q.stateArg=null,Ke(Q)):U=="word"?(Q.stateArg=="@font-face"&&!Fe.hasOwnProperty(he.current().toLowerCase())||Q.stateArg=="@counter-style"&&!tt.hasOwnProperty(he.current().toLowerCase())?ve="error":ve="property","maybeprop"):"restricted_atBlock"},nt.keyframes=function(U,he,Q){return U=="word"?(ve="variable","keyframes"):U=="{"?He(Q,he,"top"):ot(U,he,Q)},nt.at=function(U,he,Q){return U==";"?Ke(Q):U=="{"||U=="}"?lt(U,he,Q):(U=="word"?ve="tag":U=="hash"&&(ve="builtin"),"at")},nt.interpolation=function(U,he,Q){return U=="}"?Ke(Q):U=="{"||U==";"?lt(U,he,Q):(U=="word"?ve="variable":U!="variable"&&U!="("&&U!=")"&&(ve="error"),"interpolation")},{startState:function(U){return{tokenize:null,state:Te?"block":"top",stateArg:null,context:new Ae(Te?"block":"top",U||0,null)}},token:function(U,he){if(!he.tokenize&&U.eatSpace())return null;var Q=(he.tokenize||De)(U,he);return Q&&typeof Q=="object"&&(fe=Q[1],Q=Q[0]),ve=Q,fe!="comment"&&(he.state=nt[he.state](fe,U,he)),ve},indent:function(U,he){var Q=U.context,Xe=he&&he.charAt(0),It=Q.indent;return Q.type=="prop"&&(Xe=="}"||Xe==")")&&(Q=Q.prev),Q.prev&&(Xe=="}"&&(Q.type=="block"||Q.type=="top"||Q.type=="interpolation"||Q.type=="restricted_atBlock")?(Q=Q.prev,It=Q.indent):(Xe==")"&&(Q.type=="parens"||Q.type=="atBlock_parens")||Xe=="{"&&(Q.type=="at"||Q.type=="atBlock"))&&(It=Math.max(0,Q.indent-G))),It},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:z,fold:"brace"}});function c(ge){for(var ke={},Te=0;Te<ge.length;++Te)ke[ge[Te].toLowerCase()]=!0;return ke}var h=["domain","regexp","url","url-prefix"],k=c(h),I=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],S=c(I),w=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],x=c(w),y=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],E=c(y),L=["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"],_=c(L),F=["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"],D=c(F),H=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],O=c(H),T=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],M=c(T),B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],$=c(B),ae=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ue=c(ae),te=h.concat(I).concat(w).concat(y).concat(L).concat(F).concat(B).concat(ae);l.registerHelper("hintWords","css",te);function ye(ge,ke){for(var Te=!1,G;(G=ge.next())!=null;){if(Te&&G=="/"){ke.tokenize=null;break}Te=G=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:k,mediaTypes:S,mediaFeatures:x,mediaValueKeywords:E,propertyKeywords:_,nonStandardPropertyKeywords:D,fontProperties:O,counterDescriptors:M,colorKeywords:$,valueKeywords:ue,tokenHooks:{"/":function(ge,ke){return ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:S,mediaFeatures:x,mediaValueKeywords:E,propertyKeywords:_,nonStandardPropertyKeywords:D,colorKeywords:$,valueKeywords:ue,fontProperties:O,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ge,ke){return ge.eat("/")?(ge.skipToEnd(),["comment","comment"]):ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):["operator","operator"]},":":function(ge){return ge.match(/^\s*\{/,!1)?[null,null]:!1},$:function(ge){return ge.match(/^[\w-]+/),ge.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(ge){return ge.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:S,mediaFeatures:x,mediaValueKeywords:E,propertyKeywords:_,nonStandardPropertyKeywords:D,colorKeywords:$,valueKeywords:ue,fontProperties:O,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ge,ke){return ge.eat("/")?(ge.skipToEnd(),["comment","comment"]):ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):["operator","operator"]},"@":function(ge){return ge.eat("{")?[null,"interpolation"]:ge.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(ge.eatWhile(/[\w\\\-]/),ge.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:k,mediaTypes:S,mediaFeatures:x,propertyKeywords:_,nonStandardPropertyKeywords:D,fontProperties:O,counterDescriptors:M,colorKeywords:$,valueKeywords:ue,supportsAtComponent:!0,tokenHooks:{"/":function(ge,ke){return ge.eat("*")?(ke.tokenize=ye,ye(ge,ke)):!1}},name:"css",helperType:"gss"})})}()),Qc.exports}q1();var t1={exports:{}},n1;function Jd(){return n1||(n1=1,function(n,o){(function(l){l(wn())})(function(l){var c={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(k,I){var S=k.indentUnit,w={},x=I.htmlMode?c:h;for(var y in x)w[y]=x[y];for(var y in I)w[y]=I[y];var E,L;function _(b,se){function J(Ne){return se.tokenize=Ne,Ne(b,se)}var le=b.next();if(le=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?J(H("atom","]]>")):null:b.match("--")?J(H("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),J(O(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),se.tokenize=H("meta","?>"),"meta"):(E=b.eat("/")?"closeTag":"openTag",se.tokenize=F,"tag bracket");if(le=="&"){var Oe;return b.eat("#")?b.eat("x")?Oe=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):Oe=b.eatWhile(/[\d]/)&&b.eat(";"):Oe=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),Oe?"atom":"error"}else return b.eatWhile(/[^&<]/),null}_.isInText=!0;function F(b,se){var J=b.next();if(J==">"||J=="/"&&b.eat(">"))return se.tokenize=_,E=J==">"?"endTag":"selfcloseTag","tag bracket";if(J=="=")return E="equals",null;if(J=="<"){se.tokenize=_,se.state=ae,se.tagName=se.tagStart=null;var le=se.tokenize(b,se);return le?le+" tag error":"tag error"}else return/[\'\"]/.test(J)?(se.tokenize=D(J),se.stringStartCol=b.column(),se.tokenize(b,se)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function D(b){var se=function(J,le){for(;!J.eol();)if(J.next()==b){le.tokenize=F;break}return"string"};return se.isInAttribute=!0,se}function H(b,se){return function(J,le){for(;!J.eol();){if(J.match(se)){le.tokenize=_;break}J.next()}return b}}function O(b){return function(se,J){for(var le;(le=se.next())!=null;){if(le=="<")return J.tokenize=O(b+1),J.tokenize(se,J);if(le==">")if(b==1){J.tokenize=_;break}else return J.tokenize=O(b-1),J.tokenize(se,J)}return"meta"}}function T(b){return b&&b.toLowerCase()}function M(b,se,J){this.prev=b.context,this.tagName=se||"",this.indent=b.indented,this.startOfLine=J,(w.doNotIndent.hasOwnProperty(se)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function B(b){b.context&&(b.context=b.context.prev)}function $(b,se){for(var J;;){if(!b.context||(J=b.context.tagName,!w.contextGrabbers.hasOwnProperty(T(J))||!w.contextGrabbers[T(J)].hasOwnProperty(T(se))))return;B(b)}}function ae(b,se,J){return b=="openTag"?(J.tagStart=se.column(),ue):b=="closeTag"?te:ae}function ue(b,se,J){return b=="word"?(J.tagName=se.current(),L="tag",ke):w.allowMissingTagName&&b=="endTag"?(L="tag bracket",ke(b,se,J)):(L="error",ue)}function te(b,se,J){if(b=="word"){var le=se.current();return J.context&&J.context.tagName!=le&&w.implicitlyClosed.hasOwnProperty(T(J.context.tagName))&&B(J),J.context&&J.context.tagName==le||w.matchClosing===!1?(L="tag",ye):(L="tag error",ge)}else return w.allowMissingTagName&&b=="endTag"?(L="tag bracket",ye(b,se,J)):(L="error",ge)}function ye(b,se,J){return b!="endTag"?(L="error",ye):(B(J),ae)}function ge(b,se,J){return L="error",ye(b,se,J)}function ke(b,se,J){if(b=="word")return L="attribute",Te;if(b=="endTag"||b=="selfcloseTag"){var le=J.tagName,Oe=J.tagStart;return J.tagName=J.tagStart=null,b=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(T(le))?$(J,le):($(J,le),J.context=new M(J,le,Oe==J.indented)),ae}return L="error",ke}function Te(b,se,J){return b=="equals"?G:(w.allowMissing||(L="error"),ke(b,se,J))}function G(b,se,J){return b=="string"?K:b=="word"&&w.allowUnquoted?(L="string",ke):(L="error",ke(b,se,J))}function K(b,se,J){return b=="string"?K:ke(b,se,J)}return{startState:function(b){var se={tokenize:_,state:ae,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(se.baseIndent=b),se},token:function(b,se){if(!se.tagName&&b.sol()&&(se.indented=b.indentation()),b.eatSpace())return null;E=null;var J=se.tokenize(b,se);return(J||E)&&J!="comment"&&(L=null,se.state=se.state(E||J,b,se),L&&(J=L=="error"?J+" error":L)),J},indent:function(b,se,J){var le=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+S;if(le&&le.noIndent)return l.Pass;if(b.tokenize!=F&&b.tokenize!=_)return J?J.match(/^(\s*)/)[0].length:0;if(b.tagName)return w.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+S*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(se))return 0;var Oe=se&&/^<(\/)?([\w_:\.-]*)/.exec(se);if(Oe&&Oe[1])for(;le;)if(le.tagName==Oe[2]){le=le.prev;break}else if(w.implicitlyClosed.hasOwnProperty(T(le.tagName)))le=le.prev;else break;else if(Oe)for(;le;){var Ne=w.contextGrabbers[T(le.tagName)];if(Ne&&Ne.hasOwnProperty(T(Oe[2])))le=le.prev;else break}for(;le&&le.prev&&!le.startOfLine;)le=le.prev;return le?le.indent+S:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(b){b.state==G&&(b.state=ke)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var se=[],J=b.context;J;J=J.prev)se.push(J.tagName);return se.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),t1.exports}(function(n,o){(function(l){l(wn(),Jd(),z1(),q1())})(function(l){var c={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(E,L,_){var F=E.current(),D=F.search(L);return D>-1?E.backUp(F.length-D):F.match(/<\/?$/)&&(E.backUp(F.length),E.match(L,!1)||E.match(F)),_}var k={};function I(E){var L=k[E];return L||(k[E]=new RegExp("\\s+"+E+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function S(E,L){var _=E.match(I(L));return _?/^\s*(.*?)\s*$/.exec(_[2])[1]:""}function w(E,L){return new RegExp((L?"^":"")+"</\\s*"+E+"\\s*>","i")}function x(E,L){for(var _ in E)for(var F=L[_]||(L[_]=[]),D=E[_],H=D.length-1;H>=0;H--)F.unshift(D[H])}function y(E,L){for(var _=0;_<E.length;_++){var F=E[_];if(!F[0]||F[1].test(S(L,F[0])))return F[2]}}l.defineMode("htmlmixed",function(E,L){var _=l.getMode(E,{name:"xml",htmlMode:!0,multilineTagIndentFactor:L.multilineTagIndentFactor,multilineTagIndentPastTag:L.multilineTagIndentPastTag,allowMissingTagName:L.allowMissingTagName}),F={},D=L&&L.tags,H=L&&L.scriptTypes;if(x(c,F),D&&x(D,F),H)for(var O=H.length-1;O>=0;O--)F.script.unshift(["type",H[O].matches,H[O].mode]);function T(M,B){var $=_.token(M,B.htmlState),ae=/\btag\b/.test($),ue;if(ae&&!/[<>\s\/]/.test(M.current())&&(ue=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&F.hasOwnProperty(ue))B.inTag=ue+" ";else if(B.inTag&&ae&&/>$/.test(M.current())){var te=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var ye=M.current()==">"&&y(F[te[1]],te[2]),ge=l.getMode(E,ye),ke=w(te[1],!0),Te=w(te[1],!1);B.token=function(G,K){return G.match(ke,!1)?(K.token=T,K.localState=K.localMode=null,null):h(G,Te,K.localMode.token(G,K.localState))},B.localMode=ge,B.localState=l.startState(ge,_.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=M.current(),M.eol()&&(B.inTag+=" "));return $}return{startState:function(){var M=l.startState(_);return{token:T,inTag:null,localMode:null,localState:null,htmlState:M}},copyState:function(M){var B;return M.localState&&(B=l.copyState(M.localMode,M.localState)),{token:M.token,inTag:M.inTag,localMode:M.localMode,localState:B,htmlState:l.copyState(_,M.htmlState)}},token:function(M,B){return B.token(M,B)},indent:function(M,B,$){return!M.localMode||/^\s*<\//.test(B)?_.indent(M.htmlState,B,$):M.localMode.indent?M.localMode.indent(M.localState,B,$):l.Pass},innerMode:function(M){return{state:M.localState||M.htmlState,mode:M.localMode||_}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(n,o){(function(l){l(wn())})(function(l){var c={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},h=l.Pos;l.defineOption("autoCloseBrackets",!1,function(O,T,M){M&&M!=l.Init&&(O.removeKeyMap(I),O.state.closeBrackets=null),T&&(S(k(T,"pairs")),O.state.closeBrackets=T,O.addKeyMap(I))});function k(O,T){return T=="pairs"&&typeof O=="string"?O:typeof O=="object"&&O[T]!=null?O[T]:c[T]}var I={Backspace:y,Enter:E};function S(O){for(var T=0;T<O.length;T++){var M=O.charAt(T),B="'"+M+"'";I[B]||(I[B]=w(M))}}S(c.pairs+"`");function w(O){return function(T){return F(T,O)}}function x(O){var T=O.state.closeBrackets;if(!T||T.override)return T;var M=O.getModeAt(O.getCursor());return M.closeBrackets||T}function y(O){var T=x(O);if(!T||O.getOption("disableInput"))return l.Pass;for(var M=k(T,"pairs"),B=O.listSelections(),$=0;$<B.length;$++){if(!B[$].empty())return l.Pass;var ae=D(O,B[$].head);if(!ae||M.indexOf(ae)%2!=0)return l.Pass}for(var $=B.length-1;$>=0;$--){var ue=B[$].head;O.replaceRange("",h(ue.line,ue.ch-1),h(ue.line,ue.ch+1),"+delete")}}function E(O){var T=x(O),M=T&&k(T,"explode");if(!M||O.getOption("disableInput"))return l.Pass;for(var B=O.listSelections(),$=0;$<B.length;$++){if(!B[$].empty())return l.Pass;var ae=D(O,B[$].head);if(!ae||M.indexOf(ae)%2!=0)return l.Pass}O.operation(function(){var ue=O.lineSeparator()||`
|
||
`;O.replaceSelection(ue+ue,null),L(O,-1),B=O.listSelections();for(var te=0;te<B.length;te++){var ye=B[te].head.line;O.indentLine(ye,null,!0),O.indentLine(ye+1,null,!0)}})}function L(O,T){for(var M=[],B=O.listSelections(),$=0,ae=0;ae<B.length;ae++){var ue=B[ae];ue.head==O.getCursor()&&($=ae);var te=ue.head.ch||T>0?{line:ue.head.line,ch:ue.head.ch+T}:{line:ue.head.line-1};M.push({anchor:te,head:te})}O.setSelections(M,$)}function _(O){var T=l.cmpPos(O.anchor,O.head)>0;return{anchor:new h(O.anchor.line,O.anchor.ch+(T?-1:1)),head:new h(O.head.line,O.head.ch+(T?1:-1))}}function F(O,T){var M=x(O);if(!M||O.getOption("disableInput"))return l.Pass;var B=k(M,"pairs"),$=B.indexOf(T);if($==-1)return l.Pass;for(var ae=k(M,"closeBefore"),ue=k(M,"triples"),te=B.charAt($+1)==T,ye=O.listSelections(),ge=$%2==0,ke,Te=0;Te<ye.length;Te++){var G=ye[Te],K=G.head,b,se=O.getRange(K,h(K.line,K.ch+1));if(ge&&!G.empty())b="surround";else if((te||!ge)&&se==T)te&&H(O,K)?b="both":ue.indexOf(T)>=0&&O.getRange(K,h(K.line,K.ch+3))==T+T+T?b="skipThree":b="skip";else if(te&&K.ch>1&&ue.indexOf(T)>=0&&O.getRange(h(K.line,K.ch-2),K)==T+T){if(K.ch>2&&/\bstring/.test(O.getTokenTypeAt(h(K.line,K.ch-2))))return l.Pass;b="addFour"}else if(te){var J=K.ch==0?" ":O.getRange(h(K.line,K.ch-1),K);if(!l.isWordChar(se)&&J!=T&&!l.isWordChar(J))b="both";else return l.Pass}else if(ge&&(se.length===0||/\s/.test(se)||ae.indexOf(se)>-1))b="both";else return l.Pass;if(!ke)ke=b;else if(ke!=b)return l.Pass}var le=$%2?B.charAt($-1):T,Oe=$%2?T:B.charAt($+1);O.operation(function(){if(ke=="skip")L(O,1);else if(ke=="skipThree")L(O,3);else if(ke=="surround"){for(var Ne=O.getSelections(),Fe=0;Fe<Ne.length;Fe++)Ne[Fe]=le+Ne[Fe]+Oe;O.replaceSelections(Ne,"around"),Ne=O.listSelections().slice();for(var Fe=0;Fe<Ne.length;Fe++)Ne[Fe]=_(Ne[Fe]);O.setSelections(Ne)}else ke=="both"?(O.replaceSelection(le+Oe,null),O.triggerElectric(le+Oe),L(O,-1)):ke=="addFour"&&(O.replaceSelection(le+le+le+le,"before"),L(O,1))})}function D(O,T){var M=O.getRange(h(T.line,T.ch-1),h(T.line,T.ch+1));return M.length==2?M:null}function H(O,T){var M=O.getTokenAt(h(T.line,T.ch+1));return/\bstring/.test(M.type)&&M.start==T.ch&&(T.ch==0||!/\bstring/.test(O.getTokenTypeAt(T)))}})})();var r1={exports:{}},i1;function Zd(){return i1||(i1=1,function(n,o){(function(l){l(wn())})(function(l){var c=l.Pos;function h(T,M){return T.line-M.line||T.ch-M.ch}var k="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",I=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+k+"]["+I+"]*)","g");function w(T,M,B,$){this.line=M,this.ch=B,this.cm=T,this.text=T.getLine(M),this.min=$?Math.max($.from,T.firstLine()):T.firstLine(),this.max=$?Math.min($.to-1,T.lastLine()):T.lastLine()}function x(T,M){var B=T.cm.getTokenTypeAt(c(T.line,M));return B&&/\btag\b/.test(B)}function y(T){if(!(T.line>=T.max))return T.ch=0,T.text=T.cm.getLine(++T.line),!0}function E(T){if(!(T.line<=T.min))return T.text=T.cm.getLine(--T.line),T.ch=T.text.length,!0}function L(T){for(;;){var M=T.text.indexOf(">",T.ch);if(M==-1){if(y(T))continue;return}if(!x(T,M+1)){T.ch=M+1;continue}var B=T.text.lastIndexOf("/",M),$=B>-1&&!/\S/.test(T.text.slice(B+1,M));return T.ch=M+1,$?"selfClose":"regular"}}function _(T){for(;;){var M=T.ch?T.text.lastIndexOf("<",T.ch-1):-1;if(M==-1){if(E(T))continue;return}if(!x(T,M+1)){T.ch=M;continue}S.lastIndex=M,T.ch=M;var B=S.exec(T.text);if(B&&B.index==M)return B}}function F(T){for(;;){S.lastIndex=T.ch;var M=S.exec(T.text);if(!M){if(y(T))continue;return}if(!x(T,M.index+1)){T.ch=M.index+1;continue}return T.ch=M.index+M[0].length,M}}function D(T){for(;;){var M=T.ch?T.text.lastIndexOf(">",T.ch-1):-1;if(M==-1){if(E(T))continue;return}if(!x(T,M+1)){T.ch=M;continue}var B=T.text.lastIndexOf("/",M),$=B>-1&&!/\S/.test(T.text.slice(B+1,M));return T.ch=M+1,$?"selfClose":"regular"}}function H(T,M){for(var B=[];;){var $=F(T),ae,ue=T.line,te=T.ch-($?$[0].length:0);if(!$||!(ae=L(T)))return;if(ae!="selfClose")if($[1]){for(var ye=B.length-1;ye>=0;--ye)if(B[ye]==$[2]){B.length=ye;break}if(ye<0&&(!M||M==$[2]))return{tag:$[2],from:c(ue,te),to:c(T.line,T.ch)}}else B.push($[2])}}function O(T,M){for(var B=[];;){var $=D(T);if(!$)return;if($=="selfClose"){_(T);continue}var ae=T.line,ue=T.ch,te=_(T);if(!te)return;if(te[1])B.push(te[2]);else{for(var ye=B.length-1;ye>=0;--ye)if(B[ye]==te[2]){B.length=ye;break}if(ye<0&&(!M||M==te[2]))return{tag:te[2],from:c(T.line,T.ch),to:c(ae,ue)}}}}l.registerHelper("fold","xml",function(T,M){for(var B=new w(T,M.line,0);;){var $=F(B);if(!$||B.line!=M.line)return;var ae=L(B);if(!ae)return;if(!$[1]&&ae!="selfClose"){var ue=c(B.line,B.ch),te=H(B,$[2]);return te&&h(te.from,ue)>0?{from:ue,to:te.from}:null}}}),l.findMatchingTag=function(T,M,B){var $=new w(T,M.line,M.ch,B);if(!($.text.indexOf(">")==-1&&$.text.indexOf("<")==-1)){var ae=L($),ue=ae&&c($.line,$.ch),te=ae&&_($);if(!(!ae||!te||h($,M)>0)){var ye={from:c($.line,$.ch),to:ue,tag:te[2]};return ae=="selfClose"?{open:ye,close:null,at:"open"}:te[1]?{open:O($,te[2]),close:ye,at:"close"}:($=new w(T,ue.line,ue.ch,B),{open:ye,close:H($,te[2]),at:"open"})}}},l.findEnclosingTag=function(T,M,B,$){for(var ae=new w(T,M.line,M.ch,B);;){var ue=O(ae,$);if(!ue)break;var te=new w(T,M.line,M.ch,B),ye=H(te,ue.tag);if(ye)return{open:ue,close:ye}}},l.scanForClosingTag=function(T,M,B,$){var ae=new w(T,M.line,M.ch,$?{from:0,to:$}:null);return H(ae,B)}})}()),r1.exports}(function(n,o){(function(l){l(wn(),Zd())})(function(l){l.defineOption("autoCloseTags",!1,function(y,E,L){if(L!=l.Init&&L&&y.removeKeyMap("autoCloseTags"),!!E){var _={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(_["'/'"]=function(F){return S(F)}),(typeof E!="object"||E.whenOpening!==!1)&&(_["'>'"]=function(F){return k(F)}),y.addKeyMap(_)}});var c=["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 k(y){if(y.getOption("disableInput"))return l.Pass;for(var E=y.listSelections(),L=[],_=y.getOption("autoCloseTags"),F=0;F<E.length;F++){if(!E[F].empty())return l.Pass;var D=E[F].head,H=y.getTokenAt(D),O=l.innerMode(y.getMode(),H.state),T=O.state,M=O.mode.xmlCurrentTag&&O.mode.xmlCurrentTag(T),B=M&&M.name;if(!B)return l.Pass;var $=O.mode.configuration=="html",ae=typeof _=="object"&&_.dontCloseTags||$&&c,ue=typeof _=="object"&&_.indentTags||$&&h;H.end>D.ch&&(B=B.slice(0,B.length-H.end+D.ch));var te=B.toLowerCase();if(!B||H.type=="string"&&(H.end!=D.ch||!/[\"\']/.test(H.string.charAt(H.string.length-1))||H.string.length==1)||H.type=="tag"&&M.close||H.string.indexOf("/")==D.ch-H.start-1||ae&&w(ae,te)>-1||x(y,O.mode.xmlCurrentContext&&O.mode.xmlCurrentContext(T)||[],B,D,!0))return l.Pass;var ye=typeof _=="object"&&_.emptyTags;if(ye&&w(ye,B)>-1){L[F]={text:"/>",newPos:l.Pos(D.line,D.ch+2)};continue}var ge=ue&&w(ue,te)>-1;L[F]={indent:ge,text:">"+(ge?`
|
||
|
||
`:"")+"</"+B+">",newPos:ge?l.Pos(D.line+1,0):l.Pos(D.line,D.ch+1)}}for(var ke=typeof _=="object"&&_.dontIndentOnAutoClose,F=E.length-1;F>=0;F--){var Te=L[F];y.replaceRange(Te.text,E[F].head,E[F].anchor,"+insert");var G=y.listSelections().slice(0);G[F]={head:Te.newPos,anchor:Te.newPos},y.setSelections(G),!ke&&Te.indent&&(y.indentLine(Te.newPos.line,null,!0),y.indentLine(Te.newPos.line+1,null,!0))}}function I(y,E){for(var L=y.listSelections(),_=[],F=E?"/":"</",D=y.getOption("autoCloseTags"),H=typeof D=="object"&&D.dontIndentOnSlash,O=0;O<L.length;O++){if(!L[O].empty())return l.Pass;var T=L[O].head,M=y.getTokenAt(T),B=l.innerMode(y.getMode(),M.state),$=B.state;if(E&&(M.type=="string"||M.string.charAt(0)!="<"||M.start!=T.ch-1))return l.Pass;var ae,ue=B.mode.name!="xml"&&y.getMode().name=="htmlmixed";if(ue&&B.mode.name=="javascript")ae=F+"script";else if(ue&&B.mode.name=="css")ae=F+"style";else{var te=B.mode.xmlCurrentContext&&B.mode.xmlCurrentContext($),ye=te.length?te[te.length-1]:"";if(!te||te.length&&x(y,te,ye,T))return l.Pass;ae=F+ye}y.getLine(T.line).charAt(M.end)!=">"&&(ae+=">"),_[O]=ae}if(y.replaceSelections(_),L=y.listSelections(),!H)for(var O=0;O<L.length;O++)(O==L.length-1||L[O].head.line<L[O+1].head.line)&&y.indentLine(L[O].head.line)}function S(y){return y.getOption("disableInput")?l.Pass:I(y,!0)}l.commands.closeTag=function(y){return I(y)};function w(y,E){if(y.indexOf)return y.indexOf(E);for(var L=0,_=y.length;L<_;++L)if(y[L]==E)return L;return-1}function x(y,E,L,_,F){if(!l.scanForClosingTag)return!1;var D=Math.min(y.lastLine()+1,_.line+500),H=l.scanForClosingTag(y,_,null,D);if(!H||H.tag!=L)return!1;for(var O=F?1:0,T=E.length-1;T>=0&&E[T]==L;T--)++O;_=H.to;for(var T=1;T<O;T++){var M=l.scanForClosingTag(y,_,null,D);if(!M||M.tag!=L)return!1;_=M.to}return!0}})})();(function(n,o){(function(l){l(wn())})(function(l){var c={},h=/[^\s\u00a0]/,k=l.Pos,I=l.cmpPos;function S(y){var E=y.search(h);return E==-1?0:E}l.commands.toggleComment=function(y){y.toggleComment()},l.defineExtension("toggleComment",function(y){y||(y=c);for(var E=this,L=1/0,_=this.listSelections(),F=null,D=_.length-1;D>=0;D--){var H=_[D].from(),O=_[D].to();H.line>=L||(O.line>=L&&(O=k(L,0)),L=H.line,F==null?E.uncomment(H,O,y)?F="un":(E.lineComment(H,O,y),F="line"):F=="un"?E.uncomment(H,O,y):E.lineComment(H,O,y))}});function w(y,E,L){return/\bstring\b/.test(y.getTokenTypeAt(k(E.line,0)))&&!/^[\'\"\`]/.test(L)}function x(y,E){var L=y.getMode();return L.useInnerComments===!1||!L.innerMode?L:y.getModeAt(E)}l.defineExtension("lineComment",function(y,E,L){L||(L=c);var _=this,F=x(_,y),D=_.getLine(y.line);if(!(D==null||w(_,y,D))){var H=L.lineComment||F.lineComment;if(!H){(L.blockCommentStart||F.blockCommentStart)&&(L.fullLines=!0,_.blockComment(y,E,L));return}var O=Math.min(E.ch!=0||E.line==y.line?E.line+1:E.line,_.lastLine()+1),T=L.padding==null?" ":L.padding,M=L.commentBlankLines||y.line==E.line;_.operation(function(){if(L.indent){for(var B=null,$=y.line;$<O;++$){var ae=_.getLine($),ue=ae.slice(0,S(ae));(B==null||B.length>ue.length)&&(B=ue)}for(var $=y.line;$<O;++$){var ae=_.getLine($),te=B.length;!M&&!h.test(ae)||(ae.slice(0,te)!=B&&(te=S(ae)),_.replaceRange(B+H+T,k($,0),k($,te)))}}else for(var $=y.line;$<O;++$)(M||h.test(_.getLine($)))&&_.replaceRange(H+T,k($,0))})}}),l.defineExtension("blockComment",function(y,E,L){L||(L=c);var _=this,F=x(_,y),D=L.blockCommentStart||F.blockCommentStart,H=L.blockCommentEnd||F.blockCommentEnd;if(!D||!H){(L.lineComment||F.lineComment)&&L.fullLines!=!1&&_.lineComment(y,E,L);return}if(!/\bcomment\b/.test(_.getTokenTypeAt(k(y.line,0)))){var O=Math.min(E.line,_.lastLine());O!=y.line&&E.ch==0&&h.test(_.getLine(O))&&--O;var T=L.padding==null?" ":L.padding;y.line>O||_.operation(function(){if(L.fullLines!=!1){var M=h.test(_.getLine(O));_.replaceRange(T+H,k(O)),_.replaceRange(D+T,k(y.line,0));var B=L.blockCommentLead||F.blockCommentLead;if(B!=null)for(var $=y.line+1;$<=O;++$)($!=O||M)&&_.replaceRange(B+T,k($,0))}else{var ae=I(_.getCursor("to"),E)==0,ue=!_.somethingSelected();_.replaceRange(H,E),ae&&_.setSelection(ue?E:_.getCursor("from"),E),_.replaceRange(D,y)}})}}),l.defineExtension("uncomment",function(y,E,L){L||(L=c);var _=this,F=x(_,y),D=Math.min(E.ch!=0||E.line==y.line?E.line:E.line-1,_.lastLine()),H=Math.min(y.line,D),O=L.lineComment||F.lineComment,T=[],M=L.padding==null?" ":L.padding,B;e:{if(!O)break e;for(var $=H;$<=D;++$){var ae=_.getLine($),ue=ae.indexOf(O);if(ue>-1&&!/comment/.test(_.getTokenTypeAt(k($,ue+1)))&&(ue=-1),ue==-1&&h.test(ae)||ue>-1&&h.test(ae.slice(0,ue)))break e;T.push(ae)}if(_.operation(function(){for(var Ne=H;Ne<=D;++Ne){var Fe=T[Ne-H],tt=Fe.indexOf(O),ze=tt+O.length;tt<0||(Fe.slice(ze,ze+M.length)==M&&(ze+=M.length),B=!0,_.replaceRange("",k(Ne,tt),k(Ne,ze)))}}),B)return!0}var te=L.blockCommentStart||F.blockCommentStart,ye=L.blockCommentEnd||F.blockCommentEnd;if(!te||!ye)return!1;var ge=L.blockCommentLead||F.blockCommentLead,ke=_.getLine(H),Te=ke.indexOf(te);if(Te==-1)return!1;var G=D==H?ke:_.getLine(D),K=G.indexOf(ye,D==H?Te+te.length:0),b=k(H,Te+1),se=k(D,K+1);if(K==-1||!/comment/.test(_.getTokenTypeAt(b))||!/comment/.test(_.getTokenTypeAt(se))||_.getRange(b,se,`
|
||
`).indexOf(ye)>-1)return!1;var J=ke.lastIndexOf(te,y.ch),le=J==-1?-1:ke.slice(0,y.ch).indexOf(ye,J+te.length);if(J!=-1&&le!=-1&&le+ye.length!=y.ch)return!1;le=G.indexOf(ye,E.ch);var Oe=G.slice(E.ch).lastIndexOf(te,le-E.ch);return J=le==-1||Oe==-1?-1:E.ch+Oe,le!=-1&&J!=-1&&J!=E.ch?!1:(_.operation(function(){_.replaceRange("",k(D,K-(M&&G.slice(K-M.length,K)==M?M.length:0)),k(D,K+ye.length));var Ne=Te+te.length;if(M&&ke.slice(Ne,Ne+M.length)==M&&(Ne+=M.length),_.replaceRange("",k(H,Te),k(H,Ne)),ge)for(var Fe=H+1;Fe<=D;++Fe){var tt=_.getLine(Fe),ze=tt.indexOf(ge);if(!(ze==-1||h.test(tt.slice(0,ze)))){var qe=ze+ge.length;M&&tt.slice(qe,qe+M.length)==M&&(qe+=M.length),_.replaceRange("",k(Fe,ze),k(Fe,qe))}}}),!0)})})})();var Qd={exports:{}};(function(n,o){(function(l){l(wn())})(function(l){function c(S,w,x,y){if(x&&x.call){var E=x;x=null}else var E=I(S,x,"rangeFinder");typeof w=="number"&&(w=l.Pos(w,0));var L=I(S,x,"minFoldSize");function _(O){var T=E(S,w);if(!T||T.to.line-T.from.line<L)return null;if(y==="fold")return T;for(var M=S.findMarksAt(T.from),B=0;B<M.length;++B)if(M[B].__isFold){if(!O)return null;T.cleared=!0,M[B].clear()}return T}var F=_(!0);if(I(S,x,"scanUp"))for(;!F&&w.line>S.firstLine();)w=l.Pos(w.line-1,0),F=_(!1);if(!(!F||F.cleared||y==="unfold")){var D=h(S,x,F);l.on(D,"mousedown",function(O){H.clear(),l.e_preventDefault(O)});var H=S.markText(F.from,F.to,{replacedWith:D,clearOnEnter:I(S,x,"clearOnEnter"),__isFold:!0});H.on("clear",function(O,T){l.signal(S,"unfold",S,O,T)}),l.signal(S,"fold",S,F.from,F.to)}}function h(S,w,x){var y=I(S,w,"widget");if(typeof y=="function"&&(y=y(x.from,x.to)),typeof y=="string"){var E=document.createTextNode(y);y=document.createElement("span"),y.appendChild(E),y.className="CodeMirror-foldmarker"}else y&&(y=y.cloneNode(!0));return y}l.newFoldFunction=function(S,w){return function(x,y){c(x,y,{rangeFinder:S,widget:w})}},l.defineExtension("foldCode",function(S,w,x){c(this,S,w,x)}),l.defineExtension("isFolded",function(S){for(var w=this.findMarksAt(S),x=0;x<w.length;++x)if(w[x].__isFold)return!0}),l.commands.toggleFold=function(S){S.foldCode(S.getCursor())},l.commands.fold=function(S){S.foldCode(S.getCursor(),null,"fold")},l.commands.unfold=function(S){S.foldCode(S.getCursor(),{scanUp:!1},"unfold")},l.commands.foldAll=function(S){S.operation(function(){for(var w=S.firstLine(),x=S.lastLine();w<=x;w++)S.foldCode(l.Pos(w,0),{scanUp:!1},"fold")})},l.commands.unfoldAll=function(S){S.operation(function(){for(var w=S.firstLine(),x=S.lastLine();w<=x;w++)S.foldCode(l.Pos(w,0),{scanUp:!1},"unfold")})},l.registerHelper("fold","combine",function(){var S=Array.prototype.slice.call(arguments,0);return function(w,x){for(var y=0;y<S.length;++y){var E=S[y](w,x);if(E)return E}}}),l.registerHelper("fold","auto",function(S,w){for(var x=S.getHelpers(w,"fold"),y=0;y<x.length;y++){var E=x[y](S,w);if(E)return E}});var k={rangeFinder:l.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};l.defineOption("foldOptions",null);function I(S,w,x){if(w&&w[x]!==void 0)return w[x];var y=S.options.foldOptions;return y&&y[x]!==void 0?y[x]:k[x]}l.defineExtension("foldOption",function(S,w){return I(this,S,w)})})})();(function(n,o){(function(l){l(wn(),Qd.exports)})(function(l){l.defineOption("foldGutter",!1,function(D,H,O){O&&O!=l.Init&&(D.clearGutter(D.state.foldGutter.options.gutter),D.state.foldGutter=null,D.off("gutterClick",E),D.off("changes",L),D.off("viewportChange",_),D.off("fold",F),D.off("unfold",F),D.off("swapDoc",L)),H&&(D.state.foldGutter=new h(k(H)),y(D),D.on("gutterClick",E),D.on("changes",L),D.on("viewportChange",_),D.on("fold",F),D.on("unfold",F),D.on("swapDoc",L))});var c=l.Pos;function h(D){this.options=D,this.from=this.to=0}function k(D){return D===!0&&(D={}),D.gutter==null&&(D.gutter="CodeMirror-foldgutter"),D.indicatorOpen==null&&(D.indicatorOpen="CodeMirror-foldgutter-open"),D.indicatorFolded==null&&(D.indicatorFolded="CodeMirror-foldgutter-folded"),D}function I(D,H){for(var O=D.findMarks(c(H,0),c(H+1,0)),T=0;T<O.length;++T)if(O[T].__isFold){var M=O[T].find(-1);if(M&&M.line===H)return O[T]}}function S(D){if(typeof D=="string"){var H=document.createElement("div");return H.className=D+" CodeMirror-guttermarker-subtle",H}else return D.cloneNode(!0)}function w(D,H,O){var T=D.state.foldGutter.options,M=H-1,B=D.foldOption(T,"minFoldSize"),$=D.foldOption(T,"rangeFinder"),ae=typeof T.indicatorFolded=="string"&&x(T.indicatorFolded),ue=typeof T.indicatorOpen=="string"&&x(T.indicatorOpen);D.eachLine(H,O,function(te){++M;var ye=null,ge=te.gutterMarkers;if(ge&&(ge=ge[T.gutter]),I(D,M)){if(ae&&ge&&ae.test(ge.className))return;ye=S(T.indicatorFolded)}else{var ke=c(M,0),Te=$&&$(D,ke);if(Te&&Te.to.line-Te.from.line>=B){if(ue&&ge&&ue.test(ge.className))return;ye=S(T.indicatorOpen)}}!ye&&!ge||D.setGutterMarker(te,T.gutter,ye)})}function x(D){return new RegExp("(^|\\s)"+D+"(?:$|\\s)\\s*")}function y(D){var H=D.getViewport(),O=D.state.foldGutter;O&&(D.operation(function(){w(D,H.from,H.to)}),O.from=H.from,O.to=H.to)}function E(D,H,O){var T=D.state.foldGutter;if(T){var M=T.options;if(O==M.gutter){var B=I(D,H);B?B.clear():D.foldCode(c(H,0),M)}}}function L(D){var H=D.state.foldGutter;if(H){var O=H.options;H.from=H.to=0,clearTimeout(H.changeUpdate),H.changeUpdate=setTimeout(function(){y(D)},O.foldOnChangeTimeSpan||600)}}function _(D){var H=D.state.foldGutter;if(H){var O=H.options;clearTimeout(H.changeUpdate),H.changeUpdate=setTimeout(function(){var T=D.getViewport();H.from==H.to||T.from-H.to>20||H.from-T.to>20?y(D):D.operation(function(){T.from<H.from&&(w(D,T.from,H.from),H.from=T.from),T.to>H.to&&(w(D,H.to,T.to),H.to=T.to)})},O.updateViewportTimeSpan||400)}}function F(D,H){var O=D.state.foldGutter;if(O){var T=H.line;T>=O.from&&T<O.to&&w(D,T,T+1)}}})})();(function(n,o){(function(l){l(wn())})(function(l){function c(h){return function(k,I){var S=I.line,w=k.getLine(S);function x(D){for(var H,O=I.ch,T=0;;){var M=O<=0?-1:w.lastIndexOf(D[0],O-1);if(M==-1){if(T==1)break;T=1,O=w.length;continue}if(T==1&&M<I.ch)break;if(H=k.getTokenTypeAt(l.Pos(S,M+1)),!/^(comment|string)/.test(H))return{ch:M+1,tokenType:H,pair:D};O=M-1}}function y(D){var H=1,O=k.lastLine(),T,M=D.ch,B;e:for(var $=S;$<=O;++$)for(var ae=k.getLine($),ue=$==S?M:0;;){var te=ae.indexOf(D.pair[0],ue),ye=ae.indexOf(D.pair[1],ue);if(te<0&&(te=ae.length),ye<0&&(ye=ae.length),ue=Math.min(te,ye),ue==ae.length)break;if(k.getTokenTypeAt(l.Pos($,ue+1))==D.tokenType){if(ue==te)++H;else if(!--H){T=$,B=ue;break e}}++ue}return T==null||S==T?null:{from:l.Pos(S,M),to:l.Pos(T,B)}}for(var E=[],L=0;L<h.length;L++){var _=x(h[L]);_&&E.push(_)}E.sort(function(D,H){return D.ch-H.ch});for(var L=0;L<E.length;L++){var F=y(E[L]);if(F)return F}return null}}l.registerHelper("fold","brace",c([["{","}"],["[","]"]])),l.registerHelper("fold","brace-paren",c([["{","}"],["[","]"],["(",")"]])),l.registerHelper("fold","import",function(h,k){function I(L){if(L<h.firstLine()||L>h.lastLine())return null;var _=h.getTokenAt(l.Pos(L,1));if(/\S/.test(_.string)||(_=h.getTokenAt(l.Pos(L,_.end+1))),_.type!="keyword"||_.string!="import")return null;for(var F=L,D=Math.min(h.lastLine(),L+10);F<=D;++F){var H=h.getLine(F),O=H.indexOf(";");if(O!=-1)return{startCh:_.end,end:l.Pos(F,O)}}}var S=k.line,w=I(S),x;if(!w||I(S-1)||(x=I(S-2))&&x.end.line==S-1)return null;for(var y=w.end;;){var E=I(y.line+1);if(E==null)break;y=E.end}return{from:h.clipPos(l.Pos(S,w.startCh+1)),to:y}}),l.registerHelper("fold","include",function(h,k){function I(E){if(E<h.firstLine()||E>h.lastLine())return null;var L=h.getTokenAt(l.Pos(E,1));if(/\S/.test(L.string)||(L=h.getTokenAt(l.Pos(E,L.end+1))),L.type=="meta"&&L.string.slice(0,8)=="#include")return L.start+8}var S=k.line,w=I(S);if(w==null||I(S-1)!=null)return null;for(var x=S;;){var y=I(x+1);if(y==null)break;++x}return{from:l.Pos(S,w+1),to:h.clipPos(l.Pos(x))}})})})();(function(n,o){(function(l){l(wn())})(function(l){function c(h,k){var I=h.getLine(k),S=I.search(/\S/);return S==-1||/\bcomment\b/.test(h.getTokenTypeAt(l.Pos(k,S+1)))?-1:l.countColumn(I,null,h.getOption("tabSize"))}l.registerHelper("fold","indent",function(h,k){var I=c(h,k.line);if(!(I<0)){for(var S=null,w=k.line+1,x=h.lastLine();w<=x;++w){var y=c(h,w);if(y!=-1)if(y>I)S=w;else break}if(S)return{from:l.Pos(k.line,h.getLine(k.line).length),to:l.Pos(S,h.getLine(S).length)}}})})})();(function(n,o){(function(l){l(wn())})(function(l){l.registerGlobalHelper("fold","comment",function(c){return c.blockCommentStart&&c.blockCommentEnd},function(c,h){var k=c.getModeAt(h),I=k.blockCommentStart,S=k.blockCommentEnd;if(!I||!S)return;for(var w=h.line,x=c.getLine(w),y,E=h.ch,L=0;;){var _=E<=0?-1:x.lastIndexOf(I,E-1);if(_==-1){if(L==1)return;L=1,E=x.length;continue}if(L==1&&_<h.ch)return;if(/comment/.test(c.getTokenTypeAt(l.Pos(w,_+1)))&&(_==0||x.slice(_-S.length,_)==S||!/comment/.test(c.getTokenTypeAt(l.Pos(w,_))))){y=_+I.length;break}E=_-1}var F=1,D=c.lastLine(),H,O;e:for(var T=w;T<=D;++T)for(var M=c.getLine(T),B=T==w?y:0;;){var $=M.indexOf(I,B),ae=M.indexOf(S,B);if($<0&&($=M.length),ae<0&&(ae=M.length),B=Math.min($,ae),B==M.length)break;if(B==$)++F;else if(!--F){H=T,O=B;break e}++B}if(!(H==null||w==H&&O==y))return{from:l.Pos(w,y),to:l.Pos(H,O)}})})})();const U1=$r({__name:"CodeMirror",props:{mode:{default:"htmlmixed"},value:{default:""},readonly:{type:Boolean,default:!1}},emits:["change"],setup(n,{emit:o}){const l=n,c=jn(),h=zr("autoresize");return E1(()=>{const k={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},I=Yd(c.value,{value:"",mode:l.mode,readOnly:l.readonly,tabSize:2,lineWrapping:!0,lineNumbers:!0,...k});I.on("change",()=>{o("change",I.getValue())}),yo(()=>{const S=I.getValue();l.value!==S&&I.setValue(l.value)}),yo(()=>{I.setOption("mode",l.mode)}),setTimeout(()=>{I.refresh()},50),h&&window.addEventListener("resize",j1(()=>{I.refresh()}))}),(k,I)=>(Ht(),hn("div",{class:"editor",ref_key:"el",ref:c},null,512))}}),em=$r({__name:"Message",props:["err","warn"],setup(n){const o=n,l=jn(!1);Ua(()=>[o.err,o.warn],()=>{l.value=!1});function c(h){if(typeof h=="string")return h;{let k=h.message;const I=h.loc;return I&&I.start&&(k=`(${I.start.line}:${I.start.column}) `+k),k}}return(h,k)=>(Ht(),fl(fd,{name:"fade"},{default:$a(()=>[!l.value&&(n.err||n.warn)?(Ht(),hn("div",{key:0,class:Wi(["msg",n.err?"err":"warn"])},[Ft("pre",null,Lo(c(n.err||n.warn)),1),Ft("button",{class:"dismiss",onClick:k[0]||(k[0]=I=>l.value=!0)},"✕")],2)):Bi("",!0)]),_:1}))}}),Za=hi(em,[["__scopeId","data-v-92411507"]]),tm={class:"editor-container"},nm=$r({__name:"Editor",setup(n){const o=zr("store"),l=j1(h=>{o.state.activeFile.code=h},250),c=Ts(()=>{const{filename:h}=o.state.activeFile;return h.endsWith(".vue")||h.endsWith(".html")?"htmlmixed":h.endsWith(".css")?"css":"javascript"});return(h,k)=>(Ht(),hn(Ss,null,[Br(Ld),Ft("div",tm,[Br(U1,{onChange:Rt(l),value:Rt(o).state.activeFile.code,mode:Rt(c)},null,8,["onChange","value","mode"]),Br(Za,{err:Rt(o).state.errors[0]},null,8,["err"])])],64))}}),rm=hi(nm,[["__scopeId","data-v-0384e940"]]),im=`<!doctype html>
|
||
<html>
|
||
<head>
|
||
<style>
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||
}
|
||
</style>
|
||
<style id="__sfc-styles"></style>
|
||
<script>
|
||
(() => {
|
||
let scriptEls = []
|
||
|
||
window.process = { env: {} }
|
||
window.__modules__ = {}
|
||
|
||
window.__export__ = (mod, key, get) => {
|
||
Object.defineProperty(mod, key, {
|
||
enumerable: true,
|
||
configurable: true,
|
||
get
|
||
})
|
||
}
|
||
|
||
window.__dynamic_import__ = key => {
|
||
return Promise.resolve(window.__modules__[key])
|
||
}
|
||
|
||
async function handle_message(ev) {
|
||
let { action, cmd_id } = ev.data;
|
||
const send_message = (payload) => parent.postMessage( { ...payload }, ev.origin);
|
||
const send_reply = (payload) => send_message({ ...payload, cmd_id });
|
||
const send_ok = () => send_reply({ action: 'cmd_ok' });
|
||
const send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack });
|
||
|
||
if (action === 'eval') {
|
||
try {
|
||
if (scriptEls.length) {
|
||
scriptEls.forEach(el => {
|
||
document.head.removeChild(el)
|
||
})
|
||
scriptEls.length = 0
|
||
}
|
||
|
||
let { script: scripts } = ev.data.args
|
||
if (typeof scripts === 'string') scripts = [scripts]
|
||
|
||
for (const script of scripts) {
|
||
const scriptEl = document.createElement('script')
|
||
scriptEl.setAttribute('type', 'module')
|
||
// send ok in the module script to ensure sequential evaluation
|
||
// of multiple proxy.eval() calls
|
||
const done = new Promise((resolve) => {
|
||
window.__next__ = resolve
|
||
})
|
||
scriptEl.innerHTML = script + \`\\nwindow.__next__()\`
|
||
document.head.appendChild(scriptEl)
|
||
scriptEl.onerror = err => send_error(err.message, err.stack)
|
||
scriptEls.push(scriptEl)
|
||
await done
|
||
}
|
||
send_ok()
|
||
} catch (e) {
|
||
send_error(e.message, e.stack);
|
||
}
|
||
}
|
||
|
||
if (action === 'catch_clicks') {
|
||
try {
|
||
const top_origin = ev.origin;
|
||
document.body.addEventListener('click', event => {
|
||
if (event.which !== 1) return;
|
||
if (event.metaKey || event.ctrlKey || event.shiftKey) return;
|
||
if (event.defaultPrevented) return;
|
||
|
||
// ensure target is a link
|
||
let el = event.target;
|
||
while (el && el.nodeName !== 'A') el = el.parentNode;
|
||
if (!el || el.nodeName !== 'A') return;
|
||
|
||
if (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return;
|
||
|
||
event.preventDefault();
|
||
|
||
if (el.href.startsWith(top_origin)) {
|
||
const url = new URL(el.href);
|
||
if (url.hash[0] === '#') {
|
||
window.location.hash = url.hash;
|
||
return;
|
||
}
|
||
}
|
||
|
||
window.open(el.href, '_blank');
|
||
});
|
||
send_ok();
|
||
} catch(e) {
|
||
send_error(e.message, e.stack);
|
||
}
|
||
}
|
||
}
|
||
|
||
window.addEventListener('message', handle_message, false);
|
||
|
||
window.onerror = function (msg, url, lineNo, columnNo, error) {
|
||
if (msg.includes('module specifier “vue”')) {
|
||
// firefox only error, ignore
|
||
return false
|
||
}
|
||
try {
|
||
parent.postMessage({ action: 'error', value: error }, '*');
|
||
} catch (e) {
|
||
parent.postMessage({ action: 'error', value: msg }, '*');
|
||
}
|
||
}
|
||
|
||
window.addEventListener("unhandledrejection", event => {
|
||
if (event.reason.message.includes('Cross-origin')) {
|
||
event.preventDefault()
|
||
return
|
||
}
|
||
try {
|
||
parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');
|
||
} catch (e) {
|
||
parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');
|
||
}
|
||
});
|
||
|
||
let previous = { level: null, args: null };
|
||
|
||
['clear', 'log', 'info', 'dir', 'warn', 'error', 'table'].forEach((level) => {
|
||
const original = console[level];
|
||
console[level] = (...args) => {
|
||
const msg = String(args[0])
|
||
if (
|
||
msg.includes('You are running a development build of Vue') ||
|
||
msg.includes('You are running the esm-bundler build of Vue')
|
||
) {
|
||
return
|
||
}
|
||
const stringifiedArgs = stringify(args);
|
||
if (
|
||
previous.level === level &&
|
||
previous.args &&
|
||
previous.args === stringifiedArgs
|
||
) {
|
||
parent.postMessage({ action: 'console', level, duplicate: true }, '*');
|
||
} else {
|
||
previous = { level, args: stringifiedArgs };
|
||
|
||
try {
|
||
parent.postMessage({ action: 'console', level, args }, '*');
|
||
} catch (err) {
|
||
parent.postMessage({ action: 'console', level, args: args.map(a => {
|
||
return a instanceof Error ? a.message : String(a)
|
||
}) }, '*');
|
||
}
|
||
}
|
||
|
||
original(...args);
|
||
}
|
||
});
|
||
|
||
[
|
||
{ method: 'group', action: 'console_group' },
|
||
{ method: 'groupEnd', action: 'console_group_end' },
|
||
{ method: 'groupCollapsed', action: 'console_group_collapsed' },
|
||
].forEach((group_action) => {
|
||
const original = console[group_action.method];
|
||
console[group_action.method] = (label) => {
|
||
parent.postMessage({ action: group_action.action, label }, '*');
|
||
|
||
original(label);
|
||
};
|
||
});
|
||
|
||
const timers = new Map();
|
||
const original_time = console.time;
|
||
const original_timelog = console.timeLog;
|
||
const original_timeend = console.timeEnd;
|
||
|
||
console.time = (label = 'default') => {
|
||
original_time(label);
|
||
timers.set(label, performance.now());
|
||
}
|
||
console.timeLog = (label = 'default') => {
|
||
original_timelog(label);
|
||
const now = performance.now();
|
||
if (timers.has(label)) {
|
||
parent.postMessage({ action: 'console', level: 'system-log', args: [\`\${label}: \${now - timers.get(label)}ms\`] }, '*');
|
||
} else {
|
||
parent.postMessage({ action: 'console', level: 'system-warn', args: [\`Timer '\${label}' does not exist\`] }, '*');
|
||
}
|
||
}
|
||
console.timeEnd = (label = 'default') => {
|
||
original_timeend(label);
|
||
const now = performance.now();
|
||
if (timers.has(label)) {
|
||
parent.postMessage({ action: 'console', level: 'system-log', args: [\`\${label}: \${now - timers.get(label)}ms\`] }, '*');
|
||
} else {
|
||
parent.postMessage({ action: 'console', level: 'system-warn', args: [\`Timer '\${label}' does not exist\`] }, '*');
|
||
}
|
||
timers.delete(label);
|
||
};
|
||
|
||
const original_assert = console.assert;
|
||
console.assert = (condition, ...args) => {
|
||
if (condition) {
|
||
const stack = new Error().stack;
|
||
parent.postMessage({ action: 'console', level: 'assert', args, stack }, '*');
|
||
}
|
||
original_assert(condition, ...args);
|
||
};
|
||
|
||
const counter = new Map();
|
||
const original_count = console.count;
|
||
const original_countreset = console.countReset;
|
||
|
||
console.count = (label = 'default') => {
|
||
counter.set(label, (counter.get(label) || 0) + 1);
|
||
parent.postMessage({ action: 'console', level: 'system-log', args: \`\${label}: \${counter.get(label)}\` }, '*');
|
||
original_count(label);
|
||
};
|
||
|
||
console.countReset = (label = 'default') => {
|
||
if (counter.has(label)) {
|
||
counter.set(label, 0);
|
||
} else {
|
||
parent.postMessage({ action: 'console', level: 'system-warn', args: \`Count for '\${label}' does not exist\` }, '*');
|
||
}
|
||
original_countreset(label);
|
||
};
|
||
|
||
const original_trace = console.trace;
|
||
|
||
console.trace = (...args) => {
|
||
const stack = new Error().stack;
|
||
parent.postMessage({ action: 'console', level: 'trace', args, stack }, '*');
|
||
original_trace(...args);
|
||
};
|
||
|
||
function stringify(args) {
|
||
try {
|
||
return JSON.stringify(args);
|
||
} catch (error) {
|
||
return null;
|
||
}
|
||
}
|
||
})()
|
||
<\/script>
|
||
|
||
<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->
|
||
<script async src="https://unpkg.com/es-module-shims@1.5.18/dist/es-module-shims.wasm.js"><\/script>
|
||
<script type="importmap"><!--IMPORT_MAP--><\/script>
|
||
</head>
|
||
<body></body>
|
||
</html>
|
||
`;let sm=1;class om{constructor(o,l){this.iframe=o,this.handlers=l,this.pending_cmds=new Map,this.handle_event=c=>this.handle_repl_message(c),window.addEventListener("message",this.handle_event,!1)}destroy(){window.removeEventListener("message",this.handle_event)}iframe_command(o,l){return new Promise((c,h)=>{const k=sm++;this.pending_cmds.set(k,{resolve:c,reject:h}),this.iframe.contentWindow.postMessage({action:o,cmd_id:k,args:l},"*")})}handle_command_message(o){let l=o.action,c=o.cmd_id,h=this.pending_cmds.get(c);if(h){if(this.pending_cmds.delete(c),l==="cmd_error"){let{message:k,stack:I}=o,S=new Error(k);S.stack=I,h.reject(S)}l==="cmd_ok"&&h.resolve(o.args)}else l!=="cmd_error"&&l!=="cmd_ok"&&console.error("command not found",c,o,[...this.pending_cmds.keys()])}handle_repl_message(o){if(o.source!==this.iframe.contentWindow)return;const{action:l,args:c}=o.data;switch(l){case"cmd_error":case"cmd_ok":return this.handle_command_message(o.data);case"fetch_progress":return this.handlers.on_fetch_progress(c.remaining);case"error":return this.handlers.on_error(o.data);case"unhandledrejection":return this.handlers.on_unhandled_rejection(o.data);case"console":return this.handlers.on_console(o.data);case"console_group":return this.handlers.on_console_group(o.data);case"console_group_collapsed":return this.handlers.on_console_group_collapsed(o.data);case"console_group_end":return this.handlers.on_console_group_end(o.data)}}eval(o){return this.iframe_command("eval",{script:o})}handle_links(){return this.iframe_command("catch_clicks",{})}}function s1(n,o=!1){const l=new Set,c=[];if(dl(n,n.state.files[n.state.mainFile],c,l,o),!o){for(const h in n.state.files)if(h.endsWith(".css")){const k=n.state.files[h];l.has(k)||c.push(`
|
||
window.__css__ += ${JSON.stringify(k.compiled.css)}`)}}return c}const o1="__modules__",Wa="__export__",am="__dynamic_import__",ys="__module__";function dl(n,o,l,c,h){if(c.has(o))return[];if(c.add(o),!h&&o.filename.endsWith(".html"))return cm(n,o.code,o.filename,l,c);let[k,I]=$1(n,h?o.compiled.ssr:o.compiled.js,o.filename);if(!h&&o.compiled.css&&(k+=`
|
||
window.__css__ += ${JSON.stringify(o.compiled.css)}`),I.size)for(const S of I)dl(n,n.state.files[S],l,c,h);l.push(k)}function $1(n,o,l){const c=new id(o),h=sd(o,{sourceFilename:l,sourceType:"module"}).program.body,k=new Map,I=new Set,S=new Set,w=new Map;function x(E,L){const _=L.replace(/^\.\/+/,"");if(!(_ in n.state.files))throw new Error(`File "${_}" does not exist.`);if(S.has(_))return w.get(_);S.add(_);const F=`__import_${S.size}__`;return w.set(_,F),c.appendLeft(E.start,`const ${F} = ${o1}[${JSON.stringify(_)}]
|
||
`),F}function y(E,L=E){c.append(`
|
||
${Wa}(${ys}, "${E}", () => ${L})`)}c.prepend(`const ${ys} = ${o1}[${JSON.stringify(l)}] = { [Symbol.toStringTag]: "Module" }
|
||
|
||
`);for(const E of h)if(E.type==="ImportDeclaration"&&E.source.value.startsWith("./")){const _=x(E,E.source.value);for(const F of E.specifiers)F.type==="ImportSpecifier"?k.set(F.local.name,`${_}.${F.imported.name}`):F.type==="ImportDefaultSpecifier"?k.set(F.local.name,`${_}.default`):k.set(F.local.name,_);c.remove(E.start,E.end)}for(const E of h){if(E.type==="ExportNamedDeclaration")if(E.declaration){if(E.declaration.type==="FunctionDeclaration"||E.declaration.type==="ClassDeclaration")y(E.declaration.id.name);else if(E.declaration.type==="VariableDeclaration")for(const L of E.declaration.declarations)for(const _ of od(L.id))y(_.name);c.remove(E.start,E.declaration.start)}else if(E.source){const L=x(E,E.source.value);for(const _ of E.specifiers)y(_.exported.name,`${L}.${_.local.name}`);c.remove(E.start,E.end)}else{for(const L of E.specifiers){const _=L.local.name,F=k.get(_);y(L.exported.name,F||_)}c.remove(E.start,E.end)}if(E.type==="ExportDefaultDeclaration")if("id"in E.declaration&&E.declaration.id){const{name:L}=E.declaration.id;c.remove(E.start,E.start+15),c.append(`
|
||
${Wa}(${ys}, "default", () => ${L})`)}else c.overwrite(E.start,E.start+14,`${ys}.default =`);if(E.type==="ExportAllDeclaration"){const L=x(E,E.source.value);c.remove(E.start,E.end),c.append(`
|
||
for (const key in ${L}) {
|
||
if (key !== 'default') {
|
||
${Wa}(${ys}, key, () => ${L}[key])
|
||
}
|
||
}`)}}for(const E of h)E.type!=="ImportDeclaration"&&ad(E,(L,_,F)=>{const D=k.get(L.name);if(D)if(ld(_)&&_.shorthand)(!_.inPattern||ud(_,F))&&c.appendLeft(L.end,`: ${D}`);else if(_.type==="ClassDeclaration"&&L===_.superClass){if(!I.has(L.name)){I.add(L.name);const H=F[1];c.prependRight(H.start,`const ${L.name} = ${D};
|
||
`)}}else c.overwrite(L.start,L.end,D)});return cd(h,{enter(E,L){if(E.type==="Import"&&L.type==="CallExpression"){const _=L.arguments[0];_.type==="StringLiteral"&&_.value.startsWith("./")&&(c.overwrite(E.start,E.start+6,am),c.overwrite(_.start,_.end,JSON.stringify(_.value.replace(/^\.\/+/,""))))}}}),[c.toString(),S]}const lm=/<script\b(?:\s[^>]*>|>)([^]*?)<\/script>/gi,um=/<script\b[^>]*type\s*=\s*(?:"module"|'module')[^>]*>([^]*?)<\/script>/gi;function cm(n,o,l,c,h){const k=[];let I="";const S=o.replace(um,(w,x)=>{const[y,E]=$1(n,x,l);if(E.size)for(const L of E)dl(n,n.state.files[L],k,h,!1);return I+=`
|
||
`+y,""}).replace(lm,(w,x)=>(I+=`
|
||
`+x,""));c.push(`document.body.innerHTML = ${JSON.stringify(S)}`),c.push(...k),c.push(I)}const fm=$r({__name:"Preview",props:{show:{type:Boolean},ssr:{type:Boolean}},setup(n){const o=n,l=zr("store"),c=zr("clear-console"),h=jn(),k=jn(),I=jn();let S,w,x;E1(y),Ua(()=>l.state.files["import-map.json"].code,L=>{try{if(!JSON.parse(L).imports){l.state.errors=['import-map.json is missing "imports" field.'];return}y()}catch(_){l.state.errors=[_];return}}),Ua(()=>l.state.resetFlip,y),nd(()=>{w.destroy(),x&&x()});function y(){S&&(w.destroy(),x&&x(),h.value.removeChild(S)),S=document.createElement("iframe"),S.setAttribute("sandbox",["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation"].join(" "));const L=l.getImportMap();L.imports||(L.imports={}),L.imports.vue||(L.imports.vue=l.state.vueRuntimeURL);const _=im.replace(/<!--IMPORT_MAP-->/,JSON.stringify(L));S.srcdoc=_,h.value.appendChild(S),w=new om(S,{on_fetch_progress:F=>{},on_error:F=>{const D=F.value instanceof Error?F.value.message:F.value;D.includes("Failed to resolve module specifier")||D.includes("Error resolving module specifier")?k.value=D.replace(/\. Relative references must.*$/,"")+`.
|
||
Tip: edit the "Import Map" tab to specify import paths for dependencies.`:k.value=F.value},on_unhandled_rejection:F=>{let D=F.value;typeof D=="string"&&(D={message:D}),k.value="Uncaught (in promise): "+D.message},on_console:F=>{F.duplicate||(F.level==="error"?F.args[0]instanceof Error?k.value=F.args[0].message:k.value=F.args[0]:F.level==="warn"&&F.args[0].toString().includes("[Vue warn]")&&(I.value=F.args.join("").replace(/\[Vue warn\]:/,"").trim()))},on_console_group:F=>{},on_console_group_end:()=>{},on_console_group_collapsed:F=>{}}),S.addEventListener("load",()=>{w.handle_links(),x=yo(E)})}async function E(){c.value&&console.clear(),k.value=null,I.value=null;let L=o.ssr;if(l.vueVersion){const[_,F,D]=l.vueVersion.split(".");(parseInt(F,10)<2||parseInt(D,10)<27)&&(alert(`The selected version of Vue (${l.vueVersion}) does not support in-browser SSR. Rendering in client mode instead.`),L=!1)}try{const _=l.state.mainFile;if(L&&_.endsWith(".vue")){const H=s1(l,!0);console.log(`[@vue/repl] successfully compiled ${H.length} modules for SSR.`),await w.eval(["const __modules__ = {};",...H,`import { renderToString as _renderToString } from 'vue/server-renderer'
|
||
import { createSSRApp as _createApp } from 'vue'
|
||
const AppComponent = __modules__["${_}"].default
|
||
AppComponent.name = 'Repl'
|
||
const app = _createApp(AppComponent)
|
||
app.config.unwrapInjectedRef = true
|
||
app.config.warnHandler = () => {}
|
||
window.__ssr_promise__ = _renderToString(app).then(html => {
|
||
document.body.innerHTML = '<div id="app">' + html + '</div>'
|
||
}).catch(err => {
|
||
console.error("SSR Error", err)
|
||
})
|
||
`])}const F=s1(l);console.log(`[@vue/repl] successfully compiled ${F.length} module${F.length>1?"s":""}.`);const D=[`window.__modules__ = {}
|
||
window.__css__ = ''
|
||
if (window.__app__) window.__app__.unmount()
|
||
`+(L?"":`document.body.innerHTML = '<div id="app"></div>'`),...F,"document.getElementById('__sfc-styles').innerHTML = window.__css__"];_.endsWith(".vue")&&D.push(`import { ${L?"createSSRApp":"createApp"} as _createApp } from "vue"
|
||
const _mount = () => {
|
||
const AppComponent = __modules__["${_}"].default
|
||
AppComponent.name = 'Repl'
|
||
const app = window.__app__ = _createApp(AppComponent)
|
||
app.config.unwrapInjectedRef = true
|
||
app.config.errorHandler = e => console.error(e)
|
||
app.mount('#app')
|
||
}
|
||
if (window.__ssr_promise__) {
|
||
window.__ssr_promise__.then(_mount)
|
||
} else {
|
||
_mount()
|
||
}`),await w.eval(D)}catch(_){k.value=_.message}}return(L,_)=>(Ht(),hn(Ss,null,[N1(Ft("div",{class:"iframe-container",ref_key:"container",ref:h},null,512),[[rd,n.show]]),Br(Za,{err:k.value},null,8,["err"]),k.value?Bi("",!0):(Ht(),fl(Za,{key:0,warn:I.value},null,8,["warn"]))],64))}}),hm=hi(fm,[["__scopeId","data-v-21e1de24"]]),pm={class:"tab-buttons"},dm=["onClick"],mm={class:"output-container"},gm=$r({__name:"Output",props:{showCompileOutput:{type:Boolean},ssr:{type:Boolean}},setup(n){const o=n,l=zr("store"),c=Ts(()=>o.showCompileOutput?["preview","js","css","ssr"]:["preview"]),h=jn(c.value.includes(l.initialOutputMode)?l.initialOutputMode:"preview");return(k,I)=>(Ht(),hn(Ss,null,[Ft("div",pm,[(Ht(!0),hn(Ss,null,O1(Rt(c),S=>(Ht(),hn("button",{class:Wi({active:h.value===S}),onClick:w=>h.value=S},[Ft("span",null,Lo(S),1)],10,dm))),256))]),Ft("div",mm,[Br(hm,{show:h.value==="preview",ssr:n.ssr},null,8,["show","ssr"]),h.value!=="preview"?(Ht(),fl(U1,{key:0,readonly:"",mode:h.value==="css"?"css":"javascript",value:Rt(l).state.activeFile.compiled[h.value]},null,8,["mode","value"])):Bi("",!0)])],64))}}),vm=hi(gm,[["__scopeId","data-v-5d2df9cb"]]);var R;(function(n){n[n.NONE=0]="NONE";const l=0+1;n[n._abstract=l]="_abstract";const c=l+1;n[n._as=c]="_as";const h=c+1;n[n._asserts=h]="_asserts";const k=h+1;n[n._async=k]="_async";const I=k+1;n[n._await=I]="_await";const S=I+1;n[n._checks=S]="_checks";const w=S+1;n[n._constructor=w]="_constructor";const x=w+1;n[n._declare=x]="_declare";const y=x+1;n[n._enum=y]="_enum";const E=y+1;n[n._exports=E]="_exports";const L=E+1;n[n._from=L]="_from";const _=L+1;n[n._get=_]="_get";const F=_+1;n[n._global=F]="_global";const D=F+1;n[n._implements=D]="_implements";const H=D+1;n[n._infer=H]="_infer";const O=H+1;n[n._interface=O]="_interface";const T=O+1;n[n._is=T]="_is";const M=T+1;n[n._keyof=M]="_keyof";const B=M+1;n[n._mixins=B]="_mixins";const $=B+1;n[n._module=$]="_module";const ae=$+1;n[n._namespace=ae]="_namespace";const ue=ae+1;n[n._of=ue]="_of";const te=ue+1;n[n._opaque=te]="_opaque";const ye=te+1;n[n._override=ye]="_override";const ge=ye+1;n[n._private=ge]="_private";const ke=ge+1;n[n._protected=ke]="_protected";const Te=ke+1;n[n._proto=Te]="_proto";const G=Te+1;n[n._public=G]="_public";const K=G+1;n[n._readonly=K]="_readonly";const b=K+1;n[n._require=b]="_require";const se=b+1;n[n._set=se]="_set";const J=se+1;n[n._static=J]="_static";const le=J+1;n[n._type=le]="_type";const Oe=le+1;n[n._unique=Oe]="_unique"})(R||(R={}));var s;(function(n){n[n.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const l=1<<4;n[n.IS_KEYWORD=l]="IS_KEYWORD";const c=1<<5;n[n.IS_ASSIGN=c]="IS_ASSIGN";const h=1<<6;n[n.IS_RIGHT_ASSOCIATIVE=h]="IS_RIGHT_ASSOCIATIVE";const k=1<<7;n[n.IS_PREFIX=k]="IS_PREFIX";const I=1<<8;n[n.IS_POSTFIX=I]="IS_POSTFIX";const S=0;n[n.num=S]="num";const w=512;n[n.bigint=w]="bigint";const x=1024;n[n.decimal=x]="decimal";const y=1536;n[n.regexp=y]="regexp";const E=2048;n[n.string=E]="string";const L=2560;n[n.name=L]="name";const _=3072;n[n.eof=_]="eof";const F=3584;n[n.bracketL=F]="bracketL";const D=4096;n[n.bracketR=D]="bracketR";const H=4608;n[n.braceL=H]="braceL";const O=5120;n[n.braceBarL=O]="braceBarL";const T=5632;n[n.braceR=T]="braceR";const M=6144;n[n.braceBarR=M]="braceBarR";const B=6656;n[n.parenL=B]="parenL";const $=7168;n[n.parenR=$]="parenR";const ae=7680;n[n.comma=ae]="comma";const ue=8192;n[n.semi=ue]="semi";const te=8704;n[n.colon=te]="colon";const ye=9216;n[n.doubleColon=ye]="doubleColon";const ge=9728;n[n.dot=ge]="dot";const ke=10240;n[n.question=ke]="question";const Te=10752;n[n.questionDot=Te]="questionDot";const G=11264;n[n.arrow=G]="arrow";const K=11776;n[n.template=K]="template";const b=12288;n[n.ellipsis=b]="ellipsis";const se=12800;n[n.backQuote=se]="backQuote";const J=13312;n[n.dollarBraceL=J]="dollarBraceL";const le=13824;n[n.at=le]="at";const Oe=14336;n[n.hash=Oe]="hash";const Ne=14880;n[n.eq=Ne]="eq";const Fe=15392;n[n.assign=Fe]="assign";const tt=16256;n[n.preIncDec=tt]="preIncDec";const ze=16768;n[n.postIncDec=ze]="postIncDec";const qe=17024;n[n.bang=qe]="bang";const X=17536;n[n.tilde=X]="tilde";const z=17921;n[n.pipeline=z]="pipeline";const V=18434;n[n.nullishCoalescing=V]="nullishCoalescing";const ee=18946;n[n.logicalOR=ee]="logicalOR";const fe=19459;n[n.logicalAND=fe]="logicalAND";const ve=19972;n[n.bitwiseOR=ve]="bitwiseOR";const pe=20485;n[n.bitwiseXOR=pe]="bitwiseXOR";const De=20998;n[n.bitwiseAND=De]="bitwiseAND";const Ze=21511;n[n.equality=Ze]="equality";const Je=22024;n[n.lessThan=Je]="lessThan";const Ae=22536;n[n.greaterThan=Ae]="greaterThan";const He=23048;n[n.relationalOrEqual=He]="relationalOrEqual";const Ke=23561;n[n.bitShift=Ke]="bitShift";const ot=24202;n[n.plus=ot]="plus";const lt=24714;n[n.minus=lt]="minus";const rn=25099;n[n.modulo=rn]="modulo";const nt=25611;n[n.star=nt]="star";const U=26123;n[n.slash=U]="slash";const he=26700;n[n.exponent=he]="exponent";const Q=27136;n[n.jsxName=Q]="jsxName";const Xe=27648;n[n.jsxText=Xe]="jsxText";const It=28160;n[n.jsxTagStart=It]="jsxTagStart";const pn=28672;n[n.jsxTagEnd=pn]="jsxTagEnd";const Kr=29184;n[n.typeParameterStart=Kr]="typeParameterStart";const Ut=29696;n[n.nonNullAssertion=Ut]="nonNullAssertion";const ft=30224;n[n._break=ft]="_break";const On=30736;n[n._case=On]="_case";const Bt=31248;n[n._catch=Bt]="_catch";const xn=31760;n[n._continue=xn]="_continue";const Ee=32272;n[n._debugger=Ee]="_debugger";const $n=32784;n[n._default=$n]="_default";const Lt=33296;n[n._do=Lt]="_do";const Me=33808;n[n._else=Me]="_else";const pt=34320;n[n._finally=pt]="_finally";const Gn=34832;n[n._for=Gn]="_for";const wt=35344;n[n._function=wt]="_function";const dn=35856;n[n._if=dn]="_if";const _t=36368;n[n._return=_t]="_return";const Kn=36880;n[n._switch=Kn]="_switch";const $t=37520;n[n._throw=$t]="_throw";const Dn=37904;n[n._try=Dn]="_try";const An=38416;n[n._var=An]="_var";const xr=38928;n[n._let=xr]="_let";const or=39440;n[n._const=or]="_const";const Et=39952;n[n._while=Et]="_while";const _r=40464;n[n._with=_r]="_with";const ar=40976;n[n._new=ar]="_new";const mn=41488;n[n._this=mn]="_this";const lr=42e3;n[n._super=lr]="_super";const Sr=42512;n[n._class=Sr]="_class";const Tr=43024;n[n._extends=Tr]="_extends";const ur=43536;n[n._export=ur]="_export";const Ln=44048;n[n._import=Ln]="_import";const Zt=44560;n[n._yield=Zt]="_yield";const Gt=45072;n[n._null=Gt]="_null";const Ir=45584;n[n._true=Ir]="_true";const _n=46096;n[n._false=_n]="_false";const Xn=46616;n[n._in=Xn]="_in";const Vn=47128;n[n._instanceof=Vn]="_instanceof";const sn=47760;n[n._typeof=sn]="_typeof";const on=48272;n[n._void=on]="_void";const Kt=48784;n[n._delete=Kt]="_delete";const cr=49168;n[n._async=cr]="_async";const Xr=49680;n[n._get=Xr]="_get";const dt=50192;n[n._set=dt]="_set";const Ce=50704;n[n._declare=Ce]="_declare";const En=51216;n[n._readonly=En]="_readonly";const Vr=51728;n[n._abstract=Vr]="_abstract";const Qt=52240;n[n._static=Qt]="_static";const rt=52752;n[n._public=rt]="_public";const Nn=53264;n[n._private=Nn]="_private";const fr=53776;n[n._protected=fr]="_protected";const Yr=54288;n[n._override=Yr]="_override";const ce=54800;n[n._as=ce]="_as";const v=55312;n[n._enum=v]="_enum";const P=55824;n[n._type=P]="_type";const ne=56336;n[n._implements=ne]="_implements"})(s||(s={}));function km(n){switch(n){case s.num:return"num";case s.bigint:return"bigint";case s.decimal:return"decimal";case s.regexp:return"regexp";case s.string:return"string";case s.name:return"name";case s.eof:return"eof";case s.bracketL:return"[";case s.bracketR:return"]";case s.braceL:return"{";case s.braceBarL:return"{|";case s.braceR:return"}";case s.braceBarR:return"|}";case s.parenL:return"(";case s.parenR:return")";case s.comma:return",";case s.semi:return";";case s.colon:return":";case s.doubleColon:return"::";case s.dot:return".";case s.question:return"?";case s.questionDot:return"?.";case s.arrow:return"=>";case s.template:return"template";case s.ellipsis:return"...";case s.backQuote:return"`";case s.dollarBraceL:return"${";case s.at:return"@";case s.hash:return"#";case s.eq:return"=";case s.assign:return"_=";case s.preIncDec:return"++/--";case s.postIncDec:return"++/--";case s.bang:return"!";case s.tilde:return"~";case s.pipeline:return"|>";case s.nullishCoalescing:return"??";case s.logicalOR:return"||";case s.logicalAND:return"&&";case s.bitwiseOR:return"|";case s.bitwiseXOR:return"^";case s.bitwiseAND:return"&";case s.equality:return"==/!=";case s.lessThan:return"<";case s.greaterThan:return">";case s.relationalOrEqual:return"<=/>=";case s.bitShift:return"<</>>";case s.plus:return"+";case s.minus:return"-";case s.modulo:return"%";case s.star:return"*";case s.slash:return"/";case s.exponent:return"**";case s.jsxName:return"jsxName";case s.jsxText:return"jsxText";case s.jsxTagStart:return"jsxTagStart";case s.jsxTagEnd:return"jsxTagEnd";case s.typeParameterStart:return"typeParameterStart";case s.nonNullAssertion:return"nonNullAssertion";case s._break:return"break";case s._case:return"case";case s._catch:return"catch";case s._continue:return"continue";case s._debugger:return"debugger";case s._default:return"default";case s._do:return"do";case s._else:return"else";case s._finally:return"finally";case s._for:return"for";case s._function:return"function";case s._if:return"if";case s._return:return"return";case s._switch:return"switch";case s._throw:return"throw";case s._try:return"try";case s._var:return"var";case s._let:return"let";case s._const:return"const";case s._while:return"while";case s._with:return"with";case s._new:return"new";case s._this:return"this";case s._super:return"super";case s._class:return"class";case s._extends:return"extends";case s._export:return"export";case s._import:return"import";case s._yield:return"yield";case s._null:return"null";case s._true:return"true";case s._false:return"false";case s._in:return"in";case s._instanceof:return"instanceof";case s._typeof:return"typeof";case s._void:return"void";case s._delete:return"delete";case s._async:return"async";case s._get:return"get";case s._set:return"set";case s._declare:return"declare";case s._readonly:return"readonly";case s._abstract:return"abstract";case s._static:return"static";case s._public:return"public";case s._private:return"private";case s._protected:return"protected";case s._override:return"override";case s._as:return"as";case s._enum:return"enum";case s._type:return"type";case s._implements:return"implements";default:return""}}class rr{constructor(o,l,c){this.startTokenIndex=o,this.endTokenIndex=l,this.isFunctionScope=c}}class ym{constructor(o,l,c,h,k,I,S,w,x,y,E,L){this.potentialArrowAt=o,this.noAnonFunctionType=l,this.tokensLength=c,this.scopesLength=h,this.pos=k,this.type=I,this.contextualKeyword=S,this.start=w,this.end=x,this.isType=y,this.scopeDepth=E,this.error=L}}class kn{constructor(){kn.prototype.__init.call(this),kn.prototype.__init2.call(this),kn.prototype.__init3.call(this),kn.prototype.__init4.call(this),kn.prototype.__init5.call(this),kn.prototype.__init6.call(this),kn.prototype.__init7.call(this),kn.prototype.__init8.call(this),kn.prototype.__init9.call(this),kn.prototype.__init10.call(this),kn.prototype.__init11.call(this),kn.prototype.__init12.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.tokens=[]}__init4(){this.scopes=[]}__init5(){this.pos=0}__init6(){this.type=s.eof}__init7(){this.contextualKeyword=R.NONE}__init8(){this.start=0}__init9(){this.end=0}__init10(){this.isType=!1}__init11(){this.scopeDepth=0}__init12(){this.error=null}snapshot(){return new ym(this.potentialArrowAt,this.noAnonFunctionType,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(o){this.potentialArrowAt=o.potentialArrowAt,this.noAnonFunctionType=o.noAnonFunctionType,this.tokens.length=o.tokensLength,this.scopes.length=o.scopesLength,this.pos=o.pos,this.type=o.type,this.contextualKeyword=o.contextualKeyword,this.start=o.start,this.end=o.end,this.isType=o.isType,this.scopeDepth=o.scopeDepth,this.error=o.error}}var q;(function(n){n[n.backSpace=8]="backSpace";const l=10;n[n.lineFeed=l]="lineFeed";const c=13;n[n.carriageReturn=c]="carriageReturn";const h=14;n[n.shiftOut=h]="shiftOut";const k=32;n[n.space=k]="space";const I=33;n[n.exclamationMark=I]="exclamationMark";const S=34;n[n.quotationMark=S]="quotationMark";const w=35;n[n.numberSign=w]="numberSign";const x=36;n[n.dollarSign=x]="dollarSign";const y=37;n[n.percentSign=y]="percentSign";const E=38;n[n.ampersand=E]="ampersand";const L=39;n[n.apostrophe=L]="apostrophe";const _=40;n[n.leftParenthesis=_]="leftParenthesis";const F=41;n[n.rightParenthesis=F]="rightParenthesis";const D=42;n[n.asterisk=D]="asterisk";const H=43;n[n.plusSign=H]="plusSign";const O=44;n[n.comma=O]="comma";const T=45;n[n.dash=T]="dash";const M=46;n[n.dot=M]="dot";const B=47;n[n.slash=B]="slash";const $=48;n[n.digit0=$]="digit0";const ae=49;n[n.digit1=ae]="digit1";const ue=50;n[n.digit2=ue]="digit2";const te=51;n[n.digit3=te]="digit3";const ye=52;n[n.digit4=ye]="digit4";const ge=53;n[n.digit5=ge]="digit5";const ke=54;n[n.digit6=ke]="digit6";const Te=55;n[n.digit7=Te]="digit7";const G=56;n[n.digit8=G]="digit8";const K=57;n[n.digit9=K]="digit9";const b=58;n[n.colon=b]="colon";const se=59;n[n.semicolon=se]="semicolon";const J=60;n[n.lessThan=J]="lessThan";const le=61;n[n.equalsTo=le]="equalsTo";const Oe=62;n[n.greaterThan=Oe]="greaterThan";const Ne=63;n[n.questionMark=Ne]="questionMark";const Fe=64;n[n.atSign=Fe]="atSign";const tt=65;n[n.uppercaseA=tt]="uppercaseA";const ze=66;n[n.uppercaseB=ze]="uppercaseB";const qe=67;n[n.uppercaseC=qe]="uppercaseC";const X=68;n[n.uppercaseD=X]="uppercaseD";const z=69;n[n.uppercaseE=z]="uppercaseE";const V=70;n[n.uppercaseF=V]="uppercaseF";const ee=71;n[n.uppercaseG=ee]="uppercaseG";const fe=72;n[n.uppercaseH=fe]="uppercaseH";const ve=73;n[n.uppercaseI=ve]="uppercaseI";const pe=74;n[n.uppercaseJ=pe]="uppercaseJ";const De=75;n[n.uppercaseK=De]="uppercaseK";const Ze=76;n[n.uppercaseL=Ze]="uppercaseL";const Je=77;n[n.uppercaseM=Je]="uppercaseM";const Ae=78;n[n.uppercaseN=Ae]="uppercaseN";const He=79;n[n.uppercaseO=He]="uppercaseO";const Ke=80;n[n.uppercaseP=Ke]="uppercaseP";const ot=81;n[n.uppercaseQ=ot]="uppercaseQ";const lt=82;n[n.uppercaseR=lt]="uppercaseR";const rn=83;n[n.uppercaseS=rn]="uppercaseS";const nt=84;n[n.uppercaseT=nt]="uppercaseT";const U=85;n[n.uppercaseU=U]="uppercaseU";const he=86;n[n.uppercaseV=he]="uppercaseV";const Q=87;n[n.uppercaseW=Q]="uppercaseW";const Xe=88;n[n.uppercaseX=Xe]="uppercaseX";const It=89;n[n.uppercaseY=It]="uppercaseY";const pn=90;n[n.uppercaseZ=pn]="uppercaseZ";const Kr=91;n[n.leftSquareBracket=Kr]="leftSquareBracket";const Ut=92;n[n.backslash=Ut]="backslash";const ft=93;n[n.rightSquareBracket=ft]="rightSquareBracket";const On=94;n[n.caret=On]="caret";const Bt=95;n[n.underscore=Bt]="underscore";const xn=96;n[n.graveAccent=xn]="graveAccent";const Ee=97;n[n.lowercaseA=Ee]="lowercaseA";const $n=98;n[n.lowercaseB=$n]="lowercaseB";const Lt=99;n[n.lowercaseC=Lt]="lowercaseC";const Me=100;n[n.lowercaseD=Me]="lowercaseD";const pt=101;n[n.lowercaseE=pt]="lowercaseE";const Gn=102;n[n.lowercaseF=Gn]="lowercaseF";const wt=103;n[n.lowercaseG=wt]="lowercaseG";const dn=104;n[n.lowercaseH=dn]="lowercaseH";const _t=105;n[n.lowercaseI=_t]="lowercaseI";const Kn=106;n[n.lowercaseJ=Kn]="lowercaseJ";const $t=107;n[n.lowercaseK=$t]="lowercaseK";const Dn=108;n[n.lowercaseL=Dn]="lowercaseL";const An=109;n[n.lowercaseM=An]="lowercaseM";const xr=110;n[n.lowercaseN=xr]="lowercaseN";const or=111;n[n.lowercaseO=or]="lowercaseO";const Et=112;n[n.lowercaseP=Et]="lowercaseP";const _r=113;n[n.lowercaseQ=_r]="lowercaseQ";const ar=114;n[n.lowercaseR=ar]="lowercaseR";const mn=115;n[n.lowercaseS=mn]="lowercaseS";const lr=116;n[n.lowercaseT=lr]="lowercaseT";const Sr=117;n[n.lowercaseU=Sr]="lowercaseU";const Tr=118;n[n.lowercaseV=Tr]="lowercaseV";const ur=119;n[n.lowercaseW=ur]="lowercaseW";const Ln=120;n[n.lowercaseX=Ln]="lowercaseX";const Zt=121;n[n.lowercaseY=Zt]="lowercaseY";const Gt=122;n[n.lowercaseZ=Gt]="lowercaseZ";const Ir=123;n[n.leftCurlyBrace=Ir]="leftCurlyBrace";const _n=124;n[n.verticalBar=_n]="verticalBar";const Xn=125;n[n.rightCurlyBrace=Xn]="rightCurlyBrace";const Vn=126;n[n.tilde=Vn]="tilde";const sn=160;n[n.nonBreakingSpace=sn]="nonBreakingSpace";const on=5760;n[n.oghamSpaceMark=on]="oghamSpaceMark";const Kt=8232;n[n.lineSeparator=Kt]="lineSeparator";const cr=8233;n[n.paragraphSeparator=cr]="paragraphSeparator"})(q||(q={}));let Do,et,st,d,xe,G1;function Cs(){return G1++}function bm(n){if("pos"in n){const o=xm(n.pos);n.message+=` (${o.line}:${o.column})`,n.loc=o}return n}class wm{constructor(o,l){this.line=o,this.column=l}}function xm(n){let o=1,l=1;for(let c=0;c<n;c++)xe.charCodeAt(c)===q.lineFeed?(o++,l=1):l++;return new wm(o,l)}function _m(n,o,l,c){xe=n,d=new kn,G1=1,Do=o,et=l,st=c}function Re(n){return d.contextualKeyword===n}function K1(n){const o=Ro();return o.type===s.name&&o.contextualKeyword===n}function nn(n){return d.contextualKeyword===n&&Z(s.name)}function zt(n){nn(n)||We()}function In(){return C(s.eof)||C(s.braceR)||ir()}function ir(){const n=d.tokens[d.tokens.length-1],o=n?n.end:0;for(let l=o;l<d.start;l++){const c=xe.charCodeAt(l);if(c===q.lineFeed||c===q.carriageReturn||c===8232||c===8233)return!0}return!1}function Sm(){const n=ml();for(let o=d.end;o<n;o++){const l=xe.charCodeAt(o);if(l===q.lineFeed||l===q.carriageReturn||l===8232||l===8233)return!0}return!1}function br(){return Z(s.semi)||In()}function ht(){br()||We('Unexpected token, expected ";"')}function ie(n){Z(n)||We(`Unexpected token, expected "${km(n)}"`)}function We(n="Unexpected token",o=d.start){if(d.error)return;const l=new SyntaxError(n);l.pos=o,d.error=l,d.pos=xe.length,Ue(s.eof)}const X1=[9,11,12,q.space,q.nonBreakingSpace,q.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],a1=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,V1=new Uint8Array(65536);for(const n of X1)V1[n]=1;function Tm(n){if(n<48)return n===36;if(n<58)return!0;if(n<65)return!1;if(n<91)return!0;if(n<97)return n===95;if(n<123)return!0;if(n<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const zn=new Uint8Array(65536);for(let n=0;n<128;n++)zn[n]=Tm(n)?1:0;for(let n=128;n<65536;n++)zn[n]=1;for(const n of X1)zn[n]=0;zn[8232]=0;zn[8233]=0;const Ps=zn.slice();for(let n=q.digit0;n<=q.digit9;n++)Ps[n]=0;const l1=new Int32Array([-1,27,594,729,1566,2187,2673,3294,-1,3510,-1,4428,4563,4644,4941,5319,5697,-1,6237,6696,7155,7587,7749,7911,-1,8127,-1,-1,-1,54,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,243,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,R._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,R._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,R._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,918,-1,-1,-1,1053,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,783,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1026,-1,-1,-1,-1,-1,-1,-1,R._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,(s._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,1431,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1242,-1,-1,-1,-1,-1,-1,(s._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,-1,-1,-1,-1,-1,-1,-1,-1,R._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1620,1782,-1,-1,1917,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1755,-1,-1,-1,-1,-1,-1,-1,-1,(s._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1971,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,(s._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2106,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,2376,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2484,-1,-1,-1,-1,-1,-1,(s._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,R._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,(s._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,2970,-1,-1,3024,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2862,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,(s._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,-1,-1,-1,(s._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3159,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3213,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,R._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3483,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,3564,3888,-1,-1,-1,-1,4401,-1,-1,-1,-1,-1,-1,-1,(s._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,3807,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3699,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3753,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,R._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,(s._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._in<<1)+1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3996,4212,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,-1,R._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4077,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4617,-1,-1,-1,-1,-1,-1,(s._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4752,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,R._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4833,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5130,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,(s._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,5373,-1,-1,-1,-1,-1,5508,-1,-1,-1,-1,R._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5751,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5940,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,R._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6480,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,6912,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,R._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6939,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,(s._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,-1,-1,-1,-1,-1,-1,-1,(s._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,(s._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7371,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7479,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,R._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,(s._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8181,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(s._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Im(){let n=0,o=0,l=d.pos;for(;l<xe.length&&(o=xe.charCodeAt(l),!(o<q.lowercaseA||o>q.lowercaseZ));){const h=l1[n+(o-q.lowercaseA)+1];if(h===-1)break;n=h,l++}const c=l1[n];if(c>-1&&!zn[o]){d.pos=l,c&1?Ue(c>>>1):Ue(s.name,c>>>1);return}for(;l<xe.length;){const h=xe.charCodeAt(l);if(zn[h])l++;else if(h===q.backslash){if(l+=2,xe.charCodeAt(l)===q.leftCurlyBrace){for(;l<xe.length&&xe.charCodeAt(l)!==q.rightCurlyBrace;)l++;l++}}else if(h===q.atSign&&xe.charCodeAt(l+1)===q.atSign)l+=2;else break}d.pos=l,Ue(s.name)}var je;(function(n){n[n.Access=0]="Access";const l=0+1;n[n.ExportAccess=l]="ExportAccess";const c=l+1;n[n.TopLevelDeclaration=c]="TopLevelDeclaration";const h=c+1;n[n.FunctionScopedDeclaration=h]="FunctionScopedDeclaration";const k=h+1;n[n.BlockScopedDeclaration=k]="BlockScopedDeclaration";const I=k+1;n[n.ObjectShorthandTopLevelDeclaration=I]="ObjectShorthandTopLevelDeclaration";const S=I+1;n[n.ObjectShorthandFunctionScopedDeclaration=S]="ObjectShorthandFunctionScopedDeclaration";const w=S+1;n[n.ObjectShorthandBlockScopedDeclaration=w]="ObjectShorthandBlockScopedDeclaration";const x=w+1;n[n.ObjectShorthand=x]="ObjectShorthand";const y=x+1;n[n.ImportDeclaration=y]="ImportDeclaration";const E=y+1;n[n.ObjectKey=E]="ObjectKey";const L=E+1;n[n.ImportAccess=L]="ImportAccess"})(je||(je={}));function Y1(n){const o=n.identifierRole;return o===je.TopLevelDeclaration||o===je.FunctionScopedDeclaration||o===je.BlockScopedDeclaration||o===je.ObjectShorthandTopLevelDeclaration||o===je.ObjectShorthandFunctionScopedDeclaration||o===je.ObjectShorthandBlockScopedDeclaration}function Cm(n){const o=n.identifierRole;return o===je.FunctionScopedDeclaration||o===je.BlockScopedDeclaration||o===je.ObjectShorthandFunctionScopedDeclaration||o===je.ObjectShorthandBlockScopedDeclaration}function J1(n){const o=n.identifierRole;return o===je.TopLevelDeclaration||o===je.ObjectShorthandTopLevelDeclaration||o===je.ImportDeclaration}function Am(n){const o=n.identifierRole;return o===je.TopLevelDeclaration||o===je.BlockScopedDeclaration||o===je.ObjectShorthandTopLevelDeclaration||o===je.ObjectShorthandBlockScopedDeclaration}function Lm(n){const o=n.identifierRole;return o===je.FunctionScopedDeclaration||o===je.ObjectShorthandFunctionScopedDeclaration}function Em(n){return n.identifierRole===je.ObjectShorthandTopLevelDeclaration||n.identifierRole===je.ObjectShorthandBlockScopedDeclaration||n.identifierRole===je.ObjectShorthandFunctionScopedDeclaration}class Mo{constructor(){this.type=d.type,this.contextualKeyword=d.contextualKeyword,this.start=d.start,this.end=d.end,this.scopeDepth=d.scopeDepth,this.isType=d.isType,this.identifierRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function oe(){d.tokens.push(new Mo),tf()}function Fr(){d.tokens.push(new Mo),d.start=d.pos,Km()}function Nm(){d.type===s.assign&&--d.pos,Um()}function $e(n){for(let l=d.tokens.length-n;l<d.tokens.length;l++)d.tokens[l].isType=!0;const o=d.isType;return d.isType=!0,o}function Ge(n){d.isType=n}function Z(n){return C(n)?(oe(),!0):!1}function Z1(n){const o=d.isType;d.isType=!0,Z(n),d.isType=o}function C(n){return d.type===n}function kt(){const n=d.snapshot();oe();const o=d.type;return d.restoreFromSnapshot(n),o}class Pm{constructor(o,l){this.type=o,this.contextualKeyword=l}}function Ro(){const n=d.snapshot();oe();const o=d.type,l=d.contextualKeyword;return d.restoreFromSnapshot(n),new Pm(o,l)}function ml(){return Q1(d.pos)}function Q1(n){a1.lastIndex=n;const o=a1.exec(xe);return n+o[0].length}function ef(){return xe.charCodeAt(ml())}function tf(){if(rf(),d.start=d.pos,d.pos>=xe.length){const n=d.tokens;n.length>=2&&n[n.length-1].start>=xe.length&&n[n.length-2].start>=xe.length&&We("Unexpectedly reached the end of input."),Ue(s.eof);return}Om(xe.charCodeAt(d.pos))}function Om(n){Ps[n]||n===q.backslash||n===q.atSign&&xe.charCodeAt(d.pos+1)===q.atSign?Im():sf(n)}function Dm(){for(;xe.charCodeAt(d.pos)!==q.asterisk||xe.charCodeAt(d.pos+1)!==q.slash;)if(d.pos++,d.pos>xe.length){We("Unterminated comment",d.pos-2);return}d.pos+=2}function nf(n){let o=xe.charCodeAt(d.pos+=n);if(d.pos<xe.length)for(;o!==q.lineFeed&&o!==q.carriageReturn&&o!==q.lineSeparator&&o!==q.paragraphSeparator&&++d.pos<xe.length;)o=xe.charCodeAt(d.pos)}function rf(){for(;d.pos<xe.length;){const n=xe.charCodeAt(d.pos);switch(n){case q.carriageReturn:xe.charCodeAt(d.pos+1)===q.lineFeed&&++d.pos;case q.lineFeed:case q.lineSeparator:case q.paragraphSeparator:++d.pos;break;case q.slash:switch(xe.charCodeAt(d.pos+1)){case q.asterisk:d.pos+=2,Dm();break;case q.slash:nf(2);break;default:return}break;default:if(V1[n])++d.pos;else return}}}function Ue(n,o=R.NONE){d.end=d.pos,d.type=n,d.contextualKeyword=o}function Mm(){const n=xe.charCodeAt(d.pos+1);if(n>=q.digit0&&n<=q.digit9){of(!0);return}n===q.dot&&xe.charCodeAt(d.pos+2)===q.dot?(d.pos+=3,Ue(s.ellipsis)):(++d.pos,Ue(s.dot))}function Rm(){xe.charCodeAt(d.pos+1)===q.equalsTo?ct(s.assign,2):ct(s.slash,1)}function Fm(n){let o=n===q.asterisk?s.star:s.modulo,l=1,c=xe.charCodeAt(d.pos+1);n===q.asterisk&&c===q.asterisk&&(l++,c=xe.charCodeAt(d.pos+2),o=s.exponent),c===q.equalsTo&&xe.charCodeAt(d.pos+2)!==q.greaterThan&&(l++,o=s.assign),ct(o,l)}function Bm(n){const o=xe.charCodeAt(d.pos+1);if(o===n){xe.charCodeAt(d.pos+2)===q.equalsTo?ct(s.assign,3):ct(n===q.verticalBar?s.logicalOR:s.logicalAND,2);return}if(n===q.verticalBar){if(o===q.greaterThan){ct(s.pipeline,2);return}else if(o===q.rightCurlyBrace&&st){ct(s.braceBarR,2);return}}if(o===q.equalsTo){ct(s.assign,2);return}ct(n===q.verticalBar?s.bitwiseOR:s.bitwiseAND,1)}function Wm(){xe.charCodeAt(d.pos+1)===q.equalsTo?ct(s.assign,2):ct(s.bitwiseXOR,1)}function Hm(n){const o=xe.charCodeAt(d.pos+1);if(o===n){ct(s.preIncDec,2);return}o===q.equalsTo?ct(s.assign,2):n===q.plusSign?ct(s.plus,1):ct(s.minus,1)}function jm(n){const o=xe.charCodeAt(d.pos+1);if(o===n){const l=n===q.greaterThan&&xe.charCodeAt(d.pos+2)===q.greaterThan?3:2;if(xe.charCodeAt(d.pos+l)===q.equalsTo){ct(s.assign,l+1);return}if(n===q.greaterThan&&d.isType){ct(s.greaterThan,1);return}ct(s.bitShift,l);return}o===q.equalsTo?ct(s.relationalOrEqual,2):n===q.lessThan?ct(s.lessThan,1):ct(s.greaterThan,1)}function zm(n){const o=xe.charCodeAt(d.pos+1);if(o===q.equalsTo){ct(s.equality,xe.charCodeAt(d.pos+2)===q.equalsTo?3:2);return}if(n===q.equalsTo&&o===q.greaterThan){d.pos+=2,Ue(s.arrow);return}ct(n===q.equalsTo?s.eq:s.bang,1)}function qm(){const n=xe.charCodeAt(d.pos+1),o=xe.charCodeAt(d.pos+2);n===q.questionMark&&!d.isType?o===q.equalsTo?ct(s.assign,3):ct(s.nullishCoalescing,2):n===q.dot&&!(o>=q.digit0&&o<=q.digit9)?(d.pos+=2,Ue(s.questionDot)):(++d.pos,Ue(s.question))}function sf(n){switch(n){case q.numberSign:++d.pos,Ue(s.hash);return;case q.dot:Mm();return;case q.leftParenthesis:++d.pos,Ue(s.parenL);return;case q.rightParenthesis:++d.pos,Ue(s.parenR);return;case q.semicolon:++d.pos,Ue(s.semi);return;case q.comma:++d.pos,Ue(s.comma);return;case q.leftSquareBracket:++d.pos,Ue(s.bracketL);return;case q.rightSquareBracket:++d.pos,Ue(s.bracketR);return;case q.leftCurlyBrace:st&&xe.charCodeAt(d.pos+1)===q.verticalBar?ct(s.braceBarL,2):(++d.pos,Ue(s.braceL));return;case q.rightCurlyBrace:++d.pos,Ue(s.braceR);return;case q.colon:xe.charCodeAt(d.pos+1)===q.colon?ct(s.doubleColon,2):(++d.pos,Ue(s.colon));return;case q.questionMark:qm();return;case q.atSign:++d.pos,Ue(s.at);return;case q.graveAccent:++d.pos,Ue(s.backQuote);return;case q.digit0:{const o=xe.charCodeAt(d.pos+1);if(o===q.lowercaseX||o===q.uppercaseX||o===q.lowercaseO||o===q.uppercaseO||o===q.lowercaseB||o===q.uppercaseB){$m();return}}case q.digit1:case q.digit2:case q.digit3:case q.digit4:case q.digit5:case q.digit6:case q.digit7:case q.digit8:case q.digit9:of(!1);return;case q.quotationMark:case q.apostrophe:Gm(n);return;case q.slash:Rm();return;case q.percentSign:case q.asterisk:Fm(n);return;case q.verticalBar:case q.ampersand:Bm(n);return;case q.caret:Wm();return;case q.plusSign:case q.dash:Hm(n);return;case q.lessThan:case q.greaterThan:jm(n);return;case q.equalsTo:case q.exclamationMark:zm(n);return;case q.tilde:ct(s.tilde,1);return}We(`Unexpected character '${String.fromCharCode(n)}'`,d.pos)}function ct(n,o){d.pos+=o,Ue(n)}function Um(){const n=d.pos;let o=!1,l=!1;for(;;){if(d.pos>=xe.length){We("Unterminated regular expression",n);return}const c=xe.charCodeAt(d.pos);if(o)o=!1;else{if(c===q.leftSquareBracket)l=!0;else if(c===q.rightSquareBracket&&l)l=!1;else if(c===q.slash&&!l)break;o=c===q.backslash}++d.pos}++d.pos,Xm(),Ue(s.regexp)}function go(){for(;;){const n=xe.charCodeAt(d.pos);if(n>=q.digit0&&n<=q.digit9||n>=q.lowercaseA&&n<=q.lowercaseF||n>=q.uppercaseA&&n<=q.uppercaseF||n===q.underscore)d.pos++;else break}}function $m(){let n=!1;const o=d.pos;d.pos+=2,go();const l=xe.charCodeAt(d.pos);if(l===q.lowercaseN?(++d.pos,n=!0):l===q.lowercaseM&&We("Invalid decimal",o),n){Ue(s.bigint);return}Ue(s.num)}function of(n){let o=!1,l=!1;n||go();let c=xe.charCodeAt(d.pos);if(c===q.dot&&(++d.pos,go(),c=xe.charCodeAt(d.pos)),(c===q.uppercaseE||c===q.lowercaseE)&&(c=xe.charCodeAt(++d.pos),(c===q.plusSign||c===q.dash)&&++d.pos,go(),c=xe.charCodeAt(d.pos)),c===q.lowercaseN?(++d.pos,o=!0):c===q.lowercaseM&&(++d.pos,l=!0),o){Ue(s.bigint);return}if(l){Ue(s.decimal);return}Ue(s.num)}function Gm(n){for(d.pos++;;){if(d.pos>=xe.length){We("Unterminated string constant");return}const o=xe.charCodeAt(d.pos);if(o===q.backslash)d.pos++;else if(o===n)break;d.pos++}d.pos++,Ue(s.string)}function Km(){for(;;){if(d.pos>=xe.length){We("Unterminated template");return}const n=xe.charCodeAt(d.pos);if(n===q.graveAccent||n===q.dollarSign&&xe.charCodeAt(d.pos+1)===q.leftCurlyBrace){if(d.pos===d.start&&C(s.template))if(n===q.dollarSign){d.pos+=2,Ue(s.dollarBraceL);return}else{++d.pos,Ue(s.backQuote);return}Ue(s.template);return}n===q.backslash&&d.pos++,d.pos++}}function Xm(){for(;d.pos<xe.length;){const n=xe.charCodeAt(d.pos);if(zn[n])d.pos++;else if(n===q.backslash){if(d.pos+=2,xe.charCodeAt(d.pos)===q.leftCurlyBrace){for(;d.pos<xe.length&&xe.charCodeAt(d.pos)!==q.rightCurlyBrace;)d.pos++;d.pos++}}else break}}const Vm={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};function af(n){const[o,l]=u1(n.jsxPragma||"React.createElement"),[c,h]=u1(n.jsxFragmentPragma||"React.Fragment");return{base:o,suffix:l,fragmentBase:c,fragmentSuffix:h}}function u1(n){let o=n.indexOf(".");return o===-1&&(o=n.length),[n.slice(0,o),n.slice(o)]}class qn{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}const Ym=/^[\da-fA-F]+$/,Jm=/^\d+$/;class xs extends qn{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}constructor(o,l,c,h,k){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.nameManager=h,this.options=k,xs.prototype.__init.call(this),xs.prototype.__init2.call(this),xs.prototype.__init3.call(this),this.jsxPragmaInfo=af(k)}process(){return this.tokens.matches1(s.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){return this.filenameVarName?`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`:""}getLineNumberForIndex(o){const l=this.tokens.code;for(;this.lastIndex<o&&this.lastIndex<l.length;)l[this.lastIndex]===`
|
||
`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}processProps(o){const l=this.getLineNumberForIndex(o),c=this.options.production?"":`__self: this, __source: {fileName: ${this.getFilenameVarName()}, lineNumber: ${l}}`;if(!this.tokens.matches1(s.jsxName)&&!this.tokens.matches1(s.braceL)){c?this.tokens.appendCode(`, {${c}}`):this.tokens.appendCode(", null");return}for(this.tokens.appendCode(", {");;){if(this.tokens.matches2(s.jsxName,s.eq))this.processPropKeyName(),this.tokens.replaceToken(": "),this.tokens.matches1(s.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(s.jsxTagStart)?this.processJSXTag():this.processStringPropValue();else if(this.tokens.matches1(s.jsxName))this.processPropKeyName(),this.tokens.appendCode(": true");else if(this.tokens.matches1(s.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}c?this.tokens.appendCode(` ${c}}`):this.tokens.appendCode("}")}processPropKeyName(){const o=this.tokens.identifierName();o.includes("-")?this.tokens.replaceToken(`'${o}'`):this.tokens.copyToken()}processStringPropValue(){const o=this.tokens.currentToken(),l=this.tokens.code.slice(o.start+1,o.end-1),c=c1(l),h=Qm(l);this.tokens.replaceToken(h+c)}processTagIntro(){let o=this.tokens.currentIndex()+1;for(;this.tokens.tokens[o].isType||!this.tokens.matches2AtIndex(o-1,s.jsxName,s.jsxName)&&!this.tokens.matches2AtIndex(o-1,s.greaterThan,s.jsxName)&&!this.tokens.matches1AtIndex(o,s.braceL)&&!this.tokens.matches1AtIndex(o,s.jsxTagEnd)&&!this.tokens.matches2AtIndex(o,s.slash,s.jsxTagEnd);)o++;if(o===this.tokens.currentIndex()+1){const l=this.tokens.identifierName();lf(l)&&this.tokens.replaceToken(`'${l}'`)}for(;this.tokens.currentIndex()<o;)this.rootTransformer.processToken()}processChildren(){for(;;){if(this.tokens.matches2(s.jsxTagStart,s.slash))return;if(this.tokens.matches1(s.braceL))this.tokens.matches2(s.braceL,s.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(", "),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""));else if(this.tokens.matches1(s.jsxTagStart))this.tokens.appendCode(", "),this.processJSXTag();else if(this.tokens.matches1(s.jsxText))this.processChildTextElement();else throw new Error("Unexpected token when processing JSX children.")}}processChildTextElement(){const o=this.tokens.currentToken(),l=this.tokens.code.slice(o.start,o.end),c=c1(l),h=Zm(l);h==='""'?this.tokens.replaceToken(c):this.tokens.replaceToken(`, ${h}${c}`)}processJSXTag(){const{jsxPragmaInfo:o}=this,l=this.importProcessor&&this.importProcessor.getIdentifierReplacement(o.base)||o.base,c=this.tokens.currentToken().start;if(this.tokens.replaceToken(`${l}${o.suffix}(`),this.tokens.matches1(s.jsxTagEnd)){const h=this.importProcessor&&this.importProcessor.getIdentifierReplacement(o.fragmentBase)||o.fragmentBase;for(this.tokens.replaceToken(`${h}${o.fragmentSuffix}, null`),this.processChildren();!this.tokens.matches1(s.jsxTagEnd);)this.tokens.replaceToken("");this.tokens.replaceToken(")")}else if(this.processTagIntro(),this.processProps(c),this.tokens.matches2(s.slash,s.jsxTagEnd))this.tokens.replaceToken(""),this.tokens.replaceToken(")");else if(this.tokens.matches1(s.jsxTagEnd)){for(this.tokens.replaceToken(""),this.processChildren();!this.tokens.matches1(s.jsxTagEnd);)this.tokens.replaceToken("");this.tokens.replaceToken(")")}else throw new Error("Expected either /> or > at the end of the tag.")}}function lf(n){const o=n.charCodeAt(0);return o>=q.lowercaseA&&o<=q.lowercaseZ}function Zm(n){let o="",l="",c=!1,h=!1;for(let k=0;k<n.length;k++){const I=n[k];if(I===" "||I===" "||I==="\r")c||(l+=I);else if(I===`
|
||
`)l="",c=!0;else{if(h&&c&&(o+=" "),o+=l,l="",I==="&"){const{entity:S,newI:w}=uf(n,k+1);k=w-1,o+=S}else o+=I;h=!0,c=!1}}return c||(o+=l),JSON.stringify(o)}function c1(n){let o=0,l=0;for(const c of n)c===`
|
||
`?(o++,l=0):c===" "&&l++;return`
|
||
`.repeat(o)+" ".repeat(l)}function Qm(n){let o="";for(let l=0;l<n.length;l++){const c=n[l];if(c===`
|
||
`)if(/\s/.test(n[l+1]))for(o+=" ";l<n.length&&/\s/.test(n[l+1]);)l++;else o+=`
|
||
`;else if(c==="&"){const{entity:h,newI:k}=uf(n,l+1);o+=h,l=k-1}else o+=c}return JSON.stringify(o)}function uf(n,o){let l="",c=0,h,k=o;for(;k<n.length&&c++<10;){const I=n[k];if(k++,I===";"){l[0]==="#"?l[1]==="x"?(l=l.substr(2),Ym.test(l)&&(h=String.fromCodePoint(parseInt(l,16)))):(l=l.substr(1),Jm.test(l)&&(h=String.fromCodePoint(parseInt(l,10)))):h=Vm[l];break}l+=I}return h?{entity:h,newI:k}:{entity:"&",newI:o}}function cf(n,o){const l=af(o),c=new Set;for(let h=0;h<n.tokens.length;h++){const k=n.tokens[h];if(k.type===s.name&&!k.isType&&(k.identifierRole===je.Access||k.identifierRole===je.ObjectShorthand||k.identifierRole===je.ExportAccess)&&!k.shadowsGlobal&&c.add(n.identifierNameForToken(k)),k.type===s.jsxTagStart&&c.add(l.base),k.type===s.jsxTagStart&&h+1<n.tokens.length&&n.tokens[h+1].type===s.jsxTagEnd&&(c.add(l.base),c.add(l.fragmentBase)),k.type===s.jsxName&&k.identifierRole===je.Access){const I=n.identifierNameForToken(k);(!lf(I)||n.tokens[h+1].type===s.dot)&&c.add(n.identifierNameForToken(k))}}return c}class ai{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(o,l,c,h,k,I){this.nameManager=o,this.tokens=l,this.enableLegacyTypeScriptModuleInterop=c,this.options=h,this.isTypeScriptTransformEnabled=k,this.helperManager=I,ai.prototype.__init.call(this),ai.prototype.__init2.call(this),ai.prototype.__init3.call(this),ai.prototype.__init4.call(this),ai.prototype.__init5.call(this)}preprocessTokens(){for(let o=0;o<this.tokens.tokens.length;o++)this.tokens.matches1AtIndex(o,s._import)&&!this.tokens.matches3AtIndex(o,s._import,s.name,s.eq)&&this.preprocessImportAtIndex(o),this.tokens.matches1AtIndex(o,s._export)&&!this.tokens.matches2AtIndex(o,s._export,s.eq)&&this.preprocessExportAtIndex(o);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=cf(this.tokens,this.options);for(const[o,l]of this.importInfoByPath.entries()){if(l.hasBareImport||l.hasStarExport||l.exportStarNames.length>0||l.namedExports.length>0)continue;[...l.defaultNames,...l.wildcardNames,...l.namedImports.map(({localName:h})=>h)].every(h=>this.isTypeName(h))&&this.importsToReplace.set(o,"")}}isTypeName(o){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(o)}generateImportReplacements(){for(const[o,l]of this.importInfoByPath.entries()){const{defaultNames:c,wildcardNames:h,namedImports:k,namedExports:I,exportStarNames:S,hasStarExport:w}=l;if(c.length===0&&h.length===0&&k.length===0&&I.length===0&&S.length===0&&!w){this.importsToReplace.set(o,`require('${o}');`);continue}const x=this.getFreeIdentifierForPath(o);let y;this.enableLegacyTypeScriptModuleInterop?y=x:y=h.length>0?h[0]:this.getFreeIdentifierForPath(o);let E=`var ${x} = require('${o}');`;if(h.length>0)for(const L of h){const _=this.enableLegacyTypeScriptModuleInterop?x:`${this.helperManager.getHelperName("interopRequireWildcard")}(${x})`;E+=` var ${L} = ${_};`}else S.length>0&&y!==x?E+=` var ${y} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${x});`:c.length>0&&y!==x&&(E+=` var ${y} = ${this.helperManager.getHelperName("interopRequireDefault")}(${x});`);for(const{importedName:L,localName:_}of I)E+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${x}, '${_}', '${L}');`;for(const L of S)E+=` exports.${L} = ${y};`;w&&(E+=` ${this.helperManager.getHelperName("createStarExport")}(${x});`),this.importsToReplace.set(o,E);for(const L of c)this.identifierReplacements.set(L,`${y}.default`);for(const{importedName:L,localName:_}of k)this.identifierReplacements.set(_,`${x}.${L}`)}}getFreeIdentifierForPath(o){const l=o.split("/"),h=l[l.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${h}`)}preprocessImportAtIndex(o){const l=[],c=[],h=[];if(o++,(this.tokens.matchesContextualAtIndex(o,R._type)||this.tokens.matches1AtIndex(o,s._typeof))&&!this.tokens.matches1AtIndex(o+1,s.comma)&&!this.tokens.matchesContextualAtIndex(o+1,R._from)||this.tokens.matches1AtIndex(o,s.parenL))return;if(this.tokens.matches1AtIndex(o,s.name)&&(l.push(this.tokens.identifierNameAtIndex(o)),o++,this.tokens.matches1AtIndex(o,s.comma)&&o++),this.tokens.matches1AtIndex(o,s.star)&&(o+=2,c.push(this.tokens.identifierNameAtIndex(o)),o++),this.tokens.matches1AtIndex(o,s.braceL)){const S=this.getNamedImports(o+1);o=S.newIndex;for(const w of S.namedImports)w.importedName==="default"?l.push(w.localName):h.push(w)}if(this.tokens.matchesContextualAtIndex(o,R._from)&&o++,!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of import statement.");const k=this.tokens.stringValueAtIndex(o),I=this.getImportInfo(k);I.defaultNames.push(...l),I.wildcardNames.push(...c),I.namedImports.push(...h),l.length===0&&c.length===0&&h.length===0&&(I.hasBareImport=!0)}preprocessExportAtIndex(o){if(this.tokens.matches2AtIndex(o,s._export,s._var)||this.tokens.matches2AtIndex(o,s._export,s._let)||this.tokens.matches2AtIndex(o,s._export,s._const))this.preprocessVarExportAtIndex(o);else if(this.tokens.matches2AtIndex(o,s._export,s._function)||this.tokens.matches2AtIndex(o,s._export,s._class)){const l=this.tokens.identifierNameAtIndex(o+2);this.addExportBinding(l,l)}else if(this.tokens.matches3AtIndex(o,s._export,s.name,s._function)){const l=this.tokens.identifierNameAtIndex(o+3);this.addExportBinding(l,l)}else this.tokens.matches2AtIndex(o,s._export,s.braceL)?this.preprocessNamedExportAtIndex(o):this.tokens.matches2AtIndex(o,s._export,s.star)&&this.preprocessExportStarAtIndex(o)}preprocessVarExportAtIndex(o){let l=0;for(let c=o+2;;c++)if(this.tokens.matches1AtIndex(c,s.braceL)||this.tokens.matches1AtIndex(c,s.dollarBraceL)||this.tokens.matches1AtIndex(c,s.bracketL))l++;else if(this.tokens.matches1AtIndex(c,s.braceR)||this.tokens.matches1AtIndex(c,s.bracketR))l--;else{if(l===0&&!this.tokens.matches1AtIndex(c,s.name))break;if(this.tokens.matches1AtIndex(1,s.eq)){const h=this.tokens.currentToken().rhsEndIndex;if(h==null)throw new Error("Expected = token with an end index.");c=h-1}else{const h=this.tokens.tokens[c];if(Y1(h)){const k=this.tokens.identifierNameAtIndex(c);this.identifierReplacements.set(k,`exports.${k}`)}}}}preprocessNamedExportAtIndex(o){o+=2;const{newIndex:l,namedImports:c}=this.getNamedImports(o);if(o=l,this.tokens.matchesContextualAtIndex(o,R._from))o++;else{for(const{importedName:I,localName:S}of c)this.addExportBinding(I,S);return}if(!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of import statement.");const h=this.tokens.stringValueAtIndex(o);this.getImportInfo(h).namedExports.push(...c)}preprocessExportStarAtIndex(o){let l=null;if(this.tokens.matches3AtIndex(o,s._export,s.star,s._as)?(o+=3,l=this.tokens.identifierNameAtIndex(o),o+=2):o+=3,!this.tokens.matches1AtIndex(o,s.string))throw new Error("Expected string token at the end of star export statement.");const c=this.tokens.stringValueAtIndex(o),h=this.getImportInfo(c);l!==null?h.exportStarNames.push(l):h.hasStarExport=!0}getNamedImports(o){const l=[];for(;;){if(this.tokens.matches1AtIndex(o,s.braceR)){o++;break}let c=!1;(this.tokens.matchesContextualAtIndex(o,R._type)||this.tokens.matches1AtIndex(o,s._typeof))&&this.tokens.matches1AtIndex(o+1,s.name)&&!this.tokens.matchesContextualAtIndex(o+1,R._as)&&(c=!0,o++);const h=this.tokens.identifierNameAtIndex(o);let k;if(o++,this.tokens.matchesContextualAtIndex(o,R._as)?(o++,k=this.tokens.identifierNameAtIndex(o),o++):k=h,c||l.push({importedName:h,localName:k}),this.tokens.matches2AtIndex(o,s.comma,s.braceR)){o+=2;break}else if(this.tokens.matches1AtIndex(o,s.braceR)){o++;break}else if(this.tokens.matches1AtIndex(o,s.comma))o++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[o])}`)}return{newIndex:o,namedImports:l}}getImportInfo(o){const l=this.importInfoByPath.get(o);if(l)return l;const c={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(o,c),c}addExportBinding(o,l){this.exportBindingsByLocalName.has(o)||this.exportBindingsByLocalName.set(o,[]),this.exportBindingsByLocalName.get(o).push(l)}claimImportCode(o){const l=this.importsToReplace.get(o);return this.importsToReplace.set(o,""),l||""}getIdentifierReplacement(o){return this.identifierReplacements.get(o)||null}resolveExportBinding(o){const l=this.exportBindingsByLocalName.get(o);return!l||l.length===0?null:l.map(c=>`exports.${c}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}function eg(n,o,{compiledFilename:l}){let c="AAAA";for(let h=0;h<n.length;h++)n.charCodeAt(h)===q.lineFeed&&(c+=";AACA");return{version:3,file:l||"",sources:[o],mappings:c,names:[]}}const tg={interopRequireWildcard:`
|
||
function interopRequireWildcard(obj) {
|
||
if (obj && obj.__esModule) {
|
||
return obj;
|
||
} else {
|
||
var newObj = {};
|
||
if (obj != null) {
|
||
for (var key in obj) {
|
||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||
newObj[key] = obj[key];
|
||
}
|
||
}
|
||
}
|
||
newObj.default = obj;
|
||
return newObj;
|
||
}
|
||
}
|
||
`,interopRequireDefault:`
|
||
function interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
`,createNamedExportFrom:`
|
||
function createNamedExportFrom(obj, localName, importedName) {
|
||
Object.defineProperty(exports, localName, {enumerable: true, get: () => obj[importedName]});
|
||
}
|
||
`,createStarExport:`
|
||
function createStarExport(obj) {
|
||
Object.keys(obj)
|
||
.filter((key) => key !== "default" && key !== "__esModule")
|
||
.forEach((key) => {
|
||
if (exports.hasOwnProperty(key)) {
|
||
return;
|
||
}
|
||
Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]});
|
||
});
|
||
}
|
||
`,nullishCoalesce:`
|
||
function nullishCoalesce(lhs, rhsFn) {
|
||
if (lhs != null) {
|
||
return lhs;
|
||
} else {
|
||
return rhsFn();
|
||
}
|
||
}
|
||
`,asyncNullishCoalesce:`
|
||
async function asyncNullishCoalesce(lhs, rhsFn) {
|
||
if (lhs != null) {
|
||
return lhs;
|
||
} else {
|
||
return await rhsFn();
|
||
}
|
||
}
|
||
`,optionalChain:`
|
||
function optionalChain(ops) {
|
||
let lastAccessLHS = undefined;
|
||
let value = ops[0];
|
||
let i = 1;
|
||
while (i < ops.length) {
|
||
const op = ops[i];
|
||
const fn = ops[i + 1];
|
||
i += 2;
|
||
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
||
return undefined;
|
||
}
|
||
if (op === 'access' || op === 'optionalAccess') {
|
||
lastAccessLHS = value;
|
||
value = fn(value);
|
||
} else if (op === 'call' || op === 'optionalCall') {
|
||
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
||
lastAccessLHS = undefined;
|
||
}
|
||
}
|
||
return value;
|
||
}
|
||
`,asyncOptionalChain:`
|
||
async function asyncOptionalChain(ops) {
|
||
let lastAccessLHS = undefined;
|
||
let value = ops[0];
|
||
let i = 1;
|
||
while (i < ops.length) {
|
||
const op = ops[i];
|
||
const fn = ops[i + 1];
|
||
i += 2;
|
||
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
||
return undefined;
|
||
}
|
||
if (op === 'access' || op === 'optionalAccess') {
|
||
lastAccessLHS = value;
|
||
value = await fn(value);
|
||
} else if (op === 'call' || op === 'optionalCall') {
|
||
value = await fn((...args) => value.call(lastAccessLHS, ...args));
|
||
lastAccessLHS = undefined;
|
||
}
|
||
}
|
||
return value;
|
||
}
|
||
`,optionalChainDelete:`
|
||
function optionalChainDelete(ops) {
|
||
const result = OPTIONAL_CHAIN_NAME(ops);
|
||
return result == null ? true : result;
|
||
}
|
||
`,asyncOptionalChainDelete:`
|
||
async function asyncOptionalChainDelete(ops) {
|
||
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
|
||
return result == null ? true : result;
|
||
}
|
||
`};class gl{__init(){this.helperNames={}}constructor(o){this.nameManager=o,gl.prototype.__init.call(this)}getHelperName(o){let l=this.helperNames[o];return l||(l=this.nameManager.claimFreeName(`_${o}`),this.helperNames[o]=l,l)}emitHelpers(){let o="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[l,c]of Object.entries(tg)){const h=this.helperNames[l];let k=c;l==="optionalChainDelete"?k=k.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):l==="asyncOptionalChainDelete"&&(k=k.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain)),h&&(o+=" ",o+=k.replace(l,h).replace(/\s+/g," ").trim())}return o}}function f1(n,o,l){ng(n,l)&&rg(n,o,l)}function ng(n,o){for(const l of n.tokens)if(l.type===s.name&&Cm(l)&&o.has(n.identifierNameForToken(l)))return!0;return!1}function rg(n,o,l){const c=[];let h=o.length-1;for(let k=n.tokens.length-1;;k--){for(;c.length>0&&c[c.length-1].startTokenIndex===k+1;)c.pop();for(;h>=0&&o[h].endTokenIndex===k+1;)c.push(o[h]),h--;if(k<0)break;const I=n.tokens[k],S=n.identifierNameForToken(I);if(c.length>1&&I.type===s.name&&l.has(S)){if(Am(I))h1(c[c.length-1],n,S);else if(Lm(I)){let w=c.length-1;for(;w>0&&!c[w].isFunctionScope;)w--;if(w<0)throw new Error("Did not find parent function scope.");h1(c[w],n,S)}}}if(c.length>0)throw new Error("Expected empty scope stack after processing file.")}function h1(n,o,l){for(let c=n.startTokenIndex;c<n.endTokenIndex;c++){const h=o.tokens[c];(h.type===s.name||h.type===s.jsxName)&&o.identifierNameForToken(h)===l&&(h.shadowsGlobal=!0)}}function ig(n,o){const l=[];for(const c of o)c.type===s.name&&l.push(n.slice(c.start,c.end));return l}class vl{__init(){this.usedNames=new Set}constructor(o,l){vl.prototype.__init.call(this),this.usedNames=new Set(ig(o,l))}claimFreeName(o){const l=this.findFreeName(o);return this.usedNames.add(l),l}findFreeName(o){if(!this.usedNames.has(o))return o;let l=2;for(;this.usedNames.has(o+String(l));)l++;return o+String(l)}}var At={},Qa={},tr={},sg=li&&li.__extends||function(){var n=function(o,l){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var k in h)h.hasOwnProperty(k)&&(c[k]=h[k])},n(o,l)};return function(o,l){n(o,l);function c(){this.constructor=o}o.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}();Object.defineProperty(tr,"__esModule",{value:!0});tr.DetailContext=tr.NoopContext=tr.VError=void 0;var ff=function(n){sg(o,n);function o(l,c){var h=n.call(this,c)||this;return h.path=l,Object.setPrototypeOf(h,o.prototype),h}return o}(Error);tr.VError=ff;var og=function(){function n(){}return n.prototype.fail=function(o,l,c){return!1},n.prototype.unionResolver=function(){return this},n.prototype.createContext=function(){return this},n.prototype.resolveUnion=function(o){},n}();tr.NoopContext=og;var hf=function(){function n(){this._propNames=[""],this._messages=[null],this._score=0}return n.prototype.fail=function(o,l,c){return this._propNames.push(o),this._messages.push(l),this._score+=c,!1},n.prototype.unionResolver=function(){return new ag},n.prototype.resolveUnion=function(o){for(var l,c,h=o,k=null,I=0,S=h.contexts;I<S.length;I++){var w=S[I];(!k||w._score>=k._score)&&(k=w)}k&&k._score>0&&((l=this._propNames).push.apply(l,k._propNames),(c=this._messages).push.apply(c,k._messages))},n.prototype.getError=function(o){for(var l=[],c=this._propNames.length-1;c>=0;c--){var h=this._propNames[c];o+=typeof h=="number"?"["+h+"]":h?"."+h:"";var k=this._messages[c];k&&l.push(o+" "+k)}return new ff(o,l.join("; "))},n.prototype.getErrorDetail=function(o){for(var l=[],c=this._propNames.length-1;c>=0;c--){var h=this._propNames[c];o+=typeof h=="number"?"["+h+"]":h?"."+h:"";var k=this._messages[c];k&&l.push({path:o,message:k})}for(var I=null,c=l.length-1;c>=0;c--)I&&(l[c].nested=[I]),I=l[c];return I},n}();tr.DetailContext=hf;var ag=function(){function n(){this.contexts=[]}return n.prototype.createContext=function(){var o=new hf;return this.contexts.push(o),o},n}();(function(n){var o=li&&li.__extends||function(){var X=function(z,V){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,fe){ee.__proto__=fe}||function(ee,fe){for(var ve in fe)fe.hasOwnProperty(ve)&&(ee[ve]=fe[ve])},X(z,V)};return function(z,V){X(z,V);function ee(){this.constructor=z}z.prototype=V===null?Object.create(V):(ee.prototype=V.prototype,new ee)}}();Object.defineProperty(n,"__esModule",{value:!0}),n.basicTypes=n.BasicType=n.TParamList=n.TParam=n.param=n.TFunc=n.func=n.TProp=n.TOptional=n.opt=n.TIface=n.iface=n.TEnumLiteral=n.enumlit=n.TEnumType=n.enumtype=n.TIntersection=n.intersection=n.TUnion=n.union=n.TTuple=n.tuple=n.TArray=n.array=n.TLiteral=n.lit=n.TName=n.name=n.TType=void 0;var l=tr,c=function(){function X(){}return X}();n.TType=c;function h(X){return typeof X=="string"?I(X):X}function k(X,z){var V=X[z];if(!V)throw new Error("Unknown type "+z);return V}function I(X){return new S(X)}n.name=I;var S=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.name=V,ee._failMsg="is not a "+V,ee}return z.prototype.getChecker=function(V,ee,fe){var ve=this,pe=k(V,this.name),De=pe.getChecker(V,ee,fe);return pe instanceof le||pe instanceof z?De:function(Ze,Je){return De(Ze,Je)?!0:Je.fail(null,ve._failMsg,0)}},z}(c);n.TName=S;function w(X){return new x(X)}n.lit=w;var x=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.value=V,ee.name=JSON.stringify(V),ee._failMsg="is not "+ee.name,ee}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,pe){return ve===fe.value?!0:pe.fail(null,fe._failMsg,-1)}},z}(c);n.TLiteral=x;function y(X){return new E(h(X))}n.array=y;var E=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttype=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttype.getChecker(V,ee);return function(ve,pe){if(!Array.isArray(ve))return pe.fail(null,"is not an array",0);for(var De=0;De<ve.length;De++){var Ze=fe(ve[De],pe);if(!Ze)return pe.fail(De,null,1)}return!0}},z}(c);n.TArray=E;function L(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new _(X.map(function(V){return h(V)}))}n.tuple=L;var _=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttypes=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttypes.map(function(pe){return pe.getChecker(V,ee)}),ve=function(pe,De){if(!Array.isArray(pe))return De.fail(null,"is not an array",0);for(var Ze=0;Ze<fe.length;Ze++){var Je=fe[Ze](pe[Ze],De);if(!Je)return De.fail(Ze,null,1)}return!0};return ee?function(pe,De){return ve(pe,De)?pe.length<=fe.length?!0:De.fail(fe.length,"is extraneous",2):!1}:ve},z}(c);n.TTuple=_;function F(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new D(X.map(function(V){return h(V)}))}n.union=F;var D=function(X){o(z,X);function z(V){var ee=X.call(this)||this;ee.ttypes=V;var fe=V.map(function(pe){return pe instanceof S||pe instanceof x?pe.name:null}).filter(function(pe){return pe}),ve=V.length-fe.length;return fe.length?(ve>0&&fe.push(ve+" more"),ee._failMsg="is none of "+fe.join(", ")):ee._failMsg="is none of "+ve+" types",ee}return z.prototype.getChecker=function(V,ee){var fe=this,ve=this.ttypes.map(function(pe){return pe.getChecker(V,ee)});return function(pe,De){for(var Ze=De.unionResolver(),Je=0;Je<ve.length;Je++){var Ae=ve[Je](pe,Ze.createContext());if(Ae)return!0}return De.resolveUnion(Ze),De.fail(null,fe._failMsg,0)}},z}(c);n.TUnion=D;function H(){for(var X=[],z=0;z<arguments.length;z++)X[z]=arguments[z];return new O(X.map(function(V){return h(V)}))}n.intersection=H;var O=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttypes=V,ee}return z.prototype.getChecker=function(V,ee){var fe=new Set,ve=this.ttypes.map(function(pe){return pe.getChecker(V,ee,fe)});return function(pe,De){var Ze=ve.every(function(Je){return Je(pe,De)});return Ze?!0:De.fail(null,null,0)}},z}(c);n.TIntersection=O;function T(X){return new M(X)}n.enumtype=T;var M=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.members=V,ee.validValues=new Set,ee._failMsg="is not a valid enum value",ee.validValues=new Set(Object.keys(V).map(function(fe){return V[fe]})),ee}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,pe){return fe.validValues.has(ve)?!0:pe.fail(null,fe._failMsg,0)}},z}(c);n.TEnumType=M;function B(X,z){return new $(X,z)}n.enumlit=B;var $=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.enumName=V,fe.prop=ee,fe._failMsg="is not "+V+"."+ee,fe}return z.prototype.getChecker=function(V,ee){var fe=this,ve=k(V,this.enumName);if(!(ve instanceof M))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var pe=ve.members[this.prop];if(!ve.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(De,Ze){return De===pe?!0:Ze.fail(null,fe._failMsg,-1)}},z}(c);n.TEnumLiteral=$;function ae(X){return Object.keys(X).map(function(z){return ue(z,X[z])})}function ue(X,z){return z instanceof ke?new Te(X,z.ttype,!0):new Te(X,h(z),!1)}function te(X,z){return new ye(X,ae(z))}n.iface=te;var ye=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.bases=V,fe.props=ee,fe.propSet=new Set(ee.map(function(ve){return ve.name})),fe}return z.prototype.getChecker=function(V,ee,fe){var ve=this,pe=this.bases.map(function(Ke){return k(V,Ke).getChecker(V,ee)}),De=this.props.map(function(Ke){return Ke.ttype.getChecker(V,ee)}),Ze=new l.NoopContext,Je=this.props.map(function(Ke,ot){return!Ke.isOpt&&!De[ot](void 0,Ze)}),Ae=function(Ke,ot){if(typeof Ke!="object"||Ke===null)return ot.fail(null,"is not an object",0);for(var lt=0;lt<pe.length;lt++)if(!pe[lt](Ke,ot))return!1;for(var lt=0;lt<De.length;lt++){var rn=ve.props[lt].name,nt=Ke[rn];if(nt===void 0){if(Je[lt])return ot.fail(rn,"is missing",1)}else{var U=De[lt](nt,ot);if(!U)return ot.fail(rn,null,1)}}return!0};if(!ee)return Ae;var He=this.propSet;return fe&&(this.propSet.forEach(function(Ke){return fe.add(Ke)}),He=fe),function(Ke,ot){if(!Ae(Ke,ot))return!1;for(var lt in Ke)if(!He.has(lt))return ot.fail(lt,"is extraneous",2);return!0}},z}(c);n.TIface=ye;function ge(X){return new ke(h(X))}n.opt=ge;var ke=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.ttype=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this.ttype.getChecker(V,ee);return function(ve,pe){return ve===void 0||fe(ve,pe)}},z}(c);n.TOptional=ke;var Te=function(){function X(z,V,ee){this.name=z,this.ttype=V,this.isOpt=ee}return X}();n.TProp=Te;function G(X){for(var z=[],V=1;V<arguments.length;V++)z[V-1]=arguments[V];return new K(new J(z),h(X))}n.func=G;var K=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.paramList=V,fe.result=ee,fe}return z.prototype.getChecker=function(V,ee){return function(fe,ve){return typeof fe=="function"?!0:ve.fail(null,"is not a function",0)}},z}(c);n.TFunc=K;function b(X,z,V){return new se(X,h(z),Boolean(V))}n.param=b;var se=function(){function X(z,V,ee){this.name=z,this.ttype=V,this.isOpt=ee}return X}();n.TParam=se;var J=function(X){o(z,X);function z(V){var ee=X.call(this)||this;return ee.params=V,ee}return z.prototype.getChecker=function(V,ee){var fe=this,ve=this.params.map(function(Je){return Je.ttype.getChecker(V,ee)}),pe=new l.NoopContext,De=this.params.map(function(Je,Ae){return!Je.isOpt&&!ve[Ae](void 0,pe)}),Ze=function(Je,Ae){if(!Array.isArray(Je))return Ae.fail(null,"is not an array",0);for(var He=0;He<ve.length;He++){var Ke=fe.params[He];if(Je[He]===void 0){if(De[He])return Ae.fail(Ke.name,"is missing",1)}else{var ot=ve[He](Je[He],Ae);if(!ot)return Ae.fail(Ke.name,null,1)}}return!0};return ee?function(Je,Ae){return Ze(Je,Ae)?Je.length<=ve.length?!0:Ae.fail(ve.length,"is extraneous",2):!1}:Ze},z}(c);n.TParamList=J;var le=function(X){o(z,X);function z(V,ee){var fe=X.call(this)||this;return fe.validator=V,fe.message=ee,fe}return z.prototype.getChecker=function(V,ee){var fe=this;return function(ve,pe){return fe.validator(ve)?!0:pe.fail(null,fe.message,0)}},z}(c);n.BasicType=le,n.basicTypes={any:new le(function(X){return!0},"is invalid"),number:new le(function(X){return typeof X=="number"},"is not a number"),object:new le(function(X){return typeof X=="object"&&X},"is not an object"),boolean:new le(function(X){return typeof X=="boolean"},"is not a boolean"),string:new le(function(X){return typeof X=="string"},"is not a string"),symbol:new le(function(X){return typeof X=="symbol"},"is not a symbol"),void:new le(function(X){return X==null},"is not void"),undefined:new le(function(X){return X===void 0},"is not undefined"),null:new le(function(X){return X===null},"is not null"),never:new le(function(X){return!1},"is unexpected"),Date:new le(Ne("[object Date]"),"is not a Date"),RegExp:new le(Ne("[object RegExp]"),"is not a RegExp")};var Oe=Object.prototype.toString;function Ne(X){return function(z){return typeof z=="object"&&z&&Oe.call(z)===X}}typeof Buffer<"u"&&(n.basicTypes.Buffer=new le(function(X){return Buffer.isBuffer(X)},"is not a Buffer"));for(var Fe=function(X){n.basicTypes[X.name]=new le(function(z){return z instanceof X},"is not a "+X.name)},tt=0,ze=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];tt<ze.length;tt++){var qe=ze[tt];Fe(qe)}})(Qa);(function(n){var o=li&&li.__spreadArrays||function(){for(var w=0,x=0,y=arguments.length;x<y;x++)w+=arguments[x].length;for(var E=Array(w),L=0,x=0;x<y;x++)for(var _=arguments[x],F=0,D=_.length;F<D;F++,L++)E[L]=_[F];return E};Object.defineProperty(n,"__esModule",{value:!0}),n.Checker=n.createCheckers=void 0;var l=Qa,c=tr,h=Qa;Object.defineProperty(n,"TArray",{enumerable:!0,get:function(){return h.TArray}}),Object.defineProperty(n,"TEnumType",{enumerable:!0,get:function(){return h.TEnumType}}),Object.defineProperty(n,"TEnumLiteral",{enumerable:!0,get:function(){return h.TEnumLiteral}}),Object.defineProperty(n,"TFunc",{enumerable:!0,get:function(){return h.TFunc}}),Object.defineProperty(n,"TIface",{enumerable:!0,get:function(){return h.TIface}}),Object.defineProperty(n,"TLiteral",{enumerable:!0,get:function(){return h.TLiteral}}),Object.defineProperty(n,"TName",{enumerable:!0,get:function(){return h.TName}}),Object.defineProperty(n,"TOptional",{enumerable:!0,get:function(){return h.TOptional}}),Object.defineProperty(n,"TParam",{enumerable:!0,get:function(){return h.TParam}}),Object.defineProperty(n,"TParamList",{enumerable:!0,get:function(){return h.TParamList}}),Object.defineProperty(n,"TProp",{enumerable:!0,get:function(){return h.TProp}}),Object.defineProperty(n,"TTuple",{enumerable:!0,get:function(){return h.TTuple}}),Object.defineProperty(n,"TType",{enumerable:!0,get:function(){return h.TType}}),Object.defineProperty(n,"TUnion",{enumerable:!0,get:function(){return h.TUnion}}),Object.defineProperty(n,"TIntersection",{enumerable:!0,get:function(){return h.TIntersection}}),Object.defineProperty(n,"array",{enumerable:!0,get:function(){return h.array}}),Object.defineProperty(n,"enumlit",{enumerable:!0,get:function(){return h.enumlit}}),Object.defineProperty(n,"enumtype",{enumerable:!0,get:function(){return h.enumtype}}),Object.defineProperty(n,"func",{enumerable:!0,get:function(){return h.func}}),Object.defineProperty(n,"iface",{enumerable:!0,get:function(){return h.iface}}),Object.defineProperty(n,"lit",{enumerable:!0,get:function(){return h.lit}}),Object.defineProperty(n,"name",{enumerable:!0,get:function(){return h.name}}),Object.defineProperty(n,"opt",{enumerable:!0,get:function(){return h.opt}}),Object.defineProperty(n,"param",{enumerable:!0,get:function(){return h.param}}),Object.defineProperty(n,"tuple",{enumerable:!0,get:function(){return h.tuple}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return h.union}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return h.intersection}}),Object.defineProperty(n,"BasicType",{enumerable:!0,get:function(){return h.BasicType}});var k=tr;Object.defineProperty(n,"VError",{enumerable:!0,get:function(){return k.VError}});function I(){for(var w=[],x=0;x<arguments.length;x++)w[x]=arguments[x];for(var y=Object.assign.apply(Object,o([{},l.basicTypes],w)),E={},L=0,_=w;L<_.length;L++)for(var F=_[L],D=0,H=Object.keys(F);D<H.length;D++){var O=H[D];E[O]=new S(y,F[O])}return E}n.createCheckers=I;var S=function(){function w(x,y,E){if(E===void 0&&(E="value"),this.suite=x,this.ttype=y,this._path=E,this.props=new Map,y instanceof l.TIface)for(var L=0,_=y.props;L<_.length;L++){var F=_[L];this.props.set(F.name,F.ttype)}this.checkerPlain=this.ttype.getChecker(x,!1),this.checkerStrict=this.ttype.getChecker(x,!0)}return w.prototype.setReportedPath=function(x){this._path=x},w.prototype.check=function(x){return this._doCheck(this.checkerPlain,x)},w.prototype.test=function(x){return this.checkerPlain(x,new c.NoopContext)},w.prototype.validate=function(x){return this._doValidate(this.checkerPlain,x)},w.prototype.strictCheck=function(x){return this._doCheck(this.checkerStrict,x)},w.prototype.strictTest=function(x){return this.checkerStrict(x,new c.NoopContext)},w.prototype.strictValidate=function(x){return this._doValidate(this.checkerStrict,x)},w.prototype.getProp=function(x){var y=this.props.get(x);if(!y)throw new Error("Type has no property "+x);return new w(this.suite,y,this._path+"."+x)},w.prototype.methodArgs=function(x){var y=this._getMethod(x);return new w(this.suite,y.paramList)},w.prototype.methodResult=function(x){var y=this._getMethod(x);return new w(this.suite,y.result)},w.prototype.getArgs=function(){if(!(this.ttype instanceof l.TFunc))throw new Error("getArgs() applied to non-function");return new w(this.suite,this.ttype.paramList)},w.prototype.getResult=function(){if(!(this.ttype instanceof l.TFunc))throw new Error("getResult() applied to non-function");return new w(this.suite,this.ttype.result)},w.prototype.getType=function(){return this.ttype},w.prototype._doCheck=function(x,y){var E=new c.NoopContext;if(!x(y,E)){var L=new c.DetailContext;throw x(y,L),L.getError(this._path)}},w.prototype._doValidate=function(x,y){var E=new c.NoopContext;if(x(y,E))return null;var L=new c.DetailContext;return x(y,L),L.getErrorDetail(this._path)},w.prototype._getMethod=function(x){var y=this.props.get(x);if(!y)throw new Error("Type has no property "+x);if(!(y instanceof l.TFunc))throw new Error("Property "+x+" is not a method");return y},w}();n.Checker=S})(At);const lg=At.union(At.lit("jsx"),At.lit("typescript"),At.lit("flow"),At.lit("imports"),At.lit("react-hot-loader"),At.lit("jest")),ug=At.iface([],{compiledFilename:"string"}),cg=At.iface([],{transforms:At.array("Transform"),jsxPragma:At.opt("string"),jsxFragmentPragma:At.opt("string"),enableLegacyTypeScriptModuleInterop:At.opt("boolean"),enableLegacyBabel5ModuleInterop:At.opt("boolean"),sourceMapOptions:At.opt("SourceMapOptions"),filePath:At.opt("string"),production:At.opt("boolean"),disableESTransforms:At.opt("boolean")}),fg={Transform:lg,SourceMapOptions:ug,Options:cg},{Options:hg}=At.createCheckers(fg);function pg(n){hg.strictCheck(n)}function pf(){oe(),qt(!1)}function df(n){oe(),Fo(n)}function Gr(n){Ye(),kl(n)}function bo(){Ye(),d.tokens[d.tokens.length-1].identifierRole=je.ImportDeclaration}function kl(n){let o;d.scopeDepth===0?o=je.TopLevelDeclaration:n?o=je.BlockScopedDeclaration:o=je.FunctionScopedDeclaration,d.tokens[d.tokens.length-1].identifierRole=o}function Fo(n){switch(d.type){case s._this:{const o=$e(0);oe(),Ge(o);return}case s._yield:case s.name:{d.type=s.name,Gr(n);return}case s.bracketL:{oe(),yl(s.bracketR,n,!0);return}case s.braceL:Of(!0,n);return;default:We()}}function yl(n,o,l=!1,c=!1,h=0){let k=!0,I=!1;const S=d.tokens.length;for(;!Z(n)&&!d.error;)if(k?k=!1:(ie(s.comma),d.tokens[d.tokens.length-1].contextId=h,!I&&d.tokens[S].isType&&(d.tokens[d.tokens.length-1].isType=!0,I=!0)),!(l&&C(s.comma))){if(Z(n))break;if(C(s.ellipsis)){df(o),mf(),Z(s.comma),ie(n);break}else dg(c,o)}}function dg(n,o){n&&bl([R._public,R._protected,R._private,R._readonly,R._override]),wo(o),mf(),wo(o,!0)}function mf(){st?Pk():et&&wv()}function wo(n,o=!1){if(o||Fo(n),!Z(s.eq))return;const l=d.tokens.length-1;qt(),d.tokens[l].rhsEndIndex=d.tokens.length}function el(){return C(s.name)}function mg(){return C(s.name)||Boolean(d.type&s.IS_KEYWORD)||C(s.string)||C(s.num)||C(s.bigint)||C(s.decimal)}function gf(){const n=d.snapshot();return oe(),(C(s.bracketL)||C(s.braceL)||C(s.star)||C(s.ellipsis)||C(s.hash)||mg())&&!ir()?!0:(d.restoreFromSnapshot(n),!1)}function bl(n){for(;vf(n)!==null;);}function vf(n){if(!C(s.name))return null;const o=d.contextualKeyword;if(n.indexOf(o)!==-1&&gf()){switch(o){case R._readonly:d.tokens[d.tokens.length-1].type=s._readonly;break;case R._abstract:d.tokens[d.tokens.length-1].type=s._abstract;break;case R._static:d.tokens[d.tokens.length-1].type=s._static;break;case R._public:d.tokens[d.tokens.length-1].type=s._public;break;case R._private:d.tokens[d.tokens.length-1].type=s._private;break;case R._protected:d.tokens[d.tokens.length-1].type=s._protected;break;case R._override:d.tokens[d.tokens.length-1].type=s._override;break;case R._declare:d.tokens[d.tokens.length-1].type=s._declare;break}return o}return null}function Os(){for(Ye();Z(s.dot);)Ye()}function gg(){Os(),!ir()&&C(s.lessThan)&&Ur()}function vg(){oe(),Ds()}function kg(){oe()}function yg(){ie(s._typeof),C(s._import)?kf():Os()}function kf(){ie(s._import),ie(s.parenL),ie(s.string),ie(s.parenR),Z(s.dot)&&Os(),C(s.lessThan)&&Ur()}function bg(){Ye(),Z(s._extends)&&bt(),Z(s.eq)&&bt()}function pi(){C(s.lessThan)&&Bo()}function Bo(){const n=$e(0);for(C(s.lessThan)||C(s.typeParameterStart)?oe():We();!Z(s.greaterThan)&&!d.error;)bg(),Z(s.comma);Ge(n)}function wl(n){const o=n===s.arrow;pi(),ie(s.parenL),d.scopeDepth++,wg(!1),d.scopeDepth--,(o||C(n))&&As(n)}function wg(n){yl(s.parenR,n)}function xo(){Z(s.comma)||ht()}function p1(){wl(s.colon),xo()}function xg(){const n=d.snapshot();oe();const o=Z(s.name)&&C(s.colon);return d.restoreFromSnapshot(n),o}function yf(){if(!(C(s.bracketL)&&xg()))return!1;const n=$e(0);return ie(s.bracketL),Ye(),Ds(),ie(s.bracketR),zi(),xo(),Ge(n),!0}function d1(n){Z(s.question),!n&&(C(s.parenL)||C(s.lessThan))?(wl(s.colon),xo()):(zi(),xo())}function _g(){if(C(s.parenL)||C(s.lessThan)){p1();return}if(C(s._new)){oe(),C(s.parenL)||C(s.lessThan)?p1():d1(!1);return}const n=!!vf([R._readonly]);yf()||((Re(R._get)||Re(R._set))&&gf(),Ls(-1),d1(n))}function Sg(){bf()}function bf(){for(ie(s.braceL);!Z(s.braceR)&&!d.error;)_g()}function Tg(){const n=d.snapshot(),o=Ig();return d.restoreFromSnapshot(n),o}function Ig(){return oe(),Z(s.plus)||Z(s.minus)?Re(R._readonly):(Re(R._readonly)&&oe(),!C(s.bracketL)||(oe(),!el())?!1:(oe(),C(s._in)))}function Cg(){Ye(),ie(s._in),bt()}function Ag(){ie(s.braceL),C(s.plus)||C(s.minus)?(oe(),zt(R._readonly)):nn(R._readonly),ie(s.bracketL),Cg(),nn(R._as)&&bt(),ie(s.bracketR),C(s.plus)||C(s.minus)?(oe(),ie(s.question)):Z(s.question),zg(),ht(),ie(s.braceR)}function Lg(){for(ie(s.bracketL);!Z(s.bracketR)&&!d.error;)Eg(),Z(s.comma)}function Eg(){Z(s.ellipsis)?bt():(bt(),Z(s.question)),Z(s.colon)&&bt()}function Ng(){ie(s.parenL),bt(),ie(s.parenR)}function Pg(){for(Fr(),Fr();!C(s.backQuote)&&!d.error;)ie(s.dollarBraceL),bt(),Fr(),Fr();oe()}var Wr;(function(n){n[n.TSFunctionType=0]="TSFunctionType";const l=0+1;n[n.TSConstructorType=l]="TSConstructorType";const c=l+1;n[n.TSAbstractConstructorType=c]="TSAbstractConstructorType"})(Wr||(Wr={}));function Ha(n){n===Wr.TSAbstractConstructorType&&zt(R._abstract),(n===Wr.TSConstructorType||n===Wr.TSAbstractConstructorType)&&ie(s._new),wl(s.arrow)}function Og(){switch(d.type){case s.name:gg();return;case s._void:case s._null:oe();return;case s.string:case s.num:case s.bigint:case s.decimal:case s._true:case s._false:ji();return;case s.minus:oe(),ji();return;case s._this:{kg(),Re(R._is)&&!ir()&&vg();return}case s._typeof:yg();return;case s._import:kf();return;case s.braceL:Tg()?Ag():Sg();return;case s.bracketL:Lg();return;case s.parenL:Ng();return;case s.backQuote:Pg();return;default:if(d.type&s.IS_KEYWORD){oe(),d.tokens[d.tokens.length-1].type=s.name;return}break}We()}function Dg(){for(Og();!ir()&&Z(s.bracketL);)Z(s.bracketR)||(bt(),ie(s.bracketR))}function Mg(){zt(R._infer),Ye()}function tl(){Re(R._keyof)||Re(R._unique)||Re(R._readonly)?(oe(),tl()):Re(R._infer)?Mg():Dg()}function m1(){if(Z(s.bitwiseAND),tl(),C(s.bitwiseAND))for(;Z(s.bitwiseAND);)tl()}function Rg(){if(Z(s.bitwiseOR),m1(),C(s.bitwiseOR))for(;Z(s.bitwiseOR);)m1()}function Fg(){return C(s.lessThan)?!0:C(s.parenL)&&Wg()}function Bg(){if(C(s.name)||C(s._this))return oe(),!0;if(C(s.braceL)||C(s.bracketL)){let n=1;for(oe();n>0&&!d.error;)C(s.braceL)||C(s.bracketL)?n++:(C(s.braceR)||C(s.bracketR))&&n--,oe();return!0}return!1}function Wg(){const n=d.snapshot(),o=Hg();return d.restoreFromSnapshot(n),o}function Hg(){return oe(),!!(C(s.parenR)||C(s.ellipsis)||Bg()&&(C(s.colon)||C(s.comma)||C(s.question)||C(s.eq)||C(s.parenR)&&(oe(),C(s.arrow))))}function As(n){const o=$e(0);ie(n),qg()||bt(),Ge(o)}function jg(){C(s.colon)&&As(s.colon)}function zi(){C(s.colon)&&Ds()}function zg(){Z(s.colon)&&bt()}function qg(){const n=d.snapshot();return Re(R._asserts)&&!ir()?(oe(),nn(R._is)?(bt(),!0):el()||C(s._this)?(oe(),nn(R._is)&&bt(),!0):(d.restoreFromSnapshot(n),!1)):el()||C(s._this)?(oe(),Re(R._is)&&!ir()?(oe(),bt(),!0):(d.restoreFromSnapshot(n),!1)):!1}function Ds(){const n=$e(0);ie(s.colon),bt(),Ge(n)}function bt(){g1(),!(ir()||!Z(s._extends))&&(g1(),ie(s.question),bt(),ie(s.colon),bt())}function Ug(){return Re(R._abstract)&&kt()===s._new}function g1(){if(Fg()){Ha(Wr.TSFunctionType);return}if(C(s._new)){Ha(Wr.TSConstructorType);return}else if(Ug()){Ha(Wr.TSAbstractConstructorType);return}Rg()}function $g(){const n=$e(1);bt(),ie(s.greaterThan),Ge(n),Ms()}function Gg(){if(Z(s.jsxTagStart)){d.tokens[d.tokens.length-1].type=s.typeParameterStart;const n=$e(1);for(;!C(s.greaterThan)&&!d.error;)bt(),Z(s.comma);Pn(),Ge(n)}}function wf(){for(;!C(s.braceL)&&!d.error;)Kg(),Z(s.comma)}function Kg(){Os(),C(s.lessThan)&&Ur()}function Xg(){Gr(!1),pi(),Z(s._extends)&&wf(),bf()}function Vg(){Gr(!1),pi(),ie(s.eq),bt(),ht()}function Yg(){if(C(s.string)?ji():Ye(),Z(s.eq)){const n=d.tokens.length-1;qt(),d.tokens[n].rhsEndIndex=d.tokens.length}}function xl(){for(Gr(!1),ie(s.braceL);!Z(s.braceR)&&!d.error;)Yg(),Z(s.comma)}function _l(){ie(s.braceL),zo(s.braceR)}function nl(){Gr(!1),Z(s.dot)?nl():_l()}function xf(){Re(R._global)?Ye():C(s.string)?wr():We(),C(s.braceL)?_l():ht()}function rl(){bo(),ie(s.eq),Zg(),ht()}function Jg(){return Re(R._require)&&kt()===s.parenL}function Zg(){Jg()?Qg():Os()}function Qg(){zt(R._require),ie(s.parenL),C(s.string)||We(),ji(),ie(s.parenR)}function ev(){if(br())return!1;switch(d.type){case s._function:{const n=$e(1);oe();const o=d.start;return ci(o,!0),Ge(n),!0}case s._class:{const n=$e(1);return fi(!0,!1),Ge(n),!0}case s._const:if(C(s._const)&&K1(R._enum)){const n=$e(1);return ie(s._const),zt(R._enum),d.tokens[d.tokens.length-1].type=s._enum,xl(),Ge(n),!0}case s._var:case s._let:{const n=$e(1);return qf(d.type),Ge(n),!0}case s.name:{const n=$e(1),o=d.contextualKeyword;let l=!1;return o===R._global?(xf(),l=!0):l=Wo(o,!0),Ge(n),l}default:return!1}}function v1(){return Wo(d.contextualKeyword,!0)}function tv(n){switch(n){case R._declare:{const o=d.tokens.length-1;if(ev())return d.tokens[o].type=s._declare,!0;break}case R._global:if(C(s.braceL))return _l(),!0;break;default:return Wo(n,!1)}return!1}function Wo(n,o){switch(n){case R._abstract:if(Mi(o)&&C(s._class))return d.tokens[d.tokens.length-1].type=s._abstract,fi(!0,!1),!0;break;case R._enum:if(Mi(o)&&C(s.name))return d.tokens[d.tokens.length-1].type=s._enum,xl(),!0;break;case R._interface:if(Mi(o)&&C(s.name)){const l=$e(o?2:1);return Xg(),Ge(l),!0}break;case R._module:if(Mi(o)){if(C(s.string)){const l=$e(o?2:1);return xf(),Ge(l),!0}else if(C(s.name)){const l=$e(o?2:1);return nl(),Ge(l),!0}}break;case R._namespace:if(Mi(o)&&C(s.name)){const l=$e(o?2:1);return nl(),Ge(l),!0}break;case R._type:if(Mi(o)&&C(s.name)){const l=$e(o?2:1);return Vg(),Ge(l),!0}break}return!1}function Mi(n){return n?(oe(),!0):!br()}function nv(){const n=d.snapshot();return Bo(),qi(),jg(),ie(s.arrow),d.error?(d.restoreFromSnapshot(n),!1):(Rs(!0),!0)}function Ur(){const n=$e(0);for(ie(s.lessThan);!Z(s.greaterThan)&&!d.error;)bt(),Z(s.comma);Ge(n)}function _f(){if(C(s.name))switch(d.contextualKeyword){case R._abstract:case R._declare:case R._enum:case R._interface:case R._module:case R._namespace:case R._type:return!0}return!1}function rv(n,o){if(C(s.colon)&&As(s.colon),!C(s.braceL)&&br()){let l=d.tokens.length-1;for(;l>=0&&(d.tokens[l].start>=n||d.tokens[l].type===s._default||d.tokens[l].type===s._export);)d.tokens[l].isType=!0,l--;return}Rs(!1,o)}function iv(n,o,l){if(!ir()&&Z(s.bang)){d.tokens[d.tokens.length-1].type=s.nonNullAssertion;return}if(C(s.lessThan)){const c=d.snapshot();if(!o&&Pf()&&nv())return;if(Ur(),!o&&Z(s.parenL)?(d.tokens[d.tokens.length-1].subscriptStartIndex=n,Hr()):C(s.backQuote)?Al():We(),d.error)d.restoreFromSnapshot(c);else return}else!o&&C(s.questionDot)&&kt()===s.lessThan&&(oe(),d.tokens[n].isOptionalChainStart=!0,d.tokens[d.tokens.length-1].subscriptStartIndex=n,Ur(),ie(s.parenL),Hr());Tl(n,o,l)}function sv(){if(C(s.lessThan)){const n=d.snapshot();d.type=s.typeParameterStart,Ur(),C(s.parenL)||We(),d.error&&d.restoreFromSnapshot(n)}}function ov(){return Z(s._import)?(Re(R._type)&&kt()!==s.eq&&zt(R._type),rl(),!0):Z(s.eq)?(Jt(),ht(),!0):nn(R._as)?(zt(R._namespace),Ye(),ht(),!0):(Re(R._type)&&kt()===s.braceL&&oe(),!1)}function av(){if(Re(R._abstract)&&kt()===s._class)return d.type=s._abstract,oe(),fi(!0,!0),!0;if(Re(R._interface)){const n=$e(2);return Wo(R._interface,!0),Ge(n),!0}return!1}function lv(){if(d.type===s._const){const n=Ro();if(n.type===s.name&&n.contextualKeyword===R._enum)return ie(s._const),zt(R._enum),d.tokens[d.tokens.length-1].type=s._enum,xl(),!0}return!1}function uv(n){const o=d.tokens.length;bl([R._abstract,R._readonly,R._declare,R._static,R._override]);const l=d.tokens.length;if(yf()){const h=n?o-1:o;for(let k=h;k<l;k++)d.tokens[k].isType=!0;return!0}return!1}function cv(n){tv(n)||ht()}function fv(){const n=nn(R._declare);n&&(d.tokens[d.tokens.length-1].type=s._declare);let o=!1;if(C(s.name))if(n){const l=$e(2);o=v1(),Ge(l)}else o=v1();if(!o)if(n){const l=$e(2);Cn(!0),Ge(l)}else Cn(!0)}function hv(n){if(n&&C(s.lessThan)&&Ur(),nn(R._implements)){d.tokens[d.tokens.length-1].type=s._implements;const o=$e(1);wf(),Ge(o)}}function pv(){pi()}function dv(){pi()}function mv(){const n=$e(0);Z(s.bang),zi(),Ge(n)}function gv(){C(s.colon)&&Ds()}function vv(n,o){return Do?kv(n,o):yv(n,o)}function kv(n,o){if(!C(s.lessThan))return nr(n,o);const l=d.snapshot();let c=nr(n,o);if(d.error)d.restoreFromSnapshot(l);else return c;return d.type=s.typeParameterStart,Bo(),c=nr(n,o),c||We(),c}function yv(n,o){if(!C(s.lessThan))return nr(n,o);const l=d.snapshot();Bo();const c=nr(n,o);if(c||We(),d.error)d.restoreFromSnapshot(l);else return c;return nr(n,o)}function bv(){if(C(s.colon)){const n=d.snapshot();As(s.colon),In()&&We(),C(s.arrow)||We(),d.error&&d.restoreFromSnapshot(n)}return Z(s.arrow)}function wv(){const n=$e(0);Z(s.question),zi(),Ge(n)}function xv(){C(s.lessThan)&&Ur(),zf()}function _v(){for(;;){if(d.pos>=xe.length){We("Unterminated JSX contents");return}const n=xe.charCodeAt(d.pos);switch(n){case q.lessThan:case q.leftCurlyBrace:if(d.pos===d.start){if(n===q.lessThan){d.pos++,Ue(s.jsxTagStart);return}sf(n);return}Ue(s.jsxText);return;default:d.pos++}}}function Sv(n){for(d.pos++;;){if(d.pos>=xe.length){We("Unterminated string constant");return}if(xe.charCodeAt(d.pos)===n){d.pos++;break}d.pos++}Ue(s.string)}function Tv(){let n;do{if(d.pos>xe.length){We("Unexpectedly reached the end of input.");return}n=xe.charCodeAt(++d.pos)}while(zn[n]||n===q.dash);Ue(s.jsxName)}function il(){Pn()}function Sf(n){if(il(),!Z(s.colon)){d.tokens[d.tokens.length-1].identifierRole=n;return}il()}function Tf(){for(Sf(je.Access);C(s.dot);)Pn(),il()}function Iv(){switch(d.type){case s.braceL:oe(),If(),Pn();return;case s.jsxTagStart:Af(),Pn();return;case s.string:Pn();return;default:We("JSX value should be either an expression or a quoted JSX text")}}function Cv(){ie(s.ellipsis),Jt()}function If(){C(s.braceR)||Jt()}function Av(){if(Z(s.braceL)){ie(s.ellipsis),qt(),Pn();return}Sf(je.ObjectKey),C(s.eq)&&(Pn(),Iv())}function Lv(){if(C(s.jsxTagEnd))return!1;for(Tf(),et&&Gg();!C(s.slash)&&!C(s.jsxTagEnd)&&!d.error;)Av();const n=C(s.slash);return n&&Pn(),n}function Ev(){C(s.jsxTagEnd)||Tf()}function Cf(){if(!Lv())for(bs();;)switch(d.type){case s.jsxTagStart:if(Pn(),C(s.slash)){Pn(),Ev();return}Cf(),bs();break;case s.jsxText:bs();break;case s.braceL:oe(),C(s.ellipsis)?(Cv(),bs()):(If(),bs());break;default:We();return}}function Af(){Pn(),Cf()}function Pn(){d.tokens.push(new Mo),rf(),d.start=d.pos;const n=xe.charCodeAt(d.pos);if(Ps[n])Tv();else if(n===q.quotationMark||n===q.apostrophe)Sv(n);else switch(++d.pos,n){case q.greaterThan:Ue(s.jsxTagEnd);break;case q.lessThan:Ue(s.jsxTagStart);break;case q.slash:Ue(s.slash);break;case q.equalsTo:Ue(s.eq);break;case q.leftCurlyBrace:Ue(s.braceL);break;case q.dot:Ue(s.dot);break;case q.colon:Ue(s.colon);break;default:We()}}function bs(){d.tokens.push(new Mo),d.start=d.pos,_v()}function Nv(n){if(C(s.question)){const o=kt();if(o===s.colon||o===s.comma||o===s.parenR)return}Lf(n)}function Pv(){Z1(s.question),C(s.colon)&&(et?Ds():st&&di())}class Ov{constructor(o){this.stop=o}}function Jt(n=!1){if(qt(n),C(s.comma))for(;Z(s.comma);)qt(n)}function qt(n=!1,o=!1){return et?vv(n,o):st?Bk(n,o):nr(n,o)}function nr(n,o){if(C(s._yield))return Yv(),!1;(C(s.parenL)||C(s.name)||C(s._yield))&&(d.potentialArrowAt=d.start);const l=Dv(n);return o&&Cl(),d.type&s.IS_ASSIGN?(oe(),qt(n),!1):l}function Dv(n){return Rv(n)?!0:(Mv(n),!1)}function Mv(n){et||st?Nv(n):Lf(n)}function Lf(n){Z(s.question)&&(qt(),ie(s.colon),qt(n))}function Rv(n){const o=d.tokens.length;return Ms()?!0:(vo(o,-1,n),!1)}function vo(n,o,l){if(et&&(s._in&s.PRECEDENCE_MASK)>o&&!ir()&&nn(R._as)){d.tokens[d.tokens.length-1].type=s._as;const h=$e(1);bt(),Ge(h),vo(n,o,l);return}const c=d.type&s.PRECEDENCE_MASK;if(c>0&&(!l||!C(s._in))&&c>o){const h=d.type;oe(),h===s.nullishCoalescing&&(d.tokens[d.tokens.length-1].nullishStartIndex=n);const k=d.tokens.length;Ms(),vo(k,h&s.IS_RIGHT_ASSOCIATIVE?c-1:c,l),h===s.nullishCoalescing&&(d.tokens[n].numNullishCoalesceStarts++,d.tokens[d.tokens.length-1].numNullishCoalesceEnds++),vo(n,o,l)}}function Ms(){if(et&&!Do&&Z(s.lessThan))return $g(),!1;if(Re(R._module)&&ef()===q.leftCurlyBrace&&!Sm())return Jv(),!1;if(d.type&s.IS_PREFIX)return oe(),Ms(),!1;if(Ef())return!0;for(;d.type&s.IS_POSTFIX&&!In();)d.type===s.preIncDec&&(d.type=s.postIncDec),oe();return!1}function Ef(){const n=d.tokens.length;return wr()?!0:(Sl(n),d.tokens.length>n&&d.tokens[n].isOptionalChainStart&&(d.tokens[d.tokens.length-1].isOptionalChainEnd=!0),!1)}function Sl(n,o=!1){st?Hk(n,o):Nf(n,o)}function Nf(n,o=!1){const l=new Ov(!1);do Fv(n,o,l);while(!l.stop&&!d.error)}function Fv(n,o,l){et?iv(n,o,l):st?wk(n,o,l):Tl(n,o,l)}function Tl(n,o,l){if(!o&&Z(s.doubleColon))Il(),l.stop=!0,Sl(n,o);else if(C(s.questionDot)){if(d.tokens[n].isOptionalChainStart=!0,o&&kt()===s.parenL){l.stop=!0;return}oe(),d.tokens[d.tokens.length-1].subscriptStartIndex=n,Z(s.bracketL)?(Jt(),ie(s.bracketR)):Z(s.parenL)?Hr():_o()}else if(Z(s.dot))d.tokens[d.tokens.length-1].subscriptStartIndex=n,_o();else if(Z(s.bracketL))d.tokens[d.tokens.length-1].subscriptStartIndex=n,Jt(),ie(s.bracketR);else if(!o&&C(s.parenL))if(Pf()){const c=d.snapshot(),h=d.tokens.length;oe(),d.tokens[d.tokens.length-1].subscriptStartIndex=n;const k=Cs();d.tokens[d.tokens.length-1].contextId=k,Hr(),d.tokens[d.tokens.length-1].contextId=k,Bv()&&(d.restoreFromSnapshot(c),l.stop=!0,d.scopeDepth++,qi(),Wv(h))}else{oe(),d.tokens[d.tokens.length-1].subscriptStartIndex=n;const c=Cs();d.tokens[d.tokens.length-1].contextId=c,Hr(),d.tokens[d.tokens.length-1].contextId=c}else C(s.backQuote)?Al():l.stop=!0}function Pf(){return d.tokens[d.tokens.length-1].contextualKeyword===R._async&&!In()}function Hr(){let n=!0;for(;!Z(s.parenR)&&!d.error;){if(n)n=!1;else if(ie(s.comma),Z(s.parenR))break;Rf(!1)}}function Bv(){return C(s.colon)||C(s.arrow)}function Wv(n){et?gv():st&&Fk(),ie(s.arrow),Es(n)}function Il(){const n=d.tokens.length;wr(),Sl(n,!0)}function wr(){if(Z(s.modulo))return Ye(),!1;if(C(s.jsxText))return ji(),!1;if(C(s.lessThan)&&Do)return d.type=s.jsxTagStart,Af(),oe(),!1;const n=d.potentialArrowAt===d.start;switch(d.type){case s.slash:case s.assign:Nm();case s._super:case s._this:case s.regexp:case s.num:case s.bigint:case s.decimal:case s.string:case s._null:case s._true:case s._false:return oe(),!1;case s._import:return oe(),C(s.dot)&&(d.tokens[d.tokens.length-1].type=s.name,oe(),Ye()),!1;case s.name:{const o=d.tokens.length,l=d.start,c=d.contextualKeyword;return Ye(),c===R._await?(Vv(),!1):c===R._async&&C(s._function)&&!In()?(oe(),ci(l,!1),!1):n&&c===R._async&&!In()&&C(s.name)?(d.scopeDepth++,Gr(!1),ie(s.arrow),Es(o),!0):C(s._do)&&!In()?(oe(),jr(),!1):n&&!In()&&C(s.arrow)?(d.scopeDepth++,kl(!1),ie(s.arrow),Es(o),!0):(d.tokens[d.tokens.length-1].identifierRole=je.Access,!1)}case s._do:return oe(),jr(),!1;case s.parenL:return jv(n);case s.bracketL:return oe(),Mf(s.bracketR,!0),!1;case s.braceL:return Of(!1,!1),!1;case s._function:return Hv(),!1;case s.at:Fl();case s._class:return fi(!1),!1;case s._new:return qv(),!1;case s.backQuote:return Al(),!1;case s.doubleColon:return oe(),Il(),!1;case s.hash:{const o=ef();return Ps[o]||o===q.backslash?_o():oe(),!1}default:return We(),!1}}function _o(){Z(s.hash),Ye()}function Hv(){const n=d.start;Ye(),Z(s.dot)&&Ye(),ci(n,!1)}function ji(){oe()}function Ho(){ie(s.parenL),Jt(),ie(s.parenR)}function jv(n){const o=d.snapshot(),l=d.tokens.length;ie(s.parenL);let c=!0;for(;!C(s.parenR)&&!d.error;){if(c)c=!1;else if(ie(s.comma),C(s.parenR))break;if(C(s.ellipsis)){df(!1),Cl();break}else qt(!1,!0)}return ie(s.parenR),n&&zv()&&sl()?(d.restoreFromSnapshot(o),d.scopeDepth++,qi(),sl(),Es(l),!0):!1}function zv(){return C(s.colon)||!In()}function sl(){return et?bv():st?Wk():Z(s.arrow)}function Cl(){(et||st)&&Pv()}function qv(){if(ie(s._new),Z(s.dot)){Ye();return}Il(),Z(s.questionDot),Uv()}function Uv(){et?sv():st&&xk(),Z(s.parenL)&&Mf(s.parenR)}function Al(){for(Fr(),Fr();!C(s.backQuote)&&!d.error;)ie(s.dollarBraceL),Jt(),Fr(),Fr();oe()}function Of(n,o){const l=Cs();let c=!0;for(oe(),d.tokens[d.tokens.length-1].contextId=l;!Z(s.braceR)&&!d.error;){if(c)c=!1;else if(ie(s.comma),Z(s.braceR))break;let h=!1;if(C(s.ellipsis)){const k=d.tokens.length;if(pf(),n&&(d.tokens.length===k+2&&kl(o),Z(s.braceR)))break;continue}n||(h=Z(s.star)),!n&&Re(R._async)?(h&&We(),Ye(),C(s.colon)||C(s.parenL)||C(s.braceR)||C(s.eq)||C(s.comma)||(C(s.star)&&(oe(),h=!0),Ls(l))):Ls(l),Xv(n,o,l)}d.tokens[d.tokens.length-1].contextId=l}function $v(n){return!n&&(C(s.string)||C(s.num)||C(s.bracketL)||C(s.name)||!!(d.type&s.IS_KEYWORD))}function Gv(n,o){const l=d.start;return C(s.parenL)?(n&&We(),ol(l,!1),!0):$v(n)?(Ls(o),ol(l,!1),!0):!1}function Kv(n,o){if(Z(s.colon)){n?wo(o):qt(!1);return}let l;n?d.scopeDepth===0?l=je.ObjectShorthandTopLevelDeclaration:o?l=je.ObjectShorthandBlockScopedDeclaration:l=je.ObjectShorthandFunctionScopedDeclaration:l=je.ObjectShorthand,d.tokens[d.tokens.length-1].identifierRole=l,wo(o,!0)}function Xv(n,o,l){et?pv():st&&Nk(),Gv(n,l)||Kv(n,o)}function Ls(n){st&&Rl(),Z(s.bracketL)?(d.tokens[d.tokens.length-1].contextId=n,qt(),ie(s.bracketR),d.tokens[d.tokens.length-1].contextId=n):(C(s.num)||C(s.string)||C(s.bigint)||C(s.decimal)?wr():_o(),d.tokens[d.tokens.length-1].identifierRole=je.ObjectKey,d.tokens[d.tokens.length-1].contextId=n)}function ol(n,o){const l=Cs();d.scopeDepth++;const c=d.tokens.length;qi(o,l),Df(n,l);const k=d.tokens.length;d.scopes.push(new rr(c,k,!0)),d.scopeDepth--}function Es(n){Rs(!0);const o=d.tokens.length;d.scopes.push(new rr(n,o,!0)),d.scopeDepth--}function Df(n,o=0){et?rv(n,o):st?bk(o):Rs(!1,o)}function Rs(n,o=0){n&&!C(s.braceL)?qt():jr(!0,o)}function Mf(n,o=!1){let l=!0;for(;!Z(n)&&!d.error;){if(l)l=!1;else if(ie(s.comma),Z(n))break;Rf(o)}}function Rf(n){n&&C(s.comma)||(C(s.ellipsis)?(pf(),Cl()):C(s.question)?oe():qt(!1,!0))}function Ye(){oe(),d.tokens[d.tokens.length-1].type=s.name}function Vv(){Ms()}function Yv(){oe(),!C(s.semi)&&!In()&&(Z(s.star),qt())}function Jv(){zt(R._module),ie(s.braceL),zo(s.braceR)}function Zv(n){return(n.type===s.name||!!(n.type&s.IS_KEYWORD))&&n.contextualKeyword!==R._from}function sr(n){const o=$e(0);ie(n||s.colon),bn(),Ge(o)}function k1(){ie(s.modulo),zt(R._checks),Z(s.parenL)&&(Jt(),ie(s.parenR))}function Ll(){const n=$e(0);ie(s.colon),C(s.modulo)?k1():(bn(),C(s.modulo)&&k1()),Ge(n)}function Qv(){oe(),El(!0)}function ek(){oe(),Ye(),C(s.lessThan)&&Un(),ie(s.parenL),ll(),ie(s.parenR),Ll(),ht()}function al(){C(s._class)?Qv():C(s._function)?ek():C(s._var)?tk():nn(R._module)?Z(s.dot)?ik():nk():Re(R._type)?sk():Re(R._opaque)?ok():Re(R._interface)?ak():C(s._export)?rk():We()}function tk(){oe(),Hf(),ht()}function nk(){for(C(s.string)?wr():Ye(),ie(s.braceL);!C(s.braceR)&&!d.error;)C(s._import)?(oe(),Vf()):We();ie(s.braceR)}function rk(){ie(s._export),Z(s._default)?C(s._function)||C(s._class)?al():(bn(),ht()):C(s._var)||C(s._function)||C(s._class)||Re(R._opaque)?al():C(s.star)||C(s.braceL)||Re(R._interface)||Re(R._type)||Re(R._opaque)?Kf():We()}function ik(){zt(R._exports),di(),ht()}function sk(){oe(),Pl()}function ok(){oe(),Ol(!0)}function ak(){oe(),El()}function El(n=!1){if(jo(),C(s.lessThan)&&Un(),Z(s._extends))do ko();while(!n&&Z(s.comma));if(Re(R._mixins)){oe();do ko();while(Z(s.comma))}if(Re(R._implements)){oe();do ko();while(Z(s.comma))}So(n,!1,n)}function ko(){Ff(!1),C(s.lessThan)&&ui()}function Nl(){El()}function jo(){Ye()}function Pl(){jo(),C(s.lessThan)&&Un(),sr(s.eq),ht()}function Ol(n){zt(R._type),jo(),C(s.lessThan)&&Un(),C(s.colon)&&sr(s.colon),n||sr(s.eq),ht()}function lk(){Rl(),Hf(),Z(s.eq)&&bn()}function Un(){const n=$e(0);C(s.lessThan)||C(s.typeParameterStart)?oe():We();do lk(),C(s.greaterThan)||ie(s.comma);while(!C(s.greaterThan)&&!d.error);ie(s.greaterThan),Ge(n)}function ui(){const n=$e(0);for(ie(s.lessThan);!C(s.greaterThan)&&!d.error;)bn(),C(s.greaterThan)||ie(s.comma);ie(s.greaterThan),Ge(n)}function uk(){if(zt(R._interface),Z(s._extends))do ko();while(Z(s.comma));So(!1,!1,!1)}function Dl(){C(s.num)||C(s.string)?wr():Ye()}function ck(){kt()===s.colon?(Dl(),sr()):bn(),ie(s.bracketR),sr()}function fk(){Dl(),ie(s.bracketR),ie(s.bracketR),C(s.lessThan)||C(s.parenL)?Ml():(Z(s.question),sr())}function Ml(){for(C(s.lessThan)&&Un(),ie(s.parenL);!C(s.parenR)&&!C(s.ellipsis)&&!d.error;)To(),C(s.parenR)||ie(s.comma);Z(s.ellipsis)&&To(),ie(s.parenR),sr()}function hk(){Ml()}function So(n,o,l){let c;for(o&&C(s.braceBarL)?(ie(s.braceBarL),c=s.braceBarR):(ie(s.braceL),c=s.braceR);!C(c)&&!d.error;){if(l&&Re(R._proto)){const h=kt();h!==s.colon&&h!==s.question&&(oe(),n=!1)}if(n&&Re(R._static)){const h=kt();h!==s.colon&&h!==s.question&&oe()}if(Rl(),Z(s.bracketL))Z(s.bracketL)?fk():ck();else if(C(s.parenL)||C(s.lessThan))hk();else{if(Re(R._get)||Re(R._set)){const h=kt();(h===s.name||h===s.string||h===s.num)&&oe()}pk()}dk()}ie(c)}function pk(){if(C(s.ellipsis)){if(ie(s.ellipsis),Z(s.comma)||Z(s.semi),C(s.braceR))return;bn()}else Dl(),C(s.lessThan)||C(s.parenL)?Ml():(Z(s.question),sr())}function dk(){!Z(s.semi)&&!Z(s.comma)&&!C(s.braceR)&&!C(s.braceBarR)&&We()}function Ff(n){for(n||Ye();Z(s.dot);)Ye()}function mk(){Ff(!0),C(s.lessThan)&&ui()}function gk(){ie(s._typeof),Bf()}function vk(){for(ie(s.bracketL);d.pos<xe.length&&!C(s.bracketR)&&(bn(),!C(s.bracketR));)ie(s.comma);ie(s.bracketR)}function To(){const n=kt();n===s.colon||n===s.question?(Ye(),Z(s.question),sr()):bn()}function ll(){for(;!C(s.parenR)&&!C(s.ellipsis)&&!d.error;)To(),C(s.parenR)||ie(s.comma);Z(s.ellipsis)&&To()}function Bf(){let n=!1;const o=d.noAnonFunctionType;switch(d.type){case s.name:{if(Re(R._interface)){uk();return}Ye(),mk();return}case s.braceL:So(!1,!1,!1);return;case s.braceBarL:So(!1,!0,!1);return;case s.bracketL:vk();return;case s.lessThan:Un(),ie(s.parenL),ll(),ie(s.parenR),ie(s.arrow),bn();return;case s.parenL:if(oe(),!C(s.parenR)&&!C(s.ellipsis))if(C(s.name)){const l=kt();n=l!==s.question&&l!==s.colon}else n=!0;if(n)if(d.noAnonFunctionType=!1,bn(),d.noAnonFunctionType=o,d.noAnonFunctionType||!(C(s.comma)||C(s.parenR)&&kt()===s.arrow)){ie(s.parenR);return}else Z(s.comma);ll(),ie(s.parenR),ie(s.arrow),bn();return;case s.minus:oe(),ji();return;case s.string:case s.num:case s._true:case s._false:case s._null:case s._this:case s._void:case s.star:oe();return;default:if(d.type===s._typeof){gk();return}else if(d.type&s.IS_KEYWORD){oe(),d.tokens[d.tokens.length-1].type=s.name;return}}We()}function kk(){for(Bf();!In()&&(C(s.bracketL)||C(s.questionDot));)Z(s.questionDot),ie(s.bracketL),Z(s.bracketR)||(bn(),ie(s.bracketR))}function Wf(){Z(s.question)?Wf():kk()}function y1(){Wf(),!d.noAnonFunctionType&&Z(s.arrow)&&bn()}function b1(){for(Z(s.bitwiseAND),y1();Z(s.bitwiseAND);)y1()}function yk(){for(Z(s.bitwiseOR),b1();Z(s.bitwiseOR);)b1()}function bn(){yk()}function di(){sr()}function Hf(){Ye(),C(s.colon)&&di()}function Rl(){(C(s.plus)||C(s.minus))&&(oe(),d.tokens[d.tokens.length-1].isType=!0)}function bk(n){C(s.colon)&&Ll(),Rs(!1,n)}function wk(n,o,l){if(C(s.questionDot)&&kt()===s.lessThan){if(o){l.stop=!0;return}oe(),ui(),ie(s.parenL),Hr();return}else if(!o&&C(s.lessThan)){const c=d.snapshot();if(ui(),ie(s.parenL),Hr(),d.error)d.restoreFromSnapshot(c);else return}Tl(n,o,l)}function xk(){if(C(s.lessThan)){const n=d.snapshot();ui(),d.error&&d.restoreFromSnapshot(n)}}function _k(){if(C(s.name)&&d.contextualKeyword===R._interface){const n=$e(0);return oe(),Nl(),Ge(n),!0}else return!1}function Sk(n){if(n===R._declare){if(C(s._class)||C(s.name)||C(s._function)||C(s._var)||C(s._export)){const o=$e(1);al(),Ge(o)}}else if(C(s.name)){if(n===R._interface){const o=$e(1);Nl(),Ge(o)}else if(n===R._type){const o=$e(1);Pl(),Ge(o)}else if(n===R._opaque){const o=$e(1);Ol(!1),Ge(o)}}ht()}function Tk(){return Re(R._type)||Re(R._interface)||Re(R._opaque)}function Ik(){return C(s.name)&&(d.contextualKeyword===R._type||d.contextualKeyword===R._interface||d.contextualKeyword===R._opaque)}function Ck(){if(Re(R._type)){const n=$e(1);oe(),C(s.braceL)?(Bl(),Ns()):Pl(),Ge(n)}else if(Re(R._opaque)){const n=$e(1);oe(),Ol(!1),Ge(n)}else if(Re(R._interface)){const n=$e(1);oe(),Nl(),Ge(n)}else Cn(!0)}function Ak(){return C(s.star)||Re(R._type)&&kt()===s.star}function Lk(){if(nn(R._type)){const n=$e(2);cl(),Ge(n)}else cl()}function Ek(n){if(n&&C(s.lessThan)&&ui(),Re(R._implements)){const o=$e(0);oe(),d.tokens[d.tokens.length-1].type=s._implements;do jo(),C(s.lessThan)&&ui();while(Z(s.comma));Ge(o)}}function Nk(){C(s.lessThan)&&(Un(),C(s.parenL)||We())}function Pk(){const n=$e(0);Z(s.question),C(s.colon)&&di(),Ge(n)}function Ok(){if(C(s._typeof)||Re(R._type)){const n=Ro();(Zv(n)||n.type===s.braceL||n.type===s.star)&&oe()}}function Dk(){const n=d.contextualKeyword===R._type||d.type===s._typeof;n?oe():Ye(),Re(R._as)&&!K1(R._as)?(Ye(),n&&!C(s.name)&&!(d.type&s.IS_KEYWORD)||Ye()):n&&(C(s.name)||d.type&s.IS_KEYWORD)&&(Ye(),nn(R._as)&&Ye())}function Mk(){if(C(s.lessThan)){const n=$e(0);Un(),Ge(n)}}function Rk(){C(s.colon)&&di()}function Fk(){if(C(s.colon)){const n=d.noAnonFunctionType;d.noAnonFunctionType=!0,di(),d.noAnonFunctionType=n}}function Bk(n,o){if(C(s.lessThan)){const l=d.snapshot();let c=nr(n,o);if(d.error)d.restoreFromSnapshot(l),d.type=s.typeParameterStart;else return c;const h=$e(0);if(Un(),Ge(h),c=nr(n,o),c)return!0;We()}return nr(n,o)}function Wk(){if(C(s.colon)){const n=$e(0),o=d.snapshot(),l=d.noAnonFunctionType;d.noAnonFunctionType=!0,Ll(),d.noAnonFunctionType=l,In()&&We(),C(s.arrow)||We(),d.error&&d.restoreFromSnapshot(o),Ge(n)}return Z(s.arrow)}function Hk(n,o=!1){if(d.tokens[d.tokens.length-1].contextualKeyword===R._async&&C(s.lessThan)){const l=d.snapshot();if(jk()&&!d.error)return;d.restoreFromSnapshot(l)}Nf(n,o)}function jk(){d.scopeDepth++;const n=d.tokens.length;return qi(),sl()?(Es(n),!0):!1}function zk(){if(zo(s.eof),d.scopes.push(new rr(0,d.tokens.length,!0)),d.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${d.scopeDepth}`);return new Sy(d.tokens,d.scopes)}function Cn(n){st&&_k()||(C(s.at)&&Fl(),qk(n))}function qk(n){if(et&&lv())return;const o=d.type;switch(o){case s._break:case s._continue:$k();return;case s._debugger:Gk();return;case s._do:Kk();return;case s._for:Xk();return;case s._function:if(kt()===s.dot)break;n||We(),Yk();return;case s._class:n||We(),fi(!0);return;case s._if:Jk();return;case s._return:Zk();return;case s._switch:Qk();return;case s._throw:ey();return;case s._try:ny();return;case s._let:case s._const:n||We();case s._var:qf(o);return;case s._while:ry();return;case s.braceL:jr();return;case s.semi:iy();return;case s._export:case s._import:{const h=kt();if(h===s.parenL||h===s.dot)break;oe(),o===s._import?Vf():Kf();return}case s.name:if(d.contextualKeyword===R._async){const h=d.start,k=d.snapshot();if(oe(),C(s._function)&&!In()){ie(s._function),ci(h,!0);return}else d.restoreFromSnapshot(k)}}const l=d.tokens.length;Jt();let c=null;if(d.tokens.length===l+1){const h=d.tokens[d.tokens.length-1];h.type===s.name&&(c=h.contextualKeyword)}if(c==null){ht();return}Z(s.colon)?sy():oy(c)}function Fl(){for(;C(s.at);)jf()}function jf(){if(oe(),Z(s.parenL))Jt(),ie(s.parenR);else for(Ye();Z(s.dot);)Ye();Uk()}function Uk(){et?xv():zf()}function zf(){Z(s.parenL)&&Hr()}function $k(){oe(),br()||(Ye(),ht())}function Gk(){oe(),ht()}function Kk(){oe(),Cn(!1),ie(s._while),Ho(),Z(s.semi)}function Xk(){d.scopeDepth++;const n=d.tokens.length;Vk();const o=d.tokens.length;d.scopes.push(new rr(n,o,!1)),d.scopeDepth--}function Vk(){oe();let n=!1;if(Re(R._await)&&(n=!0,oe()),ie(s.parenL),C(s.semi)){n&&We(),ja();return}if(C(s._var)||C(s._let)||C(s._const)){const o=d.type;if(oe(),Uf(!0,o),C(s._in)||Re(R._of)){w1(n);return}ja();return}if(Jt(!0),C(s._in)||Re(R._of)){w1(n);return}n&&We(),ja()}function Yk(){const n=d.start;oe(),ci(n,!0)}function Jk(){oe(),Ho(),Cn(!1),Z(s._else)&&Cn(!1)}function Zk(){oe(),br()||(Jt(),ht())}function Qk(){oe(),Ho(),d.scopeDepth++;const n=d.tokens.length;for(ie(s.braceL);!C(s.braceR)&&!d.error;)if(C(s._case)||C(s._default)){const l=C(s._case);oe(),l&&Jt(),ie(s.colon)}else Cn(!0);oe();const o=d.tokens.length;d.scopes.push(new rr(n,o,!1)),d.scopeDepth--}function ey(){oe(),Jt(),ht()}function ty(){Fo(!0),et&&zi()}function ny(){if(oe(),jr(),C(s._catch)){oe();let n=null;if(C(s.parenL)&&(d.scopeDepth++,n=d.tokens.length,ie(s.parenL),ty(),ie(s.parenR)),jr(),n!=null){const o=d.tokens.length;d.scopes.push(new rr(n,o,!1)),d.scopeDepth--}}Z(s._finally)&&jr()}function qf(n){oe(),Uf(!1,n),ht()}function ry(){oe(),Ho(),Cn(!1)}function iy(){oe()}function sy(){Cn(!0)}function oy(n){et?cv(n):st?Sk(n):ht()}function jr(n=!1,o=0){const l=d.tokens.length;d.scopeDepth++,ie(s.braceL),o&&(d.tokens[d.tokens.length-1].contextId=o),zo(s.braceR),o&&(d.tokens[d.tokens.length-1].contextId=o);const c=d.tokens.length;d.scopes.push(new rr(l,c,n)),d.scopeDepth--}function zo(n){for(;!Z(n)&&!d.error;)Cn(!0)}function ja(){ie(s.semi),C(s.semi)||Jt(),ie(s.semi),C(s.parenR)||Jt(),ie(s.parenR),Cn(!1)}function w1(n){n?nn(R._of):oe(),Jt(),ie(s.parenR),Cn(!1)}function Uf(n,o){for(;;){const l=o===s._const||o===s._let;if(ay(l),Z(s.eq)){const c=d.tokens.length-1;qt(n),d.tokens[c].rhsEndIndex=d.tokens.length}if(!Z(s.comma))break}}function ay(n){Fo(n),et?mv():st&&Rk()}function ci(n,o,l=!1){C(s.star)&&oe(),o&&!l&&!C(s.name)&&!C(s._yield)&&We();let c=null;C(s.name)&&(o||(c=d.tokens.length,d.scopeDepth++),Gr(!1));const h=d.tokens.length;d.scopeDepth++,qi(),Df(n);const k=d.tokens.length;d.scopes.push(new rr(h,k,!0)),d.scopeDepth--,c!==null&&(d.scopes.push(new rr(c,k,!0)),d.scopeDepth--)}function qi(n=!1,o=0){et?dv():st&&Mk(),ie(s.parenL),o&&(d.tokens[d.tokens.length-1].contextId=o),yl(s.parenR,!1,!1,n,o),o&&(d.tokens[d.tokens.length-1].contextId=o)}function fi(n,o=!1){const l=Cs();oe(),d.tokens[d.tokens.length-1].contextId=l,d.tokens[d.tokens.length-1].isExpression=!n;let c=null;n||(c=d.tokens.length,d.scopeDepth++),fy(n,o),hy();const h=d.tokens.length;if(ly(l),!d.error&&(d.tokens[h].contextId=l,d.tokens[d.tokens.length-1].contextId=l,c!==null)){const k=d.tokens.length;d.scopes.push(new rr(c,k,!1)),d.scopeDepth--}}function $f(){return C(s.eq)||C(s.semi)||C(s.braceR)||C(s.bang)||C(s.colon)}function Gf(){return C(s.parenL)||C(s.lessThan)}function ly(n){for(ie(s.braceL);!Z(s.braceR)&&!d.error;){if(Z(s.semi))continue;if(C(s.at)){jf();continue}const o=d.start;uy(o,n)}}function uy(n,o){et&&bl([R._declare,R._public,R._protected,R._private,R._override]);let l=!1;if(C(s.name)&&d.contextualKeyword===R._static){if(Ye(),Gf()){ws(n,!1);return}else if($f()){ul();return}if(d.tokens[d.tokens.length-1].type=s._static,l=!0,C(s.braceL)){d.tokens[d.tokens.length-1].contextId=o,jr();return}}cy(n,l,o)}function cy(n,o,l){if(et&&uv(o))return;if(Z(s.star)){po(l),ws(n,!1);return}po(l);let c=!1;const h=d.tokens[d.tokens.length-1];h.contextualKeyword===R._constructor&&(c=!0),x1(),Gf()?ws(n,c):$f()?ul():h.contextualKeyword===R._async&&!br()?(d.tokens[d.tokens.length-1].type=s._async,C(s.star)&&oe(),po(l),x1(),ws(n,!1)):(h.contextualKeyword===R._get||h.contextualKeyword===R._set)&&!(br()&&C(s.star))?(h.contextualKeyword===R._get?d.tokens[d.tokens.length-1].type=s._get:d.tokens[d.tokens.length-1].type=s._set,po(l),ws(n,!1)):br()?ul():We()}function ws(n,o){et?pi():st&&C(s.lessThan)&&Un(),ol(n,o)}function po(n){Ls(n)}function x1(){if(et){const n=$e(0);Z(s.question),Ge(n)}}function ul(){if(et?(Z1(s.bang),zi()):st&&C(s.colon)&&di(),C(s.eq)){const n=d.tokens.length;oe(),qt(),d.tokens[n].rhsEndIndex=d.tokens.length}ht()}function fy(n,o=!1){et&&(!n||o)&&Re(R._implements)||(C(s.name)&&Gr(!0),et?pi():st&&C(s.lessThan)&&Un())}function hy(){let n=!1;Z(s._extends)?(Ef(),n=!0):n=!1,et?hv(n):st&&Ek(n)}function Kf(){const n=d.tokens.length-1;et&&ov()||(gy()?vy():my()?(Ye(),C(s.comma)&&kt()===s.star?(ie(s.comma),ie(s.star),zt(R._as),Ye()):Xf(),Ns()):Z(s._default)?py():yy()?dy():(Bl(),Ns()),d.tokens[n].rhsEndIndex=d.tokens.length)}function py(){if(et&&av())return;const n=d.start;Z(s._function)?ci(n,!0,!0):Re(R._async)&&kt()===s._function?(nn(R._async),Z(s._function),ci(n,!0,!0)):C(s._class)?fi(!0,!0):C(s.at)?(Fl(),fi(!0,!0)):(qt(),ht())}function dy(){et?fv():st?Ck():Cn(!0)}function my(){if(et&&_f())return!1;if(st&&Ik())return!1;if(C(s.name))return d.contextualKeyword!==R._async;if(!C(s._default))return!1;const n=ml(),o=Ro(),l=o.type===s.name&&o.contextualKeyword===R._from;if(o.type===s.comma)return!0;if(l){const c=xe.charCodeAt(Q1(n+4));return c===q.quotationMark||c===q.apostrophe}return!1}function Xf(){Z(s.comma)&&Bl()}function Ns(){nn(R._from)&&wr(),ht()}function gy(){return st?Ak():C(s.star)}function vy(){st?Lk():cl()}function cl(){ie(s.star),Re(R._as)?ky():Ns()}function ky(){oe(),d.tokens[d.tokens.length-1].type=s._as,Ye(),Xf(),Ns()}function yy(){return et&&_f()||st&&Tk()||d.type===s._var||d.type===s._const||d.type===s._let||d.type===s._function||d.type===s._class||Re(R._async)||C(s.at)}function Bl(){let n=!0;for(ie(s.braceL);!Z(s.braceR)&&!d.error;){if(n)n=!1;else if(ie(s.comma),Z(s.braceR))break;Ye(),d.tokens[d.tokens.length-1].identifierRole=je.ExportAccess,nn(R._as)&&Ye()}}function Vf(){if(et&&C(s.name)&&kt()===s.eq){rl();return}if(et&&Re(R._type)){const n=kt();if(n===s.name){if(zt(R._type),kt()===s.eq){rl();return}}else(n===s.star||n===s.braceL)&&zt(R._type)}C(s.string)||(wy(),zt(R._from)),wr(),ht()}function by(){return C(s.name)}function _1(){bo()}function wy(){st&&Ok();let n=!0;if(!(by()&&(_1(),!Z(s.comma)))){if(C(s.star)){oe(),zt(R._as),_1();return}for(ie(s.braceL);!Z(s.braceR)&&!d.error;){if(n)n=!1;else if(Z(s.colon)&&We("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),ie(s.comma),Z(s.braceR))break;xy()}}}function xy(){if(st){Dk();return}bo(),Re(R._as)&&(d.tokens[d.tokens.length-1].identifierRole=je.ImportAccess,oe(),bo())}function _y(){return d.pos===0&&xe.charCodeAt(0)===q.numberSign&&xe.charCodeAt(1)===q.exclamationMark&&nf(2),tf(),zk()}class Sy{constructor(o,l){this.tokens=o,this.scopes=l}}function Ty(n,o,l,c){if(c&&l)throw new Error("Cannot combine flow and typescript plugins.");_m(n,o,l,c);const h=_y();if(d.error)throw bm(d.error);return h}function Iy(n){let o=n.currentIndex(),l=0;const c=n.currentToken();do{const h=n.tokens[o];if(h.isOptionalChainStart&&l++,h.isOptionalChainEnd&&l--,l+=h.numNullishCoalesceStarts,l-=h.numNullishCoalesceEnds,h.contextualKeyword===R._await&&h.identifierRole==null&&h.scopeDepth===c.scopeDepth)return!0;o+=1}while(l>0&&o<n.tokens.length);return!1}class Io{__init(){this.resultCode=""}__init2(){this.tokenIndex=0}constructor(o,l,c,h,k){this.code=o,this.tokens=l,this.isFlowEnabled=c,this.disableESTransforms=h,this.helperManager=k,Io.prototype.__init.call(this),Io.prototype.__init2.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(o){this.resultCode=o.resultCode,this.tokenIndex=o.tokenIndex}getResultCodeIndex(){return this.resultCode.length}reset(){this.resultCode="",this.tokenIndex=0}matchesContextualAtIndex(o,l){return this.matches1AtIndex(o,s.name)&&this.tokens[o].contextualKeyword===l}identifierNameAtIndex(o){return this.identifierNameForToken(this.tokens[o])}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(o){return this.code.slice(o.start,o.end)}rawCodeForToken(o){return this.code.slice(o.start,o.end)}stringValueAtIndex(o){return this.stringValueForToken(this.tokens[o])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(o){return this.code.slice(o.start+1,o.end-1)}matches1AtIndex(o,l){return this.tokens[o].type===l}matches2AtIndex(o,l,c){return this.tokens[o].type===l&&this.tokens[o+1].type===c}matches3AtIndex(o,l,c,h){return this.tokens[o].type===l&&this.tokens[o+1].type===c&&this.tokens[o+2].type===h}matches1(o){return this.tokens[this.tokenIndex].type===o}matches2(o,l){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l}matches3(o,l,c){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c}matches4(o,l,c,h){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c&&this.tokens[this.tokenIndex+3].type===h}matches5(o,l,c,h,k){return this.tokens[this.tokenIndex].type===o&&this.tokens[this.tokenIndex+1].type===l&&this.tokens[this.tokenIndex+2].type===c&&this.tokens[this.tokenIndex+3].type===h&&this.tokens[this.tokenIndex+4].type===k}matchesContextual(o){return this.matchesContextualAtIndex(this.tokenIndex,o)}matchesContextIdAndLabel(o,l){return this.matches1(o)&&this.currentToken().contextId===l}previousWhitespaceAndComments(){let o=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(o=o.replace(/@flow/g,"")),o}replaceToken(o){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=o,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(o){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultCode+=o,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}copyExpectedToken(o){if(this.tokens[this.tokenIndex].type!==o)throw new Error(`Expected token ${o}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(o){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=o,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const o=this.currentToken();if((o.numNullishCoalesceStarts||o.isOptionalChainStart)&&(o.isAsyncOperation=Iy(this)),!this.disableESTransforms){if(o.numNullishCoalesceStarts)for(let l=0;l<o.numNullishCoalesceStarts;l++)o.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";o.isOptionalChainStart&&(o.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===s._delete?o.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):o.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const o=this.currentToken();if(o.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),o.numNullishCoalesceEnds&&!this.disableESTransforms)for(let l=0;l<o.numNullishCoalesceEnds;l++)this.resultCode+="))"}appendCode(o){this.resultCode+=o}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const o=this.currentToken();return this.code.slice(o.start,o.end)}tokenAtRelativeIndex(o){return this.tokens[this.tokenIndex+o]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),this.resultCode}isAtEnd(){return this.tokenIndex===this.tokens.length}}function Cy(n,o,l,c){const h=o.snapshot(),k=Ay(o);let I=[];const S=[],w=[];let x=null;const y=[],E=[],L=o.currentToken().contextId;if(L==null)throw new Error("Expected non-null class context ID on class open-brace.");for(o.nextToken();!o.matchesContextIdAndLabel(s.braceR,L);)if(o.matchesContextual(R._constructor)&&!o.currentToken().isType)({constructorInitializerStatements:I,constructorInsertPos:x}=S1(o));else if(o.matches1(s.semi))c||E.push({start:o.currentIndex(),end:o.currentIndex()+1}),o.nextToken();else if(o.currentToken().isType)o.nextToken();else{const _=o.currentIndex();let F=!1,D=!1,H=!1;for(;Co(o.currentToken());)o.matches1(s._static)&&(F=!0),o.matches1(s.hash)&&(D=!0),o.matches1(s._declare)&&(H=!0),o.nextToken();if(F&&o.matches1(s.braceL)){za(o,L);continue}if(D){za(o,L);continue}if(o.matchesContextual(R._constructor)&&!o.currentToken().isType){({constructorInitializerStatements:I,constructorInsertPos:x}=S1(o));continue}const O=o.currentIndex();if(Ly(o),o.matches1(s.lessThan)||o.matches1(s.parenL)){za(o,L);continue}for(;o.currentToken().isType;)o.nextToken();if(o.matches1(s.eq)){const T=o.currentIndex(),M=o.currentToken().rhsEndIndex;if(M==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(o.nextToken();o.currentIndex()<M;)n.processToken();let B;F?(B=l.claimFreeName("__initStatic"),w.push(B)):(B=l.claimFreeName("__init"),S.push(B)),y.push({initializerName:B,equalsIndex:T,start:O,end:o.currentIndex()})}else(!c||H)&&E.push({start:_,end:o.currentIndex()})}return o.restoreToSnapshot(h),c?{headerInfo:k,constructorInitializerStatements:I,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:x,fields:[],rangesToRemove:E}:{headerInfo:k,constructorInitializerStatements:I,instanceInitializerNames:S,staticInitializerNames:w,constructorInsertPos:x,fields:y,rangesToRemove:E}}function za(n,o){for(n.nextToken();n.currentToken().contextId!==o;)n.nextToken();for(;Co(n.tokenAtRelativeIndex(-1));)n.previousToken()}function Ay(n){const o=n.currentToken(),l=o.contextId;if(l==null)throw new Error("Expected context ID on class token.");const c=o.isExpression;if(c==null)throw new Error("Expected isExpression on class token.");let h=null,k=!1;for(n.nextToken(),n.matches1(s.name)&&(h=n.identifierName());!n.matchesContextIdAndLabel(s.braceL,l);)n.matches1(s._extends)&&!n.currentToken().isType&&(k=!0),n.nextToken();return{isExpression:c,className:h,hasSuperclass:k}}function S1(n){const o=[];n.nextToken();const l=n.currentToken().contextId;if(l==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!n.matchesContextIdAndLabel(s.parenR,l);)if(n.currentToken().contextId===l){if(n.nextToken(),Co(n.currentToken())){for(n.nextToken();Co(n.currentToken());)n.nextToken();const k=n.currentToken();if(k.type!==s.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const I=n.identifierNameForToken(k);o.push(`this.${I} = ${I}`)}}else n.nextToken();n.nextToken();let c=n.currentIndex(),h=!1;for(;!n.matchesContextIdAndLabel(s.braceR,l);){if(!h&&n.matches2(s._super,s.parenL)){n.nextToken();const k=n.currentToken().contextId;if(k==null)throw new Error("Expected a context ID on the super call");for(;!n.matchesContextIdAndLabel(s.parenR,k);)n.nextToken();c=n.currentIndex(),h=!0}n.nextToken()}return n.nextToken(),{constructorInitializerStatements:o,constructorInsertPos:c}}function Co(n){return[s._async,s._get,s._set,s.plus,s.minus,s._readonly,s._static,s._public,s._private,s._protected,s._override,s._abstract,s.star,s._declare,s.hash].includes(n.type)}function Ly(n){if(n.matches1(s.bracketL)){const l=n.currentToken().contextId;if(l==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!n.matchesContextIdAndLabel(s.bracketR,l);)n.nextToken();n.nextToken()}else n.nextToken()}function Yf(n){if(n.removeInitialToken(),n.removeToken(),n.removeToken(),n.removeToken(),n.matches1(s.parenL))n.removeToken(),n.removeToken(),n.removeToken();else for(;n.matches1(s.dot);)n.removeToken(),n.removeToken()}const Jf={typeDeclarations:new Set,valueDeclarations:new Set};function Zf(n){const o=new Set,l=new Set;for(let c=0;c<n.tokens.length;c++){const h=n.tokens[c];h.type===s.name&&J1(h)&&(h.isType?o.add(n.identifierNameForToken(h)):l.add(n.identifierNameForToken(h)))}return{typeDeclarations:o,valueDeclarations:l}}function Qf(n,o,l){if(!n)return!1;const c=o.currentToken();if(c.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const h=c.rhsEndIndex-o.currentIndex();if(h!==3&&!(h===4&&o.matches1AtIndex(c.rhsEndIndex-1,s.semi)))return!1;const k=o.tokenAtRelativeIndex(2);if(k.type!==s.name)return!1;const I=o.identifierNameForToken(k);return l.typeDeclarations.has(I)&&!l.valueDeclarations.has(I)}class _s extends qn{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(o,l,c,h,k,I,S){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.nameManager=h,this.reactHotLoaderTransformer=k,this.enableLegacyBabel5ModuleInterop=I,this.isTypeScriptTransformEnabled=S,_s.prototype.__init.call(this),_s.prototype.__init2.call(this),_s.prototype.__init3.call(this),this.declarationInfo=S?Zf(l):Jf}getPrefixCode(){let o="";return this.hadExport&&(o+='Object.defineProperty(exports, "__esModule", {value: true});'),o}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
|
||
module.exports = exports.default;
|
||
`:""}process(){return this.tokens.matches3(s._import,s.name,s.eq)?this.processImportEquals():this.tokens.matches1(s._import)?(this.processImport(),!0):this.tokens.matches2(s._export,s.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(s._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(s.name,s.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(s.name)||this.tokens.matches1(s.jsxName)?this.processIdentifier():this.tokens.matches1(s.eq)?this.processAssignment():this.tokens.matches1(s.assign)?this.processComplexAssignment():this.tokens.matches1(s.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.isTypeName(o)?Yf(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(s._import,s.parenL)){this.tokens.replaceToken("Promise.resolve().then(() => require");const l=this.tokens.currentToken().contextId;if(l==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(s.parenR,l);)this.rootTransformer.processToken();this.tokens.replaceToken("))");return}if(this.removeImportAndDetectIfType())this.tokens.removeToken();else{const l=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(l)),this.tokens.appendCode(this.importProcessor.claimImportCode(l))}this.tokens.matches1(s.semi)&&this.tokens.removeToken()}removeImportAndDetectIfType(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(R._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,R._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(s.name)||this.tokens.matches1(s.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(s.string))return!1;let o=!1;for(;!this.tokens.matches1(s.string);)(!o&&this.tokens.matches1(s.braceL)||this.tokens.matches1(s.comma))&&(this.tokens.removeToken(),(this.tokens.matches2(s.name,s.comma)||this.tokens.matches2(s.name,s.braceR)||this.tokens.matches4(s.name,s.name,s.name,s.comma)||this.tokens.matches4(s.name,s.name,s.name,s.braceR))&&(o=!0)),this.tokens.removeToken();return!o}removeRemainingImport(){for(;!this.tokens.matches1(s.string);)this.tokens.removeToken()}processIdentifier(){const o=this.tokens.currentToken();if(o.shadowsGlobal)return!1;if(o.identifierRole===je.ObjectShorthand)return this.processObjectShorthand();if(o.identifierRole!==je.Access)return!1;const l=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(o));if(!l)return!1;let c=this.tokens.currentIndex()+1;for(;c<this.tokens.tokens.length&&this.tokens.tokens[c].type===s.parenR;)c++;return this.tokens.tokens[c].type===s.parenL?this.tokens.tokenAtRelativeIndex(1).type===s.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==s._new?(this.tokens.replaceToken(`${l}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR)):this.tokens.replaceToken(`(0, ${l})`):this.tokens.replaceToken(l),!0}processObjectShorthand(){const o=this.tokens.identifierName(),l=this.importProcessor.getIdentifierReplacement(o);return l?(this.tokens.replaceToken(`${o}: ${l}`),!0):!1}processExport(){if(this.tokens.matches2(s._export,s._enum)||this.tokens.matches3(s._export,s._const,s._enum))return!1;if(this.tokens.matches2(s._export,s._default))return this.processExportDefault(),this.hadDefaultExport=!0,!0;if(this.hadNamedExport=!0,this.tokens.matches2(s._export,s._var)||this.tokens.matches2(s._export,s._let)||this.tokens.matches2(s._export,s._const))return this.processExportVar(),!0;if(this.tokens.matches2(s._export,s._function)||this.tokens.matches3(s._export,s.name,s._function))return this.processExportFunction(),!0;if(this.tokens.matches2(s._export,s._class)||this.tokens.matches3(s._export,s._abstract,s._class))return this.processExportClass(),!0;if(this.tokens.matches2(s._export,s.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(s._export,s.star))return this.processExportStar(),!0;if(this.tokens.matches3(s._export,s.name,s.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,R._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(R._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.string)&&(this.tokens.removeToken(),this.tokens.removeToken()),!0}else throw new Error("Unrecognized export syntax.")}processAssignment(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o-1];if(l.isType||l.type!==s.name||l.shadowsGlobal||o>=2&&this.tokens.matches1AtIndex(o-2,s.dot)||o>=2&&[s._var,s._let,s._const].includes(this.tokens.tokens[o-2].type))return!1;const c=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(l));return c?(this.tokens.copyToken(),this.tokens.appendCode(` ${c} =`),!0):!1}processComplexAssignment(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o-1];if(l.type!==s.name||l.shadowsGlobal||o>=2&&this.tokens.matches1AtIndex(o-2,s.dot))return!1;const c=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(l));return c?(this.tokens.appendCode(` = ${c}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o+1];if(l.type!==s.name||l.shadowsGlobal||o+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(o+2,s.dot)||this.tokens.matches1AtIndex(o+2,s.bracketL)||this.tokens.matches1AtIndex(o+2,s.parenL)))return!1;const c=this.tokens.identifierNameForToken(l),h=this.importProcessor.resolveExportBinding(c);return h?(this.tokens.appendCode(`${h} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const o=this.tokens.currentIndex(),l=this.tokens.tokens[o],c=this.tokens.tokens[o+1];if(l.type!==s.name||l.shadowsGlobal||o>=1&&this.tokens.matches1AtIndex(o-1,s.dot))return!1;const h=this.tokens.identifierNameForToken(l),k=this.importProcessor.resolveExportBinding(h);if(!k)return!1;const I=this.tokens.rawCodeForToken(c),S=this.importProcessor.getIdentifierReplacement(h)||h;if(I==="++")this.tokens.replaceToken(`(${S} = ${k} = ${S} + 1, ${S} - 1)`);else if(I==="--")this.tokens.replaceToken(`(${S} = ${k} = ${S} - 1, ${S} + 1)`);else throw new Error(`Unexpected operator: ${I}`);return this.tokens.removeToken(),!0}processExportDefault(){if(this.tokens.matches4(s._export,s._default,s._function,s.name)||this.tokens.matches5(s._export,s._default,s.name,s._function,s.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,R._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${o};`)}else if(this.tokens.matches4(s._export,s._default,s._class,s.name)||this.tokens.matches5(s._export,s._default,s._abstract,s._class,s.name)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(s._abstract)&&this.tokens.removeToken();const o=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${o};`)}else{if(this.tokens.matches3(s._export,s._default,s.at))throw new Error("Export default statements with decorators are not yet supported.");if(Qf(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const o=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${o}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${o} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(o)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =")}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let o=this.tokens.currentIndex();if(o++,o++,!this.tokens.matches1AtIndex(o,s.name))return!1;for(o++;o<this.tokens.tokens.length&&this.tokens.tokens[o].isType;)o++;return!!this.tokens.matches1AtIndex(o,s.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const o=this.tokens.identifierName();for(;!this.tokens.matches1(s.eq);)this.rootTransformer.processToken();const l=this.tokens.currentToken().rhsEndIndex;if(l==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<l;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${o} = ${o}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=this.tokens.matches1(s.braceL);o&&this.tokens.appendCode("(");let l=0;for(;;)if(this.tokens.matches1(s.braceL)||this.tokens.matches1(s.dollarBraceL)||this.tokens.matches1(s.bracketL))l++,this.tokens.copyToken();else if(this.tokens.matches1(s.braceR)||this.tokens.matches1(s.bracketR))l--,this.tokens.copyToken();else{if(l===0&&!this.tokens.matches1(s.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(s.eq)){const c=this.tokens.currentToken().rhsEndIndex;if(c==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<c;)this.rootTransformer.processToken()}else{const c=this.tokens.currentToken();if(Y1(c)){const h=this.tokens.identifierName();let k=this.importProcessor.getIdentifierReplacement(h);if(k===null)throw new Error(`Expected a replacement for ${h} in \`export var\` syntax.`);Em(c)&&(k=`${h}: ${k}`),this.tokens.replaceToken(k)}else this.rootTransformer.processToken()}}if(o){const c=this.tokens.currentToken().rhsEndIndex;if(c==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<c;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const o=this.processNamedFunction();this.tokens.appendCode(` exports.${o} = ${o};`)}processNamedFunction(){if(this.tokens.matches1(s._function))this.tokens.copyToken();else if(this.tokens.matches2(s.name,s._function)){if(!this.tokens.matchesContextual(R._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(s.star)&&this.tokens.copyToken(),!this.tokens.matches1(s.name))throw new Error("Expected identifier for exported function name.");const o=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(s.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(s.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.braceR),o}processExportClass(){this.tokens.removeInitialToken(),this.tokens.matches1(s._abstract)&&this.tokens.removeToken();const o=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${o} = ${o};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const o=[];for(;;){if(this.tokens.matches1(s.braceR)){this.tokens.removeToken();break}const l=this.tokens.identifierName();let c;if(this.tokens.removeToken(),this.tokens.matchesContextual(R._as)?(this.tokens.removeToken(),c=this.tokens.identifierName(),this.tokens.removeToken()):c=l,!this.shouldElideExportedIdentifier(l)){const h=this.importProcessor.getIdentifierReplacement(l);o.push(`exports.${c} = ${h||l};`)}if(this.tokens.matches1(s.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(s.comma,s.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(s.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(R._from)){this.tokens.removeToken();const l=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(l))}else this.tokens.appendCode(o.join(" "));this.tokens.matches1(s.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.string);)this.tokens.removeToken();const o=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(o)),this.tokens.matches1(s.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(o){return this.isTypeScriptTransformEnabled&&!this.declarationInfo.valueDeclarations.has(o)}}class Ey extends qn{constructor(o,l,c,h,k){super(),this.tokens=o,this.nameManager=l,this.reactHotLoaderTransformer=c,this.isTypeScriptTransformEnabled=h,this.nonTypeIdentifiers=h?cf(o,k):new Set,this.declarationInfo=h?Zf(o):Jf}process(){if(this.tokens.matches3(s._import,s.name,s.eq))return this.processImportEquals();if(this.tokens.matches4(s._import,s.name,s.name,s.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,R._type)){this.tokens.removeInitialToken();for(let o=0;o<7;o++)this.tokens.removeToken();return!0}if(this.tokens.matches2(s._export,s.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(s._export,s._import,s.name,s.name,s.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,R._type)){this.tokens.removeInitialToken();for(let o=0;o<8;o++)this.tokens.removeToken();return!0}if(this.tokens.matches1(s._import))return this.processImport();if(this.tokens.matches2(s._export,s._default))return this.processExportDefault();if(this.tokens.matches2(s._export,s.braceL))return this.processNamedExports();if(this.tokens.matches3(s._export,s.name,s.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,R._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(s.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(R._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.string)&&(this.tokens.removeToken(),this.tokens.removeToken()),!0}return!1}processImportEquals(){const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.isTypeName(o)?Yf(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(s._import,s.parenL))return!1;const o=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(o);!this.tokens.matches1(s.string);)this.tokens.removeToken();this.tokens.removeToken(),this.tokens.matches1(s.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(s._import),this.tokens.matchesContextual(R._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,s.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,R._from))return!0;if(this.tokens.matches1(s.string))return this.tokens.copyToken(),!1;let o=!1;if(this.tokens.matches1(s.name)&&(this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken()):(o=!0,this.tokens.copyToken(),this.tokens.matches1(s.comma)&&this.tokens.copyToken())),this.tokens.matches1(s.star))this.isTypeName(this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(o=!0,this.tokens.copyExpectedToken(s.star),this.tokens.copyExpectedToken(s.name),this.tokens.copyExpectedToken(s.name));else if(this.tokens.matches1(s.braceL)){for(this.tokens.copyToken();!this.tokens.matches1(s.braceR);)if(this.tokens.matches3(s.name,s.name,s.comma)||this.tokens.matches3(s.name,s.name,s.braceR))this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken();else if(this.tokens.matches5(s.name,s.name,s.name,s.name,s.comma)||this.tokens.matches5(s.name,s.name,s.name,s.name,s.braceR))this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken();else if(this.tokens.matches2(s.name,s.comma)||this.tokens.matches2(s.name,s.braceR))this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken()):(o=!0,this.tokens.copyToken(),this.tokens.matches1(s.comma)&&this.tokens.copyToken());else if(this.tokens.matches4(s.name,s.name,s.name,s.comma)||this.tokens.matches4(s.name,s.name,s.name,s.braceR))this.isTypeName(this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(s.comma)&&this.tokens.removeToken()):(o=!0,this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.matches1(s.comma)&&this.tokens.copyToken());else throw new Error("Unexpected import form.");this.tokens.copyExpectedToken(s.braceR)}return!o}isTypeName(o){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(o)}processExportDefault(){if(Qf(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(s._export,s._default,s._function,s.name)||this.tokens.matches5(s._export,s._default,s.name,s._function,s.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,R._async)||this.tokens.matches4(s._export,s._default,s._class,s.name)||this.tokens.matches5(s._export,s._default,s._abstract,s._class,s.name))&&this.reactHotLoaderTransformer){const l=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${l}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${l} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(l),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;for(this.tokens.copyExpectedToken(s._export),this.tokens.copyExpectedToken(s.braceL);!this.tokens.matches1(s.braceR);){if(!this.tokens.matches1(s.name))throw new Error("Expected identifier at the start of named export.");if(this.shouldElideExportedName(this.tokens.identifierName())){for(;!this.tokens.matches1(s.comma)&&!this.tokens.matches1(s.braceR)&&!this.tokens.isAtEnd();)this.tokens.removeToken();this.tokens.matches1(s.comma)&&this.tokens.removeToken()}else{for(;!this.tokens.matches1(s.comma)&&!this.tokens.matches1(s.braceR)&&!this.tokens.isAtEnd();)this.tokens.copyToken();this.tokens.matches1(s.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(s.braceR),!0}shouldElideExportedName(o){return this.isTypeScriptTransformEnabled&&this.declarationInfo.typeDeclarations.has(o)&&!this.declarationInfo.valueDeclarations.has(o)}}class Ny extends qn{constructor(o,l){super(),this.rootTransformer=o,this.tokens=l}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()}}function Py(n){let o,l=n[0],c=1;for(;c<n.length;){const h=n[c],k=n[c+1];if(c+=2,(h==="optionalAccess"||h==="optionalCall")&&l==null)return;h==="access"||h==="optionalAccess"?(o=l,l=k(l)):(h==="call"||h==="optionalCall")&&(l=k((...I)=>l.call(o,...I)),o=void 0)}return l}const mo="jest",Oy=["mock","unmock","enableAutomock","disableAutomock"];class Wl extends qn{__init(){this.hoistedFunctionNames=[]}constructor(o,l,c,h){super(),this.rootTransformer=o,this.tokens=l,this.nameManager=c,this.importProcessor=h,Wl.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(s.name,s.dot,s.name,s.parenL)&&this.tokens.identifierName()===mo?Py([this,"access",o=>o.importProcessor,"optionalAccess",o=>o.getGlobalNames,"call",o=>o(),"optionalAccess",o=>o.has,"call",o=>o(mo)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(o=>`${o}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let o=!1;for(;this.tokens.matches3(s.dot,s.name,s.parenL);){const l=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(Oy.includes(l)){const h=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(h),this.tokens.replaceToken(`function ${h}(){${mo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),this.tokens.appendCode(";}"),o=!1}else o?this.tokens.copyToken():this.tokens.replaceToken(`${mo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.parenR),o=!0}return!0}}class Dy extends qn{constructor(o){super(),this.tokens=o}process(){if(this.tokens.matches1(s.num)){const o=this.tokens.currentTokenCode();if(o.includes("_"))return this.tokens.replaceToken(o.replace(/_/g,"")),!0}return!1}}class My extends qn{constructor(o,l){super(),this.tokens=o,this.nameManager=l}process(){return this.tokens.matches2(s._catch,s.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class Ry extends qn{constructor(o,l){super(),this.tokens=o,this.nameManager=l}process(){if(this.tokens.matches1(s.nullishCoalescing)){const c=this.tokens.currentToken();return this.tokens.tokens[c.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(s._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const l=this.tokens.currentToken().subscriptStartIndex;if(l!=null&&this.tokens.tokens[l].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==s._super){const c=this.nameManager.claimFreeName("_");let h;if(l>0&&this.tokens.matches1AtIndex(l-1,s._delete)&&this.isLastSubscriptInChain()?h=`${c} => delete ${c}`:h=`${c} => ${c}`,this.tokens.tokens[l].isAsyncOperation&&(h=`async ${h}`),this.tokens.matches2(s.questionDot,s.parenL)||this.tokens.matches2(s.questionDot,s.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${h}`);else if(this.tokens.matches2(s.questionDot,s.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${h}`);else if(this.tokens.matches1(s.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${h}.`);else if(this.tokens.matches1(s.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${h}.`);else if(this.tokens.matches1(s.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${h}[`);else if(this.tokens.matches1(s.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${h}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let o=0;for(let l=this.tokens.currentIndex()+1;;l++){if(l>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[l].isOptionalChainStart?o++:this.tokens.tokens[l].isOptionalChainEnd&&o--,o<0)return!0;if(o===0&&this.tokens.tokens[l].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let o=0,l=this.tokens.currentIndex()-1;for(;;){if(l<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[l].isOptionalChainStart?o--:this.tokens.tokens[l].isOptionalChainEnd&&o++,o<0)return!1;if(o===0&&this.tokens.tokens[l].subscriptStartIndex!=null)return this.tokens.tokens[l-1].type===s._super;l--}}}class Fy extends qn{constructor(o,l,c,h){super(),this.rootTransformer=o,this.tokens=l,this.importProcessor=c,this.options=h}process(){const o=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const l=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return l?this.tokens.replaceToken(`(0, ${l})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(o),!0}if(this.tokens.matches3(s.name,s.dot,s.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const l=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return l?(this.tokens.replaceToken(l),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(o),!0}return!1}tryProcessCreateClassCall(o){const l=this.findDisplayName(o);l&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(s.parenL),this.tokens.copyExpectedToken(s.braceL),this.tokens.appendCode(`displayName: '${l}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(s.braceR),this.tokens.copyExpectedToken(s.parenR))}findDisplayName(o){return o<2?null:this.tokens.matches2AtIndex(o-2,s.name,s.eq)?this.tokens.identifierNameAtIndex(o-2):o>=2&&this.tokens.tokens[o-2].identifierRole===je.ObjectKey?this.tokens.identifierNameAtIndex(o-2):this.tokens.matches2AtIndex(o-2,s._export,s._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const l=(this.options.filePath||"unknown").split("/"),c=l[l.length-1],h=c.lastIndexOf("."),k=h===-1?c:c.slice(0,h);return k==="index"&&l[l.length-2]?l[l.length-2]:k}classNeedsDisplayName(){let o=this.tokens.currentIndex();if(!this.tokens.matches2(s.parenL,s.braceL))return!1;const l=o+1,c=this.tokens.tokens[l].contextId;if(c==null)throw new Error("Expected non-null context ID on object open-brace.");for(;o<this.tokens.tokens.length;o++){const h=this.tokens.tokens[o];if(h.type===s.braceR&&h.contextId===c){o++;break}if(this.tokens.identifierNameAtIndex(o)==="displayName"&&this.tokens.tokens[o].identifierRole===je.ObjectKey&&h.contextId===c)return!1}if(o===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(o,s.parenR)||this.tokens.matches2AtIndex(o,s.comma,s.parenR)}}class Hl extends qn{__init(){this.extractedDefaultExportName=null}constructor(o,l){super(),this.tokens=o,this.filePath=l,Hl.prototype.__init.call(this)}setExtractedDefaultExportName(o){this.extractedDefaultExportName=o}getPrefixCode(){return`
|
||
(function () {
|
||
var enterModule = require('react-hot-loader').enterModule;
|
||
enterModule && enterModule(module);
|
||
})();`.replace(/\s+/g," ").trim()}getSuffixCode(){const o=new Set;for(const c of this.tokens.tokens)!c.isType&&J1(c)&&c.identifierRole!==je.ImportDeclaration&&o.add(this.tokens.identifierNameForToken(c));const l=Array.from(o).map(c=>({variableName:c,uniqueLocalName:c}));return this.extractedDefaultExportName&&l.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
|
||
;(function () {
|
||
var reactHotLoader = require('react-hot-loader').default;
|
||
var leaveModule = require('react-hot-loader').leaveModule;
|
||
if (!reactHotLoader) {
|
||
return;
|
||
}
|
||
${l.map(({variableName:c,uniqueLocalName:h})=>` reactHotLoader.register(${c}, "${h}", ${JSON.stringify(this.filePath||"")});`).join(`
|
||
`)}
|
||
leaveModule(module);
|
||
})();`}process(){return!1}}const By=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function T1(n){if(n.length===0||!Ps[n.charCodeAt(0)])return!1;for(let o=1;o<n.length;o++)if(!zn[n.charCodeAt(o)])return!1;return!By.has(n)}class Wy extends qn{constructor(o,l,c){super(),this.rootTransformer=o,this.tokens=l,this.isImportsTransformEnabled=c}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(s._public)||this.tokens.matches1(s._protected)||this.tokens.matches1(s._private)||this.tokens.matches1(s._abstract)||this.tokens.matches1(s._readonly)||this.tokens.matches1(s._override)||this.tokens.matches1(s.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(s._enum)||this.tokens.matches2(s._const,s._enum)?(this.processEnum(),!0):this.tokens.matches2(s._export,s._enum)||this.tokens.matches3(s._export,s._const,s._enum)?(this.processEnum(!0),!0):!1}processEnum(o=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(s._const)||this.tokens.matches1(s._enum);)this.tokens.removeToken();const l=this.tokens.identifierName();this.tokens.removeToken(),o&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${l}; (function (${l})`),this.tokens.copyExpectedToken(s.braceL),this.processEnumBody(l),this.tokens.copyExpectedToken(s.braceR),o&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${l} || (exports.${l} = ${l} = {}));`):this.tokens.appendCode(`)(${l} || (${l} = {}));`)}processEnumBody(o){let l=null;for(;!this.tokens.matches1(s.braceR);){const{nameStringCode:c,variableName:h}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(s.eq,s.string,s.comma)||this.tokens.matches3(s.eq,s.string,s.braceR)?this.processStringLiteralEnumMember(o,c,h):this.tokens.matches1(s.eq)?this.processExplicitValueEnumMember(o,c,h):this.processImplicitValueEnumMember(o,c,h,l),this.tokens.matches1(s.comma)&&this.tokens.removeToken(),h!=null?l=h:l=`${o}[${c}]`}}extractEnumKeyInfo(o){if(o.type===s.name){const l=this.tokens.identifierNameForToken(o);return{nameStringCode:`"${l}"`,variableName:T1(l)?l:null}}else if(o.type===s.string){const l=this.tokens.stringValueForToken(o);return{nameStringCode:this.tokens.code.slice(o.start,o.end),variableName:T1(l)?l:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(o,l,c){c!=null?(this.tokens.appendCode(`const ${c}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${o}[${l}] = ${c};`)):(this.tokens.appendCode(`${o}[${l}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(o,l,c){const h=this.tokens.currentToken().rhsEndIndex;if(h==null)throw new Error("Expected rhsEndIndex on enum assign.");if(c!=null){for(this.tokens.appendCode(`const ${c}`),this.tokens.copyToken();this.tokens.currentIndex()<h;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${o}[${o}[${l}] = ${c}] = ${l};`)}else{for(this.tokens.appendCode(`${o}[${o}[${l}]`),this.tokens.copyToken();this.tokens.currentIndex()<h;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${l};`)}}processImplicitValueEnumMember(o,l,c,h){let k=h!=null?`${h} + 1`:"0";c!=null&&(this.tokens.appendCode(`const ${c} = ${k}; `),k=c),this.tokens.appendCode(`${o}[${o}[${l}] = ${k}] = ${l};`)}}class Ao{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(o,l,c,h){Ao.prototype.__init.call(this),Ao.prototype.__init2.call(this),this.nameManager=o.nameManager,this.helperManager=o.helperManager;const{tokenProcessor:k,importProcessor:I}=o;this.tokens=k,this.isImportsTransformEnabled=l.includes("imports"),this.isReactHotLoaderTransformEnabled=l.includes("react-hot-loader"),this.disableESTransforms=Boolean(h.disableESTransforms),h.disableESTransforms||(this.transformers.push(new Ry(k,this.nameManager)),this.transformers.push(new Dy(k)),this.transformers.push(new My(k,this.nameManager))),l.includes("jsx")&&(this.transformers.push(new xs(this,k,I,this.nameManager,h)),this.transformers.push(new Fy(this,k,I,h)));let S=null;if(l.includes("react-hot-loader")){if(!h.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");S=new Hl(k,h.filePath),this.transformers.push(S)}if(l.includes("imports")){if(I===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new _s(this,k,I,this.nameManager,S,c,l.includes("typescript")))}else this.transformers.push(new Ey(k,this.nameManager,S,l.includes("typescript"),h));l.includes("flow")&&this.transformers.push(new Ny(this,k)),l.includes("typescript")&&this.transformers.push(new Wy(this,k,l.includes("imports"))),l.includes("jest")&&this.transformers.push(new Wl(this,k,this.nameManager,I))}transform(){this.tokens.reset(),this.processBalancedCode();let l=this.isImportsTransformEnabled?'"use strict";':"";for(const k of this.transformers)l+=k.getPrefixCode();l+=this.helperManager.emitHelpers(),l+=this.generatedVariables.map(k=>` var ${k};`).join("");for(const k of this.transformers)l+=k.getHoistedCode();let c="";for(const k of this.transformers)c+=k.getSuffixCode();let h=this.tokens.finish();if(h.startsWith("#!")){let k=h.indexOf(`
|
||
`);return k===-1&&(k=h.length,h+=`
|
||
`),h.slice(0,k+1)+l+h.slice(k+1)+c}else return l+this.tokens.finish()+c}processBalancedCode(){let o=0,l=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(s.braceL)||this.tokens.matches1(s.dollarBraceL))o++;else if(this.tokens.matches1(s.braceR)){if(o===0)return;o--}if(this.tokens.matches1(s.parenL))l++;else if(this.tokens.matches1(s.parenR)){if(l===0)return;l--}this.processToken()}}processToken(){if(this.tokens.matches1(s._class)){this.processClass();return}for(const o of this.transformers)if(o.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(s._class,s.name))throw new Error("Expected identifier for exported class name.");const o=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),o}processClass(){const o=Cy(this,this.tokens,this.nameManager,this.disableESTransforms),l=(o.headerInfo.isExpression||!o.headerInfo.className)&&o.staticInitializerNames.length+o.instanceInitializerNames.length>0;let c=o.headerInfo.className;l&&(c=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(c),this.tokens.appendCode(` (${c} =`));const k=this.tokens.currentToken().contextId;if(k==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(s._class);!this.tokens.matchesContextIdAndLabel(s.braceL,k);)this.processToken();this.processClassBody(o,c);const I=o.staticInitializerNames.map(S=>`${c}.${S}()`);l?this.tokens.appendCode(`, ${I.map(S=>`${S}, `).join("")}${c})`):o.staticInitializerNames.length>0&&this.tokens.appendCode(` ${I.map(S=>`${S};`).join(" ")}`)}processClassBody(o,l){const{headerInfo:c,constructorInsertPos:h,constructorInitializerStatements:k,fields:I,instanceInitializerNames:S,rangesToRemove:w}=o;let x=0,y=0;const E=this.tokens.currentToken().contextId;if(E==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(s.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const L=k.length+S.length>0;if(h===null&&L){const _=this.makeConstructorInitCode(k,S,l);if(c.hasSuperclass){const F=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${F}) { super(...${F}); ${_}; }`)}else this.tokens.appendCode(`constructor() { ${_}; }`)}for(;!this.tokens.matchesContextIdAndLabel(s.braceR,E);)if(x<I.length&&this.tokens.currentIndex()===I[x].start){let _=!1;for(this.tokens.matches1(s.bracketL)?this.tokens.copyTokenWithPrefix(`${I[x].initializerName}() {this`):this.tokens.matches1(s.string)||this.tokens.matches1(s.num)?(this.tokens.copyTokenWithPrefix(`${I[x].initializerName}() {this[`),_=!0):this.tokens.copyTokenWithPrefix(`${I[x].initializerName}() {this.`);this.tokens.currentIndex()<I[x].end;)_&&this.tokens.currentIndex()===I[x].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),x++}else if(y<w.length&&this.tokens.currentIndex()>=w[y].start){for(this.tokens.currentIndex()<w[y].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<w[y].end;)this.tokens.removeToken();y++}else this.tokens.currentIndex()===h?(this.tokens.copyToken(),L&&this.tokens.appendCode(`;${this.makeConstructorInitCode(k,S,l)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(s.braceR)}makeConstructorInitCode(o,l,c){return[...o,...l.map(h=>`${c}.prototype.${h}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(s.parenR,s.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let o=this.tokens.currentIndex()+1;for(;this.tokens.tokens[o].isType;)o++;if(this.tokens.matches1AtIndex(o,s.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<o;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(R._async)&&!this.tokens.matches1(s._async))return!1;const o=this.tokens.tokenAtRelativeIndex(1);if(o.type!==s.lessThan||!o.isType)return!1;let l=this.tokens.currentIndex()+1;for(;this.tokens.tokens[l].isType;)l++;if(this.tokens.matches1AtIndex(l,s.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<l;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}}var Hy={};(function(n){n.__esModule=!0,n.LinesAndColumns=void 0;var o=`
|
||
`,l="\r",c=function(){function h(k){this.string=k;for(var I=[0],S=0;S<k.length;)switch(k[S]){case o:S+=o.length,I.push(S);break;case l:S+=l.length,k[S]===o&&(S+=o.length),I.push(S);break;default:S++;break}this.offsets=I}return h.prototype.locationForIndex=function(k){if(k<0||k>this.string.length)return null;for(var I=0,S=this.offsets;S[I+1]<=k;)I++;var w=k-S[I];return{line:I,column:w}},h.prototype.indexForLocation=function(k){var I=k.line,S=k.column;return I<0||I>=this.offsets.length||S<0||S>this.lengthOfLine(I)?null:this.offsets[I]+S},h.prototype.lengthOfLine=function(k){var I=this.offsets[k],S=k===this.offsets.length-1?this.string.length:this.offsets[k+1];return S-I},h}();n.LinesAndColumns=c,n.default=c})(Hy);function jy(n){const o=new Set;for(let l=0;l<n.tokens.length;l++)n.matches1AtIndex(l,s._import)&&!n.matches3AtIndex(l,s._import,s.name,s.eq)&&zy(n,l,o);return o}function zy(n,o,l){o++,!n.matches1AtIndex(o,s.parenL)&&(n.matches1AtIndex(o,s.name)&&(l.add(n.identifierNameAtIndex(o)),o++,n.matches1AtIndex(o,s.comma)&&o++),n.matches1AtIndex(o,s.star)&&(o+=2,l.add(n.identifierNameAtIndex(o)),o++),n.matches1AtIndex(o,s.braceL)&&(o++,qy(n,o,l)))}function qy(n,o,l){for(;;){if(n.matches1AtIndex(o,s.braceR))return;let c=n.identifierNameAtIndex(o);if(o++,n.matchesContextualAtIndex(o,R._as)&&(o++,c=n.identifierNameAtIndex(o),o++),l.add(c),n.matches2AtIndex(o,s.comma,s.braceR))return;if(n.matches1AtIndex(o,s.braceR))return;if(n.matches1AtIndex(o,s.comma))o++;else throw new Error(`Unexpected token: ${JSON.stringify(n.tokens[o])}`)}}function Uy(n,o){pg(o);try{const l=$y(n,o);let h={code:new Ao(l,o.transforms,Boolean(o.enableLegacyBabel5ModuleInterop),o).transform()};if(o.sourceMapOptions){if(!o.filePath)throw new Error("filePath must be specified when generating a source map.");h={...h,sourceMap:eg(h.code,o.filePath,o.sourceMapOptions)}}return h}catch(l){throw o.filePath&&(l.message=`Error transforming ${o.filePath}: ${l.message}`),l}}function $y(n,o){const l=o.transforms.includes("jsx"),c=o.transforms.includes("typescript"),h=o.transforms.includes("flow"),k=o.disableESTransforms===!0,I=Ty(n,l,c,h),S=I.tokens,w=I.scopes,x=new vl(n,S),y=new gl(x),E=new Io(n,S,h,k,y),L=Boolean(o.enableLegacyTypeScriptModuleInterop);let _=null;return o.transforms.includes("imports")?(_=new ai(x,E,L,o,o.transforms.includes("typescript"),y),_.preprocessTokens(),f1(E,w,_.getGlobalNames()),o.transforms.includes("typescript")&&_.pruneTypeOnlyImports()):o.transforms.includes("typescript")&&f1(E,w,jy(E)),{tokenProcessor:E,scopes:w,nameManager:x,importProcessor:_,helperManager:y}}function Gy(n,o){for(;n.length<o;)n="0"+n;return n}function yr(n,o){var l,c,h;if(o.length===0)return n;for(l=0,h=o.length;l<h;l++)c=o.charCodeAt(l),n=(n<<5)-n+c,n|=0;return n<0?n*-2:n}function Ky(n,o,l){return Object.keys(o).sort().reduce(c,n);function c(h,k){return eh(h,o[k],k,l)}}function eh(n,o,l,c){var h=yr(yr(yr(n,l),Xy(o)),typeof o);if(o===null)return yr(h,"null");if(o===void 0)return yr(h,"undefined");if(typeof o=="object"||typeof o=="function"){if(c.indexOf(o)!==-1)return yr(h,"[Circular]"+l);c.push(o);var k=Ky(h,o,c);if(!("valueOf"in o)||typeof o.valueOf!="function")return k;try{return yr(k,String(o.valueOf()))}catch(I){return yr(k,"[valueOf exception]"+(I.stack||I.message))}}return yr(h,o.toString())}function Xy(n){return Object.prototype.toString.call(n)}function Vy(n){return Gy(eh(0,n,"",[]).toString(16),8)}var Yy=Vy;const Hi="__sfc__";async function jl(n){return Uy(n,{transforms:["typescript"]}).code}async function qa(n,{filename:o,code:l,compiled:c}){var O,T,M;if(!l.trim()){n.state.errors=[];return}if(o.endsWith(".css")){c.css=l,n.state.errors=[];return}if(o.endsWith(".js")||o.endsWith(".ts")){ed(l)&&(l=td(l,{filename:o}).code),o.endsWith(".ts")&&(l=await jl(l)),c.js=c.ssr=l,n.state.errors=[];return}if(!o.endsWith(".vue")){n.state.errors=[];return}const h=Yy(o),{errors:k,descriptor:I}=n.compiler.parse(l,{filename:o,sourceMap:!0});if(k.length){n.state.errors=k;return}if(I.styles.some(B=>B.lang)||I.template&&I.template.lang){n.state.errors=['lang="x" pre-processors for <template> or <style> are currently not supported.'];return}const S=I.script&&I.script.lang||I.scriptSetup&&I.scriptSetup.lang,w=S==="ts";if(S&&!w){n.state.errors=['Only lang="ts" is supported for <script> blocks.'];return}const x=I.styles.some(B=>B.scoped);let y="",E="";const L=B=>{y+=B,E+=B},_=await I1(n,I,h,!1,w);if(!_)return;const[F,D]=_;if(y+=F,I.scriptSetup){const B=await I1(n,I,h,!0,w);B?E+=B[0]:E=`/* SSR compile error: ${n.state.errors[0]} */`}else E+=F;if(I.template&&(!I.scriptSetup||((T=(O=n.options)==null?void 0:O.script)==null?void 0:T.inlineTemplate)===!1)){const B=await C1(n,I,h,D,!1,w);if(!B)return;y+=B;const $=await C1(n,I,h,D,!0,w);$?E+=$:E=`/* SSR compile error: ${n.state.errors[0]} */`}x&&L(`
|
||
${Hi}.__scopeId = ${JSON.stringify(`data-v-${h}`)}`),(y||E)&&(L(`
|
||
${Hi}.__file = ${JSON.stringify(o)}
|
||
export default ${Hi}`),c.js=y.trimStart(),c.ssr=E.trimStart());let H="";for(const B of I.styles){if(B.module){n.state.errors=["<style module> is not supported in the playground."];return}const $=await n.compiler.compileStyleAsync({...(M=n.options)==null?void 0:M.style,source:B.content,filename:o,id:h,scoped:B.scoped,modules:!!B.module});$.errors.length?$.errors[0].message.includes("pathToFileURL")||(n.state.errors=$.errors):H+=$.code+`
|
||
`}H?c.css=H.trim():c.css="/* No <style> tags present */",n.state.errors=[]}async function I1(n,o,l,c,h){var k,I,S,w;if(o.script||o.scriptSetup)try{const x=h?["typescript"]:void 0,y=n.compiler.compileScript(o,{inlineTemplate:!0,...(k=n.options)==null?void 0:k.script,id:l,templateOptions:{...(I=n.options)==null?void 0:I.template,ssr:c,ssrCssVars:o.cssVars,compilerOptions:{...(w=(S=n.options)==null?void 0:S.template)==null?void 0:w.compilerOptions,expressionPlugins:x}}});let E="";return y.bindings&&(E+=`
|
||
/* Analyzed bindings: ${JSON.stringify(y.bindings,null,2)} */`),E+=`
|
||
`+n.compiler.rewriteDefault(y.content,Hi,x),(o.script||o.scriptSetup).lang==="ts"&&(E=await jl(E)),[E,y.bindings]}catch(x){n.state.errors=[x.stack.split(`
|
||
`).slice(0,12).join(`
|
||
`)];return}else return[`
|
||
const ${Hi} = {}`,void 0]}async function C1(n,o,l,c,h,k){var x,y,E,L;const I=n.compiler.compileTemplate({...(x=n.options)==null?void 0:x.template,source:o.template.content,filename:o.filename,id:l,scoped:o.styles.some(_=>_.scoped),slotted:o.slotted,ssr:h,ssrCssVars:o.cssVars,isProd:!1,compilerOptions:{...(E=(y=n.options)==null?void 0:y.template)==null?void 0:E.compilerOptions,bindingMetadata:c,expressionPlugins:k?["typescript"]:void 0}});if(I.errors.length){n.state.errors=I.errors;return}const S=h?"ssrRender":"render";let w=`
|
||
${I.code.replace(/\nexport (function|const) (render|ssrRender)/,`$1 ${S}`)}
|
||
${Hi}.${S} = ${S}`;return((L=o.script||o.scriptSetup)==null?void 0:L.lang)==="ts"&&(w=await jl(w)),w}const Ri="App.vue",A1=`
|
||
<script setup>
|
||
import { ref } from 'vue'
|
||
|
||
const msg = ref('Hello World!')
|
||
<\/script>
|
||
|
||
<template>
|
||
<h1>{{ msg }}</h1>
|
||
<input v-model="msg">
|
||
</template>
|
||
`.trim();class Fi{constructor(o,l="",c=!1){this.compiled={js:"",css:"",ssr:""},this.filename=o,this.code=l,this.hidden=c}}class Jy{constructor({serializedState:o="",defaultVueRuntimeURL:l=`https://unpkg.com/@vue/runtime-dom@${jc}/dist/runtime-dom.esm-browser.js`,defaultVueServerRendererURL:c=`https://unpkg.com/@vue/server-renderer@${jc}/dist/server-renderer.esm-browser.js`,showOutput:h=!1,outputMode:k="preview"}={}){this.compiler=Hc,this.pendingCompiler=null;let I={};if(o){const w=JSON.parse(Vd(o));for(const x in w)I[x]=new Fi(x,w[x])}else I={[Ri]:new Fi(Ri,A1)};this.defaultVueRuntimeURL=l,this.defaultVueServerRendererURL=c,this.initialShowOutput=h,this.initialOutputMode=k;let S=Ri;I[S]||(S=Object.keys(I)[0]),this.state=L1({mainFile:S,files:I,activeFile:I[S],errors:[],vueRuntimeURL:this.defaultVueRuntimeURL,vueServerRendererURL:this.defaultVueServerRendererURL,resetFlip:!0}),this.initImportMap()}init(){yo(()=>qa(this,this.state.activeFile));for(const o in this.state.files)o!==Ri&&qa(this,this.state.files[o])}setActive(o){this.state.activeFile=this.state.files[o]}addFile(o){const l=typeof o=="string"?new Fi(o):o;this.state.files[l.filename]=l,l.hidden||this.setActive(l.filename)}deleteFile(o){confirm(`Are you sure you want to delete ${o}?`)&&(this.state.activeFile.filename===o&&(this.state.activeFile=this.state.files[this.state.mainFile]),delete this.state.files[o])}serialize(){return"#"+Xd(JSON.stringify(this.getFiles()))}getFiles(){const o={};for(const l in this.state.files)o[l]=this.state.files[l].code;return o}async setFiles(o,l=Ri){const c={};l===Ri&&!o[l]&&(c[l]=new Fi(l,A1));for(const h in o)c[h]=new Fi(h,o[h]);for(const h in c)await qa(this,c[h]);this.state.mainFile=l,this.state.files=c,this.initImportMap(),this.setActive(l),this.forceSandboxReset()}forceSandboxReset(){this.state.resetFlip=!this.state.resetFlip}initImportMap(){const o=this.state.files["import-map.json"];if(!o)this.state.files["import-map.json"]=new Fi("import-map.json",JSON.stringify({imports:{vue:this.defaultVueRuntimeURL}},null,2));else try{const l=JSON.parse(o.code);l.imports.vue||(l.imports.vue=this.defaultVueRuntimeURL,o.code=JSON.stringify(l,null,2)),l.imports["vue/server-renderer"]||(l.imports["vue/server-renderer"]=this.defaultVueServerRendererURL,o.code=JSON.stringify(l,null,2))}catch{}}getImportMap(){try{return JSON.parse(this.state.files["import-map.json"].code)}catch(o){return this.state.errors=[`Syntax error in import-map.json: ${o.message}`],{}}}setImportMap(o){this.state.files["import-map.json"].code=JSON.stringify(o,null,2)}async setVueVersion(o){this.vueVersion=o;const l=`https://unpkg.com/@vue/compiler-sfc@${o}/dist/compiler-sfc.esm-browser.js`,c=`https://unpkg.com/@vue/runtime-dom@${o}/dist/runtime-dom.esm-browser.js`,h=`https://unpkg.com/@vue/server-renderer@${o}/dist/server-renderer.esm-browser.js`;this.pendingCompiler=Qp(()=>import(l),[]),this.compiler=await this.pendingCompiler,this.pendingCompiler=null,this.state.vueRuntimeURL=c,this.state.vueServerRendererURL=h;const k=this.getImportMap(),I=k.imports||(k.imports={});I.vue=c,I["vue/server-renderer"]=h,this.setImportMap(k),this.forceSandboxReset(),console.info(`[@vue/repl] Now using Vue version: ${o}`)}resetVueVersion(){this.vueVersion=void 0,this.compiler=Hc,this.state.vueRuntimeURL=this.defaultVueRuntimeURL,this.state.vueServerRendererURL=this.defaultVueServerRendererURL;const o=this.getImportMap(),l=o.imports||(o.imports={});l.vue=this.defaultVueRuntimeURL,l["vue/server-renderer"]=this.defaultVueServerRendererURL,this.setImportMap(o),this.forceSandboxReset(),console.info("[@vue/repl] Now using default Vue version")}}const Zy={class:"vue-repl"},Qy=$r({__name:"Repl",props:{store:{default:()=>new Jy},autoResize:{type:Boolean,default:!0},showCompileOutput:{type:Boolean,default:!0},showImportMap:{type:Boolean,default:!0},clearConsole:{type:Boolean,default:!0},sfcOptions:null,layout:null,ssr:{type:Boolean,default:!1}},setup(n){const o=n;return o.store.options=o.sfcOptions,o.store.init(),ho("store",o.store),ho("autoresize",o.autoResize),ho("import-map",zc(o,"showImportMap")),ho("clear-console",zc(o,"clearConsole")),(l,c)=>(Ht(),hn("div",Zy,[Br(vd,{layout:n.layout},{left:$a(()=>[Br(rm)]),right:$a(()=>[Br(vm,{showCompileOutput:o.showCompileOutput,ssr:!!o.ssr},null,8,["showCompileOutput","ssr"])]),_:1},8,["layout"])]))}}),n0=hi(Qy,[["__scopeId","data-v-11ce55b8"]]);export{Fi as File,hm as Preview,n0 as Repl,Jy as ReplStore,qa as compileFile};
|