From d2b19ae24d428dcec80db30a0d7406ed602ee883 Mon Sep 17 00:00:00 2001 From: James Stockton Date: Sun, 25 Sep 2022 00:02:23 +0100 Subject: [PATCH 1/4] Fix Poetry Run Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19c5e57..b5ad4ec 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ poetry shell Start the server in development mode (hot reload): ``` -poetry run uvicorn app:app --reload +poetry run uvicorn app:shepherd --reload ``` To deploy run (chosen port and ip are optional): From 7b04d68056d096150b0c87bb8d46c641ff44dcaf Mon Sep 17 00:00:00 2001 From: js3g20 Date: Sun, 25 Sep 2022 00:06:02 +0100 Subject: [PATCH 2/4] Add files/image.jpg Route --- app/config.py | 2 ++ app/routers.py | 10 +++++++++- static/camera/image.jpg | Bin 0 -> 15417 bytes 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 static/camera/image.jpg diff --git a/app/config.py b/app/config.py index 7980e38..1675067 100644 --- a/app/config.py +++ b/app/config.py @@ -15,6 +15,8 @@ class Settings: static_path: Path = Path("static/").absolute() editor_path: Path = Path("static/editor/").absolute() docs_path: Path = Path("static/docs/").absolute() + static_image_file: Path = Path("static/image.jpg") + base_image_file: Path = Path("static/camera/image.jpg") round_len: float = 180.0 # seconds reap_grace_time: float = 5.0 # seconds diff --git a/app/routers.py b/app/routers.py index 6228b6c..8f27efe 100644 --- a/app/routers.py +++ b/app/routers.py @@ -5,13 +5,14 @@ import logging from fastapi import APIRouter, HTTPException, UploadFile, File, Request +from fastapi.responses import FileResponse from pydantic import BaseModel from app.run import States from app.run import runner import app.editor import app.upload - +import app.config # ============================================================================== # Runner router @@ -87,3 +88,10 @@ async def save_file(filename: str, request: Request): def delete_file(filename: str): app.editor.delete_file(filename) + +@files_router.get('/image.jpg') +def get_image(): + if app.config.config.static_image_file.is_file(): + return FileResponse(app.config.config.static_image_file) + else: + return FileResponse(app.config.config.base_image_file) \ No newline at end of file diff --git a/static/camera/image.jpg b/static/camera/image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..88f919d243e883ebbfcb755a3fe1a7065362cee1 GIT binary patch literal 15417 zcmbW8WmFtN*XM_j;O;&o5C{ws+${tMo?wF$LI^UrI{|`QaEIU!WI}Kc?k)p^y9Jm* z2N=l9v%BZrbN18j-md;s)qU!Bs!rcq|9ku2!oPI@iHf4KA^-ye1Mu|CeDrd7L8_HV!Tx{^Njp62KD-Ow1=wG5<5`$IxwxJ8ArU(d;SV zb~nw$uy}$VSJgMw%%`%cs*XTF2FOz_Ov1Wx(8(ur#3&i^Ju9eONTT4^_m1@Pc%#_d z48+Wz+qAw@ngeMn#92{GSTTDFFnvL;>t!VEIsgLfXQFOK1V*}ZQz7#ck2G_Rw;>+O zp~>s(*U+NC^=xrLAMUhxX*SbWBwl7}UdJl~On&)ayDkBNTXW~vaptYzeblvwcq2kf zS=o(9?3*C8tM)i_(6Ho2?3N)3@!CtsUNPt&_%M)tz~Di?iZJXh<~_CFrj8tROO zB-#Bja=mHKVqhcErtbI2{~aVlRA53tfdOJ%{{iI;a$AR%P1bN6vn3b^Cayywr_dAOX8< ze+F|@dhr?}s;i!%=dbw|Zu0&90XVMgSg>4)xn-DARMzdPuatp_c`wx3V|ojLAwD ziz;p;tMge%qfD&JdHX|oKnquVjcfDZx*fx;V1XE|@U3upSyI6Kq!}o->AMB9XBpIv zZVn?!8G8H4R-b_Ad~?y|-RO6WboDN zo-!IiT}qeJ#L#~6S;OqkFAbkWEvECX>VjOH)IY7R)L#zLh*FxqHOsfs3}@z}wK&o~ zq*jEJVPjLEqL%tve^ADHyE&{h-}q?N(qDVxi#04eS|qAlYd+8L2!iEbRC*qf^6{``x}~7n(QB-OHvT^Suy$p z(sFY41OOCCHPI82UKlts;|iD(FK#muF`qVw9Dlo90OG@s-em$PB`v`ddnw_v&5o zO0L#5lhxSLd~OyG1qTaL{V|>9-}>@8kD9RnR{r46-TtehM}`5c_oA`ei4n(YQab_codI=ojYg zZZXuKnj(iPUKXht=inzt1%1}WD->H)jG57;KifgEg(>B{+IDR!BCh&k!Y(~2IhjfB zYJhUMqk4DYZ7JcdcWAh4l=ED5J@(s7&lDX5U8B;=6Hg!BXd%*qF&oB8qTga;BW0_i z444{Isk^)QBgr3O&aX+EkN%9y(Cr+*@FuWjwZu=Q_s#r^CM-QN{9Pw5ohO_RYW|ea zZxjR*E!vtb_OG8W?3vdW^+v8!s|uysG8HI z`NjuKzvqd8R1m|7D2udri2m;dN7~Bo^SQH&RB(3Ek?|^hsMD>X0QSR1*bq+GYb}uK zTN-_H&6M{6lw?uyy+mYxy^fQAzUPpf3zJ2E{!~{71fb%LYMWbYrW|>=?Z3Cda7h=w zy1#7EGg~ZDWJdTOSx+aY3F=Pqt}K_j+BvCwg^260FvmfhIJ)%yII7t0Pn$}!V6wL| zyr0n+C6MsW#Kxv&O4dDEd2%%tx35a9vl}I*Phpkapz0)n=aEMw?Q!CDbvsKI!nL8a zVt5O>dW*6uM$Po4Wro$-ruhV<(ftZD)m_fTVC)Aak(-LzI#jmMy)Qie=~CG3E+z3^ z|HD}Fk==Sqa{rq~jqvH3wt{dQdJXk}jzc=nZ_taN;*|pr%`Zd0WM8}oTu|QZ-RYoT zMsEzn8~XDJ6xqs7JPBo1I&6lrJj>D=&`g}S3Si+)!8t#PCkvHaz}rePEBpsQs5=6d zz4!+VkoL=Rtf}M5f86L}J`z^sdB6klZt&NY{v35OtoD@K64}*>8VjiPU^!Y2LR;(t zxE8!z)$GN)rt!@Uhn7)F=o`PW{Lww<59!?^W z5+0%zQzMS0CMQkipky3e;CS;k+(XDD?uRK`{%@hiw=S)QvLPP6csr8jcQX5#58+(O ztWFx+weKo|HI%WdY)7gN=3%eBT^|rJf3eFcOCja>;dn_Ps{P!sx=@?GLn}^ai2Rl# zB^np0kx^x0cyMd7TTIwO8{I`N%>wLoo^D&~%_JNf&$8g`KW4Q<3>Lp*M)cfd-qUH4 ztVHl~_Z^R??maIJ`s2d46k`GJ&_rbvj1;13O+{3g8(Xqh-;BPdAwLJsx9h{MBBjfA zbl|%tTz;Ey%3jE*1MywmY(p;gv#pQVE+AN6rtvGjrx{9OZwSFnGg}LuOTncf&CXF5 zJXw=x)3r6-i{Zi#pFk%vt-AO_?9&}L_o;%XPrc~7Qd__gb+|-Tej-D@ew~~(+ib*g zr)J`Qm@|HYYb4w!Xk}MdNRdA2bBL&9KQCHr{VTTCJ7|larH=zz%E9hOe18M@Rqa0P zSFhxbSeKF|;3JqwSSX+J6*qCw@YWj_+ltz=$@4%8RKU!pO#Ch)w774UiMA&GxaAw< zIgNS3&MBkw(sY~cX*XP`y7*^b$-yKmzevgxV~#H|m~$FF+3rv``p9W&{^^X2`37^b$sc|BHXy##F>2?uXSgUf;(qonvrI>+-)*Q7Og3? zfFOJ<*~>aO_HXmVu=7Q=_+h_4zpJA&y_}>KLCou6e?s>T0IEhNtlCN#+2twuO`v$_ zP8o9B8ByOl@i&%IL~6Wr$7S*}?DO#QR*&$j{o>vkX{QgS%06%_&nV*;$a9?W+U< z(SY5KvHKLa;%RAmlhvG6`<)&#=lB#^{M+3QxmtyDQrQV9fm`s}tzzn}NT{T6!+d}m zp%txH0Sz8rh}rYp`JICD>e9yKncb?f1wZ(?lB7Lr*6_zfVn#>_k}A5$?*pPj|Bx!d zgunD;oPRKIQL191-pDiA4sVcV%Zc*fAArCuLeS`KD%iVJigMyfr*yawXOzxr>HOSI zHeI3^FR>qJwqW|l6!(X^JA9A(8EJ8*rc3At1a%J(A7wZ*!9*QMZ~Lp}OH)hh+4HAQ z-pR`8v2?s+{JC2C6K?CeVx#Ic&+V9gLcpWv@d$#i+!flY8jsgg$#|E*WgR$XD=p%cy0!B;!~OX#u>SV01ui$1~;e)Dy>4_4}=Jvo6qO) zEoFVtKya=iyB)XL;W;DC($#{WvG;}C{Ui1;@!650SU)$beYnGi=1&8?Epg3daGQB5 zsK0M&r2RTWqa;EcRt|p{&Si&LELM7zY9OGQ0#`0o&aZBRzLqWtopk=1=;0=nl=>#gzOxD9Yh&OYOCH8DnRJVHEnHWZc=K$o&ZTwO+?!U8Sy-0k;aTH(mD7TuOH_7C zhEA1@U<;5!22K7C(3hZ}qa=s)kB`W4`S~)k>P!kt8Cc~l-C6>9T&^|^K`9H3rkb{u zbMK?G&`bHrc%OTLsbjwikEpr5`X)xd7?OAE+d#iL-bfjI!HK8`{4CA+7g0u=G4n8& zw`A|K-6TDv`fSW_HB^wx>GPhmD6m@lw7Udb)JN4Vf_qmKj2!8^krN(;26A@xR&19!dtbismr-jkSAJnDilEhfta+0bbBM|%}kd(bt4K}EE zZCn1UT53#`U)Uq_ukOnch_%+wt(wd50Zn+C1}bt>Rdoz+Y)$jG?DsB@CH>oMpSjb; z>#L$#gi;*SKY+n>v|*j1_vYYB9N~3+47_?*&8hJFKzXqrF0#0Cq8EI zl>7K!nk!PL1OEUtmzoiQ6z(g&8ac;5TC9S_kYS`24E_q{HUU)4v)h)TL3$EJO*y{= zmbYO-8&zg^AT?_7Y-cXadmTBaaevKv4>N2(`prBzc%b2dacaZ{E>8M#Wx=FoshgOq z*Ga0Pq_VvzIb)ae_Xj7XdOwo;R7shwV+V<5bVaKXaMjF~r|(mQC!>>QvCrCo8NJDV z0M1MuF$P?z*h_BZSkK5c@-s$&)mE$PgyH6c5L#=hgWBuO#D-PRTj1gpG0(}J=Y$*j zT_X1dBx#$WnqovM6eH{0w;T<5@7GRD)}yz?8d7@|!qX1?>mO%Wy5^~s#}(yAXw z#>?7-jQjEBWzlke^VW0Of(pMkDb)RR6&)A?!0lJnwq&-+s=bCnyJ;RSncTfT9u+q3 zte^BZGZ+g8Rsq|v)m$o6XNlLqyZWYI2_86ehHDH1e{KSaQf|;yF_@-%2;MI7*iq#& zd5VZL(KA}*CFavSLu9R;pfg4DQhltG(2inp;_|KSR2;M%6x2W=_E8+H?d)}HE9Z>y zv{ybTu1T!2oqtNuh(bPyC3c)xa=QIGhyE2OYX5QnPir|PChq(HY%B1TW8JIqsCqijZ2%fVdU-=`|lD9^nbx$+?aza zjeq);ZU@?hf{cedYGEBOyn@wTd*RWh%Oq;fL1zjNhgT2o+A1g$oBLXKu8L?EtOaEM zso@2Vpt}6qK$Z{n5Qz#8iQ@$qDH-Wz>3XWds-D8)y2NC??==g{!1FP`c4JfCrAI&1 z{CB!gezEjf{>Am*P$VAg4a&dD%dKm7b^iqBY}k$R-n2;6@d@cOfJyToijQ4P!;QL1 z6)nN|0%SMiib}KKp-ii&dTwIf5VOhZHI2C{GdGvg70Z)KiC_u3>m2N>Py})BtM%vs zI=c=sm?Fk(RUx;dNV(`iUO>v#qK2jV%$4p+QEM(02!BZA6{y6gG&DevP_^%MkGmyl z*fIJSlDvg~g-E&?YB!xYzLSu*+r+{W{2J7cmf4E`mP;CcYzU5aduIQ&zV{mMe2-C6 zY-0LXTi~6({zQqfO$UibN9%VAdldz~0U8z{vt-RR)Qmjcyj*T<@SG*ILeEB#eblU; zC)|SlQFVaO*=cSo^BILjIE;ki=Q${N{{w`z=~@;)Jy%OSrr}^`eLOIh=JNg)HyO1` zI5Tb_PFEg+@=l>8N`^M2^o+{B>sL0bTCR&Q9<3K<^j8+`oJpsw7vmJU8D58dL9P8T zw)yn5zV18W@07te;=+O5ZRh&;A$1!C16P6M8N7uri-rlm-4fkgLqFFcwdL)jX=?F! zhZCSHjG^X`T>f@-LwuZ7ZLf9F2>-6UQ>MAG``U>1`~tcAEDbYKq)3c3lNp*D#yVYp zC!9+j&$-DuEW#M?Gv?3U!-KE^l4XIN_}H2J2{OY&bzFjv*$MricT_gf7^f?kTr6Mo{wVWm+O|$+2B_Nk^JMD z)9uN5+GF5-Lxg7!q3c#&tevFP4+X9?FySvi9xGp*!AdItbP5U#W8dKIR@eU1iN8s0 zSn$V4Z=T}obuH=WyFg9zsGh`ArTaKEK$5Tc@9YE1(fg1c@tlo zDSfe z+M>eH$!@epp-*v;4y36tX$w@&&jJ4}e~njj4WRTy%ZC>L%p1HJ1aA=cUq9^vTWRL0 zC4=8Nv{VAr=|4gxl+CVdOub7E3Ckdfny$N~f}vsF@ZL*kvox`xO`0j*ba6|RL~{JD zo}=+pf=;Mfw>t#1x{;+_PQYL@mBuqL*s}H&Dmcb`D4v>kpL^;tB}ob$78Au}0MkmR zr*#!3P=BgfYWtXZn|GCseD~24fb3vEVXfhR}}O&A7Y7T&W0BA{iMdPGY_ujq;;4pJZ1`vKt?fl1ii#4 z8d^}q9rp!?@>o3yn?)5@w}^s z%0C%6x}U_PvvqEH(l(;+xtZ3Zca=p_6NdKI=G*DtA+a*Zj>G1k>Cl=)P{*4as;H(; zy+!l<-IsiGWK(La+G+Q`TXW<>=q70^N9i~KG{;7UOIzyN3>fp4B{ z1S>IEa4Cxdhn+YaMB~ zHnkcQexWC_;JbJ)_89(|cI4gX2U;Ci@q2~$%#U6TtB!rjp}77i0gJY25b@y+E1o@m z5wn7x8lY#BH73y@4yZrZ-FT(BCVfr#YOW-QG2Ze%?=e_5uaJ}`hn0*iJT+Q==Vg9B z4UyOac8vrQqUB~J0}JJL3QfE23n?IzHzC(w17(W+V!7|<8p`*IVj1Deoh}HSJ)vvt zKWovy&^ibmxJPk)y@XecHcQ}$Zode)DrIXYG>t1a23aeKU3Y&h)KG~&Mpa=vN~dX? zPPjMjxZw|y))g`gRPO>nsA`gY?5l581NnCGdkQ|bdJ8v)Nq)z@hcaKP$aZ0-X}wWT z6dYnH6lTP}Y`y3ROVawxn##4>T#emhsE;sBBl*3i7}^LD)_5n?=O`agEoS#1 zbh9f#Dt;+4dB4T-N2}Z1g0((jihEVjYfQ|s=eZsxb}-I5Oq#d*AAqFDUJZ*zXy;6% z`9jN9Wx`@w5@X|DLMQi~MU$_@Zx>4XFrdn@dmx~ArB*>`H0sC4-$Ce#-nw{Fskp+Y zNNJcJL-`)#(aJ?US=L~oP0{FE%rJ(nSy-BhxVB0Bx6xl6mJ1ZK2aiC zt}Os*B=c%w!x#w_*V--l>+O(i%UV)xj#}$Y%jKPCYt8lW@c5%3NigTn+uazzI$Qad z%ea2Fs*ZzEO8II)a4Ac4v(>0h&-#`>j_=fT?M?{gvSg4X$&Y{8HXrY&EK#$jt)HrLllHSY`P zAt0inn6-Es;4Nuyqtiavrhs@dZ^C0D-!smbg5RD+($)S3XzT%v4d8Ocq2aM_Bza6HF_{twd`{;RqfqTt(5HXWi|Fz9UXNv)B$?zwrF3_ZpN3N z$zRO6=Rq7;KHbyewQK2d~ykJ%oBfyQa$T zdQTvceLAgClL%;}w9G8pq+%2nXA#E#MsAYGXS2Qa$^->6FF8=!Op7Zd*{Ac%`pdNg z6he;-eU=b&j(}cym_>Dx390)Uh1^MWWvUezm2UgzhvCFZx%NX2#{xG}(t4M0 z?A`T0*GyX|gsV#H8QKB&8sHGIg~25O!H2RD&c>|4nsPL;X(dI8N`M=@>z!&|b`VB%8u#iL}7jji7tmO`?3 zAV;0Sfz;-xyp5Z>Sa<3>k5w5SFH4h7Yc&fetR?};a&X}>^Mo1a7!y%T$H34k2coK> z+1g!Q;Mw3vK~&ZTQ?2VpbYn*-TT;>+>i@l#qs`D2=>Ny7uux2Mh_KGq8$O*1lyD}5x>xZ$#E`u8a zM&VcSRQaBz!{)y`jY1PCR_cELz63@Hop%&^yGpix|I3KO4rL5=f&T+Uo}kGqY%(u@ zd1fvKs{)zZKA*=sn<*r2QqhxTE#_*N%P(o!01HedW_YxhIYnC((QCdx)gc>c{p~WFR^j$>dF9-r-vG#3EH}}9oFfA!Zj@zUpc9NL=1WV$ zNJUcjErEMqKquX=a@8DxbJV2Uo_DV2C;QWq-;KDGqd}gM!+7U;tpn4w0i5roms8Kw z+cz6@?U-_-qo$JdrqQH?qwoxfzXC%<9U@QS7o)FV+a;7`9<6qpvV5H;0??Fjbe9S@ zf7DgCY+9K5BpUpAOmJP#+hbbizZs4=)*Ik4lr!il1=kIpl!TlA11N!qQzS9hqS8Jz zQ&U}Qz41JW4Bk38ddxra?oPQWSAA=8AxLDnpBg$cWdjqASNf&#*AO2Q-^m|N9l<@r z{J7m(Ok)f9hv}AyFQS9c_J`PNU?qg>RU6VVN>baRWG&~lI_Q}N=U*`9DPv#Dme5&z zq{BZzolx{h%1imdURPM=ctg&QkMap2-yd@d&YXTz%0Ll~pQTc|6R<$?fO%8k6z^tz z>O81bpIM%(fr~#T@LTy&9IDJM4<7i(lr@`Uo@!hp*JS$dz$C02_!RBGK0%HvDYfOh z=+>Gcv$bZZEUgvT%q;Z}0Ee38T^ZKT&sia$FUn?KNbnv4F85#bX$phTZ$!ty8Z{?yN4*G>y%Up4nGXUdfsJ}_{VOp zJelZgQJ7Eir%7GiP|1#OJppZKM&{Db29VpP8A>hNzbs6&=ixj1og3UfpmbkS53=48 zFOF>={s&;FA2^5#*lq%^O%mEE^7sSu%gFa?(p7@a!r|I5ejMaVEx^ z1sfWpJCQGsq-(u2_>B{#?xu9xls+SmU{iy5{KL9Ihd7c`rVn%+TCo%9Wz7{jHkVcl z0mS#Y1Cf=FMG9HhPVeiet#RJ}ahEP+srPD(MuRF);x|=}$0HbtNs9c{68@kQiKUr* zl!^dDG{bYne*j^*#6mF%UvQ9Z=3g_?HiLli7k8jHsSR5rc%>hgzGI6?w;yE*Ub&V1 zoIx!~+5N1t7NJ4o-27Dc!8eNM@jRPos)_~asvfYYejyjg2DD}0gP_RxKl*ze+?K98 z%Dm{>tXti@C+MdQGdvwLKaC@4#dIUKGH-4^y?#_&N3>`3+YHMKCMAKzt4DOBsV+w9 z4!>fCr~74@dZdo_P3Tr7xH-6MI!Kx@WyYJcykFGHQ?Ndd!5G?}t1wY0xKSR`&b%S8 zRMPW|8>p<9%{1;Cqe50*k`pYwNaOyM8@n%B<*)hP>-bwQ)`v4HJ%-G|5Nhz7FD&>l zr}a4#mjm-(T_5EeC@{Z5Lf`z&P?cAAXS{new9D`rM5N&IAno2c1LUG5{Y~*XA#;9) z9fO5%l9xI6v4<}~4cIK|`1)fF`luvDgqAIa9aOA#`scfQn^$CvGOOBZX z(;yq<+NKLMi9H(Xm-0*%5cKtO84D5{EOq^C$usT9L@%CVx=Jn-}vBDIRKGo+5b%4fqJN^ZPtIwBCR&z2Icyg$t+hFSWg{mDOoZd=$&K`=eO zD$RNNkGFVAh0aN)flyQ&euecXIqrh~AFm?p*^e@}+B7%6P1i*_ur*sLm|fbsn8Dkc zwDg;OVRl{3THt+Mqyv;fQyd-|tQzc5wvX-S3r;|*&Fvu`Vi^n6qg%VKlec#M0oYmw zdBNZg)p9vDg&P)*VFI^4S2IdKA*SZSk{XA81MaY~pQ5;{9Wxl=I(E5xX^~k!n-ex? zKo&0}iy}h$aVzFsx}Ij_h{UUXDei2V-ial^<nj1U0YSCp=2+@^g|31qb9t#Mp9WM&FF7o050p%lh1M@lZ+|W1cE?vt(D0 zK~`B0@>-h{Lf_J0zvmk!gu;dgdJi4}=doi7bPEw0NFTIuV2D zX_;jEZqN1g7#Icn;m59tXSjcxoJ)eFw}rpp@V4LH`@2WGo||%Wp8t4AMMZB$OR;DK zRr5NS{!YQB2R4c>wK;f&#bfZv33ai&&`3}$Djlk#uUU*B&5p>h|{*#4<*^P~!h zP|Xz$mxc)AtI4dENtENJ?kx3#6s+3*k3L&_$|O-bcdm>$h`8_W7_C~Sv}nnK71f;# zRTqu>uw5=X(tMiPk-tS~`IfHuZ$oO~m;K3)-!%g@i`{_)T=oua?j?&OWlBs*lxSz~ zGsJlDA5o_D?M(Z*l)X4VInJJ^-}i?&N8FusHWjf$u}e!SOR>WXru+=KEo7r<$v8;| z*BKtL+HlM$k}LAwZg6o^f=u^*2TbKXbwoca%W7qY8HzpIXpz-evoK|6`pJ{8xT>3e zbsSfJ#oP1f5#oE8*bqMt0wm9lt64tSovG7$S!whJWdo}LmGM+w_Uv zb@lYqFF&Ia-eBJKu&eP+8A(fnrUB7ga^pt@^922YjB=8@pgsPh7@ncrK(Ti{zwHz% zC1Hi(v*F|gt$UWQezx~IVUzs;156}vGn!+T)l>O-bZ~x<7&H&9T74w17k&3dB8xr+ z$Ul-;k$Xq@q4r@slNLQv{vyLH5N-p(%bRyyYUJ}-#J!APo*I2? z(fi_GaaJw{VA!e_V}R+n91=saXR1tdudIp;Z8ve%$Vm2*>M8axt2~*2bbsx4Y~XfP zZQt`}%1+IsjJ>vc-`kGy>GzE~^OGQ+sE96WU{||l!b3LA;vDR`cT-Nbr&aCld%p;M zIcoH@J%}?1?d;?x3ar{JE_&|T2$OzpD{@U1oNEf>7}}TXqU=939K8*lf9dkpj#x4X zcH0@ok?F&;3#jqt{K@;NEayOgJy09tBGHMz3<+KTLZ1zs=~7Cocb z38cME2*<_T{BWf7F-4mu{2U!w&r3N_0RP*N=6+G*5R<}!(HZkg47-82${J;6Vq(z^ zk8J_6;_I=G+OPl89b_Q*xOYxD!YH9R^VHQ;HgWCGQfwRRuQb*({mTKMXO)jqPo!W; zZTq`V278HAtCdZx7yE&D{Y1RF*I{fIg+p#$IPhW5ylf}u56Wa#%-^l&$&92-52<7N zM_4Qa=_-?`pz5|>>Wq0I58Q_xm^ID6>h(`p(!FOOQoZRk#!Sjux-gg^YmA$NOCFsLM0P&moheLF1QKtV5?cN=vGIv*KQ20Uba!M<<wOi_LfPBnJS*;h2XU)EtCQ&6LH!Wxak{fdhu!VM7E|UJ7V&F z4j8Iu7X846nkYPgnKIiqG`xH9ZgWuCh=xb0ygF^&Bb+({?dEV2X~L@{@9oM$gteCb zB#?Nz!;`Ofwtp^$JO9dCgDMV_=xAsq?>QPgouz^bt%9reCTNB+g+Gak-|UP?>-`5H zlT@yFaU6GYWk6zq@-z>WeFb$EQFz7ksC1d>S8z72>J80b9 z*B#|Zz4+Jd=44lac}S?1w-H-ry1i6y?vjIATfD8%Fa6B&PC_OFmfO@XLwCNU31sE< zF#D^@#Tvu^TOj5&wucXTtLDHoRONljjrI1AmtZ=Gt*Hr;W!>(Sj^*AQan?biUChAWe~Aqtuq>R^7v11b*%x@CWZZey@V@ zNeOyVHY^r_@BT8aW&#nV5m`G0b&7}_ikp(Ze%%i^k!;*F_S;US-vjEtqYURV5)TYLD-iAr^vSEf;rGl^7dJex=C?A9;1D$3S-+@Dz=mw3!yACh}}^x=Llt z{Y8uw`_6~l-L`SRH)Un@UnaB!O7Q~bY!kLj8BrW%rlKt~b`I_pZnCwipSP_JX}#_t zpO!Y}tEgJP2*nc_8!Wbs)D2fZ*OT;Lw%^`r5BR3J6(9Z&fN$YQbl~)5b4AvxlKC9h zp=+Z2!F|z>6S5SKMsaWEI6 zHp(`)aiPm%N5-eH=AeTb<>IF*RGd?t>0pA273NtEnvkm4=f!#G$)%fiONKe36*Ju) z44i&3W8iF8ka_RLrNF%MdUJ76n(OcU*f%^vbej_1B2BlwuZ|D*s{LERnKrjotIZS% zl4mP5>}(dzivBI&AS3e75p&zB;Zohn1D&I-qGh`uep7em0b??V%EX@jmM`^G(88m~ z(#|$0&pTH9%WVetYiQc_>nAr68ElldzGQX;d$49|*5VO>&sbFpb z>gWbp;zJPAT~3}#X)AWfn6Gflybe`dr!5IvGlTdW6tQcF1(WA1_!XEPQblK+i<>m+!0^^tS z5|{i?&gpu|KwJ*RLn*sE`}%J>QkaTlUR@1b$D+Ab!gp?G1Mm??Uh#7C(BT9pXbanQ z7Z+$cRQyA)Tzw5^y}`yyiV6Ptlb$tWj9}G7&2~yd6tF?X=#+{zWMRs9?*2A*z#(9! z7RUW~O2)jOiUFrT44aW`B6za4R$kgaz0Lg@>5$g(QJcX_%-DAuR_aBsKgY$xgOx^` zdZ^@;p%YUE%1e_nV!$vHQGY4!#?qpGG<(~oYXeSElb^}ThaWvihV;;Ng}zNg>5E@w90UiklElxnv3dI&FRmG-CwC9;6&TBMyR#@39HlZYSx|?x#_fQ z?UDprVdW|mFs`DUQ;+S|62Cd!<+Hp+qAjfZ#{R@~g}wP(Wve&bMP{)J z4H-w%BDTQD(?`CzGcu6yA}<0+BB|g^ac*$jVG~iLNvKPTuW~mGD7UdGur=lB{GNWwwn|Bazn&cSlD&|CZ?Bm$gL1s0Xh9un zk}_NOJ7!2AV$g#@HXYM5o#sqgGU_fuK}mspr#WY}lzKDvrF$&TVgK1|AAu*gg*)}_ zZ0vyaXRBXb3`CG$DBO*7N#1o;)Q{#k8_VVtrk$=g1N2~^TvX4jpz58y@amEVjD6}d zYtip+$g`p_=v-xoKA(0e0Y=e@+wpoov$K!Tu`9{s#WF~VyH=Xi(!a^?<0Y#V)5WK9 z?Zj9ECEeNi>^&=r3w}45ke0Kq^8PC={{nr+lX{URowtO{&s;QIhLzc8rrV=8;v+6% zWmIP~`{%eTnKM4Bc6;DgMNors^{rwagr;o839pW3NECiIg^ck18dq}Cx!i4vb(q_1 zeur0A%bCaeBH(02iI#(Bb(95ZsZK$Syk#hHS~udcnYSvA?oJ==`^jpJk`<*#&aBw%QyI^|_n> z)bld40V}(m3F_$V4aW@C8=PE1zOoXMe9vHGaUI;=j=3HHrg)gr&pOzD`9Q}U<2Rad zWc*g#JJ;zwaV^IU9ugIGP${GidfQwd_n_F4vu52Gai)m^?<_3Mm$P%5OjPD_rs74} z=Zv-I7FL)IUI~wJc1pbejA?3ir-8KO2JGg{vUDDY{Dnq#)~Ftd$DR~#_$xfOi5_myuEzM}T5t3NXm~^3D^B>B zV5x_+3upx$^HzQ48zBgJrtc2is|x4|>7VY`)-IV~s%9!-gj?4>{(M1g%S13=I4gMI z*PNn4((^p%uZ?@or@LOmZ)u)0^?kkJFPASUqsek^s_=#4jMBCAK;)uCJ-_#oZouWZ ziwnC}ji^95M}mNHSW9+M5qxYdjfUk}ioWYD-DQ0E8ez%w1Np*oosr=tb(6<{tSb!B z_tDRKt`16~v>u4%WsrC>zKY|tFY4j+`W@4vOsr=oQ-G-TKL8&3sULf(pl9aAeBKvQ z4w^>wR#lPw3(D8!V+JDyQgqRa@1suqM5-0bD@|Y7m1W%eTmK~LSF&P%*~}K@GPk@w zdppoAO-iR1kt;CcsIg>JV^L<9D9hjyyhE9b;Bb5) z8(@H4wohCm_`%cx6JNt1rKq~{AAn__Z^pSW|1VgP8w_r3L-J&JL;P7k@Z`B#;J=HJ z9ltd1aZ&Jiz?rVs>C~k5%Ai>7!B;BL9}XgjP3=j3U~n&px}^*&4Nopr_Y+nf5~_-) z(stn7%kqjhLh|+;Rf(9K8SHkpn@jb&kX7EW7V_GijQdwCwV6~am7_R&dg(sloVxu3 zT%>#y)#B^m%{P9~`JhVsa5^@}*kpAqwP^R*IzVW$O~KAlaA{zg$BfAhfcxBP+zBay zou{Ug**SNGM@Nfo31ISGaYzyNG0rnhvJ~ zlP40mSv(Q$MohADC?1#P$@Me!*7soF?=q%Ae^4e|>JK#XxV}ogO-{Pg(JvLoX7R#U z*|}ye9&md%rQo%gVsoy7yPvTVQcQI+QTD(Xu*@XSGaacJ>pnrX zY-)_78Ijn%k$bqVB9cBh{I&E4OPmyEY5xklX1H1d?5{{V7dK;L8jnaL9tJyu?*|2s zxhOZdXxX@?_HY~N){PLOfCetUCM#rTFdEGoNa+Drudn`gEE&o^``LdJd=q?2nj4;L zUC_xn`lEc-mOVc#pFrbzOACBJv-I$1)avKZBIoN!_RQ3o-rse-tbYxK@nQ2(puHW6 ziN;b&pociiWSxmZkq%G)n;#rl9iQ&&rKyUy2DXfFFq|p~k!pazmVW>YItp~TGV%4${V^_$Ek{W|Fe(lun!H)%|1LSwI()&h z>`|?$J9pxqb#TgC>YJ6Z+?F`#Vw^O)8^y`oY*bUZy Date: Sun, 25 Sep 2022 15:40:32 +0100 Subject: [PATCH 3/4] Add Camera Image Hierarcy --- app/config.py | 36 +++++++++----------- app/routers.py | 10 +++--- static/editor/bundle.js | 2 +- static/{camera/image.jpg => game/teddy.jpg} | Bin test/test_editor.py | 20 +++++++++++ 5 files changed, 42 insertions(+), 26 deletions(-) rename static/{camera/image.jpg => game/teddy.jpg} (100%) diff --git a/app/config.py b/app/config.py index 1675067..8c567d3 100644 --- a/app/config.py +++ b/app/config.py @@ -15,8 +15,6 @@ class Settings: static_path: Path = Path("static/").absolute() editor_path: Path = Path("static/editor/").absolute() docs_path: Path = Path("static/docs/").absolute() - static_image_file: Path = Path("static/image.jpg") - base_image_file: Path = Path("static/camera/image.jpg") round_len: float = 180.0 # seconds reap_grace_time: float = 5.0 # seconds @@ -30,6 +28,22 @@ class Settings: teamname_file: Path = Path("/home/pi/teamname.txt") zone: bool = False + """ + Pick a start image in order of preference : + 1) Camera Image (Deleted on Start) + 2) Corner Image (USB) + 3) Team Image (Uploaded) + 4) Generic Corner Image (Arena USB Exists) + 5) Teddy Image + """ + camera_image_files: list[Path] = [ + Path("static/image.jpg"), + arena_usb_path / "Corner.jpg", + Path('usercode/editable/team_logo.jpg'), + Path('/home/pi/game_logo.jpg'), + Path("static/game/teddy.jpg") + ] + # tempfile.mktemp is deprecated, but there's no possibility of a race -- usr_fifo_path = tempfile.mktemp(prefix="shepherd-fifo-") @@ -80,29 +94,11 @@ def _get_team_specifics(self): Only makes sense to run this if we are on a brain Teamname is set per brain before shipping and allows unique graphics for ID'ing teams in the arena. - - Pick a start image in order of preference : - 1) We have a team corner image on the USB - 2) The team have uploaded their own image to the robot - 3) We have a generic corner image on the USB - 4) The game image """ if self.teamname_file.exists(): teamname_jpg = self.teamname_file.read_text().replace('\n', '') + '.jpg' else: teamname_jpg = 'none' - start_img_path = self.arena_usb_path / teamname_jpg - if not start_img_path.exists(): - start_img_path = Path('usercode/editable/team_logo.jpg') - if not start_img_path.exists(): - start_img_path = self.arena_usb_path / 'Corner.jpg' - if not start_img_path.exists(): - start_img_path = Path('/home/pi/game_logo.jpg') - - if start_img_path.exists(): - displayed_img_path = Path('static/image.jpg') - displayed_img_path.write_bytes(start_img_path.read_bytes()) - config = Settings() diff --git a/app/routers.py b/app/routers.py index 8f27efe..541b8b7 100644 --- a/app/routers.py +++ b/app/routers.py @@ -12,7 +12,7 @@ from app.run import runner import app.editor import app.upload -import app.config +from app.config import config # ============================================================================== # Runner router @@ -91,7 +91,7 @@ def delete_file(filename: str): @files_router.get('/image.jpg') def get_image(): - if app.config.config.static_image_file.is_file(): - return FileResponse(app.config.config.static_image_file) - else: - return FileResponse(app.config.config.base_image_file) \ No newline at end of file + for camera_file in config.camera_image_files: + if camera_file.exists(): + return FileResponse(camera_file) + raise HTTPException(status_code=404, detail="Item not found") \ No newline at end of file diff --git a/static/editor/bundle.js b/static/editor/bundle.js index 505e337..1482573 100644 --- a/static/editor/bundle.js +++ b/static/editor/bundle.js @@ -24,4 +24,4 @@ function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterat */ var n=o(326),i=o(327),r=o(265);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return W(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,o){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,o);case"utf8":case"utf-8":return k(this,t,o);case"ascii":return R(this,t,o);case"latin1":case"binary":return N(this,t,o);case"base64":return w(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,o);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,o){var n=e[t];e[t]=e[o],e[o]=n}function _(e,t,o,n,i){if(0===e.length)return-1;if("string"==typeof o?(n=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=i?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(i)return-1;o=e.length-1}else if(o<0){if(!i)return-1;o=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,o,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):y(e,[t],o,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,o,n,i){var r,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,o/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(r=o;ra&&(o=a-l),r=o;r>=0;r--){for(var h=!0,d=0;di&&(n=i):n=i;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var s=0;s>8,i=o%256,r.push(i),r.push(n);return r}(t,e.length-o),e,o,n)}function w(e,t,o){return 0===t&&o===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,o))}function k(e,t,o){o=Math.min(e.length,o);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=o)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(r=e[i+1]))&&(l=(31&u)<<6|63&r)>127&&(c=l);break;case 3:r=e[i+1],s=e[i+2],128==(192&r)&&128==(192&s)&&(l=(15&u)<<12|(63&r)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:r=e[i+1],s=e[i+2],a=e[i+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&r)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var o="",n=0;for(;n0&&(e=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(e+=" ... ")),""},l.prototype.compare=function(e,t,o,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||o>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=o)return 0;if(n>=i)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(i>>>=0)-(n>>>=0),s=(o>>>=0)-(t>>>=0),a=Math.min(r,s),u=this.slice(n,i),c=e.slice(t,o),h=0;hi)&&(o=i),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,e,t,o);case"utf8":case"utf-8":return b(this,e,t,o);case"ascii":return E(this,e,t,o);case"latin1":case"binary":return C(this,e,t,o);case"base64":return S(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(e,t,o){var n="";o=Math.min(e.length,o);for(var i=t;in)&&(o=n);for(var i="",r=t;ro)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,o,n,i,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,o,n){t<0&&(t=65535+t+1);for(var i=0,r=Math.min(e.length-o,2);i>>8*(n?i:1-i)}function M(e,t,o,n){t<0&&(t=4294967295+t+1);for(var i=0,r=Math.min(e.length-o,4);i>>8*(n?i:3-i)&255}function x(e,t,o,n,i,r){if(o+n>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function B(e,t,o,n,r){return r||x(e,0,o,4),i.write(e,t,o,n,23,4),o+4}function F(e,t,o,n,r){return r||x(e,0,o,8),i.write(e,t,o,n,52,8),o+8}l.prototype.slice=function(e,t){var o,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=this[e],i=1,r=0;++r=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=t,i=1,r=this[e+--n];n>0&&(i*=256);)r+=this[e+--n]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,o,n){(e=+e,t|=0,o|=0,n)||A(this,e,t,o,Math.pow(2,8*o)-1,0);var i=1,r=0;for(this[t]=255&e;++r=0&&(r*=256);)this[t+i]=e/r&255;return t+o},l.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=0,s=1,a=0;for(this[t]=255&e;++r>0)-a&255;return t+o},l.prototype.writeIntBE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=o-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+o},l.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,o){return B(this,e,t,!0,o)},l.prototype.writeFloatBE=function(e,t,o){return B(this,e,t,!1,o)},l.prototype.writeDoubleLE=function(e,t,o){return F(this,e,t,!0,o)},l.prototype.writeDoubleBE=function(e,t,o){return F(this,e,t,!1,o)},l.prototype.copy=function(e,t,o,n){if(o||(o=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r55295&&o<57344){if(!i){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&r.push(239,191,189);continue}i=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),i=o;continue}o=65536+(i-55296<<10|o-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function W(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,o,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+o]=e[i];return i}}).call(this,o(80))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(101),i=o(242);t.Disposable=i.Disposable,t.CancellationToken=i.CancellationToken,t.Event=i.Event,t.Emitter=i.Emitter,function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101)),function(e){var t=window,o=Symbol("Services");e.get=function(){var e=t[o];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){t[o]&&console.error(new Error("Language Client services has been overriden")),t[o]=e}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every((function(e){return"string"==typeof e||n.DocumentFilter.is(e)}))},function(e){e.is=function(e){return!!e&&"uri"in e&&"languageId"in e}}(t.DocumentIdentifier||(t.DocumentIdentifier={})),function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}))},function(e,t,o){"use strict";(function(e){function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});const i=o(171),r=o(504);t.RequestType=r.RequestType,t.RequestType0=r.RequestType0,t.RequestType1=r.RequestType1,t.RequestType2=r.RequestType2,t.RequestType3=r.RequestType3,t.RequestType4=r.RequestType4,t.RequestType5=r.RequestType5,t.RequestType6=r.RequestType6,t.RequestType7=r.RequestType7,t.RequestType8=r.RequestType8,t.RequestType9=r.RequestType9,t.ResponseError=r.ResponseError,t.ErrorCodes=r.ErrorCodes,t.NotificationType=r.NotificationType,t.NotificationType0=r.NotificationType0,t.NotificationType1=r.NotificationType1,t.NotificationType2=r.NotificationType2,t.NotificationType3=r.NotificationType3,t.NotificationType4=r.NotificationType4,t.NotificationType5=r.NotificationType5,t.NotificationType6=r.NotificationType6,t.NotificationType7=r.NotificationType7,t.NotificationType8=r.NotificationType8,t.NotificationType9=r.NotificationType9;const s=o(243);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=o(244);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const l=o(186);t.Disposable=l.Disposable,t.Event=l.Event,t.Emitter=l.Emitter;const u=o(505);t.CancellationTokenSource=u.CancellationTokenSource,t.CancellationToken=u.CancellationToken;const c=o(506);var h,d,g,p,f,m,_;n(o(507)),n(o(508)),function(e){e.type=new r.NotificationType("$/cancelRequest")}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(d=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(d=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new r.NotificationType("$/setTraceNotification")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new r.NotificationType("$/logTraceNotification")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class y extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,y.prototype)}}function v(t,o,n,s){let a=0,v=0,b=0;const E="2.0";let C,S,T=void 0,w=Object.create(null),k=void 0,O=Object.create(null),R=new c.LinkedMap,N=Object.create(null),L=Object.create(null),I=d.Off,D=g.Text,A=_.New,P=new l.Emitter,M=new l.Emitter,x=new l.Emitter,B=new l.Emitter;function F(e){return"req-"+e.toString()}function H(e,t){var o;r.isRequestMessage(t)?e.set(F(t.id),t):r.isResponseMessage(t)?e.set(null===(o=t.id)?"res-unknown-"+(++b).toString():"res-"+o.toString(),t):e.set("not-"+(++v).toString(),t)}function U(e){}function V(){return A===_.Listening}function W(){return A===_.Closed}function j(){return A===_.Disposed}function G(){A!==_.New&&A!==_.Listening||(A=_.Closed,M.fire(void 0))}function z(){C||0===R.size||(C=e(()=>{C=void 0,function(){if(0===R.size)return;let e=R.shift();try{r.isRequestMessage(e)?function(e){if(j())return;function t(t,n,i){let s={jsonrpc:E,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,Y(s,n,i),o.write(s)}function n(t,n,i){let r={jsonrpc:E,id:e.id,error:t.toJson()};Y(r,n,i),o.write(r)}!function(e){if(I===d.Off||!S)return;if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Received request '${e.method} - (${e.id})'.`,t)}else X("receive-request",e)}(e);let s,a,l=w[e.method];l&&(s=l.type,a=l.handler);let c=Date.now();if(a||T){let l=new u.CancellationTokenSource,h=String(e.id);L[h]=l;try{let u,d=u=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(l.token):T(e.method,l.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,l.token):T(e.method,...e.params,l.token):a?a(e.params,l.token):T(e.method,e.params,l.token);u?d.then?d.then(o=>{delete L[h],t(o,e.method,c)},t=>{delete L[h],t instanceof r.ResponseError?n(t,e.method,c):t&&i.string(t.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(delete L[h],t(u,e.method,c)):(delete L[h],function(t,n,i){void 0===t&&(t=null);let r={jsonrpc:E,id:e.id,result:t};Y(r,n,i),o.write(r)}(u,e.method,c))}catch(o){delete L[h],o instanceof r.ResponseError?t(o,e.method,c):o&&i.string(o.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${o.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}(e):r.isNotificationMessage(e)?function(e){if(j())return;let t,o=void 0;if(e.method===h.type.method)t=e=>{let t=e.id,o=L[String(t)];o&&o.cancel()};else{let n=O[e.method];n&&(t=n.handler,o=n.type)}if(t||k)try{!function(e){if(I===d.Off||!S||e.method===f.type.method)return;if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Received notification '${e.method}'.`,t)}else X("receive-notification",e)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():k(e.method):i.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t(...e.params):k(e.method,...e.params):t?t(e.params):k(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else x.fire(e)}(e):r.isResponseMessage(e)?function(e){if(j())return;if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),o=N[t];if(function(e,t){if(I===d.Off||!S)return;if(D===g.Text){let o=void 0;if(I===d.Verbose&&(e.error&&e.error.data?o=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?o=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),t){let n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";S.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,o)}else S.log(`Received response ${e.id} without active response promise.`,o)}else X("receive-response",e)}(e,o),o){delete N[t];try{if(e.error){let t=e.error;o.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${o.method}' failed with message: ${e.message}`):n.error(`Response handler '${o.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),o=N[e];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{z()}}()}))}t.onClose(G),t.onError((function(e){P.fire([e,void 0,void 0])})),o.onClose(G),o.onError((function(e){P.fire(e)}));let K=e=>{try{if(r.isNotificationMessage(e)&&e.method===h.type.method){let t=F(e.params.id),n=R.get(t);if(r.isRequestMessage(n)){let i=s&&s.cancelUndispatched?s.cancelUndispatched(n,U):void 0;if(i&&(void 0!==i.error||void 0!==i.result))return R.delete(t),i.id=n.id,Y(i,e.method,Date.now()),void o.write(i)}}H(R,e)}finally{z()}};function Y(e,t,o){if(I!==d.Off&&S)if(D===g.Text){let n=void 0;I===d.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),S.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-o}ms`,n)}else X("send-response",e)}function X(e,t){if(!S||I===d.Off)return;const o={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};S.log(o)}function q(){if(W())throw new y(m.Closed,"Connection is closed.");if(j())throw new y(m.Disposed,"Connection is disposed.")}function $(e){return void 0===e?null:e}function J(e,t){let o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(let e=0;e{let n,r;if(q(),i.string(e))switch(n=e,t.length){case 0:r=null;break;case 1:r=t[0];break;default:r=t}else n=e.method,r=J(e,t);let s={jsonrpc:E,method:n,params:r};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Sending notification '${e.method}'.`,t)}else X("send-notification",e)}(s),o.write(s)},onNotification:(e,t)=>{q(),i.func(e)?k=e:t&&(i.string(e)?O[e]={type:void 0,handler:t}:O[e.method]={type:e,handler:t})},sendRequest:(e,...t)=>{let n,s;q(),function(){if(!V())throw new Error("Call listen() first.")}();let l=void 0;if(i.string(e))switch(n=e,t.length){case 0:s=null;break;case 1:u.CancellationToken.is(t[0])?(s=null,l=t[0]):s=$(t[0]);break;default:const e=t.length-1;u.CancellationToken.is(t[e])?(l=t[e],s=2===t.length?$(t[0]):t.slice(0,e).map(e=>$(e))):s=t.map(e=>$(e))}else{n=e.method,s=J(e,t);let o=e.numberOfParams;l=u.CancellationToken.is(t[o])?t[o]:void 0}let c=a++,p=new Promise((e,t)=>{let i={jsonrpc:E,id:c,method:n,params:s},a={method:n,timerStart:Date.now(),resolve:e,reject:t};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Sending request '${e.method} - (${e.id})'.`,t)}else X("send-request",e)}(i);try{o.write(i)}catch(e){a.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(c)]=a)});return l&&l.onCancellationRequested(()=>{Z.sendNotification(h.type,{id:c})}),p},onRequest:(e,t)=>{q(),i.func(e)?T=e:t&&(i.string(e)?w[e]={type:void 0,handler:t}:w[e.method]={type:e,handler:t})},trace:(e,t,o)=>{let n=!1,r=g.Text;void 0!==o&&(i.boolean(o)?n=o:(n=o.sendNotification||!1,r=o.traceFormat||g.Text)),D=r,S=(I=e)===d.Off?void 0:t,!n||W()||j()||Z.sendNotification(p.type,{value:d.toString(e)})},onError:P.event,onClose:M.event,onUnhandledNotification:x.event,onDispose:B.event,dispose:()=>{if(j())return;A=_.Disposed,B.fire(void 0);let e=new Error("Connection got disposed.");Object.keys(N).forEach(t=>{N[t].reject(e)}),N=Object.create(null),L=Object.create(null),R=new c.LinkedMap,i.func(o.dispose)&&o.dispose(),i.func(t.dispose)&&t.dispose()},listen:()=>{q(),function(){if(V())throw new y(m.AlreadyListening,"Connection is already listening")}(),A=_.Listening,t.listen(K)},inspect:()=>{console.log("inspect")}};return Z.onNotification(f.type,e=>{I!==d.Off&&S&&S.log(e.message,I===d.Verbose?e.verbose:void 0)}),Z}t.ConnectionError=y,function(e){e.is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)}}(t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(_||(_={})),t.createMessageConnection=function(e,o,n,i){var r;return n||(n=t.NullLogger),v(void 0!==(r=e).listen&&void 0===r.read?e:new s.StreamMessageReader(e),function(e){return void 0!==e.write&&void 0===e.end}(o)?o:new a.StreamMessageWriter(o),n,i)}}).call(this,o(148).setImmediate)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return a}));var n=o(8),i=function(){function e(e,t,o,n){this.startColumn=e,this.endColumn=t,this.className=o,this.type=n}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type},e.equalsArr=function(t,o){var n=t.length;if(n!==o.length)return!1;for(var i=0;io)&&(!c.isEmpty()||0!==u.type&&3!==u.type)){var h=c.startLineNumber===o?c.startColumn:n,d=c.endLineNumber===o?c.endColumn:i;r[s++]=new e(h,d,u.inlineClassName,u.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}(),r=function(e,t,o){this.startOffset=e,this.endOffset=t,this.className=o},s=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,o){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t);break}this.count++},e}(),a=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var o=[],i=new s,r=0,a=0,l=t.length;a1){var g=e.charCodeAt(c-2);n.isHighSurrogate(g)&&c--}if(h>1){g=e.charCodeAt(h-2);n.isHighSurrogate(g)&&h--}var p=c-1,f=h-2;r=i.consumeLowerThan(p,r,o),0===i.count&&(r=p),i.insert(f,d)}return i.consumeLowerThan(1073741824,r,o),o},e}()},function(e,t,o){"use strict";var n=o(0),i=o(10),r=o(204),s=o(74),a=o(125),l=o(1),u=(o(473),o(30)),c=o(179),h=l.a,d=function(){function e(e,t){this.os=t,this.domNode=l.k(e,h(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return e.prototype.set=function(t,o){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,o)||(this.keybinding=t,this.matches=o,this.render())},e.prototype.render=function(){if(l.l(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],o=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),o&&(l.k(this.domNode,h("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,o,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,o){var n=c.b.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,o&&o.ctrlKey,n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,o&&o.shiftKey,n.separator),t.altKey&&this.renderKey(e,n.altKey,o&&o.altKey,n.separator),t.metaKey&&this.renderKey(e,n.metaKey,o&&o.metaKey,n.separator);var i=t.keyLabel;i&&this.renderKey(e,i,o&&o.keyCode,"")},e.prototype.renderKey=function(e,t,o,n){l.k(e,h("span.monaco-keybinding-key"+(o?".highlight":""),null,t)),n&&l.k(e,h("span.monaco-keybinding-key-separator",null,n))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&Object(u.e)(e.firstPart,t.firstPart)&&Object(u.e)(e.chordPart,t.chordPart)},e}(),g=o(15);o.d(t,"a",(function(){return _})),o.d(t,"b",(function(){return y})),o.d(t,"c",(function(){return E}));var p,f=(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),m=0,_=function(){function e(e){void 0===e&&(e=[]),this.id=(m++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return[this.getLabel(),this.getDescription(),this.getDetail()].filter((function(e){return!!e})).join(", ")},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getTooltip=function(){return null},e.prototype.getDescriptionTooltip=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHighlights=function(e,t,o){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=o},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e}(),y=function(e){function t(t,o,n){var i=e.call(this)||this;return i.entry=t,i.groupLabel=o,i.withBorder=n,i}return f(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,o,n){this.entry?this.entry.setHighlights(t,o,n):e.prototype.setHighlights.call(this,t,o,n)},t.prototype.run=function(t,o){return this.entry?this.entry.run(t,o):e.prototype.run.call(this,t,o)},t}(_),v=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.b.as(null)},e}(),b=function(){function e(e,t){void 0===e&&(e=new v),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof y?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,o){var n=document.createElement("div");l.f(n,"sub-content"),t.appendChild(n);var i=l.a(".quick-open-row"),u=l.a(".quick-open-row"),c=l.a(".quick-open-entry",null,i,u);n.appendChild(c);var h=document.createElement("span");i.appendChild(h);var p=new r.b(i,{supportHighlights:!0,supportDescriptionHighlights:!0}),f=document.createElement("span");i.appendChild(f),l.f(f,"quick-open-entry-keybinding");var m=new d(f,g.a),_=document.createElement("div");u.appendChild(_),l.f(_,"quick-open-entry-meta");var y,v=new a.a(_);"quickOpenEntryGroup"===e&&(y=document.createElement("div"),l.f(y,"results-group"),t.appendChild(y)),l.f(t,"actions");var b=document.createElement("div");return l.f(b,"primary-action-bar"),t.appendChild(b),{container:t,entry:c,icon:h,label:p,detail:v,keybinding:m,group:y,actionBar:new s.a(b,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,o,n){if(this.actionProvider.hasActions(null,e)?l.f(o.container,"has-actions"):l.G(o.container,"has-actions"),o.actionBar.context=e,this.actionProvider.getActions(null,e).then((function(e){o.actionBar.isEmpty()&&e&&e.length>0?o.actionBar.push(e,{icon:!0,label:!1}):o.actionBar.isEmpty()||e&&0!==e.length||o.actionBar.clear()})),e instanceof y&&e.getGroupLabel()?l.f(o.container,"has-group-label"):l.G(o.container,"has-group-label"),e instanceof y){var i=e,r=o;i.showBorder()?(l.f(r.container,"results-group-separator"),r.container.style.borderTopColor=n.pickerGroupBorder.toString()):(l.G(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=i.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=n.pickerGroupForeground.toString()}if(e instanceof _){var a=e.getHighlights(),u=a[0],c=a[1],h=a[2],d=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";o.icon.className=d;var g=e.getLabelOptions()||Object.create(null);g.matches=u||[],g.title=e.getTooltip(),g.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),g.descriptionMatches=c||[],o.label.setValue(e.getLabel(),e.getDescription(),g),o.detail.set(e.getDetail(),h),o.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var o=t;o.actionBar.dispose(),o.actionBar=null,o.container=null,o.entry=null,o.keybinding.dispose(),o.keybinding=null,o.detail.dispose(),o.detail=null,o.group=null,o.icon=null,o.label.dispose(),o.label=null},e}(),E=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new v),this._entries=e,this._dataSource=this,this._renderer=new b(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?n.a("quickOpenAriaLabelEntry","{0}, picker",e.getAriaLabel()):n.a("quickOpenAriaLabel","picker")},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,o){return e.run(t,o)},e}()},function(e,t,o){"use strict";var n=o(1),i=o(30),r=o(8);function s(e){return Object(r.escape)(e)}o.d(t,"a",(function(){return a}));var a=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,o,n,r){void 0===o&&(o=[]),void 0===n&&(n=""),t||(t=""),r&&(t=e.escapeNewLines(t,o)),this.didEverRender&&this.text===t&&this.title===n&&i.e(this.highlights,o)||(Array.isArray(o)||(o=[]),this.text=t,this.title=n,this.highlights=o,this.render())},e.prototype.render=function(){n.l(this.domNode);for(var e,t=[],o=0,i=0;i"),t.push(s(this.text.substring(o,e.start))),t.push(""),o=e.end),t.push(''),t.push(s(this.text.substring(e.start,e.end))),t.push(""),o=e.end);o"),t.push(s(this.text.substring(o))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var o=0,n=0;return e.replace(/\r\n|\r|\n/,(function(e,i){n="\r\n"===e?-1:0,i+=o;for(var r=0,s=t;r=i&&(a.start+=n),a.end>=i&&(a.end+=n))}return o+=n,"⏎"}))},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(8),i=o(20),r=o(2),s=o(23),a=o(32),l=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.prevTabStop(n,o)/o},e.shiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.nextTabStop(n,o)/o},e.prototype._addEditOperation=function(e,t,o){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,o):e.addEditOperation(t,o)},e.prototype.getEditOperations=function(t,o){var s=this._selection.startLineNumber,l=this._selection.endLineNumber;1===this._selection.endColumn&&s!==l&&(l-=1);var u=this._opts.tabSize,c=this._opts.oneIndent,h=s===l;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var d=["",c],g=0,p=0,f=s;f<=l;f++,g=p){p=0;var m=t.getLineContent(f),_=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(h||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),f>1)if(i.a.visibleColumnFromColumn(m,_+1,u)%u!=0&&t.isCheapToTokenize(f-1)){var y=a.a.getRawEnterActionAtPosition(t,f-1,t.getLineMaxColumn(f-1));if(y){if(p=g,y.appendText)for(var v=0,b=y.appendText.length;v console.log` because `log` has been completed recently."),i.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:i.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:i.a("suggestFontSize","Font size for the suggest widget.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:i.a("suggestLineHeight","Line height for the suggest widget.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:i.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:i.a("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:f.contribInfo.selectionHighlight,description:i.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:f.contribInfo.occurrencesHighlight,description:i.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:i.a("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:f.viewInfo.overviewRulerBorder,description:i.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:g.k(f.viewInfo.cursorBlinking),description:i.a("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:f.viewInfo.mouseWheelZoom,description:i.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:g.l(f.viewInfo.cursorStyle),description:i.a("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:f.viewInfo.cursorWidth,description:i.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:f.viewInfo.fontLigatures,description:i.a("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:f.viewInfo.hideCursorInOverviewRuler,description:i.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",i.a("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:f.viewInfo.renderWhitespace,description:i.a("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:f.viewInfo.renderControlCharacters,description:i.a("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:f.viewInfo.renderIndentGuides,description:i.a("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:f.viewInfo.highlightActiveIndentGuide,description:i.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",i.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:f.viewInfo.renderLineHighlight,description:i.a("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:f.contribInfo.codeLens,description:i.a("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:f.contribInfo.folding,description:i.a("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:f.contribInfo.foldingStrategy,description:i.a("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:f.contribInfo.showFoldingControls,description:i.a("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:f.contribInfo.matchBrackets,description:i.a("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:f.viewInfo.glyphMargin,description:i.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:f.useTabStops,description:i.a("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:_.trimAutoWhitespace,description:i.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,description:i.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:f.dragAndDrop,description:i.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[i.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),i.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),i.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:f.accessibilitySupport,description:i.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:f.showUnused,description:i.a("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:f.contribInfo.links,description:i.a("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:f.contribInfo.colorDecorators,description:i.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:f.contribInfo.lightbulbEnabled,description:i.a("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:i.a("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:f.contribInfo.codeActionsOnSave,description:i.a("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:f.contribInfo.codeActionsOnSaveTimeout,description:i.a("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:f.contribInfo.selectionClipboard,description:i.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:l.c},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.a("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:_.largeFileOptimizations,description:i.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},S=null;function T(){return null===S&&(S=Object.create(null),Object.keys(C.properties).forEach((function(e){S[e]=!0}))),S}function w(e){return T()["editor."+e]||!1}function k(e){return T()["diffEditor."+e]||!1}E.registerConfiguration(C)},function(e,t,o){"use strict";o.d(t,"a",(function(){return d})),o.d(t,"b",(function(){return g}));var n,i=o(15),r=o(96),s=o(27),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=i.d?1.5:1.35;function u(e,t){if("number"==typeof e)return e;var o=parseFloat(e);return isNaN(o)?t:o}function c(e,t,o){return eo?o:e}function h(e,t){return"string"!=typeof e?t:e}var d=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,o){var n=h(t.fontFamily,s.b.fontFamily),i=h(t.fontWeight,s.b.fontWeight),a=u(t.fontSize,s.b.fontSize);0===(a=c(a,0,100))?a=s.b.fontSize:a<8&&(a=8);var d=function(e,t){if("number"==typeof e)return Math.round(e);var o=parseInt(e);return isNaN(o)?t:o}(t.lineHeight,0);0===(d=c(d,0,150))?d=Math.round(l*a):d<8&&(d=8);var g=u(t.letterSpacing,0);g=c(g,-5,20);var p=1+.1*r.a.getZoomLevel();return new e({zoomLevel:o,fontFamily:n,fontWeight:i,fontSize:a*=p,lineHeight:d*=p,letterSpacing:g})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}(),g=function(e){function t(t,o){var n=e.call(this,t)||this;return n.isTrusted=o,n.isMonospace=t.isMonospace,n.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,n.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,n.spaceWidth=t.spaceWidth,n.maxDigitWidth=t.maxDigitWidth,n}return a(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(d)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("textModelService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return S})),o.d(t,"b",(function(){return T})),o.d(t,"c",(function(){return B})),o.d(t,"d",(function(){return F}));var n,i,r=o(22),s=o(6),a=o(12),l=o(210),u=o(118),c=o(19),h=o(49),d=o(0),g=o(57),p=o(104),f=o(75),m=o(21),_=o(1),y=o(42),v=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),b=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(r.c)("listService"),T=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var o=this;if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var n={widget:e,extraContextKeys:t};return this.lists.push(n),e.isDOMFocused()&&(this._lastFocusedWidget=e),Object(s.c)([e.onDidFocus((function(){return o._lastFocusedWidget=e})),Object(s.f)((function(){return o.lists.splice(o.lists.indexOf(n),1)})),e.onDidDispose((function(){o.lists=o.lists.filter((function(e){return e!==n})),o._lastFocusedWidget===e&&(o._lastFocusedWidget=void 0)}))])},e=E([C(0,a.e)],e)}(),w=new a.f("listFocus",!0),k=new a.f("listSupportsMultiselect",!0),O=new a.f("listHasSelectionOrFocus",!1),R=new a.f("listDoubleSelection",!1),N=new a.f("listMultiSelection",!1);var L,I="workbench.list.multiSelectModifier",D="workbench.list.openMode",A="workbench.tree.horizontalScrolling";function P(e){return"alt"===e.getValue(I)}function M(e){return"doubleClick"!==e.getValue(D)}function x(e,t){return e.controller||(e.controller=t.createInstance(F,{})),e.styler||(e.styler=new f.f((L||(L=Object(_.o)()),L))),e}var B=function(e){function t(t,o,n,i,r,s,a,l){var c=this,h=x(o,a),d=l.getValue(A)?y.b.Auto:y.b.Hidden,g=b({horizontalScrollMode:d,keyboardSupport:!1},Object(u.d)(s.getTheme(),u.e),n);return(c=e.call(this,t,h,g)||this).disposables=[],c.contextKeyService=function(e,t){var o=e.createScoped(t.getHTMLElement());return w.bindTo(o),o}(i,c),k.bindTo(c.contextKeyService),c.listHasSelectionOrFocus=O.bindTo(c.contextKeyService),c.listDoubleSelection=R.bindTo(c.contextKeyService),c.listMultiSelection=N.bindTo(c.contextKeyService),c._openOnSingleClick=M(l),c._useAltAsMultipleSelectionModifier=P(l),c.disposables.push(c.contextKeyService,r.register(c),Object(u.b)(c,s)),c.disposables.push(c.onDidChangeSelection((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t),c.listDoubleSelection.set(e&&2===e.length),c.listMultiSelection.set(e&&e.length>1)}))),c.disposables.push(c.onDidChangeFocus((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t)}))),c.disposables.push(l.onDidChangeConfiguration((function(e){e.affectsConfiguration(D)&&(c._openOnSingleClick=M(l)),e.affectsConfiguration(I)&&(c._useAltAsMultipleSelectionModifier=P(l))}))),c}return v(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=Object(s.d)(this.disposables)},t=E([C(3,a.e),C(4,S),C(5,c.c),C(6,r.a),C(7,h.b)],t)}(l.a);var F=function(e){function t(t,o){var n=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=f.a.ON_MOUSE_DOWN),e}(t))||this;return n.configurationService=o,n.disposables=[],Object(m.j)(t.openMode)&&(n.setOpenMode(n.getOpenModeSetting()),n.registerListeners()),n}return v(t,e),t.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(D)&&e.setOpenMode(e.getOpenModeSetting())})))},t.prototype.getOpenModeSetting=function(){return M(this.configurationService)?f.g.SINGLE_CLICK:f.g.DOUBLE_CLICK},t.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},t=E([C(1,h.b)],t)}(f.c);g.a.as(p.b.Configuration).registerConfiguration({id:"workbench",order:7,title:Object(d.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(i={},i[I]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(d.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(d.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(d.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},i[D]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(d.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},i[A]={type:"boolean",default:!1,description:Object(d.a)("horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench.")},i)})},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(22),i=Object(n.c)("logService"),r=function(){function e(){}return e.prototype.trace=function(e){for(var t=[],o=1;o=0){for(var n=[],i=0,r=this._placeholderGroups[this._placeholderGroupsIdx];i0&&this._editor.executeEdits("snippet.placeholderTransform",n)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations((function(t){for(var n=new Set,i=[],r=0,s=o._placeholderGroups[o._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,o=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,o=this._editor.getModel(),n=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),i=n.edits,r=n.snippets;this._snippets=r;var s=o.pushEditOperations(this._editor.getSelections(),i,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return c.a.fromPositions(e.range.getEndPosition())}))}));this._editor.setSelections(s),this._editor.revealRange(s[0])},e.prototype.merge=function(t,o,n){var i=this;void 0===o&&(o=0),void 0===n&&(n=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,o,n,!0),s=r.edits,a=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),s,(function(e){for(var t=0,o=i._snippets;t0},e}(),w=o(5),k=o(47),O=o(135);o.d(t,"SnippetController2",(function(){return L}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},N=function(e,t){return function(o,n){t(o,n,e)}},L=function(){function e(t,o,n){this._editor=t,this._logService=o,this._snippetListener=[],this._inSnippet=e.InSnippetMode.bindTo(n),this._hasNextTabstop=e.HasNextTabstop.bindTo(n),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(n)}return e.get=function(e){return e.getContribution("snippetController2")},e.prototype.dispose=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._session)},e.prototype.getId=function(){return"snippetController2"},e.prototype.insert=function(e,t,o,n,i){void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0);try{this._doInsert(e,t,o,n,i)}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}},e.prototype._doInsert=function(e,t,o,n,i){var s=this;void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0),this._snippetListener=Object(r.d)(this._snippetListener),n&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,o):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new T(this._editor,e,t,o),this._session.insert()),i&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent((function(e){return e.isFlush&&s.cancel()})),this._editor.onDidChangeModel((function(){return s.cancel()})),this._editor.onDidChangeCursorSelection((function(){return s._updateState()}))]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this._session.choice;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((function(e){return c.a.fromPositions(e.getStartPosition())})));var t=e.options[0];Object(k.e)(this._editor,e.options.map((function(e,o){return{type:"value",label:e.value,insertText:e.value,sortText:Object(s.repeat)("a",o),overwriteAfter:t.value.length}})))}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._snippetListener),Object(r.d)(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new n.f("inSnippetMode",!1),e.HasNextTabstop=new n.f("hasNextTabstop",!1),e.HasPrevTabstop=new n.f("hasPrevTabstop",!1),e=R([N(1,O.a),N(2,n.e)],e)}();Object(i.h)(L);var I=i.c.bindToContribution(L.get);Object(i.g)(new I({id:"jumpToNextSnippetPlaceholder",precondition:n.d.and(L.InSnippetMode,L.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:2}})),Object(i.g)(new I({id:"jumpToPrevSnippetPlaceholder",precondition:n.d.and(L.InSnippetMode,L.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:1026}})),Object(i.g)(new I({id:"leaveSnippet",precondition:L.InSnippetMode,handler:function(e){return e.cancel()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(i.g)(new I({id:"acceptSnippet",precondition:L.InSnippetMode,handler:function(e){return e.finish()}}))},function(e,t,o){"use strict";o(449),o(450);var n,i=o(0),r=o(1),s=o(13),a=o(4),l=o(6),u=o(10),c=o(22),h=o(117),d=o(12),g=o(70),p=o(8),f=o(20),m=o(9),_=o(2),y=o(23),v=o(18),b=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0),new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,v.h.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,v.h.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new f.d(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===y.b.LTR?new y.a(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new y.a(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,o){this._setState(e,t,o)},e.prototype._setState=function(e,t,o){if(t){r=e.model.validateRange(t.selectionStart);var n=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,i=(s=e.model.validatePosition(t.position),t.position.equals(s)?t.leftoverVisibleColumns:0);t=new f.f(r,n,s,i)}else{var r=e.model.validateRange(e.convertViewRangeToModelRange(o.selectionStart)),s=e.model.validatePosition(e.convertViewPositionToModelPosition(o.position.lineNumber,o.position.column));t=new f.f(r,o.selectionStartLeftoverVisibleColumns,s,o.leftoverVisibleColumns)}if(o){u=e.validateViewRange(o.selectionStart,t.selectionStart),c=e.validateViewPosition(o.position,t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}else{var a=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),l=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),u=new _.a(a.lineNumber,a.column,l.lineNumber,l.column),c=e.convertModelPositionToViewPosition(t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=o,this._updateTrackedRange(e)},e}(),E=function(){function e(e){this.context=e,this.primaryCursor=new b(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;eo){var r=t-o;for(i=0;i=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,o=this.secondaryCursors.length;th&&t[S].index--;e.splice(h,1),t.splice(c,1),this._removeSecondaryCursor(h-1),i--}}}}},e}(),C=o(52),S=o(176),T=o(95),w=o(35),k=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),O=function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo},R=function(e){this.type=2,this.selections=e},N=function(){this.type=3},L=function(){this.type=4},I=function(e){this.type=5,this.isFocused=e},D=function(){this.type=6},A=function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t},P=function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t},M=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},x=function(e,t,o,n){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=o,this.scrollType=n},B=function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},F=function(e){this.type=12,this.ranges=e},H=function(){this.type=15},U=function(){this.type=13},V=function(){this.type=14},W=function(){this.type=16},j=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return k(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new G),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),o=0,n=t.length;ot.MAX_CURSOR_COUNT&&(n=n.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var i=new X(this._model,this);this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,o,i)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,o){this._revealRange(t,0,e,o)},t.prototype.revealRange=function(e,t,o,n){this.emitCursorRevealRange(t,o,e,n)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),o=0,n=t.length;o1)return;var a=new _.a(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(a,t,o,n)},t.prototype.emitCursorRevealRange=function(e,t,o,n){try{this._beginEmit().emit(new x(e,t,o,n))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,o){var n=C.b;if(t!==n.CompositionStart)if(t===n.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var i=new X(this._model,this),r=w.a.NotSet;t!==n.Undo&&t!==n.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case n.Type:this._type(e,o.text);break;case n.ReplacePreviousChar:this._replacePreviousChar(o.text,o.replaceCharCnt);break;case n.Paste:r=w.a.Paste,this._paste(o.text,o.pasteOnNewLine,o.multicursorText);break;case n.Cut:this._cut();break;case n.Undo:r=w.a.Undo,this._interpretCommandResult(this._model.undo());break;case n.Redo:r=w.a.Redo,this._interpretCommandResult(this._model.redo());break;case n.ExecuteCommand:this._externalExecuteCommand(o);break;case n.ExecuteCommands:this._externalExecuteCommands(o);break;case n.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(s.e)(e)}this._isHandling=!1,t!==n.Undo&&t!==n.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,r,i)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(T.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(T.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var o=0,n=t.length;o0&&(r[0]._isTracked=!0);var l=e.model.pushEditOperations(e.selectionsBefore,r,(function(o){for(var n=[],i=0;i0?(n[o].sort(s),a[o]=t[o].computeCursorState(e.model,{getInverseEditOperations:function(){return n[o]},getTrackedSelection:function(t){var o=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[o]);return e.trackedRangesDirection[o]===y.b.LTR?new y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new y.a(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):a[o]=e.selectionsBefore[o]};for(i=0;ii.identifier.major?n.identifier.major:i.identifier.major).toString()]=!0;for(var s=0;s0&&o--}}return t},e}(),J=o(11),Z=o(205),Q=o(54),ee=function(){function e(e,t,o,n,i){this.editorId=e,this.model=t,this.configuration=o,this._linesCollection=n,this._coordinatesConverter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,o=this._decorationsCache[t];if(!o){var n=e.range,i=e.options,r=void 0;if(i.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new _.a(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);o=new Q.e(r,i),this._decorationsCache[t]=o}return o},e.prototype.getDecorationsViewportData=function(e){var t=!0;return(t=(t=t&&null!==this._cachedModelDecorationsResolver)&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),o=e.startLineNumber,n=e.endLineNumber,i=[],r=0,s=[],a=o;a<=n;a++)s[a-o]=[];for(var l=0,u=t.length;l=s&&h<=a,g=ce(this.linePositionMapperFactory,o[c],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!d);i[c]=g.getViewLineCount(),this.lines[c]=g}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new te.b(i)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var o=e.map((function(e){return t.model.validateRange(e)})).sort(_.a.compareRangesUsingStarts),n=[],i=o[0].startLineNumber,r=o[0].endLineNumber,s=1,a=o.length;sr+1?(n.push(new _.a(i,1,r,1)),i=l.startLineNumber,r=l.endLineNumber):l.endLineNumber>r&&(r=l.endLineNumber)}return n.push(new _.a(i,1,r,1)),n},e.prototype.setHiddenAreas=function(e){var t=this,o=this._reduceRanges(e),n=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(_.a.compareRangesUsingStarts);if(o.length===n.length){for(var i=!1,r=0;r=l&&g<=u?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),p=!0):(d=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),p=!0)),p){var f=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,f)}}return d||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,o){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==o)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=o,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,o){if(e<=this._validModelVersionId)return null;var n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,i=this.prefixSumComputer.getAccumulatedValue(o-1);return this.lines.splice(t-1,o-t+1),this.prefixSumComputer.removeValues(t-1,o-t+1),new P(n,i)},e.prototype.onModelLinesInserted=function(e,t,o,n){if(e<=this._validModelVersionId)return null;for(var i=this.getHiddenAreas(),r=!1,s=new m.a(t,1),a=0;aa?(p=(g=(c=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(i-a)-1,l=!0):it?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),o=this._toValidViewLineNumber(o);var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),s=this.model.getActiveIndentGuide(n.lineNumber,i.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),i=[],r=[],s=[],a=o.lineNumber-1,l=n.lineNumber-1,u=null,c=a;c<=l;c++){var h=this.lines[c];if(h.isVisible()){var d=h.getViewLineNumberOfModelPosition(0,c===a?o.column:1),g=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),p=0;(C=g-d+1)>1&&1===h.getViewLineMinColumn(this.model,c+1,g)&&(p=0===d?1:2),r.push(C),s.push(p),null===u&&(u=new m.a(c+1,0))}else null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,c)),u=null)}null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,n.lineNumber)),u=null);for(var f=t-e+1,_=new Array(f),y=0,v=0,b=i.length;vt&&(g=!0,d=t-i+1);var p=h+d;if(c.getViewLinesData(this.model,l+1,h,p,i-e,o,a),i+=d,g)break}}return a},e.prototype.validateViewPosition=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,r=n.remainder,s=this.lines[i],a=s.getViewLineMinColumn(this.model,i+1,r),l=s.getViewLineMaxColumn(this.model,i+1,r);tl&&(t=l);var u=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new m.a(i+1,u)).equals(o)?new m.a(e,t):this.convertModelPositionToViewPosition(o.lineNumber,o.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var o=this.prefixSumComputer.getIndexOf(e-1),n=o.index,i=o.remainder,r=this.lines[n].getModelColumnOfViewPosition(i,t);return this.model.validatePosition(new m.a(n+1,r))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var o=this.model.validatePosition(new m.a(e,t)),n=o.lineNumber,i=o.column,r=n-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new m.a(1,1);var a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));return s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[n-1].getViewPositionOfModelPosition(a,i)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var o=e-1;if(this.lines[o].isVisible()){var n=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(n,t)}for(;o>0&&!this.lines[o].isVisible();)o--;if(0===o&&!this.lines[o].isVisible())return 1;var i=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(o+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,o){for(var n=this.model.getOverviewRulerDecorations(e,t),i=new ge,r=0,s=n.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o)-n;return o>0&&(i=this.wrappedIndent.length+i),i},e.prototype.getViewLineMinColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return o>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,o).length+1},e.prototype.getViewLineData=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:i+1});o>0&&(r=this.wrappedIndent+r);var s=o>0?this.wrappedIndentLength+1:1,a=r.length+1,l=o+10&&(u=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Q.c(r,l,s,a,c.sliceAndInflate(n,i,u))},e.prototype.getViewLinesData=function(e,t,o,n,i,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=o;a0&&(o0&&(i+=this.wrappedIndentLength),new m.a(e+n,i)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();function ce(e,t,o,n,i,r,s){var a=e.createLineMapping(t,o,n,i,r);return null===a?s?ae.INSTANCE:le.INSTANCE:new ue(a,s)}var he=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),de=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new he(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,o){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,o){return new P(t,o)},e.prototype.onModelLinesInserted=function(e,t,o,n){return new M(t,o)},e.prototype.onModelLineChanged=function(e,t,o){return[!1,new A(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,o){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var o=t-e+1,n=new Array(o),i=0;i=t)return void(o>s&&(i[i.length-1]=o));i.push(n,t,o)}else this.result[e]=[n,t,o]},e}();function pe(e,t){if(!e._resolvedColor){var o=t.type,n="dark"===o?e.darkColor:"light"===o?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var o=e?t.getColor(e.id):null;o||(o=ne.a.transparent);return o.toString()}(n,t)}return e._resolvedColor}var fe=function(){function e(t,o,n,i){this.r=e._clamp(t),this.g=e._clamp(o),this.b=e._clamp(n),this.a=e._clamp(i)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}(),me=function(){function e(){var e=this;this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),J.y.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=J.y.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),_e=function(){function e(t,o){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==o.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=o,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(o,50/60)}return e.soften=function(e,t){for(var o=new Uint8ClampedArray(e.length),n=0,i=e.length;nt.width||n+4>t.height)console.warn("bad render request outside image data");else{var l=a?this.x2charDataLight:this.x2charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=4*u*2,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+1]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+2]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+3]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+4]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+5]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+6]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+7]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b}},e.prototype.x1RenderChar=function(t,o,n,i,r,s,a){if(o+1>t.width||n+2>t.height)console.warn("bad render request outside image data");else{var l=a?this.x1charDataLight:this.x1charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=2*u*1,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b,v+=c;b=l[y+1]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b}},e.prototype.x2BlockRenderChar=function(e,t,o,n,i,r){if(t+2>e.width||o+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d}},e.prototype.x1BlockRenderChar=function(e,t,o,n,i,r){if(t+1>e.width||o+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d}},e}(),ye=o(116),ve=o(92),be=o(27),Ee=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ce=function(e){function t(t,o,n){for(var i=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(ye.a),Se=function(){function e(e,t,o){this.classifier=new Ce(e,t,o)}return e.nextVisibleColumn=function(e,t,o,n){return e=+e,t=+t,n=+n,o?e+(t-e%t):e+n},e.prototype.createLineMapping=function(t,o,n,i,r){if(-1===n)return null;o=+o,n=+n,i=+i;var s=0,a="",l=-1;if((r=+r)!==be.j.None&&-1!==(l=p.firstNonWhitespaceIndex(t))){a=t.substring(0,l);for(var u=0;un&&(a="",s=0)}var h=this.classifier,d=0,g=[],f=0,m=0,_=-1,y=0,v=-1,b=0,E=t.length;for(u=0;u0){var w=t.charCodeAt(u-1);1!==h.get(w)&&(_=u,y=s)}var k=1;if(p.isFullWidthCharacter(C)&&(k=i),(m=e.nextVisibleColumn(m,o,S,k))>n&&0!==u){var O=void 0,R=void 0;-1!==_&&y<=n?(O=_,R=y):-1!==v&&b<=n?(O=v,R=b):(O=u,R=s),g[f++]=O-d,d=O,m=e.nextVisibleColumn(R,o,S,k),_=-1,y=0,v=-1,b=0}if(-1!==_&&(y=e.nextVisibleColumn(y,o,S,k)),-1!==v&&(b=e.nextVisibleColumn(b,o,S,k)),2===T&&(r===be.j.None||u>=l)&&(_=u+1,y=s),4===T&&u>>1;t===e[s]?n=t&&(this._whitespaceId2Index[u]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,o){e|=0,t|=0,o|=0;var n=!1;return n=this.changeWhitespaceHeight(e,o)||n,n=this.changeWhitespaceAfterLineNumber(e,t)||n},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var o=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(o)){var n=this._whitespaceId2Index[o];if(this._heights[n]!==t)return this._heights[n]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,o){o|=0;var n=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._afterLineNumbers[i]!==o){var r=this._ordinals[i],s=this._heights[i],a=this._minWidths[i];this.removeWhitespace(t);var l=e.findInsertionIndex(this._afterLineNumbers,o,this._ordinals,r);return this._insertWhitespaceAtIndex(t,l,o,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var o=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(o),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),o=0,n=t.length;o=e&&(this._whitespaceId2Index[i]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;ot&&(this._afterLineNumbers[o]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;o=t.length||t[i+1]>=e)return i;o=i+1|0}else n=i-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,o=this._lineHeight,n=1,i=t;n=s+o)n=r+1;else{if(e>=s)return r;i=r}}return n>t?t:n},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var o,n,i=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this._whitespaces.getCount();-1===l?(l=u,n=a+1,o=0):(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));var c=s,h=c,d=0;s>=5e5&&(d=5e5*Math.floor(s/5e5),h-=d=Math.floor(d/i)*i);for(var g=[],p=e+(t-e)/2,f=-1,m=r;m<=a;m++){if(-1===f){(c<=p&&pp)&&(f=m)}for(c+=i,g[m-r]=h,h+=i;n===m;)h+=o,c+=o,++l>=u?n=a+1:(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));if(c>=t){a=m;break}}-1===f&&(f=a);var _=0|this.getVerticalOffsetForLineNumber(a),y=r,v=a;return yt&&v--,{bigNumbersDelta:d,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:g,centeredLineNumber:f,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:v}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this._whitespaces.getAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,o,n=0,i=this._whitespaces.getCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this._whitespaces.getHeightForWhitespaceIndex(i))return-1;for(;n=(o=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))n=t+1;else{if(e>=o)return t;i=t}return n},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var o=this.getVerticalOffsetForWhitespaceIndex(t);if(o>e)return null;var n=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:o,height:n}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var o=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this._whitespaces.getCount()-1;if(o<0)return[];for(var i=[],r=o;r<=n;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;i.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return i},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}(),Re=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ne=function(e){function t(t,o,n){var i=e.call(this)||this;return i._configuration=t,i._linesLayout=new Oe(o,i._configuration.editor.lineHeight),i.scrollable=i._register(new we.a(0,n)),i._configureSmoothScrollDuration(),i.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),i.onDidScroll=i.scrollable.onScroll,i._updateHeight(),i}return Re(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0)},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e){return this._configuration.editor.viewInfo.scrollbar.horizontal===we.b.Hidden?0:e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var o=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+o,t,n)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,o=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(o),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,o,n){return this._linesLayout.insertWhitespace(e,t,o,n)},t.prototype.changeWhitespace=function(e,t,o){return this._linesLayout.changeWhitespace(e,t,o)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var o=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:o.scrollLeft+e,scrollTop:o.scrollTop+t})},t}(l.a),Le=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ie=!0,De=function(e){function t(t,o,n,i){var r=e.call(this)||this;if(r.editorId=t,r.configuration=o,r.model=n,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineTop=0,Ie&&r.model.isTooLargeForTokenization())r.lines=new de(r.model);else{var s=r.configuration.editor,a=new Se(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new se(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new Ne(r.configuration,r.getLineCount(),i)),r._register(r.viewLayout.onDidScroll((function(e){try{r._beginEmit().emit(new B(e))}finally{r._endEmit()}}))),r.decorations=new ee(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange((function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}}))),r._register(me.getInstance().onDidChange((function(){try{r._beginEmit().emit(new U)}finally{r._endEmit()}}))),r}return Le(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,v.h.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var o=null;if(-1!==this.viewportStartLine){var n=new m.a(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));o=this.coordinatesConverter.convertViewPositionToModelPosition(n)}var i=!1,r=this.configuration.editor;if(this.lines.setWrappingSettings(r.wrappingInfo.wrappingIndent,r.wrappingInfo.wrappingColumn,r.fontInfo.typicalFullwidthCharacterWidth/r.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new L),e.emit(new D),e.emit(new N),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new N)),e.emit(new O(t)),this.viewLayout.onConfigurationChanged(t),i&&o){var s=this.coordinatesConverter.convertModelPositionToViewPosition(o),a=this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber);this.viewLayout.deltaScrollNow(0,a-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var o=e._beginEmit(),n=!1,i=!1,r=t.changes,s=t.versionId,a=0,l=r.length;a=2&&e.viewportStartLineTrackedRange){var f=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(f){var m=e.coordinatesConverter.convertModelPositionToViewPosition(f.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,_-e.viewportStartLineTop)}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var o=[],n=0,i=t.ranges.length;na||(r0&&s[l-1]===s[l]||(a+=this.model.getLineContent(s[l])+i);return a}var u=[];for(l=0;l'+this._getHTMLToCopy(o,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var o=e.startLineNumber,n=e.startColumn,i=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",l=o;l<=i;l++){var u=this.model.getLineTokens(l),c=u.getLineContent(),h=l===o?n-1:0,d=l===i?r-1:c.length;a+=""===c?"
":Object(Z.a)(c,u.inflate(),t,h,d,s)}return a},t.prototype._getColorMap=function(){for(var e=J.y.getColorMap(),t=[null],o=1,n=e.length;o'+o+"":String(n)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===o?String(o):o%10==0?String(o):"":String(o)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var o=We.c?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r='
',s=[],a=n;a<=i;a++){var l=a-n,u=this._getLineRenderLineNumber(a);s[l]=u?r+u+"
":""}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t.CLASS_NAME="line-numbers",t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.q);o&&t.addRule(".monaco-editor .line-numbers { color: "+o+"; }");var n=e.getColor(Je.b);n&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+n+"; }")}));var ot=o(102),nt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),it=function(){function e(e,t,o){this.top=e,this.left=t,this.width=o}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),rt=je.h||je.j,st=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),at=function(e){function t(t,o,n){var i=e.call(this,t)||this;i._primaryCursorVisibleRange=null,i._viewController=o,i._viewHelper=n;var r=i._context.configuration.editor;i._accessibilitySupport=r.accessibilitySupport,i._contentLeft=r.layoutInfo.contentLeft,i._contentWidth=r.layoutInfo.contentWidth,i._contentHeight=r.layoutInfo.contentHeight,i._scrollLeft=0,i._scrollTop=0,i._fontInfo=r.fontInfo,i._lineHeight=r.lineHeight,i._emptySelectionClipboard=r.emptySelectionClipboard,i._visibleTextArea=null,i._selections=[new y.a(1,1,1,1)],i.textArea=Object(He.b)(document.createElement("textarea")),Xe.write(i.textArea,6),i.textArea.setClassName("inputarea"),i.textArea.setAttribute("wrap","off"),i.textArea.setAttribute("autocorrect","off"),i.textArea.setAttribute("autocapitalize","off"),i.textArea.setAttribute("autocomplete","off"),i.textArea.setAttribute("spellcheck","false"),i.textArea.setAttribute("aria-label",r.viewInfo.ariaLabel),i.textArea.setAttribute("role","textbox"),i.textArea.setAttribute("aria-multiline","true"),i.textArea.setAttribute("aria-haspopup","false"),i.textArea.setAttribute("aria-autocomplete","both"),i.textAreaCover=Object(He.b)(document.createElement("div")),i.textAreaCover.setPosition("absolute");var s={getLineCount:function(){return i._context.model.getLineCount()},getLineMaxColumn:function(e){return i._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return i._context.model.getValueInRange(e,t)}},a={getPlainTextToCopy:function(){var e=i._context.model.getPlainTextToCopy(i._selections,i._emptySelectionClipboard,We.g),t=i._context.model.getEOL(),o=i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),n=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e,s=null;(o||n)&&(s={lastCopiedValue:je.j?r.replace(/\r\n/g,"\n"):r,isFromEmptySelection:i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),multicursorText:n});return st.INSTANCE.set(s),r},getHTMLToCopy:function(){return i._context.model.getHTMLToCopy(i._selections,i._emptySelectionClipboard)},getScreenReaderContent:function(e){if(je.l)return ze.b.EMPTY;if(1===i._accessibilitySupport){if(We.d){var t=i._selections[0];if(t.isEmpty()){var o=t.getStartPosition(),n=i._getWordBeforePosition(o);if(0===n.length&&(n=i._getCharacterBeforePosition(o)),n.length>0)return new ze.b(n,n.length,n.length,o,o)}}return ze.b.EMPTY}return ze.a.fromEditorSelection(e,s,i._selections[0],0===i._accessibilitySupport)},deduceModelPosition:function(e,t,o){return i._context.model.deduceModelPositionRelativeToViewPosition(e,t,o)}};return i._textAreaInput=i._register(new Ge.b(a,i.textArea)),i._register(i._textAreaInput.onKeyDown((function(e){i._viewController.emitKeyDown(e)}))),i._register(i._textAreaInput.onKeyUp((function(e){i._viewController.emitKeyUp(e)}))),i._register(i._textAreaInput.onPaste((function(e){var t=st.INSTANCE.get(e.text),o=!1,n=null;t&&(o=i._emptySelectionClipboard&&t.isFromEmptySelection,n=t.multicursorText),i._viewController.paste("keyboard",e.text,o,n)}))),i._register(i._textAreaInput.onCut((function(){i._viewController.cut("keyboard")}))),i._register(i._textAreaInput.onType((function(e){e.replaceCharCnt?i._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):i._viewController.type("keyboard",e.text)}))),i._register(i._textAreaInput.onSelectionChangeRequest((function(e){i._viewController.setSelection("keyboard",e)}))),i._register(i._textAreaInput.onCompositionStart((function(){var e=i._selections[0].startLineNumber,t=i._selections[0].startColumn;i._context.privateViewEventBus.emit(new x(new _.a(e,t,e,t),0,!0,1));var o=i._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);o&&(i._visibleTextArea=new it(i._context.viewLayout.getVerticalOffsetForLineNumber(e),o.left,rt?0:1),i._render()),i.textArea.setClassName("inputarea ime-input"),i._viewController.compositionStart("keyboard")}))),i._register(i._textAreaInput.onCompositionUpdate((function(e){je.h?i._visibleTextArea=i._visibleTextArea.setWidth(0):i._visibleTextArea=i._visibleTextArea.setWidth(function(e,t){var o=document.createElement("canvas").getContext("2d");o.font=(n=t,i="normal",r=n.fontWeight,s=n.fontSize,a=n.lineHeight,l=n.fontFamily,i+" normal "+r+" "+s+"px / "+a+"px "+l);var n,i,r,s,a,l;var u=o.measureText(e);return je.j?u.width+2:u.width}(e.data,i._fontInfo)),i._render()}))),i._register(i._textAreaInput.onCompositionEnd((function(){i._visibleTextArea=null,i._render(),i.textArea.setClassName("inputarea"),i._viewController.compositionEnd("keyboard")}))),i._register(i._textAreaInput.onFocus((function(){i._context.privateViewEventBus.emit(new I(!0))}))),i._register(i._textAreaInput.onBlur((function(){i._context.privateViewEventBus.emit(new I(!1))}))),i}return nt(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),o=Object(ot.a)(this._context.configuration.editor.wordSeparators),n=e.column,i=0;n>1;){var r=t.charCodeAt(n-2);if(0!==o.get(r)||i>50)return t.substring(n-1,e.column-1);i++,n--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!p.isHighSurrogate(t.charCodeAt(0)))return t}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new m.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,rt?0:1,rt?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,o,n,i){var r=this.textArea,s=this.textAreaCover;i?g.a.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(o),r.setHeight(n),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(g.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),rt)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+$e.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+tt.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ye);var lt=o(66),ut=o(16),ct=o(41),ht=o(73),dt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),gt=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new pt(this.x-r.e.scrollX,this.y-r.e.scrollY)},e}(),pt=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new gt(this.clientX+r.e.scrollX,this.clientY+r.e.scrollY)},e}(),ft=function(e,t,o,n){this.x=e,this.y=t,this.width=o,this.height=n};function mt(e){var t=r.u(e);return new ft(t.left,t.top,t.width,t.height)}var _t=function(e){function t(t,o){var n=e.call(this,t)||this;return n.pos=new gt(n.posx,n.posy),n.editorPos=mt(o),n}return dt(t,e),t}(ct.b),yt=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new _t(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var o=this;return r.g(e,"contextmenu",(function(e){t(o._create(e))}))},e.prototype.onMouseUp=function(e,t){var o=this;return r.g(e,"mouseup",(function(e){t(o._create(e))}))},e.prototype.onMouseDown=function(e,t){var o=this;return r.g(e,"mousedown",(function(e){t(o._create(e))}))},e.prototype.onMouseLeave=function(e,t){var o=this;return r.h(e,(function(e){t(o._create(e))}))},e.prototype.onMouseMoveThrottled=function(e,t,o,n){var i=this;return r.i(e,"mousemove",t,(function(e,t){return o(e,i._create(t))}),n)},e}(),vt=function(e){function t(t){var o=e.call(this)||this;return o._editorViewDomNode=t,o._globalMouseMoveMonitor=o._register(new ht.a),o._keydownListener=null,o}return dt(t,e),t.prototype.startMonitoring=function(e,t,o){var n=this;this._keydownListener=r.j(document,"keydown",(function(e){e.toKeybinding().isModifierKey()||n._globalMouseMoveMonitor.stopMonitoring(!0)}),!0);this._globalMouseMoveMonitor.startMonitoring((function(t,o){return e(t,new _t(o,n._editorViewDomNode))}),t,(function(){n._keydownListener.dispose(),o()}))},t}(l.a),bt=o(123),Et=o(68),Ct=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),St=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i._viewLines=n,i}return Ct(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new _.a(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var o=this._viewLayout.getCurrentViewport();this.scrollTop=o.top,this.scrollLeft=o.left,this.viewportWidth=o.width,this.viewportHeight=o.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}()),Tt=function(e,t){this.lineNumber=e,this.ranges=t},wt=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}(),kt=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),Ot=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,o,n,i){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(o,n),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,i)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new wt(e[0].left,e[0].width)];e.sort(kt.compare);for(var t=[],o=0,n=e[0].left,i=e[0].width,r=1,s=e.length;r=l?i=Math.max(i,l+u-n):(t[o++]=new wt(n,i),n=l,i=u)}return t[o++]=new wt(n,i),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var o=[],n=0,i=e.length;na)return null;(t=Math.min(a,Math.max(0,t)))!==(n=Math.min(a,Math.max(0,n)))&&n>0&&0===i&&(n--,i=Number.MAX_VALUE);var l=e.children[t].firstChild,u=e.children[n].firstChild;if(l&&u||(!l&&0===o&&t>0&&(l=e.children[t-1].firstChild,o=1073741824),!u&&0===i&&n>0&&(u=e.children[n-1].firstChild,i=1073741824)),!l||!u)return null;o=Math.min(l.textContent.length,Math.max(0,o)),i=Math.min(u.textContent.length,Math.max(0,i));var c=this._readClientRects(l,o,u,i,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),Rt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Nt=!!We.e||!(We.c||je.j||je.m),Lt=je.h,It=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),Dt=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),At=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(He.b)(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!Lt&&this._options.themeType!==Fe.b)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,o,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=n.getViewLineRenderingData(t),s=this._options,a=bt.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(Lt||s.themeType===Fe.b)for(var l=n.selections,u=0,c=l.length;ut)){var d=h.startLineNumber===t?h.startColumn:r.minColumn,g=h.endLineNumber===t?h.endColumn:r.maxColumn;d');var f=Object(Et.c)(p,i);i.appendASCIIString("");var m=null;return Nt&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===f.containsForeignElements&&r.content.length<300&&p.lineTokens.getCount()<100&&(m=new Pt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping)),m||(m=Bt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping,f.containsRTL,f.containsForeignElements)),this._renderedViewLine=m,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,o){e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var n=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==n&&e>n&&t>n?null:(-1!==n&&e>n&&(e=n),-1!==n&&t>n&&(t=n),this._renderedViewLine.getVisibleRangesForRange(e,t,o))},e.prototype.getColumnOfNodeOffset=function(e,t,o){return this._renderedViewLine.getColumnOfNodeOffset(e,t,o)},e.CLASS_NAME="view-line",e}(),Pt=function(){function e(e,t,o){this.domNode=e,this.input=t,this._characterMapping=o,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,o){var n=this._getCharPosition(e),i=this._getCharPosition(t);return[new wt(n,i-n)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),Mt=function(){function e(e,t,o,n,i){if(this.domNode=e,this.input=t,this._characterMapping=o,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=i,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,o){if(null!==this._pixelOffsetCache){var n=this._readPixelOffset(e,o);if(-1===n)return null;var i=this._readPixelOffset(t,o);return-1===i?null:[new wt(n,i-n)]}return this._readVisibleRangesForRange(e,t,o)},e.prototype._readVisibleRangesForRange=function(e,t,o){if(e===t){var n=this._readPixelOffset(e,o);return-1===n?null:[new wt(n,0)]}return this._readRawVisibleRangesForRange(e,t,o)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var o=this._pixelOffsetCache[e];if(-1!==o)return o;var n=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=n,n}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var o=Ot.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return o&&0!==o.length?o[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=Ot.readHorizontalRanges(this._getReadingTarget(),i,r,i,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,o){if(1===e&&t===this._characterMapping.length)return[new wt(0,this.getWidth())];var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=this._characterMapping.charOffsetToPartData(t-1),a=Et.a.getPartIndex(s),l=Et.a.getCharIndex(s);return Ot.readHorizontalRanges(this._getReadingTarget(),i,r,a,l,o.clientRectDeltaLeft,o.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rt(t,e),t.prototype._readVisibleRangesForRange=function(t,o,n){var i=e.prototype._readVisibleRangesForRange.call(this,t,o,n);if(!i||0===i.length||t===o||1===t&&o===this._characterMapping.length)return i;var r=this._readPixelOffset(o-1,n),s=this._readPixelOffset(o,n);if(-1!==r&&-1!==s){var a=r<=s,l=i[i.length-1];a&&l.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),jt=function(){function e(e,t,o){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=o,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var o=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(o){var n=o.verticalOffset+o.height/2,i=e.model.getLineCount(),r=null,s=void 0,a=null;return o.afterLineNumber!==i&&(a=new m.a(o.afterLineNumber+1,1)),o.afterLineNumber>0&&(r=new m.a(o.afterLineNumber,e.model.getLineMaxColumn(o.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Yt._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),zt={isAfterLines:!0};function Kt(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var Yt=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,o=Xe.collect(t,this._viewHelper.viewDomNode);return!(!Wt.isChildOfContentWidgets(o)&&!Wt.isChildOfOverflowingContentWidgets(o))||!!Wt.isChildOfOverlayWidgets(o)},e.prototype.createMouseTarget=function(t,o,n,i){var r=new jt(this._context,this._viewHelper,t),s=new Gt(r,o,n,i);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(ut.b.UNKNOWN)}},e._createMouseTarget=function(t,o,n){if(null===o.target){if(n)return o.fulfill(ut.b.UNKNOWN);var i=e._doHitTest(t,o);return i.position?e.createMouseTargetFromHitTestPosition(t,o,i.position.lineNumber,i.position.column):this._createMouseTarget(t,o.withTarget(i.hitTarget),!0)}var r=null;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r||e._hitTestContentWidget(t,o))||e._hitTestOverlayWidget(t,o))||e._hitTestMinimap(t,o))||e._hitTestScrollbarSlider(t,o))||e._hitTestViewZone(t,o))||e._hitTestMargin(t,o))||e._hitTestViewCursor(t,o))||e._hitTestTextArea(t,o))||e._hitTestViewLines(t,o,n))||e._hitTestScrollbar(t,o))||o.fulfill(ut.b.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(Wt.isChildOfContentWidgets(t.targetPath)||Wt.isChildOfOverflowingContentWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.CONTENT_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(Wt.isChildOfOverlayWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.OVERLAY_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var o=0,n=(r=e.lastViewCursorsRenderData).length;oi.contentLeft+i.width)){var l=e.getVerticalOffsetForLineNumber(i.position.lineNumber);if(l<=a&&a<=l+i.height)return t.fulfill(ut.b.CONTENT_TEXT,i.position)}}}return null},e._hitTestViewZone=function(e,t){var o=e.getZoneAtCoord(t.mouseVerticalOffset);if(o){var n=t.isInContentArea?ut.b.CONTENT_VIEW_ZONE:ut.b.GUTTER_VIEW_ZONE;return t.fulfill(n,o.position,null,o)}return null},e._hitTestTextArea=function(e,t){return Wt.isTextArea(t.targetPath)?t.fulfill(ut.b.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var o=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=o.range.getStartPosition(),i=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:o.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:i};return(i-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(ut.b.GUTTER_GLYPH_MARGIN,n,o.range,r):(i-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(ut.b.GUTTER_LINE_NUMBERS,n,o.range,r):(i-=e.layoutInfo.lineNumbersWidth,t.fulfill(ut.b.GUTTER_LINE_DECORATIONS,n,o.range,r))}return null},e._hitTestViewLines=function(t,o,n){if(!Wt.isChildOfViewLines(o.targetPath))return null;if(t.isAfterLines(o.mouseVerticalOffset)){var i=t.model.getLineCount(),r=t.model.getLineMaxColumn(i);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(i,r),void 0,zt)}if(n){if(Wt.isStrictChildOfViewLines(o.targetPath)){var s=t.getLineNumberAtVerticalOffset(o.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),l=Kt(o.mouseContentHorizontalOffset-a);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(s,1),void 0,l)}}return o.fulfill(ut.b.UNKNOWN)}var u=e._doHitTest(t,o);return u.position?e.createMouseTargetFromHitTestPosition(t,o,u.position.lineNumber,u.position.column):this._createMouseTarget(t,o.withTarget(u.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(Wt.isChildOfMinimap(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e._hitTestScrollbarSlider=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var o=t.target.className;if(o&&/\b(slider|scrollbar)\b/.test(o)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(ut.b.SCROLLBAR,new m.a(n,i))}}return null},e._hitTestScrollbar=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e.prototype.getMouseColumn=function(t,o){var n=this._context.configuration.editor.layoutInfo,i=this._context.viewLayout.getCurrentScrollLeft()+o.x-t.x-n.contentLeft;return e._getMouseColumn(i,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,o,n){var i=new m.a(o,n),r=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>r){if(je.g&&1===i.column){var s=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,new m.a(o,e.model.getLineMaxColumn(o)),void 0,s)}var a=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,i,void 0,a)}var l=e.visibleRangeForPosition2(o,n);if(!l)return t.fulfill(ut.b.UNKNOWN,i);var u=l.left;if(t.mouseContentHorizontalOffset===u)return t.fulfill(ut.b.CONTENT_TEXT,i);var c=[];if(c.push({offset:l.left,column:n}),n>1){var h=e.visibleRangeForPosition2(o,n-1);h&&c.push({offset:h.left,column:n-1})}if(n=t.editorPos.y+e.layoutInfo.height&&(i=t.editorPos.y+e.layoutInfo.height-1);var r=new gt(t.pos.x,i),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var o=document.caretRangeFromPoint(t.clientX,t.clientY);if(!o||!o.startContainer)return{position:null,hitTarget:null};var n,i=o.startContainer;if(i.nodeType===i.TEXT_NODE){var r=(a=(s=i.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,o.startOffset),hitTarget:null};n=i.parentNode}else if(i.nodeType===i.ELEMENT_NODE){var s,a;if(((a=(s=i.parentNode)?s.parentNode:null)&&a.nodeType===a.ELEMENT_NODE?a.className:null)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(i,i.textContent.length),hitTarget:null};n=i}return{position:null,hitTarget:n}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var o=document.caretPositionFromPoint(t.clientX,t.clientY);if(o.offsetNode.nodeType===o.offsetNode.TEXT_NODE){var n=o.offsetNode.parentNode,i=n?n.parentNode:null,r=i?i.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===At.CLASS_NAME?{position:e.getPositionFromDOMInfo(o.offsetNode.parentNode,o.offset),hitTarget:null}:{position:null,hitTarget:o.offsetNode.parentNode}}return{position:null,hitTarget:o.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var o=null,n=null,i=document.body.createTextRange();try{i.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}i.collapse(!0);var r=i?i.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===At.CLASS_NAME){var l=i.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",i),o=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else n=r;return i.moveToElementText(e.viewDomNode),{position:o,hitTarget:n}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}(),Xt=o(17),qt=o(96),$t=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function Jt(e){return function(t,o){var n=!1;return e&&(n=e.mouseTargetIsWidget(o)),n||o.preventDefault(),o}}var Zt=function(e){function t(o,n,i){var s=e.call(this)||this;s._isFocused=!1,s._context=o,s.viewController=n,s.viewHelper=i,s.mouseTargetFactory=new Yt(s._context,i),s._mouseDownOperation=s._register(new Qt(s._context,s.viewController,s.viewHelper,(function(e,t){return s._createMouseTarget(e,t)}),(function(e){return s._getMouseColumn(e)}))),s._asyncFocus=s._register(new Xt.c((function(){return s.viewHelper.focusTextArea()}),0)),s.lastMouseLeaveTime=-1;var a=new yt(s.viewHelper.viewDomNode);s._register(a.onContextMenu(s.viewHelper.viewDomNode,(function(e){return s._onContextMenu(e,!0)}))),s._register(a.onMouseMoveThrottled(s.viewHelper.viewDomNode,(function(e){return s._onMouseMove(e)}),Jt(s.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),s._register(a.onMouseUp(s.viewHelper.viewDomNode,(function(e){return s._onMouseUp(e)}))),s._register(a.onMouseLeave(s.viewHelper.viewDomNode,(function(e){return s._onMouseLeave(e)}))),s._register(a.onMouseDown(s.viewHelper.viewDomNode,(function(e){return s._onMouseDown(e)})));var l=function(e){if(s._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new ct.c(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var o=qt.a.getZoomLevel(),n=t.deltaY>0?1:-1;qt.a.setZoomLevel(o+n),t.preventDefault(),t.stopPropagation()}}};return s._register(r.g(s.viewHelper.viewDomNode,"mousewheel",l,!0)),s._register(r.g(s.viewHelper.viewDomNode,"DOMMouseScroll",l,!0)),s._context.addEventHandler(s),s}return $t(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var o=new pt(e,t).toPageCoordinates(),n=mt(this.viewHelper.viewDomNode);if(o.yn.y+n.height||o.xn.x+n.width)return null;var i=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(i,n,o,null)},t.prototype._createMouseTarget=function(e,t){var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||(e.timestampt.y+t.height){var a,l;r=n.getCurrentScrollTop()+(e.posy-t.y);if(a=jt.getZoneAtCoord(this._context,r))if(l=this._helpPositionJumpOverViewZone(a))return new Vt(null,ut.b.OUTSIDE_EDITOR,i,l);var u=n.getLineNumberAtVerticalOffset(r);return new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(u,o.getLineMaxColumn(u)))}var c=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(c,o.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var o=this._getPositionOutsideEditor(e);if(o)return o;var n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===ut.b.CONTENT_VIEW_ZONE||n.type===ut.b.GUTTER_VIEW_ZONE){var i=this._helpPositionJumpOverViewZone(n.detail);if(i)return new Vt(n.element,n.type,n.mouseColumn,i,null,n.detail)}return n},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new m.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),o=e.positionBefore,n=e.positionAfter;return o&&n?o.isBefore(t)?o:n:null},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(l.a),eo=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,o){var n=(new Date).getTime();n-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=n,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(o)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=o,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),to=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function oo(e,t){var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o}var no=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.msTouchAction="none",i.viewHelper.linesContentDomNode.style.msContentZooming="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(o){var n=o.pointerType;n!==(o.MSPOINTER_TYPE_MOUSE||"mouse")?n===(o.MSPOINTER_TYPE_TOUCH||"touch")?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Zt),io=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.touchAction="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(o){var n=o.pointerType;"mouse"!==n?"touch"===n?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Zt),ro=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return lt.b.addTarget(i.viewHelper.linesContentDomNode),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Tap,(function(e){return i.onTap(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Change,(function(e){return i.onChange(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Contextmenu,(function(e){return i._onContextMenu(new _t(e,i.viewHelper.viewDomNode),!1)}))),i}return to(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new _t(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(Zt),so=function(){function e(e,t,o){window.navigator.msPointerEnabled?this.handler=new no(e,t,o):window.TouchEvent?this.handler=new ro(e,t,o):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new io(e,t,o):this.handler=new Zt(e,t,o)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}(),ao=o(72),lo=function(){function e(e,t,o,n,i){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=o,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,o,n){this.commandDelegate.paste(e,t,o,n)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,o){this.commandDelegate.replacePreviousChar(e,t,o)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this._execCoreEditorCommandFunc(ao.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(ao.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(ao.CoreNavigationCommands.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}(),uo=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,o=this._eventHandlers.length;t=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var o=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;for(var r=0,s=0,a=o;a<=n;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=o&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),i=!0);return i},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var o=t-e+1,n=this.getStartLineNumber(),i=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=o,null;if(e>i)return null;if(o+e>i)return this._lines.splice(e-this._rendLineNumberStart,i-e+1);for(var r=[],s=0;so))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(o,s.toLineNumber),u=a;u<=l;u++){var c=u-this._rendLineNumberStart;this._lines[c].onTokensChanged(),n=!0}}return n},e}(),go=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ho((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object(He.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var o=0,n=t.length;ot)(l=t)<=(s=Math.min(o,i.rendLineNumberStart-1))&&(this._insertLinesBefore(i,l,s,n,t),i.linesLength+=s-l+1);else if(i.rendLineNumberStart0&&(this._removeLinesBefore(i,a),i.linesLength-=a)}if(i.rendLineNumberStart=t,i.rendLineNumberStart+i.linesLength-1o){var s,a,l=Math.max(0,o-i.rendLineNumberStart+1);(a=(s=i.linesLength-1)-l+1)>0&&(this._removeLinesAfter(i,a),i.linesLength-=a)}return this._finishRendering(i,!1,n),i},e.prototype._renderUntouchedLines=function(e,t,o,n,i){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=o;a++){var l=r+a;s[a].layoutLine(l,n[l-i])}},e.prototype._insertLinesBefore=function(e,t,o,n,i){for(var r=[],s=0,a=t;a<=o;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var o=0;o=0;s--){var a=e.lines[s];n[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,o){var n=document.createElement("div");n.innerHTML=t;for(var i=0;i'),n.appendASCIIString(i),n.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),yo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o.domNode.setHeight(0),o}return fo(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(mo),vo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o.domNode.setClassName("margin-view-overlays"),o.domNode.setWidth(1),g.a.applyFontInfo(o.domNode,o._context.configuration.editor.fontInfo),o}return fo(t,e),t.prototype.onConfigurationChanged=function(t){var o=!1;return t.fontInfo&&(g.a.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),o=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,o=!0),e.prototype.onConfigurationChanged.call(this,t)||o},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var o=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(o),this.domNode.setWidth(this._contentLeft)},t}(mo),bo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Eo=function(e,t){this.top=e,this.left=t},Co=function(e){function t(t,o){var n=e.call(this,t)||this;return n._viewDomNode=o,n._widgets={},n.domNode=Object(He.b)(document.createElement("div")),Xe.write(n.domNode,1),n.domNode.setClassName("contentWidgets"),n.domNode.setPosition("absolute"),n.domNode.setTop(0),n.overflowingContentWidgetsDomNode=Object(He.b)(document.createElement("div")),Xe.write(n.overflowingContentWidgetsDomNode,2),n.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),n}return bo(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),o=0,n=t.length;o=o,u=s,c=n.viewportHeight-s>=o,h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),hthis._contentWidth)return null;var s,a=e.top-o,l=e.top+this._lineHeight,u=i+this._contentLeft,c=r.u(this._viewDomNode.domNode),h=c.top+a-r.e.scrollY,d=c.top+l-r.e.scrollY,g=c.left+u-r.e.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=h>=22,m=d+o<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;g+t+20>p&&(g-=s=g-(p-t-20),u-=s);g<0&&(g-=s=g,u-=s);return this._fixedOverflowWidgets&&(a=h,l=d,u=g),{aboveTop:a,fitsAbove:f,belowTop:l,fitsBelow:m,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Eo(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var o=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new Eo(o,t.left)},e.prototype._prepareRenderWidget=function(e,t){var o=this;if(!e)return null;for(var n=null,i=function(){if(!n){if(-1===o._cachedDomNodeClientWidth||-1===o._cachedDomNodeClientHeight){var i=o.domNode.domNode;o._cachedDomNodeClientWidth=i.clientWidth,o._cachedDomNodeClientHeight=i.clientHeight}n=o.allowEditorOverflow?o._layoutBoxInPage(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t):o._layoutBoxInViewport(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t)}},r=1;r<=2;r++)for(var s=0;se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),To=(o(453),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),wo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._scrollWidth=0,o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o._context.addEventHandler(o),o}return To(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
':""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+o+"; }"),!o||o.isTransparent()||e.defines(Je.p)){var n=e.getColor(Je.p);n&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}}));o(454);var ko=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Oo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o._context.addEventHandler(o),o}return ko(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var o="current-line";if(this._shouldShowCurrentLine())o="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"");return'
'}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+o+"; border: none; }");else{var n=e.getColor(Je.p);n&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}}));o(455);var Ro=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),No=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Ro(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),o=[],n=0,i=0,r=t.length;it.options.zIndex)return 1;var o=e.options.className,n=t.options.className;return on?1:_.a.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,u=[],c=a;c<=l;c++){u[c-a]=""}this._renderWholeLineDecorations(e,o,u),this._renderNormalDecorations(e,o,u),this._renderResult=u},t.prototype._renderWholeLineDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(l.range.startLineNumber,i),h=Math.min(l.range.endLineNumber,r),d=c;d<=h;d++){o[d-i]+=u}}},t.prototype._renderNormalDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=null,s=!1,a=null,l=0,u=t.length;l';s[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe),Lo=(o(456),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Io=function(e,t,o){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(o)},Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Lo(t,e),t.prototype._render=function(e,t,o){for(var n=[],i=e;i<=t;i++){n[i-e]=[]}if(0===o.length)return n;o.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=o;a++){var l=a-t,u=n[l];0===u.length?s[l]="":s[l]='
=this._renderResult.length?"":this._renderResult[o]},t}(Do),Po=(o(457),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Mo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._primaryLineNumber=0,o._lineHeight=o._context.configuration.editor.lineHeight,o._spaceWidth=o._context.configuration.editor.fontInfo.spaceWidth,o._enabled=o._context.configuration.editor.viewInfo.renderIndentGuides,o._activeIndentEnabled=o._context.configuration.editor.viewInfo.highlightActiveIndentGuide,o._renderResult=null,o._context.addEventHandler(o),o}return Po(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],o=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==o&&(this._primaryLineNumber=o,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,n=this._context.model.getTabSize()*this._spaceWidth,i=e.scrollWidth,r=this._lineHeight,s=n,a=this._context.model.getLinesIndentGuides(t,o),l=0,u=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,o);l=h.startLineNumber,u=h.endLineNumber,c=h.indent}for(var d=[],g=t;g<=o;g++){for(var p=l<=g&&g<=u,f=g-t,_=a[f],y="",v=e.visibleRangeForPosition(new m.a(g,1)),b=v?v.left:0,E=1;E<=_;E++){if(y+='
',(b+=n)>i)break}d[f]=y}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.l);o&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+o+" inset; }");var n=e.getColor(Je.a)||o;n&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+n+" inset; }")}));o(458);var xo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Bo=function(){function e(){this._currentVisibleRange=new _.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Fo=function(e,t,o,n,i,r){this.lineNumber=e,this.startColumn=t,this.endColumn=o,this.startScrollTop=n,this.stopScrollTop=i,this.scrollType=r},Ho=function(e){function t(t,o){var n=e.call(this,t)||this;n._linesContent=o,n._textRangeRestingSpot=document.createElement("div"),n._visibleLines=new go(n),n.domNode=n._visibleLines.domNode;var i=n._context.configuration;return n._lineHeight=i.editor.lineHeight,n._typicalHalfwidthCharacterWidth=i.editor.fontInfo.typicalHalfwidthCharacterWidth,n._isViewportWrapping=i.editor.wrappingInfo.isViewportWrapping,n._revealHorizontalRightPadding=i.editor.viewInfo.revealHorizontalRightPadding,n._canUseLayerHinting=i.editor.canUseLayerHinting,n._viewLineOptions=new Dt(i,n._context.theme.type),Xe.write(n.domNode,7),n.domNode.setClassName("view-lines"),g.a.applyFontInfo(n.domNode,i.editor.fontInfo),n._maxLineWidth=0,n._asyncUpdateLineWidths=new Xt.c((function(){n._updateLineWidthsSlow()}),200),n._lastRenderedData=new Bo,n._horizontalRevealRequest=null,n}return xo(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new At(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&g.a.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new Dt(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var o=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=o;i<=n;i++){this._visibleLines.getVisibleLine(i).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=!1,i=t;i<=o;i++)n=this._visibleLines.getVisibleLine(i).onSelectionChanged()||n;return n},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=t;n<=o;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),o=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?o={scrollTop:o.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Fo(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),o.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-o.scrollTop);return 0===e.scrollType&&n>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(o):this._context.viewLayout.setScrollPositionNow(o),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),o=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopo)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var o=this._getViewLineDomNode(e);if(null===o)return null;var n=this._getLineNumberFor(o);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new m.a(n,1);var i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;var s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t),a=this._context.model.getLineMinColumn(n);return so?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var o=e.endLineNumber;if(!(e=_.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var n,i=[],r=0,s=new It(this.domNode.domNode,this._textRangeRestingSpot);t&&(n=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new m.a(e.startLineNumber,1)).lineNumber);for(var a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),u=e.startLineNumber;u<=e.endLineNumber;u++)if(!(ul)){var c=u===e.startLineNumber?e.startColumn:1,h=u===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(u),d=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(c,h,s);if(d&&0!==d.length){if(t&&ui)){var s=r===e.startLineNumber?e.startColumn:1,a=r===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(r),l=this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(s,a,o);l&&0!==l.length&&(t=t.concat(l))}return 0===t.length?null:t},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=1,i=!0,r=t;r<=o;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?n=Math.max(n,s.getWidth()):i=!1}return i&&1===t&&o===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),i},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,o=this._horizontalRevealRequest.startColumn,n=this._horizontalRevealRequest.endColumn,i=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,o,n);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===i?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthc&&(c=d.left+d.width)}return i=c,u=Math.max(0,u-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,u,c),maxHorizontalOffset:i}},t.prototype._computeMinimumScrolling=function(e,t,o,n,i,r){i=!!i,r=!!r;var s=(t|=0)-(e|=0);return(n|=0)-(o|=0)t?Math.max(0,n-s):e:o},t.HORIZONTAL_EXTRA_PX=30,t}(Ye),Uo=(o(459),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Vo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._decorationsLeft=o._context.configuration.editor.layoutInfo.decorationsLeft,o._decorationsWidth=o._context.configuration.editor.layoutInfo.decorationsWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Uo(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),o=[],n=0,i=0,r=t.length;i
',r=[],s=t;s<=o;s++){for(var a=s-t,l=n[a],u="",c=0,h=l.length;c';i[s]=l}this._renderResult=i},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(Do),Go=(o(461),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),zo=function(e){function t(t){var o=e.call(this,t)||this;return o._widgets={},o._verticalScrollbarWidth=o._context.configuration.editor.layoutInfo.verticalScrollbarWidth,o._minimapWidth=o._context.configuration.editor.layoutInfo.minimapWidth,o._horizontalScrollbarHeight=o._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,o._editorHeight=o._context.configuration.editor.layoutInfo.height,o._editorWidth=o._context.configuration.editor.layoutInfo.width,o._domNode=Object(He.b)(document.createElement("div")),Xe.write(o._domNode,4),o._domNode.setClassName("overlayWidgets"),o}return Go(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=Object(He.b)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var o=this._widgets[e.getId()];return o.preference!==t&&(o.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.parentNode.removeChild(o),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===ut.c.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===ut.c.BOTTOM_RIGHT_CORNER){var o=t.domNode.clientHeight;t.setTop(this._editorHeight-o-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===ut.c.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),o=0,n=t.length;o=3){var i,r,s,a=n-(i=Math.floor(n/3))-(r=Math.floor(n/3)),l=(s=e)+i;return[[0,s,l,s,s+i+a,s,l,s],[0,i,a,i+a,r,i+a+r,a+r,i+a+r]]}if(2===o)return[[0,s=e,s,s,s+(i=Math.floor(n/2)),s,s,s],[0,i,i,i,r=n-i,i+r,i+r,i+r]];return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}(),Xo=function(e){function t(t){var o=e.call(this,t)||this;return o._domNode=Object(He.b)(document.createElement("canvas")),o._domNode.setClassName("decorationsOverviewRuler"),o._domNode.setPosition("absolute"),o._domNode.setLayerHinting(!0),o._domNode.setAttribute("aria-hidden","true"),o._settings=null,o._updateSettings(!1),o._tokensColorTrackerListener=J.y.onDidChange((function(e){e.changedColorMap&&o._updateSettings(!0)})),o._cursorPositions=[],o}return Ko(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new Yo(this._context.configuration,this._context.theme);return(null===this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,o=e.selections.length;tt&&(N=t-a),T=N-a,I=N+a;T>y+1||E!==m?(0!==v&&l.fillRect(u[m],_,c[m],y-_),m=E,_=T,y=I):I>y&&(y=I)}l.fillRect(u[m],_,c[m],y-_)}if(!this._settings.hideCursor){var w=2*this._settings.pixelRatio|0,k=w/2|0,O=this._settings.x[7],R=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(_=-100,y=-100,v=0,b=this._cursorPositions.length;vt&&(N=t-k);var I=(T=N-k)+w;T>y+1?(0!==v&&l.fillRect(O,_,R,y-_),_=T,y=I):I>y&&(y=I)}l.fillRect(O,_,R,y-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())},t}(Ye),qo=o(145),$o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Jo=function(e){function t(t,o){var n=e.call(this)||this;return n._context=t,n._domNode=Object(He.b)(document.createElement("canvas")),n._domNode.setClassName(o),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._zoneManager=new qo.b((function(e){return n._context.viewLayout.getVerticalOffsetForLineNumber(e)})),n._zoneManager.setDOMWidth(0),n._zoneManager.setDOMHeight(0),n._zoneManager.setOuterHeight(n._context.viewLayout.getScrollHeight()),n._zoneManager.setLineHeight(n._context.configuration.editor.lineHeight),n._zoneManager.setPixelRatio(n._context.configuration.editor.pixelRatio),n._context.addEventHandler(n),n}return $o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),o=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),i=this._domNode.domNode.getContext("2d");return i.clearRect(0,0,e,t),o.length>0&&this._renderOneLane(i,o,n,e),!0},t.prototype._renderOneLane=function(e,t,o,n){for(var i=0,r=0,s=0,a=0,l=t.length;a=h?s=Math.max(s,d):(e.fillRect(0,r,n,s-r),r=h,s=d)}e.fillRect(0,r,n,s-r)},t}(Ve),Zo=(o(462),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Qo=function(e){function t(t){var o=e.call(this,t)||this;return o.domNode=Object(He.b)(document.createElement("div")),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o.domNode.setClassName("view-rulers"),o._renderedRulers=[],o._rulers=o._context.configuration.editor.viewInfo.rulers,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o}return Zo(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){(r=Object(He.b)(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(o),this.domNode.appendChild(r),this._renderedRulers.push(r),n--}else for(var i=e-t;i>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),i--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,o=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=0;return t=0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?e.width:e.width-e.minimapWidth-e.verticalScrollbarWidth,this._width!==t&&(this._width=t,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.lb);o&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+o+" 0 6px 6px -6px inset; }")}));o(464);var nn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),rn=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},sn=function(e,t){this.lineNumber=e,this.ranges=t};function an(e){return new rn(e)}function ln(e){return new sn(e.lineNumber,e.ranges.map(an))}var un=je.h,cn=function(e){function t(t){var o=e.call(this)||this;return o._previousFrameVisibleRangesWithStyle=[],o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._roundedSelection=o._context.configuration.editor.viewInfo.roundedSelection,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._selections=[],o._renderResult=null,o._context.addEventHandler(o),o}return nn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,o=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,o){var n=this._typicalHalfwidthCharacterWidth/4,i=null,r=null;if(o&&o.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!i&&a=0;a--)o[a].lineNumber===l&&(r=o[a].ranges[0]);i&&!i.startStyle&&(i=null),r&&!r.startStyle&&(r=null)}a=0;for(var u=t.length;a0){var f=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;hn(h-f)f&&(g.top=1),hn(d-m)'},t.prototype._actualRenderOneSelection=function(e,o,n,i){for(var r=i.length>0&&i[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=i.length>0?i[0].lineNumber:0,u=i.length>0?i[i.length-1].lineNumber:0,c=0,h=i.length;c1,u)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Qe);function hn(e){return e<0?-e:e}Object(Fe.e)((function(e,t){var o=e.getColor(en.z);o&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+o+"; }");var n=e.getColor(en.y);n&&t.addRule(".monaco-editor .selected-text { background-color: "+n+"; }");var i=e.getColor(en.A);i&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+i+"; }")}));o(465);var dn=function(e,t,o,n,i,r){this.top=e,this.left=t,this.width=o,this.height=n,this.textContent=i,this.textContentClassName=r},gn=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(He.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),g.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new m.a(1,1)),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(g.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){var t="",o="";if(this._cursorStyle===be.i.Line||this._cursorStyle===be.i.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i)return null;if(this._cursorStyle===be.i.Line){if((n=r.m(this._lineCursorWidth>0?this._lineCursorWidth:2))>2)t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)}else n=r.m(1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new dn(s,i.left,n,this._lineHeight,t,o)}var a=e.linesVisibleRangesForRange(new _.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!a||0===a.length||0===a[0].ranges.length)return null;var l=a[0].ranges[0],u=l.width<1?this._typicalHalfwidthCharacterWidth:l.width;if(this._cursorStyle===be.i.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),p.isHighSurrogate(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var h=c.tokens.findTokenIndexAtOffset(this._position.column-1);o=c.tokens.getClassName(h)}var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,g=this._lineHeight;return this._cursorStyle!==be.i.Underline&&this._cursorStyle!==be.i.UnderlineThin||(d+=this._lineHeight-2,g=2),new dn(d,l.left,u,g,t,o)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e.prototype.updatePosition=function(e){this._position=e},e}(),pn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),fn=function(e){function t(t){var o=e.call(this,t)||this;return o._readOnly=o._context.configuration.editor.readOnly,o._cursorBlinking=o._context.configuration.editor.viewInfo.cursorBlinking,o._cursorStyle=o._context.configuration.editor.viewInfo.cursorStyle,o._selectionIsEmpty=!0,o._primaryCursor=new gn(o._context),o._secondaryCursors=[],o._renderData=[],o._domNode=Object(He.b)(document.createElement("div")),o._domNode.setAttribute("role","presentation"),o._domNode.setAttribute("aria-hidden","true"),o._updateDomClassName(),o._domNode.appendChild(o._primaryCursor.getDomNode()),o._startCursorBlinkAnimation=new Xt.f,o._cursorFlatBlinkInterval=new Xt.b,o._blinkingEnabled=!1,o._editorHasFocus=!1,o._updateBlinking(),o}return pn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,o=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(n=0;n=s)return new e(a,l,y,v,c,b=1,s);var b=Math.max(1,Math.floor(o-v*d/g));return u&&u.scrollHeight===l&&(u.scrollTop>a&&(b=Math.min(b,u.startLineNumber)),u.scrollTopPn)o._context.viewLayout.setScrollPositionNow({scrollTop:i.scrollTop});else{var s=e.posy-t;o._context.viewLayout.setScrollPositionNow({scrollTop:i.getDesiredScrollTopFromDelta(s)})}}),(function(){o._slider.toggleClassName("active",!1)}))}})),o}return In(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new Hn(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new Mn(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=xn.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var o=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,n=Math.min(this._options.minimapWidth,Math.round(o*An(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var o=this._options.renderMinimap,n=e.startLineNumber,i=e.endLineNumber,r=Dn(o);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new Fn(e,s.imageData,s.lines)}for(var a=this._getBuffer(),l=t._renderUntouchedLines(a,n,i,r,this._lastRenderData),u=l[0],c=l[1],h=l[2],d=this._context.model.getMinimapLinesRenderingData(n,i,h),g=d.tabSize,p=this._tokensColorTracker.getColor(2),f=this._tokensColorTracker.backgroundIsLight(),m=0,_=[],y=0,v=i-n+1;y=0&&wd)return;var C=u.charCodeAt(f);if(9===C){var S=a-(f+m)%a;m+=S-1,g+=S*h}else if(32===C)g+=h;else for(var T=p.isFullWidthCharacter(C)?2:1,w=0;wd)return}},t}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.nb);if(o){var n=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+n+"; }")}var i=e.getColor(en.ob);if(i){var r=i.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(en.mb);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var l=e.getColor(en.lb);l&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+l+" -6px 0 6px -6px inset; }")}));var Vn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Wn=function(e){function t(t,o,n,i,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=new bn(i);var l=new lo(o,i,s,a.outgoingEvents,t);return a.eventDispatcher=new uo((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new yn(o,n.getTheme(),i,a.eventDispatcher),a._register(n.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new H),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new at(a._context,l,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new so(a._context,l,a.createPointerHandlerHelper()),a._register(i.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return Vn(t,e),t.prototype.createViewParts=function(){this.linesContent=Object(He.b)(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=Object(He.b)(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=Object(He.b)(document.createElement("div")),Xe.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new wn(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new Ho(this._context,this.linesContent),this.viewZones=new _n(this._context),this.viewParts.push(this.viewZones);var e=new Xo(this._context);this.viewParts.push(e);var t=new on(this._context);this.viewParts.push(t);var o=new yo(this._context);this.viewParts.push(o),o.addDynamicOverlay(new wo(this._context)),o.addDynamicOverlay(new cn(this._context)),o.addDynamicOverlay(new Mo(this._context)),o.addDynamicOverlay(new No(this._context));var n=new vo(this._context);this.viewParts.push(n),n.addDynamicOverlay(new Oo(this._context)),n.addDynamicOverlay(new Ao(this._context)),n.addDynamicOverlay(new jo(this._context)),n.addDynamicOverlay(new Vo(this._context)),n.addDynamicOverlay(new tt(this._context));var i=new $e(this._context);i.getDomNode().appendChild(this.viewZones.marginDomNode),i.getDomNode().appendChild(n.getDomNode()),this.viewParts.push(i),this.contentWidgets=new Co(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new fn(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new zo(this._context),this.viewParts.push(this.overlayWidgets);var r=new Qo(this._context);this.viewParts.push(r);var s=new Un(this._context);if(this.viewParts.push(s),e){var a=this._scrollbar.getOverviewRulerLayoutInfo();a.parent.insertBefore(e.getDomNode(),a.insertBefore)}this.linesContent.appendChild(o.getDomNode()),this.linesContent.appendChild(r.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(i.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(s.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,o){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,o)},visibleRangeForPosition2:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+Object(Fe.d)(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,o=this.viewParts.length;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xn=function(e,t){return function(o,n){t(o,n,e)}},qn=0,$n="showUnused",Jn=function(e){function t(t,o,n,i,r,l,u,c,g){var p=e.call(this)||this;p._onDidDispose=p._register(new a.a),p.onDidDispose=p._onDidDispose.event,p._onDidChangeModelContent=p._register(new a.a),p.onDidChangeModelContent=p._onDidChangeModelContent.event,p._onDidChangeModelLanguage=p._register(new a.a),p.onDidChangeModelLanguage=p._onDidChangeModelLanguage.event,p._onDidChangeModelLanguageConfiguration=p._register(new a.a),p.onDidChangeModelLanguageConfiguration=p._onDidChangeModelLanguageConfiguration.event,p._onDidChangeModelOptions=p._register(new a.a),p.onDidChangeModelOptions=p._onDidChangeModelOptions.event,p._onDidChangeModelDecorations=p._register(new a.a),p.onDidChangeModelDecorations=p._onDidChangeModelDecorations.event,p._onDidChangeConfiguration=p._register(new a.a),p.onDidChangeConfiguration=p._onDidChangeConfiguration.event,p._onDidChangeModel=p._register(new a.a),p.onDidChangeModel=p._onDidChangeModel.event,p._onDidChangeCursorPosition=p._register(new a.a),p.onDidChangeCursorPosition=p._onDidChangeCursorPosition.event,p._onDidChangeCursorSelection=p._register(new a.a),p.onDidChangeCursorSelection=p._onDidChangeCursorSelection.event,p._onDidAttemptReadOnlyEdit=p._register(new a.a),p.onDidAttemptReadOnlyEdit=p._onDidAttemptReadOnlyEdit.event,p._onDidLayoutChange=p._register(new a.a),p.onDidLayoutChange=p._onDidLayoutChange.event,p._editorTextFocus=p._register(new Zn),p.onDidFocusEditorText=p._editorTextFocus.onDidChangeToTrue,p.onDidBlurEditorText=p._editorTextFocus.onDidChangeToFalse,p._editorWidgetFocus=p._register(new Zn),p.onDidFocusEditorWidget=p._editorWidgetFocus.onDidChangeToTrue,p.onDidBlurEditorWidget=p._editorWidgetFocus.onDidChangeToFalse,p._onWillType=p._register(new a.a),p.onWillType=p._onWillType.event,p._onDidType=p._register(new a.a),p.onDidType=p._onDidType.event,p._onDidPaste=p._register(new a.a),p.onDidPaste=p._onDidPaste.event,p._onMouseUp=p._register(new a.a),p.onMouseUp=p._onMouseUp.event,p._onMouseDown=p._register(new a.a),p.onMouseDown=p._onMouseDown.event,p._onMouseDrag=p._register(new a.a),p.onMouseDrag=p._onMouseDrag.event,p._onMouseDrop=p._register(new a.a),p.onMouseDrop=p._onMouseDrop.event,p._onContextMenu=p._register(new a.a),p.onContextMenu=p._onContextMenu.event,p._onMouseMove=p._register(new a.a),p.onMouseMove=p._onMouseMove.event,p._onMouseLeave=p._register(new a.a),p.onMouseLeave=p._onMouseLeave.event,p._onKeyUp=p._register(new a.a),p.onKeyUp=p._onKeyUp.event,p._onKeyDown=p._register(new a.a),p.onKeyDown=p._onKeyDown.event,p._onDidScrollChange=p._register(new a.a),p.onDidScrollChange=p._onDidScrollChange.event,p._onDidChangeViewZones=p._register(new a.a),p.onDidChangeViewZones=p._onDidChangeViewZones.event,p.domElement=t,p.id=++qn,p._decorationTypeKeysToIds={},p._decorationTypeSubtypes={},p.isSimpleWidget=n.isSimpleWidget||!1,p._telemetryData=n.telemetryData||null,o=o||{},p._configuration=p._register(p._createConfiguration(o)),p._register(p._configuration.onDidChange((function(e){p._onDidChangeConfiguration.fire(e),e.layoutInfo&&p._onDidLayoutChange.fire(p._configuration.editor.layoutInfo),p._configuration.editor.showUnused?p.domElement.classList.add($n):p.domElement.classList.remove($n)}))),p._contextKeyService=p._register(u.createScoped(p.domElement)),p._notificationService=g,p._codeEditorService=r,p._commandService=l,p._themeService=c,p._register(new Qn(p,p._contextKeyService)),p._register(new ei(p,p._contextKeyService)),p._instantiationService=i.createChild(new h.a([d.e,p._contextKeyService])),p._attachModel(null),p._contributions={},p._actions={},p._focusTracker=new ti(t),p._focusTracker.onChange((function(){p._editorWidgetFocus.setValue(p._focusTracker.hasFocus())})),p.contentWidgets={},p.overlayWidgets={};var f=n.contributions;Array.isArray(f)||(f=Gn.d.getEditorContributions());for(var m=0,_=f.length;m<_;m++){var y=f[m];try{var v=p._instantiationService.createInstance(y,p);p._contributions[v.getId()]=v}catch(e){Object(s.e)(e)}}return Gn.d.getEditorActions().forEach((function(e){var t=new zn.a(e.id,e.label,e.alias,e.precondition,(function(){return p._instantiationService.invokeFunction((function(t){return e.runEditorCommand(t,p,null)}))}),p._contextKeyService);p._actions[t.id]=t})),p._codeEditorService.addCodeEditor(p),p}return Kn(t,e),t.prototype._createConfiguration=function(e){return new g.a(e,this.domElement)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return C.a.ICodeEditor},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this.contentWidgets={},this.overlayWidgets={},this._focusTracker.dispose();for(var t=Object.keys(this._contributions),o=0,n=t.length;o1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(l.a),ei=function(e){function t(t,o){var n=e.call(this)||this;n._editor=t,n._langId=Ae.a.languageId.bindTo(o),n._hasCompletionItemProvider=Ae.a.hasCompletionItemProvider.bindTo(o),n._hasCodeActionsProvider=Ae.a.hasCodeActionsProvider.bindTo(o),n._hasCodeLensProvider=Ae.a.hasCodeLensProvider.bindTo(o),n._hasDefinitionProvider=Ae.a.hasDefinitionProvider.bindTo(o),n._hasImplementationProvider=Ae.a.hasImplementationProvider.bindTo(o),n._hasTypeDefinitionProvider=Ae.a.hasTypeDefinitionProvider.bindTo(o),n._hasHoverProvider=Ae.a.hasHoverProvider.bindTo(o),n._hasDocumentHighlightProvider=Ae.a.hasDocumentHighlightProvider.bindTo(o),n._hasDocumentSymbolProvider=Ae.a.hasDocumentSymbolProvider.bindTo(o),n._hasReferenceProvider=Ae.a.hasReferenceProvider.bindTo(o),n._hasRenameProvider=Ae.a.hasRenameProvider.bindTo(o),n._hasDocumentFormattingProvider=Ae.a.hasDocumentFormattingProvider.bindTo(o),n._hasDocumentSelectionFormattingProvider=Ae.a.hasDocumentSelectionFormattingProvider.bindTo(o),n._hasSignatureHelpProvider=Ae.a.hasSignatureHelpProvider.bindTo(o),n._isInWalkThrough=Ae.a.isInEmbeddedEditor.bindTo(o);var i=function(){return n._update()};return n._register(t.onDidChangeModel(i)),n._register(t.onDidChangeModelLanguage(i)),n._register(J.u.onDidChange(i)),n._register(J.a.onDidChange(i)),n._register(J.c.onDidChange(i)),n._register(J.e.onDidChange(i)),n._register(J.n.onDidChange(i)),n._register(J.z.onDidChange(i)),n._register(J.m.onDidChange(i)),n._register(J.h.onDidChange(i)),n._register(J.j.onDidChange(i)),n._register(J.r.onDidChange(i)),n._register(J.s.onDidChange(i)),n._register(J.f.onDidChange(i)),n._register(J.i.onDidChange(i)),n._register(J.t.onDidChange(i)),i(),n}return Kn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(J.u.has(e)),this._hasCodeActionsProvider.set(J.a.has(e)),this._hasCodeLensProvider.set(J.c.has(e)),this._hasDefinitionProvider.set(J.e.has(e)),this._hasImplementationProvider.set(J.n.has(e)),this._hasTypeDefinitionProvider.set(J.z.has(e)),this._hasHoverProvider.set(J.m.has(e)),this._hasDocumentHighlightProvider.set(J.h.has(e)),this._hasDocumentSymbolProvider.set(J.j.has(e)),this._hasReferenceProvider.set(J.r.has(e)),this._hasRenameProvider.set(J.s.has(e)),this._hasSignatureHelpProvider.set(J.t.has(e)),this._hasDocumentFormattingProvider.set(J.f.has(e)||J.i.has(e)),this._hasDocumentSelectionFormattingProvider.set(J.i.has(e)),this._isInWalkThrough.set(e.uri.scheme===Pe.a.walkThroughSnippet)):this.reset()},t}(l.a),ti=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new a.a),o.onChange=o._onChange.event,o._hasFocus=!1,o._domFocusTracker=o._register(r.O(t)),o._register(o._domFocusTracker.onDidFocus((function(){o._hasFocus=!0,o._onChange.fire(void 0)}))),o._register(o._domFocusTracker.onDidBlur((function(){o._hasFocus=!1,o._onChange.fire(void 0)}))),o}return Kn(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(l.a),oi=encodeURIComponent("");function ii(e){return oi+encodeURIComponent(e.toString())+ni}var ri=encodeURIComponent('');Object(Fe.e)((function(e,t){var o=e.getColor(Je.h);o&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+o+"; }");var n=e.getColor(Je.i);n&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+ii(n)+'") repeat-x bottom left; }');var i=e.getColor(Je.v);i&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+i+"; }");var r=e.getColor(Je.w);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+ii(r)+'") repeat-x bottom left; }');var s=e.getColor(Je.m);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Je.n);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+ii(a)+'") repeat-x bottom left; }');var l=e.getColor(Je.j);l&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+l+"; }");var u=e.getColor(Je.k);u&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(ri+encodeURIComponent(u.toString())+si)+'") no-repeat bottom left; }');var c=e.getColor(Je.u);c&&t.addRule("."+$n+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var h=e.getColor(Je.t);h&&t.addRule("."+$n+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }")}))},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(6),r=o(12),s=o(8),a=o(3),l=o(17),u=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([c.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var o="",n=0,i=this._pieces.length;n0;){if(e=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var o=this._editor.getModel().getDecorationsInRange(t),n=0,i=o.length;n1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var a=n._editor.getModel().getLineCount(),l=n._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/l)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,d=1,g=t.length;d=f.startLineNumber?f.endLineNumber>h&&(h=f.endLineNumber):(s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=f.startLineNumber,h=f.endLineNumber)}s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(d=0,g=t.length;d=0;t--){var o=this._decorations[t],n=this._editor.getModel().getDecorationRange(o);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,o=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){for(var o=[],n=0;n0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||1===n?(1===o?o=i.getLineCount():o--,n=i.getLineMaxColumn(o)):n--,new g.a(o,n)},e.prototype._moveToPrevMatch=function(t,o){if(void 0===o&&(o=!1),this._decorations.getCount()<19999){var n=this._decorations.matchBeforePosition(t);return n&&n.isEmpty()&&n.getStartPosition().equals(t)&&(t=this._prevSearchPosition(t),n=this._decorations.matchBeforePosition(t)),void(n&&this._setCurrentFindMatch(n))}if(!this._cannotFind()){var i=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),i);r.getEndPosition().isBefore(t)&&(t=r.getEndPosition()),t.isBefore(r.getStartPosition())&&(t=r.getEndPosition());var s=t.lineNumber,a=t.column,l=this._editor.getModel(),u=new g.a(s,a),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return c&&c.range.isEmpty()&&c.range.getStartPosition().equals(u)&&(u=this._prevSearchPosition(u),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1)),c?o||r.containsRange(c.range)?void this._setCurrentFindMatch(c.range):this._moveToPrevMatch(c.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||n===i.getLineMaxColumn(o)?(o===i.getLineCount()?o=1:o++,n=1):n++,new g.a(o,n)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<19999){var t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}var o=this._getNextMatch(e,!1,!0);o&&this._setCurrentFindMatch(o.range)},e.prototype._getNextMatch=function(t,o,n,i){if(void 0===i&&(i=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),s=e._getSearchRange(this._editor.getModel(),r);s.getEndPosition().isBefore(t)&&(t=s.getStartPosition()),t.isBefore(s.getStartPosition())&&(t=s.getStartPosition());var a=t.lineNumber,l=t.column,u=this._editor.getModel(),c=new g.a(a,l),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o);return n&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(c)&&(c=this._nextSearchPosition(c),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o)),h?i||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),o,n,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new u(null);for(var t=new h(e),o=0,n=e.length;o=n)break;if(36===(a=e.charCodeAt(o))){t.emitUnchanged(o-1),t.emitStatic("$",o+1);continue}if(48===a||38===a){t.emitUnchanged(o-1),t.emitMatchIndex(0,o+1);continue}if(49<=a&&a<=57){var r=a-48;if(o+1=n)break;var a;switch(a=e.charCodeAt(o)){case 92:t.emitUnchanged(o-1),t.emitStatic("\\",o+1);break;case 110:t.emitUnchanged(o-1),t.emitStatic("\n",o+1);break;case 116:t.emitUnchanged(o-1),t.emitStatic("\t",o+1)}}}return t.finalize()}(this._state.replaceString):u.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),o=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(o)if(t.equalsRange(o.range)){var n=e.buildReplaceString(o.matches),i=new d.a(t,n);this._executeEditorCommand("replace",i),this._decorations.setStartPosition(new g.a(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(o.range)}},e.prototype._findMatches=function(t,o,n){var i=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o,n)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new C.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var o="m";t.ignoreCase&&(o+="i"),t.global&&(o+="g"),t=new RegExp(t.source,o)}var n,i=this._editor.getModel(),r=i.getValue(y.c.LF),s=i.getFullModelRange(),a=this._getReplacePattern();n=a.hasReplacementPatterns?r.replace(t,(function(){return a.buildReplaceString(arguments)})):r.replace(t,a.buildReplaceString(null));var l=new d.b(s,n,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),o=this._findMatches(e,t.hasReplacementPatterns,1073741824),n=[],i=0,r=o.length;it&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,i=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,i=!0),void 0!==o&&(p.a.equalsRange(this._currentMatch,o)||(this._currentMatch=o,n.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(n)},e.prototype.change=function(e,t,o){void 0===o&&(o=!0);var n={moveCursor:t,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},i=!1,r=this.isRegex,s=this.wholeWord,a=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,i=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,i=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,i=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,i=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(p.a.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,n.searchScope=!0,i=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,r!==this.isRegex&&(i=!0,n.isRegex=!0),s!==this.wholeWord&&(i=!0,n.wholeWord=!0),a!==this.matchCase&&(i=!0,n.matchCase=!0),i&&this._onFindReplaceStateChange.fire(n)},e}(),B=o(5),F=o(55),H=o(177),U=o(83),V=o(61),W=(o(438),o(13)),j=o(15),G=o(1),z=o(59),K=o(93),Y=o(16),X=o(162),q=(o(442),o(443),o(14)),$=o(30),J=(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Z={inputActiveOptionBorder:q.a.fromHex("#007ACC")},Q=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new A.a),o._onKeyDown=o._register(new A.a),o._opts=$.c(t),$.g(o._opts,Z,!1),o._checked=o._opts.isChecked,o.domNode=document.createElement("div"),o.domNode.title=o._opts.title,o.domNode.className="monaco-custom-checkbox "+o._opts.actionClassName+" "+(o._checked?"checked":"unchecked"),o.domNode.tabIndex=0,o.domNode.setAttribute("role","checkbox"),o.domNode.setAttribute("aria-checked",String(o._checked)),o.domNode.setAttribute("aria-label",o._opts.title),o.applyStyles(),o.onclick(o.domNode,(function(e){o.checked=!o._checked,o._onChange.fire(!1),e.preventDefault()})),o.onkeydown(o.domNode,(function(e){if(10===e.keyCode||3===e.keyCode)return o.checked=!o._checked,o._onChange.fire(!0),void e.preventDefault();o._onKeyDown.fire(e)})),o}return J(t,e),Object.defineProperty(t.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onKeyDown",{get:function(){return this._onKeyDown.event},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),this.applyStyles()},t.prototype.applyStyles=function(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){G.H(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(z.a),ee=(o(444),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),te=n.a("caseDescription","Match Case"),oe=n.a("wordsDescription","Match Whole Word"),ne=n.a("regexDescription","Use Regular Expression"),ie=function(e){function t(t){return e.call(this,{actionClassName:"monaco-case-sensitive",title:te+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),re=function(e){function t(t){return e.call(this,{actionClassName:"monaco-whole-word",title:oe+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),se=function(e){function t(t){return e.call(this,{actionClassName:"monaco-regex",title:ne+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),ae=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),le=n.a("defaultLabel","input"),ue=function(e){function t(t,o,n){var i=e.call(this)||this;return i._onDidOptionChange=i._register(new A.a),i.onDidOptionChange=i._onDidOptionChange.event,i._onKeyDown=i._register(new A.a),i.onKeyDown=i._onKeyDown.event,i._onMouseDown=i._register(new A.a),i.onMouseDown=i._onMouseDown.event,i._onInput=i._register(new A.a),i._onKeyUp=i._register(new A.a),i._onCaseSensitiveKeyDown=i._register(new A.a),i.onCaseSensitiveKeyDown=i._onCaseSensitiveKeyDown.event,i._onRegexKeyDown=i._register(new A.a),i._lastHighlightFindOptions=0,i.contextViewProvider=o,i.width=n.width||100,i.placeholder=n.placeholder||"",i.validation=n.validation,i.label=n.label||le,i.inputActiveOptionBorder=n.inputActiveOptionBorder,i.inputBackground=n.inputBackground,i.inputForeground=n.inputForeground,i.inputBorder=n.inputBorder,i.inputValidationInfoBorder=n.inputValidationInfoBorder,i.inputValidationInfoBackground=n.inputValidationInfoBackground,i.inputValidationWarningBorder=n.inputValidationWarningBorder,i.inputValidationWarningBackground=n.inputValidationWarningBackground,i.inputValidationErrorBorder=n.inputValidationErrorBorder,i.inputValidationErrorBackground=n.inputValidationErrorBackground,i.regex=null,i.wholeWords=null,i.caseSensitive=null,i.domNode=null,i.inputBox=null,i.buildDomNode(n.appendCaseSensitiveLabel||"",n.appendWholeWordsLabel||"",n.appendRegexLabel||"",n.history),Boolean(t)&&t.appendChild(i.domNode),i.onkeydown(i.inputBox.inputElement,(function(e){return i._onKeyDown.fire(e)})),i.onkeyup(i.inputBox.inputElement,(function(e){return i._onKeyUp.fire(e)})),i.oninput(i.inputBox.inputElement,(function(e){return i._onInput.fire()})),i.onmousedown(i.inputBox.inputElement,(function(e){return i._onMouseDown.fire(e)})),i}return ae(t,e),t.prototype.enable=function(){G.G(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){G.f(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth(),this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){G.G(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,G.f(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,o,n){var i=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",G.f(this.domNode,"monaco-findInput"),this.inputBox=this._register(new X.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:n})),this.regex=this._register(new se({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.regex.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.regex.onKeyDown((function(e){i._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new re({appendTitle:t,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.wholeWords.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this.caseSensitive=this._register(new ie({appendTitle:e,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.caseSensitive.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.caseSensitive.onKeyDown((function(e){i._onCaseSensitiveKeyDown.fire(e)})));var r=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=r.indexOf(document.activeElement);if(t>=0){var o=void 0;e.equals(17)?o=(t+1)%r.length:e.equals(15)&&(o=0===t?r.length-1:t-1),e.equals(9)?r[t].blur():o>=0&&r[o].focus(),G.c.stop(e,!0)}}})),this.setInputWidth();var s=document.createElement("div");s.className="controls",s.appendChild(this.caseSensitive.domNode),s.appendChild(this.wholeWords.domNode),s.appendChild(this.regex.domNode),this.domNode.appendChild(s)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(z.a);function ce(e,t){return e.getContext(document.activeElement).getValue(t)}var he=o(84),de=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ge=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},pe=function(e,t){return function(o,n){t(o,n,e)}},fe="historyNavigationWidget",me="historyNavigationEnabled";function _e(e,t){var o=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,o){new r.f(o,t).bindTo(e)}(o,t,fe),{scopedContextKeyService:o,historyNavigationEnablement:new r.f(me,!0).bindTo(o)}}var ye=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(X.a),ve=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(ue);he.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:r.d.and(new r.b(fe),new r.c(me,!0)),primary:16,secondary:[528],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showPreviousValue()}}),he.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new r.a([new r.b(fe),new r.c(me,!0)]),primary:18,secondary:[530],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showNextValue()}});var be=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ee=n.a("label.find","Find"),Ce=n.a("placeholder.find","Find"),Se=n.a("label.previousMatchButton","Previous match"),Te=n.a("label.nextMatchButton","Next match"),we=n.a("label.toggleSelectionFind","Find in selection"),ke=n.a("label.closeButton","Close"),Oe=n.a("label.replace","Replace"),Re=n.a("placeholder.replace","Replace"),Ne=n.a("label.replaceButton","Replace"),Le=n.a("label.replaceAllButton","Replace All"),Ie=n.a("label.toggleReplaceButton","Toggle Replace mode"),De=n.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",19999),Ae=n.a("label.matchesLocation","{0} of {1}"),Pe=n.a("label.noResults","No Results"),Me=69,xe=17+(Me+3+1)+92+2,Be=34,Fe=function(e){this.afterLineNumber=e,this.heightInPx=Be,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"},He=function(e){function t(t,o,n,i,r,s,a){var u=e.call(this)||this;return u._codeEditor=t,u._controller=o,u._state=n,u._contextViewProvider=i,u._keybindingService=r,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new l.a(500),u._register(u._state.onFindReplaceStateChange((function(e){return u._onStateChanged(e)}))),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration((function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()}))),u._register(u._codeEditor.onDidChangeCursorSelection((function(){u._isVisible&&u._updateToggleSelectionFindButton()}))),u._register(u._codeEditor.onDidFocusEditorWidget((function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}}))),u._findInputFocused=w.bindTo(s),u._findFocusTracker=u._register(G.O(u._findInput.inputBox.inputElement)),u._register(u._findFocusTracker.onDidFocus((function(){u._findInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._findFocusTracker.onDidBlur((function(){u._findInputFocused.set(!1)}))),u._replaceInputFocused=k.bindTo(s),u._replaceFocusTracker=u._register(G.O(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus((function(){u._replaceInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._replaceFocusTracker.onDidBlur((function(){u._replaceInputFocused.set(!1)}))),u._codeEditor.addOverlayWidget(u),u._viewZone=new Fe(0),u._applyTheme(a.getTheme()),u._register(a.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel((function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones((function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0}))}))),u._register(u._codeEditor.onDidScrollChange((function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout((function(){u._layoutViewZone()}),0)}))),u}return be(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:Y.c.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;G.N(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=Me+"px",this._state.matchesCount>=19999?this._matchesCount.title=De:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=19999&&(t+="+");var o=String(this._state.matchesPosition);"0"===o&&(o="?"),e=s.format(Ae,o,t)}else e=Pe;this._matchesCount.appendChild(document.createTextNode(e)),Me=Math.max(Me,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(o||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),G.N(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var o=this._codeEditor.getSelection();!!o&&(o.startLineNumber!==o.endLineNumber||o.startColumn!==o.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){G.f(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")}),0),this._codeEditor.layoutOverlayWidget(this);var n=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&o){var i=G.u(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(o.getStartPosition()),s=i.left+r.left;if(r.topo.startLineNumber&&(n=!1);var a=G.w(this._domNode).left;s>a&&(n=!1);var l=this._codeEditor.getScrolledVisiblePosition(o.getEndPosition());i.left+l.left>a&&(n=!1)}}this._showViewZone(n)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),G.G(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones((function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))})))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones((function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=Be,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)}))},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones((function(o){var n=Be;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,n=64-Be):(t._viewZone.heightInPx=Be,n=Be-64),o.removeZone(t._viewZoneId)):t._viewZone.heightInPx=Be,t._viewZoneId=o.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+n)}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J),inputBackground:e.getColor(m.K),inputForeground:e.getColor(m.M),inputBorder:e.getColor(m.L),inputValidationInfoBackground:e.getColor(m.P),inputValidationInfoBorder:e.getColor(m.Q),inputValidationWarningBackground:e.getColor(m.R),inputValidationWarningBorder:e.getColor(m.S),inputValidationErrorBackground:e.getColor(m.N),inputValidationErrorBorder:e.getColor(m.O)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,o=!1,n=!1,i=!1;if(this._resized)if(G.y(this._domNode)>411)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=G.y(this._findInput.inputBox.inputElement)+"px");if(439+t>=e&&(n=!0),439+t-Me>=e&&(i=!0),439+t-Me>=e+50&&(o=!0),G.N(this._domNode,"collapsed-find-widget",o),G.N(this._domNode,"narrow-find-widget",i),G.N(this._domNode,"reduced-find-widget",n),i||o||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=G.y(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.a.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new ve(null,this._contextViewProvider,{width:221,label:Ee,placeholder:Ce,appendCaseSensitiveLabel:this._keybindingLabelFor(I.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(I.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(I.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())}))),j.c&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Ve({label:Se+this._keybindingLabelFor(I.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e)}})),this._nextBtn=this._register(new Ve({label:Te+this._keybindingLabelFor(I.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Ue({parent:t,title:we+this._keybindingLabelFor(I.ToggleSearchScopeCommand),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new Ve({label:ke+this._keybindingLabelFor(I.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new ye(t,null,{ariaLabel:Oe,placeholder:Re,history:[]},this._contextKeyService)),this._register(G.j(this._replaceInputBox.inputElement,"keydown",(function(t){return e._onReplaceInputKeyDown(t)}))),this._register(G.j(this._replaceInputBox.inputElement,"input",(function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)}))),this._replaceBtn=this._register(new Ve({label:Ne+this._keybindingLabelFor(I.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Ve({label:Le+this._keybindingLabelFor(I.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var o=document.createElement("div");return o.className="replace-part",o.appendChild(t),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),o},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),o=this._buildReplacePart();this._toggleReplaceBtn=this._register(new Ve({label:Ie,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="411px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(o),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new K.b(this._domNode,this,{orientation:K.a.VERTICAL}),this._resized=!1;var t=411;this._register(this._resizeSash.onDidStart((function(o){t=G.y(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(o){e._resized=!0;var n=t+o.startX-o.currentX;if(!(n<411)){var i=n-xe;n>(parseFloat(G.r(e._domNode).maxWidth)||0)||(e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInputBox.width=i))}})))},t.ID="editor.contrib.findWidget",t}(z.a),Ue=function(e){function t(o){var n=e.call(this)||this;return n._opts=o,n._domNode=document.createElement("div"),n._domNode.className="monaco-checkbox",n._domNode.title=n._opts.title,n._domNode.tabIndex=0,n._checkbox=document.createElement("input"),n._checkbox.type="checkbox",n._checkbox.className="checkbox",n._checkbox.id="checkbox-"+t._COUNTER++,n._checkbox.tabIndex=-1,n._label=document.createElement("label"),n._label.className="label",n._label.htmlFor=n._checkbox.id,n._label.tabIndex=-1,n._domNode.appendChild(n._checkbox),n._domNode.appendChild(n._label),n._opts.parent.appendChild(n._domNode),n.onchange(n._checkbox,(function(e){n._opts.onChange()})),n}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(z.a),Ve=function(e){function t(t){var o=e.call(this)||this;return o._opts=t,o._domNode=document.createElement("div"),o._domNode.title=o._opts.label,o._domNode.tabIndex=0,o._domNode.className="button "+o._opts.className,o._domNode.setAttribute("role","button"),o._domNode.setAttribute("aria-label",o._opts.label),o.onclick(o._domNode,(function(e){o._opts.onTrigger(),e.preventDefault()})),o.onkeydown(o._domNode,(function(e){if(e.equals(10)||e.equals(3))return o._opts.onTrigger(),void e.preventDefault();o._opts.onKeyDown&&o._opts.onKeyDown(e)})),o}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){G.N(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){G.N(this._domNode,e,t)},t}(z.a);Object(_.e)((function(e,t){var o=function(e,o){o&&t.addRule(".monaco-editor "+e+" { background-color: "+o+"; }")};o(".findMatch",e.getColor(m.q)),o(".currentFindMatch",e.getColor(m.o)),o(".findScope",e.getColor(m.s)),o(".find-widget",e.getColor(m.D));var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.r);i&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+i+"; box-sizing: border-box; }");var r=e.getColor(m.p);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(m.t);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(m.e);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var l=e.getColor(m.G);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var u=e.getColor(m.F);if(u)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+u+"; width: 3px !important; margin-left: -4px;}");else{var c=e.getColor(m.E);c&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}")}}));var We=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),je=function(e){function t(t,o,n,i){var r=e.call(this)||this;r._hideSoon=r._register(new l.c((function(){return r._hide()}),2e3)),r._isVisible=!1,r._editor=t,r._state=o,r._keybindingService=n,r._domNode=document.createElement("div"),r._domNode.className="findOptionsWidget",r._domNode.style.display="none",r._domNode.style.top="10px",r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true");var s=i.getTheme().getColor(m.J);return r.caseSensitive=r._register(new ie({appendTitle:r._keybindingLabelFor(I.ToggleCaseSensitiveCommand),isChecked:r._state.matchCase,inputActiveOptionBorder:s})),r._domNode.appendChild(r.caseSensitive.domNode),r._register(r.caseSensitive.onChange((function(){r._state.change({matchCase:r.caseSensitive.checked},!1)}))),r.wholeWords=r._register(new re({appendTitle:r._keybindingLabelFor(I.ToggleWholeWordCommand),isChecked:r._state.wholeWord,inputActiveOptionBorder:s})),r._domNode.appendChild(r.wholeWords.domNode),r._register(r.wholeWords.onChange((function(){r._state.change({wholeWord:r.wholeWords.checked},!1)}))),r.regex=r._register(new se({appendTitle:r._keybindingLabelFor(I.ToggleRegexCommand),isChecked:r._state.isRegex,inputActiveOptionBorder:s})),r._domNode.appendChild(r.regex.domNode),r._register(r.regex.onChange((function(){r._state.change({isRegex:r.regex.checked},!1)}))),r._editor.addOverlayWidget(r),r._register(r._state.onFindReplaceStateChange((function(e){var t=!1;e.isRegex&&(r.regex.checked=r._state.isRegex,t=!0),e.wholeWord&&(r.wholeWords.checked=r._state.wholeWord,t=!0),e.matchCase&&(r.caseSensitive.checked=r._state.matchCase,t=!0),!r._state.isRevealed&&t&&r._revealTemporarily()}))),r._register(G.h(r._domNode,(function(e){return r._onMouseOut()}))),r._register(G.g(r._domNode,"mouseover",(function(e){return r._onMouseOver()}))),r._applyTheme(i.getTheme()),r._register(i.onThemeChange(r._applyTheme.bind(r))),r}return We(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:Y.c.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(z.a);Object(_.e)((function(e,t){var o=e.getColor(m.D);o&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+o+"; }");var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.e);i&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+i+"; }")}));var Ge=o(22),ze=o(38);o.d(t,"getSelectionSearchString",(function(){return qe})),o.d(t,"CommonFindController",(function(){return $e})),o.d(t,"FindController",(function(){return Je})),o.d(t,"StartFindAction",(function(){return Ze})),o.d(t,"StartFindWithSelectionAction",(function(){return Qe})),o.d(t,"MatchFindAction",(function(){return et})),o.d(t,"NextMatchFindAction",(function(){return tt})),o.d(t,"PreviousMatchFindAction",(function(){return ot})),o.d(t,"SelectionMatchFindAction",(function(){return nt})),o.d(t,"NextSelectionMatchFindAction",(function(){return it})),o.d(t,"PreviousSelectionMatchFindAction",(function(){return rt})),o.d(t,"StartFindReplaceAction",(function(){return st}));var Ke=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ye=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xe=function(e,t){return function(o,n){t(o,n,e)}};function qe(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var o=e.getModel().getWordAtPosition(t.getStartPosition());if(o)return o.word}return null}var $e=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=T.bindTo(o),r._storageService=n,r._clipboardService=i,r._updateHistoryDelayer=new l.a(500),r._state=r._register(new x),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange((function(e){return r._onStateChanged(e)}))),r._model=null,r._register(r._editor.onDidChangeModel((function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null,matchCase:r._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})}))),r}return Ke(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,F.c.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,F.c.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,F.c.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t,o={isRevealed:!0};if(e.seedSearchStringFromSelection)(t=qe(this._editor))&&(this._state.isRegex?o.searchString=s.escapeRegExpCharacters(t):o.searchString=t);if(!o.searchString&&e.seedSearchStringFromGlobalClipboard)(t=this.getGlobalBufferTerm())&&(o.searchString=t);e.forceRevealReplace?o.isReplaceRevealed=!0:this._findWidgetVisible.get()||(o.isReplaceRevealed=!1),this._state.change(o,!1),this._model||(this._model=new D(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=Ye([Xe(1,r.e),Xe(2,F.a),Xe(3,H.a)],t)}(i.a),Je=function(e){function t(t,o,n,i,r,s,a){var l=e.call(this,t,n,s,a)||this;return l._contextViewService=o,l._contextKeyService=n,l._keybindingService=i,l._themeService=r,l}return Ke(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new He(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new je(this._editor,this._state,this._keybindingService,this._themeService))},t=Ye([Xe(1,U.b),Xe(2,r.e),Xe(3,V.a),Xe(4,_.c),Xe(5,F.a),Xe(6,Object(Ge.d)(H.a))],t)}($e),Ze=function(e){function t(){return e.call(this,{id:I.StartFindAction,label:n.a("startFindAction","Find"),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(a.b),Qe=function(e){function t(){return e.call(this,{id:I.StartFindWithSelection,label:n.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083},weight:100}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),o.setGlobalBufferTerm(o.getState().searchString))},t}(a.b),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&!this._run(o)&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===o.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(o))},t}(a.b),tt=function(e){function t(){return e.call(this,{id:I.NextMatchFindAction,label:n.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(et),ot=function(e){function t(){return e.call(this,{id:I.PreviousMatchFindAction,label:n.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(et),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);if(o){var n=qe(t);n&&o.setSearchString(n),this._run(o)||(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(o))}},t}(a.b),it=function(e){function t(){return e.call(this,{id:I.NextSelectionMatchFindAction,label:n.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:2109,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(nt),rt=function(e){function t(){return e.call(this,{id:I.PreviousSelectionMatchFindAction,label:n.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:3133,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(nt),st=function(e){function t(){return e.call(this,{id:I.StartFindReplaceAction,label:n.a("startReplace","Replace"),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return Ke(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var o=$e.get(t),n=t.getSelection(),i=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=o.getState().searchString||i?2:1;o&&o.start({forceRevealReplace:!0,seedSearchStringFromSelection:i,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(a.b);Object(a.h)(Je),Object(a.f)(Ze),Object(a.f)(Qe),Object(a.f)(tt),Object(a.f)(ot),Object(a.f)(it),Object(a.f)(rt),Object(a.f)(st);var at=a.c.bindToContribution($e.get);Object(a.g)(new at({id:I.CloseFindWidgetCommand,precondition:T,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:9,secondary:[1033]}})),Object(a.g)(new at({id:I.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),Object(a.g)(new at({id:I.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.g)(new at({id:I.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:N.primary,mac:N.mac,win:N.win,linux:N.linux}})),Object(a.g)(new at({id:I.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:L.primary,mac:L.mac,win:L.win,linux:L.linux}})),Object(a.g)(new at({id:I.ReplaceOneAction,precondition:T,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:3094}})),Object(a.g)(new at({id:I.ReplaceAllAction,precondition:T,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:2563}})),Object(a.g)(new at({id:I.SelectAllMatchesAction,precondition:T,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:515}}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(432);var n,i=o(0),r=o(17),s=o(6),a=o(58),l=o(2),u=o(3),c=o(16),h=o(12),d=o(19),g=o(7),p=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),f=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e,t){return function(o,n){t(o,n,e)}},_=function(e){function t(o,n){var i=e.call(this)||this;return i._messageListeners=[],i._editor=o,i._visible=t.MESSAGE_VISIBLE.bindTo(n),i._register(i._editor.onDidAttemptReadOnlyEdit((function(){return i._onDidAttemptReadOnlyEdit()}))),i}return p(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.showMessage=function(e,t){var o,n=this;Object(a.a)(e),this._visible.set(!0),Object(s.d)(this._messageWidget),this._messageListeners=Object(s.d)(this._messageListeners),this._messageWidget=new v(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeCursorPosition((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidDispose((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeModel((function(){return n.closeMessage()}))),this._messageListeners.push(Object(r.l)((function(){return n.closeMessage()}),3e3)),this._messageListeners.push(this._editor.onMouseMove((function(e){e.target.position&&(o?o.containsPosition(e.target.position)||n.closeMessage():o=new l.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))},t.prototype.closeMessage=function(){this._visible.reset(),this._messageListeners=Object(s.d)(this._messageListeners),this._messageListeners.push(v.fadeOut(this._messageWidget))},t.prototype._onDidAttemptReadOnlyEdit=function(){this.showMessage(i.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())},t._id="editor.contrib.messageController",t.MESSAGE_VISIBLE=new h.f("messageVisible",!1),t=f([m(1,h.e)],t)}(s.a),y=u.c.bindToContribution(_.get);Object(u.g)(new y({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var v=function(){function e(e,t,o){var n=t.lineNumber,i=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(n,n,0),this._position={lineNumber:n,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=o,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,o=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",o)};return t=setTimeout(o,110),e.getDomNode().addEventListener("animationend",o),e.getDomNode().classList.add("fadeOut"),{dispose:o}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[c.a.ABOVE]}},e}();Object(u.h)(_),Object(d.e)((function(e,t){var o=e.getColor(g.Q);if(o){var n=e.type===d.b?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+o+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+n+"px solid "+o+"; }")}var i=e.getColor(g.P);i&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+i+"; }")}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return u})),o.d(t,"b",(function(){return c}));var n,i,r=o(33),s=o(40),a=o(22),l=o(79),u=Object(a.c)("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(n||(n={})),function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&r.a.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(i||(i={}));!function(){function e(e,t,o,n,i){void 0===t&&(t=""),void 0===o&&(o=[]),void 0===n&&(n=null),this._id=e,this._name=t,this._configuration=n,this._ctime=i,this._foldersMap=l.c.forPaths(),this.folders=o}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=l.c.forPaths();for(var e=0,t=this.folders;e ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function o(e){this.tokens=[],this.tokens.links={},this.options=e||v.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=h(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=h(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=h(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=m({},t),t.gfm=m({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=m({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=m({},t.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),o.rules=t,o.lex=function(e,t){return new o(t).lex(e)},o.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},o.prototype.token=function(e,o){var n,i,r,s,a,l,u,c,h,d,g,p,f;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:y(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(o&&(r=this.rules.nptable.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c ?/gm,""),this.token(r,o),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),g=(s=r[2]).length>1,this.tokens.push({type:"list_start",ordered:g,start:g?+s:""}),n=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),i=n||/\n\n(?!\s*$)/.test(l),c!==d-1&&(n="\n"===l.charAt(l.length-1),i||(i=n)),f=void 0,(p=/^\[[ xX]\] /.test(l))&&(f=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:i?"loose_item_start":"list_item_start",task:p,checked:f}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(o&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),h=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:r[2],title:r[3]});else if(o&&(r=this.rules.table.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:f,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function h(e,t){return e=e.source||e,t=t||"",{replace:function(t,o){return o=(o=o.source||o).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,o),this},getRegex:function(){return new RegExp(e,t)}}}function d(e,t){return g[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?g[" "+e]=e+"/":g[" "+e]=y(e,"/",!0)),e=g[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=h(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=h(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=h(i.reflink).replace("label",i._label).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=m({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:h(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:h(i.br).replace("{2,}","*").getRegex(),text:h(i.gfm.text).replace("{2,}","*").getRegex()}),r.rules=i,r.output=function(e,t,o){return new r(t,o).output(e)},r.prototype.output=function(e){for(var t,o,n,i,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),n="@"===s[2]?"mailto:"+(o=u(this.mangle(s[1]))):o=u(s[1]),a+=this.renderer.link(n,null,o);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,n=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n))?(n=t[1],i=t[3]):i="":i=s[3]?s[3].slice(1,-1):"",n=n.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(s,{href:r.escapes(n),title:r.escapes(i)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?n="mailto:"+(o=u(s[0])):(o=u(s[0]),n="www."===s[1]?"http://"+o:o),a+=this.renderer.link(n,null,o);return a},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var o=t.href,n=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(o,n,this.output(e[1])):this.renderer.image(o,n,u(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,o="",n=e.length,i=0;i.5&&(t="x"+t.toString(16)),o+="&#"+t+";";return o},s.prototype.code=function(e,t,o){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(o=!0,e=n)}return t?'
'+(o?e:u(e,!0))+"
\n":"
"+(o?e:u(e,!0))+"
"},s.prototype.blockquote=function(e){return"
\n"+e+"
\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,o){return this.options.headerIds?"'+e+"\n":""+e+"\n"},s.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},s.prototype.list=function(e,t,o){var n=t?"ol":"ul";return"<"+n+(t&&1!==o?' start="'+o+'"':"")+">\n"+e+"\n"},s.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},s.prototype.checkbox=function(e){return" "},s.prototype.paragraph=function(e){return"

    "+e+"

    \n"},s.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},s.prototype.tablerow=function(e){return"\n"+e+"\n"},s.prototype.tablecell=function(e,t){var o=t.header?"th":"td";return(t.align?"<"+o+' align="'+t.align+'">':"<"+o+">")+e+"\n"},s.prototype.strong=function(e){return""+e+""},s.prototype.em=function(e){return""+e+""},s.prototype.codespan=function(e){return""+e+""},s.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},s.prototype.del=function(e){return""+e+""},s.prototype.link=function(e,t,o){if(this.options.sanitize){try{var n=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return o}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return o}this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return o}var i='
    "},s.prototype.image=function(e,t,o){this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));var n=''+o+'":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,o){return""+o},a.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,m({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,o,n,i="",r="";for(o="",e=0;e=0&&"\\"===o[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(o.length>t)o.splice(t);else for(;o.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}f.exec=f,v.options=v.setOptions=function(e){return m(v.defaults,e),v},v.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},v.defaults=v.getDefaults(),v.Parser=l,v.parser=l.parse,v.Renderer=s,v.TextRenderer=a,v.Lexer=o,v.lexer=o.lex,v.InlineLexer=r,v.inlineLexer=r.output,v.parse=v,n=v}).call(void 0);var l=n;n.Parser,n.parser,n.Renderer,n.TextRenderer,n.Lexer,n.lexer,n.InlineLexer,n.inlineLexer,n.parse;function u(e){var t=e.inline?"span":"div",o=document.createElement(t);return e.className&&(o.className=e.className),o}function c(e,t){void 0===t&&(t={});var o=u(t);return o.textContent=e,o}function h(e,t){void 0===t&&(t={});var o=u(t);return function e(t,o,n){var r;if(2===o.type)r=document.createTextNode(o.content);else if(3===o.type)r=document.createElement("b");else if(4===o.type)r=document.createElement("i");else if(5===o.type&&n){var s=document.createElement("a");s.href="#",n.disposeables.push(i.j(s,"click",(function(e){n.callback(String(o.index),e)}))),r=s}else 7===o.type?r=document.createElement("br"):1===o.type&&(r=t);t!==r&&t.appendChild(r);Array.isArray(o.children)&&o.children.forEach((function(t){e(r,t,n)}))}(o,function(e){var t={type:1,children:[]},o=0,n=t,i=[],r=new g(e);for(;!r.eos();){var s=r.next(),a="\\"===s&&0!==p(r.peek());if(a&&(s=r.next()),a||0===p(s)||s!==r.peek())if("\n"===s)2===n.type&&(n=i.pop()),n.children.push({type:7});else if(2!==n.type){var l={type:2,content:s};n.children.push(l),i.push(n),n=l}else n.content+=s;else{r.advance(),2===n.type&&(n=i.pop());var u=p(s);if(n.type===u||5===n.type&&6===u)n=i.pop();else{var c={type:u,children:[]};5===u&&(c.index=o,o++),n.children.push(c),i.push(n),n=c}}}2===n.type&&(n=i.pop());i.length;return t}(e),t.actionHandler),o}function d(e,t){void 0===t&&(t={});var o,n=u(t),c=new Promise((function(e){return o=e})),h=new l.Renderer;h.image=function(e,t,o){var n=[];if(e){var i=e.split("|").map((function(e){return e.trim()}));e=i[0];var r=i[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),l=s&&s[1],u=a&&a[1],c=isFinite(parseInt(u)),h=isFinite(parseInt(l));c&&n.push('width="'+u+'"'),h&&n.push('height="'+l+'"')}}var d=[];return e&&d.push('src="'+e+'"'),o&&d.push('alt="'+o+'"'),t&&d.push('title="'+t+'"'),n.length&&(d=d.concat(n)),""},h.link=function(t,o,n){return t===n&&(n=Object(a.d)(n)),o=Object(a.d)(o),!(t=Object(a.d)(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?n:'
    '+n+""},h.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(h.code=function(e,o){var i=t.codeBlockRenderer(o,e),a=r.b.nextId(),l=Promise.all([i,c]).then((function(e){var t=e[0],o=n.querySelector('div[data-code="'+a+'"]');o&&(o.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&l.then(t.codeBlockRenderCallback),'
    '+Object(s.escape)(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(i.j(n,"click",(function(e){var o=e.target;if("A"===o.tagName||(o=o.parentElement)&&"A"===o.tagName){var n=o.dataset.href;n&&t.actionHandler.callback(n,e)}})));var d={sanitize:!0,renderer:h};return n.innerHTML=l(e.value,d),o(),n}o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return h})),o.d(t,"b",(function(){return d}));var g=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function p(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=function(){function e(e,t,o){this.from=0|e,this.to=0|t,this.colorId=0|o}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId},e}(),i=function(){function e(e,t,o){this.startLineNumber=e,this.endLineNumber=t,this.color=o,this._colorZone=null}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.coloro&&(g=o-p);var f=u.color,m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);var _=new n(g-p,g+p,m);u.setColorZone(_),s.push(_)}return this._colorZonesInvalid=!1,s.sort(n.compare),s},e}()},function(e,t,o){"use strict";for(var n=o(64),i=o(127),r=o(182),s=o(100),a=new Array(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;a[254]=a[254]=1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,o,n,r,s,a=e.length,l=0;for(r=0;r>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,o,i,r,s=e.length,l=new Array(2*s);for(o=0,t=0;t4)l[o++]=65533,t+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&t1?l[o++]=65533:i<65536?l[o++]=i:(i-=65536,l[o++]=55296|i>>10&1023,l[o++]=56320|1023&i)}return l.length!==o&&(l.subarray?l=l.subarray(0,o):l.length=o),n.applyFromCharCode(l)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,s),u.prototype.processChunk=function(e){var o=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var r=o;(o=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),o.set(r,this.leftOver.length)}else o=this.leftOver.concat(o);this.leftOver=null}var s=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+a[e[o]]>t?o:t}(o),l=o;s!==o.length&&(i.uint8array?(l=o.subarray(0,s),this.leftOver=o.subarray(s,o.length)):(l=o.slice(0,s),this.leftOver=o.slice(s,o.length))),this.push({data:t.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=u,n.inherits(c,s),c.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=c},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e}}},function(e,t,o){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},o(332),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,o(80))},function(e,t,o){"use strict";function n(e,t,o){var n=o?" !== ":" === ",i=o?" || ":" && ",r=o?"!":"",s=o?"":"!";switch(e){case"null":return t+n+"null";case"array":return r+"Array.isArray("+t+")";case"object":return"("+r+t+i+"typeof "+t+n+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+i+s+"("+t+" % 1)"+i+t+n+t+")";default:return"typeof "+t+n+'"'+e+'"'}}e.exports={copy:function(e,t){for(var o in t=t||{},e)t[o]=e[o];return t},checkDataType:n,checkDataTypes:function(e,t){switch(e.length){case 1:return n(e[0],t,!0);default:var o="",i=r(e);for(var s in i.array&&i.object&&(o=i.null?"(":"(!"+t+" || ",o+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+n(s,t,!0);return o}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var o=[],n=0;n=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return o[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(r="data"+(t-n||""),!i)return r}for(var a=r,u=i.split("/"),c=0;c0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(109),u=o(101),c=o(522),h=o(523),d=o(138),g=o(524),p=o(152);!function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101));var f,m,_=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e}();!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(f=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(m=t.CloseAction||(t.CloseAction={}));var y,v,b,E=function(){function e(e){this.name=e,this.restarts=[]}return e.prototype.error=function(e,t,o){return o&&o<=3?f.Continue:f.Shutdown},e.prototype.closed=function(){return this.restarts.push(Date.now()),this.restarts.length<5?m.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(l.window.showErrorMessage("The "+this.name+" server crashed 5 times in the last 3 minutes. The server will not be restarted."),m.DoNotRestart):(this.restarts.shift(),m.Restart)},e}();!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(y=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Running=2]="Running"}(v=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(b||(b={}));var C,S=[u.SymbolKind.File,u.SymbolKind.Module,u.SymbolKind.Namespace,u.SymbolKind.Package,u.SymbolKind.Class,u.SymbolKind.Method,u.SymbolKind.Property,u.SymbolKind.Field,u.SymbolKind.Constructor,u.SymbolKind.Enum,u.SymbolKind.Interface,u.SymbolKind.Function,u.SymbolKind.Variable,u.SymbolKind.Constant,u.SymbolKind.String,u.SymbolKind.Number,u.SymbolKind.Boolean,u.SymbolKind.Array,u.SymbolKind.Object,u.SymbolKind.Key,u.SymbolKind.Null,u.SymbolKind.EnumMember,u.SymbolKind.Struct,u.SymbolKind.Event,u.SymbolKind.Operator,u.SymbolKind.TypeParameter],T=[u.CompletionItemKind.Text,u.CompletionItemKind.Method,u.CompletionItemKind.Function,u.CompletionItemKind.Constructor,u.CompletionItemKind.Field,u.CompletionItemKind.Variable,u.CompletionItemKind.Class,u.CompletionItemKind.Interface,u.CompletionItemKind.Module,u.CompletionItemKind.Property,u.CompletionItemKind.Unit,u.CompletionItemKind.Value,u.CompletionItemKind.Enum,u.CompletionItemKind.Keyword,u.CompletionItemKind.Snippet,u.CompletionItemKind.Color,u.CompletionItemKind.File,u.CompletionItemKind.Reference,u.CompletionItemKind.Folder,u.CompletionItemKind.EnumMember,u.CompletionItemKind.Constant,u.CompletionItemKind.Struct,u.CompletionItemKind.Event,u.CompletionItemKind.Operator,u.CompletionItemKind.TypeParameter];function w(e,t){return void 0===e[t]&&(e[t]={}),e[t]}!function(e){e.is=function(e){var t=e;return t&&d.func(t.register)&&d.func(t.unregister)&&d.func(t.dispose)&&void 0!==t.messages}}(C||(C={}));var k=function(){function e(e,t,o,n,i,r){this._client=e,this._event=t,this._type=o,this._middleware=n,this._createParams=i,this._selectorFilter=r,this._selectors=new Map}return e.textDocumentFilter=function(e,t){var o,n;try{for(var i=a(e),r=i.next();!r.done;r=i.next()){var s=r.value;if(l.languages.match(s,t))return!0}}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return!1},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(function(e){return t._client.sendNotification(t._type,t._createParams(e))})):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))},e.prototype.notificationSent=function(e){},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&this._listener.dispose()},e}(),O=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidOpenTextDocument,u.DidOpenTextDocumentNotification.type,t.clientOptions.middleware.didOpen,(function(e){return t.code2ProtocolConverter.asOpenTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidOpenTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.register=function(t,o){var n=this;if(e.prototype.register.call(this,t,o),o.registerOptions.documentSelector){var i=o.registerOptions.documentSelector;l.workspace.textDocuments.forEach((function(e){var t=e.uri.toString();if(!n._syncedDocuments.has(t)&&l.languages.match(i,e)){var o=n._client.clientOptions.middleware,r=function(e){n._client.sendNotification(n._type,n._createParams(e))};o.didOpen?o.didOpen(e,r):r(e),n._syncedDocuments.set(t,e)}}))}},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.set(t.uri.toString(),t)},t}(k),R=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidCloseTextDocument,u.DidCloseTextDocumentNotification.type,t.clientOptions.middleware.didClose,(function(e){return t.code2ProtocolConverter.asCloseTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidCloseTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.delete(t.uri.toString())},t.prototype.unregister=function(t){var o=this,n=this._selectors.get(t);e.prototype.unregister.call(this,t);var i=this._selectors.values();this._syncedDocuments.forEach((function(e){if(l.languages.match(n,e)&&!o._selectorFilter(i,e)){var t=o._client.clientOptions.middleware,r=function(e){o._client.sendNotification(o._type,o._createParams(e))};o._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,r):r(e)}}))},t}(k),N=function(){function e(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeTextDocumentNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&void 0!==o.change&&o.change!==u.TextDocumentSyncKind.None&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:o.change})})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))},e.prototype.callback=function(e){var t,o,n=this;if(0!==e.contentChanges.length){var i=function(t){if(l.languages.match(t.documentSelector,e.document)){var o=r._client.clientOptions.middleware;if(t.syncKind===u.TextDocumentSyncKind.Incremental){var i=r._client.code2ProtocolConverter.asChangeTextDocumentParams(e);o.didChange?o.didChange(e,(function(){return n._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)})):r._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)}else if(t.syncKind===u.TextDocumentSyncKind.Full){var s=function(e){n._changeDelayer?(n._changeDelayer.uri!==e.document.uri.toString()&&(n.forceDelivery(),n._changeDelayer.uri=e.document.uri.toString()),n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(n._changeDelayer={uri:e.document.uri.toString(),delayer:new g.Delayer(200)},n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};o.didChange?o.didChange(e,s):s(e)}}},r=this;try{for(var s=a(this._changeData.values()),c=s.next();!c.done;c=s.next()){i(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}}},e.prototype.unregister=function(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.forceDelivery=function(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}},e}(),L=function(e){function t(t){return e.call(this,t,l.workspace.onWillSaveTextDocument,u.WillSaveTextDocumentNotification.type,t.clientOptions.middleware.willSave,(function(e){return t.code2ProtocolConverter.asWillSaveTextDocumentParams(e)}),(function(e,t){return k.textDocumentFilter(e,t.document)}))||this}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.WillSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSave&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t}(k),I=function(){function e(e){this._client=e,this._selectors=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.WillSaveTextDocumentWaitUntilRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSaveWaitUntil=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSaveWaitUntil&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;if(k.textDocumentFilter(this._selectors.values(),e.document)){var o=this._client.clientOptions.middleware,n=function(e){return t._client.sendRequest(u.WillSaveTextDocumentWaitUntilRequest.type,t._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((function(e){var o=t._client.protocol2CodeConverter.asTextEdits(e);return void 0===o?[]:o}))};e.waitUntil(o.willSaveWaitUntil?o.willSaveWaitUntil(e,n):n(e))}},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e}(),D=function(e){function t(t){var o=e.call(this,t,l.workspace.onDidSaveTextDocument,u.DidSaveTextDocumentNotification.type,t.clientOptions.middleware.didSave,(function(e){return t.code2ProtocolConverter.asSaveTextDocumentParams(e,o._includeText)}),k.textDocumentFilter)||this;return o}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").didSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.save&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!o.save.includeText})})},t.prototype.register=function(t,o){this._includeText=!!o.registerOptions.includeText,e.prototype.register.call(this,t,o)},t}(k),A=function(){function e(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeWatchedFilesNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0},e.prototype.initialize=function(e,t){},e.prototype.register=function(e,t){var o,n;if(Array.isArray(t.registerOptions.watchers)){var i=[];try{for(var r=a(t.registerOptions.watchers),s=r.next();!s.done;s=r.next()){var c=s.value;if(d.string(c.globPattern)){var h=!0,g=!0,p=!0;void 0!==c.kind&&null!==c.kind&&(h=0!=(c.kind&u.WatchKind.Create),g=0!=(c.kind&u.WatchKind.Change),p=0!=(c.kind&u.WatchKind.Delete));var f=l.workspace.createFileSystemWatcher(c.globPattern,!h,!g,!p);this.hookListeners(f,h,g,p),i.push(f)}}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(t.id,i)}},e.prototype.registerRaw=function(e,t){var o,n,i=[];try{for(var r=a(t),s=r.next();!s.done;s=r.next()){var l=s.value;this.hookListeners(l,!0,!0,!0,i)}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(e,i)},e.prototype.hookListeners=function(e,t,o,n,i){var r=this;t&&e.onDidCreate((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Created})}),null,i),o&&e.onDidChange((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Changed})}),null,i),n&&e.onDidDelete((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Deleted})}),null,i)},e.prototype.unregister=function(e){var t,o,n=this._watchers.get(e);if(n)try{for(var i=a(n),r=i.next();!r.done;r=i.next()){r.value.dispose()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}},e.prototype.dispose=function(){this._watchers.forEach((function(e){var t,o;try{for(var n=a(e),i=n.next();!i.done;i=n.next()){i.value.dispose()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}})),this._watchers.clear()},e}(),P=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wrong feature. Requested "+e.method+" but reached feature "+this.messages.method);if(t.registerOptions.documentSelector){var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)}},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}();t.TextDocumentFeature=P;var M=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wron feature. Requested "+e.method+" but reached feature "+this.messages.method);var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}(),x=function(e){function t(t){return e.call(this,t,u.CompletionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:T}},t.prototype.initialize=function(e,t){e.completionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})},t.prototype.registerLanguageProvider=function(e){var t=e.triggerCharacters||[],o=this._client,n=function(e,t,n,i){return o.sendRequest(u.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,(function(e){return o.logFailedRequest(u.CompletionRequest.type,e),Promise.resolve([])}))},i=function(e,t){return o.sendRequest(u.CompletionResolveRequest.type,o.code2ProtocolConverter.asCompletionItem(e),t).then(o.protocol2CodeConverter.asCompletionItem,(function(t){return o.logFailedRequest(u.CompletionResolveRequest.type,t),Promise.resolve(e)}))},r=this._client.clientOptions.middleware;return l.languages.registerCompletionItemProvider.apply(l.languages,s([e.documentSelector,{provideCompletionItems:function(e,t,o,i){return r.provideCompletionItem?r.provideCompletionItem(e,t,i,o,n):n(e,t,i,o)},resolveCompletionItem:e.resolveProvider?function(e,t){return r.resolveCompletionItem?r.resolveCompletionItem(e,t,i):i(e,t)}:void 0}],t))},t}(P),B=function(e){function t(t){return e.call(this,t,u.HoverRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[u.MarkupKind.Markdown,u.MarkupKind.PlainText]},t.prototype.initialize=function(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asHover,(function(e){return t.logFailedRequest(u.HoverRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerHoverProvider(e.documentSelector,{provideHover:function(e,t,i){return n.provideHover?n.provideHover(e,t,i,o):o(e,t,i)}})},t}(P),F=function(e){function t(t){return e.call(this,t,u.SignatureHelpRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText]}},t.prototype.initialize=function(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asSignatureHelp,(function(e){return t.logFailedRequest(u.SignatureHelpRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware,i=e.triggerCharacters||[];return l.languages.registerSignatureHelpProvider.apply(l.languages,s([e.documentSelector,{provideSignatureHelp:function(e,t,i){return n.provideSignatureHelp?n.provideSignatureHelp(e,t,i,o):o(e,t,i)}}],i))},t}(P),H=function(e){function t(t){return e.call(this,t,u.DefinitionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"definition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.DefinitionRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:function(e,t,i){return n.provideDefinition?n.provideDefinition(e,t,i,o):o(e,t,i)}})},t}(P),U=function(e){function t(t){return e.call(this,t,u.ReferencesRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"references").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){return t.sendRequest(u.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,o,n),i).then(t.protocol2CodeConverter.asReferences,(function(e){return t.logFailedRequest(u.ReferencesRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerReferenceProvider(e.documentSelector,{provideReferences:function(e,t,i,r){return n.provideReferences?n.provideReferences(e,t,i,r,o):o(e,t,i,r)}})},t}(P),V=function(e){function t(t){return e.call(this,t,u.DocumentHighlightRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentHighlight").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDocumentHighlights,(function(e){return t.logFailedRequest(u.DocumentHighlightRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:function(e,t,i){return n.provideDocumentHighlights?n.provideDocumentHighlights(e,t,i,o):o(e,t,i)}})},t}(P),W=function(e){function t(t){return e.call(this,t,u.DocumentSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S},t.hierarchicalDocumentSymbolSupport=!0},t.prototype.initialize=function(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),o).then((function(e){if(null!==e){if(0===e.length)return[];var o=e[0];return u.DocumentSymbol.is(o)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}),(function(e){return t.logFailedRequest(u.DocumentSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:function(e,t){return n.provideDocumentSymbols?n.provideDocumentSymbols(e,t,o):o(e,t)}})},t}(P),j=function(e){function t(t){return e.call(this,t,u.WorkspaceSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S}},t.prototype.initialize=function(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:void 0})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.WorkspaceSymbolRequest.type,{query:e},o).then(t.protocol2CodeConverter.asSymbolInformations,(function(e){return t.logFailedRequest(u.WorkspaceSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:function(e,t){return n.provideWorkspaceSymbols?n.provideWorkspaceSymbols(e,t,o):o(e,t)}})},t}(M),G=function(e){function t(t){return e.call(this,t,u.CodeActionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",u.CodeActionKind.QuickFix,u.CodeActionKind.Refactor,u.CodeActionKind.RefactorExtract,u.CodeActionKind.RefactorInline,u.CodeActionKind.RefactorRewrite,u.CodeActionKind.Source,u.CodeActionKind.SourceOrganizeImports]}}},t.prototype.initialize=function(e,t){e.codeActionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),context:t.code2ProtocolConverter.asCodeActionContext(n)};return t.sendRequest(u.CodeActionRequest.type,r,i).then((function(e){var o,n;if(null!==e){var i=[];try{for(var r=a(e),s=r.next();!s.done;s=r.next()){var l=s.value;u.Command.is(l)?i.push(t.protocol2CodeConverter.asCommand(l)):i.push(t.protocol2CodeConverter.asCodeAction(l))}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}}),(function(e){return t.logFailedRequest(u.CodeActionRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:function(e,t,i,r){return n.provideCodeActions?n.provideCodeActions(e,t,i,r,o):o(e,t,i,r)}})},t}(P),z=function(e){function t(t){return e.call(this,t,u.CodeLensRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"codeLens").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),o).then(t.protocol2CodeConverter.asCodeLenses,(function(e){return t.logFailedRequest(u.CodeLensRequest.type,e),Promise.resolve([])}))},n=function(e,o){return t.sendRequest(u.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),o).then(t.protocol2CodeConverter.asCodeLens,(function(o){return t.logFailedRequest(u.CodeLensResolveRequest.type,o),e}))},i=t.clientOptions.middleware;return l.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:function(e,t){return i.provideCodeLenses?i.provideCodeLenses(e,t,o):o(e,t)},resolveCodeLens:e.resolveProvider?function(e,t){return i.resolveCodeLens?i.resolveCodeLens(e,t,n):n(e,t)}:void 0})},t}(P),K=function(e){function t(t){return e.call(this,t,u.DocumentFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"formatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){var i={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(u.DocumentFormattingRequest.type,i,n).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:function(e,t,i){return n.provideDocumentFormattingEdits?n.provideDocumentFormattingEdits(e,t,i,o):o(e,t,i)}})},t}(P),Y=function(e){function t(t){return e.call(this,t,u.DocumentRangeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(u.DocumentRangeFormattingRequest.type,r,i).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentRangeFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:function(e,t,i,r){return n.provideDocumentRangeFormattingEdits?n.provideDocumentRangeFormattingEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),X=function(e){function t(t){return e.call(this,t,u.DocumentOnTypeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=e.moreTriggerCharacter||[],n=function(e,o,n,i,r){var s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),ch:n,options:t.code2ProtocolConverter.asFormattingOptions(i)};return t.sendRequest(u.DocumentOnTypeFormattingRequest.type,s,r).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerOnTypeFormattingEditProvider.apply(l.languages,s([e.documentSelector,{provideOnTypeFormattingEdits:function(e,t,o,r,s){return i.provideOnTypeFormattingEdits?i.provideOnTypeFormattingEdits(e,t,o,r,s,n):n(e,t,o,r,s)}},e.firstTriggerCharacter],o))},t}(P),q=function(e){function t(t){return e.call(this,t,u.RenameRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rename").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.renameProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),newName:n};return t.sendRequest(u.RenameRequest.type,r,i).then(t.protocol2CodeConverter.asWorkspaceEdit,(function(e){return t.logFailedRequest(u.RenameRequest.type,e),Promise.reject(new Error(e.message))}))},n=t.clientOptions.middleware;return l.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:function(e,t,i,r){return n.provideRenameEdits?n.provideRenameEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),$=function(e){function t(t){return e.call(this,t,u.DocumentLinkRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentLink").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),o).then(t.protocol2CodeConverter.asDocumentLinks,(function(e){t.logFailedRequest(u.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))}))},n=function(e,o){return t.sendRequest(u.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),o).then(t.protocol2CodeConverter.asDocumentLink,(function(e){t.logFailedRequest(u.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))}))},i=t.clientOptions.middleware;return l.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:function(e,t){return i.provideDocumentLinks?i.provideDocumentLinks(e,t,o):o(e,t)},resolveDocumentLink:e.resolveProvider?function(e,t){return i.resolveDocumentLink?i.resolveDocumentLink(e,t,n):n(e,t)}:void 0})},t}(P),J=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeConfigurationNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0},e.prototype.initialize=function(){var e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{section:e}})},e.prototype.register=function(e,t){var o=this,n=l.workspace.onDidChangeConfiguration((function(e){o.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)},e.prototype.unregister=function(e){var t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var o=a(this._listeners.values()),n=o.next();!n.done;n=o.next()){n.value.dispose()}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.onDidChangeConfiguration=function(e,t){var o,n=this;if(void 0!==(o=d.string(e)?[e]:e)&&void 0!==t&&!o.some((function(e){return t.affectsConfiguration(e)})))return;var i=function(e){void 0!==e?n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:n.extractSettingsInformation(e)}):n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:null})},r=this.getMiddleware();r?r(o,i):i(o)},e.prototype.extractSettingsInformation=function(e){function t(e,t){for(var o=e,n=0;n=0?l.workspace.getConfiguration(r.substr(0,s),o).get(r.substr(s+1)):l.workspace.getConfiguration(r,o)){var u=e[i].split(".");t(n,u)[u[u.length-1]]=a}}return n},e.prototype.getMiddleware=function(){var e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0},e}(),Z=function(){function e(e){this._client=e,this._commands=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.ExecuteCommandRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"executeCommand").dynamicRegistration=!0},e.prototype.initialize=function(e){e.executeCommandProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})},e.prototype.register=function(e,t){var o,n,i=this._client;if(t.registerOptions.commands){var r=[],s=function(e){r.push(l.commands.registerCommand(e,(function(){for(var t=[],o=0;o=0){var h=i.get(c.textDocument.uri);if(h&&h.version!==c.textDocument.version){r=!0;break}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return r?Promise.resolve({applied:!1}):l.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((function(e){return{applied:e}}))},t.prototype.logFailedRequest=function(e,t){t instanceof u.ResponseError&&t.code===u.ErrorCodes.RequestCancelled||this.error("Request "+e.method+" failed.",t)},t}();t.BaseLanguageClient=Q}).call(this,o(108))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),s=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return i(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(r);function a(){return new s}t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=a;var l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e){return l.test(e)}t.isUUID=u,t.parse=function(e){if(!u(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return a().asHex()}},function(e,t,o){"use strict";o.r(t),o.d(t,"ToggleTabFocusModeAction",(function(){return l}));var n,i=o(0),r=o(3),s=o(131),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:t.ID,label:i.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return a(t,e),t.prototype.run=function(e,t){var o=s.b.getTabFocusMode();s.b.setTabFocusMode(!o)},t.ID="editor.action.toggleTabFocusMode",t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t),o.d(t,"DefinitionActionConfig",(function(){return C})),o.d(t,"DefinitionAction",(function(){return S})),o.d(t,"GoToDefinitionAction",(function(){return w})),o.d(t,"OpenDefinitionToSideAction",(function(){return k})),o.d(t,"PeekDefinitionAction",(function(){return O})),o.d(t,"ImplementationAction",(function(){return R})),o.d(t,"GoToImplementationAction",(function(){return N})),o.d(t,"PeekImplementationAction",(function(){return L})),o.d(t,"TypeDefinitionAction",(function(){return I})),o.d(t,"GoToTypeDefinitionAction",(function(){return D})),o.d(t,"PeekTypeDefinitionAction",(function(){return A}));var n,i=o(0),r=o(58),s=o(39),a=o(15),l=o(36),u=o(2),c=o(3),h=o(164),d=o(99),g=o(56),p=o(113),f=o(12),m=o(142),_=o(5),y=o(129),v=o(45),b=o(17),E=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),C=function(e,t,o,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===o&&(o=!0),void 0===n&&(n=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=o,this.showMessage=n},S=function(e){function t(t,o){var n=e.call(this,o)||this;return n._configuration=t,n}return E(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(v.a),i=e.get(l.a),r=e.get(y.a),s=t.getModel(),a=t.getPosition(),c=this._getDeclarationsAtPosition(s,a).then((function(e){if(!s.isDisposed()&&t.getModel()===s){for(var n=-1,r=[],l=0;l1&&i.a("meta.title"," – {0} definitions",e.references.length)},t.prototype._onResult=function(e,t,o){var n=this,i=o.getAriaMessage();if(Object(r.a)(i),this._configuration.openInPeek)this._openInPeek(e,t,o);else{var s=o.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,s,this._configuration.openToSide).then((function(t){t&&o.references.length>1?n._openInPeek(e,t,o):o.dispose()}))}},t.prototype._openReference=function(e,t,o,n){var i=o.uri,r=o.range;return t.openCodeEditor({resource:i,options:{selection:u.a.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,n)},t.prototype._openInPeek=function(e,t,o){var n=this,i=d.a.get(t);i?i.toggleWidget(t.getSelection(),Object(b.i)((function(e){return Promise.resolve(o)})),{getMetaTitle:function(e){return n._getMetaTitle(e)},onGoto:function(o){return i.closeWidget(),n._openReference(t,e,o,!1)}}):o.dispose()},t}(c.b),T=a.f?2118:70,w=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:T,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return E(t,e),t.ID="editor.action.goToDeclaration",t}(S),k=function(e){function t(){return e.call(this,new C(!0),{id:t.ID,label:i.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:Object(s.a)(2089,T),weight:100}})||this}return E(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(S),O=function(e){function t(){return e.call(this,new C(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:i.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:f.d.and(_.a.hasDefinitionProvider,p.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return E(t,e),t}(S),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.b)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):i.a("goToImplementation.generic.noResults","No implementation found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.implementations.title"," – {0} implementations",e.references.length)},t}(S),N=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToImplementation.label","Go to Implementation"),alias:"Go to Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:2118,weight:100}})||this}return E(t,e),t.ID="editor.action.goToImplementation",t}(R),L=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekImplementation.label","Peek Implementation"),alias:"Peek Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:3142,weight:100}})||this}return E(t,e),t.ID="editor.action.peekImplementation",t}(R),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.c)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):i.a("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.typeDefinitions.title"," – {0} type definitions",e.references.length)},t}(S),D=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return E(t,e),t.ID="editor.action.goToTypeDefinition",t}(I),A=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100}})||this}return E(t,e),t.ID="editor.action.peekTypeDefinition",t}(I);Object(c.f)(w),Object(c.f)(k),Object(c.f)(O),Object(c.f)(N),Object(c.f)(L),Object(c.f)(D),Object(c.f)(A)},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}));var n=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}(),i=new n("id#")},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("IWorkspaceEditService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return f}));var n,i=o(30),r=o(22),s=o(37),a=o(12),l=o(36),u=o(140),c=o(19),h=o(45),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a,l,u){var c=e.call(this,t,n.getRawConfiguration(),{},i,r,s,a,l,u)||this;return c._parentEditor=n,c._overwriteOptions=o,e.prototype.updateOptions.call(c,c._overwriteOptions),c._register(n.onDidChangeConfiguration((function(e){return c._onParentConfigurationChanged(e)}))),c}return d(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){i.g(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=g([p(3,r.a),p(4,l.a),p(5,s.b),p(6,a.e),p(7,c.c),p(8,h.a)],t)}(u.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(92),i=function(e,t){this.index=e,this.remainder=t},r=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=Object(n.b)(e);var o=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(o.length+r),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=Object(n.b)(e),t=Object(n.b)(t),this.values[e]!==t&&(this.values[e]=t,e-1=o.length)return!1;var r=o.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(o.length-t),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=Object(n.b)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var o=t;o<=e;o++)this.prefixSum[o]=this.prefixSum[o-1]+this.values[o];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,o,n,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,e<(n=(o=this.prefixSum[t])-this.values[t]))s=t-1;else{if(!(e>=o))break;r=t+1}return new i(t,e-n)},e}(),s=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new r(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var o=0;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},g=function(e,t){return function(o,n){t(o,n,e)}},p=function(){function e(e,t,o){void 0===o&&(o=i.b),this._editor=e,this._modeService=t,this._openerService=o,this._onDidRenderCodeBlock=new c.a,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,o){var n=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(n).then((function(e){return Object(l.b)(o,n)})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(s.a.parse(e)).then(void 0,a.e)},disposeables:e}}},e.prototype.render=function(e){var t=[];return{element:e?Object(n.b)(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return Object(h.d)(t)}}},e=d([g(1,r.a),g(2,Object(u.d)(i.a))],e)}()},function(e,t,o){"use strict";o(474);var n,i,r=o(0),s=o(10),a=o(15),l=o(21),u=o(13),c=o(97),h=function(){function e(e){this.modelProvider=Object(l.e)(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var o=this.modelProvider.getModel();return o===t?"__root__":o.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var o=this.modelProvider.getModel();return o&&o===t&&o.entries.length>0},e.prototype.getChildren=function(e,t){var o=this.modelProvider.getModel();return s.b.as(o===t?o.entries:[])},e.prototype.getParent=function(e,t){return s.b.as(null)},e}(),d=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var o=this.modelProvider.getModel();return o.accessibilityProvider&&o.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var o=this.modelProvider.getModel();return String(o.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}(),g=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var o=this.modelProvider.getModel();return!o.filter||o.filter.isVisible(t)},e}(),p=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,o){return this.modelProvider.getModel().renderer.renderTemplate(t,o,this.styles)},e.prototype.renderElement=function(e,t,o,n){this.modelProvider.getModel().renderer.renderElement(t,o,n,this.styles)},e.prototype.disposeTemplate=function(e,t,o){this.modelProvider.getModel().renderer.disposeTemplate(t,o)},e}(),f=o(34),m=o(162),_=o(210),y=(o(475),o(1)),v=o(6),b=o(14),E=o(30),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S={progressBarBackground:b.a.fromHex("#0E70C0")},T=function(e){function t(t,o){var n=e.call(this)||this;return n.options=o||Object.create(null),Object(E.g)(n.options,S,!1),n.workedVal=0,n.progressBarBackground=n.options.progressBarBackground,n.create(t),n}return C(t,e),t.prototype.create=function(e){var t=this;Object(f.a)(e).div({class:"monaco-progress-container"},(function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([y.d.ANIMATION_START,y.d.ANIMATION_END,y.d.ANIMATION_ITERATION],(function(e){switch(e.type){case y.d.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}}),t.toDispose),t.bit=e.getHTMLElement()})),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass("infinite"),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass("infinite")?(this.bit.style.opacity="0",e?s.b.timeout(200).then((function(){return t.off()})):this.off()):(this.bit.style.width="inherit",e?s.b.timeout(200).then((function(){return t.off()})):this.off()),this},t.prototype.hide=function(){this.element.hide()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(v.a),w=o(51),k=o(75),O=o(42),R=o(41),N=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.onContextMenu=function(t,o,n){return a.d?this.onLeftClick(t,o,n):e.prototype.onContextMenu.call(this,t,o,n)},t}(k.c);!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(i||(i={}));var I={background:b.a.fromHex("#1E1E1E"),foreground:b.a.fromHex("#CCCCCC"),pickerGroupForeground:b.a.fromHex("#0097FB"),pickerGroupBorder:b.a.fromHex("#3F3F46"),widgetShadow:b.a.fromHex("#000000"),progressBarBackground:b.a.fromHex("#0E70C0")},D=r.a("quickOpenAriaLabel","Quick picker. Type to narrow down results."),A=function(e){function t(t,o,n){var i=e.call(this)||this;return i.isDisposed=!1,i.container=t,i.callbacks=o,i.options=n,i.styles=n||Object.create(null),Object(E.g)(i.styles,I,!1),i.model=null,i}return N(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=Object(f.a)().div((function(t){t.on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);if(9===o.keyCode)y.c.stop(t,!0),e.hide(i.CANCELED);else if(2===o.keyCode&&!o.altKey&&!o.ctrlKey&&!o.metaKey){var n=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");o.shiftKey&&o.target===n[0]?(y.c.stop(t,!0),n[n.length-1].focus()):o.shiftKey||o.target!==n[n.length-1]||(y.c.stop(t,!0),n[0].focus())}})).on(y.d.CONTEXT_MENU,(function(e){return y.c.stop(e,!0)})).on(y.d.FOCUS,(function(t){return e.gainingFocus()}),null,!0).on(y.d.BLUR,(function(t){return e.loosingFocus(t)}),null,!0),e.progressBar=e._register(new T(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},(function(t){e.inputContainer=t,e.inputBox=e._register(new m.b(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:D,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),y.g(e.inputBox.inputElement,y.d.KEY_DOWN,(function(t){var o=new w.a(t),n=e.shouldOpenInBackground(o);if(2!==o.keyCode)if(18===o.keyCode||16===o.keyCode||12===o.keyCode||11===o.keyCode)y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===o.keyCode||n){y.c.stop(t,!0);var i=e.tree.getFocus();i&&e.elementSelected(i,t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})),y.g(e.inputBox.inputElement,y.d.INPUT,(function(t){e.onType()}))})),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},(function(t){var o=e.options.treeCreator||function(e,t,o){return new _.a(e,t,o)};e.tree=e._register(o(t.getHTMLElement(),{dataSource:new h(e),controller:new L({clickBehavior:k.a.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new p(e,e.styles),filter:new g(e),accessibilityProvider:new d(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:O.b.Visible,horizontalScrollMode:O.b.Hidden,ariaLabel:r.a("treeAriaLabel","Quick Picker"),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(),e._register(e.tree.onDidChangeFocus((function(t){e.elementFocused(t.focus,t)}))),e._register(e.tree.onDidChangeSelection((function(t){if(t.selection&&t.selection.length>0){var o=t.payload&&t.payload.originalEvent instanceof R.b?t.payload.originalEvent:void 0,n=!!o&&e.shouldOpenInBackground(o);e.elementSelected(t.selection[0],t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})))})).on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration&&(18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode)))})).on(y.d.KEY_UP,(function(t){var o=new w.a(t),n=o.keyCode;if(e.quickNavigateConfiguration){var i=e.quickNavigateConfiguration.keybindings;if(3===n||i.some((function(e){var t=e.getParts(),i=t[0];return!t[1]&&(i.shiftKey&&4===n?!(o.ctrlKey||o.altKey||o.metaKey):!(!i.altKey||6!==n)||(!(!i.ctrlKey||5!==n)||!(!i.metaKey||57!==n)))}))){var r=e.tree.getFocus();r&&e.elementSelected(r,t)}}})).clone()})).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),y.g(this.treeContainer.getHTMLElement(),y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration||18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.treeElement.focus())})),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,o=this.styles.borderColor?this.styles.borderColor.toString():null,n=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",o),this.builder.style("border-width",o?"1px":null),this.builder.style("border-style",o?"solid":null),this.builder.style("box-shadow",n?"0 5px 8px "+n:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){if(e instanceof w.a){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.prototype.navigateInTree=function(e,t){var o=this.tree.getInput(),n=o?o.entries:[],i=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();n.length>1&&i===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,u.e)},t.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var o={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,c.a.PREVIEW,o)}},t.prototype.elementSelected=function(e,t,o){var n=!0;if(this.isVisible()){var r=o||c.a.OPEN,s={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};n=this.model.runner.run(e,r,s)}n&&this.hide(i.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||l.h(e)?this.helpText.hide():this.helpText.show()),l.h(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.prototype.setInputAndLayout=function(e,t){var o=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then((function(){return o.model=e,o.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),o.tree.setInput(e)})).done((function(){o.tree.layout();var n=e?e.entries.filter((function(t){return o.isElementVisible(e,t)})):[];o.updateResultCount(n.length),n.length&&o.autoFocus(e,n,t)}),u.e)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,o){if(void 0===o&&(o={}),o.autoFocusPrefixMatch){for(var n=void 0,i=void 0,r=o.autoFocusPrefixMatch,s=r.toLowerCase(),a=0;ao.autoFocusIndex&&(this.tree.focusNth(o.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,u.e)):o.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):o.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var o=this,n=e.renderer;if(!e){var i=n.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*i:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter((function(t){return o.isElementVisible(e,t)})),l=this.options.maxItemsToShow||a.length,u=0;u=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},j=function(e,t){return function(o,n){t(o,n,e)}},G=function(){function e(e,t){this.themeService=t,this.editor=e}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.widget&&(this.widget.destroy(),this.widget=null)},e.prototype.run=function(e){var t=this;this.widget&&(this.widget.destroy(),this.widget=null);var o=function(e){t.clearDecorations(),e&&t.lastKnownEditorSelection&&(t.editor.setSelection(t.lastKnownEditorSelection),t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection,0)),t.lastKnownEditorSelection=null,t.editor.focus()};this.widget=new B(this.editor,(function(){return o(!1)}),(function(){return o(!0)}),(function(o){t.widget.setInput(e.getModel(o),e.getAutoFocus(o))}),{inputAriaLabel:e.inputAriaLabel},this.themeService),this.lastKnownEditorSelection||(this.lastKnownEditorSelection=this.editor.getSelection()),this.widget.show("")},e.prototype.decorateLine=function(t,o){var n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId),this.rangeHighlightDecorationId=null);var i=[{range:t,options:e._RANGE_HIGHLIGHT_DECORATION}],r=o.deltaDecorations(n,i);this.rangeHighlightDecorationId=r[0]},e.prototype.clearDecorations=function(){this.rangeHighlightDecorationId&&(this.editor.deltaDecorations([this.rangeHighlightDecorationId],[]),this.rangeHighlightDecorationId=null)},e.ID="editor.controller.quickOpenController",e._RANGE_HIGHLIGHT_DECORATION=U.a.register({className:"rangeHighlight",isWholeLine:!0}),e=W([j(1,H.c)],e)}(),z=function(e){function t(t,o){var n=e.call(this,o)||this;return n._inputAriaLabel=t,n}return V(t,e),t.prototype.getController=function(e){return G.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(F.b);Object(F.h)(G)},function(e,t,o){"use strict";o(440);var n=o(0),i=o(24),r=o(1),s=o(144),a=o(58),l=o(74),u=o(203),c=o(4),h=o(59),d=o(14),g=o(30),p=o(112),f=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new p.b(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},e.prototype._initialize=function(e){this._history=new Set;for(var t=0,o=e;t0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=function(){function e(e,t,o){void 0===o&&(o=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=o,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,o,n,i){var r=this.ComputeDiffRecursive(e,t,o,n,[!1]);return i?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,o,i,r){for(r[0]=!1;e<=t&&o<=i&&this.ElementsAreEqual(e,o);)e++,o++;for(;t>=e&&i>=o&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||o>i){var a=void 0;return o<=i?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n(e,0,o,i-o+1)]):e<=t?(s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n(e,t-e+1,o,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var l=[0],u=[0],c=this.ComputeRecursionPoint(e,t,o,i,l,u,r),h=l[0],d=u[0];if(null!==c)return c;if(!r[0]){var g=this.ComputeDiffRecursive(e,h,o,d,r),p=[];return p=r[0]?[new n(h+1,t-(h+1)+1,d+1,i-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,i,r),this.ConcatenateChanges(g,p)}return[new n(e,t-e+1,o,i-o+1)]},e.prototype.WALKTRACE=function(e,t,o,i,r,s,a,u,c,h,d,g,p,f,m,_,y,v){var b,E,C=null,S=new l,T=t,w=o,k=p[0]-_[0]-i,O=Number.MIN_VALUE,R=this.m_forwardHistory.length-1;do{(E=k+e)===T||E=0&&(e=(c=this.m_forwardHistory[R])[0],T=1,w=c.length-1)}while(--R>=-1);if(b=S.getReverseChanges(),v[0]){var N=p[0]+1,L=_[0]+1;if(null!==b&&b.length>0){var I=b[b.length-1];N=Math.max(N,I.getOriginalEnd()),L=Math.max(L,I.getModifiedEnd())}C=[new n(N,g-N+1,L,m-L+1)]}else{S=new l,T=s,w=a,k=p[0]-_[0]-u,O=Number.MAX_VALUE,R=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(E=k+r)===T||E=h[E+1]?(f=(d=h[E+1]-1)-k-u,d>O&&S.MarkNextChange(),O=d+1,S.AddOriginalElement(d+1,f+1),k=E+1-r):(f=(d=h[E-1])-k-u,d>O&&S.MarkNextChange(),O=d,S.AddModifiedElement(d+1,f+1),k=E-1-r),R>=0&&(r=(h=this.m_reverseHistory[R])[0],T=1,w=h.length-1)}while(--R>=-1);C=S.getChanges()}return this.ConcatenateChanges(b,C)},e.prototype.ComputeRecursionPoint=function(e,t,o,i,r,s,l){var u,c,h,d=0,g=0,p=0,f=0;e--,o--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m,_,y=t-e+(i-o),v=y+1,b=new Array(v),E=new Array(v),C=i-o,S=t-e,T=e-o,w=t-i,k=(S-C)%2==0;for(b[C]=e,E[S]=t,l[0]=!1,h=1;h<=y/2+1;h++){var O=0,R=0;for(d=this.ClipDiagonalBound(C-h,h,C,v),g=this.ClipDiagonalBound(C+h,h,C,v),m=d;m<=g;m+=2){for(c=(u=m===d||mO+R&&(O=u,R=c),!k&&Math.abs(m-S)<=h-1&&u>=E[m])return r[0]=u,s[0]=c,_<=E[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}var N=(O-e+(R-o)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(O,this.OriginalSequence,N))return l[0]=!0,r[0]=O,s[0]=R,N>0&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):[new n(++e,t-e+1,++o,i-o+1)];for(p=this.ClipDiagonalBound(S-h,h,S,v),f=this.ClipDiagonalBound(S+h,h,S,v),m=p;m<=f;m+=2){for(c=(u=m===p||m=E[m+1]?E[m+1]-1:E[m-1])-(m-S)-w,_=u;u>e&&c>o&&this.ElementsAreEqual(u,c);)u--,c--;if(E[m]=u,k&&Math.abs(m-C)<=h&&u<=b[m])return r[0]=u,s[0]=c,_>=b[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}if(h<=1447){var L=new Array(g-d+2);L[0]=C-d+1,a.Copy(b,d,L,1,g-d+1),this.m_forwardHistory.push(L),(L=new Array(f-p+2))[0]=S-p+1,a.Copy(E,p,L,1,f-p+1),this.m_reverseHistory.push(L)}}return this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var o=0;o0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;o--){n=e[o],i=0,r=0;if(o>0){var c=e[o-1];c.originalLength>0&&(i=c.originalStart+c.originalLength),c.modifiedLength>0&&(r=c.modifiedStart+c.modifiedLength)}s=n.originalLength>0,a=n.modifiedLength>0;for(var h=0,d=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),g=1;;g++){var p=n.originalStart-g,f=n.modifiedStart-g;if(pd&&(d=m,h=g)}n.originalStart-=h,n.modifiedStart-=h}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var o=e+t;if(this._OriginalIsBoundary(o-1)||this._OriginalIsBoundary(o))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var o=e+t;if(this._ModifiedIsBoundary(o-1)||this._ModifiedIsBoundary(o))return!0}return!1},e.prototype._boundaryScore=function(e,t,o,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(o,n)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var o=[],n=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],o)?(n=new Array(e.length+t.length-1),a.Copy(e,0,n,0,e.length-1),n[e.length-1]=o[0],a.Copy(t,1,n,e.length,t.length-1),n):(n=new Array(e.length+t.length),a.Copy(e,0,n,0,e.length),a.Copy(t,0,n,e.length,t.length),n)},e.prototype.ChangesOverlap=function(e,t,o){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),s.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,r=e.originalLength,a=e.modifiedStart,l=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(l=t.modifiedStart+t.modifiedLength-e.modifiedStart),o[0]=new n(i,r,a,l),!0}return o[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,o,n){if(e>=0&&e1,p=void 0;if(p=Object(l.c)(u.uri,e,!a.c)?"":Object(i.h)(Object(r.ltrim)(e.path.substr(u.uri.path.length),i.i),!0),c){var f=u&&u.name?u.name:Object(i.a)(u.uri.fsPath);p=p?f+" • "+p:f}return p}if(e.scheme!==s.a.file&&e.scheme!==s.a.untitled)return e.with({query:null,fragment:null}).toString(!0);if(h(e.fsPath))return Object(i.h)(d(e.fsPath),!0);var m=Object(i.h)(e.fsPath,!0);return!a.g&&t&&(m=function(e,t){if(a.g||!e||!t)return e;var o=g.original===t?g.normalized:void 0;o||(o=""+Object(r.rtrim)(t,i.i)+i.i,g={original:t,normalized:o});(a.c?Object(r.startsWith)(e,o):Object(r.startsWithIgnoreCase)(e,o))&&(e="~/"+e.substr(o.length));return e}(m,t.userHome)),m}function c(e){if(!e)return null;"string"==typeof e&&(e=n.a.file(e));var t=Object(i.a)(e.path)||(e.scheme===s.a.file?e.fsPath:e.path);return h(t)?d(t):t}function h(e){return a.g&&e&&":"===e[1]}function d(e){return h(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var g=Object.create(null)},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(185)),n(o(121)),n(o(518)),n(o(519)),n(o(311)),n(o(312)),n(o(313)),n(o(314)),n(o(532)),n(o(315))},function(e,t,o){(function(e){function o(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===o(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===o(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===o(e)},t.isError=function(e){return"[object Error]"===o(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,o(120).Buffer)},function(e,t,o){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:o(340),e.exports={Promise:n}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function r(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=r,t.stringArray=function(e){return r(e)&&e.every((function(e){return i(e)}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var n=function(){function e(){}return e.prototype.add=function(e,t,o){var n=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:function(){return n.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;nn(e))}},function(e,t,o){"use strict";o.r(t);var n=o(14);function i(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(o=e,n=r(104579,n=t),o.reduce((function(e,t){return i(t,e)}),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce((function(t,o){return t=s(o,t),i(e[o],t)}),t)}(e,t);case"string":return s(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(e,937);default:return r(e,617)}var o,n}function r(e,t){return(t<<5)-t+e|0}function s(e,t){t=r(149417,t);for(var o=0,n=e.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o){var n=this;this._editor=e,this._codeEditorService=t,this._configurationService=o,this._globalToDispose=[],this._localToDispose=[],this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes={},this._globalToDispose.push(e.onDidChangeModel((function(e){n._isEnabled=n.isEnabled(),n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),this._globalToDispose.push(c.d.onDidChange((function(e){return n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n.isEnabled(),t!==n._isEnabled&&(n._isEnabled?n.onModelChanged():n.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}return e.prototype.isEnabled=function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),o=this._configurationService.getValue(t.language);if(o){var n=o.colorDecorators;if(n&&void 0!==n.enable&&!n.enable)return n.enable}return this._editor.getConfiguration().contribInfo.colorDecorators},e.prototype.getId=function(){return e.ID},e.get=function(e){return e.getContribution(this.ID)},e.prototype.dispose=function(){this.stop(),this.removeAllDecorations(),this._globalToDispose=Object(a.d)(this._globalToDispose)},e.prototype.onModelChanged=function(){var t=this;if(this.stop(),this._isEnabled){var o=this._editor.getModel();c.d.has(o)&&(this._localToDispose.push(this._editor.onDidChangeModelContent((function(o){t._timeoutTimer||(t._timeoutTimer=new f.f,t._timeoutTimer.cancelAndSet((function(){t._timeoutTimer=null,t.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}},e.prototype.beginCompute=function(){var e=this;this._computePromise=Object(f.i)((function(t){return Object(d.b)(e._editor.getModel(),t)})),this._computePromise.then((function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null}),m.e)},e.prototype.stop=function(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose=Object(a.d)(this._localToDispose)},e.prototype.updateDecorations=function(e){var t=this,o=e.map((function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.a.EMPTY}}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,o),this._colorDatas=new Map,this._decorationsIds.forEach((function(o,n){return t._colorDatas.set(o,e[n])}))},e.prototype.updateColorDecorators=function(e){for(var t=[],o={},r=0;r1){var m=o.getLineContent(f.lineNumber),_=a.firstNonWhitespaceIndex(m),y=-1===_?m.length+1:_+1;if(f.column<=y){var v=i.a.visibleColumnFromColumn2(t,o,f),b=i.a.prevTabStop(v,t.tabSize),E=i.a.columnFromVisibleColumn2(t,o,f.lineNumber,b);p=new r.a(f.lineNumber,E,f.lineNumber,f.column)}else p=new r.a(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var C=s.a.left(t,o,f.lineNumber,f.column);p=new r.a(C.lineNumber,C.column,f.lineNumber,f.column)}}p.isEmpty()?u[h]=null:(p.startLineNumber!==p.endLineNumber&&(c=!0),u[h]=new n.a(p,""))}return[c,u]},e.cut=function(e,t,o){for(var s=[],a=0,l=o.length;a1?(h=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber)):(h=c.lineNumber,d=1,g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber));var f=new r.a(h,d,g,p);f.isEmpty()?s[a]=null:s[a]=new n.a(f,"")}else s[a]=null;else s[a]=new n.a(u,"")}return new i.e(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("clipboardService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"c",(function(){return s})),o.d(t,"b",(function(){return a}));var n=o(40),i=o(8);function r(e){return n.a(e.path)||e.authority}function s(e,t,o){return!(e!==t)||!(!e||!t)&&(o?Object(i.equalsIgnoreCase)(e.toString(),t.toString()):e.toString()===t.toString())}function a(e){var t=n.b(e.path);return e.authority&&t&&!n.d(t)?null:e.with({path:t})}},function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"a",(function(){return s}));var n=o(0),i=function(){function e(e,t,o){void 0===o&&(o=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=o}return e.prototype.toLabel=function(e,t,o,n,i){return null===t&&null===n?null:function(e,t,o,n,i){var r=a(e,t,i);null!==n&&(r+=" ",r+=a(o,n,i));return r}(e,t,o,n,this.modifierLabels[i])},e}(),r=new i({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),s=new i({ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function a(e,t,o){if(null===t)return"";var n=[];return e.ctrlKey&&n.push(o.ctrlKey),e.shiftKey&&n.push(o.shiftKey),e.altKey&&n.push(o.altKey),e.metaKey&&n.push(o.metaKey),n.push(t),n.join(o.separator)}},function(e,t,o){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,o,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,o)}));case 3:return t.nextTick((function(){e.call(null,o,n)}));case 4:return t.nextTick((function(){e.call(null,o,n,i)}));default:for(r=new Array(a-1),s=0;s=o.length)o.copy(this.buffer,this.index,0,o.length);else{var r=(Math.ceil((this.index+o.length)/a)+1)*a;0===this.index?(this.buffer=new e(r),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],r)}this.index+=o.length},t.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");var n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i}));var o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e},t.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(a);t.IPCMessageWriter=u;var c=function(t){function o(e,o){void 0===o&&(o="utf8");var n=t.call(this)||this;return n.socket=e,n.queue=[],n.sending=!1,n.encoding=o,n.errorCount=0,n.socket.on("error",(function(e){return n.fireError(e)})),n.socket.on("close",(function(){return n.fireClose()})),n}return i(o,t),o.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},o.prototype.doWriteMessage=function(t){var o=this,n=JSON.stringify(t),i=["Content-Length: ",e.byteLength(n,this.encoding).toString(),"\r\n","\r\n"];try{this.sending=!0,this.socket.write(i.join(""),"ascii",(function(e){e&&o.handleError(e,t);try{o.socket.write(n,o.encoding,(function(e){o.sending=!1,e?o.handleError(e,t):o.errorCount=0,o.queue.length>0&&o.doWriteMessage(o.queue.shift())}))}catch(e){o.handleError(e,t)}}))}catch(e){this.handleError(e,t)}},o.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},o}(a);t.SocketMessageWriter=c}).call(this,o(120).Buffer)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(121);t.Disposable=n.Disposable;var i=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var o=t.indexOf(e);-1!==o&&t.splice(o,1)}}},e}();t.DisposableCollection=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;n{let r;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),r={dispose:()=>{this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(o)&&o.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}i._noop=function(){},t.Emitter=i},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","title":"JSON schema for Block definitions files","type":"object","additionalProperties":false,"properties":{"requires":{"description":"Files to be included in the code archive","type":"array","items":{"type":"string"}},"header":{"description":"Code placed at the beginning of generated code","type":"string"},"footer":{"description":"Code placed at the end of generated code","type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","definition","template"],"properties":{"id":{"type":"string"},"definition":{"type":["string","array"],"items":{"type":["string","object"],"additionalProperties":false,"required":["id","type","default"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["number","boolean","angle","text"]},"default":{}}}},"template":{"type":"string"}}}}}}')},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=function(e){this.element=e},i=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var o=this,i=new n(e);if(this._first)if(t){var r=this._last;this._last=i,i.prev=r,r.next=i}else{var s=this._first;this._first=i,i.next=s,s.prev=i}else this._first=i,this._last=i;return function(){for(var e=o._first;e instanceof n;e=e.next)if(e===i){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(o._first=o._first.next,o._first.prev=void 0):(o._last=o._last.prev,o._last.next=void 0):(o._first=void 0,o._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return R}));var n=o(25),i=o(8),r=o(40),s=o(79),a=o(10),l="**",u="/",c="[/\\\\]",h="[^/\\\\]",d=/\//g;function g(e){switch(e){case 0:return"";case 1:return h+"*?";default:return"(?:"+c+"|"+h+"+"+c+"|"+c+h+"+)*?"}}function p(e,t){if(!e)return[];for(var o,n=[],i=!1,r=!1,s="",a=0;a0;o--){var r=e.charCodeAt(o-1);if(47===r||92===r)break}t=e.substr(o)}var s=i.indexOf(t);return-1!==s?n[s]:null};a.basenames=i,a.patterns=n,a.allBasenames=i;var l=e.filter((function(e){return!e.basenames}));return l.push(a),l}},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return c}));o(441);var n,i,r,s=o(34),a=o(1),l=o(6);function u(e,t,o){var n=o.offset+o.size;return o.position===r.Before?t<=e-n?n:t<=o.offset?o.offset-t:Math.max(e-t,0):t<=o.offset?o.offset-t:t<=e-n?n:0}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(n={})),function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(i||(i={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(r||(r={}));var c=function(){function e(e){var t=this;this.$view=Object(s.a)(".context-view").hide(),this.setContainer(e),this.toDispose=[Object(l.f)((function(){t.setContainer(null)}))],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var o=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=Object(s.a)(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!1)})),this.$container.on(e.BUBBLE_DOWN_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!0)}),null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(a.C(t)){var o=a.u(t);e={top:o.top,left:o.left,width:o.width,height:o.height}}else{var s=t;e={top:s.y,left:s.x,width:s.width||0,height:s.height||0}}var l,c=this.$view.getTotalSize(),h=this.delegate.anchorPosition||i.BELOW,d=this.delegate.anchorAlignment||n.LEFT,g={offset:e.top,size:e.height,position:h===i.BELOW?r.Before:r.After};l=d===n.LEFT?{offset:e.left,size:0,position:r.Before}:{offset:e.left+e.width,size:0,position:r.After};var p=a.u(this.$container.getHTMLElement()),f=u(window.innerHeight,c.height,g)-p.top,m=u(window.innerWidth,c.width,l)-p.left;this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(h===i.BELOW?"bottom":"top"),this.$view.addClass(d===n.LEFT?"left":"right"),this.$view.style({top:f+"px",left:m+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,o){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):o&&!a.B(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),this.toDispose=Object(l.d)(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return d}));o(448);var n,i=o(1),r=o(125),s=o(40),a=o(165),l=o(6),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),h=function(e){function t(t,o){var n=e.call(this)||this;return n.domNode=n._register(new c(i.k(t,i.a(".monaco-icon-label")))),n.labelDescriptionContainer=n._register(new c(i.k(n.domNode.element,i.a(".monaco-icon-label-description-container")))),o&&o.supportHighlights?n.labelNode=n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))):n.labelNode=n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))),o&&o.supportDescriptionHighlights?n.descriptionNodeFactory=function(){return n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))}:n.descriptionNodeFactory=function(){return n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))},n}return u(t,e),t.prototype.setValue=function(e,t,o){var n=["monaco-icon-label"];o&&(o.extraClasses&&n.push.apply(n,o.extraClasses),o.italic&&n.push("italic")),this.domNode.className=n.join(" "),this.domNode.title=o&&o.title?o.title:"",this.labelNode instanceof r.a?this.labelNode.set(e||"",o?o.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.a?(this.descriptionNode.set(t||"",o?o.descriptionMatches:void 0),o&&o.descriptionTitle?this.descriptionNode.element.title=o.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=o&&o.descriptionTitle?o.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(l.a),d=function(e){function t(t,o,n,i){var r=e.call(this,t)||this;return r.setFile(o,n,i),r}return u(t,e),t.prototype.setFile=function(e,t,o){var n=s.b(e.fsPath);this.setValue(Object(a.a)(e),n&&"."!==n?Object(a.b)(n,o,t):"",{title:e.fsPath})},t}(h)},function(e,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l}));var n=o(8),i=o(11),r=o(69),s=o(87);function a(e,t){return function(e,t){for(var o='
    ',i=e.split(/\r\n|\r|\n/),r=t.getInitialState(),a=0,l=i.length;a0&&(o+="
    ");var c=t.tokenize2(u,r,0);s.a.convertToEndOffset(c.tokens,u.length);for(var h=new s.a(c.tokens,u).inflate(),d=0,g=0,p=h.getCount();g'+n.escape(u.substring(d,m))+"",d=m}r=c.endState}return o+="
    "}(e,function(e){var t=i.y.get(e);if(t)return t;return{getInitialState:function(){return r.c},tokenize:void 0,tokenize2:function(e,t,o){return Object(r.e)(0,e,t,o)}}}(t))}function l(e,t,o,n,i,r){for(var s="
    ",a=n,l=0,u=0,c=t.getCount();u0;)d+=" ",p--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:d+="�";break;case 13:d+="​";break;default:d+=String.fromCharCode(g)}}if(s+=''+d+"",h>i||a>=i)break}}return s+="
    "}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(10),i=function(){function e(e,t,o,n,i,r){this.id=e,this.label=t,this.alias=o,this._precondition=n,this._run=i,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return n.b.as(void 0);var e=this._run();return e||n.b.as(void 0)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(469);var n=o(6),i=o(30),r=o(1),s=o(93),a=o(2),l=o(14),u=o(26),c=o(155),h=o(18),d=new l.a(new l.c(0,122,204)),g={showArrow:!0,showFrame:!0,className:"",frameColor:d,arrowColor:d,keepEditorSelection:!1},p=function(){function e(e,t,o,n,i,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=o,this.heightInLines=n,this._onDomNodeTop=i,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),f=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),m=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),r.F(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){r.F(this._ruleName),r.n(".monaco-editor "+this._ruleName,"border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ")},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:a.a.fromPositions(e),options:{className:this._ruleName,stickiness:h.h.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new c.a(".arrow-decoration-"),e}(),_=function(){function e(e,t){void 0===t&&(t={});var o=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=i.c(t),i.g(this.options,g,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange((function(e){var t=o._getWidth(e);o.domNode.style.width=t+"px",o.domNode.style.left=o._getLeft(e)+"px",o._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;Object(n.d)(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){r.f(this.domNode,"zone-widget"),r.f(this.domNode,this.options.className),this.container=document.createElement("div"),r.f(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new m(this.editor),this._disposables.push(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var o=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(o)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var o=a.a.isIRange(e)?e:new a.a(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(o,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:o,options:u.a.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t},e.prototype._showImpl=function(e,t){var o=this,n={lineNumber:e.startLineNumber,column:e.startColumn},i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,l=this.editor.getLayoutInfo().height/a*.8;t>=l&&(t=l);var u=0,c=0;if(this.options.showArrow&&(u=Math.round(a/3),this._arrow.height=u,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){o._viewZone&&e.removeZone(o._viewZone.id),o._overlayWidget&&(o.editor.removeOverlayWidget(o._overlayWidget),o._overlayWidget=null),o.domNode.style.top="-1000px",o._viewZone=new p(s,n.lineNumber,n.column,t,(function(e){return o._onViewZoneTop(e)}),(function(e){return o._onViewZoneHeight(e)})),o._viewZone.id=e.addZone(o._viewZone),o._overlayWidget=new f("vs.editor.contrib.zoneWidget"+o._viewZone.id,o.domNode),o.editor.addOverlayWidget(o._overlayWidget)})),this.options.showFrame){var h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}var d=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(g)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),r.f(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(o){t._viewZone.heightInLines=e,o.layoutZone(t._viewZone.id)}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash=new s.b(this.domNode,this,{orientation:s.a.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=s.c.Disabled),this._disposables.push(this._resizeSash.onDidStart((function(o){t._viewZone&&(e={startY:o.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.push(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.push(this._resizeSash.onDidChange((function(o){if(e){var n=(o.currentY-e.startY)/t.editor.getConfiguration().lineHeight,i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&t._relayout(r)}})))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("uriDisplay")},function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));o(299);var n,i=o(24),r=o(6),s=o(4),a=o(15),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e,t){return!!e[t]}var c=function(e,t){this.target=e.target,this.hasTriggerModifier=u(e.event,t.triggerModifier),this.hasSideBySideModifier=u(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.k||e.event.detail<=1},h=function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=u(e,t.triggerModifier)},d=function(){function e(e,t,o,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=o,this.triggerSideBySideModifier=n}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();function g(e){return"altKey"===e?a.d?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):a.d?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}var p=function(e){function t(t){var o=e.call(this)||this;return o._onMouseMoveOrRelevantKeyDown=o._register(new s.a),o.onMouseMoveOrRelevantKeyDown=o._onMouseMoveOrRelevantKeyDown.event,o._onExecute=o._register(new s.a),o.onExecute=o._onExecute.event,o._onCancel=o._register(new s.a),o.onCancel=o._onCancel.event,o._editor=t,o._opts=g(o._editor.getConfiguration().multiCursorModifier),o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._register(o._editor.onDidChangeConfiguration((function(e){if(e.multiCursorModifier){var t=g(o._editor.getConfiguration().multiCursorModifier);if(o._opts.equals(t))return;o._opts=t,o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._onCancel.fire()}}))),o._register(o._editor.onMouseMove((function(e){return o.onEditorMouseMove(new c(e,o._opts))}))),o._register(o._editor.onMouseDown((function(e){return o.onEditorMouseDown(new c(e,o._opts))}))),o._register(o._editor.onMouseUp((function(e){return o.onEditorMouseUp(new c(e,o._opts))}))),o._register(o._editor.onKeyDown((function(e){return o.onEditorKeyDown(new h(e,o._opts))}))),o._register(o._editor.onKeyUp((function(e){return o.onEditorKeyUp(new h(e,o._opts))}))),o._register(o._editor.onMouseDrag((function(){return o.resetHandler()}))),o._register(o._editor.onDidChangeCursorSelection((function(e){return o.onDidChangeCursorSelection(e)}))),o._register(o._editor.onDidChangeModel((function(e){return o.resetHandler()}))),o._register(o._editor.onDidChangeModelContent((function(){return o.resetHandler()}))),o._register(o._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&o.resetHandler()}))),o}return l(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(r.a)},function(e,t,o){"use strict";o(470);var n,i,r,s=o(75),a=o(76),l=o(13),u=o(6),c=o(10),h=o(4),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(){function e(e){this._onDispose=new h.a,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}(),p=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var o,n,i=this,r=this.getLock(e);return r?new c.b((function(n,s){o=Object(h.k)(r.onDispose)((function(){return i.run(e,t).then(n,s)}))}),(function(){o.dispose()})):new c.b((function(o,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=i.locks[e.id]=new g(e);return n=t().then((function(t){return delete i.locks[e.id],s.dispose(),t})).then(o,r)}),(function(){return n.cancel()}))},e.prototype.getLock=function(e){var t;for(t in this.locks){var o=this.locks[t];if(e.intersects(o.item))return o}return null},e}(),f=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new h.d,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new h.d,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new h.d,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new h.d,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new h.d,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new h.d,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new h.d,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new h.d,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new h.d,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new h.d,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new h.d,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){a.a(!this.isRegistered(e.id),"item already registered: "+e.id);var t=Object(u.c)([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){a.a(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}(),m=function(){function e(e,t,o,n,i){this._onDidCreate=new h.a,this._onDidReveal=new h.a,this.onDidReveal=this._onDidReveal.event,this._onExpand=new h.a,this.onExpand=this._onExpand.event,this._onDidExpand=new h.a,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new h.a,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new h.a,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new h.a,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new h.a,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new h.a,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new h.a,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new h.a,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new h.a,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=o,this.lock=n,this.element=i,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,i),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):c.b.as(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var o=c.b.as(null);return this.forEachChild((function(e){o=o.then((function(){return e.collapse(!0)}))})),o.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),c.b.as(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,o,n){var i=this;if(void 0===o&&(o=!1),void 0===n&&(n=!1),!n&&!this.isExpanded())return this.needsChildrenRefresh=!0,c.b.as(this);this.needsChildrenRefresh=!1;var r=function(){var n={item:i,isNested:o};return i._onRefreshChildren.fire(n),(i.doesHaveChildren?i.context.dataSource.getChildren(i.context.tree,i.element):c.b.as([])).then((function(o){if(i.isDisposed()||i.registry.isDisposed())return c.b.as(null);if(!Array.isArray(o))return c.b.wrapError(new Error("Please return an array of children."));o=o?o.slice(0):[],o=i.sort(o);for(var n={};null!==i.firstChild;)n[i.firstChild.id]=i.firstChild,i.removeChild(i.firstChild);for(var r=0,s=o.length;r=0;r--)this.onInsertItem(u[r]);for(r=this.heightMap.length-1;r>=i;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,o,n,i=null,r=0;t=e.next();){if(n=this.indexes[t],!(o=this.heightMap[n]))return void console.error("view item doesnt exist");r-=o.height,delete this.indexes[t],this.onRemoveItem(o),null===i&&(i=n)}if(0!==r)for(this.heightMap.splice(i,n-i+1),n=i;n=o.top+o.height))return t;if(n===t)break;n=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}(),M=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(){function e(e,t,o){this._posx=e,this._posy=t,this._target=o}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}(),B=function(e){function t(t){var o=e.call(this,t.posx,t.posy,t.target)||this;return o.originalEvent=t,o}return M(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(x),F=function(e){function t(t,o,n){var i=e.call(this,t,o,n.target)||this;return i.originalEvent=n,i}return M(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(x);!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(i||(i={})),function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(r||(r={}));var H="ResourceURLs",U=o(17),V=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();var W=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var o=document.createElement("div");o.className="content";var n=document.createElement("div");n.appendChild(o),t={element:n,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,o)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach((function(t){e._cache[t].forEach((function(o){e.context.renderer.disposeTemplate(e.context.tree,t,o.templateData),o.element=null,o.templateData=null})),delete e._cache[t]}))},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}(),j=function(){function e(e,t){var o=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach((function(e){return o._styles[e]=!0})),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var o=["monaco-tree-row"];o.push.apply(o,Object.keys(this._styles)),this.model.hasChildren()&&o.push("has-children"),this.element.className=o.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var n=this.context.accessibilityProvider,i=n.getAriaLabel(this.context.tree,this.model.getElement());if(i&&this.element.setAttribute("aria-label",i),n.getPosInSet&&n.getSetSize&&(this.element.setAttribute("aria-setsize",n.getSetSize()),this.element.setAttribute("aria-posinset",n.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=w.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=C.g(this.element,"dragstart",(function(e){t.onDragStart(e)}))):this.uri=null),!e&&this.element){var a=window.getComputedStyle(this.element),l=parseFloat(a.paddingLeft);this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=C.t(this.element)+l,this.element.style.width="")}}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[z.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[z.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}(),G=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i.row={element:n,templateData:null,templateId:null},i}return V(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(j);var z=function(e){function t(o,n){var i=e.call(this)||this;i.lastClickTimeStamp=0,i.contentWidthUpdateDelayer=new U.a(50),i.isRefreshing=!1,i.refreshingPreviousChildrenIds={},i._onDOMFocus=new h.a,i._onDOMBlur=new h.a,i._onDidScroll=new h.a,t.counter++,i.instance=t.counter;var r=void 0===o.options.horizontalScrollMode?A.b.Hidden:o.options.horizontalScrollMode;i.horizontalScrolling=r!==A.b.Hidden,i.context={dataSource:o.dataSource,renderer:o.renderer,controller:o.controller,dnd:o.dnd,filter:o.filter,sorter:o.sorter,tree:o.tree,accessibilityProvider:o.accessibilityProvider,options:o.options,cache:new W(o),horizontalScrolling:i.horizontalScrolling},i.modelListeners=[],i.viewListeners=[],i.model=null,i.items={},i.domNode=document.createElement("div"),i.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+i.instance,i.domNode.tabIndex=o.options.preventRootFocus?-1:0,i.styleElement=C.o(i.domNode),i.treeStyler=o.styler,i.treeStyler||(i.treeStyler=new s.f(i.styleElement,"monaco-tree-instance-"+i.instance)),i.domNode.setAttribute("role","tree"),i.context.options.ariaLabel&&i.domNode.setAttribute("aria-label",i.context.options.ariaLabel),i.context.options.alwaysFocused&&C.f(i.domNode,"focused"),i.context.options.paddingOnRow||C.f(i.domNode,"no-row-padding"),i.wrapper=document.createElement("div"),i.wrapper.className="monaco-tree-wrapper",i.scrollableElement=new D.b(i.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:r,vertical:void 0!==o.options.verticalScrollMode?o.options.verticalScrollMode:A.b.Auto,useShadows:o.options.useShadows}),i.scrollableElement.onScroll((function(e){i.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),i._onDidScroll.fire()})),E.k?(i.wrapper.style.msTouchAction="none",i.wrapper.style.msContentZooming="none"):T.b.addTarget(i.wrapper),i.rowsContainer=document.createElement("div"),i.rowsContainer.className="monaco-tree-rows",o.options.showTwistie&&(i.rowsContainer.className+=" show-twisties");var a=C.O(i.domNode);return i.viewListeners.push(a.onDidFocus((function(){return i.onFocus()}))),i.viewListeners.push(a.onDidBlur((function(){return i.onBlur()}))),i.viewListeners.push(a),i.viewListeners.push(C.g(i.domNode,"keydown",(function(e){return i.onKeyDown(e)}))),i.viewListeners.push(C.g(i.domNode,"keyup",(function(e){return i.onKeyUp(e)}))),i.viewListeners.push(C.g(i.domNode,"mousedown",(function(e){return i.onMouseDown(e)}))),i.viewListeners.push(C.g(i.domNode,"mouseup",(function(e){return i.onMouseUp(e)}))),i.viewListeners.push(C.g(i.wrapper,"click",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.wrapper,"auxclick",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.domNode,"contextmenu",(function(e){return i.onContextMenu(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Tap,(function(e){return i.onTap(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Change,(function(e){return i.onTouchChange(e)}))),E.k&&(i.viewListeners.push(C.g(i.wrapper,"MSPointerDown",(function(e){return i.onMsPointerDown(e)}))),i.viewListeners.push(C.g(i.wrapper,"MSGestureTap",(function(e){return i.onMsGestureTap(e)}))),i.viewListeners.push(C.i(i.wrapper,"MSGestureChange",(function(e){return i.onThrottledMsGestureChange(e)}),(function(e,t){t.stopPropagation(),t.preventDefault();var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o})))),i.viewListeners.push(C.g(window,"dragover",(function(e){return i.onDragOver(e)}))),i.viewListeners.push(C.g(i.wrapper,"drop",(function(e){return i.onDrop(e)}))),i.viewListeners.push(C.g(window,"dragend",(function(e){return i.onDragEnd(e)}))),i.viewListeners.push(C.g(window,"dragleave",(function(e){return i.onDragOver(e)}))),i.wrapper.appendChild(i.rowsContainer),i.domNode.appendChild(i.scrollableElement.getDomNode()),n.appendChild(i.domNode),i.lastRenderTop=0,i.lastRenderHeight=0,i.didJustPressContextMenuKey=!1,i.currentDropTarget=null,i.currentDropTargets=[],i.shouldInvalidateDropReaction=!1,i.dragAndDropScrollInterval=null,i.dragAndDropScrollTimeout=null,i.onHiddenScrollTop=null,i.onRowsChanged(),i.layout(),i.setupMSGesture(),i.applyStyles(o.options),i}return V(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new j(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout((function(){return e.msGesture.target=e.wrapper}),100))},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||C.s(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||C.t(this.wrapper)))},t.prototype.render=function(e,t,o,n,i){var r,s,a=e,l=e+t,u=this.lastRenderTop+this.lastRenderHeight;for(r=this.indexAfter(l)-1,s=this.indexAt(Math.max(u,a));r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,u=void 0,c=void 0;if(!l)c=(u=new S.a({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null).ComputeDiff(!1)).some((function(e){if(e.modifiedLength>0)for(var o=e.modifiedStart,n=e.modifiedStart+e.modifiedLength;o0&&this.onRemoveItems(new I.a(r,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var p=s[g.modifiedStart-1]||o;p=p.getDepth()>0?p:null,this.onInsertItems(new I.a(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),p?p.id:null)}}else(l||u.length)&&(this.onRemoveItems(new I.a(r)),this.onInsertItems(new I.a(s),o.getDepth()>0?o.id:null));(l||u.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,o=this.items[t.id];if(o){o.expanded=!0;var n=this.onInsertItems(t.getNavigator(),t.id),i=this.scrollTop;o.top+o.height<=this.scrollTop&&(i+=n),this.onRowsChanged(i)}},t.prototype.onItemCollapsing=function(e){var t=e.item,o=this.items[t.id];o&&(o.expanded=!1,this.onRemoveItems(new I.c(t.getNavigator(),(function(e){return e&&e.id}))),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,o=e.relativeTop,n=this.items[t.id];if(n)if(null!==o){o=(o=o<0?0:o)>1?1:o;var i=n.height-this.viewHeight;this.scrollTop=i*o+n.top}else{var r=n.top+n.height,s=this.scrollTop+this.viewHeight;n.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.addClass(o),"highlighted"===o&&(C.f(this.domNode,o),n&&(this.highlightedItemWasDraggable=!!n.draggable,n.draggable&&(n.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.removeClass(o),"highlighted"===o&&(C.G(this.domNode,o),this.highlightedItemWasDraggable&&(n.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();C.N(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",w.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(o){t.onDragStart(e,o)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new k.b(e),o=this.getItemAround(t.target);o&&(E.k&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,o.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseDown(this.context.tree,o.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseUp(this.context.tree,o.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,o;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var n,i=new O.a(e);if(o=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,o),s=this.items[r];n=C.u(s.element)}else o=this.model.getInput(),n=C.u(this.inputItem.element);t=new F(n.left+n.width,n.top,i)}else{var a=new k.b(e),l=this.getItemAround(a.target);if(!l)return;o=l.model.getElement(),t=new B(a)}this.context.controller.onContextMenu(this.context.tree,o,t)},t.prototype.onKeyDown=function(e){var t=new O.a(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new O.a(e))},t.prototype.onDragStart=function(e,o){if(!this.model.getHighlight()){var n,i=e.model.getElement(),r=this.model.getSelection();if(n=r.indexOf(i)>-1?r:[i],o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setData(H,JSON.stringify([e.uri])),o.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,n):String(n.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),o.dataTransfer.setDragImage(a,-10,-10),setTimeout((function(){return document.body.removeChild(a)}),0)}this.currentDragAndDropData=new R(n),t.currentExternalDragAndDropData=new N(n),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new k.a(o))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=C.w(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.viewHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var o,n=this,s=new k.a(e),a=this.getItemAround(s.target);if(!a||0===s.posx&&0===s.posy&&s.browserEvent.type===C.d.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=s.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!s.dataTransfer.types)return!1;this.currentDragAndDropData=new L}this.currentDragAndDropData.update(s);var l,u=a.model;do{if(o=u?u.getElement():this.model.getInput(),!(l=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,o,s))||l.bubble!==r.BUBBLE_UP)break;u=u&&u.parent}while(u);if(!u)return this.currentDropElement=null,!1;var h=l&&l.accept;h?(this.currentDropElement=u.getElement(),s.preventDefault(),s.dataTransfer.dropEffect=l.effect===i.COPY?"copy":"move"):this.currentDropElement=null;var d,g,p=u.id===this.inputItem.id?this.inputItem:this.items[u.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==p||(d=this.currentDropElementReaction,g=l,!(!d&&!g||d&&g&&d.accept===g.accept&&d.bubble===g.bubble&&d.effect===g.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=p,this.currentDropElementReaction=l,h)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),l.bubble===r.BUBBLE_DOWN)for(var f,m=u.getNavigator();f=m.next();)(a=this.items[f.id])&&(a.dropTarget=!0,this.currentDropTargets.push(a));l.autoExpand&&(this.currentDropPromise=c.b.timeout(500).then((function(){return n.context.tree.expand(n.currentDropElement)})).then((function(){return n.shouldInvalidateDropReaction=!0})))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new k.a(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||C.f(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||C.G(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,o=this.itemAfter(e);o&&o.element&&(t=o.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var o=this.inputItem;do{if(e[t.BINDING]&&(o=e[t.BINDING]),e===this.wrapper||e===this.domNode)return o;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=u.d(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=u.d(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(P),K=o(14),Y=o(30);o.d(t,"a",(function(){return $}));var X=function(e,t,o){if(void 0===o&&(o={}),this.tree=e,this.configuration=t,this.options=o,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new s.c({clickBehavior:s.a.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof o.keyboardSupport||o.keyboardSupport}),this.dnd=t.dnd||new s.d,this.filter=t.filter||new s.e,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new s.b,this.styler=t.styler||null},q={listFocusBackground:K.a.fromHex("#073655"),listActiveSelectionBackground:K.a.fromHex("#0E639C"),listActiveSelectionForeground:K.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:K.a.fromHex("#094771"),listFocusAndSelectionForeground:K.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:K.a.fromHex("#3F3F46"),listHoverBackground:K.a.fromHex("#2A2D2E"),listDropBackground:K.a.fromHex("#383B3D")},$=function(){function e(e,t,o){void 0===o&&(o={}),this._onDidChangeFocus=new h.e,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new h.e,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new h.e,this._onDidExpandItem=new h.e,this._onDidCollapseItem=new h.e,this._onDispose=new h.a,this.onDidDispose=this._onDispose.event,this.container=e,Object(Y.g)(o,q,!1),o.twistiePixels="number"==typeof o.twistiePixels?o.twistiePixels:32,o.showTwistie=!1!==o.showTwistie,o.indentPixels="number"==typeof o.indentPixels?o.indentPixels:12,o.alwaysFocused=!0===o.alwaysFocused,o.useShadows=!1!==o.useShadows,o.paddingOnRow=!1!==o.paddingOnRow,o.showLoading=!1!==o.showLoading,this.context=new X(this,t,o),this.model=new v(this.context),this.view=new z(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}()},function(e,t,o){"use strict";o(446);var n=o(0),i=o(13),r=o(4),s=o(6),a=o(62),l=o(8),u=o(10),c=o(14),h=o(34),d=o(1),g=o(93),p=(o(447),o(30)),f={badgeBackground:c.a.fromHex("#4D4D4D"),badgeForeground:c.a.fromHex("#FFFFFF")},m=function(){function e(e,t){this.options=t||Object.create(null),Object(p.g)(this.options,f,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(d.k)(e,Object(d.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=Object(l.format)(this.countFormat,this.count),this.element.title=Object(l.format)(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,o=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=o?"1px":null,this.element.style.borderStyle=o?"solid":null,this.element.style.borderColor=o}},e}(),_=o(204),y=o(22),v=o(143),b=o(2),E=o(26),C=o(157),S=o(113),T=o(56),w=o(133),k=o(7),O=o(19),R=o(118),N=Object(y.c)("environmentService"),L=o(33),I=o(18),D=o(134),A=o(12),P=o(75),M=o(208),x=o(178);o.d(t,"b",(function(){return J})),o.d(t,"a",(function(){return Z}));var B,F=(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),H=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},U=function(e,t){return function(o,n){t(o,n,e)}},V=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},W=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]1?this.badge.setTitleFormat(n.a("referencesCount","{0} references",t)):this.badge.setTitleFormat(n.a("referenceCount","{0} reference",t))},e=H([U(1,v.a),U(2,Object(y.d)(N)),U(3,O.c)],e)}(),Y=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),d.f(this.inside,"referenceMatch"),d.f(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),o=t.before,n=t.inside,i=t.after;this.before.innerHTML=l.escape(o),this.inside.innerHTML=l.escape(n),this.after.innerHTML=l.escape(i)},e}(),X=function(){function e(e,t,o){this._contextService=e,this._themeService=t,this._environmentService=o}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,o){if(o instanceof T.a)return e._ids.FileReferences;if(o instanceof T.b)return e._ids.OneReference;throw o},e.prototype.renderTemplate=function(t,o,n){if(o===e._ids.FileReferences)return new K(n,this._contextService,this._environmentService,this._themeService);if(o===e._ids.OneReference)return new Y(n);throw o},e.prototype.renderElement=function(e,t,o,n){if(t instanceof T.a)n.set(t);else{if(!(t instanceof T.b))throw o;n.set(t)}},e.prototype.disposeTemplate=function(e,t,o){o instanceof K&&o.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=H([U(0,v.a),U(1,O.c),U(2,Object(y.d)(N))],e)}(),q=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof T.a?t.getAriaMessage():t instanceof T.b?t.getAriaMessage():void 0},e}(),$=function(){function e(e,t){var o,n=this;this._disposables=[],this._onDidChangePercentages=new r.a,this._ratio=t,this._sash=new g.b(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}}),this._disposables.push(this._sash.onDidStart((function(e){o=e.startX-n._width*n.ratio}))),this._disposables.push(this._sash.onDidChange((function(e){var t=e.currentX-o;t>20&&t+200?e.children[0]:void 0},t.prototype._revealReference=function(e,t){return V(this,void 0,void 0,(function(){var o,r=this;return W(this,(function(l){switch(l.label){case 0:return e.uri.scheme!==a.a.inMemory?this.setTitle(Object(x.a)(e.uri),this._uriDisplay.getLabel(Object(x.b)(e.uri),!1)):this.setTitle(n.a("peekView.alternateTitle","References")),o=this._textModelResolverService.createModelReference(e.uri),t?[4,this._tree.reveal(e.parent)]:[3,2];case 1:l.sent(),l.label=2;case 2:return[2,u.b.join([o,this._tree.reveal(e)]).then((function(t){var o=t[0];if(r._model){Object(s.d)(r._previewModelReference);var n=o.object;if(n){r._previewModelReference=o;var i=r._preview.getModel()===n.textEditorModel;r._preview.setModel(n.textEditorModel);var a=b.a.lift(e.range).collapseToStart();r._preview.setSelection(a),r._preview.revealRangeInCenter(a,i?0:1)}else r._preview.setModel(r._previewNotAvailableMessage),o.dispose()}else o.dispose()}),i.e)]}}))}))},t=H([U(3,O.c),U(4,w.a),U(5,y.a),U(6,M.a)],t)}(S.b),Q=Object(k.kb)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},n.a("peekViewTitleBackground","Background color of the peek view title area.")),ee=Object(k.kb)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},n.a("peekViewTitleForeground","Color of the peek view title.")),te=Object(k.kb)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},n.a("peekViewTitleInfoForeground","Color of the peek view title info.")),oe=Object(k.kb)("peekView.border",{dark:"#007acc",light:"#007acc",hc:k.e},n.a("peekViewBorder","Color of the peek view borders and arrow.")),ne=Object(k.kb)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:c.a.black},n.a("peekViewResultsBackground","Background color of the peek view result list.")),ie=Object(k.kb)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:c.a.white},n.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),re=Object(k.kb)("peekViewResult.fileForeground",{dark:c.a.white,light:"#1E1E1E",hc:c.a.white},n.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),se=Object(k.kb)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),ae=Object(k.kb)("peekViewResult.selectionForeground",{dark:c.a.white,light:"#6C6C6C",hc:c.a.white},n.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),le=Object(k.kb)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:c.a.black},n.a("peekViewEditorBackground","Background color of the peek view editor.")),ue=Object(k.kb)("peekViewEditorGutter.background",{dark:le,light:le,hc:le},n.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ce=Object(k.kb)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),he=Object(k.kb)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),de=Object(k.kb)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:k.b},n.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));Object(O.e)((function(e,t){var o=e.getColor(ce);o&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+o+"; }");var n=e.getColor(he);n&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+n+"; }");var i=e.getColor(de);i&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+i+"; box-sizing: border-box; }");var r=e.getColor(k.b);r&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+r+"; box-sizing: border-box; }");var s=e.getColor(ne);s&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+s+"; }");var a=e.getColor(ie);a&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+a+"; }");var l=e.getColor(re);l&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+l+"; }");var u=e.getColor(se);u&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+u+"; }");var c=e.getColor(ae);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(le);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var d=e.getColor(ue);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+d+";}")}))},function(e,t,o){"use strict";var n,i="object"==typeof Reflect?Reflect:null,r=i&&"function"==typeof i.apply?i.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,o,n){var i,r,s,a;if("function"!=typeof o)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o);if(void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,o.listener?o.listener:o),r=e._events),s=r[t]),void 0===s)s=r[t]=o,++e._eventsCount;else if("function"==typeof s?s=r[t]=n?[o,s]:[s,o]:n?s.unshift(o):s.push(o),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function h(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=f(l,u);for(o=0;o=0;r--)if(o[r]===t||o[r].listener===t){s=o[r].listener,i=r;break}if(i<0)return this;0===i?o.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return g(this,e,!0)},a.prototype.rawListeners=function(e){return g(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,o){(t=e.exports=o(267)).Stream=t,t.Readable=t,t.Writable=o(214),t.Duplex=o(136),t.Transform=o(271),t.PassThrough=o(334)},function(e,t,o){"use strict";(function(t,n,i){var r=o(180);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,o){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(o),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:r.nextTick;y.WritableState=_;var u=o(167);u.inherits=o(147);var c={deprecate:o(333)},h=o(268),d=o(181).Buffer,g=i.Uint8Array||function(){};var p,f=o(269);function m(){}function _(e,t){a=a||o(136),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var o=e._writableState,n=o.sync,i=o.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(o),t)!function(e,t,o,n,i){--t.pendingcb,o?(r.nextTick(i,n),r.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),T(e,t))}(e,o,n,t,i);else{var s=C(o);s||o.corked||o.bufferProcessing||!o.bufferedRequest||E(e,o),n?l(b,e,o,s,i):b(e,o,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||o(136),!(p.call(y,this)||this instanceof a))return new y(e);this._writableState=new _(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function v(e,t,o,n,i,r,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,o?e._writev(i,t.onwrite):e._write(i,r,t.onwrite),t.sync=!1}function b(e,t,o,n){o||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function E(e,t){t.bufferProcessing=!0;var o=t.bufferedRequest;if(e._writev&&o&&o.next){var n=t.bufferedRequestCount,i=new Array(n),r=t.corkedRequestsFree;r.entry=o;for(var a=0,l=!0;o;)i[a]=o,o.isBuf||(l=!1),o=o.next,a+=1;i.allBuffers=l,v(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;o;){var u=o.chunk,c=o.encoding,h=o.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,c,h),o=o.next,t.bufferedRequestCount--,t.writing)break}null===o&&(t.lastBufferedRequest=null)}t.bufferedRequest=o,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(o){t.pendingcb--,o&&e.emit("error",o),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var o=C(t);return o&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}u.inherits(y,h),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof _)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,o){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof g);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(o=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof o&&(o=m),i.ended?function(e,t){var o=new Error("write after end");e.emit("error",o),r.nextTick(t,o)}(this,o):(a||function(e,t,o,n){var i=!0,s=!1;return null===o?s=new TypeError("May not write null values to stream"):"string"==typeof o||void 0===o||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),r.nextTick(n,s),i=!1),i}(this,i,e,o))&&(i.pendingcb++,s=function(e,t,o,n,i,r){if(!o){var s=function(e,t,o){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,o));return t}(t,n,i);n!==s&&(o=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,o){o(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,o){var n=this._writableState;"function"==typeof e?(o=e,e=null,t=null):"function"==typeof t&&(o=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,o){t.ending=!0,T(e,t),o&&(t.finished?r.nextTick(o):e.once("finish",o));t.ended=!0,e.writable=!1}(this,n,o)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=f.destroy,y.prototype._undestroy=f.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,o(108),o(148).setImmediate,o(80))},function(e,t,o){"use strict";var n=o(168),i=o(275),r=o(276),s=o(277);r=o(276);function a(e,t,o,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=o,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,o){return e.pipe(new s).pipe(new r("uncompressedSize")).pipe(t.compressWorker(o)).pipe(new r("compressedSize")).withStreamInfo("compression",t)},e.exports=a},function(e,t,o){"use strict";var n=o(64);var i=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,o){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,o){"use strict";var n=o(364),i=o(219),r=o(149),s=o(289),a=o(366);function l(e,t,o){var n=this._refs[o];if("string"==typeof n){if(!this._refs[n])return l.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[o])instanceof s)return p(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,r,a,c=u.call(this,t,o);return c&&(i=c.schema,t=c.root,a=c.baseId),i instanceof s?r=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(r=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),r}function u(e,t){var o=n.parse(t),i=m(o),r=f(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==r){var a=y(i),l=this._refs[a];if("string"==typeof l)return c.call(this,e,l,o);if(l instanceof s)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[a])instanceof s))return;if(l.validate||this._compile(l),a==y(t))return{schema:l,root:e,baseId:r};e=l}if(!e.schema)return;r=f(this._getId(e.schema))}return d.call(this,o,r,e.schema,e)}function c(e,t,o){var n=u.call(this,e,t);if(n){var i=n.schema,r=n.baseId;e=n.root;var s=this._getId(i);return s&&(r=v(r,s)),d.call(this,o,r,i,e)}}e.exports=l,l.normalizeId=y,l.fullPath=f,l.url=v,l.ids=function(e){var t=y(this._getId(e)),o={"":t},s={"":f(t,!1)},l={},u=this;return a(e,{allKeys:!0},(function(e,t,a,c,h,d,g){if(""!==t){var p=u._getId(e),f=o[c],m=s[c]+"/"+h;if(void 0!==g&&(m+="/"+("number"==typeof g?g:r.escapeFragment(g))),"string"==typeof p){p=f=y(f?n.resolve(f,p):p);var _=u._refs[p];if("string"==typeof _&&(_=u._refs[_]),_&&_.schema){if(!i(e,_.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=y(m))if("#"==p[0]){if(l[p]&&!i(e,l[p]))throw new Error('id "'+p+'" resolves to more than one schema');l[p]=e}else u._refs[p]=m}o[t]=f,s[t]=m}})),l},l.inlineRef=p,l.schema=u;var h=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,o,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),s=1;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=new g.f("accessibilityHelpWidgetVisible",!1),R=function(e){function t(t,o){var n=e.call(this)||this;return n._editor=t,n._widget=n._register(o.createInstance(P,n._editor)),n}return T(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=w([k(1,h.a)],t)}(r.a),N=i.a("noSelection","No selection"),L=i.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),I=i.a("singleSelection","Line {0}, Column {1}"),D=i.a("multiSelectionRange","{0} selections ({1} characters selected)"),A=i.a("multiSelection","{0} selections");var P=function(e){function t(t,o,n,r){var s=e.call(this)||this;return s._contextKeyService=o,s._keybindingService=n,s._openerService=r,s._editor=t,s._isVisibleKey=O.bindTo(s._contextKeyService),s._domNode=Object(u.b)(document.createElement("div")),s._domNode.setClassName("accessibilityHelpWidget"),s._domNode.setDisplay("none"),s._domNode.setAttribute("role","dialog"),s._domNode.setAttribute("aria-hidden","true"),s._contentDomNode=Object(u.b)(document.createElement("div")),s._contentDomNode.setAttribute("role","document"),s._domNode.appendChild(s._contentDomNode),s._isVisible=!1,s._register(s._editor.onDidLayoutChange((function(){s._isVisible&&s._layout()}))),s._register(a.j(s._contentDomNode.domNode,"keydown",(function(e){if(s._isVisible&&(e.equals(2083)&&(Object(b.a)(i.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),s._editor.updateOptions({accessibilitySupport:"on"}),a.l(s._contentDomNode.domNode),s._buildContent(),s._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(b.a)(i.a("openingDocs","Now opening the Editor Accessibility documentation page."));var t=s._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),s._openerService.open(C.a.parse(t)),e.preventDefault(),e.stopPropagation()}}))),s.onblur(s._contentDomNode.domNode,(function(){s.hide()})),s._editor.addOverlayWidget(s),s}return T(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,o){var n=this._keybindingService.lookupKeybinding(e);return n?s.format(t,n.getAriaLabel()):s.format(o,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),o=0;if(t){var n=this._editor.getModel();n&&t.forEach((function(e){o+=n.getValueLengthInRange(e)}))}var r=function(e,t){return e&&0!==e.length?1===e.length?t?s.format(L,e[0].positionLineNumber,e[0].positionColumn,t):s.format(I,e[0].positionLineNumber,e[0].positionColumn):t?s.format(D,e.length,t):e.length>0?s.format(A,e.length):null:N}(t,o);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=i.a("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=i.a("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=i.a("readonlyEditor"," in a read-only code editor"):r+=i.a("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var a=v.d?i.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):i.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+a;break;case 2:r+="\n\n - "+i.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+i.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+a}var u=i.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),c=i.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),h=i.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d=i.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,u,c):r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,h,d),r+="\n\n - "+(v.d?i.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):i.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+i.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(Object(l.a)(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,a.l(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),o=Math.max(5,Math.min(t.WIDTH,e.width-40)),n=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(o),this._domNode.setHeight(n);var i=Math.round((e.height-n)/2);this._domNode.setTop(i);var r=Math.round((e.width-o)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=w([k(1,g.e),k(2,d.a),k(3,E.a)],t)}(c.a),M=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:i.a("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:p.a.focus,primary:S.k?2107:571,weight:100}})||this}return T(t,e),t.prototype.run=function(e,t){var o=R.get(t);o&&o.show()},t}(f.b);Object(f.h)(R),Object(f.f)(M);var x=f.c.bindToContribution(R.get);Object(f.g)(new x({id:"closeAccessibilityHelp",precondition:O,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:p.a.focus,primary:9,secondary:[1033]}})),Object(_.e)((function(e,t){var o=e.getColor(y.D);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+o+"; }");var n=e.getColor(y.rb);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(y.e);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+i+"; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"BracketMatchingController",(function(){return E}));o(430);var n,i=o(0),r=o(6),s=o(9),a=o(23),l=o(17),u=o(3),c=o(5),h=o(19),d=o(29),g=o(26),p=o(7),f=o(18),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=Object(p.kb)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),y=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:i.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:c.a.editorTextFocus,primary:3160,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.jumpToBracket()},t}(u.b),v=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:i.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.selectToBracket()},t}(u.b),b=function(e,t){this.position=e,this.brackets=t},E=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._lastBracketsData=[],o._lastVersionId=0,o._decorations=[],o._updateBracketsSoon=o._register(new l.c((function(){return o._updateBrackets()}),50)),o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,o._updateBracketsSoon.schedule(),o._register(t.onDidChangeCursorPosition((function(e){o._matchBrackets&&o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelContent((function(e){o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModel((function(e){o._decorations=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelLanguageConfiguration((function(e){o._lastBracketsData=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeConfiguration((function(e){o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,!o._matchBrackets&&o._decorations.length>0&&(o._decorations=o._editor.deltaDecorations(o._decorations,[])),o._updateBracketsSoon.schedule()}))),o}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map((function(t){var o=t.getStartPosition(),n=e.matchBracket(o),i=null;if(n)n[0].containsPosition(o)?i=n[1].getStartPosition():n[1].containsPosition(o)&&(i=n[0].getStartPosition());else{var r=e.findNextBracket(o);r&&r.range&&(i=r.range.getStartPosition())}return i?new a.a(i.lineNumber,i.column,i.lineNumber,i.column):new a.a(o.lineNumber,o.column,o.lineNumber,o.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach((function(o){var n=o.getStartPosition(),i=e.matchBracket(n),r=null,s=null;if(!i){var l=e.findNextBracket(n);l&&l.range&&(i=e.matchBracket(l.range.getStartPosition()))}i&&(i[0].startLineNumber===i[1].startLineNumber?(r=i[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],o=0,n=0,i=this._lastBracketsData.length;n1&&i.sort(s.a.compare);var c=[],h=0,d=0,g=o.length;for(a=0,l=i.length;a=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o,n,i,r){var s=this;this._contextMenuService=t,this._contextViewService=o,this._contextKeyService=n,this._keybindingService=i,this._menuService=r,this._toDispose=[],this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.push(this._editor.onContextMenu((function(e){return s._onContextMenu(e)}))),this._toDispose.push(this._editor.onDidScrollChange((function(e){s._contextMenuIsBeingShownCount>0&&s._contextViewService.hideContextView()}))),this._toDispose.push(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));var t;e.target.type!==f.b.OVERLAY_WIDGET&&(e.event.preventDefault(),(e.target.type===f.b.CONTENT_TEXT||e.target.type===f.b.CONTENT_EMPTY||e.target.type===f.b.TEXTAREA)&&(this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position),e.target.type!==f.b.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)))},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(d.b.EditorContext,this._contextKeyService),o=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var n=0,i=o;n0&&this._contextViewService.hideContextView(),this._toDispose=Object(r.d)(this._toDispose)},e.ID="editor.contrib.contextmenu",e=_([y(1,u.a),y(2,u.b),y(3,h.e),y(4,c.a),y(5,d.a)],e)}(),b=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:i.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:g.a.textInputFocus,primary:1092,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){v.get(t).showContextMenu()},t}(p.b);Object(p.h)(v),Object(p.f)(b)},function(e,t,o){"use strict";o.r(t),o.d(t,"CursorUndoController",(function(){return c})),o.d(t,"CursorUndo",(function(){return h}));var n,i=o(0),r=o(3),s=o(6),a=o(5),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),u=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var o=0;o50&&o._undoStack.shift()),o._prevState=o._readState()}))),o}return l(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new u(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new u(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(s.a),h=function(e){function t(){return e.call(this,{id:"cursorUndo",label:i.a("cursor.undo","Soft Undo"),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:a.a.textInputFocus,primary:2099,weight:100}})||this}return l(t,e),t.prototype.run=function(e,t,o){c.get(t).cursorUndo()},t}(r.b);Object(r.h)(c),Object(r.f)(h)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(96),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomIn",label:i.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()+1)},t}(r.b),u=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomOut",label:i.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()-1)},t}(r.b),c=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomReset",label:i.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(0)},t}(r.b);Object(r.f)(l),Object(r.f)(u),Object(r.f)(c)},function(e,t,o){"use strict";o.r(t);o(299);var n=o(0),i=o(17),r=o(13),s=o(71),a=o(10),l=o(89),u=o(2),c=o(11),h=o(16),d=o(3),g=o(164),p=o(6),f=o(133),m=o(19),_=o(7),y=o(90),v=o(154),b=o(209),E=o(9),C=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},S=function(e,t){return function(o,n){t(o,n,e)}},T=function(){function e(e,t,o){var n=this;this.textModelResolverService=t,this.modeService=o,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.e;var s=new b.a(e);this.toUnhook.push(s),this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown((function(e){var t=e[0],o=e[1];n.startFindDefinition(t,o)}))),this.toUnhook.push(s.onExecute((function(e){n.isEnabled(e)&&n.gotoDefinition(e.target,e.hasSideBySideModifier).done((function(){n.removeDecorations()}),(function(e){n.removeDecorations(),Object(r.e)(e)}))}))),this.toUnhook.push(s.onCancel((function(){n.removeDecorations(),n.currentWordUnderMouse=null})))}return e.prototype.startFindDefinition=function(e,t){var o=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var i=e.target.position,l=i?this.editor.getModel().getWordAtPosition(i):null;if(!l)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==l.startColumn||this.currentWordUnderMouse.endColumn!==l.endColumn||this.currentWordUnderMouse.word!==l.word){this.currentWordUnderMouse=l;var c=new y.a(this.editor,15);this.throttler.queue((function(){return c.validate(o.editor)?o.findDefinition(e.target):a.b.wrap(null)})).then((function(e){if(e&&e.length&&c.validate(o.editor))if(e.length>1)o.addDecoration(new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),(new s.a).appendText(n.a("multipleResults","Click to show {0} definitions.",e.length)));else{var t=e[0];if(!t.uri)return;o.textModelResolverService.createModelReference(t.uri).then((function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,r=t.range.startLineNumber;if(0!==n.getLineMaxColumn(r)){var a,c=o.getPreviewValue(n,r);a=t.origin?u.a.lift(t.origin):new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),o.addDecoration(a,(new s.a).appendCodeblock(o.modeService.getModeIdByFilenameOrFirstLine(n.uri.fsPath),c)),e.dispose()}else e.dispose()}else e.dispose()}))}else o.removeDecorations()})).done(void 0,r.e)}},e.prototype.getPreviewValue=function(t,o){var n=this.getPreviewRangeBasedOnBrackets(t,o);return n.endLineNumber-n.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(t,o)),this.stripIndentationFromPreviewRange(t,o,n)},e.prototype.stripIndentationFromPreviewRange=function(e,t,o){for(var n=e.getLineFirstNonWhitespaceColumn(t),i=t+1;in)return new u.a(o,1,n+1,1);s=t.findNextBracket(new E.a(c,h))}return new u.a(o,1,n+1,1)},e.prototype.addDecoration=function(e,t){var o={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[o])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===h.b.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&c.e.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?Object(g.a)(t,e.position):a.b.as(null)},e.prototype.gotoDefinition=function(e,t){var o=this;this.editor.setPosition(e.position);var n=new v.DefinitionAction(new v.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext((function(e){return n.run(e,o.editor)}))},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=Object(p.d)(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=C([S(1,f.a),S(2,l.a)],e)}();Object(d.h)(T),Object(m.e)((function(e,t){var o=e.getColor(_.m);o&&t.addRule(".monaco-editor .goto-definition-link { color: "+o+" !important; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"GotoLineEntry",(function(){return p})),o.d(t,"GotoLineAction",(function(){return f}));o(472);var n,i=o(0),r=o(124),s=o(97),a=o(5),l=o(16),u=o(161),c=o(3),h=o(9),d=o(2),g=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),p=function(e){function t(t,o,n){var i=e.call(this)||this;return i.editor=o,i.decorator=n,i._parseResult=i._parseInput(t),i}return g(t,e),t.prototype._parseInput=function(e){var t,o,n=e.split(",").map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));t=0===n.length?new h.a(-1,-1):1===n.length?new h.a(n[0],1):new h.a(n[0],n[1]);var r=(o=Object(l.d)(this.editor)?this.editor.getModel():this.editor.getModel().modified).validatePosition(t).equals(t);return{position:t,isValid:r,label:r?t.column&&t.column>1?i.a("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}",t.lineNumber,t.column):i.a("gotoLineLabelValidLine","Go to line {0}",t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?i.a("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to",o.getLineCount()):i.a("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to",o.getLineMaxColumn(t.lineNumber))}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return i.a("gotoLineAriaLabel","Go to line {0}",this._parseResult.label)},t.prototype.run=function(e,t){return e===s.a.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e,0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new d.a(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(r.a),f=function(e){function t(){return e.call(this,i.a("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),{id:"editor.action.gotoLine",label:i.a("GotoLineAction.label","Go to Line..."),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:a.a.focus,primary:2085,mac:{primary:293},weight:100}})||this}return g(t,e),t.prototype.run=function(e,t){var o=this;this._show(this.getController(t),{getModel:function(e){return new r.c([new p(e,t,o.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(u.a);Object(c.f)(f)},function(e,t,o){"use strict";o.r(t);o(478);var n,i=o(0),r=o(6),s=o(8),a=o(3),l=o(16),u=o(89),c=o(11),h=o(103),d=o(69),g=o(14),p=o(19),f=o(7),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(e){function t(t,o,n){var i=e.call(this)||this;return i._editor=t,i._standaloneThemeService=o,i._modeService=n,i._widget=null,i._register(i._editor.onDidChangeModel((function(e){return i.stop()}))),i._register(i._editor.onDidChangeModelLanguage((function(e){return i.stop()}))),i._register(c.y.onDidChange((function(e){return i.stop()}))),i}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new E(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens",t=_([y(1,h.a),y(2,u.a)],t)}(r.a),b=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:i.a("inspectTokens","Developer: Inspect Tokens"),alias:"Developer: Inspect Tokens",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=v.get(t);o&&o.launch()},t}(a.b);var E=function(e){function t(t,o,n){var i,r=e.call(this)||this;return r.allowEditorOverflow=!0,r._editor=t,r._modeService=n,r._model=r._editor.getModel(),r._domNode=document.createElement("div"),r._domNode.className="tokens-inspect-widget",r._tokenizationSupport=(i=r._model.getLanguageIdentifier(),c.y.get(i.language)||{getInitialState:function(){return d.c},tokenize:function(e,t,o){return Object(d.d)(i.language,e,t,o)},tokenize2:function(e,t,o){return Object(d.e)(i.id,e,t,o)}}),r._compute(r._editor.getPosition()),r._register(r._editor.onDidChangeCursorPosition((function(e){return r._compute(r._editor.getPosition())}))),r._editor.addContentWidget(r),r}return m(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),o=0,n=t.tokens1.length-1;n>=0;n--){var i=t.tokens1[n];if(e.column-1>=i.offset){o=n;break}}var r=0;for(n=t.tokens2.length>>>1;n>=0;n--)if(e.column-1>=t.tokens2[n<<1]){r=n;break}var a="",l=this._model.getLineContent(e.lineNumber),u="";if(o'+function(e){for(var t="",o=0,n=e.length;o('+u.length+" "+(1===u.length?"char":"chars")+")",a+='
    ';var d=this._decodeMetadata(t.tokens2[1+(r<<1)]);a+='',a+='",a+='",a+='",a+='",a+='",a+="",a+='
    ',o'+Object(s.escape)(t.tokens1[o].type)+""),this._domNode.innerHTML=a,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.y.getColorMap(),o=c.x.getLanguageId(e),n=c.x.getTokenType(e),i=c.x.getFontStyle(e),r=c.x.getForeground(e),s=c.x.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(o),tokenType:n,fontStyle:i,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),o=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:o.tokens,tokens2:n.tokens,endState:o.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),o=1;o1&&o.push(new d.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var o=this,n=t.getModel(),i=t.getSelections(),r=[];i.forEach((function(e){return o.getCursorsForSelection(e,n,r)})),r.length>0&&t.setSelections(r)},t}(c.b),w=function(e,t,o){this.selections=e,this.revealRange=t,this.revealScrollType=o},k=function(){function e(e,t,o,n,i,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=o,this.searchText=n,this.wholeWord=i,this.matchCase=r,this.currentMatch=s}return e.create=function(t,o){var n=o.getState();if(!t.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new e(t,o,!1,n.searchString,n.wholeWord,n.matchCase,null);var i,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,i=!0,r=!0):(i=n.wholeWord,r=n.matchCase);var l,u=t.getSelection(),c=null;if(u.isEmpty()){var h=t.getModel().getWordAtPosition(u.getStartPosition());if(!h)return null;l=h.word,c=new d.a(u.startLineNumber,h.startColumn,u.startLineNumber,h.endColumn)}else l=t.getModel().getValueInRange(u).replace(/\r\n/g,"\n");return new e(t,o,s,l,i,r,c)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findNextMatch(this.searchText,o.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,o.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}(),O=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._ignoreSelectionChange=!1,o._session=null,o._sessionDispose=[],o}return E(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var o=k.create(this._editor,e);if(!o)return;this._session=o;var n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()})),this._editor.onDidBlurEditorText((function(){t._endSession()})),e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()}))]}},t.prototype._endSession=function(){if(this._sessionDispose=Object(r.d)(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController){this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1)}this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var o=e.getWordAtPosition(t.getStartPosition());return o?new d.a(t.startLineNumber,o.startColumn,t.startLineNumber,o.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var o=e.getState().matchCase;if(!B(this._editor.getModel(),t,o)){for(var n=this._editor.getModel(),i=[],r=0,s=t.length;r0&&o.isRegex)t=this._editor.getModel().findMatches(o.searchString,!0,o.isRegex,o.matchCase,o.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var n=this._editor.getSelection(),i=0,r=t.length;i1){var l=r.getState().matchCase;if(!B(t.getModel(),a,l))return null}s=k.create(t,r)}if(!s)return null;var u=null,c=f.h.has(o);if(s.currentMatch){if(c)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;u=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var h=r.getState(),d=h.matchCase;if(h.isRevealed){var g=h.searchString;d||(g=g.toLowerCase());var p=s.searchText;if(d||(p=p.toLowerCase()),g===p&&s.matchCase===h.matchCase&&s.wholeWord===h.wholeWord&&!h.isRegex)return null}return new M(u,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(M.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var o=this.editor.getModel();if(!o.isTooLargeForTokenization()){var n=f.h.has(o),i=o.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((function(e){return e.range}));i.sort(h.a.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(h.a.compareRangesUsingStarts);for(var s=[],a=0,l=0,u=i.length,c=r.length;a=c)s.push(d),a++;else{var g=h.a.compareRangesUsingStarts(d,r[l]);g<0?(!r[l].isEmpty()&&h.a.areIntersecting(d,r[l])||s.push(d),a++):g>0?l++:(a++,l++)}}var p=s.map((function(e){return{range:e,options:n?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,p)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:Object(v.f)(y.gb),darkColor:Object(v.f)(y.gb),position:l.f.Center}}),t._SELECTION_HIGHLIGHT=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(r.a);function B(e,t,o){for(var n=F(e,t[0],!o),i=1,r=t.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},R=function(e,t){return function(o,n){t(o,n,e)}},N={getMetaTitle:function(e){return e.references.length>1&&i.a("meta.titleReference"," – {0} references",e.references.length)}},L=function(){function e(e,t){e instanceof y.a&&d.a.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=O([R(1,s.e)],e)}(),I=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:i.a("references.action.label","Find All References"),alias:"Find All References",precondition:s.d.and(_.a.hasReferenceProvider,d.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return k(t,e),t.prototype.run=function(e,t){var o=g.a.get(t);if(o){var n=t.getSelection(),i=t.getModel(),r=Object(f.i)((function(e){return P(i,n.getStartPosition(),e).then((function(e){return new p.c(e)}))}));o.toggleWidget(n,r,N)}},t}(u.b);Object(u.h)(L),Object(u.f)(I);function D(e,t){A(e,(function(e){return e.closeWidget()}))}function A(e,t){var o=Object(d.c)(e);if(o){var n=g.a.get(o);n&&t(n)}}function P(e,t,o){var n=c.r.ordered(e).map((function(o){return Object(f.h)((function(n){return o.provideReferences(e,t,{includeDeclaration:!0},n)})).then((function(e){if(Array.isArray(e))return e}),(function(e){Object(m.f)(e)}))}));return Promise.all(n).then((function(e){for(var t=[],o=0,n=e;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a){return e.call(this,!0,t,o,n,i,r,s,a)||this}return d(t,e),t=g([p(1,s.e),p(2,i.a),p(3,c.a),p(4,r.a),p(5,l.a),p(6,a.b)],t)}(h.a);Object(u.h)(f)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(103),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){var t=e.call(this,{id:"editor.action.toggleHighContrast",label:i.a("toggleHighContrast","Toggle High Contrast Theme"),alias:"Toggle High Contrast Theme",precondition:null})||this;return t._originalThemeName=null,t}return a(t,e),t.prototype.run=function(e,t){var o=e.get(s.a);this._originalThemeName?(o.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=o.getTheme().themeName,o.setTheme("hc-black"))},t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(8),s=o(2),a=o(9),l=o(5),u=o(3),c=o(43),h=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=function(e){function t(){return e.call(this,{id:"editor.action.transposeLetters",label:i.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:l.a.writable,kbOpts:{kbExpr:l.a.textInputFocus,primary:0,mac:{primary:306},weight:100}})||this}return h(t,e),t.prototype.positionLeftOf=function(e,t){var o=e.column,n=e.lineNumber;return o>t.getLineMinColumn(n)?Object(r.isLowSurrogate)(t.getLineContent(n).charCodeAt(o-2))?o-=2:o-=1:n>1&&(n-=1,o=t.getLineMaxColumn(n)),new a.a(n,o)},t.prototype.positionRightOf=function(e,t){var o=e.column,n=e.lineNumber;return o0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())},t}(u.b);Object(u.f)(d)},function(e,t,o){"use strict";o.r(t),o.d(t,"editorWordHighlight",(function(){return S})),o.d(t,"editorWordHighlightStrong",(function(){return T})),o.d(t,"editorWordHighlightBorder",(function(){return w})),o.d(t,"editorWordHighlightStrongBorder",(function(){return k})),o.d(t,"overviewRulerWordHighlightForeground",(function(){return O})),o.d(t,"overviewRulerWordHighlightStrongForeground",(function(){return R})),o.d(t,"ctxHasWordHighlights",(function(){return N})),o.d(t,"getOccurrencesAtPosition",(function(){return L}));var n,i=o(0),r=o(17),s=o(13),a=o(2),l=o(3),u=o(11),c=o(6),h=o(7),d=o(19),g=o(35),p=o(26),f=o(12),m=o(5),_=o(25),y=o(18),v=o(48),b=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(h.kb)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations."),!0),T=Object(h.kb)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations."),!0),w=Object(h.kb)("editor.wordHighlightBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),k=Object(h.kb)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),O=Object(h.kb)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),R=Object(h.kb)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),N=new f.f("hasWordHighlights",!1);function L(e,t,o){var n=u.h.ordered(e);return Object(r.k)(n.map((function(n){return function(){return Promise.resolve(n.provideDocumentHighlights(e,t,o)).then(void 0,s.f)}})),(function(e){return!Object(_.k)(e)}))}Object(l.e)("_executeDocumentHighlights",(function(e,t){return L(e,t,v.a.None)}));var I=function(){function e(e,t){var o=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=N.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition((function(e){o._ignorePositionChangeEvent||o.occurrencesHighlight&&o._onPositionChanged(e)}))),this.toUnhook.push(e.onDidChangeModel((function(e){o._stopAll(),o.model=o.editor.getModel()}))),this.toUnhook.push(e.onDidChangeModelContent((function(e){o._stopAll()}))),this.toUnhook.push(e.onDidChangeConfiguration((function(e){var t=o.editor.getConfiguration().contribInfo.occurrencesHighlight;o.occurrencesHighlight!==t&&(o.occurrencesHighlight=t,o._stopAll())}))),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(a.a.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===g.a.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(u.h.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var o=t.startLineNumber,n=t.startColumn,i=t.endColumn,l=this.model.getWordAtPosition({lineNumber:o,column:n});if(!l||l.startColumn>n||l.endColumn=i&&(h=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),h)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var f=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Object(r.i)((function(t){return L(e.model,e.editor.getPosition(),t)})),this.workerRequest.then((function(t){f===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())}),s.e)}this._lastWordRange=c}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),o=this.lastCursorPositionChangeTime+250;t>=o?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),o-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],o=0,n=this.workerRequestValue.length;o1)?r?r.apply(void 0,e.params.concat([d.token])):S.apply(void 0,[e.method].concat(e.params,[d.token])):r?r(e.params,d.token):S(e.method,e.params,d.token);f?m.then?m.then((function(o){delete N[p],t(o,e.method,c)}),(function(t){delete N[p],t instanceof a.ResponseError?n(t,e.method,c):t&&s.string(t.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)})):(delete N[p],t(f,e.method,c)):(delete N[p],function(t,n,i){void 0===t&&(t=null);var r={jsonrpc:C,id:e.id,result:t};Y(r,n,i),o.write(r)}(f,e.method,c))}catch(o){delete N[p],o instanceof a.ResponseError?t(o,e.method,c):o&&s.string(o.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+o.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)}}else n(new a.ResponseError(a.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,c)}(e):a.isNotificationMessage(e)?function(e){if(V())return;var t,o=void 0;if(e.method===d.type.method)t=function(e){var t=e.id,o=N[String(t)];o&&o.cancel()};else{var i=k[e.method];i&&(t=i.handler,o=i.type)}if(t||w)try{!function(e){if(L===g.Off||!l||e.method===f.type.method)return;var t=void 0;L===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n");l.log("Received notification '"+e.method+"'.",t)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():w(e.method):s.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t.apply(void 0,e.params):w.apply(void 0,[e.method].concat(e.params)):t?t(e.params):w(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else P.fire(e)}(e):a.isResponseMessage(e)?function(e){if(V())return;if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),o=R[t];if(function(e,t){if(L===g.Off||!l)return;var o=void 0;L===g.Verbose&&(e.error&&e.error.data?o="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?o="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(o="No result returned.\n\n"));if(t){var n=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";l.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+n,o)}else l.log("Received response "+e.id+" without active response promise.",o)}(e,o),o){delete R[t];try{if(e.error){var i=e.error;o.reject(new a.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(i){i.message?n.error("Response handler '"+o.method+"' failed with message: "+i.message):n.error("Response handler '"+o.method+"' failed unexpectedly.")}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(s.string(t.id)||s.number(t.id)){var o=String(t.id),i=R[o];i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{j()}}()})))}t.onClose(W),t.onError((function(e){D.fire([e,void 0,void 0])})),o.onClose(W),o.onError((function(e){D.fire(e)}));var G=function(e){try{if(a.isNotificationMessage(e)&&e.method===d.type.method){var t=x(e.params.id),n=O.get(t);if(a.isRequestMessage(n)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(n,F):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return O.delete(t),r.id=n.id,Y(r,e.method,Date.now()),void o.write(r)}}B(O,e)}finally{j()}};function z(e){if(L!==g.Off&&l){var t=void 0;L===g.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),l.log("Sending request '"+e.method+" - ("+e.id+")'.",t)}}function K(e){if(L!==g.Off&&l){var t=void 0;L===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),l.log("Sending notification '"+e.method+"'.",t)}}function Y(e,t,o){if(L!==g.Off&&l){var n=void 0;L===g.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),l.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-o)+"ms",n)}}function X(){if(U())throw new v(m.Closed,"Connection is closed.");if(V())throw new v(m.Disposed,"Connection is disposed.")}function q(){if(!H())throw new Error("Call listen() first.")}function $(e){return void 0===e?null:e}function J(e,t){var o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(var i=0;i=o.length)o.copy(this.buffer,this.index,0,o.length);else{var s=(Math.ceil((this.index+o.length)/r)+1)*r;0===this.index?(this.buffer=e.allocUnsafe(s),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],s)}this.index+=o.length}tryReadHeaders(){let e=void 0,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split(l).forEach(t=>{let o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");let n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i});let o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e}tryReadContent(e){if(this.index{this.onData(e)}),this.readable.on("error",e=>this.fireError(e)),this.readable.on("close",()=>this.fireClose())}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let o=parseInt(t);if(isNaN(o))throw new Error("Content-Length value must be a number.");this.nextMessageLength=o}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var o=JSON.parse(t);this.callback(o)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=h;t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){this.process.on("message",e)}};t.SocketMessageReader=class extends h{constructor(e,t="utf-8"){super(e,t)}}}).call(this,o(120).Buffer)},function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const n=o(186),i=o(171);let r="Content-Length: ",s="\r\n";!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class a{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,o){this.errorEmitter.fire([this.asError(e),t,o])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a;t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",e=>this.fireError(e)),this.writable.on("close",()=>this.fireClose())}write(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.writable.write(i.join(""),"ascii"),this.writable.write(o,this.encoding),this.errorCount=0}catch(e){this.errorCount++,this.fireError(e,t,this.errorCount)}}};t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",e=>this.fireError(e)),this.socket.on("close",()=>this.fireClose())}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.sending=!0,this.socket.write(i.join(""),"ascii",e=>{e&&this.handleError(e,t);try{this.socket.write(o,this.encoding,e=>{this.sending=!1,e?this.handleError(e,t):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})}catch(e){this.handleError(e,t)}})}catch(e){this.handleError(e,t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}}).call(this,o(120).Buffer)},function(e,t,o){"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(13),r=o(25),s=o(6),a=o(22),l=o(12),u=o(37),c=o(5),h=o(3),d=o(58),g=o(53),p=o(2),f=o(114),m=o(139),_=o(47),y=o(17),v=o(4),b=o(79),E=o(35),C=o(23),S=o(11),T=o(111),w=o(27),k=function(){function e(t,o,n,i){void 0===i&&(i=w.a.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=o,this._options=i,this._refilterKind=1,this._lineContext=n,"top"===i.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===i.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,o=this._items;t2e3?T.c:T.d,a=0;at.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===o.suggestion.type)return-1}return e._compareCompletionItems(t,o)},e._compareCompletionItemsSnippetsUp=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===o.suggestion.type)return 1}return e._compareCompletionItems(t,o)},e}(),O=function(){function e(e,t,o){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=o}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var o=e.getPosition();t.tokenizeIfCheap(o.lineNumber);var n=t.getWordAtPosition(o);return!!n&&(n.endColumn===o.column&&!!isNaN(Number(n.word)))},e}(),R=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new y.f,this._triggerRefilter=new y.f,this._onDidCancel=new v.a,this._onDidTrigger=new v.a,this._onDidSuggest=new v.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new C.a(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeModelLanguage((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeConfiguration((function(){t._updateTriggerCharacters(),t._updateQuickSuggest()}))),this._toDispose.push(S.u.onDidChange((function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()}))),this._toDispose.push(this._editor.onDidChangeCursorSelection((function(e){t._onCursorChange(e)}))),this._toDispose.push(this._editor.onDidChangeModelContent((function(e){t._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){Object(s.d)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=Object(s.d)(this._toDispose),Object(s.d)(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if(Object(s.d)(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),o=0,n=S.u.all(this._editor.getModel());othis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,o=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,Object(b.d)(t),o)}else{var n=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(O.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:i})}}else this.cancel()},e}(),N=(o(485),o(8)),L=o(1),I=o(125),D=(o(486),o(21)),A=o(94),P=o(15),M=o(66),x=o(51),B=o(50),F=o(30),H=o(81),U=o(42);function V(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var o=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-o<=0?{start:0,end:0}:{start:o,end:n}}function W(e){return e.end-e.start<=0}function j(e,t){var o=[],n={start:e.start,end:Math.min(t.start,e.end)},i={start:Math.max(t.end,e.start),end:e.end};return W(n)||o.push(n),W(i)||o.push(i),o}function G(e,t){for(var o=[],n=0,i=t;n=r.range.end)){if(e.end=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};var Z={useShadows:!0,verticalScrollMode:U.b.Auto},Q=function(){function e(e,t,o,n){void 0===n&&(n=Z),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new Y;for(var i=0,r=o;i=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.rowsContainer,M.a.Tap),(function(t){return e.toGestureEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=L.w(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.renderHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,o=t.getAttribute("data-index");if(o){var n=Number(o);if(!isNaN(n))return n}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var o=this.items[t.end];return o&&o.row?o.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,o){var n=Object(r.h)(this.renderedElements,(function(e){return e.templateData===o}));if(n>=0){var i=this.renderedElements[n];this.trait.unrender(o),i.index=t}else{i={index:t,templateData:o};this.renderedElements.push(i)}this.trait.renderIndex(t,o)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,o){for(var n=[],i=0;i=e+t&&n.push({index:r.index+o-t,templateData:r.templateData})}this.renderedElements=n},e.prototype.renderIndexes=function(e){for(var t=0,o=this.renderedElements;t-1&&this.trait.renderIndex(i,r)}},e.prototype.disposeTemplate=function(e){var t=Object(r.h)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),se=function(){function e(e){this._trait=e,this._onChange=new v.a,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new re(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,o){var n=o.length-t,i=e+t,r=this.indexes.filter((function(t){return t=i})).map((function(e){return e+n})));this.renderer.splice(e,t,o.length),this.set(r)},e.prototype.renderIndex=function(e,t){L.N(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){L.G(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var o=ve(t,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some((function(t){return t===e}))},e.prototype.dispose=function(){this.indexes=null,this._onChange=Object(s.d)(this._onChange)},ie([A.a],e.prototype,"renderer",null),e}(),ae=function(e){function t(t){var o=e.call(this,"focused")||this;return o.getDomId=t,o}return ne(t,e),t.prototype.renderIndex=function(t,o){e.prototype.renderIndex.call(this,t,o),o.setAttribute("role","treeitem"),o.setAttribute("id",this.getDomId(t))},t}(se),le=function(){function e(e,t,o){this.trait=e,this.view=t,this.getId=o}return e.prototype.splice=function(e,t,o){var n=this;if(!this.getId)return this.trait.splice(e,t,o.map((function(e){return!1})));var i=this.trait.get().map((function(e){return n.getId(n.view.element(e))})),r=o.map((function(e){return i.indexOf(n.getId(e))>-1}));this.trait.splice(e,t,r)},e}();function ue(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var ce=function(){function e(e,t,o){this.list=e,this.view=t;var n=!(!1===o.multipleSelectionSupport);this.disposables=[],this.openController=o.openController||pe;var i=Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new x.a(e)}));i.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),i.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),i.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),i.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),i.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),i.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),n&&i.filter((function(e){return(P.d?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(r.m)(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}(),he=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[],Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new x.a(e)})).filter((function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var o=this.view.domElement(t[0]).querySelector("[tabIndex]");if(o&&o instanceof HTMLElement){var n=window.getComputedStyle(o);"hidden"!==n.visibility&&"none"!==n.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}}}},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}();function de(e){return e instanceof MouseEvent&&2===e.button}var ge={isSelectionSingleChangeEvent:function(e){return P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},isSelectionRangeChangeEvent:function(e){return e.browserEvent.shiftKey}},pe={shouldOpen:function(e){return!(e instanceof MouseEvent)||!de(e)}},fe=function(){function e(e,t,o){void 0===o&&(o={}),this.list=e,this.view=t,this.options=o,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===o.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=o.multipleSelectionController||ge),this.openController=o.openController||pe,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),M.b.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=Object(v.g)(Object(B.a)(this.view.domNode,"keydown")).map((function(e){return new x.a(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,o=Object(v.g)(Object(B.a)(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.list.getFocus().length>0})).map((function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}})).filter((function(e){return!!e.anchor})).event,n=Object(v.g)(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,o=e.index,n=e.browserEvent;return{element:t,index:o,anchor:{x:n.clientX+1,y:n.clientY}}})).event;return Object(v.f)(t,o,n)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],o=this.list.getSelection();if(t=void 0===t?o[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var n=e.index;if(o.every((function(e){return e!==n}))&&this.list.setFocus([n]),this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!de(e.browserEvent)&&(this.list.setSelection([n]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([n],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var o=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var n=Math.min(t,o),i=Math.max(t,o),s=Object(r.m)(n,i+1),a=function(e,t){var o=e.indexOf(t);if(-1===o)return[];var n=[],i=o-1;for(;i>=0&&e[i]===t-(o-i);)n.push(e[i--]);n.reverse(),i=o;for(;i=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){n++,i++;continue}e[n]=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){o.push(e[n]),n++,i++;continue}e[n]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===o.length||this.eventBufferer.bufferEvents((function(){return n.spliceable.splice(e,t,o)}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]+e:0;this.setFocus(t?[n%this.length]:[Math.min(n,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]-e:0;t&&n<0&&(n=(this.length+n%this.length)%this.length),this.setFocus([Math.max(n,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var o=this.view.element(t);if(this.getFocusedElements()[0]!==o)this.setFocus([t]);else{var n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==n&&setTimeout((function(){return e.focusNextPage()}),0)}},e.prototype.focusPreviousPage=function(){var e,t=this,o=this.view.getScrollTop();e=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var n=this.view.element(e);if(this.getFocusedElements()[0]!==n)this.setFocus([e]);else{var i=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==i&&setTimeout((function(){return t.focusPreviousPage()}),0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var o,n,i,r=this.view.getScrollTop(),s=this.view.elementTop(e),a=this.view.elementHeight(e);if(Object(D.f)(t)){var l=a-this.view.renderHeight;this.view.setScrollTop(l*(o=t,n=0,i=1,Math.min(Math.max(o,n),i))+s)}else{var u=s+a,c=r+this.view.renderHeight;s=c&&this.view.setScrollTop(u-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var o=this,n=0,i=e;n=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map((function(e){return o.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,o=e.indexes;return{indexes:o,elements:o.map((function(e){return t.view.element(e)}))}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),L.N(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();L.N(this.view.domNode,"selection-none",0===e.length),L.N(this.view.domNode,"selection-single",1===e.length),L.N(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=Object(s.d)(this.disposables)},e.InstanceCount=0,ie([A.a],e.prototype,"onFocusChange",null),ie([A.a],e.prototype,"onSelectionChange",null),e}(),Se=o(61),Te=o(16),we=o(110),ke=o(118),Oe=o(19),Re=o(7),Ne=o(55),Le=o(160),Ie=o(89),De=o(82),Ae=o(48),Pe=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},xe=function(e,t){return function(o,n){t(o,n,e)}},Be=!1,Fe=Object(Re.kb)("editorSuggestWidget.background",{dark:Re.D,light:Re.D,hc:Re.D},n.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),He=Object(Re.kb)("editorSuggestWidget.border",{dark:Re.E,light:Re.E,hc:Re.E},n.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),Ue=Object(Re.kb)("editorSuggestWidget.foreground",{dark:Re.u,light:Re.u,hc:Re.u},n.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Ve=Object(Re.kb)("editorSuggestWidget.selectedBackground",{dark:Re.W,light:Re.W,hc:Re.W},n.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),We=Object(Re.kb)("editorSuggestWidget.highlightForeground",{dark:Re.Y,light:Re.Y,hc:Re.Y},n.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),je=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function Ge(e){return e&&e.match(je)?e:null}function ze(e){if(!e)return!1;var t=e.suggestion;return!!t.documentation||t.detail&&t.detail!==t.label}var Ke=function(){function e(e,t,o){this.widget=e,this.editor=t,this.triggerKeybindingLabel=o}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,o=Object.create(null);o.disposables=[],o.root=e,o.icon=Object(L.k)(e,Object(L.a)(".icon")),o.colorspan=Object(L.k)(o.icon,Object(L.a)("span.colorspan"));var i=Object(L.k)(e,Object(L.a)(".contents")),r=Object(L.k)(i,Object(L.a)(".main"));o.highlightedLabel=new I.a(r),o.disposables.push(o.highlightedLabel),o.typeLabel=Object(L.k)(r,Object(L.a)("span.type-label")),o.readMore=Object(L.k)(r,Object(L.a)("span.readMore")),o.readMore.title=n.a("readMore","Read More...{0}",this.triggerKeybindingLabel);var s=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,i=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",s=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";o.root.style.fontSize=i,r.style.fontFamily=n,r.style.lineHeight=s,o.icon.style.height=s,o.icon.style.width=s,o.readMore.style.height=s,o.readMore.style.width=s};return s(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo||e.contribInfo})).on(s,null,o.disposables),o},e.prototype.renderElement=function(e,t,o){var i=this,r=o,s=e.suggestion;if(ze(e)?r.root.setAttribute("aria-label",n.a("suggestionWithDetailsAriaLabel","{0}, suggestion, has details",s.label)):r.root.setAttribute("aria-label",n.a("suggestionAriaLabel","{0}, suggestion",s.label)),r.icon.className="icon "+s.type,r.colorspan.style.backgroundColor="","color"===s.type){var a=Ge(s.label)||"string"==typeof s.documentation&&Ge(s.documentation);a&&(r.icon.className="icon customcolor",r.colorspan.style.backgroundColor=a)}r.highlightedLabel.set(s.label,Object(T.b)(e.matches),"",!0),r.typeLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),ze(e)?(Object(L.M)(r.readMore),r.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},r.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),i.widget.toggleDetails()}):(Object(L.A)(r.readMore),r.readMore.onmousedown=null,r.readMore.onclick=null)},e.prototype.disposeElement=function(){},e.prototype.disposeTemplate=function(e){e.disposables=Object(s.d)(e.disposables)},e}(),Ye=function(){function e(e,t,o,i,r){var a=this;this.widget=t,this.editor=o,this.markdownRenderer=i,this.triggerKeybindingLabel=r,this.borderWidth=1,this.disposables=[],this.el=Object(L.k)(e,Object(L.a)(".details")),this.disposables.push(Object(s.f)((function(){return e.removeChild(a.el)}))),this.body=Object(L.a)(".body"),this.scrollbar=new H.a(this.body,{}),Object(L.k)(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.header=Object(L.k)(this.body,Object(L.a)(".header")),this.close=Object(L.k)(this.header,Object(L.a)("span.close")),this.close.title=n.a("readLess","Read less...{0}",this.triggerKeybindingLabel),this.type=Object(L.k)(this.header,Object(L.a)("p.type")),this.docs=Object(L.k)(this.body,Object(L.a)("p.docs")),this.ariaLabel=null,this.configureFont(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo})).on(this.configureFont,this,this.disposables),i.onDidRenderCodeBlock((function(){return a.scrollbar.scanDomNode()}),this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;if(this.renderDisposeable=Object(s.d)(this.renderDisposeable),!e||!ze(e))return this.type.textContent="",this.docs.textContent="",Object(L.f)(this.el,"no-docs"),void(this.ariaLabel=null);if(Object(L.G)(this.el,"no-docs"),"string"==typeof e.suggestion.documentation)Object(L.G)(this.docs,"markdown-docs"),this.docs.textContent=e.suggestion.documentation;else{Object(L.f)(this.docs,"markdown-docs"),this.docs.innerHTML="";var o=this.markdownRenderer.render(e.suggestion.documentation);this.renderDisposeable=o,this.docs.appendChild(o.element)}e.suggestion.detail?(this.type.innerText=e.suggestion.detail,Object(L.M)(this.type)):(this.type.innerText="",Object(L.A)(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=N.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,o=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",n=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";this.el.style.fontSize=o,this.type.style.fontFamily=t,this.close.style.height=n,this.close.style.width=n},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables),this.renderDisposeable=Object(s.d)(this.renderDisposeable)},e}(),Xe=function(){function e(e,t,o,n,i,r,s,a){var l=this;this.editor=e,this.telemetryService=t,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.editorBlurTimeout=new y.f,this.showTimeout=new y.f,this.onDidSelectEmitter=new v.a,this.onDidFocusEmitter=new v.a,this.onDidHideEmitter=new v.a,this.onDidShowEmitter=new v.a,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1,this.firstFocusInCurrentList=!1;var u=r.lookupKeybinding("editor.action.triggerSuggest"),c=u?" ("+u.getLabel()+")":"",h=new Le.a(e,s,a);this.isAuto=!1,this.focusedItem=null,this.storageService=i,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",Be,Ne.c.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=Object(L.a)(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||Object(L.f)(this.element,"no-icons"),this.messageElement=Object(L.k)(this.element,Object(L.a)(".message")),this.listElement=Object(L.k)(this.element,Object(L.a)(".tree")),this.details=new Ye(this.element,this,this.editor,h,c);var d=new Ke(this,this.editor,c);this.list=new Ce(this.listElement,this,[d],{useShadows:!1,selectOnMouseDown:!0,focusOnMouseDown:!1,openController:{shouldOpen:function(){return!1}}}),this.toDispose=[Object(ke.b)(this.list,n,{listInactiveFocusBackground:Ve,listInactiveFocusOutline:Re.b}),n.onThemeChange((function(e){return l.onThemeChange(e)})),e.onDidBlurEditorText((function(){return l.onEditorBlur()})),e.onDidLayoutChange((function(){return l.onEditorLayoutChange()})),this.list.onSelectionChange((function(e){return l.onListSelection(e)})),this.list.onFocusChange((function(e){return l.onListFocus(e)})),this.editor.onDidChangeCursorSelection((function(){return l.onCursorSelectionChanged()}))],this.suggestWidgetVisible=_.a.Visible.bindTo(o),this.suggestWidgetMultipleSuggestions=_.a.MultipleSuggestions.bindTo(o),this.suggestionSupportsAutoAccept=_.a.AcceptOnKey.bindTo(o),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(n.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout.cancelAndSet((function(){e.editor.hasTextFocus()||e.setState(0)}),150)},e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){var t=this;if(e.elements.length){var o=e.elements[0],i=e.indexes[0];o.resolve(Ae.a.None).then((function(){t.onDidSelectEmitter.fire({item:o,index:i,model:t.completionModel}),Object(d.a)(n.a("suggestionAriaAccepted","{0}, accepted",o.suggestion.label)),t.editor.focus()}))}},e.prototype._getSuggestionAriaAlertLabel=function(e){return ze(e)?n.a("ariaCurrentSuggestionWithDetails","{0}, suggestion, has details",e.suggestion.label):n.a("ariaCurrentSuggestion","{0}, suggestion",e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&Object(d.a)(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var t=e.getColor(Fe);t&&(this.listElement.style.backgroundColor=t.toString(),this.details.element.style.backgroundColor=t.toString(),this.messageElement.style.backgroundColor=t.toString());var o=e.getColor(He);o&&(this.listElement.style.borderColor=o.toString(),this.details.element.style.borderColor=o.toString(),this.messageElement.style.borderColor=o.toString(),this.detailsBorderColor=o.toString());var n=e.getColor(Re.H);n&&(this.detailsFocusBorderColor=n.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var o=e.elements[0];if(this._ariaAlert(this._getSuggestionAriaAlertLabel(o)),this.firstFocusInCurrentList=!this.focusedItem,o!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var n=e.indexes[0];this.suggestionSupportsAutoAccept.set(!o.suggestion.noAutoAccept),this.focusedItem=o,this.list.reveal(n),this.currentSuggestionDetails=Object(y.i)((function(e){return o.resolve(e)})),this.currentSuggestionDetails.then((function(){t.ignoreFocusEvents=!0,t.list.splice(n,1,[o]),t.list.setFocus([n]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails():Object(L.G)(t.element,"docs-side")})).catch(i.e).then((function(){t.focusedItem===o&&(t.currentSuggestionDetails=null)})),this.onDidFocusEmitter.fire({item:o,index:n,model:this.completionModel})}}},e.prototype.setState=function(t){if(this.element){var o=this.state!==t;switch(this.state=t,Object(L.N)(this.element,"frozen",4===t),t){case 0:Object(L.A)(this.messageElement,this.details.element,this.listElement),this.hide(),this.listHeight=0,o&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,Object(L.A)(this.listElement,this.details.element),Object(L.M)(this.messageElement),Object(L.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Object(L.A)(this.listElement,this.details.element),Object(L.M)(this.messageElement),Object(L.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 3:case 4:Object(L.A)(this.messageElement),Object(L.M)(this.listElement),this.show();break;case 5:Object(L.A)(this.messageElement),Object(L.M)(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout((function(){t.loadingTimeout=null,t.setState(1)}),50)))},e.prototype.showSuggestions=function(e,t,o,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel!==e&&(this.completionModel=e),o&&2!==this.state&&0!==this.state)this.setState(4);else{var i=this.completionModel.items.length,r=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),r)n?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",Pe({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),o?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(ze(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),Object(L.A)(this.details.element),Object(L.G)(this.element,"docs-side"),Object(L.G)(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),Object(L.M)(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){Object(L.f)(e.element,"visible"),e.onDidShowEmitter.fire(e)}),100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),Object(L.G)(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[Te.a.BELOW,Te.a.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),o=Object(L.u)(this.editor.getDomNode()),n=o.left+t.left,i=o.top+t.top+t.height,r=Object(L.u)(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!ze(this.focusedItem)&&this.firstFocusInCurrentList)return Object(L.G)(this.element,"docs-side"),void Object(L.G)(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Je=function(e,t){return function(o,n){t(o,n,e)}},Ze=function(){function e(){}return e.prototype.select=function(e,t,o){if(0===o.length)return 0;for(var n=o[0].score,i=1;is&&c.type===l.type&&c.insertText===l.insertText&&(s=c.touch,r=a)}return-1===r?e.prototype.select.call(this,t,o,n):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach((function(t,o){e.push([o,t])})),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,o=e;t0){this._seq=e[0][1].touch+1;for(var t=0,o=e;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},rt=function(e,t){return function(o,n){t(o,n,e)}},st=function(){function e(e,t,o){var n=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow((function(){return n._onItem(t.getFocusedItem())}))),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType((function(t){if(n._activeItem){var i=t[t.length-1];n._activeAcceptCharacters.has(i)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&o(n._activeItem)}})))}return e.prototype._onItem=function(e){if(e&&!Object(r.k)(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,o=e.item.suggestion.commitCharacters;t0&&this._activeAcceptCharacters.add(n[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){Object(s.d)(this._disposables)},e}(),at=function(){function e(e,t,o,n){var i=this;this._editor=e,this._commandService=t,this._contextKeyService=o,this._instantiationService=n,this._toDispose=[],this._model=new R(this._editor),this._memory=n.createInstance(ot,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger((function(e){i._widget||i._createSuggestWidget(),i._widget.showTriggered(e.auto)}))),this._toDispose.push(this._model.onDidSuggest((function(e){var t=i._memory.select(i._editor.getModel(),i._editor.getPosition(),e.completionModel.items);i._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}))),this._toDispose.push(this._model.onDidCancel((function(e){i._widget&&!e.retrigger&&i._widget.hideWidget()})));var r=_.a.AcceptSuggestionsOnEnter.bindTo(o),s=function(){var e=i._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,o=e.suggestSelection;r.set("on"===t||"smart"===t),i._memory.setMode(o)};this._toDispose.push(this._editor.onDidChangeConfiguration((function(e){return s()}))),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance(Xe,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new st(this._editor,this._widget,(function(t){return e._onDidSelectItem(t)}));this._toDispose.push(t,this._model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var o=_.a.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus((function(t){var n=t.item,i=e._editor.getPosition(),r=n.position.column-n.suggestion.overwriteBefore,s=i.column,a=!0;"smart"!==e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==e._model.state||n.suggestion.command||n.suggestion.additionalTextEdits||"textmate"===n.suggestion.snippetType||s-r!==n.suggestion.insertText.length||(a=e._editor.getModel().getValueInRange({startLineNumber:i.lineNumber,startColumn:r,endLineNumber:i.lineNumber,endColumn:s})!==n.suggestion.insertText);o.set(a)}))),this._toDispose.push({dispose:function(){o.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=Object(s.d)(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var o=e.item,n=o.suggestion,r=o.position,s=this._editor.getPosition().column-r.column;this._editor.pushUndoStop(),Array.isArray(n.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",n.additionalTextEdits.map((function(e){return g.a.replace(p.a.lift(e.range),e.text)}))),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=n.insertText;"textmate"!==n.snippetType&&(a=f.c.escape(a)),m.SnippetController2.get(this._editor).insert(a,n.overwriteBefore+s,n.overwriteAfter,!1,!1),this._editor.pushUndoStop(),n.command?n.command.id===lt.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[n.command.id].concat(n.command.arguments)).done(void 0,i.e),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion,o=n.a("arai.alert.snippet","Accepting '{0}' did insert the following text: {1}",t.label,t.insertText);Object(d.a)(o)},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=it([rt(1,u.b),rt(2,l.e),rt(3,a.a)],e)}(),lt=function(e){function t(){return e.call(this,{id:t.id,label:n.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:l.d.and(c.a.writable,c.a.hasCompletionItemProvider),kbOpts:{kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return nt(t,e),t.prototype.run=function(e,t){var o=at.get(t);o&&o.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(h.b);Object(h.h)(at),Object(h.f)(lt);var ut=h.c.bindToContribution(at.get);Object(h.g)(new ut({id:"acceptSelectedSuggestion",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2}})),Object(h.g)(new ut({id:"acceptSelectedSuggestionOnEnter",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:l.d.and(c.a.textInputFocus,_.a.AcceptSuggestionsOnEnter,_.a.MakesTextEdit),primary:3}})),Object(h.g)(new ut({id:"hideSuggestWidget",precondition:_.a.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:9,secondary:[1033]}})),Object(h.g)(new ut({id:"selectNextSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(h.g)(new ut({id:"selectNextPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:12,secondary:[2060]}})),Object(h.g)(new ut({id:"selectLastSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Object(h.g)(new ut({id:"selectPrevSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(h.g)(new ut({id:"selectPrevPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:11,secondary:[2059]}})),Object(h.g)(new ut({id:"selectFirstSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Object(h.g)(new ut({id:"toggleSuggestionDetails",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266}}})),Object(h.g)(new ut({id:"toggleSuggestionFocus",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2570,mac:{primary:778}}}))},function(e,t,o){"use strict";o.r(t);o(476);var n=o(0),i=o(39),r=o(15),s=o(82),a=o(89),l=o(2),u=o(3),c=o(16),h=o(1),d=o(9),g=o(11),p=o(25),f=o(13),m=o(48);function _(e,t,o){var n=g.m.ordered(e).map((function(n){return Promise.resolve(n.provideHover(e,t,o)).then((function(e){return e&&(o=void 0!==(t=e).range,n=void 0!==t.contents&&t.contents&&t.contents.length>0,o&&n)?e:void 0;var t,o,n}),(function(e){Object(f.f)(e)}))}));return Promise.all(n).then((function(e){return Object(p.c)(e)}))}Object(u.e)("_executeHoverProvider",(function(e,t){return _(e,t,m.a.None)}));var y,v=o(17),b=function(){function e(t,o,n,i){var r=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new v.c((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new v.c((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new v.c((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=o,this._errorCallback=n,this._progressCallback=i}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(v.i)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):Object(f.e)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}(),E=o(59),C=o(81),S=o(6),T=(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),w=function(e){function t(t,o){var n=e.call(this)||this;return n.disposables=[],n.allowEditorOverflow=!0,n._id=t,n._editor=o,n._isVisible=!1,n._containerDomNode=document.createElement("div"),n._containerDomNode.className="monaco-editor-hover hidden",n._containerDomNode.tabIndex=0,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover-content",n.scrollbar=new C.a(n._domNode,{}),n.disposables.push(n.scrollbar),n._containerDomNode.appendChild(n.scrollbar.getDomNode()),n.onkeydown(n._containerDomNode,(function(e){e.equals(9)&&n.hide()})),n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.onDidLayoutChange((function(e){return n.updateMaxHeight()})),n.updateMaxHeight(),n._editor.addContentWidget(n),n._showAtPosition=null,n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new d.a(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[c.a.ABOVE,c.a.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=Object(S.d)(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,o=t.fontSize,n=t.lineHeight;this._domNode.style.fontSize=o+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.maxHeight=e+"px"},t}(E.a),k=function(e){function t(t,o){var n=e.call(this)||this;return n._id=t,n._editor=o,n._isVisible=!1,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover hidden",n._domNode.setAttribute("aria-hidden","true"),n._domNode.setAttribute("role","presentation"),n._showAtLineNumber=-1,n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.addOverlayWidget(n),n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),o=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),i=this._editor.getConfiguration().lineHeight,r=o-n-(this._domNode.clientHeight-i)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),o=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(o).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(E.a),O=o(71),R=o(26),N=o(4),L=function(){function e(e,t,o){this.presentationIndex=o,this._onColorFlushed=new N.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new N.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new N.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var o=0;othis._editor.getModel().getLineCount())return[];var o=z.ColorDetector.get(this._editor),n=this._editor.getModel().getLineMaxColumn(t),i=this._editor.getLineDecorations(t),r=!1;return i.map((function(i){var s=i.range.startLineNumber===t?i.range.startColumn:1,a=i.range.endLineNumber===t?i.range.endColumn:n;if(s>e._range.startColumn||e._range.endColumn>a)return null;var u=new l.a(e._range.startLineNumber,s,e._range.startLineNumber,a),c=o.getColorData(i.range.getStartPosition());if(!r&&c){r=!0;var h=c.colorInfo,d=h.color,g=h.range;return new q(g,d,c.provider)}if(Object(O.b)(i.options.hoverMessage))return null;var p=void 0;return i.options.hoverMessage&&(p=Array.isArray(i.options.hoverMessage)?i.options.hoverMessage.slice():[i.options.hoverMessage]),{contents:p,range:u}})).filter((function(e){return!!e}))},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof q?-1:t instanceof q?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new O.a).appendText(n.a("modesContentHover.loading","Loading..."))]}},e}(),J=function(e){function t(o,n,i){var r=e.call(this,t.ID,o)||this;return r._themeService=i,r.renderDisposable=S.a.None,r._computer=new $(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._markdownRenderer=n,r._register(n.onDidRenderCodeBlock(r.onContentsChange,r)),r._hoverOperation=new b(r._computer,(function(e){return r._withResult(e,!0)}),null,(function(e){return r._withResult(e,!1)})),r._register(h.j(r.getDomNode(),h.d.FOCUS,(function(){r._colorPicker&&h.f(r.getDomNode(),"colorpicker-hover")}))),r._register(h.j(r.getDomNode(),h.d.BLUR,(function(){h.G(r.getDomNode(),"colorpicker-hover")}))),r._register(o.onDidChangeConfiguration((function(e){r._hoverOperation.setHoverTime(r._editor.getConfiguration().contribInfo.hover.delay)}))),r}return Y(t,e),t.prototype.dispose=function(){this.renderDisposable.dispose(),this.renderDisposable=S.a.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,o){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,r=this._messages.length;i=e.endColumn&&n.push(s)}if(n.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var o=0;o0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,o){var n=this;this.renderDisposable.dispose(),this._colorPicker=null;var i,r=Number.MAX_VALUE,s=o[0].range,a=document.createDocumentFragment(),u=!0,c=!1;o.forEach((function(t){if(t.range)if(r=Math.min(r,t.range.startColumn),s=l.a.plusRange(s,t.range),t instanceof q){c=!0;var o=t.color,h=o.red,g=o.green,p=o.blue,f=o.alpha,_=new A.c(255*h,255*g,255*p,f),y=new A.a(_),v=n._editor.getModel(),b=new l.a(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),E={range:t.range,color:t.color},C=new L(y,[],0),T=new G(a,C,n._editor.getConfiguration().pixelRatio,n._themeService);Object(K.a)(v,E,t.provider,m.a.None).then((function(o){C.colorPresentations=o;var s=n._editor.getModel().getValueInRange(t.range);C.guessColorPresentation(y,s);var u=function(){var e,t;C.presentation.textEdit?(e=[C.presentation.textEdit],t=(t=new l.a(C.presentation.textEdit.range.startLineNumber,C.presentation.textEdit.range.startColumn,C.presentation.textEdit.range.endLineNumber,C.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+C.presentation.textEdit.text.length)):(e=[{identifier:null,range:b,text:C.presentation.label,forceMoveMarkers:!1}],t=b.setEndPosition(b.endLineNumber,b.startColumn+C.presentation.label.length)),n._editor.executeEdits("colorpicker",e),C.presentation.additionalTextEdits&&(e=C.presentation.additionalTextEdits.slice(),n._editor.executeEdits("colorpicker",e),n.hide()),n._editor.pushUndoStop(),b=t},c=function(e){return Object(K.a)(v,{range:b,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,m.a.None).then((function(e){C.colorPresentations=e}))},h=C.onColorFlushed((function(e){c(e).then(u)})),g=C.onDidChangeColor(c);n._colorPicker=T,n.showAt(new d.a(e.startLineNumber,r),n._shouldFocus),n.updateContents(a),n._colorPicker.layout(),n.renderDisposable=Object(S.c)([h,g,T,i])}))}else t.contents.filter((function(e){return!Object(O.b)(e)})).forEach((function(e){var t=n._markdownRenderer.render(e);i=t,a.appendChild(X("div.hover-row",null,t.element)),u=!1}))})),c||u||(this.showAt(new d.a(e.startLineNumber,r),this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:s,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=R.a.register({className:"hoverHighlight"}),t}(w);var Z=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Q=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),o=[],n=0,i=t.length;n0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var o=this;Object(S.d)(this._renderDisposeables),this._renderDisposeables=[];var n=document.createDocumentFragment();t.forEach((function(e){var t=o._markdownRenderer.render(e.value);o._renderDisposeables.push(t),n.appendChild(Object(h.a)("div.hover-row",null,t.element))})),this.updateContents(n),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(k),te=o(5),oe=o(160);o.d(t,"ModesHoverController",(function(){return se}));var ne=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ie=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(e,t){return function(o,n){t(o,n,e)}},se=function(){function e(e,t,o,n){var i=this;this._editor=e,this._openerService=t,this._modeService=o,this._themeService=n,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.contribInfo&&(i._hideWidgets(),i._unhookEvents(),i._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},o=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=o.enabled,this._isHoverSticky=o.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.push(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.push(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.push(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.push(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook=Object(S.d)(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID?t===c.b.OVERLAY_WIDGET&&e.target.detail===ee.ID||(t!==c.b.OVERLAY_WIDGET&&e.target.detail!==ee.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,o=r.d?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID||o)&&(!this._isHoverSticky||t!==c.b.OVERLAY_WIDGET||e.target.detail!==ee.ID||o)){if(t===c.b.CONTENT_EMPTY){var n=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToTextg)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=o}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],o=function(o,n){var i=t[t.length-1];return e.getStartLineNumber(i)<=o&&e.getEndLineNumber(i)>=n},n=0,i=this._startIndexes.length;n16777215||s>16777215)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;t.length>0&&!o(r,s);)t.pop();var a=t.length>0?t[t.length-1]:-1;t.push(n),this._startIndexes[n]=r+((255&a)<<24),this._endIndexes[n]=s+((65280&a)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return 16777215&this._startIndexes[e]},e.prototype.getEndLineNumber=function(e){return 16777215&this._endIndexes[e]},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,o=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return t===g?-1:t},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,o=this._startIndexes.length;if(0===o)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}(),m=function(){function e(e,t){this._updateEventEmitter=new d.a,this._textModel=e,this._decorationProvider=t,this._regions=new p(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var o={};this._decorationProvider.changeDecorations((function(n){for(var i=0,r=e;i=h))break;i(a,c===h),a++}}l=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],o=0,n=e;o=0;){var r=this._regions.toRegion(n);t&&!t(r,i)||o.push(r),i++,n=r.parentIndex}return o},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var o=[],n=t&&2===t.length,i=n?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,l=this._regions.length;a0&&!u.containedBy(i[i.length-1]);)i.pop();i.push(u),t(u,i.length)&&o.push(u)}else t&&!t(u)||o.push(u)}return o},e}();function _(e,t,o,n){void 0===o&&(o=Number.MAX_VALUE);var i=[];if(n&&n.length>0)for(var r=0,s=n;r1)){var u=e.getRegionsInside(l,(function(e,n){return e.isCollapsed!==t&&n=0;s--)if(o!==i.isCollapsed(s)){var a=i.getStartLineNumber(s);t.test(n.getLineContent(a))&&r.push(i.toRegion(s))}e.toggleCollapseState(r)}function b(e,t,o){for(var n=e.regions,i=[],r=n.length-1;r>=0;r--)o!==n.isCollapsed(r)&&t===n.getType(r)&&i.push(n.toRegion(r));e.toggleCollapseState(i)}var E=o(18),C=o(26),S=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}(),T=o(5),w=o(2),k=o(25),O=function(){function e(e){var t=this;this._updateEventEmitter=new d.a,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],o=0,n=0,i=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;o0},e.prototype.isHidden=function(e){return null!==R(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,o=!1,n=this._foldingModel.textModel,i=null,r=function(e){return i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=R(t._hiddenRanges,e)),i?i.startLineNumber-1:null},s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function R(e,t){var o=Object(k.f)(e,(function(e){return t=0&&e[o].endLineNumber>=t?e[o]:null}var N=o(32),L=5e3,I="indent",D=function(){function e(e){this.editorModel=e,this.id=I}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=N.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),o=t&&t.offSide,n=t&&t.markers;return u.b.as(function(e,t,o,n){void 0===n&&(n=L);var i=e.getOptions().tabSize,r=new A(n),s=void 0;o&&(s=new RegExp("("+o.start.source+")|(?:"+o.end.source+")"));var a=[];a.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var l=e.getLineCount();l>0;l--){var u=e.getLineContent(l),c=C.b.computeIndentLevel(u,i),h=a[a.length-1];if(-1!==c){var d=void 0;if(s&&(d=u.match(s))){if(!d[1]){a.push({indent:-2,line:l,marker:!0});continue}for(var g=a.length-1;g>0&&!a[g].marker;)g--;if(g>0){a.length=g+1,h=a[g],r.insertFirst(l,h.line,c),h.marker=!1,h.indent=c,h.line=l;continue}}if(h.indent>c){do{a.pop(),h=a[a.length-1]}while(h.indent>c);var p=h.line-1;p-l>=1&&r.insertFirst(l,p,c)}h.indent===c?h.line=l:a.push({indent:c,line:l,marker:!1})}else t&&!h.marker&&(h.line=l)}return r.toIndentRanges(e)}(this.editorModel,o,n))},e}(),A=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,o){if(!(e>16777215||t>16777215)){var n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,o<1e3&&(this._indentOccurrences[o]=(this._indentOccurrences[o]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),o=new Uint32Array(this._length),n=this._length-1,i=0;n>=0;n--,i++)t[i]=this._startIndexes[n],o[i]=this._endIndexes[n];return new p(t,o)}var r=0,s=this._indentOccurrences.length;for(n=0;nthis._foldingRangesLimit){s=n;break}r+=a}}var l=e.getOptions().tabSize;for(t=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),n=this._length-1,i=0;n>=0;n--){var u=this._startIndexes[n],c=e.getLineContent(u),h=C.b.computeIndentLevel(c,l);(h0&&l.end>l.start&&l.end<=r&&n.push({start:l.start,end:l.end,rank:i,kind:l.kind})}}}),M.f)}));return u.b.join(i).then((function(e){return n}))}(this.providers,this.editorModel,e).then((function(e){return e?V(e,t.limit):null}))},e.prototype.dispose=function(){},e}();var U=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,o,n){if(!(e>16777215||t>16777215)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._nestingLevels[i]=n,this._types[i]=o,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),o=0;othis._foldingRangesLimit){i=o;break}n+=r}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var s=[],a=(o=0,0);oi.start)if(l.end<=i.end)r.push(i),i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length);else{if(l.start>i.end){do{i=r.pop()}while(i&&l.start>i.end);i&&r.push(i),i=l}n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}}else i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}return n.toIndentRanges()}var W="init",j=function(){function e(e,t,o,n){if(this.editorModel=e,this.id=W,t.length){this.decorationIds=e.deltaDecorations([],t.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:E.h.NeverGrowsWhenTypingAtEdges}}}))),this.timeout=setTimeout(o,n)}}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var o=0,n=this.decorationIds;o0&&(this.rangeProvider=new H(e,o))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=Object(s.i)((function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)}));return u.b.wrap(t.then((function(o){if(o&&t===e.foldingRegionPromise){var n=e.editor.getSelections(),i=n?n.map((function(e){return e.startLineNumber})):[];e.foldingModel.update(o,i)}return e.foldingModel})))})))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then((function(t){if(t){var o=e.editor.getSelections();if(o&&o.length>0){for(var n=[],i=function(o){var i=o.selectionStartLineNumber;e.hiddenRangeModel.isHidden(i)&&n.push.apply(n,t.getAllRegionsAtLine(i,(function(e){return e.isCollapsed&&i>e.startLineNumber})))},r=0,s=o;r=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()}))),this._disposables.push(P.j(this._domNode,"click",(function(e){t._editor.focus();var o=P.u(t._domNode),n=o.top,i=o.height,r=t._editor.getConfiguration().lineHeight,s=Math.floor(r/3);t._position&&t._position.position.lineNumber0?n.isEmpty()&&e.every((function(e){return e.kind&&O.Refactor.contains(e.kind)}))?t.hide():t._show():t.hide()})).catch((function(e){t.hide()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var o=this._model.position.lineNumber,n=this._editor.getModel();if(n){var i=n.getOptions().tabSize,r=n.getLineContent(o),s=U.b.computeIndentLevel(r,i),a=o;t.fontInfo.spaceWidth*s>22||(o>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[H.a.EXACT],e}(),W=(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),j=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},G=function(e,t){return function(o,n){t(o,n,e)}},z=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},K=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=i)return null;for(var r=[],s=n;s<=i;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())})),!0===o&&(a=a.reverse()),{startLineNumber:n,endLineNumber:i,before:r,after:a}}var u=o(8),c=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var o=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var o=t.length-2;o>=0;o--)t[o].lineNumber===t[o+1].lineNumber&&t.splice(o,1);for(var n=[],i=0,a=0,l=t.length,c=1,h=e.getLineCount();c<=h;c++){var d=e.getLineContent(c),g=d.length+1,p=0;if(!(a1&&(o-=1,i=e.getLineMaxColumn(o)),t.addTrackedEditOperation(new s.a(o,i,n,r),null)}},e.prototype.computeCursorState=function(e,t){var o=t.getInverseEditOperations()[0].range;return new g.a(o.endLineNumber,this.restoreCursorToColumn,o.endLineNumber,this.restoreCursorToColumn)},e}(),y=o(32),v=o(126);function b(e,t){for(var o=0,n=0;n=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var S=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,a);if(null!==S){C=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(S,i))!==(R=b(C,i))){var T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}else t.addEditOperation(new s.a(n.startLineNumber,1,n.startLineNumber,1),f+"\n")}else{var w;if(d=n.startLineNumber-1,p=e.getLineContent(d),t.addEditOperation(new s.a(d,1,d+1,1),null),t.addEditOperation(new s.a(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+p),this.shouldAutoIndent(e,n))if(l.getLineContent=function(t){return t===d?e.getLineContent(n.startLineNumber):e.getLineContent(t)},null!==(w=this.matchEnterRule(e,a,i,n.startLineNumber,n.startLineNumber-2)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,n,i,r,w);else{var k=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(n.startLineNumber,1),d,a);if(null!==k){var O,R,N=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(k,i))!==(R=b(N,i))){T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}}this._selectionId=t.trackSelection(n)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var o=v.a.shiftIndentCount(t,t.length+1,e),n="",i=0;i=1;){var l=void 0;if(l=a===i&&void 0!==r?r:e.getLineContent(a),u.lastNonWhitespaceIndex(l)>=0)break;a--}if(a<1||n>e.getLineCount())return null;var c=e.getLineMaxColumn(a),h=y.a.getEnterAction(e,new s.a(a,c,a,c));if(h){var d=h.indentation,g=h.enterAction;g.indentAction===C.a.None?d=h.indentation+g.appendText:g.indentAction===C.a.Indent?d=h.indentation+g.appendText:g.indentAction===C.a.IndentOutdent?d=h.indentation:g.indentAction===C.a.Outdent&&(d=t.unshiftIndent(h.indentation)+g.appendText);var p=e.getLineContent(n);if(this.trimLeft(p).indexOf(this.trimLeft(d))>=0){var f=u.getLeadingWhitespace(e.getLineContent(n)),m=u.getLeadingWhitespace(d);return 2&y.a.getIndentMetadata(e,n)&&(m=t.unshiftIndent(m)),b(m,o)-b(f,o)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var o=e.getLanguageIdAtPosition(t.startLineNumber,1);return o===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==y.a.getIndentRulesSupport(o)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,o,n,i,r){for(var a=o.startLineNumber;a<=o.endLineNumber;a++){var l=e.getLineContent(a),c=u.getLeadingWhitespace(l),h=E(b(c,n)+r,n,i);h!==c&&(t.addEditOperation(new s.a(a,1,a,c.length+1),h),a===o.endLineNumber&&o.endColumn<=c.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var o=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(o=o.setEndPosition(o.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&o.startLineNumber0){var s=t.startLineNumber-i;r=new g.a(s,t.startColumn,s,t.startColumn)}else r=new g.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);i+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?o=r:n.push(r)})),o&&n.unshift(o),n},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),o=e.getModel();return t.sort(s.a.compareRangesUsingStarts),t=t.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:o.getLineContent(t).length+1;return new s.a(t,n,e.startLineNumber,1)}return new s.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e}))},t}(G),K=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:n.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:h.a.writable,kbOpts:{kbExpr:h.a.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return R(t,e),t.prototype._getEndCursorState=function(e,t){for(var o,n=[],i=0,r=t.length;ie.endLineNumber+1?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));i.push(a);for(var l=t.getModel(),u=[],c=[],h=n,d=0,p=0,f=i.length;p=1){var O=!0;""===S&&(O=!1),!O||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(O=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var R=w.substr(k-1);S+=(O?" ":"")+R,y=O?R.length+1:R.length}else y=0}var N=new s.a(_,1,v,b);if(!N.isEmpty()){var L=void 0;m.isEmpty()?(u.push(r.a.replace(N,S)),L=new g.a(N.startLineNumber-d,S.length-y+1,_-d,S.length-y+1)):m.startLineNumber===m.endLineNumber?(u.push(r.a.replace(N,S)),L=new g.a(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(u.push(r.a.replace(N,S)),L=new g.a(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,S.length-E)),null!==s.a.intersectRanges(N,n)?h=L:c.push(L)}d+=N.endLineNumber-N.startLineNumber}c.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,u,c),t.pushUndoStop()},t}(f.b),X=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:h.a.writable})||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=c){if(u.lineNumber===n.getLineCount())continue;var h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.a(new g.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p))}else{h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber,u.column+1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.b(h,p,new g.a(u.lineNumber,u.column+1,u.lineNumber,u.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()},t}(f.b),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=c.a,A=function(e){function t(o){var n=e.call(this)||this;return n._onHint=n._register(new m.a),n.onHint=n._onHint.event,n._onCancel=n._register(new m.a),n.onCancel=n._onCancel.event,n.editor=o,n.enabled=!1,n.triggerCharactersListeners=[],n.throttledDelayer=new p.c((function(){return n.doTrigger()}),t.DELAY),n.active=!1,n._register(n.editor.onDidChangeConfiguration((function(){return n.onEditorConfigurationChange()}))),n._register(n.editor.onDidChangeModel((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeCursorSelection((function(e){return n.onCursorChange(e)}))),n._register(n.editor.onDidChangeModelContent((function(e){return n.onModelContentChange()}))),n._register(d.t.onDidChange(n.onModelChanged,n)),n.onEditorConfigurationChange(),n.onModelChanged(),n}return N(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0),this.provideSignatureHelpRequest&&(this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),d.t.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;this.provideSignatureHelpRequest&&this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=Object(p.i)((function(t){return b(e.editor.getModel(),e.editor.getPosition(),t)})),this.provideSignatureHelpRequest.then((function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var o={hints:t};return e._onHint.fire(o),!0})).catch(f.e)},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.cancel(),this.triggerCharactersListeners=Object(i.d)(this.triggerCharactersListeners);var t=this.editor.getModel();if(t){for(var o=new S.b,n=0,r=d.t.ordered(t);n1;c.N(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var o=c.k(this.signature,D(".code")),r=t.parameters.length>0,s=this.editor.getConfiguration().fontInfo;if(o.style.fontSize=s.fontSize+"px",o.style.fontFamily=s.fontFamily,r)this.renderParameters(o,t,this.hints.activeParameter);else c.k(o,D("span")).textContent=t.label;Object(i.d)(this.renderDisposeables),this.renderDisposeables=[];var a=t.parameters[this.hints.activeParameter];if(a&&a.documentation){var l=D("span.documentation");if("string"==typeof a.documentation)l.textContent=a.documentation;else{var u=this.markdownRenderer.render(a.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),l.appendChild(u.element)}c.k(this.docs,D("p",null,l))}if(c.N(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation)c.k(this.docs,D("p",null,t.documentation));else{u=this.markdownRenderer.render(t.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),c.k(this.docs,u.element)}var d=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(d+="/"+this.hints.signatures.length),this.overloads.textContent=d,a){var g=a.label;this.announcedLabel!==g&&(h.a(n.a("hint","{0}, hint",g)),this.announcedLabel=g)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,o){for(var n,i=t.label.length,r=0,s=t.parameters.length-1;s>=0;s--){var a=t.parameters[s],l=0,u=0;(r=t.label.lastIndexOf(a.label,i-1))>=0&&(l=r,u=r+a.label.length),(n=document.createElement("span")).textContent=t.label.substring(u,i),c.E(e,n),(n=document.createElement("span")).className="parameter "+(s===o?"active":""),n.textContent=t.label.substring(l,u),c.E(e,n),i=l}(n=document.createElement("span")).textContent=t.label.substring(0,i),c.E(e,n)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=Object(i.d)(this.disposables),this.renderDisposeables=Object(i.d)(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=L([I(1,a.e),I(2,k.a),I(3,O.a)],e)}();Object(T.e)((function(e,t){var o=e.getColor(w.w);if(o){var n=e.type===T.b?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+n+"px solid "+o+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+o.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+o.transparent(.5)+"; }")}var i=e.getColor(w.v);i&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+i+"; }");var r=e.getColor(w.qb);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(w.pb);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")})),o.d(t,"TriggerParameterHintsAction",(function(){return H}));var M=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(P,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=Object(i.d)(this.widget)},e.ID="editor.controller.parameterHints",e=x([B(1,r.a)],e)}(),H=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.a.hasSignatureHelpProvider,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3082,weight:100}})||this}return M(t,e),t.prototype.run=function(e,t){var o=F.get(t);o&&o.trigger()},t}(l.b);Object(l.h)(F),Object(l.f)(H);var U=l.c.bindToContribution(F.get);Object(l.g)(new U({id:"closeParameterHints",precondition:v.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(l.g)(new U({id:"showPrevParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object(l.g)(new U({id:"showNextParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(39),s=o(5),a=o(3),l=o(53),u=o(9),c=o(2),h=o(23),d=o(32),g=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,o){if(o<0)return!1;var n=t.length;if(o+n>e.length)return!1;for(var i=0;i=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,o,n,i){var r,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn,h=n.getLineContent(s),d=n.getLineContent(l),g=o.blockCommentStartToken,p=o.blockCommentEndToken,f=h.lastIndexOf(g,a-1+g.length),m=d.indexOf(p,u-1-p.length);if(-1!==f&&-1!==m)if(s===l){h.substring(f+g.length,m).indexOf(p)>=0&&(f=-1,m=-1)}else{var _=h.substring(f+g.length),y=d.substring(0,m);(_.indexOf(p)>=0||y.indexOf(p)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(f+g.length0&&32===d.charCodeAt(m-1)&&(p=" "+p,m-=1),r=e._createRemoveBlockCommentOperations(new c.a(s,f+g.length+1,l,m+1),g,p)):(r=e._createAddBlockCommentOperations(t,g,p),this._usedEndToken=1===r.length?p:null);for(var v=0;va?r-1:r}},e}(),m=o(38),_=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),y=function(e){function t(t,o){var n=e.call(this,o)||this;return n._type=t,n}return _(t,e),t.prototype.run=function(e,t){var o=t.getModel();if(o){for(var n=[],i=t.getSelections(),r=o.getOptions(),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},P=function(e,t){return function(o,n){t(o,n,e)}};function M(e){if((e=e.filter((function(e){return e.range}))).length){for(var t=e[0].range,o=1;o1)){var o=this.editor.getModel(),n=this.editor.getPosition(),i=!1,s=this.editor.onDidChangeModelContent((function(e){if(e.isFlush)return i=!0,void s.dispose();for(var t=0,o=e.changes.length;t1)){var o=this.editor.getModel(),n=o.getOptions(),i=n.tabSize,s=n.insertSpaces,a=new N.a(this.editor,5);v(o,e,{tabSize:i,insertSpaces:s}).then((function(e){return t.workerService.computeMoreMinimalEdits(o.uri,e)})).then((function(e){a.validate(t.editor)&&!Object(r.k)(e)&&(S.execute(t.editor,e),M(e))}))}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=Object(a.d)(this.callOnDispose),this.callOnModel=Object(a.d)(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=A([P(1,k.a)],e)}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(k.a),i=e.get(I.a),s=this._getFormattingEdits(t);if(!s)return l.b.as(void 0);var a=new N.a(t,5);return s.then((function(e){return n.computeMoreMinimalEdits(t.getModel().uri,e)})).then((function(e){a.validate(t)&&!Object(r.k)(e)&&(S.execute(t,e),M(e),t.focus())}),(function(e){if(!(e instanceof Error&&e.name===y.Name))throw e;o._notifyNoProviderError(i,t.getModel().getLanguageIdentifier().language)}))},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.provider","There is no formatter for '{0}'-files installed.",t))},t}(c.b),H=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:i.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:L.a.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions();return b(t,{tabSize:o.tabSize,insertSpaces:o.insertSpaces})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.documentprovider","There is no document formatter for '{0}'-files installed.",t))},t}(F),U=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:i.a("formatSelection.label","Format Selection"),alias:"Format Code",precondition:u.d.and(L.a.writable,L.a.hasNonEmptySelection),kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(s.a)(2089,2084),weight:100},menuOpts:{when:u.d.and(L.a.hasDocumentSelectionFormattingProvider,L.a.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions(),n=o.tabSize,i=o.insertSpaces;return v(t,e.getSelection(),{tabSize:n,insertSpaces:i})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.selectionprovider","There is no selection formatter for '{0}'-files installed.",t))},t}(F);Object(c.h)(x),Object(c.h)(B),Object(c.f)(H),Object(c.f)(U),T.a.registerCommand("editor.action.format",(function(e){var t=e.get(w.a).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=e.getSelection(),n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;return o.isEmpty()?b(t,{tabSize:i,insertSpaces:r}):v(t,o,{tabSize:i,insertSpaces:r})},t}(F))).run(e,t)}))},function(e,t,o){"use strict";o.r(t);var n=o(17),i=o(13),r=o(6),s=o(90),a=o(3),l=o(11),u=(o(434),o(8)),c=o(1),h=o(2),d=o(16),g=o(26),p=o(29),f=o(19),m=o(7),_=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())},e}(),y=function(){function e(t,o,n,i){var r=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(o),this._domNode=document.createElement("span"),this._domNode.innerHTML=" ",c.f(this._domNode,"codelens-decoration"),c.f(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration((function(e){return e.fontInfo&&r._updateHeight()}))),this._disposables.push(c.g(this._domNode,"click",(function(e){var o=e.target;if("A"===o.tagName&&o.id){var s=r._commands[o.id];s&&(t.focus(),n.executeCommand.apply(n,[s.id].concat(s.arguments)).done(void 0,(function(e){i.error(e)})))}}))),this.updateVisibility()}return e.prototype.dispose=function(){Object(r.d)(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,o=e.lineHeight;this._domNode.style.height=Math.round(1.1*o)+"px",this._domNode.style.lineHeight=o+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML=" "},e.prototype.updateVisibility=function(){this.isVisible()&&(c.G(this._domNode,"invisible-cl"),c.f(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],o=0;o{1}",o,i),this._commands[o]=n):r=Object(u.format)("{0}",i),t.push(r)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,o=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:o},preference:[d.a.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),v=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),o=0,n=t.length;o a:hover { color: "+n+" !important; }")}));var E=o(37),C=o(45),S=o(25),T=o(33),w=o(60),k=o(48);function O(e,t){var o=[],n=l.c.ordered(e),r=n.map((function(n){return Promise.resolve(n.provideCodeLenses(e,t)).then((function(e){if(Array.isArray(e))for(var t=0,i=e;tt.symbol.range.startLineNumber?1:n.indexOf(e.provider)n.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0}))}))}Object(a.j)("_executeCodeLensProvider",(function(e,t){var o=t.resource,n=t.itemResolveCount;if(!(o instanceof T.a))throw Object(i.b)();var r=e.get(w.a).getModel(o);if(!r)throw Object(i.b)();var s=[];return O(r,k.a.None).then((function(e){for(var t=[],o=0,i=e;o0&&t.push(Promise.resolve(a.provider.resolveCodeLens(r,a.symbol,k.a.None)).then((function(e){return s.push(e)})))}return Promise.all(t)})).then((function(){return s}))})),o.d(t,"CodeLensContribution",(function(){return L}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},N=function(e,t){return function(o,n){t(o,n,e)}},L=function(){function e(e,t,o){var n=this;this._editor=e,this._commandService=t,this._notificationService=o,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeModelLanguage((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n._editor.getConfiguration().contribInfo.codeLens,t!==n._isEnabled&&n._onModelChange()}))),this._globalToDispose.push(l.c.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=Object(r.d)(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=null),this._localToDispose=Object(r.d)(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&l.c.has(t)){for(var o=0,a=l.c.all(t);o0&&e._detectVisibleLenses.schedule()}))),this._localToDispose.push(this._editor.onDidLayoutChange((function(t){e._detectVisibleLenses.schedule()}))),this._localToDispose.push(Object(r.f)((function(){if(e._editor.getModel()){var t=s.b.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(o){e._disposeAllLenses(t,o)}))})),t.restore(e._editor)}else e._disposeAllLenses(null,null)}))),h.schedule()}},e.prototype._disposeAllLenses=function(e,t){var o=new v;this._lenses.forEach((function(e){return e.dispose(o,t)})),e&&o.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var o,n=this._editor.getModel().getLineCount(),i=[],r=0,a=e;rn||(o&&o[o.length-1].symbol.range.startLineNumber===u?o.push(l):(o=[l],i.push(o)))}var c=s.b.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(o){for(var n=0,r=0,s=new v;r0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(m),y=function(e){function t(){var t=e.call(this)||this;return t.elements=new _,t.elements.parent=t,t}return f(t,e),t}(m),v=function(e,t,o){this.range=e,this.bracket=t,this.bracketType=o};function b(e){var t=new m;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}var E=function(e,t,o){this.lineNumber=o,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)},C=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,o=e.lineText,n=e.type,i=e.startOffset,r=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=p.a.getBracketsSupport(this._cachedLanguageId));var s,a=this._cachedLanguageBrackets;if(!a||Object(d.b)(n))return new v(new l.a(t,i+1,t,r+1),0,null);do{if(s=g.a.findNextBracketInToken(a.forwardRegex,t,o,i,r)){var u=s.startColumn-1,c=s.endColumn-1;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=function(){function e(e){this._modelService=e}return e.prototype.getRangesToPosition=function(e,t){return s.b.as(this.getRangesToPositionSync(e,t))},e.prototype.getRangesToPositionSync=function(e,t){var o=this._modelService.getModel(e),n=[];return o&&this._doGetRangesToPosition(o,t).forEach((function(e){n.push({type:void 0,range:e})})),n},e.prototype._doGetRangesToPosition=function(e,t){var o,n;o=function e(t,o){if(t instanceof _&&t.isEmpty)return null;if(!l.a.containsPosition(t.range,o))return null;var n;if(t instanceof _){if(t.hasChildren)for(var i=0,r=t.children.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()},A=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(O),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,o=this.editor.getSelection(),n=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var i=s.b.as(null);return this._state||(i=this._tokenSelectionSupport.getRangesToPosition(n.uri,o.getStartPosition()).then((function(e){if(!r.k(e)){var o;e.filter((function(e){var o=t.editor.getSelection(),n=new l.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return n.containsPosition(o.getStartPosition())&&n.containsPosition(o.getEndPosition())})).forEach((function(e){var n=e.range,i=new D(t.editor);i.selection=new l.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn),o&&(i.next=o,o.previous=i),o=i}));var n=new D(t.editor);n.next=o,o&&(o.previous=n),t._state=n;var i=t.editor.onDidChangeCursorPosition((function(e){t._ignoreSelection||(t._state=null,i.dispose())}))}}))),i.then((function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}}))},e.ID="editor.contrib.smartSelectController",e=L([I(1,a.a)],e)}(),P=function(e){function t(t,o){var n=e.call(this,o)||this;return n._forward=t,n}return N(t,e),t.prototype.run=function(e,t){var o=A.get(t);if(o)return o.run(this._forward)},t}(c.b),M=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:i.a("smartSelect.grow","Expand Select"),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1553,mac:{primary:3345},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})||this}return N(t,e),t}(P),x=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:i.a("smartSelect.shrink","Shrink Select"),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1551,mac:{primary:3343},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})||this}return N(t,e),t}(P);Object(c.h)(A),Object(c.f)(M),Object(c.f)(x)},function(e,t,o){"use strict";o.r(t);o(482);var n=o(0),i=o(111),r=o(8),s=o(124),a=o(97),l=o(5),u=o(11),c=o(161),h=o(13),d=o(33),g=o(10),p=o(2),f=o(3),m=o(60),_=o(17);function y(e){var t=[],o=u.j.all(e).map((function(o){return Object(_.h)((function(t){return o.provideDocumentSymbols(e,t)})).then((function(e){Array.isArray(e)&&t.push.apply(t,e)}),(function(e){Object(h.f)(e)}))}));return g.b.join(o).then((function(){var e=[];return function e(t,o,n){for(var i=0,r=o;i0&&0===o.indexOf(":")){var f=null,m=null,_=0;for(c=0;c0)):_++}m&&m.setGroupLabel(this.typeToLabel(f,_))}else a.length>0&&a[0].setGroupLabel(n.a("symbols","symbols ({0})",a.length));return a},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.a("modules","modules ({0})",t);case"class":return n.a("class","classes ({0})",t);case"interface":return n.a("interface","interfaces ({0})",t);case"method":return n.a("method","methods ({0})",t);case"function":return n.a("function","functions ({0})",t);case"property":return n.a("property","properties ({0})",t);case"variable":return n.a("variable","variables ({0})",t);case"var":return n.a("variable2","variables ({0})",t);case"constructor":return n.a("_constructor","constructors ({0})",t);case"call":return n.a("call","calls ({0})",t)}return e},t.prototype.sortNormal=function(e,t,o){var n=t.getLabel().toLowerCase(),i=o.getLabel().toLowerCase(),r=n.localeCompare(i);if(0!==r)return r;var s=t.getRange(),a=o.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,o){e=e.substr(":".length);var n=t.getType(),i=o.getType(),r=n.localeCompare(i);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=o.getLabel().toLowerCase(),l=s.localeCompare(a);if(0!==l)return l}var u=t.getRange(),c=o.getRange();return u.startLineNumber-c.startLineNumber},t}(c.a);Object(f.f)(S)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(4),s=o(6),a=o(12),l=o(46),u=o(2),c=o(3),h=o(19),d=o(5),g=(o(471),o(1)),p=o(207),f=o(7),m=o(14),_=o(29),y=o(81),v=o(42),b=o(165),E=o(25),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S=function(){function e(e,t,o){var n=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var i=document.createElement("div");i.className="descriptioncontainer",i.setAttribute("aria-live","assertive"),i.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),i.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),i.appendChild(this._relatedBlock),this._disposables.push(g.j(this._relatedBlock,"click",(function(e){e.preventDefault();var t=n._relatedDiagnostics.get(e.target);t&&o(t)}))),this._scrollable=new y.b(i,{horizontal:v.b.Auto,vertical:v.b.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),g.f(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll((function(e){i.style.left="-"+e.scrollLeft+"px",i.style.top="-"+e.scrollTop+"px"}))),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){Object(s.d)(this._disposables)},e.prototype.update=function(e){var t=e.source,o=e.message,n=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var i=new Array(t.length+3+1).join(" "),r=o.split(/\r\n|\r|\n/g),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){var o=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new r.a,this._onMarkerSetChanged=new r.a,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose((function(){return o.dispose()}))),this._toUnbind.push(this._editor.onDidChangeCursorPosition((function(){o._ignoreSelectionChange||o.currentMarker&&u.a.containsPosition(o.currentMarker,o._editor.getPosition())||(o._nextIdx=-1)})))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){var t=this._nextIdx>=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(U.compareMarker),this._nextIdx=t?Math.max(-1,Object(E.b)(this._markers,t,U.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,o=this._editor.getPosition(),n=0;n0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:n=!0),o!==this._nextIdx){var i=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(i)}return n},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,o=this._markers;tthis.selection.endLineNumber?this.targetSelection=new u.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},_=function(e,t){return function(o,n){t(o,n,e)}},y=function(){function e(e,t){var o=this;this.themeService=t,this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration((function(e){e.fontInfo&&o.updateFont()}))),this._disposables.push(t.onThemeChange((function(e){return o.onThemeChange(e)})))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=Object(c.d)(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",Object(n.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont(),this.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(p.K),o=e.getColor(p.M),n=e.getColor(p.rb),i=e.getColor(p.L);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=o?o.toString():null,this._inputField.style.borderWidth=i?"1px":"0px",this._inputField.style.borderStyle=i?"solid":"none",this._inputField.style.borderColor=i?i.toString():"none",this._domNode.style.boxShadow=n?" 0 2px 8px "+n:null}},e.prototype.updateFont=function(){if(this._inputField){var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[d.a.BELOW,d.a.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(e){this._currentCancelInput&&this._currentCancelInput(e)},e.prototype.getInput=function(e,t,o,n){var i=this;this._position=new f.a(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",o.toString()),this._inputField.setAttribute("selectionEnd",n.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var s,a=[];return s=function(){Object(c.d)(a),i._hide()},new r.b((function(o){i._currentCancelInput=function(e){return i._currentAcceptInput=null,i._currentCancelInput=null,o(e),!0},i._currentAcceptInput=function(){0!==i._inputField.value.trim().length&&i._inputField.value!==t?(i._currentAcceptInput=null,i._currentCancelInput=null,o(i._inputField.value)):i.cancelInput(!0)};a.push(i._editor.onDidChangeCursorSelection((function(){h.a.containsPosition(e,i._editor.getPosition())||i.cancelInput(!0)}))),a.push(i._editor.onDidBlurEditorWidget((function(){return i.cancelInput(!1)}))),i._show()}),(function(){i._currentCancelInput(!0)})).then((function(e){return s(),e}),(function(e){return s(),r.b.wrapError(e)}))},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout((function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))}),100)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e=m([_(1,g.c)],e)}(),v=o(17),b=o(11),E=o(58),C=o(142),S=o(90),T=o(45),w=o(156),k=o(33),O=o(36);o.d(t,"rename",(function(){return M})),o.d(t,"RenameAction",(function(){return F}));var R,N=(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),L=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},A=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0},e.prototype.resolveRenameLocation=function(){return D(this,void 0,void 0,(function(){var e,t,o,n=this;return A(this,(function(i){switch(i.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,Object(v.h)((function(t){return e.resolveRenameLocation(n.model,n.position,t)}))]:[3,2];case 1:t=i.sent(),i.label=2;case 2:return t||(o=this.model.getWordAtPosition(this.position))&&(t={range:new h.a(this.position.lineNumber,o.startColumn,this.position.lineNumber,o.endColumn),text:o.word}),[2,t]}}))}))},e.prototype.provideRenameEdits=function(e,t,o,i){return void 0===t&&(t=0),void 0===o&&(o=[]),void 0===i&&(i=this.position),D(this,void 0,void 0,(function(){var i,r,s=this;return A(this,(function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:o.join("\n")}]:(i=this._provider[t],[4,Object(v.h)((function(t){return i.provideRenameEdits(s.model,s.position,e,t)}))]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,o.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,o.concat(n.a("no result","No result.")))]}}))}))},e}();function M(e,t,o){return D(this,void 0,void 0,(function(){return A(this,(function(n){return[2,new P(e,t).provideRenameEdits(o)]}))}))}var x=new s.f("renameInputVisible",!1),B=function(){function e(e,t,o,n,i,r){this.editor=e,this._notificationService=t,this._bulkEditService=o,this._progressService=n,this._renameInputField=new y(e,r),this._renameInputVisible=x.bindTo(i)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return D(this,void 0,void 0,(function(){var e,t,o,i,s,a,l,u=this;return A(this,(function(c){switch(c.label){case 0:if(e=this.editor.getPosition(),!(t=new P(this.editor.getModel(),e)).hasProvider())return[2,void 0];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return o=c.sent(),[3,4];case 3:return i=c.sent(),C.a.get(this.editor).showMessage(i,e),[2,void 0];case 4:return o?(s=this.editor.getSelection(),a=0,l=o.text.length,h.a.isEmpty(s)||h.a.spansMultipleLines(s)||!h.a.containsRange(o.range,s)||(a=Math.max(0,s.startColumn-o.range.startColumn),l=Math.min(o.range.endColumn,s.endColumn)-o.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(o.range,o.text,a,l).then((function(e){if(u._renameInputVisible.reset(),"boolean"!=typeof e){u.editor.focus();var i=new S.a(u.editor,15),s=r.b.wrap(t.provideRenameEdits(e,0,[],h.a.lift(o.range).getStartPosition()).then((function(t){if(!t.rejectReason)return u._bulkEditService.apply(t,{editor:u.editor}).then((function(t){t.ariaSummary&&Object(E.a)(n.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,e,t.ariaSummary))}));i.validate(u.editor)?C.a.get(u.editor).showMessage(t.rejectReason,u.editor.getPosition()):u._notificationService.info(t.rejectReason)}),(function(e){return u._notificationService.error(n.a("rename.failed","Rename failed to execute.")),r.b.wrapError(e)})));return u._progressService.showWhile(s,250),s}e&&u.editor.focus()}),(function(e){return u._renameInputVisible.reset(),r.b.wrapError(e)}))]):[2,void 0]}}))}))},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=L([I(1,T.a),I(2,w.a),I(3,a.a),I(4,s.e),I(5,g.c)],e)}(),F=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:s.d.and(u.a.writable,u.a.hasRenameProvider),kbOpts:{kbExpr:u.a.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return N(t,e),t.prototype.runCommand=function(t,o){var n=this,r=t.get(O.a),s=o||[void 0,void 0],a=s[0],l=s[1];return k.a.isUri(a)&&f.a.isIPosition(l)?r.openCodeEditor({resource:a},r.getActiveCodeEditor()).then((function(e){e.setPosition(l),e.invokeWithinContext((function(t){return n.reportTelemetry(t,e),n.run(t,e)}))}),i.e):e.prototype.runCommand.call(this,t,o)},t.prototype.run=function(e,t){var o=B.get(t);if(o)return r.b.wrap(o.run())},t}(l.b);Object(l.h)(B),Object(l.f)(F);var H=l.c.bindToContribution(B.get);Object(l.g)(new H({id:"acceptRenameInput",precondition:x,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:3}})),Object(l.g)(new H({id:"cancelRenameInput",precondition:x,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:9,secondary:[1033]}})),Object(l.e)("_executeDocumentRenameProvider",(function(e,t,o){var n=o.newName;if("string"!=typeof n)throw Object(i.b)("newName");return M(e,t,n)}))},function(e,t,o){"use strict";o.r(t);o(480);var n=o(0),i=o(13),r=o(15),s=o(82),a=o(3),l=o(11),u=o(16),c=o(33),h=o(10),d=o(2),g=o(17),p=o(37),f=o(60),m=o(48),_=function(){function e(e,t){this._link=e,this._provider=t}return e.prototype.toJSON=function(){return{range:this.range,url:this.url}},Object.defineProperty(e.prototype,"range",{get:function(){return this._link.range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._link.url},enumerable:!0,configurable:!0}),e.prototype.resolve=function(){var e=this;if(this._link.url)try{return h.b.as(c.a.parse(this._link.url))}catch(e){return h.b.wrapError(new Error("invalid"))}return"function"==typeof this._provider.resolveLink?Object(g.h)((function(t){return e._provider.resolveLink(e._link,t)})).then((function(t){return e._link=t||e._link,e._link.url?e.resolve():h.b.wrapError(new Error("missing"))})):h.b.wrapError(new Error("missing"))},e}();function y(e,t){var o=[],n=l.p.ordered(e).reverse().map((function(n){return Promise.resolve(n.provideLinks(e,t)).then((function(e){if(Array.isArray(e)){var t=e.map((function(e){return new _(e,n)}));o=function(e,t){var o,n,i,r,s=[];for(o=0,i=0,n=e.length,r=t.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},L=function(e,t){return function(o,n){t(o,n,e)}},I=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},D=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},b=function(e,t){return function(o,n){t(o,n,e)}},E=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,o){var n=this;this.currentRequest&&this.currentRequest.cancel();var i=this.editor.getSelection(),r=this.editor.getModel().uri;if(i.startLineNumber!==i.endLineNumber)return null;var l=new d.a(this.editor,5);return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=Object(m.i)((function(e){return n.editorWorkerService.navigateValueSet(r,i,o)})),this.currentRequest.then((function(o){if(o&&o.range&&o.value&&l.validate(n.editor)){var r=s.a.lift(o.range),u=o.range,c=o.value.length-(i.endColumn-i.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+o.value.length},c>1&&(i=new a.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+c-1));var d=new h(r,i,o.value);n.editor.pushUndoStop(),n.editor.executeCommand(t,d),n.editor.pushUndoStop(),n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[{range:u,options:e.DECORATION}]),n.decorationRemover&&n.decorationRemover.cancel(),n.decorationRemover=Object(m.m)(350),n.decorationRemover.then((function(){return n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[])})).catch(_.e)}})).catch(_.e)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=f.a.register({className:"valueSetReplacement"}),e=v([b(1,c.a)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:i.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3154,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!0))},t}(u.b),S=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:i.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3156,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!1))},t}(u.b);Object(u.h)(E),Object(u.f)(C),Object(u.f)(S),Object(g.e)((function(e,t){var o=e.getColor(p.d);o&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+o+"; }")}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n=o(76),i=o(30),r=o(2),s=o(6),a=o(4),l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(){function e(e,t){void 0===t&&(t={});var o=this;this._onDidUpdate=new a.a,this._editor=e,this._options=i.g(t,l,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose((function(){return o.dispose()}))),this._disposables.push(this._editor.onDidUpdateDiff((function(){return o._onDiffUpdated()}))),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){o.ignoreSelectionChange||(o.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel((function(e){o.revealFirst=!0}))),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new r.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new r.a(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){for(var t=!1,o=this._editor.getPosition(),n=0,i=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var o=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=o.range.getStartPosition();this._editor.setPosition(i),this._editor.revealPositionInCenter(i,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){Object(s.d)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}()},function(e,t,o){"use strict";o(490);var n,i=o(0),r=o(17),s=o(6),a=o(30),l=o(1),u=o(28),c=o(93),h=o(22),d=o(12),g=o(36),p=o(2),f=o(52),m=o(91),_=o(123),y=o(68),v=o(140),b=o(70),E=o(54),C=o(117),S=o(4),T=o(27),w=o(19),k=o(7),O=o(145),R=o(26),N=(o(491),o(87)),L=o(9),I=o(81),D=o(29),A=o(74),P=o(78),M=o(3),x=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),B=function(){function e(e,t,o,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=o,this.modifiedLineEnd=n}return e.prototype.getType=function(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0},e}(),F=function(e){this.entries=e},H=function(e){function t(t){var o=e.call(this)||this;return o._width=0,o._diffEditor=t,o._isVisible=!1,o.shadow=Object(u.b)(document.createElement("div")),o.shadow.setClassName("diff-review-shadow"),o.actionBarContainer=Object(u.b)(document.createElement("div")),o.actionBarContainer.setClassName("diff-review-actions"),o._actionBar=o._register(new A.a(o.actionBarContainer.domNode)),o._actionBar.push(new P.a("diffreview.close",i.a("label.close","Close"),"close-diff-review",!0,(function(){return o.hide(),null})),{label:!1,icon:!0}),o.domNode=Object(u.b)(document.createElement("div")),o.domNode.setClassName("diff-review monaco-editor-background"),o._content=Object(u.b)(document.createElement("div")),o._content.setClassName("diff-review-content"),o.scrollbar=o._register(new I.a(o._content.domNode,{})),o.domNode.domNode.appendChild(o.scrollbar.getDomNode()),o._register(t.onDidUpdateDiff((function(){o._isVisible&&(o._diffs=o._compute(),o._render())}))),o._register(t.getModifiedEditor().onDidChangeCursorPosition((function(){o._isVisible&&o._render()}))),o._register(t.getOriginalEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(t.getModifiedEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(l.j(o.domNode.domNode,"click",(function(e){e.preventDefault();var t=l.p(e.target,"diff-review-row");t&&o._goToRow(t)}))),o._register(l.j(o.domNode.domNode,"keydown",(function(e){(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),o._goToRow(o._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),o._goToRow(o._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),o.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),o.accept())}))),o._diffs=[],o._currentDiff=null,o}return x(t,e),t.prototype.prev=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,o=0,n=this._diffs.length;o0){var y=e[r-1];m=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,_=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var v=p-3+1,b=f-3+1;if(vS)O+=k=S-O,R+=k;if(R>T)O+=k=T-R,R+=k;d[g++]=new B(E,O,C,R),n[i++]=new F(d)}var N=n[0].entries,L=[],I=0;for(r=1,s=n.length;rp)&&(p=E),0!==C&&(0===f||Cm)&&(m=S)}var T=document.createElement("div");T.className="diff-review-row";var w=document.createElement("div");w.className="diff-review-cell diff-review-summary";var k=p-g+1,O=m-f+1;w.appendChild(document.createTextNode(c+1+"/"+this._diffs.length+": @@ -"+g+","+k+" +"+f+","+O+" @@")),T.setAttribute("data-line",String(f));var R=function(e){return 0===e?i.a("no_lines","no lines"):1===e?i.a("one_line","1 line"):i.a("more_lines","{0} lines",e)},N=R(k),L=R(O);T.setAttribute("aria-label",i.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",c+1,this._diffs.length,g,N,f,L)),T.appendChild(w),T.setAttribute("role","listitem"),d.appendChild(T);var I=f;for(_=0,y=h.length;_=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},X=function(e,t){return function(o,n){t(o,n,e)}},q=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){for(var o=0,n=t._zones.length;o0?i/o:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?o=i+1:(o=i,n=i)}return this._lineChanges[o]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-o;return s<=i?n+Math.min(s,r):n+r-i+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?o+Math.min(s,i):o+i-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=Y([X(2,m.a),X(3,d.e),X(4,h.a),X(5,g.a),X(6,w.c),X(7,G.a)],t)}(s.a),Z=function(e){function t(t){var o=e.call(this)||this;return o._dataSource=t,o}return K(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(k.i)||k.f).transparent(2),o=(e.getColor(k.k)||k.g).transparent(2),n=!t.equals(this._insertColor)||!o.equals(this._removeColor);return this._insertColor=t,this._removeColor=o,n},t.prototype.getEditorsDiffDecorations=function(e,t,o,n,i,r,s){i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),n=n.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,n,i,r,s,o),l=this._getOriginalEditorDecorations(e,t,o,r,s),u=this._getModifiedEditorDecorations(e,t,o,r,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.modified}}},t}(s.a),Q=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var o=e[e.length-1];if(o.afterLineNumber===t.afterLineNumber&&null===o.domNode)return void(o.heightInLines+=t.heightInLines)}e.push(t)},u=new Q(this.modifiedForeignVZ),c=new Q(this.originalForeignVZ),h=0,d=this.lineChanges.length;h<=d;h++){var g=h0?-1:0),i=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),o=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,t=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,r=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),s=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(r=n+=1e7+o,s=i+=1e7+t);for(var p,f=[],m=[];u.current&&u.current.afterLineNumber<=s;){var _=void 0;_=u.current.afterLineNumber<=i?n-i+u.current.afterLineNumber:r,f.push({afterLineNumber:_,heightInLines:u.current.heightInLines,domNode:null}),u.advance()}for(;c.current&&c.current.afterLineNumber<=r;){_=void 0;_=c.current.afterLineNumber<=n?i-n+c.current.afterLineNumber:s,m.push({afterLineNumber:_,heightInLines:c.current.heightInLines,domNode:null}),c.advance()}if(null!==g&&ae(g))(p=this._produceOriginalFromDiff(g,o,t))&&f.push(p);if(null!==g&&le(g))(p=this._produceModifiedFromDiff(g,o,t))&&m.push(p);var y=0,v=0;for(f=f.sort(a),m=m.sort(a);y=E.heightInLines?(b.heightInLines-=E.heightInLines,v++):(E.heightInLines-=b.heightInLines,y++)}for(;y2*t.MINIMUM_EDITOR_WIDTH?(no-t.MINIMUM_EDITOR_WIDTH&&(n=o-t.MINIMUM_EDITOR_WIDTH)):n=i,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-J.ENTIRE_DIFF_OVERVIEW_WIDTH,o=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=o/t,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,o,n,i){return new ie(e,t,o).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=n.getModel(),l=0,u=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:o-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,o){return t>o?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-o,domNode:null}:null},t}(ee),re=function(e){function t(t,o){var n=e.call(this,t)||this;return n.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,n._register(t.getOriginalEditor().onDidLayoutChange((function(e){n.decorationsLeft!==e.decorationsLeft&&(n.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),n}return K(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,o,n,i,r){return new se(e,t,o,n,i,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,l=e.length;a'])}d+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=a.build(),b.a.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var _=document.createElement("div");return _.className="inline-deleted-margin-view-zone",_.innerHTML=l.join(""),b.a.applyFontInfoSlow(_,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:d*h,domNode:m,marginDomNode:_}},t.prototype._renderOriginalLine=function(e,t,o,n,i,r,s){var a=t.getLineTokens(i),l=a.getLineContent(),u=_.a.filter(r,i,1,l.length+1);s.appendASCIIString('
    ');var c=E.d.isBasicASCII(l,t.mightContainNonBasicASCII()),h=E.d.containsRTL(l,c,t.mightContainRTL()),d=Object(y.c)(new y.b(o.fontInfo.isMonospace&&!o.viewInfo.disableMonospaceOptimizations,l,!1,c,h,0,a,u,n,o.fontInfo.spaceWidth,o.viewInfo.stopRenderingLineAfter,o.viewInfo.renderWhitespace,o.viewInfo.renderControlCharacters,o.viewInfo.fontLigatures),s);s.appendASCIIString("
    ");var g=d.characterMapping.getAbsoluteOffsets();return g.length>0?g[g.length-1]:0},t}(ee);function ae(e){return e.modifiedEndLineNumber>0}function le(e){return e.originalEndLineNumber>0}Object(w.e)((function(e,t){var o=e.getColor(k.i);o&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+o+"; }"));var n=e.getColor(k.k);n&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(k.j);i&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+i+"; }");var r=e.getColor(k.l);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(k.lb);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(k.h);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}))},function(e,t){var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,o){e.exports=o(328)},function(e,t,o){"use strict";(function(t,n){var i=o(180);e.exports=v;var r,s=o(265);v.ReadableState=y;o(212).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=o(268),u=o(181).Buffer,c=t.Uint8Array||function(){};var h=o(167);h.inherits=o(147);var d=o(329),g=void 0;g=d&&d.debuglog?d.debuglog("stream"):function(){};var p,f=o(330),m=o(269);h.inherits(v,l);var _=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(r=r||o(136));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=o(270).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(r=r||o(136),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function b(e,t,o,n,i){var r,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var o=t.decoder.end();o&&o.length&&(t.buffer.push(o),t.length+=t.objectMode?1:o.length)}t.ended=!0,T(e)}(e,s)):(i||(r=function(e,t){var o;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk"));var n;return o}(s,t)),r?e.emit("error",r):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!o?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):k(e,s)):E(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(w,e):w(e))}function w(e){g("emit readable"),e.emit("readable"),L(e)}function k(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var o=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(o=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):o=function(e,t,o){var n;er.length?r.length:e;if(s===r.length?i+=r:i+=r.slice(0,e),0===(e-=s)){s===r.length?(++n,o.next?t.head=o.next:t.head=t.tail=null):(t.head=o,o.data=r.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var o=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(o),e-=n.data.length;for(;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(o,o.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(s));break}++i}return t.length-=i,o}(e,t);return n}(e,t.buffer,t.decoder),o);var o}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var o=0,n=e.length;o=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return g("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),o!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var o=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,t);var l=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:v;function u(t,n){g("onunpipe"),t===o&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),e.removeListener("close",_),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",u),o.removeListener("end",c),o.removeListener("end",v),o.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){g("onend"),e.end()}r.endEmitted?i.nextTick(l):o.once("end",l),e.on("unpipe",u);var h=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(o);e.on("drain",h);var d=!1;var p=!1;function f(t){g("ondata"),p=!1,!1!==e.write(t)||p||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==P(r.pipes,e))&&!d&&(g("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,p=!0),o.pause())}function m(t){g("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function _(){e.removeListener("finish",y),v()}function y(){g("onfinish"),e.removeListener("close",_),v()}function v(){g("unpipe"),o.unpipe(e)}return o.on("data",f),function(e,t,o){if("function"==typeof e.prependListener)return e.prependListener(t,o);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(o):e._events[t]=[o,e._events[t]]:e.on(t,o)}(e,"error",m),e.once("close",_),e.once("finish",y),e.emit("pipe",o),r.flowing||(g("pipe resume"),o.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,o={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,o),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,o=function(e,t,o){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==o?o:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var o=e.toString("utf16le",t);if(o){var n=o.charCodeAt(o.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],o.slice(0,-1)}return o}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var o=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,o)}return t}function c(e,t){var o=(e.length-t)%3;return 0===o?e.toString("base64",t):(this.lastNeed=3-o,this.lastTotal=3,1===o?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-o))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}t.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,o;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";o=this.lastNeed,this.lastNeed=0}else o=0;return o=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=o;var n=e.length-(o-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,o){"use strict";e.exports=s;var n=o(136),i=o(167);function r(e,t){var o=this._transformState;o.transforming=!1;var n=o.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));o.writechunk=null,o.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,a=(3&t)<<4|o>>4,l=g>1?(15&o)<<2|i>>6:64,u=g>2?63&i:64,c.push(r.charAt(s)+r.charAt(a)+r.charAt(l)+r.charAt(u));return c.join("")},t.decode=function(e){var t,o,n,s,a,l,u=0,c=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===r.charAt(64)&&d--,e.charAt(e.length-2)===r.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|d):new Array(0|d);u>4,o=(15&s)<<4|(a=r.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(l=r.indexOf(e.charAt(u++))),h[c++]=t,64!==a&&(h[c++]=o),64!==l&&(h[c++]=n);return h}},function(e,t,o){"use strict";(function(t){var n=o(64),i=o(342),r=o(100),s=o(272),a=o(127),l=o(168),u=null;if(a.nodestream)try{u=o(343)}catch(e){}function c(e,o){return new l.Promise((function(i,r){var a=[],l=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,t){a.push(e),o&&o(t)})).on("error",(function(e){a=[],r(e)})).on("end",(function(){try{var e=function(e,t,o){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),o);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(u,function(e,o){var n,i=0,r=null,s=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,o){"use strict";var n=o(64),i=o(100);function r(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(r,i),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,o){"use strict";var n=o(100),i=o(216);function r(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o(64).inherits(r,n),r.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,o){"use strict";var n=o(100);t.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=o(346)},function(e,t,o){"use strict";e.exports=function(e,t,o,n){for(var i=65535&e|0,r=e>>>16&65535|0,s=0;0!==o;){o-=s=o>2e3?2e3:o;do{r=r+(i=i+t[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0}},function(e,t,o){"use strict";var n=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t,o,i){var r=n,s=i+o;e^=-1;for(var a=i;a>>8^r[255&(e^t[a])];return-1^e}},function(e,t,o){"use strict";var n=o(128),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var o="",s=0;s>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),o=0,i=t.length;o4)u[n++]=65533,o+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&o1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+s[e[o]]>t?o:t}},function(e,t,o){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,o){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,o){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,o){"use strict";var n=o(64),i=o(127),r=o(286),s=o(360),a=o(361),l=o(288);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(n.transformTo("uint8array",e)):new r(n.transformTo("array",e)):new s(e)}},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e);for(var t=0;t=0;--r)if(this.data[r]===t&&this.data[r+1]===o&&this.data[r+2]===n&&this.data[r+3]===i)return r-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),r=this.readData(4);return t===r[0]&&o===r[1]&&n===r[2]&&i===r[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(64);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)o=(o<<8)+this.byteAt(t);return this.index+=e,o},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},function(e,t,o){"use strict";var n=o(286);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(149);e.exports=function(e){n.copy(e,this)}},function(e,t,o){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var o,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(o=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},r={key:n,value:e[n]};return o(i,r)}}),r=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,s;if(Array.isArray(t)){for(s="[",o=0;o",y=g?">":"<",v=void 0;if(m){var b=e.util.getData(f.$data,s,e.dataPathArr),E="exclusive"+r,C="exclType"+r,S="exclIsNumber"+r,T="' + "+(O="op"+r)+" + '";i+=" var schemaExcl"+r+" = "+b+"; ",i+=" var "+E+"; var "+C+" = typeof "+(b="schemaExcl"+r)+"; if ("+C+" != 'boolean' && "+C+" != 'undefined' && "+C+" != 'number') { ";var w;v=p;(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var k=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+C+" == 'number' ? ( ("+E+" = "+n+" === undefined || "+b+" "+_+"= "+n+") ? "+h+" "+y+"= "+b+" : "+h+" "+y+" "+n+" ) : ( ("+E+" = "+b+" === true) ? "+h+" "+y+"= "+n+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { var op"+r+" = "+E+" ? '"+_+"' : '"+_+"='; ",void 0===a&&(v=p,u=e.errSchemaPath+"/"+p,n=b,d=m)}else{T=_;if((S="number"==typeof f)&&d){var O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+f+" "+_+"= "+n+" ? "+h+" "+y+"= "+f+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { "}else{S&&void 0===a?(E=!0,v=p,u=e.errSchemaPath+"/"+p,n=f,y+="="):(S&&(n=Math[g?"min":"max"](f,a)),f===(!S||n)?(E=!0,v=p,u=e.errSchemaPath+"/"+p,y+="="):(E=!1,T+="="));O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+" "+y+" "+n+" || "+h+" !== "+h+") { "}}v=v||t,(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+O+", limit: "+n+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+T+" ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";k=i;return i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a;var g="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+g+" "+n+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,o){var n=o(397),i=o(398),r=o(411),s=RegExp("['’]","g");e.exports=function(e){return function(t){return n(r(i(t).replace(s,"")),e,"")}}},function(e,t){var o=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return o.test(e)}},function(e,t,o){},function(e,t,o){"use strict";o.r(t);o(496),o(223),o(231),o(232),o(256),o(230),o(234),o(237),o(236);var n=o(137);for(var i in n)"default"!==i&&function(e){o.d(t,e,(function(){return n[e]}))}(i)},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=o(169);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(o,n,i){var a=e.call(this,n)||this;return a.code=s.number(o)?o:r.UnknownErrorCode,a.data=i,Object.setPrototypeOf(a,t.prototype),a}return i(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var l=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=l;var u=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType0=u;var c=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType=c;var h=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType1=h;var d=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType2=d;var g=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType3=g;var p=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType4=p;var f=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType5=f;var m=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType6=m;var _=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType7=_;var y=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType8=y;var v=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType9=v;var b=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType=b;var E=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType0=E;var C=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType1=C;var S=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType2=S;var T=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType3=T;var w=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType4=w;var k=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType5=k;var O=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType6=O;var R=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType7=R;var N=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType8=N;var L=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType9=L,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},function(e,t,o){(function(e){function o(e,t){for(var o=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),o++):o&&(e.splice(n,1),o--)}if(t)for(;o--;o)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var o=[],n=0;n=-1&&!i;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=o(n(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var r=t.isAbsolute(e),s="/"===i(e,-1);return(e=o(n(e.split("/"),(function(e){return!!e})),!r).join("/"))||r||(e="."),e&&s&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,o){function n(e){for(var t=0;t=0&&""===e[o];o--);return t>o?[]:e.slice(t,o-t+1)}e=t.resolve(e).substr(1),o=t.resolve(o).substr(1);for(var i=n(e.split("/")),r=n(o.split("/")),s=Math.min(i.length,r.length),a=s,l=0;l=1;--r)if(47===(t=e.charCodeAt(r))){if(!i){n=r;break}}else i=!1;return-1===n?o?"/":".":o&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var o=function(e){"string"!=typeof e&&(e+="");var t,o=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){o=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(o,n)}(e);return t&&o.substr(-1*t.length)===t&&(o=o.substr(0,o.length-t.length)),o},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,o=0,n=-1,i=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!i){o=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===o+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,o){return e.substr(t,o)}:function(e,t,o){return t<0&&(t=e.length+t),e.substr(t,o)}}).call(this,o(108))},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(305)),n(o(306)),n(o(502))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.state="initial",o.events=[],o.socket.onMessage((function(e){return o.readMessage(e)})),o.socket.onError((function(e){return o.fireError(e)})),o.socket.onClose((function(e,t){if(1e3!==e){var n={name:""+e,message:"Error during socket reconnect: code = "+e+", reason = "+t};o.fireError(n)}o.fireClose()})),o}return i(t,e),t.prototype.listen=function(e){if("initial"===this.state)for(this.state="listening",this.callback=e;0!==this.events.length;){var t=this.events.pop();t.message?this.readMessage(t.message):t.error?this.fireError(t.error):this.fireClose()}},t.prototype.readMessage=function(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){var t=JSON.parse(e);this.callback(t)}},t.prototype.fireError=function(t){"initial"===this.state?this.events.splice(0,0,{error:t}):"listening"===this.state&&e.prototype.fireError.call(this,t)},t.prototype.fireClose=function(){"initial"===this.state?this.events.splice(0,0,{}):"listening"===this.state&&e.prototype.fireClose.call(this),this.state="closed"},t}(o(183).AbstractMessageReader);t.WebSocketMessageReader=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.errorCount=0,o}return i(t,e),t.prototype.write=function(e){try{var t=JSON.stringify(e);this.socket.send(t)}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(o(184).AbstractMessageWriter);t.WebSocketMessageWriter=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e.prototype.debug=function(e){console.debug(e)},e}();t.ConsoleLogger=n},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CompletionItem);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CodeLens);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,o){return e.call(this,t,o)||this}return i(t,e),t}(o(109).DocumentLink);t.default=r},function(e,t,o){"use strict";var n=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var s,a=o(530),l=o(121),u=o(531),c=o(185);function h(e,t){return a(e,{extended:!0,globstar:!0}).test(t)}!function(e){e.fromDocument=function(e){return{uri:monaco.Uri.parse(e.uri),languageId:e.languageId}},e.fromModel=function(e){return{uri:e.uri,languageId:e.getModeId()}}}(s=t.MonacoModelIdentifier||(t.MonacoModelIdentifier={})),t.testGlob=h;var d=function(){function e(e,t){this.p2m=e,this.m2p=t}return e.prototype.match=function(e,t){return this.matchModel(e,s.fromDocument(t))},e.prototype.createDiagnosticCollection=function(e){return new u.MonacoDiagnosticCollection(e||"default",this.p2m)},e.prototype.registerCompletionItemProvider=function(e,t){for(var o,n,s=[],a=2;a=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}},i=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var a,l,u,c=o(245),h=o(121);!function(e){e.is=function(e){return!!e&&"data"in e}}(a=t.ProtocolDocumentLink||(t.ProtocolDocumentLink={})),function(e){e.is=function(e){return!!e&&"data"in e}}(l=t.ProtocolCodeLens||(t.ProtocolCodeLens={})),function(e){e.is=function(e){return!!e&&"data"in e}}(u=t.ProtocolCompletionItem||(t.ProtocolCompletionItem={}));var d=function(){function e(){}return e.prototype.asPosition=function(e,t){return{line:null==e?void 0:e-1,character:null==t?void 0:t-1}},e.prototype.asRange=function(e){if(void 0!==e)return null===e?null:{start:this.asPosition(e.startLineNumber,e.startColumn),end:this.asPosition(e.endLineNumber,e.endColumn)}},e.prototype.asTextDocumentIdentifier=function(e){return{uri:e.uri.toString()}},e.prototype.asTextDocumentPositionParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column)}},e.prototype.asCompletionParams=function(e,t,o){return Object.assign(this.asTextDocumentPositionParams(e,t),{context:this.asCompletionContext(o)})},e.prototype.asCompletionContext=function(e){return{triggerKind:this.asTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter}},e.prototype.asTriggerKind=function(e){switch(e){case monaco.languages.SuggestTriggerKind.TriggerCharacter:return h.CompletionTriggerKind.TriggerCharacter;case monaco.languages.SuggestTriggerKind.TriggerForIncompleteCompletions:return h.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return h.CompletionTriggerKind.Invoked}},e.prototype.asCompletionItem=function(e){var t={label:e.label},o=u.is(e)?e:void 0;return e.detail&&(t.detail=e.detail),e.documentation&&(o&&o.documentationFormat?t.documentation=this.asDocumentation(o.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),this.fillPrimaryInsertText(t,e),c.number(e.kind)&&(t.kind=this.asCompletionItemKind(e.kind,o&&o.originalItemKind)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),e.command&&(t.command=this.asCommand(e.command)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),o&&(void 0!==o.data&&(t.data=o.data),!0!==o.deprecated&&!1!==o.deprecated||(t.deprecated=o.deprecated)),t},e.prototype.asCompletionItemKind=function(e,t){return void 0!==t?t:e+1},e.prototype.asDocumentation=function(e,t){switch(e){case h.MarkupKind.PlainText:return{kind:e,value:t};case h.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}},e.prototype.fillPrimaryInsertText=function(e,t){var o,n,i=h.InsertTextFormat.PlainText;t.textEdit?(o=t.textEdit.text,n=this.asRange(t.textEdit.range)):"string"==typeof t.insertText?o=t.insertText:t.insertText&&(i=h.InsertTextFormat.Snippet,o=t.insertText.value),t.range&&(n=this.asRange(t.range)),e.insertTextFormat=i,t.fromEdit&&o&&n?e.textEdit={newText:o,range:n}:e.insertText=o},e.prototype.asTextEdit=function(e){return{range:this.asRange(e.range),newText:e.text}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asReferenceParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),context:{includeDeclaration:o.includeDeclaration}}},e.prototype.asDocumentSymbolParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asCodeLensParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDiagnosticSeverity=function(e){switch(e){case monaco.MarkerSeverity.Error:return h.DiagnosticSeverity.Error;case monaco.MarkerSeverity.Warning:return h.DiagnosticSeverity.Warning;case monaco.MarkerSeverity.Info:return h.DiagnosticSeverity.Information;case monaco.MarkerSeverity.Hint:return h.DiagnosticSeverity.Hint}},e.prototype.asDiagnostic=function(e){var t=this.asRange(new monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),o=this.asDiagnosticSeverity(e.severity);return h.Diagnostic.create(t,e.message,o,e.code,e.source)},e.prototype.asDiagnostics=function(e){var t=this;return null==e?e:e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asCodeActionContext=function(e){if(null==e)return e;var t=this.asDiagnostics(e.markers);return h.CodeActionContext.create(t,c.string(e.only)?[e.only]:void 0)},e.prototype.asCodeActionParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),context:this.asCodeActionContext(o)}},e.prototype.asCommand=function(e){if(e){var t=e.arguments||[];return h.Command.create.apply(h.Command,r([e.title,e.id],t))}},e.prototype.asCodeLens=function(e){var t=h.CodeLens.create(this.asRange(e.range));return e.command&&(t.command=this.asCommand(e.command)),l.is(e)&&e.data&&(t.data=e.data),t},e.prototype.asFormattingOptions=function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},e.prototype.asDocumentFormattingParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),options:this.asFormattingOptions(t)}},e.prototype.asDocumentRangeFormattingParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),options:this.asFormattingOptions(o)}},e.prototype.asDocumentOnTypeFormattingParams=function(e,t,o,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),ch:o,options:this.asFormattingOptions(n)}},e.prototype.asRenameParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),newName:o}},e.prototype.asDocumentLinkParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDocumentLink=function(e){var t=h.DocumentLink.create(this.asRange(e.range));return e.url&&(t.target=e.url),a.is(e)&&e.data&&(t.data=e.data),t},e}();t.MonacoToProtocolConverter=d;var g=function(){function e(){}return e.prototype.asResourceEdits=function(e,t,o){return{resource:e,edits:this.asTextEdits(t),modelVersionId:o}},e.prototype.asWorkspaceEdit=function(e){var t,o,n,i;if(e){var r=[];if(e.documentChanges)try{for(var a=s(e.documentChanges),l=a.next();!l.done;l=a.next()){var u=l.value,c=monaco.Uri.parse(u.textDocument.uri),h="number"==typeof u.textDocument.version?u.textDocument.version:void 0;r.push(this.asResourceEdits(c,u.edits,h))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}else if(e.changes)try{for(var d=s(Object.keys(e.changes)),g=d.next();!g.done;g=d.next()){var p=g.value;c=monaco.Uri.parse(p);r.push(this.asResourceEdits(c,e.changes[p]))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return{edits:r}}},e.prototype.asTextEdit=function(e){if(e)return{range:this.asRange(e.range),text:e.newText}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asCodeLens=function(e){if(e){var t={range:this.asRange(e.range)};return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}},e.prototype.asCodeLenses=function(e){var t=this;if(e)return e.map((function(e){return t.asCodeLens(e)}))},e.prototype.asCodeActions=function(e){var t=this;return e.map((function(e){return t.asCodeAction(e)}))},e.prototype.asCodeAction=function(e){return h.CodeAction.is(e)?{title:e.title,command:this.asCommand(e.command),edit:this.asWorkspaceEdit(e.edit),diagnostics:this.asDiagnostics(e.diagnostics),kind:e.kind}:{command:{id:e.command,title:e.title,arguments:e.arguments},title:e.title}},e.prototype.asCommand=function(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}},e.prototype.asDocumentSymbol=function(e){var t=this,o=e.children&&e.children.map((function(e){return t.asDocumentSymbol(e)}));return{name:e.name,detail:e.detail||"",kind:this.asSymbolKind(e.kind),range:this.asRange(e.range),selectionRange:this.asRange(e.selectionRange),children:o}},e.prototype.asDocumentSymbols=function(e){var t=this;return h.DocumentSymbol.is(e[0])?e.map((function(e){return t.asDocumentSymbol(e)})):this.asSymbolInformations(e)},e.prototype.asSymbolInformations=function(e,t){var o=this;if(e)return e.map((function(e){return o.asSymbolInformation(e,t)}))},e.prototype.asSymbolInformation=function(e,t){var o=this.asLocation(t?n({},e.location,{uri:t.toString()}):e.location);return{name:e.name,detail:"",containerName:e.containerName,kind:this.asSymbolKind(e.kind),range:o.range,selectionRange:o.range}},e.prototype.asSymbolKind=function(e){return e<=h.SymbolKind.TypeParameter?e-1:monaco.languages.SymbolKind.Property},e.prototype.asDocumentHighlights=function(e){var t=this;if(e)return e.map((function(e){return t.asDocumentHighlight(e)}))},e.prototype.asDocumentHighlight=function(e){return{range:this.asRange(e.range),kind:c.number(e.kind)?this.asDocumentHighlightKind(e.kind):void 0}},e.prototype.asDocumentHighlightKind=function(e){switch(e){case h.DocumentHighlightKind.Text:return monaco.languages.DocumentHighlightKind.Text;case h.DocumentHighlightKind.Read:return monaco.languages.DocumentHighlightKind.Read;case h.DocumentHighlightKind.Write:return monaco.languages.DocumentHighlightKind.Write}return monaco.languages.DocumentHighlightKind.Text},e.prototype.asReferences=function(e){var t=this;if(e)return e.map((function(e){return t.asLocation(e)}))},e.prototype.asDefinitionResult=function(e){var t=this;if(e)return c.array(e)?e.map((function(e){return t.asLocation(e)})):this.asLocation(e)},e.prototype.asLocation=function(e){if(e)return{uri:monaco.Uri.parse(e.uri),range:this.asRange(e.range)}},e.prototype.asSignatureHelp=function(e){if(e){var t={};return c.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,c.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures?t.signatures=this.asSignatureInformations(e.signatures):t.signatures=[],t}},e.prototype.asSignatureInformations=function(e){var t=this;return e.map((function(e){return t.asSignatureInformation(e)}))},e.prototype.asSignatureInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),e.parameters?t.parameters=this.asParameterInformations(e.parameters):t.parameters=[],t},e.prototype.asParameterInformations=function(e){var t=this;return e.map((function(e){return t.asParameterInformation(e)}))},e.prototype.asParameterInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),t},e.prototype.asHover=function(e){if(e)return{contents:this.asHoverContent(e.contents),range:this.asRange(e.range)}},e.prototype.asHoverContent=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.asMarkdownString(e)})):[this.asMarkdownString(e)]},e.prototype.asDocumentation=function(e){return c.string(e)?e:e.kind===h.MarkupKind.PlainText?e.value:this.asMarkdownString(e)},e.prototype.asMarkdownString=function(e){return h.MarkupContent.is(e)?{value:e.value}:c.string(e)?{value:e}:{value:"```"+e.language+"\n"+e.value+"\n```"}},e.prototype.asSeverity=function(e){return 1===e?monaco.MarkerSeverity.Error:2===e?monaco.MarkerSeverity.Warning:3===e?monaco.MarkerSeverity.Info:monaco.MarkerSeverity.Hint},e.prototype.asDiagnostics=function(e){var t=this;if(e)return e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asDiagnostic=function(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:this.asSeverity(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:this.asRelatedInformations(e.relatedInformation)}},e.prototype.asRelatedInformations=function(e){var t=this;if(e)return e.map((function(e){return t.asRelatedInformation(e)}))},e.prototype.asRelatedInformation=function(e){return{resource:monaco.Uri.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}},e.prototype.asCompletionResult=function(e){var t=this;return e?Array.isArray(e)?{isIncomplete:!1,items:e.map((function(e){return t.asCompletionItem(e)}))}:{isIncomplete:e.isIncomplete,items:e.items.map(this.asCompletionItem.bind(this))}:{isIncomplete:!1,items:[]}},e.prototype.asCompletionItem=function(e){var t={label:e.label};e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=this.asDocumentation(e.documentation),t.documentationFormat=c.string(e.documentation)?void 0:e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var o=this.asCompletionInsertText(e);if(o&&(t.insertText=o.text,t.range=o.range,t.fromEdit=o.fromEdit),c.number(e.kind)){var n=i(this.asCompletionItemKind(e.kind),2),r=n[0],s=n[1];t.kind=r,s&&(t.originalItemKind=s)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),c.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),void 0!==e.data&&(t.data=e.data),t},e.prototype.asCompletionItemKind=function(e){return h.CompletionItemKind.Text<=e&&e<=h.CompletionItemKind.TypeParameter?[e-1,void 0]:[h.CompletionItemKind.Text,e]},e.prototype.asCompletionInsertText=function(e){if(e.textEdit){var t=this.asRange(e.textEdit.range),o=e.textEdit.newText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,range:t,fromEdit:!0}}if(e.insertText){o=e.insertText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,fromEdit:!1}}},e.prototype.asDocumentLinks=function(e){var t=this;return e.map((function(e){return t.asDocumentLink(e)}))},e.prototype.asDocumentLink=function(e){return{range:this.asRange(e.range),url:e.target,data:e.data}},e.prototype.asRange=function(e){if(void 0!==e){if(null===e)return null;var t=this.asPosition(e.start),o=this.asPosition(e.end);return t instanceof monaco.Position&&o instanceof monaco.Position?new monaco.Range(t.lineNumber,t.column,o.lineNumber,o.column):{startLineNumber:t&&void 0!==t.lineNumber?t.lineNumber:void 0,startColumn:t&&void 0!==t.column?t.column:void 0,endLineNumber:o&&void 0!==o.lineNumber?o.lineNumber:void 0,endColumn:o&&void 0!==o.column?o.column:void 0}}},e.prototype.asPosition=function(e){if(void 0!==e){if(null===e)return null;var t=e.line,o=e.character,n=void 0===t?void 0:t+1,i=void 0===o?void 0:o+1;return void 0!==n&&void 0!==i?new monaco.Position(n,i):{lineNumber:n,column:i}}},e.prototype.asColorInformations=function(e){var t=this;return e.map((function(e){return t.asColorInformation(e)}))},e.prototype.asColorInformation=function(e){return{range:this.asRange(e.range),color:e.color}},e.prototype.asColorPresentations=function(e){var t=this;return e.map((function(e){return t.asColorPresentation(e)}))},e.prototype.asColorPresentation=function(e){return{label:e.label,textEdit:this.asTextEdit(e.textEdit),additionalTextEdits:this.asTextEdits(e.additionalTextEdits)}},e.prototype.asFoldingRanges=function(e){var t=this;return e?e.map((function(e){return t.asFoldingRange(e)})):e},e.prototype.asFoldingRange=function(e){return{start:e.startLine+1,end:e.endLine+1,kind:this.asFoldingRangeKind(e.kind)}},e.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case h.FoldingRangeKind.Comment:return monaco.languages.FoldingRangeKind.Comment;case h.FoldingRangeKind.Imports:return monaco.languages.FoldingRangeKind.Imports;case h.FoldingRangeKind.Region:return monaco.languages.FoldingRangeKind.Region}},e}();t.ProtocolToMonacoConverter=g},function(e,t,o){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=o(325),n.prototype.loadAsync=o(358),n.support=o(127),n.defaults=o(274),n.version="3.2.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=o(168),e.exports=n},function(e,t,o){(function(o){var n,i,r;i=[],void 0===(r="function"==typeof(n=function(){"use strict";function t(e,t,o){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,o)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof o&&o.global===o?o:void 0,s=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,o,s){var a=r.URL||r.webkitURL,l=document.createElement("a");o=o||e.name||"download",l.download=o,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?t(e,o,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,r){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),o);else if(n(e))t(e,o,r);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,o,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,o,n);var s="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var c=r.URL||r.webkitURL,h=c.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});r.saveAs=s.saveAs=s,e.exports=s})?n.apply(t,i):n)||(e.exports=r)}).call(this,o(80))},function(e,t,o){"use strict";var n=o(363),i=o(218),r=o(367),s=o(289),a=o(290),l=o(368),u=o(369),c=o(390),h=o(149);e.exports=_,_.prototype.validate=function(e,t){var o;if("string"==typeof e){if(!(o=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);o=n.validate||this._compile(n)}var i=o(t);!0!==o.$async&&(this.errors=o.errors);return i},_.prototype.compile=function(e,t){var o=this._addSchema(e,void 0,t);return o.validate||this._compile(o)},_.prototype.addSchema=function(e,t,o,n){if(Array.isArray(e)){for(var r=0;r\n \n \n \n EQ\n \n \n AND\n \n \n \n TRUE\n \n \n \n \n 1\n \n \n \n \n \n \n 10\n \n \n \n \n WHILE\n \n \n i\n \n \n 1\n \n \n \n \n 10\n \n \n \n \n 1\n \n \n \n \n j\n \n \n BREAK\n \n \n \n \n 0\n \n \n ADD\n \n \n 1\n \n \n \n \n 1\n \n \n \n \n ROOT\n \n \n 9\n \n \n \n \n SIN\n \n \n 45\n \n \n \n \n PI\n \n \n \n EVEN\n \n \n 0\n \n \n \n \n ROUND\n \n \n 3.1\n \n \n \n \n \n SUM\n \n \n \n \n 64\n \n \n \n \n 10\n \n \n \n \n \n \n 50\n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n \n \n \n \n \n \n \n item\n \n \n \n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n FIRST\n \n \n text\n \n \n \n \n abc\n \n \n \n \n \n FROM_START\n \n \n text\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n text\n \n \n \n \n UPPERCASE\n \n \n abc\n \n \n \n \n BOTH\n \n \n abc\n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n \n \n \n \n \n \n FIRST\n \n \n list\n \n \n \n \n \n GET\n FROM_START\n \n \n list\n \n \n \n \n \n SET\n FROM_START\n \n \n list\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n list\n \n \n \n \n \n SPLIT\n \n \n ,\n \n \n \n \n NUMERIC\n 1\n \n \n \n \n \n \n \n \n 1\n \n \n 20\n \n \n \n \n FORWARDS\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n CLOCKWISE\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n \n 1\n \n \n 50\n \n \n \n \n \n \n \n 1\n OUTPUT\n \n \n 1\n \n \n TRUE\n \n \n \n \n 1\n \n \n 1\n \n \n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n \n \n\n \n i\n \n \n \n \n \n'},function(e,t,o){"use strict";function n(e){for(var t=arguments,o=1;o0?t.children[0].text:""),i=t.props.inline,r=t.props.language,s=Prism.languages[r],a="language-"+r;return i?e("code",n({},t.data,{class:[t.data.class,a],domProps:n({},t.data.domProps,{innerHTML:Prism.highlight(o,s)})})):e("pre",n({},t.data,{class:[t.data.class,a]}),[e("code",{class:a,domProps:{innerHTML:Prism.highlight(o,s)}})])}};e.exports=i},function(e,t,o){"use strict";(function(e){o.d(t,"a",(function(){return f}));var n=o(115),i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){!function(t){var o=function(e,t,n){if(!l(t)||c(t)||h(t)||d(t)||a(t))return t;var i,r=0,s=0;if(u(t))for(i=[],s=t.length;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o};function c(){for(var e=arguments.length,t=Array(e),o=0;o2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=(t.children||[]).map(h.bind(null,e)),s=Object.keys(t.attributes||{}).reduce((function(e,o){var n=t.attributes[o];switch(o){case"class":e.class=n.split(/\s+/).reduce((function(e,t){return e[t]=!0,e}),{});break;case"style":e.style=n.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var o=t.indexOf(":"),n=r.camelize(t.slice(0,o)),i=t.slice(o+1).trim();return e[n]=i,e}),{});break;default:e.attrs[o]=n}return e}),{class:{},style:{},attrs:{}}),a=n.class,d=void 0===a?{}:a,g=n.style,p=void 0===g?{}:g,f=n.attrs,m=void 0===f?{}:f,_=u(n,["class","style","attrs"]);return"string"==typeof t?t:e(t.tag,l({class:c(s.class,d),style:l({},s.style,p),attrs:l({},s.attrs,m)},_,{props:o}),i)}var d=!1;try{d=!0}catch(e){}function g(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?a({},e,t):{}}function p(e){return e&&"object"===(void 0===e?"undefined":s(e))&&e.prefix&&e.iconName&&e.icon?e:n.d.icon?n.d.icon(e):null===e?null:"object"===(void 0===e?"undefined":s(e))&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}var f={name:"FontAwesomeIcon",functional:!0,props:{beat:{type:Boolean,default:!1},border:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},flip:{type:String,default:null,validator:function(e){return["horizontal","vertical","both"].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return["right","left"].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(parseInt(e,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(e)>-1}},spin:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1}},render:function(e,t){var o=t.props,i=o.icon,r=o.mask,s=o.symbol,u=o.title,c=p(i),f=g("classes",function(e){var t,o=(t={"fa-spin":e.spin,"fa-spin-pulse":e.spinPulse,"fa-spin-reverse":e.spinReverse,"fa-pulse":e.pulse,"fa-beat":e.beat,"fa-fade":e.fade,"fa-flash":e.flash,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip-horizontal":"horizontal"===e.flip||"both"===e.flip,"fa-flip-vertical":"vertical"===e.flip||"both"===e.flip},a(t,"fa-"+e.size,null!==e.size),a(t,"fa-rotate-"+e.rotation,null!==e.rotation),a(t,"fa-pull-"+e.pull,null!==e.pull),a(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(o).map((function(e){return o[e]?e:null})).filter((function(e){return e}))}(o)),m=g("transform","string"==typeof o.transform?n.d.transform(o.transform):o.transform),_=g("mask",p(r)),y=Object(n.b)(c,l({},f,m,_,{symbol:s,title:u}));if(!y)return function(){var e;!d&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find one or more icon(s)",c,_);var v=y.abstract;return h.bind(null,e)(v[0],{},t.data)}};Boolean,String,Number,String,Object,Boolean,String}).call(this,o(80))},function(e,t,o){},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=o.Prism={manual:o.Prism&&o.Prism.manual,disableWorkerMessageHandler:o.Prism&&o.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof i?new i(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(E instanceof l)){if(f&&v!=t.length-1){if(d.lastIndex=b,!(O=d.exec(e)))break;for(var C=O.index+(p?O[1].length:0),S=O.index+O[0].length,T=v,w=b,k=t.length;T=(w+=t[T].length)&&(++v,b=w);if(t[v]instanceof l)continue;R=T-v,E=e.slice(b,w),O.index-=b}else{d.lastIndex=0;var O=d.exec(E),R=1}if(O){p&&(m=O[1]?O[1].length:0);S=(C=O.index+m)+(O=O[0].slice(m)).length;var N=E.slice(0,C),L=E.slice(S),I=[v,R];N&&(++v,b+=N.length,I.push(N));var D=new l(u,g?n.tokenize(O,g):O,_,O,f);if(I.push(D),L&&I.push(L),Array.prototype.splice.apply(t,I),1!=R&&n.matchGrammar(e,t,o,v,b,!0,u),s)break}else if(s)break}}}}},tokenize:function(e,t,o){var i=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}return n.matchGrammar(e,i,t,0,0,!1),i},hooks:{all:{},add:function(e,t){var o=n.hooks.all;o[e]=o[e]||[],o[e].push(t)},run:function(e,t){var o=n.hooks.all[e];if(o&&o.length)for(var i,r=0;i=o[r++];)i(t)}}},i=n.Token=function(e,t,o,n,i){this.type=e,this.content=t,this.alias=o,this.length=0|(n||"").length,this.greedy=!!i};if(i.stringify=function(e,t,o){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map((function(o){return i.stringify(o,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,o),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:o};if(e.alias){var s="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,s)}n.hooks.run("wrap",r);var a=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(a?" "+a:"")+">"+r.content+""},!o.document)return o.addEventListener?(n.disableWorkerMessageHandler||o.addEventListener("message",(function(e){var t=JSON.parse(e.data),i=t.language,r=t.code,s=t.immediateClose;o.postMessage(n.highlight(r,n.languages[i],i)),s&&o.close()}),!1),o.Prism):o.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),o.Prism}();e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n),n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}}).call(this,o(80))},function(e,t,o){"use strict";var n=o(146),i=o(64),r=o(100),s=o(273),a=o(274),l=o(215),u=o(344),c=o(345),h=o(182),d=o(357),g=function(e,t,o){var n,s=i.getTypeOf(t),c=i.extend(o||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(e=f(e)),c.createFolders&&(n=p(e))&&m.call(this,n,!0);var g="string"===s&&!1===c.binary&&!1===c.base64;o&&void 0!==o.binary||(c.binary=!g),(t instanceof l&&0===t.uncompressedSize||c.dir||!t||0===t.length)&&(c.base64=!1,c.binary=!0,t="",c.compression="STORE",s="string");var _=null;_=t instanceof l||t instanceof r?t:h.isNode&&h.isStream(t)?new d(e,t):i.prepareContent(e,t,c.binary,c.optimizedBinaryString,c.base64);var y=new u(e,_,c);this.files[e]=y},p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:a.createFolders,e=f(e),this.files[e]||g.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,o,n;for(t in this.files)this.files.hasOwnProperty(t)&&(n=this.files[t],(o=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(o,n))},filter:function(e){var t=[];return this.forEach((function(o,n){e(o,n)&&t.push(n)})),t},file:function(e,t,o){if(1===arguments.length){if(_(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return(e=this.root+e,g.call(this,e,t,o),this)},folder:function(e){if(!e)return this;if(_(e))return this.filter((function(t,o){return o.dir&&e.test(t)}));var t=this.root+e,o=m.call(this,t),n=this.clone();return n.root=o.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var o=this.filter((function(t,o){return o.name.slice(0,e.length)===e})),n=0;n0?s-4:s;for(o=0;o>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(o)]<<2|i[e.charCodeAt(o+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(o)]<<10|i[e.charCodeAt(o+1)]<<4|i[e.charCodeAt(o+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,o=e.length,i=o%3,r=[],s=0,a=o-i;sa?a:s+16383));1===i?(t=e[o-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[o-2]<<8)+e[o-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function c(e,t,o){for(var i,r,s=[],a=t;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,o,n,i){var r,s,a=8*i-n-1,l=(1<>1,c=-7,h=o?i-1:0,d=o?-1:1,g=e[t+h];for(h+=d,r=g&(1<<-c)-1,g>>=-c,c+=a;c>0;r=256*r+e[t+h],h+=d,c-=8);for(s=r&(1<<-c)-1,r>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),r-=u}return(g?-1:1)*s*Math.pow(2,r-n)},t.write=function(e,t,o,n,i,r){var s,a,l,u=8*r-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[o+g]=255&a,g+=p,a/=256,i-=8);for(s=s<0;e[o+g]=255&s,g+=p,s/=256,u-=8);e[o+g-p]|=128*f}},function(e,t,o){e.exports=i;var n=o(212).EventEmitter;function i(){n.call(this)}o(147)(i,n),i.Readable=o(213),i.Writable=o(335),i.Duplex=o(336),i.Transform=o(337),i.PassThrough=o(338),i.Stream=i,i.prototype.pipe=function(e,t){var o=this;function i(t){e.writable&&!1===e.write(t)&&o.pause&&o.pause()}function r(){o.readable&&o.resume&&o.resume()}o.on("data",i),e.on("drain",r),e._isStdio||t&&!1===t.end||(o.on("end",a),o.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){o.removeListener("data",i),e.removeListener("drain",r),o.removeListener("end",a),o.removeListener("close",l),o.removeListener("error",u),e.removeListener("error",u),o.removeListener("end",c),o.removeListener("close",c),e.removeListener("close",c)}return o.on("error",u),e.on("error",u),o.on("end",c),o.on("close",c),e.on("close",c),e.emit("pipe",o),e}},function(e,t){},function(e,t,o){"use strict";var n=o(181).Buffer,i=o(331);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,o=""+t.data;t=t.next;)o+=e+t.data;return o},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,o,i,r=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,o=r,i=a,t.copy(o,i),a+=s.data.length,s=s.next;return r},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,o){(function(e,t){!function(e,o){"use strict";if(!e.setImmediate){var n,i,r,s,a,l=1,u={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,o=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=o,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),o=0;o0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var o=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(o!==u)throw new Error(s[o]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?r.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(o=n.deflateSetDictionary(this.strm,p))!==u)throw new Error(s[o]);this._dict_set=!0}}function p(e,t){var o=new g(t);if(o.push(e,!0),o.err)throw o.msg||s[o.err];return o.result}g.prototype.push=function(e,t){var o,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=r.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(o=n.deflate(a,s))&&o!==u)return this.onEnd(o),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(r.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==o);return 4===s?(o=n.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===u):2!==s||(this.onEnd(u),a.avail_out=0,!0)},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=g,t.deflate=p,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},function(e,t,o){"use strict";var n,i=o(128),r=o(350),s=o(279),a=o(280),l=o(217),u=0,c=1,h=3,d=4,g=5,p=0,f=1,m=-2,_=-3,y=-5,v=-1,b=1,E=2,C=3,S=4,T=0,w=2,k=8,O=9,R=15,N=8,L=286,I=30,D=19,A=2*L+1,P=15,M=3,x=258,B=x+M+1,F=32,H=42,U=69,V=73,W=91,j=103,G=113,z=666,K=1,Y=2,X=3,q=4,$=3;function J(e,t){return e.msg=l[t],t}function Z(e){return(e<<1)-(e>4?9:0)}function Q(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,o=t.pending;o>e.avail_out&&(o=e.avail_out),0!==o&&(i.arraySet(e.output,t.pending_buf,t.pending_out,o,e.next_out),e.next_out+=o,t.pending_out+=o,e.total_out+=o,e.avail_out-=o,t.pending-=o,0===t.pending&&(t.pending_out=0))}function te(e,t){r._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function oe(e,t){e.pending_buf[e.pending++]=t}function ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var o,n,i=e.max_chain_length,r=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-B?e.strstart-(e.w_size-B):0,u=e.window,c=e.w_mask,h=e.prev,d=e.strstart+x,g=u[r+s-1],p=u[r+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(o=t)+s]===p&&u[o+s-1]===g&&u[o]===u[r]&&u[++o]===u[r+1]){r+=2,o++;do{}while(u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&rs){if(e.match_start=t,s=n,n>=a)break;g=u[r+s-1],p=u[r+s]}}}while((t=h[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function re(e){var t,o,n,r,l,u,c,h,d,g,p=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-B)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=o=e.hash_size;do{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--o);t=o=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--o);r+=p}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,h=e.strstart+e.lookahead,d=r,g=void 0,(g=u.avail_in)>d&&(g=d),o=0===g?0:(u.avail_in-=g,i.arraySet(c,u.input,u.next_in,g,h),1===u.state.wrap?u.adler=s(u.adler,c,g,h):2===u.state.wrap&&(u.adler=a(u.adler,c,g,h)),u.next_in+=g,u.total_in+=g,g),e.lookahead+=o,e.lookahead+e.insert>=M)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=M&&(e.ins_h=(e.ins_h<=M)if(n=r._tr_tally(e,e.strstart-e.match_start,e.match_length-M),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=M){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=M&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=M-1)),e.prev_length>=M&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-M,n=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-M),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),r<1||r>O||o!==k||n<8||n>15||t<0||t>9||s<0||s>S)return J(e,m);8===n&&(n=9);var l=new ue;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<e.pending_buf_size-5&&(o=e.pending_buf_size-5);;){if(e.lookahead<=1){if(re(e),0===e.lookahead&&t===u)return K;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+o;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,te(e,!1),0===e.strm.avail_out))return K;if(e.strstart-e.block_start>=e.w_size-B&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),K)})),new le(4,4,8,4,se),new le(4,5,16,8,se),new le(4,6,32,32,se),new le(4,4,16,16,ae),new le(8,16,32,32,ae),new le(8,16,128,128,ae),new le(8,32,128,256,ae),new le(32,128,258,1024,ae),new le(32,258,258,4096,ae)],t.deflateInit=function(e,t){return de(e,t,k,R,N,T)},t.deflateInit2=de,t.deflateReset=he,t.deflateResetKeep=ce,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m},t.deflate=function(e,t){var o,i,s,l;if(!e||!e.state||t>g||t<0)return e?J(e,m):m;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===z&&t!==d)return J(e,0===e.avail_out?y:m);if(i.strm=e,o=i.last_flush,i.last_flush=t,i.status===H)if(2===i.wrap)e.adler=0,oe(i,31),oe(i,139),oe(i,8),i.gzhead?(oe(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),oe(i,255&i.gzhead.time),oe(i,i.gzhead.time>>8&255),oe(i,i.gzhead.time>>16&255),oe(i,i.gzhead.time>>24&255),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(oe(i,255&i.gzhead.extra.length),oe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=U):(oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,$),i.status=G);else{var _=k+(i.w_bits-8<<4)<<8;_|=(i.strategy>=E||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(_|=F),_+=31-_%31,i.status=G,ne(i,_),0!==i.strstart&&(ne(i,e.adler>>>16),ne(i,65535&e.adler)),e.adler=1}if(i.status===U)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending!==i.pending_buf_size));)oe(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=V)}else i.status=V;if(i.status===V)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=W)}else i.status=W;if(i.status===W)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=j)}else i.status=j;if(i.status===j&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(oe(i,255&e.adler),oe(i,e.adler>>8&255),e.adler=0,i.status=G)):i.status=G),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,p}else if(0===e.avail_in&&Z(t)<=Z(o)&&t!==d)return J(e,y);if(i.status===z&&0!==e.avail_in)return J(e,y);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==z){var v=i.strategy===E?function(e,t){for(var o;;){if(0===e.lookahead&&(re(e),0===e.lookahead)){if(t===u)return K;break}if(e.match_length=0,o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):i.strategy===C?function(e,t){for(var o,n,i,s,a=e.window;;){if(e.lookahead<=x){if(re(e),e.lookahead<=x&&t===u)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=M&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+x;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=M?(o=r._tr_tally(e,1,e.match_length-M),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):n[i.level].func(i,t);if(v!==X&&v!==q||(i.status=z),v===K||v===X)return 0===e.avail_out&&(i.last_flush=-1),p;if(v===Y&&(t===c?r._tr_align(i):t!==g&&(r._tr_stored_block(i,0,0,!1),t===h&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,p}return t!==d?p:i.wrap<=0?f:(2===i.wrap?(oe(i,255&e.adler),oe(i,e.adler>>8&255),oe(i,e.adler>>16&255),oe(i,e.adler>>24&255),oe(i,255&e.total_in),oe(i,e.total_in>>8&255),oe(i,e.total_in>>16&255),oe(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:f)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==H&&t!==U&&t!==V&&t!==W&&t!==j&&t!==G&&t!==z?J(e,m):(e.state=null,t===G?J(e,_):p):m},t.deflateSetDictionary=function(e,t){var o,n,r,a,l,u,c,h,d=t.length;if(!e||!e.state)return m;if(2===(a=(o=e.state).wrap)||1===a&&o.status!==H||o.lookahead)return m;for(1===a&&(e.adler=s(e.adler,t,d,0)),o.wrap=0,d>=o.w_size&&(0===a&&(Q(o.head),o.strstart=0,o.block_start=0,o.insert=0),h=new i.Buf8(o.w_size),i.arraySet(h,t,d-o.w_size,o.w_size,0),t=h,d=o.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,re(o);o.lookahead>=M;){n=o.strstart,r=o.lookahead-(M-1);do{o.ins_h=(o.ins_h<=0;)e[t]=0}var u=0,c=1,h=2,d=29,g=256,p=g+1+d,f=30,m=19,_=2*p+1,y=15,v=16,b=7,E=256,C=16,S=17,T=18,w=[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],k=[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],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=new Array(2*(p+2));l(N);var L=new Array(2*f);l(L);var I=new Array(512);l(I);var D=new Array(256);l(D);var A=new Array(d);l(A);var P,M,x,B=new Array(f);function F(e,t,o,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=o,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function U(e){return e<256?I[e]:I[256+(e>>>7)]}function V(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function W(e,t,o){e.bi_valid>v-o?(e.bi_buf|=t<>v-e.bi_valid,e.bi_valid+=o-v):(e.bi_buf|=t<>>=1,o<<=1}while(--t>0);return o>>>1}function z(e,t,o){var n,i,r=new Array(y+1),s=0;for(n=1;n<=y;n++)r[n]=s=s+o[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=G(r[a]++,a))}}function K(e){var t;for(t=0;t8?V(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function X(e,t,o,n){var i=2*t,r=2*o;return e[i]>1;o>=1;o--)q(e,r,o);i=l;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,r,1),n=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=n,r[2*i]=r[2*o]+r[2*n],e.depth[i]=(e.depth[o]>=e.depth[n]?e.depth[o]:e.depth[n])+1,r[2*o+1]=r[2*n+1]=i,e.heap[1]=i++,q(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var o,n,i,r,s,a,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(r=0;r<=y;r++)e.bl_count[r]=0;for(l[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<_;o++)(r=l[2*l[2*(n=e.heap[o])+1]+1]+1)>p&&(r=p,f++),l[2*n+1]=r,n>u||(e.bl_count[r]++,s=0,n>=g&&(s=d[n-g]),a=l[2*n],e.opt_len+=a*(r+s),h&&(e.static_len+=a*(c[2*n+1]+s)));if(0!==f){do{for(r=p-1;0===e.bl_count[r];)r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(r=p;0!==r;r--)for(n=e.bl_count[r];0!==n;)(i=e.heap[--o])>u||(l[2*i+1]!==r&&(e.opt_len+=(r-l[2*i+1])*l[2*i],l[2*i+1]=r),n--)}}(e,t),z(r,u,e.bl_count)}function Z(e,t,o){var n,i,r=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(o+1)+1]=65535,n=0;n<=o;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(e.strm.data_type===a&&(e.strm.data_type=function(e){var t,o=4093624447;for(t=0;t<=31;t++,o>>>=1)if(1&o&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t=3&&0===e.bl_tree[2*R[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),l=e.opt_len+3+7>>>3,(u=e.static_len+3+7>>>3)<=l&&(l=u)):l=u=o+5,o+4<=l&&-1!==t?te(e,t,o,n):e.strategy===i||u===l?(W(e,(c<<1)+(n?1:0),3),$(e,N,L)):(W(e,(h<<1)+(n?1:0),3),function(e,t,o,n){var i;for(W(e,t-257,5),W(e,o-1,5),W(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&o,e.last_lit++,0===t?e.dyn_ltree[2*o]++:(e.matches++,t--,e.dyn_ltree[2*(D[o]+g+1)]++,e.dyn_dtree[2*U(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){W(e,c<<1,3),j(e,E,N),function(e){16===e.bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,o){"use strict";var n=o(352),i=o(128),r=o(281),s=o(283),a=o(217),l=o(282),u=o(355),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var o=n.inflateInit2(this.strm,t.windowBits);if(o!==s.Z_OK)throw new Error(a[o]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(o=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[o])}function d(e,t){var o=new h(t);if(o.push(e,!0),o.err)throw o.msg||a[o.err];return o.result}h.prototype.push=function(e,t){var o,a,l,u,h,d=this.strm,g=this.options.chunkSize,p=this.options.dictionary,f=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?d.input=r.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(g),d.next_out=0,d.avail_out=g),(o=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(o=n.inflateSetDictionary(this.strm,p)),o===s.Z_BUF_ERROR&&!0===f&&(o=s.Z_OK,f=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(d.output,d.next_out),u=d.next_out-l,h=r.buf2string(d.output,l),d.next_out=u,d.avail_out=g-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(f=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=n.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,o){"use strict";var n=o(128),i=o(279),r=o(280),s=o(353),a=o(354),l=0,u=1,c=2,h=4,d=5,g=6,p=0,f=1,m=2,_=-2,y=-3,v=-4,b=-5,E=8,C=1,S=2,T=3,w=4,k=5,O=6,R=7,N=8,L=9,I=10,D=11,A=12,P=13,M=14,x=15,B=16,F=17,H=18,U=19,V=20,W=21,j=22,G=23,z=24,K=25,Y=26,X=27,q=28,$=29,J=30,Z=31,Q=32,ee=852,te=592,oe=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=C,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,p):_}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):_}function ae(e,t){var o,n;return e&&e.state?(n=e.state,t<0?(o=0,t=-t):(o=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?_:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=o,n.wbits=t,se(e))):_}function le(e,t){var o,n;return e?(n=new ie,e.state=n,n.window=null,(o=ae(e,t))!==p&&(e.state=null),o):_}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function ge(e,t,o,i){var r,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,o-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((r=s.wsize-s.wnext)>i&&(r=i),n.arraySet(s.window,t,o-i,r,s.wnext),(i-=r)?(n.arraySet(s.window,t,o-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,o.check=r(o.check,Oe,2,0),ae=0,le=0,o.mode=S;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",o.mode=J;break}if((15&ae)!==E){e.msg="unknown compression method",o.mode=J;break}if(le-=4,Ce=8+(15&(ae>>>=4)),0===o.wbits)o.wbits=Ce;else if(Ce>o.wbits){e.msg="invalid window size",o.mode=J;break}o.dmax=1<>8&1),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=T;case T:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,Oe[2]=ae>>>16&255,Oe[3]=ae>>>24&255,o.check=r(o.check,Oe,4,0)),ae=0,le=0,o.mode=w;case w:for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>8),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=k;case k:if(1024&o.flags){for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0}else o.head&&(o.head.extra=null);o.mode=O;case O:if(1024&o.flags&&((he=o.length)>re&&(he=re),he&&(o.head&&(Ce=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),n.arraySet(o.head.extra,ee,oe,he,Ce)),512&o.flags&&(o.check=r(o.check,ee,he,oe)),re-=he,oe+=he,o.length-=he),o.length))break e;o.length=0,o.mode=R;case R:if(2048&o.flags){if(0===re)break e;he=0;do{Ce=ee[oe+he++],o.head&&Ce&&o.length<65536&&(o.head.name+=String.fromCharCode(Ce))}while(Ce&&he>9&1,o.head.done=!0),e.adler=o.check=0,o.mode=A;break;case I:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>=7&le,le-=7&le,o.mode=X;break}for(;le<3;){if(0===re)break e;re--,ae+=ee[oe++]<>>=1)){case 0:o.mode=M;break;case 1:if(de(o),o.mode=V,t===g){ae>>>=2,le-=2;break e}break;case 2:o.mode=F;break;case 3:e.msg="invalid block type",o.mode=J}ae>>>=2,le-=2;break;case M:for(ae>>>=7&le,le-=7≤le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>16^65535)){e.msg="invalid stored block lengths",o.mode=J;break}if(o.length=65535&ae,ae=0,le=0,o.mode=x,t===g)break e;case x:o.mode=B;case B:if(he=o.length){if(he>re&&(he=re),he>se&&(he=se),0===he)break e;n.arraySet(te,ee,oe,he,ie),re-=he,oe+=he,se-=he,ie+=he,o.length-=he;break}o.mode=A;break;case F:for(;le<14;){if(0===re)break e;re--,ae+=ee[oe++]<>>=5,le-=5,o.ndist=1+(31&ae),ae>>>=5,le-=5,o.ncode=4+(15&ae),ae>>>=4,le-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=J;break}o.have=0,o.mode=H;case H:for(;o.have>>=3,le-=3}for(;o.have<19;)o.lens[Re[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,Te={bits:o.lenbits},Se=a(l,o.lens,0,19,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid code lengths set",o.mode=J;break}o.have=0,o.mode=U;case U:for(;o.have>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=me,le-=me,o.lens[o.have++]=ye;else{if(16===ye){for(we=me+2;le>>=me,le-=me,0===o.have){e.msg="invalid bit length repeat",o.mode=J;break}Ce=o.lens[o.have-1],he=3+(3&ae),ae>>>=2,le-=2}else if(17===ye){for(we=me+3;le>>=me)),ae>>>=3,le-=3}else{for(we=me+7;le>>=me)),ae>>>=7,le-=7}if(o.have+he>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=J;break}for(;he--;)o.lens[o.have++]=Ce}}if(o.mode===J)break;if(0===o.lens[256]){e.msg="invalid code -- missing end-of-block",o.mode=J;break}if(o.lenbits=9,Te={bits:o.lenbits},Se=a(u,o.lens,0,o.nlen,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid literal/lengths set",o.mode=J;break}if(o.distbits=6,o.distcode=o.distdyn,Te={bits:o.distbits},Se=a(c,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,Te),o.distbits=Te.bits,Se){e.msg="invalid distances set",o.mode=J;break}if(o.mode=V,t===g)break e;case V:o.mode=W;case W:if(re>=6&&se>=258){e.next_out=ie,e.avail_out=se,e.next_in=oe,e.avail_in=re,o.hold=ae,o.bits=le,s(e,ce),ie=e.next_out,te=e.output,se=e.avail_out,oe=e.next_in,ee=e.input,re=e.avail_in,ae=o.hold,le=o.bits,o.mode===A&&(o.back=-1);break}for(o.back=0;_e=(ke=o.lencode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,o.length=ye,0===_e){o.mode=Y;break}if(32&_e){o.back=-1,o.mode=A;break}if(64&_e){e.msg="invalid literal/length code",o.mode=J;break}o.extra=15&_e,o.mode=j;case j:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=G;case G:for(;_e=(ke=o.distcode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,64&_e){e.msg="invalid distance code",o.mode=J;break}o.offset=ye,o.extra=15&_e,o.mode=z;case z:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=J;break}o.mode=K;case K:if(0===se)break e;if(he=ce-se,o.offset>he){if((he=o.offset-he)>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=J;break}he>o.wnext?(he-=o.wnext,pe=o.wsize-he):pe=o.wnext-he,he>o.length&&(he=o.length),fe=o.window}else fe=te,pe=ie-o.offset,he=o.length;he>se&&(he=se),se-=he,o.length-=he;do{te[ie++]=fe[pe++]}while(--he);0===o.length&&(o.mode=W);break;case Y:if(0===se)break e;te[ie++]=o.length,se--,o.mode=W;break;case X:if(o.wrap){for(;le<32;){if(0===re)break e;re--,ae|=ee[oe++]<>>=b=v>>>24,p-=b,0===(b=v>>>16&255))k[r++]=65535&v;else{if(!(16&b)){if(0==(64&b)){v=f[(65535&v)+(g&(1<>>=b,p-=b),p<15&&(g+=w[n++]<>>=b=v>>>24,p-=b,!(16&(b=v>>>16&255))){if(0==(64&b)){v=m[(65535&v)+(g&(1<l){e.msg="invalid distance too far back",o.mode=30;break e}if(g>>>=b,p-=b,C>(b=r-s)){if((b=C-b)>c&&o.sane){e.msg="invalid distance too far back",o.mode=30;break e}if(S=0,T=d,0===h){if(S+=u-b,b2;)k[r++]=T[S++],k[r++]=T[S++],k[r++]=T[S++],E-=3;E&&(k[r++]=T[S++],E>1&&(k[r++]=T[S++]))}else{S=r-C;do{k[r++]=k[S++],k[r++]=k[S++],k[r++]=k[S++],E-=3}while(E>2);E&&(k[r++]=k[S++],E>1&&(k[r++]=k[S++]))}break}}break}}while(n>3,g&=(1<<(p-=E<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n=1&&0===M[k];k--);if(O>k&&(O=k),0===k)return u[c++]=20971520,u[c++]=20971520,d.bits=1,0;for(w=1;w0&&(0===e||1!==k))return-1;for(x[1]=0,S=1;S<15;S++)x[S+1]=x[S]+M[S];for(T=0;T852||2===e&&I>592)return 1;for(;;){v=S-N,h[T]y?(b=B[F+h[T]],E=A[P+h[T]]):(b=96,E=0),g=1<>N)+(p-=g)]=v<<24|b<<16|E|0}while(0!==p);for(g=1<>=1;if(0!==g?(D&=g-1,D+=g):D=0,T++,0==--M[S]){if(S===k)break;S=t[o+h[T]]}if(S>O&&(D&m)!==f){for(0===N&&(N=O),_+=w,L=1<<(R=S-N);R+N852||2===e&&I>592)return 1;u[f=D&m]=O<<24|R<<16|_-c|0}}return 0!==D&&(u[_+D]=S-N<<24|64<<16|0),d.bits=O,0}},function(e,t,o){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,o){"use strict";var n=o(64),i=o(100),r=o(146),s=o(216),a=o(284),l=function(e,t){var o,n="";for(o=0;o>>=8;return n},u=function(e,t,o,i,u,c){var h,d,g=e.file,p=e.compression,f=c!==r.utf8encode,m=n.transformTo("string",c(g.name)),_=n.transformTo("string",r.utf8encode(g.name)),y=g.comment,v=n.transformTo("string",c(y)),b=n.transformTo("string",r.utf8encode(y)),E=_.length!==g.name.length,C=b.length!==y.length,S="",T="",w="",k=g.dir,O=g.date,R={crc32:0,compressedSize:0,uncompressedSize:0};t&&!o||(R.crc32=e.crc32,R.compressedSize=e.compressedSize,R.uncompressedSize=e.uncompressedSize);var N=0;t&&(N|=8),f||!E&&!C||(N|=2048);var L,I,D,A=0,P=0;k&&(A|=16),"UNIX"===u?(P=798,A|=(L=g.unixPermissions,I=k,D=L,L||(D=I?16893:33204),(65535&D)<<16)):(P=20,A|=63&(g.dosPermissions||0)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,d=O.getUTCFullYear()-1980,d<<=4,d|=O.getUTCMonth()+1,d<<=5,d|=O.getUTCDate(),E&&(T=l(1,1)+l(s(m),4)+_,S+="up"+l(T.length,2)+T),C&&(w=l(1,1)+l(s(v),4)+b,S+="uc"+l(w.length,2)+w);var M="";return M+="\n\0",M+=l(N,2),M+=p.magic,M+=l(h,2),M+=l(d,2),M+=l(R.crc32,4),M+=l(R.compressedSize,4),M+=l(R.uncompressedSize,4),M+=l(m.length,2),M+=l(S.length,2),{fileRecord:a.LOCAL_FILE_HEADER+M+m+S,dirRecord:a.CENTRAL_FILE_HEADER+l(P,2)+M+l(v.length,2)+"\0\0\0\0"+l(A,4)+l(i,4)+m+S+v}},c=function(e){return a.DATA_DESCRIPTOR+l(e.crc32,4)+l(e.compressedSize,4)+l(e.uncompressedSize,4)};function h(e,t,o,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=o,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(h,i),h.prototype.push=function(e){var t=e.meta.percent||0,o=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:o?(t+100*(o-n-1))/o:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var o=u(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:o.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,o=u(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),t)this.push({data:c(e),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,r.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(288);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(285),i=o(64),r=o(215),s=o(216),a=o(146),l=o(278),u=o(127);function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,o;if(e.skip(22),this.fileNameLength=e.readInt(2),o=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(o),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,o,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:o},{index:n,compiling:!1})}function d(e,t,o){var n=g.call(this,e,t,o);n>=0&&this._compilations.splice(n,1)}function g(e,t,o){for(var n=0;n1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(g[e])}function _(e,t){var o=e.split("@"),n="";o.length>1&&(n=o[0]+"@",e=o[1]);var i=function(e,t){for(var o=[],n=e.length;n--;)o[n]=t(e[n]);return o}((e=e.replace(d,".")).split("."),t).join(".");return n+i}function y(e){for(var t=[],o=0,n=e.length;o=55296&&i<=56319&&o>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))},E=function(e){var t,o=[],n=e.length,i=0,r=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var l=0;l=128&&m("not-basic"),o.push(e.charCodeAt(l));for(var c=a>0?a+1:0;c=n&&m("invalid-input");var f=(t=e.charCodeAt(c++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(f>=36||f>p((u-i)/d))&&m("overflow"),i+=f*d;var _=g<=s?1:g>=s+26?26:g-s;if(f<_)break;var y=36-_;d>p(u/y)&&m("overflow"),d*=y}var v=o.length+1;s=b(i-h,v,0==h),p(i/v)>u-r&&m("overflow"),r+=p(i/v),i%=v,o.splice(i++,0,r)}return String.fromCodePoint.apply(String,o)},C=function(e){var t=[],o=(e=y(e)).length,n=128,i=0,r=72,s=!0,a=!1,l=void 0;try{for(var c,h=e[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var d=c.value;d<128&&t.push(f(d))}}catch(e){a=!0,l=e}finally{try{!s&&h.return&&h.return()}finally{if(a)throw l}}var g=t.length,_=g;for(g&&t.push("-");_=n&&Op((u-i)/R)&&m("overflow"),i+=(E-n)*R,n=E;var N=!0,L=!1,I=void 0;try{for(var D,A=e[Symbol.iterator]();!(N=(D=A.next()).done);N=!0){var P=D.value;if(Pu&&m("overflow"),P==n){for(var M=i,x=36;;x+=36){var B=x<=r?1:x>=r+26?26:x-r;if(M>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function k(e){for(var t="",o=0,n=e.length;o=194&&i<224){if(n-o>=6){var r=parseInt(e.substr(o+4,2),16);t+=String.fromCharCode((31&i)<<6|63&r)}else t+=e.substr(o,6);o+=6}else if(i>=224){if(n-o>=9){var s=parseInt(e.substr(o+4,2),16),a=parseInt(e.substr(o+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(o,9);o+=9}else t+=e.substr(o,3),o+=3}return t}function O(e,t){function o(e){var o=k(e);return o.match(t.UNRESERVED)?o:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,o).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,o).replace(t.NOT_USERINFO,w).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,o).toLowerCase().replace(t.NOT_HOST,w).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,o).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,w).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,o).replace(t.NOT_QUERY,w).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,o).replace(t.NOT_FRAGMENT,w).replace(t.PCT_ENCODED,i)),e}function R(e){return e.replace(/^0*(.*)/,"$1")||"0"}function N(e,t){var o=e.match(t.IPV4ADDRESS)||[],n=l(o,2)[1];return n?n.split(".").map(R).join("."):e}function L(e,t){var o=e.match(t.IPV6ADDRESS)||[],n=l(o,3),i=n[1],r=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=l(s,2),u=a[0],c=a[1],h=c?c.split(":").map(R):[],d=u.split(":").map(R),g=t.IPV4ADDRESS.test(d[d.length-1]),p=g?7:8,f=d.length-p,m=Array(p),_=0;_1){var b=m.slice(0,y.index),E=m.slice(y.index+y.length);v=b.join(":")+"::"+E.join(":")}else v=m.join(":");return r&&(v+="%"+r),v}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(I);if(i){D?(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port)&&(o.port=i[5])):(o.scheme=i[1]||void 0,o.userinfo=-1!==e.indexOf("@")?i[3]:void 0,o.host=-1!==e.indexOf("//")?i[4]:void 0,o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=-1!==e.indexOf("?")?i[7]:void 0,o.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(o.port)&&(o.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),o.host&&(o.host=L(N(o.host,n),n)),void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||o.path||void 0!==o.query?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==o.reference&&(o.error=o.error||"URI is not a "+t.reference+" reference.");var r=T[(t.scheme||o.scheme||"").toLowerCase()];if(t.unicodeSupport||r&&r.unicodeSupport)O(o,n);else{if(o.host&&(t.domainHost||r&&r.domainHost))try{o.host=S.toASCII(o.host.replace(n.PCT_ENCODED,k).toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(o,s)}r&&r.parse&&r.parse(o,t)}else o.error=o.error||"URI can not be parsed.";return o}var P=/^\.\.?\//,M=/^\/\.(\/|$)/,x=/^\/\.\.(\/|$)/,B=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var t=[];e.length;)if(e.match(P))e=e.replace(P,"");else if(e.match(M))e=e.replace(M,"/");else if(e.match(x))e=e.replace(x,"/"),t.pop();else if("."===e||".."===e)e="";else{var o=e.match(B);if(!o)throw new Error("Unexpected dot segment condition");var n=o[0];e=e.slice(n.length),t.push(n)}return t.join("")}function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.iri?a:s,n=[],i=T[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(o.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?S.toUnicode(e.host):S.toASCII(e.host.replace(o.PCT_ENCODED,k).toLowerCase())}catch(o){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+o}O(e,o),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var r=function(e,t){var o=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(L(N(String(e.host),o),o).replace(o.IPV6ADDRESS,(function(e,t,o){return"["+t+(o?"%25"+o:"")+"]"}))),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):void 0}(e,t);if(void 0!==r&&("suffix"!==t.reference&&n.push("//"),n.push(r),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var l=e.path;t.absolutePath||i&&i.absolutePath||(l=F(l)),void 0===r&&(l=l.replace(/^\/\//,"/%2F")),n.push(l)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function U(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=A(H(e,o),o),t=A(H(t,o),o)),!(o=o||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=F(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=F(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,k)}var W={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},j={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize},G={},z="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",Y=o(o("%[EFef][0-9A-Fa-f]%"+K+K+"%"+K+K)+"|"+o("%[89A-Fa-f][0-9A-Fa-f]%"+K+K)+"|"+o("%"+K+K)),X=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),q=new RegExp(z,"g"),$=new RegExp(Y,"g"),J=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),Z=new RegExp(t("[^]",z,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Q=Z;function ee(e){var t=k(e);return t.match(q)?t:e}var te={scheme:"mailto",parse:function(e,t){var o=e,n=o.to=o.path?o.path.split(","):[];if(o.path=void 0,o.query){for(var i=!1,r={},s=o.query.split("&"),a=0,l=s.length;a=55296&&t<=56319&&i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,g=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(e){return e="full"==e?"full":"fast",n.copy(f[e])}function m(e){var t=e.match(i);if(!t)return!1;var o=+t[1],n=+t[2],s=+t[3];return n>=1&&n<=12&&s>=1&&s<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(o)?29:r[n])}function _(e,t){var o=e.match(s);if(!o)return!1;var n=o[1],i=o[2],r=o[3],a=o[5];return(n<=23&&i<=59&&r<=59||23==n&&59==i&&60==r)&&(!t||a)}e.exports=f,f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":g,"relative-json-pointer":p},f.full={date:m,time:_,"date-time":function(e){var t=e.split(y);return 2==t.length&&m(t[0])&&_(t[1],!0)},uri:function(e){return v.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&a.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":g,"relative-json-pointer":p};var y=/t|\s/i;var v=/\/|:/;var b=/[^\\]\\Z/;function E(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,o){"use strict";var n=o(370),i=o(149).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(o){o.rules=o.rules.map((function(o){var i;if("object"==typeof o){var r=Object.keys(o)[0];i=o[r],o=r,i.forEach((function(o){t.push(o),e.all[o]=!0}))}return t.push(o),e.all[o]={keyword:o,code:n[o],implements:i}})),e.all.$comment={keyword:"$comment",code:n.$comment},o.type&&(e.types[o.type]=o)})),e.keywords=i(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},function(e,t,o){"use strict";e.exports={$ref:o(371),allOf:o(372),anyOf:o(373),$comment:o(374),const:o(375),contains:o(376),dependencies:o(377),enum:o(378),format:o(379),if:o(380),items:o(381),maximum:o(292),minimum:o(292),maxItems:o(293),minItems:o(293),maxLength:o(294),minLength:o(294),maxProperties:o(295),minProperties:o(295),multipleOf:o(382),not:o(383),oneOf:o(384),pattern:o(385),properties:o(386),propertyNames:o(387),required:o(388),uniqueItems:o(389),validate:o(291)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i,r=" ",s=e.level,a=e.dataLevel,l=e.schema[t],u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(a||""),d="valid"+s;if("#"==l||"#/"==l)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var g=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===g){var p=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(p),(y=y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(r+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ";var f=r;r=y.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+f+"]); ":r+=" validate.errors = ["+f+"]; return false; ":r+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,p);e.logger.warn(p),c&&(r+=" if (true) { ")}}else if(g.inline){var m=e.util.copy(e);m.level++;var _="valid"+m.level;m.schema=g.schema,m.schemaPath="",m.errSchemaPath=l,r+=" "+e.validate(m).replace(/validate\.schema/g,g.code)+" ",c&&(r+=" if ("+_+") { ")}else n=!0===g.$async||e.async&&!1!==g.$async,i=g.code}if(i){var y;(y=y||[]).push(r),r="",e.opts.passContext?r+=" "+i+".call(this, ":r+=" "+i+"( ",r+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(r+=" + "+e.errorPath);var v=r+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ";if(r=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(r+=" var "+d+"; "),r+=" try { await "+v+"; ",c&&(r+=" "+d+" = true; "),r+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(r+=" "+d+" = false; "),r+=" } ",c&&(r+=" if ("+d+") { ")}else r+=" if (!"+v+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",c&&(r+=" else { ")}return r}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.schema[t],r=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,h=l.baseId,d=!0,g=i;if(g)for(var p,f=-1,m=g.length-1;f0:e.util.schemaHasRules(p,e.RULES.all))&&(d=!1,l.schema=p,l.schemaPath=r+"["+f+"]",l.errSchemaPath=s+"/"+f,n+=" "+e.validate(l)+" ",l.baseId=h,a&&(n+=" if ("+c+") { ",u+="}"));return a&&(n+=d?" if (true) { ":" "+u.slice(0,-1)+" "),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level;if(s.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var m=g.baseId;n+=" var "+d+" = errors; var "+h+" = false; ";var _=e.compositeRule;e.compositeRule=g.compositeRule=!0;var y=s;if(y)for(var v,b=-1,E=y.length-1;b0:e.util.schemaHasRules(s,e.RULES.all);if(n+="var "+d+" = errors;var "+h+";",v){var b=e.compositeRule;e.compositeRule=g.compositeRule=!0,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+p+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var E=c+"["+f+"]";g.dataPathArr[m]=f;var C=e.validate(g);g.baseId=y,e.util.varOccurences(C,_)<2?n+=" "+e.util.varReplace(C,_,E)+" ":n+=" var "+_+" = "+E+"; "+C+" ",n+=" if ("+p+") break; } ",e.compositeRule=g.compositeRule=b,n+=" if (!"+p+") {"}else n+=" if ("+c+".length == 0) {";var S=S||[];S.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var T=n;return n=S.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+T+"]); ":n+=" validate.errors = ["+T+"]; return false; ":n+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",v&&(n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e),g="";d.level++;var p="valid"+d.level,f={},m={},_=e.opts.ownProperties;for(E in s){var y=s[E],v=Array.isArray(y)?m:f;v[E]=y}n+="var "+h+" = errors;";var b=e.errorPath;for(var E in n+="var missing"+i+";",m)if((v=m[E]).length){if(n+=" if ( "+c+e.util.getProperty(E)+" !== undefined ",_&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),u){n+=" && ( ";var C=v;if(C)for(var S=-1,T=C.length-1;S0:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+p+" = true; if ( "+c+e.util.getProperty(E)+" !== undefined ",_&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),n+=") { ",d.schema=y,d.schemaPath=a+e.util.getProperty(E),d.errSchemaPath=l+"/"+e.util.escapeFragment(E),n+=" "+e.validate(d)+" ",d.baseId=M,n+=" } ",u&&(n+=" if ("+p+") { ",g+="}"))}return u&&(n+=" "+g+" if ("+h+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d=e.opts.$data&&s&&s.$data;d&&(n+=" var schema"+i+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ");var g="i"+i,p="schema"+i;d||(n+=" var "+p+" = validate.schema"+a+";"),n+="var "+h+";",d&&(n+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),n+=h+" = false;for (var "+g+"=0; "+g+"<"+p+".length; "+g+"++) if (equal("+c+", "+p+"["+g+"])) { "+h+" = true; break; }",d&&(n+=" } "),n+=" if (!"+h+") { ";var f=f||[];f.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var m=n;return n=f.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var h,d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+i+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ",h="schema"+i):h=s;var g=e.opts.unknownFormats,p=Array.isArray(g);if(d){n+=" var "+(f="format"+i)+" = formats["+h+"]; var "+(m="isObject"+i)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(_="formatType"+i)+" = "+m+" && "+f+".type || 'string'; if ("+m+") { ",e.async&&(n+=" var async"+i+" = "+f+".async; "),n+=" "+f+" = "+f+".validate; } if ( ",d&&(n+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),n+=" (","ignore"!=g&&(n+=" ("+h+" && !"+f+" ",p&&(n+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),n+=") || "),n+=" ("+f+" && "+_+" == '"+o+"' && !(typeof "+f+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+f+"("+c+") : "+f+"("+c+")) ":n+=" "+f+"("+c+") ",n+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[s])){if("ignore"==g)return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(p&&g.indexOf(s)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var m,_=(m="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(m){var y=!0===f.async;f=f.validate}if(_!=o)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(v="formats"+e.util.getProperty(s)+".validate")+"("+c+"))) { "}else{n+=" if (! ";var v="formats"+e.util.getProperty(s);m&&(v+=".validate"),n+="function"==typeof f?" "+v+"("+c+") ":" "+v+".test("+c+") ",n+=") { "}}var b=b||[];b.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",n+=d?""+h:""+e.util.toQuotedString(s),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=d?"' + "+h+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+a:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var E=n;return n=b.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e);g.level++;var p="valid"+g.level,f=e.schema.then,m=e.schema.else,_=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all)),v=g.baseId;if(_||y){var b;g.createErrors=!1,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+d+" = errors; var "+h+" = true; ";var E=e.compositeRule;e.compositeRule=g.compositeRule=!0,n+=" "+e.validate(g)+" ",g.baseId=v,g.createErrors=!0,n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=g.compositeRule=E,_?(n+=" if ("+p+") { ",g.schema=e.schema.then,g.schemaPath=e.schemaPath+".then",g.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(g)+" ",g.baseId=v,n+=" "+h+" = "+p+"; ",_&&y?n+=" var "+(b="ifClause"+i)+" = 'then'; ":b="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+p+") { ",y&&(g.schema=e.schema.else,g.schemaPath=e.schemaPath+".else",g.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(g)+" ",g.baseId=v,n+=" "+h+" = "+p+"; ",_&&y?n+=" var "+(b="ifClause"+i)+" = 'else'; ":b="'else'",n+=" } "),n+=" if (!"+h+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { "),n=e.util.cleanUpCode(n)}else u&&(n+=" if (true) { ");return n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level,m="i"+i,_=g.dataLevel=e.dataLevel+1,y="data"+_,v=e.baseId;if(n+="var "+d+" = errors;var "+h+";",Array.isArray(s)){var b=e.schema.additionalItems;if(!1===b){n+=" "+h+" = "+c+".length <= "+s.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems",n+=" if (!"+h+") { ";var C=C||[];C.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",l=E,u&&(p+="}",n+=" else { ")}var T=s;if(T)for(var w,k=-1,O=T.length-1;k0:e.util.schemaHasRules(w,e.RULES.all)){n+=" "+f+" = true; if ("+c+".length > "+k+") { ";var R=c+"["+k+"]";g.schema=w,g.schemaPath=a+"["+k+"]",g.errSchemaPath=l+"/"+k,g.errorPath=e.util.getPathExpr(e.errorPath,k,e.opts.jsonPointers,!0),g.dataPathArr[_]=k;var N=e.validate(g);g.baseId=v,e.util.varOccurences(N,y)<2?n+=" "+e.util.varReplace(N,y,R)+" ":n+=" var "+y+" = "+R+"; "+N+" ",n+=" } ",u&&(n+=" if ("+f+") { ",p+="}")}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all))){g.schema=b,g.schemaPath=e.schemaPath+".additionalItems",g.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+f+" = true; if ("+c+".length > "+s.length+") { for (var "+m+" = "+s.length+"; "+m+" < "+c+".length; "+m+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);R=c+"["+m+"]";g.dataPathArr[_]=m;N=e.validate(g);g.baseId=v,e.util.varOccurences(N,y)<2?n+=" "+e.util.varReplace(N,y,R)+" ":n+=" var "+y+" = "+R+"; "+N+" ",u&&(n+=" if (!"+f+") break; "),n+=" } } ",u&&(n+=" if ("+f+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);R=c+"["+m+"]";g.dataPathArr[_]=m;N=e.validate(g);g.baseId=v,e.util.varOccurences(N,y)<2?n+=" "+e.util.varReplace(N,y,R)+" ":n+=" var "+y+" = "+R+"; "+N+" ",u&&(n+=" if (!"+f+") break; "),n+=" }"}return u&&(n+=" "+p+" if ("+d+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="var division"+r+";if (",d&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+r+" = "+h+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+r+") - division"+r+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+r+" !== parseInt(division"+r+") ",i+=" ) ",d&&(i+=" ) "),i+=" ) { ";var g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var p=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e);d.level++;var g="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l,n+=" var "+h+" = errors; ";var p,f=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(p=d.opts.allErrors,d.opts.allErrors=!1),n+=" "+e.validate(d)+" ",d.createErrors=!0,p&&(d.opts.allErrors=p),e.compositeRule=d.compositeRule=f,n+=" if ("+g+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var _=n;n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+_+"]); ":n+=" validate.errors = ["+_+"]; return false; ":n+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level,m=g.baseId,_="prevValid"+i,y="passingSchemas"+i;n+="var "+d+" = errors , "+_+" = false , "+h+" = false , "+y+" = null; ";var v=e.compositeRule;e.compositeRule=g.compositeRule=!0;var b=s;if(b)for(var E,C=-1,S=b.length-1;C0:e.util.schemaHasRules(E,e.RULES.all))?(g.schema=E,g.schemaPath=a+"["+C+"]",g.errSchemaPath=l+"/"+C,n+=" "+e.validate(g)+" ",g.baseId=m):n+=" var "+f+" = true; ",C&&(n+=" if ("+f+" && "+_+") { "+h+" = false; "+y+" = ["+y+", "+C+"]; } else { ",p+="}"),n+=" if ("+f+") { "+h+" = "+_+" = true; "+y+" = "+C+"; }";return e.compositeRule=g.compositeRule=v,n+=p+"if (!"+h+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(d?"(new RegExp("+n+"))":e.usePattern(a))+".test("+h+") ) { ";var g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=d?""+n:""+e.util.toQuotedString(a),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+n+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var p=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e),g="";d.level++;var p="valid"+d.level,f="key"+i,m="idx"+i,_=d.dataLevel=e.dataLevel+1,y="data"+_,v="dataProperties"+i,b=Object.keys(s||{}),E=e.schema.patternProperties||{},C=Object.keys(E),S=e.schema.additionalProperties,T=b.length||C.length,w=!1===S,k="object"==typeof S&&Object.keys(S).length,O=e.opts.removeAdditional,R=w||k||O,N=e.opts.ownProperties,L=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length8)n+=" || validate.schema"+a+".hasOwnProperty("+f+") ";else{var A=b;if(A)for(var P=-1,M=A.length-1;P0:e.util.schemaHasRules(J,e.RULES.all)){var Z=e.util.getProperty(X),Q=(G=c+Z,K&&void 0!==J.default);d.schema=J,d.schemaPath=a+Z,d.errSchemaPath=l+"/"+e.util.escapeFragment(X),d.errorPath=e.util.getPath(e.errorPath,X,e.opts.jsonPointers),d.dataPathArr[_]=e.util.toQuotedString(X);z=e.validate(d);if(d.baseId=L,e.util.varOccurences(z,y)<2){z=e.util.varReplace(z,y,G);var ee=G}else{ee=y;n+=" var "+y+" = "+G+"; "}if(Q)n+=" "+z+" ";else{if(D&&D[X]){n+=" if ( "+ee+" === undefined ",N&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+p+" = false; ";H=e.errorPath,V=l;var te,oe=e.util.escapeQuotes(X);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(H,X,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+oe+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+oe+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";W=n;n=te.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+W+"]); ":n+=" validate.errors = ["+W+"]; return false; ":n+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,e.errorPath=H,n+=" } else { "}else u?(n+=" if ( "+ee+" === undefined ",N&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+p+" = true; } else { "):(n+=" if ("+ee+" !== undefined ",N&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=" ) { ");n+=" "+z+" } "}}u&&(n+=" if ("+p+") { ",g+="}")}}if(C.length){var ne=C;if(ne)for(var ie,re=-1,se=ne.length-1;re0:e.util.schemaHasRules(J,e.RULES.all)){d.schema=J,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),n+=N?" "+v+" = "+v+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+v+".length; "+m+"++) { var "+f+" = "+v+"["+m+"]; ":" for (var "+f+" in "+c+") { ",n+=" if ("+e.usePattern(ie)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);G=c+"["+f+"]";d.dataPathArr[_]=f;z=e.validate(d);d.baseId=L,e.util.varOccurences(z,y)<2?n+=" "+e.util.varReplace(z,y,G)+" ":n+=" var "+y+" = "+G+"; "+z+" ",u&&(n+=" if (!"+p+") break; "),n+=" } ",u&&(n+=" else "+p+" = true; "),n+=" } ",u&&(n+=" if ("+p+") { ",g+="}")}}}return u&&(n+=" "+g+" if ("+h+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e);d.level++;var g="valid"+d.level;if(n+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l;var p="key"+i,f="idx"+i,m="i"+i,_="' + "+p+" + '",y="data"+(d.dataLevel=e.dataLevel+1),v="dataProperties"+i,b=e.opts.ownProperties,E=e.baseId;b&&(n+=" var "+v+" = undefined; "),n+=b?" "+v+" = "+v+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+v+".length; "+f+"++) { var "+p+" = "+v+"["+f+"]; ":" for (var "+p+" in "+c+") { ",n+=" var startErrs"+i+" = errors; ";var C=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var T=e.validate(d);d.baseId=E,e.util.varOccurences(T,y)<2?n+=" "+e.util.varReplace(T,y,C)+" ":n+=" var "+y+" = "+C+"; "+T+" ",e.compositeRule=d.compositeRule=S,n+=" if (!"+g+") { for (var "+m+"=startErrs"+i+"; "+m+"0:e.util.schemaHasRules(v,e.RULES.all))||(p[p.length]=m)}}else p=s;if(d||p.length){var b=e.errorPath,E=d||p.length>=e.opts.loopRequired,C=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",E){d||(n+=" var "+g+" = validate.schema"+a+"; ");var S="' + "+(N="schema"+i+"["+(k="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,N,e.opts.jsonPointers)),n+=" var "+h+" = true; ",d&&(n+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),n+=" for (var "+k+" = 0; "+k+" < "+g+".length; "+k+"++) { "+h+" = "+c+"["+g+"["+k+"]] !== undefined ",C&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", "+g+"["+k+"]) "),n+="; if (!"+h+") break; } ",d&&(n+=" } "),n+=" if (!"+h+") { ",(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var T=n;n=R.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+T+"]); ":n+=" validate.errors = ["+T+"]; return false; ":n+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var w=p;if(w)for(var k=-1,O=w.length-1;k 1) { ";var p=e.schema.items&&e.schema.items.type,f=Array.isArray(p);if(!p||"object"==p||"array"==p||f&&(p.indexOf("object")>=0||p.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var m="checkDataType"+(f?"s":"");i+=" if ("+e.util[m](p,"item",!0)+") continue; ",f&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",g&&(i+=" } "),i+=" if (!"+d+") { ";var _=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=g?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}},function(e,t,o){"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var o=0;o=i?e:n(e,t,o)}},function(e,t){e.exports=function(e,t,o){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(i);++n{o=e});return new Promise((i,r)=>{let u=s.createServer(e=>{u.close(),o([new a.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])});u.on("error",r),u.listen(e,()=>{u.removeListener("error",r),i({onConnected:()=>n})})})},t.createServerPipeTransport=function(e,t="utf-8"){const o=s.createConnection(e);return[new a.SocketMessageReader(o,t),new l.SocketMessageWriter(o,t)]}}).call(this,o(108))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(150),i=o(243),r=o(244);t.createClientSocketTransport=function(e,t="utf-8"){let o,s=new Promise((e,t)=>{o=e});return new Promise((a,l)=>{let u=n.createServer(e=>{u.close(),o([new i.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])});u.on("error",l),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",l),a({onConnected:()=>s})})})},t.createServerSocketTransport=function(e,t="utf-8"){const o=n.createConnection(e,"127.0.0.1");return[new i.SocketMessageReader(o,t),new r.SocketMessageWriter(o,t)]}},function(e,t,o){"use strict";var n,i,r,s,a,l,u,c,h,d,g,p,f,m,_,y,v,b,E;o.r(t),o.d(t,"Position",(function(){return n})),o.d(t,"Range",(function(){return i})),o.d(t,"Location",(function(){return r})),o.d(t,"LocationLink",(function(){return s})),o.d(t,"Color",(function(){return a})),o.d(t,"ColorInformation",(function(){return l})),o.d(t,"ColorPresentation",(function(){return u})),o.d(t,"FoldingRangeKind",(function(){return c})),o.d(t,"FoldingRange",(function(){return h})),o.d(t,"DiagnosticRelatedInformation",(function(){return d})),o.d(t,"DiagnosticSeverity",(function(){return g})),o.d(t,"Diagnostic",(function(){return p})),o.d(t,"Command",(function(){return f})),o.d(t,"TextEdit",(function(){return m})),o.d(t,"TextDocumentEdit",(function(){return _})),o.d(t,"CreateFile",(function(){return y})),o.d(t,"RenameFile",(function(){return v})),o.d(t,"DeleteFile",(function(){return b})),o.d(t,"WorkspaceEdit",(function(){return E})),o.d(t,"WorkspaceChange",(function(){return U})),o.d(t,"TextDocumentIdentifier",(function(){return C})),o.d(t,"VersionedTextDocumentIdentifier",(function(){return S})),o.d(t,"TextDocumentItem",(function(){return T})),o.d(t,"MarkupKind",(function(){return w})),o.d(t,"MarkupContent",(function(){return k})),o.d(t,"CompletionItemKind",(function(){return O})),o.d(t,"InsertTextFormat",(function(){return R})),o.d(t,"CompletionItem",(function(){return N})),o.d(t,"CompletionList",(function(){return L})),o.d(t,"MarkedString",(function(){return I})),o.d(t,"Hover",(function(){return D})),o.d(t,"ParameterInformation",(function(){return A})),o.d(t,"SignatureInformation",(function(){return P})),o.d(t,"DocumentHighlightKind",(function(){return M})),o.d(t,"DocumentHighlight",(function(){return x})),o.d(t,"SymbolKind",(function(){return B})),o.d(t,"SymbolInformation",(function(){return F})),o.d(t,"DocumentSymbol",(function(){return K})),o.d(t,"CodeActionKind",(function(){return V})),o.d(t,"CodeActionContext",(function(){return W})),o.d(t,"CodeAction",(function(){return j})),o.d(t,"CodeLens",(function(){return G})),o.d(t,"FormattingOptions",(function(){return z})),o.d(t,"DocumentLink",(function(){return Y})),o.d(t,"EOL",(function(){return $})),o.d(t,"TextDocument",(function(){return X})),o.d(t,"TextDocumentSaveReason",(function(){return q})),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return J.objectLiteral(t)&&J.number(t.line)&&J.number(t.character)}}(n||(n={})),function(e){e.create=function(e,t,o,i){if(J.number(e)&&J.number(t)&&J.number(o)&&J.number(i))return{start:n.create(e,t),end:n.create(o,i)};if(n.is(e)&&n.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+o+", "+i+"]")},e.is=function(e){var t=e;return J.objectLiteral(t)&&n.is(t.start)&&n.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.range)&&(J.string(t.uri)||J.undefined(t.uri))}}(r||(r={})),function(e){e.create=function(e,t,o,n){return{targetUri:e,targetRange:t,targetSelectionRange:o,originSelectionRange:n}},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.targetRange)&&J.string(t.targetUri)&&(i.is(t.targetSelectionRange)||J.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||J.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,o,n){return{red:e,green:t,blue:o,alpha:n}},e.is=function(e){var t=e;return J.number(t.red)&&J.number(t.green)&&J.number(t.blue)&&J.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&a.is(t.color)}}(l||(l={})),function(e){e.create=function(e,t,o){return{label:e,textEdit:t,additionalTextEdits:o}},e.is=function(e){var t=e;return J.string(t.label)&&(J.undefined(t.textEdit)||m.is(t))&&(J.undefined(t.additionalTextEdits)||J.typedArray(t.additionalTextEdits,m.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(c||(c={})),function(e){e.create=function(e,t,o,n,i){var r={startLine:e,endLine:t};return J.defined(o)&&(r.startCharacter=o),J.defined(n)&&(r.endCharacter=n),J.defined(i)&&(r.kind=i),r},e.is=function(e){var t=e;return J.number(t.startLine)&&J.number(t.startLine)&&(J.undefined(t.startCharacter)||J.number(t.startCharacter))&&(J.undefined(t.endCharacter)||J.number(t.endCharacter))&&(J.undefined(t.kind)||J.string(t.kind))}}(h||(h={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return J.defined(t)&&r.is(t.location)&&J.string(t.message)}}(d||(d={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.create=function(e,t,o,n,i,r){var s={range:e,message:t};return J.defined(o)&&(s.severity=o),J.defined(n)&&(s.code=n),J.defined(i)&&(s.source=i),J.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.range)&&J.string(t.message)&&(J.number(t.severity)||J.undefined(t.severity))&&(J.number(t.code)||J.string(t.code)||J.undefined(t.code))&&(J.string(t.source)||J.undefined(t.source))&&(J.undefined(t.relatedInformation)||J.typedArray(t.relatedInformation,d.is))}}(p||(p={})),function(e){e.create=function(e,t){for(var o=[],n=2;n0&&(i.arguments=o),i},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.title)&&J.string(t.command)}}(f||(f={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return J.objectLiteral(t)&&J.string(t.newText)&&i.is(t.range)}}(m||(m={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return J.defined(t)&&S.is(t.textDocument)&&Array.isArray(t.edits)}}(_||(_={})),function(e){e.create=function(e,t){var o={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(o.options=t),o},e.is=function(e){var t=e;return t&&"create"===t.kind&&J.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||J.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||J.boolean(t.options.ignoreIfExists)))}}(y||(y={})),function(e){e.create=function(e,t,o){var n={kind:"rename",oldUri:e,newUri:t};return void 0===o||void 0===o.overwrite&&void 0===o.ignoreIfExists||(n.options=o),n},e.is=function(e){var t=e;return t&&"rename"===t.kind&&J.string(t.oldUri)&&J.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||J.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||J.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t){var o={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(o.options=t),o},e.is=function(e){var t=e;return t&&"delete"===t.kind&&J.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||J.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||J.boolean(t.options.ignoreIfNotExists)))}}(b||(b={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return J.string(e.kind)?y.is(e)||v.is(e)||b.is(e):_.is(e)})))}}(E||(E={}));var C,S,T,w,k,O,R,N,L,I,D,A,P,M,x,B,F,H=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(m.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(m.replace(e,t))},e.prototype.delete=function(e){this.edits.push(m.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),U=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(_.is(e)){var o=new H(e.edits);t._textEditChanges[e.textDocument.uri]=o}})):e.changes&&Object.keys(e.changes).forEach((function(o){var n=new H(e.changes[o]);t._textEditChanges[o]=n})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(S.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(n=this._textEditChanges[t.uri])){var o={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(o),n=new H(i),this._textEditChanges[t.uri]=n}return n}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new H(i),this._textEditChanges[e]=n}return n},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(y.create(e,t))},e.prototype.renameFile=function(e,t,o){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t,o))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)}}(C||(C={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)&&(null===t.version||J.number(t.version))}}(S||(S={})),function(e){e.create=function(e,t,o,n){return{uri:e,languageId:t,version:o,text:n}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)&&J.string(t.languageId)&&J.number(t.version)&&J.string(t.text)}}(T||(T={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(w||(w={})),function(e){e.is=function(t){var o=t;return o===e.PlainText||o===e.Markdown}}(w||(w={})),function(e){e.is=function(e){var t=e;return J.objectLiteral(e)&&w.is(t.kind)&&J.string(t.value)}}(k||(k={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(O||(O={})),function(e){e.PlainText=1,e.Snippet=2}(R||(R={})),function(e){e.create=function(e){return{label:e}}}(N||(N={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(L||(L={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return J.string(t)||J.objectLiteral(t)&&J.string(t.language)&&J.string(t.value)}}(I||(I={})),function(e){e.is=function(e){var t=e;return!!t&&J.objectLiteral(t)&&(k.is(t.contents)||I.is(t.contents)||J.typedArray(t.contents,I.is))&&(void 0===e.range||i.is(e.range))}}(D||(D={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(A||(A={})),function(e){e.create=function(e,t){for(var o=[],n=2;n=0;r--){var s=n[r],a=e.offsetAt(s.range.start),l=e.offsetAt(s.range.end);if(!(l<=i))throw new Error("Overlapping edit");o=o.substring(0,a)+s.newText+o.substring(l,o.length),i=a}return o}}(X||(X={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(q||(q={}));var J,Z=function(){function e(e,t,o,n){this._uri=e,this._languageId=t,this._version=o,this._content=n,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),o=this.offsetAt(e.end);return this._content.substring(t,o)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,o=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),o=0,i=t.length;if(0===i)return n.create(0,e);for(;oe?i=r:o=r+1}var s=o-1;return n.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var o=t[e.line],n=e.line+10)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t=0}var a=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//,c=!0;function h(e){var t=c;return c=e,t}var d="",g="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,o,n,i,r){void 0===r&&(r=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return t||c?e||d:(e||(e="file"),e)}(e,r),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==g&&(t=g+t):t=g}return t}(this.scheme,o||d),this.query=n||d,this.fragment=i||d,function(e,t){if(!e.scheme&&(t||c))throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,r))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,o=e.authority,n=e.path,i=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===o?o=this.authority:null===o&&(o=d),void 0===n?n=this.path:null===n&&(n=d),void 0===i?i=this.query:null===i&&(i=d),void 0===r?r=this.fragment:null===r&&(r=d),t===this.scheme&&o===this.authority&&n===this.path&&i===this.query&&r===this.fragment?this:new y(t,o,n,i,r)},e.parse=function(e,t){void 0===t&&(t=!1);var o=p.exec(e);return o?new y(o[2]||d,decodeURIComponent(o[4]||d),decodeURIComponent(o[5]||d),decodeURIComponent(o[7]||d),decodeURIComponent(o[9]||d),t):new y(d,d,d,d,d)},e.file=function(e){var t=d;if(i&&(e=e.replace(/\\/g,g)),e[0]===g&&e[1]===g){var o=e.indexOf(g,2);-1===o?(t=e.substring(2),e=g):(t=e.substring(2,o),e=e.substring(o)||g)}return new y("file",t,e,d,d)},e.from=function(e){return new y(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),S(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var o=new y(t);return o._formatted=t.external,o._fsPath=t._sep===_?t.fsPath:null,o}return t},e}();t.default=f;var m,_=i?1:void 0,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return r(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),v=((m={})[58]="%3A",m[47]="%2F",m[63]="%3F",m[35]="%23",m[91]="%5B",m[93]="%5D",m[64]="%40",m[33]="%21",m[36]="%24",m[38]="%26",m[39]="%27",m[40]="%28",m[41]="%29",m[42]="%2A",m[43]="%2B",m[44]="%2C",m[59]="%3B",m[61]="%3D",m[32]="%20",m);function b(e,t){for(var o=void 0,n=-1,i=0;i=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));var s=v[r];void 0!==s?(-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),o+=s):-1===n&&(n=i)}}return-1!==n&&(o+=encodeURIComponent(e.substring(n))),void 0!==o?o:e}function E(e){for(var t=void 0,o=0;o1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(t=t.replace(/\//g,"\\")),t}function S(e,t){var o=t?E:b,n="",i=e.scheme,r=e.authority,s=e.path,a=e.query,l=e.fragment;if(i&&(n+=i,n+=":"),(r||"file"===i)&&(n+=g,n+=g),r){var u=r.indexOf("@");if(-1!==u){var c=r.substr(0,u);r=r.substr(u+1),-1===(u=c.indexOf(":"))?n+=o(c,!1):(n+=o(c.substr(0,u),!1),n+=":",n+=o(c.substr(u+1),!1)),n+="@"}-1===(u=(r=r.toLowerCase()).indexOf(":"))?n+=o(r,!1):(n+=o(r.substr(0,u),!1),n+=r.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}n+=o(s,!0)}return a&&(n+="?",n+=o(a,!1)),l&&(n+="#",n+=t?l:b(l,!1)),n}}.call(this,o(108))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(109),i=o(101),r=o(138),s=o(308),a=o(309),l=o(310);t.createConverter=function(e){var t=e||function(e){return e.toString()};function o(e){return t(e)}function u(e){return{uri:t(e.uri)}}function c(e){return{uri:t(e.uri),version:e.version}}function h(e){switch(e){case n.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case n.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case n.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function d(e){switch(e){case n.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case n.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function g(e){return{line:e.line,character:e.character}}function p(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function f(e){return null==e?e:{start:p(e.start),end:p(e.end)}}function m(e){switch(e){case n.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case n.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case n.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case n.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function _(e){var t=i.Diagnostic.create(f(e.range),e.message);return r.number(e.severity)&&(t.severity=m(e.severity)),(r.number(e.code)||r.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function y(e){return null==e?e:e.map(_)}function v(e){return{range:f(e.range),newText:e.newText}}function b(e){var t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:o,asTextDocumentIdentifier:u,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){var o;if((o=e).uri&&o.version)return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){var t=e;return!!t.document&&!!t.contentChanges}(e)){var n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map((function(e){var t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:u(e)}},asSaveTextDocumentParams:function(e,t){void 0===t&&(t=!1);var o={textDocument:c(e)};return t&&(o.text=e.getText()),o},asWillSaveTextDocumentParams:function(e){return{textDocument:u(e.document),reason:h(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:u(e),position:g(t)}},asCompletionParams:function(e,t,o){return{textDocument:u(e),position:g(t),context:{triggerKind:d(o.triggerKind),triggerCharacter:o.triggerCharacter}}},asWorkerPosition:g,asRange:f,asPosition:p,asDiagnosticSeverity:m,asDiagnostic:_,asDiagnostics:y,asCompletionItem:function(e){var t,o,a={label:e.label},l=e instanceof s.default?e:void 0;return e.detail&&(a.detail=e.detail),e.documentation&&(l&&"$string"!==l.documentationFormat?a.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(l.documentationFormat,e.documentation):a.documentation=e.documentation),e.filterText&&(a.filterText=e.filterText),function(e,t){var o,r=i.InsertTextFormat.PlainText,s=void 0;t.textEdit?(o=t.textEdit.newText,s=f(t.textEdit.range)):t.insertText instanceof n.SnippetString?(r=i.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText;t.range&&(s=f(t.range));e.insertTextFormat=r,t.fromEdit&&o&&s?e.textEdit={newText:o,range:s}:e.insertText=o}(a,e),r.number(e.kind)&&(a.kind=(t=e.kind,void 0!==(o=l&&l.originalItemKind)?o:t+1)),e.sortText&&(a.sortText=e.sortText),e.additionalTextEdits&&(a.additionalTextEdits=function(e){if(null==e)return e;return e.map(v)}(e.additionalTextEdits)),e.commitCharacters&&(a.commitCharacters=e.commitCharacters.slice()),e.command&&(a.command=b(e.command)),!0!==e.preselect&&!1!==e.preselect||(a.preselect=e.preselect),l&&(void 0!==l.data&&(a.data=l.data),!0!==l.deprecated&&!1!==l.deprecated||(a.deprecated=l.deprecated)),a},asTextEdit:v,asReferenceParams:function(e,t,o){return{textDocument:u(e),position:g(t),context:{includeDeclaration:o.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:i.CodeActionContext.create(y(e.diagnostics),r.string(e.only)?[e.only]:void 0)},asCommand:b,asCodeLens:function(e){var t=i.CodeLens.create(f(e.range));return e.command&&(t.command=b(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:u(e)}},asCodeLensParams:function(e){return{textDocument:u(e)}},asDocumentLink:function(e){var t=i.DocumentLink.create(f(e.range));e.target&&(t.target=o(e.target));var n=e instanceof l.default?e:void 0;return n&&n.data&&(t.data=n.data),t},asDocumentLinkParams:function(e){return{textDocument:u(e)}}}}},function(e,t,o){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}},i=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var r,s=o(109),a=o(101),l=o(138),u=o(308),c=o(309),h=o(310);!function(e){e.is=function(e){var t=e;return t&&l.string(t.language)&&l.string(t.value)}}(r||(r={})),t.createConverter=function(e){var t=e||function(e){return s.Uri.parse(e)};function o(e){return t(e)}function d(e){return e.map(g)}function g(e){var t=new s.Diagnostic(m(e.range),e.message,_(e.severity));return(l.number(e.code)||l.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new s.DiagnosticRelatedInformation(k(e.location),e.message)}function f(e){if(e)return new s.Position(e.line,e.character)}function m(e){if(e)return new s.Range(f(e.start),f(e.end))}function _(e){if(null==e)return s.DiagnosticSeverity.Error;switch(e){case a.DiagnosticSeverity.Error:return s.DiagnosticSeverity.Error;case a.DiagnosticSeverity.Warning:return s.DiagnosticSeverity.Warning;case a.DiagnosticSeverity.Information:return s.DiagnosticSeverity.Information;case a.DiagnosticSeverity.Hint:return s.DiagnosticSeverity.Hint}return s.DiagnosticSeverity.Error}function y(e){if(l.string(e))return e;switch(e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function v(e){var t=new u.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=y(e.documentation),t.documentationFormat=l.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var o,n=function(e){return e.textEdit?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.textEdit.newText),range:m(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:m(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(n&&(t.insertText=n.text,t.range=n.range,t.fromEdit=n.fromEdit),l.number(e.kind)){var r=i((o=e.kind,a.CompletionItemKind.Text<=o&&o<=a.CompletionItemKind.TypeParameter?[o-1,void 0]:[s.CompletionItemKind.Text,o]),2),c=r[0],h=r[1];t.kind=c,h&&(t.originalItemKind=h)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=E(e.additionalTextEdits)),l.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=D(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function b(e){if(e)return new s.TextEdit(m(e.range),e.newText)}function E(e){if(e)return e.map(b)}function C(e){return e.map(S)}function S(e){var t=new s.SignatureInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),e.parameters&&(t.parameters=T(e.parameters)),t}function T(e){return e.map(w)}function w(e){var t=new s.ParameterInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),t}function k(e){if(e)return new s.Location(t(e.uri),m(e.range))}function O(e){var t=new s.DocumentHighlight(m(e.range));return l.number(e.kind)&&(t.kind=R(e.kind)),t}function R(e){switch(e){case a.DocumentHighlightKind.Text:return s.DocumentHighlightKind.Text;case a.DocumentHighlightKind.Read:return s.DocumentHighlightKind.Read;case a.DocumentHighlightKind.Write:return s.DocumentHighlightKind.Write}return s.DocumentHighlightKind.Text}function N(e){return e<=a.SymbolKind.TypeParameter?e-1:s.SymbolKind.Property}function L(e,o){var n=new s.SymbolInformation(e.name,N(e.kind),m(e.location.range),e.location.uri?t(e.location.uri):o);return e.containerName&&(n.containerName=e.containerName),n}function I(e){var t,o,i=new s.DocumentSymbol(e.name,void 0!==e.detail?e.detail:e.name,N(e.kind),m(e.range),m(e.selectionRange));if(void 0!==e.children&&e.children.length>0){var r=[];try{for(var a=n(e.children),l=a.next();!l.done;l=a.next()){var u=l.value;r.push(I(u))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}i.children=r}return i}function D(e){var t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}var A=new Map;function P(e){if(e){var t=new c.default(m(e.range));return e.command&&(t.command=D(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}}function M(e){if(e){var o=new s.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((function(e){o.set(t(e.textDocument.uri),E(e.edits))})):e.changes&&Object.keys(e.changes).forEach((function(n){o.set(t(n),E(e.changes[n]))})),o}}function x(e){var t=m(e.range),n=e.target?o(e.target):void 0,i=new h.default(t,n);return void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function B(e){return new s.Color(e.red,e.green,e.blue,e.alpha)}function F(e){return new s.ColorInformation(m(e.range),B(e.color))}function H(e){var t=new s.ColorPresentation(e.label);return t.additionalTextEdits=E(e.additionalTextEdits),e.textEdit&&(t.textEdit=b(e.textEdit)),t}function U(e){if(e)switch(e){case a.FoldingRangeKind.Comment:return s.FoldingRangeKind.Comment;case a.FoldingRangeKind.Imports:return s.FoldingRangeKind.Imports;case a.FoldingRangeKind.Region:return s.FoldingRangeKind.Region}}function V(e){return new s.FoldingRange(e.startLine,e.endLine,U(e.kind))}return A.set("",s.CodeActionKind.Empty),A.set(a.CodeActionKind.QuickFix,s.CodeActionKind.QuickFix),A.set(a.CodeActionKind.Refactor,s.CodeActionKind.Refactor),A.set(a.CodeActionKind.RefactorExtract,s.CodeActionKind.RefactorExtract),A.set(a.CodeActionKind.RefactorInline,s.CodeActionKind.RefactorInline),A.set(a.CodeActionKind.RefactorRewrite,s.CodeActionKind.RefactorRewrite),A.set(a.CodeActionKind.Source,s.CodeActionKind.Source),A.set(a.CodeActionKind.SourceOrganizeImports,s.CodeActionKind.SourceOrganizeImports),{asUri:o,asDiagnostics:d,asDiagnostic:g,asRange:m,asPosition:f,asDiagnosticSeverity:_,asHover:function(e){if(e)return new s.Hover(function(e){var t,o;if(l.string(e))return new s.MarkdownString(e);if(r.is(e))return(i=new s.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){var i=[];try{for(var u=n(e),c=u.next();!c.done;c=u.next()){var h=c.value,d=new s.MarkdownString;r.is(h)?d.appendCodeblock(h.value,h.language):d.appendMarkdown(h),i.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return i}switch(i=void 0,e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return(i=new s.MarkdownString).appendText(e.value),i;default:return(i=new s.MarkdownString).appendText("Unsupported Markup content received. Kind is: "+e.kind),i}}(e.contents),m(e.range))},asCompletionResult:function(e){if(e){if(Array.isArray(e))return e.map(v);var t=e;return new s.CompletionList(t.items.map(v),t.isIncomplete)}},asCompletionItem:v,asTextEdit:b,asTextEdits:E,asSignatureHelp:function(e){if(e){var t=new s.SignatureHelp;return l.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,l.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=C(e.signatures)),t}},asSignatureInformations:C,asSignatureInformation:S,asParameterInformations:T,asParameterInformation:w,asDefinitionResult:function(e){if(e)return l.array(e)?e.map((function(e){return k(e)})):k(e)},asLocation:k,asReferences:function(e){if(e)return e.map((function(e){return k(e)}))},asDocumentHighlights:function(e){if(e)return e.map(O)},asDocumentHighlight:O,asDocumentHighlightKind:R,asSymbolInformations:function(e,t){if(e)return e.map((function(e){return L(e,t)}))},asSymbolInformation:L,asDocumentSymbols:function(e){if(null!=e)return e.map(I)},asDocumentSymbol:I,asCommand:D,asCommands:function(e){if(e)return e.map(D)},asCodeAction:function(e){if(null!=e){var t=new s.CodeAction(e.title);return void 0!==e.kind&&(t.kind=function(e){var t,o;if(null!=e){var i=A.get(e);if(i)return i;var r=e.split(".");i=s.CodeActionKind.Empty;try{for(var a=n(r),l=a.next();!l.done;l=a.next()){var u=l.value;i=i.append(u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}return i}}(e.kind)),e.diagnostics&&(t.diagnostics=d(e.diagnostics)),e.edit&&(t.edit=M(e.edit)),e.command&&(t.command=D(e.command)),t}},asCodeLens:P,asCodeLenses:function(e){if(e)return e.map((function(e){return P(e)}))},asWorkspaceEdit:M,asDocumentLink:x,asDocumentLinks:function(e){if(e)return e.map(x)},asFoldingRangeKind:U,asFoldingRange:V,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(V)},asColor:B,asColorInformation:F,asColorInformations:function(e){if(Array.isArray(e))return e.map(F)},asColorPresentation:H,asColorPresentations:function(e){if(Array.isArray(e))return e.map(H)}}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}return e.prototype.trigger=function(e,t){var o=this;return void 0===t&&(t=this.defaultDelay),this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e){o.onSuccess=e})).then((function(){o.completionPromise=void 0,o.onSuccess=void 0;var e=o.task();return o.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((function(){o.timeout=void 0,o.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise},e.prototype.forceDelivery=function(){if(this.completionPromise){this.cancelTimeout();var e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}},e.prototype.isTriggered=function(){return void 0!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise=void 0},e.prototype.cancelTimeout=function(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e}();t.Delayer=n},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.TypeDefinitionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"typeDefinition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var o=e.typeDefinitionProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(l.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(l.TypeDefinitionRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return a.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:function(e,t,i){return n.provideTypeDefinition?n.provideTypeDefinition(e,t,i,o):o(e,t,i)}})},t}(o(151).TextDocumentFeature);t.TypeDefinitionFeature=c},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.ImplementationRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"implementation").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var o=e.implementationProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(l.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(l.ImplementationRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return a.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:function(e,t,i){return n.provideImplementation?n.provideImplementation(e,t,i,o):o(e,t,i)}})},t}(o(151).TextDocumentFeature);t.ImplementationFeature=c},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.DocumentColorRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"colorProvider").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.colorProvider){var o=e.colorProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this,o=this._client,n=function(e,n,i){var r={color:e,textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(n.document),range:o.code2ProtocolConverter.asRange(n.range)};return o.sendRequest(l.ColorPresentationRequest.type,r,i).then(t.asColorPresentations.bind(t),(function(e){return o.logFailedRequest(l.ColorPresentationRequest.type,e),Promise.resolve(null)}))},i=function(e,n){var i={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e)};return o.sendRequest(l.DocumentColorRequest.type,i,n).then(t.asColorInformations.bind(t),(function(e){return o.logFailedRequest(l.ColorPresentationRequest.type,e),Promise.resolve(null)}))},r=o.clientOptions.middleware;return a.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:function(e,t,o){return r.provideColorPresentations?r.provideColorPresentations(e,t,o,n):n(e,t,o)},provideDocumentColors:function(e,t){return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}})},t.prototype.asColor=function(e){return new a.Color(e.red,e.green,e.blue,e.alpha)},t.prototype.asColorInformations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.ColorInformation(t._client.protocol2CodeConverter.asRange(e.range),t.asColor(e.color))})):[]},t.prototype.asColorPresentations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){var o=new a.ColorPresentation(e.label);return o.additionalTextEdits=t._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),o.textEdit=t._client.protocol2CodeConverter.asTextEdit(e.textEdit),o})):[]},t}(o(151).TextDocumentFeature);t.ColorProviderFeature=c},function(e,t,o){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(152),r=o(109),s=o(101);function a(e,t){if(void 0!==e)return e[t]}var l=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return s.DidChangeWorkspaceFoldersNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillInitializeParams=function(e){var t=this,o=r.workspace.workspaceFolders;e.workspaceFolders=void 0===o?null:o.map((function(e){return t.asProtocol(e)}))},e.prototype.fillClientCapabilities=function(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0},e.prototype.initialize=function(e){var t=this,o=this._client;o.onRequest(s.WorkspaceFoldersRequest.type,(function(e){var n=function(){var e=r.workspace.workspaceFolders;return void 0===e?null:e.map((function(e){return t.asProtocol(e)}))},i=o.clientOptions.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));var n,l=a(a(a(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof l?n=l:!0===l&&(n=i.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})},e.prototype.register=function(e,t){var o=this,n=t.id,i=this._client,a=r.workspace.onDidChangeWorkspaceFolders((function(e){var t=function(e){var t={event:{added:e.added.map((function(e){return o.asProtocol(e)})),removed:e.removed.map((function(e){return o.asProtocol(e)}))}};o._client.sendNotification(s.DidChangeWorkspaceFoldersNotification.type,t)},n=i.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(n,a)},e.prototype.unregister=function(e){var t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var o=n(this._listeners.values()),i=o.next();!i.done;i=o.next()){i.value.dispose()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.asProtocol=function(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}},e}();t.WorkspaceFoldersFeature=l},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.FoldingRangeRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=u(u(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0},t.prototype.initialize=function(e,t){if(e.foldingRangeProvider){var o=e.foldingRangeProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this,o=this._client,n=function(e,n,i){var r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e)};return o.sendRequest(l.FoldingRangeRequest.type,r,i).then(t.asFoldingRanges.bind(t),(function(e){return o.logFailedRequest(l.FoldingRangeRequest.type,e),Promise.resolve(null)}))},i=o.clientOptions.middleware;return a.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:function(e,t,o){return i.provideFoldingRanges?i.provideFoldingRanges(e,t,o,n):n(e,0,o)}})},t.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case l.FoldingRangeKind.Comment:return a.FoldingRangeKind.Comment;case l.FoldingRangeKind.Imports:return a.FoldingRangeKind.Imports;case l.FoldingRangeKind.Region:return a.FoldingRangeKind.Region}},t.prototype.asFoldingRanges=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.FoldingRange(e.startLine,e.endLine,t.asFoldingRangeKind(e.kind))})):[]},t}(o(151).TextDocumentFeature);t.FoldingRangeFeature=c},function(e,t){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var o,n=String(e),i="",r=!!t&&!!t.extended,s=!!t&&!!t.globstar,a=!1,l=t&&"string"==typeof t.flags?t.flags:"",u=0,c=n.length;u1&&("/"===h||void 0===h)&&("/"===g||void 0===g)?(i+="(?:[^/]*(?:/|$))*",u++):i+="[^/]*";else i+=".*";break;default:i+=o}return l&&~l.indexOf("g")||(i="^"+i+"$"),new RegExp(i,l)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(185),i=function(){function e(e,t){this.name=e,this.p2m=t,this.diagnostics=new Map,this.toDispose=new n.DisposableCollection}return e.prototype.dispose=function(){this.toDispose.dispose()},e.prototype.get=function(e){var t=this.diagnostics.get(e);return t?t.diagnostics:[]},e.prototype.set=function(e,t){var o=this,i=this.diagnostics.get(e);if(i)i.diagnostics=t;else{var s=new r(e,t,this.name,this.p2m);this.diagnostics.set(e,s),this.toDispose.push(n.Disposable.create((function(){o.diagnostics.delete(e),s.dispose()})))}},e}();t.MonacoDiagnosticCollection=i;var r=function(){function e(e,t,o,n){var i=this;this.owner=o,this.p2m=n,this._markers=[],this._diagnostics=[],this.uri=monaco.Uri.parse(e),this.diagnostics=t,monaco.editor.onDidCreateModel((function(e){return i.doUpdateModelMarkers(e)}))}return Object.defineProperty(e.prototype,"diagnostics",{get:function(){return this._diagnostics},set:function(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._markers},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._markers=[],this.updateModelMarkers()},e.prototype.updateModelMarkers=function(){var e=monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e)},e.prototype.doUpdateModelMarkers=function(e){e&&this.uri.toString()===e.uri.toString()&&monaco.editor.setModelMarkers(e,this.owner,this._markers)},e}();t.MonacoModelDiagnostics=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(315),i=o(311),r=o(313),s=o(314),a=o(312),l=o(121);!function(e){function t(e,t){void 0===t&&(t={});var o=new n.MonacoToProtocolConverter,l=new n.ProtocolToMonacoConverter;return{commands:new i.MonacoCommands(e),languages:new r.MonacoLanguages(l,o),workspace:new s.MonacoWorkspace(l,o,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,o){void 0===o&&(o={});var n=t(e,o);return l.Services.install(n),n},e.get=function(){return l.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))},function(e,t,o){const n=o(534);n.setLocale=function(e){"function"==typeof e.default?n.Msg=Object.assign(n.Msg,e.default()):n.Msg=Object.assign(e,n.Msg)()},n.setLocale(o(535)),n.Blocks=Object.assign(n.Blocks,o(536)(n)),n.JavaScript=o(537)(n),n.Lua=o(538)(n),n.Dart=o(539)(n),n.PHP=o(540)(n),n.Python=o(541)(n),e.exports=n},function(module,exports){module.exports=function(){"use strict";var $jscomp=$jscomp||{};$jscomp.scope={};var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return void 0!==e},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.exportPath_=function(e,t,o){e=e.split("."),o=o||goog.global,e[0]in o||void 0===o.execScript||o.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?o[n]=t:o=o[n]&&o[n]!==Object.prototype[n]?o[n]:o[n]={}},goog.define=function(e,t){var o=t;if(!COMPILED){var n=goog.global.CLOSURE_UNCOMPILED_DEFINES,i=goog.global.CLOSURE_DEFINES;n&&void 0===n.nodeType&&Object.prototype.hasOwnProperty.call(n,e)?o=n[e]:i&&void 0===i.nodeType&&Object.prototype.hasOwnProperty.call(i,e)&&(o=i[e])}return o},goog.FEATURESET_YEAR=2012,goog.DEBUG=!1,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var o=e;(o=o.substring(0,o.lastIndexOf(".")))&&!goog.getObjectByName(o);)goog.implicitNamespaces_[o]=!0}goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED){if(e in goog.loadedModules_)return goog.loadedModules_[e].exports;if(!goog.implicitNamespaces_[e])return null!=(e=goog.getObjectByName(e))?e:null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&("function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath())},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(e in goog.loadedModules_)throw Error('Module with namespace "'+e+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){for(var o=e.split("."),n=t||goog.global,i=0;i>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"==typeof e.clone)return e.clone();for(var o in t="array"==t?[]:{},e)t[o]=goog.cloneObject(e[o]);return t}return e},goog.bindNative_=function(e,t,o){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,o){if(!e)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var o=this.createRequiresTranspilation_();this.requiresTranspilation_=o.map,this.transpilationTarget_=this.transpilationTarget_||o.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function o(){n&&(goog.global.setTimeout(n,0),n=null)}var n=t;if(e.length){for(var i=[],r=0;r<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(n):n)}else{var i=t.createElement("script");i.defer=goog.Dependency.defer_,i.async=!1,i.type="text/javascript",(n=goog.getScriptNonce())&&i.setAttribute("nonce",n),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(e.loaded(),e.resume())}):i.onload=function(){i.onload=null,e.loaded()},i.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(i)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,o,n,i){goog.Dependency.call(this,e,t,o,n,i)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,o=this;if(goog.isDocumentLoading_()){var n=function(e,o){var n=o?'