mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-25 07:16:45 +08:00
680 lines
1.7 MiB
680 lines
1.7 MiB
import{a as YE,b as Jp,c as XE,d as E2,e as QE,f as Fd,g as T2,h as Ur,i as yi,j as qa,k as qu,l as Gu,m as Xn,n as I2,o as JE,p as ZE,q as Ql,r as eT,s as tT}from"./chunk-CIZ5P7CP.js";import{$ as ti,$a as St,$b as ae,$c as Xt,$d as Gd,$e as qo,$f as eh,$g as Qo,$h as Ar,$i as S9,A as oT,Aa as CT,Ab as Wd,Ac as Di,Ad as xf,Ae as hc,Af as jI,Ag as oj,Ah as Tk,Ai as m9,B as Ga,Ba as wn,Bb as P2,Bc as jT,Bd as Ef,Be as rl,Bf as VI,Bg as uk,Bh as Ik,Bi as ig,C as rf,Ca as Bo,Cb as NT,Cc as jW,Cd as I,Ce as bI,Cf as KI,Cg as sj,Ch as kk,Ci as ng,D as A2,Da as wT,Db as F2,Dc as j2,Dd as ht,De as xt,Df as qI,Dg as Z2,Dh as Mi,Di as Kk,E as sT,Ea as xT,Eb as H2,Ec as VW,Ed as Kd,Ee as Xd,Ef as GI,Eg as nh,Eh as o9,Ei as qk,F as of,Fa as M2,Fb as Xa,Fc as VT,Fd as iI,Fe as yI,Ff as $I,Fg as Ue,Fh as v1,Fi as Qs,G as aT,Ga as Qn,Gb as RT,Gc as js,Gd as il,Ge as YW,Gf as YI,Gg as dn,Gh as at,Gi as Gk,H as yn,Ha as tc,Hb as DT,Hc as KT,Hd as nI,He as SI,Hf as XI,Hg as zf,Hh as Zo,Hi as p9,I as Sn,Ia as zs,Ib as MT,Ic as _f,Id as rI,Ie as Qd,If as QI,Ig as e9,Ih as Ak,Ii as dj,J as ec,Ja as oe,Jb as OT,Jc as vf,Jd as oI,Je as XW,Jf as JI,Jg as mk,Jh as b1,Ji as rg,K as Nt,Ka as uf,Kb as pf,Kc as oc,Kd as sI,Ke as CI,Kf as $o,Kg as qs,Kh as s9,Ki as S1,L as Re,La as te,Lb as PT,Lc as V2,Ld as aI,Le as QW,Lf as o1,Lg as pk,Lh as Lk,Li as $k,M as L2,Ma as ET,Mb as FT,Mc as el,Md as lI,Me as Jd,Mf as s1,Mg as Uf,Mh as Nk,Mi as Yk,N as lT,Na as rn,Nb as B2,Nc as KW,Nd as cc,Ne as JW,Nf as a1,Ng as Xo,Nh as a9,Ni as f9,O as wt,Oa as ji,Ob as Bt,Oc as jd,Od as Vs,Oe as wI,Of as l1,Og as fk,Oh as Rk,Oi as g9,P as cT,Pa as TT,Pb as G,Pc as Ju,Pd as Tf,Pe as ZW,Pf as ZI,Pg as p1,Ph as $f,Pi as _9,Q as dT,Qa as zd,Qb as Ne,Qc as Zu,Qd as If,Qe as xI,Qf as Pf,Qg as gk,Qh as Dk,Qi as Xk,R as hT,Ra as gt,Rb as we,Rc as e1,Rd as cI,Re as ej,Rf as Zd,Rg as Wf,Rh as Mk,Ri as Qk,S as sf,Sa as Kt,Sb as qe,Sc as qW,Sd as dI,Se as EI,Sf as Q2,Sg as le,Sh as Ok,Si as og,T as af,Ta as IT,Tb as HT,Tc as Uo,Td as hI,Te as tj,Tf as c1,Tg as ut,Th as l9,Ti as Jk,U as N2,Ua as wr,Ub as BT,Uc as sc,Ud as $W,Ue as Ko,Uf as In,Ug as jf,Uh as Ys,Ui as Zk,V as $u,Va as Ce,Vb as zT,Vc as bf,Vd as uI,Ve as pe,Vf as Ff,Vg as f1,Vh as Pk,Vi as v9,W as uT,Wa as Jn,Wb as er,Wc as qT,Wd as $2,We as de,Wf as kn,Wg as _k,Wh as Fk,Wi as eA,X as ot,Xa as st,Xb as rc,Xc as K2,Xd as qd,Xe as TI,Xf as d1,Xg as g1,Xh as Qt,Xi as C1,Y as $a,Ya as _t,Yb as Er,Yc as Wo,Yd as mI,Ye as i1,Yf as ek,Yg as _1,Yh as Yf,Yi as sg,Z as mT,Za as xn,Zb as z2,Zc as q2,Zd as Tn,Ze as II,Zf as Ki,Zg as rh,Zh as Hk,Zi as b9,_ as Wi,_a as ie,_b as UT,_c as GT,_d as pI,_e as Yr,_f as Lt,_g as ni,_h as nr,_i as y9,a as g,aa as It,ab as Ri,ac as go,ad as $T,ae as fI,af as Nf,ag as ln,ah as Gs,ai as Bk,aj as tA,b as be,ba as Bs,bb as Ya,bc as qr,bd as yf,be as t1,bf as Rf,bg as Hf,bh as mc,bi as pc,bj as iA,c as Be,ca as R2,cb as Vi,cc as Qu,cd as YT,ce as Tr,cf as kI,cg as tk,ch as mt,ci as c9,cj as nA,d as bt,da as UW,db as Us,dc as zo,dd as XT,de as pi,df as AI,dg as h1,dh as hn,di as Xf,dj as ag,e as Wr,ea as lf,eb as Kr,ec as Gr,ed as QT,ee as nl,ef as LI,eg as ik,eh as vk,ei as ci,ej as w1,f as Zp,fa as pT,fb as fo,fc as Ft,fd as JT,fe as ze,ff as Df,fg as nk,fh as Vf,fi as Xr,fj as rA,g as Jl,ga as fT,gb as Yu,gc as mi,gd as Rt,ge as qt,gf as Mf,gg as ij,gh as bk,gi as qi,gj as C9,h as Zl,ha as WW,hb as mf,hc as En,hd as ZT,he as Gt,hf as Of,hg as Bf,hh as yk,hi as sh,hj as oA,i as it,ia as gT,ib as ic,ic as Qa,id as GW,ie as Ht,if as NI,ig as nj,ih as Sk,ii as Xs,ij as lh,j as iT,ja as Bd,jb as De,jc as Ja,jd as Sf,je as kf,jf as RI,jg as u1,jh as Ck,ji as Qf,jj as ri,k as zW,ka as cf,kb as on,kc as ff,kd as eI,ke as Ir,kf as DI,kg as Yo,kh as wk,ki as d9,kj as sA,l as jr,la as _T,lb as Ve,lc as gf,ld as nt,le as $d,lf as MI,lg as rk,lh as t9,li as zk,lj as w9,m as ef,ma as Qe,mb as Zn,mc as ii,md as sn,me as dc,mf as n1,mg as _o,mh as aj,mi as Jf,mj as aA,n as tf,na as Cn,nb as Pt,nc as K,nd as li,ne as Af,nf as OI,ng as m1,nh as $s,ni as h9,nj as x9,o as ei,oa as po,ob as Je,oc as U2,od as $r,oe as jo,of as r1,og as ok,oh as Kf,oi as Uk,oj as lg,p as k2,pa as df,pb as Si,pc as Za,pd as tr,pe as kt,pf as Go,pg as sk,ph as xk,pi as lj,pj as ch,q as ft,qa as nn,qb as Ud,qc as Bn,qd as ac,qe as Lf,qf as Ks,qg as th,qh as oh,qi as Wk,qj as lA,r as W,ra as vT,rb as O2,rc as ge,rd as Cf,re as gI,rf as PI,rg as ak,rh as qf,ri as u9,rj as hj,s as Y,sa as jt,sb as kT,sc as F,sd as tI,se as ir,sf as uc,sg as J2,sh as i9,si as jk,sj as es,t as ai,ta as Vr,tb as xr,tc as W2,td as Vd,te as _I,tf as FI,tg as ih,th as kr,ti as Vk,tj as dh,u as nT,ua as bT,ub as Ws,uc as WT,ud as G2,ue as ct,uf as X2,ug as cn,uh as Ek,ui as cj,uj as Js,v as re,va as D2,vb as AT,vc as Se,vd as rt,ve as vI,vf as HI,vg as lk,vh as Gf,vi as ah,vj as hh,w as nf,wa as yT,wb as LT,wc as Me,wd as an,we as Yd,wf as BI,wg as ck,wh as ol,wi as Zf,x as rT,xa as hf,xb as nc,xc as k,xd as wf,xe as Y2,xf as zI,xg as dk,xh as Jo,xi as y1,y as Hd,ya as Vt,yb as Xu,yc as Ie,yd as tl,ye as zn,yf as UI,yg as rj,yh as n9,yi as eg,z as Ui,za as ST,zb as Yt,zc as ye,zd as lc,ze as Vo,zf as WI,zg as hk,zh as r9,zi as tg}from"./chunk-ITWFYK6C.js";import{a as me,b as Xe,c as Xl,d as Ho,e as Ka,f as lt,g as BW,h as zi,i as mo}from"./chunk-2YVZDWG7.js";var $A=lt(()=>{});var Ag=lt((kg,YA)=>{(function(i,e){typeof kg=="object"?YA.exports=kg=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(kg,function(){var i=i||function(e,t){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof Xl=="function")try{n=$A()}catch(b){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(b){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(b){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function b(){}return function(C){var T;return b.prototype=C,T=new b,b.prototype=null,T}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(b){var C=o(this);return b&&C.mixIn(b),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var C in b)b.hasOwnProperty(C)&&(this[C]=b[C]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(b,C){b=this.words=b||[],C!=t?this.sigBytes=C:this.sigBytes=b.length*4},toString:function(b){return(b||h).stringify(this)},concat:function(b){var C=this.words,T=b.words,w=this.sigBytes,A=b.sigBytes;if(this.clamp(),w%4)for(var O=0;O<A;O++){var D=T[O>>>2]>>>24-O%4*8&255;C[w+O>>>2]|=D<<24-(w+O)%4*8}else for(var j=0;j<A;j+=4)C[w+j>>>2]=T[j>>>2];return this.sigBytes+=A,this},clamp:function(){var b=this.words,C=this.sigBytes;b[C>>>2]&=4294967295<<32-C%4*8,b.length=e.ceil(C/4)},clone:function(){var b=l.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var C=[],T=0;T<b;T+=4)C.push(r());return new c.init(C,b)}}),d=s.enc={},h=d.Hex={stringify:function(b){for(var C=b.words,T=b.sigBytes,w=[],A=0;A<T;A++){var O=C[A>>>2]>>>24-A%4*8&255;w.push((O>>>4).toString(16)),w.push((O&15).toString(16))}return w.join("")},parse:function(b){for(var C=b.length,T=[],w=0;w<C;w+=2)T[w>>>3]|=parseInt(b.substr(w,2),16)<<24-w%8*4;return new c.init(T,C/2)}},u=d.Latin1={stringify:function(b){for(var C=b.words,T=b.sigBytes,w=[],A=0;A<T;A++){var O=C[A>>>2]>>>24-A%4*8&255;w.push(String.fromCharCode(O))}return w.join("")},parse:function(b){for(var C=b.length,T=[],w=0;w<C;w++)T[w>>>2]|=(b.charCodeAt(w)&255)<<24-w%4*8;return new c.init(T,C)}},m=d.Utf8={stringify:function(b){try{return decodeURIComponent(escape(u.stringify(b)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(b){return u.parse(unescape(encodeURIComponent(b)))}},p=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=m.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var C,T=this._data,w=T.words,A=T.sigBytes,O=this.blockSize,D=O*4,j=A/D;b?j=e.ceil(j):j=e.max((j|0)-this._minBufferSize,0);var q=j*O,_e=e.min(q*4,A);if(q){for(var J=0;J<q;J+=O)this._doProcessBlock(w,J);C=w.splice(0,q),T.sigBytes-=_e}return new c.init(C,_e)},clone:function(){var b=l.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0}),f=a.Hasher=p.extend({cfg:l.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){b&&this._append(b);var C=this._doFinalize();return C},blockSize:512/32,_createHelper:function(b){return function(C,T){return new b.init(T).finalize(C)}},_createHmacHelper:function(b){return function(C,T){return new _.HMAC.init(b,T).finalize(C)}}}),_=s.algo={};return s}(Math);return i})});var QA=lt((Lg,XA)=>{(function(i,e){typeof Lg=="object"?XA.exports=Lg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Lg,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var m=0;m<64;m++)a[m]=e.abs(e.sin(m+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,p){for(var f=0;f<16;f++){var _=p+f,b=m[_];m[_]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var C=this._hash.words,T=m[p+0],w=m[p+1],A=m[p+2],O=m[p+3],D=m[p+4],j=m[p+5],q=m[p+6],_e=m[p+7],J=m[p+8],ke=m[p+9],Oe=m[p+10],Pe=m[p+11],et=m[p+12],B=m[p+13],Z=m[p+14],ee=m[p+15],V=C[0],H=C[1],U=C[2],X=C[3];V=c(V,H,U,X,T,7,a[0]),X=c(X,V,H,U,w,12,a[1]),U=c(U,X,V,H,A,17,a[2]),H=c(H,U,X,V,O,22,a[3]),V=c(V,H,U,X,D,7,a[4]),X=c(X,V,H,U,j,12,a[5]),U=c(U,X,V,H,q,17,a[6]),H=c(H,U,X,V,_e,22,a[7]),V=c(V,H,U,X,J,7,a[8]),X=c(X,V,H,U,ke,12,a[9]),U=c(U,X,V,H,Oe,17,a[10]),H=c(H,U,X,V,Pe,22,a[11]),V=c(V,H,U,X,et,7,a[12]),X=c(X,V,H,U,B,12,a[13]),U=c(U,X,V,H,Z,17,a[14]),H=c(H,U,X,V,ee,22,a[15]),V=d(V,H,U,X,w,5,a[16]),X=d(X,V,H,U,q,9,a[17]),U=d(U,X,V,H,Pe,14,a[18]),H=d(H,U,X,V,T,20,a[19]),V=d(V,H,U,X,j,5,a[20]),X=d(X,V,H,U,Oe,9,a[21]),U=d(U,X,V,H,ee,14,a[22]),H=d(H,U,X,V,D,20,a[23]),V=d(V,H,U,X,ke,5,a[24]),X=d(X,V,H,U,Z,9,a[25]),U=d(U,X,V,H,O,14,a[26]),H=d(H,U,X,V,J,20,a[27]),V=d(V,H,U,X,B,5,a[28]),X=d(X,V,H,U,A,9,a[29]),U=d(U,X,V,H,_e,14,a[30]),H=d(H,U,X,V,et,20,a[31]),V=h(V,H,U,X,j,4,a[32]),X=h(X,V,H,U,J,11,a[33]),U=h(U,X,V,H,Pe,16,a[34]),H=h(H,U,X,V,Z,23,a[35]),V=h(V,H,U,X,w,4,a[36]),X=h(X,V,H,U,D,11,a[37]),U=h(U,X,V,H,_e,16,a[38]),H=h(H,U,X,V,Oe,23,a[39]),V=h(V,H,U,X,B,4,a[40]),X=h(X,V,H,U,T,11,a[41]),U=h(U,X,V,H,O,16,a[42]),H=h(H,U,X,V,q,23,a[43]),V=h(V,H,U,X,ke,4,a[44]),X=h(X,V,H,U,et,11,a[45]),U=h(U,X,V,H,ee,16,a[46]),H=h(H,U,X,V,A,23,a[47]),V=u(V,H,U,X,T,6,a[48]),X=u(X,V,H,U,_e,10,a[49]),U=u(U,X,V,H,Z,15,a[50]),H=u(H,U,X,V,j,21,a[51]),V=u(V,H,U,X,et,6,a[52]),X=u(X,V,H,U,O,10,a[53]),U=u(U,X,V,H,Oe,15,a[54]),H=u(H,U,X,V,w,21,a[55]),V=u(V,H,U,X,J,6,a[56]),X=u(X,V,H,U,ee,10,a[57]),U=u(U,X,V,H,q,15,a[58]),H=u(H,U,X,V,B,21,a[59]),V=u(V,H,U,X,D,6,a[60]),X=u(X,V,H,U,Pe,10,a[61]),U=u(U,X,V,H,A,15,a[62]),H=u(H,U,X,V,ke,21,a[63]),C[0]=C[0]+V|0,C[1]=C[1]+H|0,C[2]=C[2]+U|0,C[3]=C[3]+X|0},_doFinalize:function(){var m=this._data,p=m.words,f=this._nDataBytes*8,_=m.sigBytes*8;p[_>>>5]|=128<<24-_%32;var b=e.floor(f/4294967296),C=f;p[(_+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p[(_+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,m.sigBytes=(p.length+1)*4,this._process();for(var T=this._hash,w=T.words,A=0;A<4;A++){var O=w[A];w[A]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return T},clone:function(){var m=o.clone.call(this);return m._hash=this._hash.clone(),m}});function c(m,p,f,_,b,C,T){var w=m+(p&f|~p&_)+b+T;return(w<<C|w>>>32-C)+p}function d(m,p,f,_,b,C,T){var w=m+(p&_|f&~_)+b+T;return(w<<C|w>>>32-C)+p}function h(m,p,f,_,b,C,T){var w=m+(p^f^_)+b+T;return(w<<C|w>>>32-C)+p}function u(m,p,f,_,b,C,T){var w=m+(f^(p|~_))+b+T;return(w<<C|w>>>32-C)+p}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var ZA=lt((Ng,JA)=>{(function(i,e){typeof Ng=="object"?JA.exports=Ng=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Ng,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function h(f){for(var _=e.sqrt(f),b=2;b<=_;b++)if(!(f%b))return!1;return!0}function u(f){return(f-(f|0))*4294967296|0}for(var m=2,p=0;p<64;)h(m)&&(p<8&&(a[p]=u(e.pow(m,1/2))),l[p]=u(e.pow(m,1/3)),p++),m++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(h,u){for(var m=this._hash.words,p=m[0],f=m[1],_=m[2],b=m[3],C=m[4],T=m[5],w=m[6],A=m[7],O=0;O<64;O++){if(O<16)c[O]=h[u+O]|0;else{var D=c[O-15],j=(D<<25|D>>>7)^(D<<14|D>>>18)^D>>>3,q=c[O-2],_e=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;c[O]=j+c[O-7]+_e+c[O-16]}var J=C&T^~C&w,ke=p&f^p&_^f&_,Oe=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),Pe=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),et=A+Pe+J+l[O]+c[O],B=Oe+ke;A=w,w=T,T=C,C=b+et|0,b=_,_=f,f=p,p=et+B|0}m[0]=m[0]+p|0,m[1]=m[1]+f|0,m[2]=m[2]+_|0,m[3]=m[3]+b|0,m[4]=m[4]+C|0,m[5]=m[5]+T|0,m[6]=m[6]+w|0,m[7]=m[7]+A|0},_doFinalize:function(){var h=this._data,u=h.words,m=this._nDataBytes*8,p=h.sigBytes*8;return u[p>>>5]|=128<<24-p%32,u[(p+64>>>9<<4)+14]=e.floor(m/4294967296),u[(p+64>>>9<<4)+15]=m,h.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var h=o.clone.call(this);return h._hash=this._hash.clone(),h}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var tL=lt((Rg,eL)=>{(function(i,e){typeof Rg=="object"?eL.exports=Rg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Rg,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var h=[],u=0;u<c;u+=3)for(var m=l[u>>>2]>>>24-u%4*8&255,p=l[u+1>>>2]>>>24-(u+1)%4*8&255,f=l[u+2>>>2]>>>24-(u+2)%4*8&255,_=m<<16|p<<8|f,b=0;b<4&&u+b*.75<c;b++)h.push(d.charAt(_>>>6*(3-b)&63));var C=d.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<c.length;h++)d[c.charCodeAt(h)]=h}var u=c.charAt(64);if(u){var m=a.indexOf(u);m!==-1&&(l=m)}return s(a,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(a,l,c){for(var d=[],h=0,u=0;u<l;u++)if(u%4){var m=c[a.charCodeAt(u-1)]<<u%4*2,p=c[a.charCodeAt(u)]>>>6-u%4*2,f=m|p;d[h>>>2]|=f<<24-h%4*8,h++}return n.create(d,h)}}(),i.enc.Base64})});var Q9=lt((qae,wL)=>{wL.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var RL=lt((Gae,NL)=>{"use strict";var zg=Object.prototype.hasOwnProperty,LL=Object.prototype.toString,xL=Object.defineProperty,EL=Object.getOwnPropertyDescriptor,TL=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LL.call(e)==="[object Array]"},IL=function(e){if(!e||LL.call(e)!=="[object Object]")return!1;var t=zg.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&zg.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||zg.call(e,r)},kL=function(e,t){xL&&t.name==="__proto__"?xL(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},AL=function(e,t){if(t==="__proto__")if(zg.call(e,t)){if(EL)return EL(e,t).value}else return;return e[t]};NL.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(t in e)n=AL(a,t),r=AL(e,t),a!==r&&(d&&r&&(IL(r)||(o=TL(r)))?(o?(o=!1,s=n&&TL(n)?n:[]):s=n&&IL(n)?n:{},kL(a,{name:t,newValue:i(d,s,r)})):typeof r!="undefined"&&kL(a,{name:t,newValue:r}));return a}});var V1=lt((Bhe,QN)=>{"use strict";var XN={};function ZK(i){var e,t,n=XN[i];if(n)return n;for(n=XN[i]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<i.length;e++)n[i.charCodeAt(e)]=i[e];return n}function Jg(i,e,t){var n,r,o,s,a,l="";for(typeof e!="string"&&(t=e,e=Jg.defaultChars),typeof t=="undefined"&&(t=!0),a=ZK(e),n=0,r=i.length;n<r;n++){if(o=i.charCodeAt(n),t&&o===37&&n+2<r&&/^[0-9a-f]{2}$/i.test(i.slice(n+1,n+3))){l+=i.slice(n,n+3),n+=2;continue}if(o<128){l+=a[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1<r&&(s=i.charCodeAt(n+1),s>=56320&&s<=57343)){l+=encodeURIComponent(i[n]+i[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(i[n])}return l}Jg.defaultChars=";/?:@&=+$,-_.!~*'()#";Jg.componentChars="-_.!~*'()";QN.exports=Jg});var i_=lt(na=>{"use strict";var sq=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];na.REPLACEMENT_CHARACTER="\uFFFD";na.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};na.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};na.isSurrogate=function(i){return i>=55296&&i<=57343};na.isSurrogatePair=function(i){return i>=56320&&i<=57343};na.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};na.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};na.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||sq.indexOf(i)>-1}});var n_=lt((s1e,gR)=>{"use strict";gR.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var vR=lt((a1e,_R)=>{"use strict";var wh=i_(),Ry=n_(),Sc=wh.CODE_POINTS,aq=65536,Dy=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=aq}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){let t=this.html.charCodeAt(this.pos+1);if(wh.isSurrogatePair(t))return this.pos++,this._addGap(),wh.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Sc.EOF;return this._err(Ry.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Sc.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===Sc.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===Sc.CARRIAGE_RETURN?(this.skipNextNewLine=!0,Sc.LINE_FEED):(this.skipNextNewLine=!1,wh.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===Sc.LINE_FEED||e===Sc.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){wh.isControlCodePoint(e)?this._err(Ry.controlCharacterInInputStream):wh.isUndefinedCodePoint(e)&&this._err(Ry.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};_R.exports=Dy});var yR=lt((l1e,bR)=>{"use strict";bR.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var Q1=lt((c1e,vD)=>{"use strict";var lq=vR(),zt=i_(),xc=yR(),Q=n_(),R=zt.CODE_POINTS,Cc=zt.CODE_POINT_SEQUENCES,cq={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},uD=1,mD=2,pD=4,dq=uD|mD|pD,pt="DATA_STATE",Eh="RCDATA_STATE",Y1="RAWTEXT_STATE",sa="SCRIPT_DATA_STATE",fD="PLAINTEXT_STATE",SR="TAG_OPEN_STATE",CR="END_TAG_OPEN_STATE",My="TAG_NAME_STATE",wR="RCDATA_LESS_THAN_SIGN_STATE",xR="RCDATA_END_TAG_OPEN_STATE",ER="RCDATA_END_TAG_NAME_STATE",TR="RAWTEXT_LESS_THAN_SIGN_STATE",IR="RAWTEXT_END_TAG_OPEN_STATE",kR="RAWTEXT_END_TAG_NAME_STATE",AR="SCRIPT_DATA_LESS_THAN_SIGN_STATE",LR="SCRIPT_DATA_END_TAG_OPEN_STATE",NR="SCRIPT_DATA_END_TAG_NAME_STATE",RR="SCRIPT_DATA_ESCAPE_START_STATE",DR="SCRIPT_DATA_ESCAPE_START_DASH_STATE",yo="SCRIPT_DATA_ESCAPED_STATE",MR="SCRIPT_DATA_ESCAPED_DASH_STATE",Oy="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",r_="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",OR="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",PR="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",FR="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",ra="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",HR="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",BR="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",o_="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",zR="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",ss="BEFORE_ATTRIBUTE_NAME_STATE",s_="ATTRIBUTE_NAME_STATE",Py="AFTER_ATTRIBUTE_NAME_STATE",Fy="BEFORE_ATTRIBUTE_VALUE_STATE",a_="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",l_="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",c_="ATTRIBUTE_VALUE_UNQUOTED_STATE",Hy="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",ul="SELF_CLOSING_START_TAG_STATE",K1="BOGUS_COMMENT_STATE",UR="MARKUP_DECLARATION_OPEN_STATE",WR="COMMENT_START_STATE",jR="COMMENT_START_DASH_STATE",ml="COMMENT_STATE",VR="COMMENT_LESS_THAN_SIGN_STATE",KR="COMMENT_LESS_THAN_SIGN_BANG_STATE",qR="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",GR="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",d_="COMMENT_END_DASH_STATE",h_="COMMENT_END_STATE",$R="COMMENT_END_BANG_STATE",YR="DOCTYPE_STATE",u_="BEFORE_DOCTYPE_NAME_STATE",m_="DOCTYPE_NAME_STATE",XR="AFTER_DOCTYPE_NAME_STATE",QR="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",JR="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",By="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",zy="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Uy="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ZR="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",eD="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",tD="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",q1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",G1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Wy="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",oa="BOGUS_DOCTYPE_STATE",p_="CDATA_SECTION_STATE",iD="CDATA_SECTION_BRACKET_STATE",nD="CDATA_SECTION_END_STATE",xh="CHARACTER_REFERENCE_STATE",rD="NAMED_CHARACTER_REFERENCE_STATE",oD="AMBIGUOS_AMPERSAND_STATE",sD="NUMERIC_CHARACTER_REFERENCE_STATE",aD="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",lD="DECIMAL_CHARACTER_REFERENCE_START_STATE",cD="HEXADEMICAL_CHARACTER_REFERENCE_STATE",dD="DECIMAL_CHARACTER_REFERENCE_STATE",$1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function oi(i){return i===R.SPACE||i===R.LINE_FEED||i===R.TABULATION||i===R.FORM_FEED}function X1(i){return i>=R.DIGIT_0&&i<=R.DIGIT_9}function So(i){return i>=R.LATIN_CAPITAL_A&&i<=R.LATIN_CAPITAL_Z}function wc(i){return i>=R.LATIN_SMALL_A&&i<=R.LATIN_SMALL_Z}function fl(i){return wc(i)||So(i)}function jy(i){return fl(i)||X1(i)}function gD(i){return i>=R.LATIN_CAPITAL_A&&i<=R.LATIN_CAPITAL_F}function _D(i){return i>=R.LATIN_SMALL_A&&i<=R.LATIN_SMALL_F}function hq(i){return X1(i)||gD(i)||_D(i)}function f_(i){return i+32}function Ci(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function pl(i){return String.fromCharCode(f_(i))}function hD(i,e){let t=xc[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=xc[o];if(s<e)n=o+1;else if(s>e)r=o-1;else return xc[o+t]}return-1}var ar=class i{constructor(){this.preprocessor=new lq,this.tokenQueue=[],this.allowCDATA=!1,this.state=pt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:i.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0,s=e.length,a=0,l=t,c;for(;a<s;a++){if(a>0&&(l=this._consume(),r++),l===R.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==f_(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==Cc.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==Cc.SCRIPT_STRING[e])return!1;return!0}_createStartTagToken(){this.currentToken={type:i.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:i.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:i.COMMENT_TOKEN,data:""}}_createDoctypeToken(e){this.currentToken={type:i.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t}}_createEOFToken(){this.currentToken={type:i.EOF_TOKEN}}_createAttr(e){this.currentAttr={name:e,value:""}}_leaveAttrName(e){i.getTokenAttr(this.currentToken,this.currentAttr.name)===null?this.currentToken.attrs.push(this.currentAttr):this._err(Q.duplicateAttribute),this.state=e}_leaveAttrValue(e){this.state=e}_emitCurrentToken(){this._emitCurrentCharacterToken();let e=this.currentToken;this.currentToken=null,e.type===i.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===i.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(Q.endTagWithAttributes),e.selfClosing&&this._err(Q.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=i.CHARACTER_TOKEN;oi(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===R.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,Ci(e))}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t])}_emitChars(e){this._appendCharToCurrentCharacterToken(i.CHARACTER_TOKEN,e)}_matchNamedCharacterReference(e){let t=null,n=1,r=hD(0,e);for(this.tempBuff.push(e);r>-1;){let o=xc[r],s=o<dq;s&&o&uD&&(t=o&mD?[xc[++r],xc[++r]]:[xc[++r]],n=0);let l=this._consume();if(this.tempBuff.push(l),n++,l===R.EOF)break;s?r=o&pD?hD(r,l):-1:r=l===o?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===a_||this.returnState===l_||this.returnState===c_}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){let t=this._consume();return this._unconsume(),t===R.EQUALS_SIGN||jy(t)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=Ci(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[pt](e){this.preprocessor.dropParsedChunk(),e===R.LESS_THAN_SIGN?this.state=SR:e===R.AMPERSAND?(this.returnState=pt,this.state=xh):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitCodePoint(e)):e===R.EOF?this._emitEOFToken():this._emitCodePoint(e)}[Eh](e){this.preprocessor.dropParsedChunk(),e===R.AMPERSAND?(this.returnState=Eh,this.state=xh):e===R.LESS_THAN_SIGN?this.state=wR:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?this._emitEOFToken():this._emitCodePoint(e)}[Y1](e){this.preprocessor.dropParsedChunk(),e===R.LESS_THAN_SIGN?this.state=TR:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?this._emitEOFToken():this._emitCodePoint(e)}[sa](e){this.preprocessor.dropParsedChunk(),e===R.LESS_THAN_SIGN?this.state=AR:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?this._emitEOFToken():this._emitCodePoint(e)}[fD](e){this.preprocessor.dropParsedChunk(),e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?this._emitEOFToken():this._emitCodePoint(e)}[SR](e){e===R.EXCLAMATION_MARK?this.state=UR:e===R.SOLIDUS?this.state=CR:fl(e)?(this._createStartTagToken(),this._reconsumeInState(My)):e===R.QUESTION_MARK?(this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(K1)):e===R.EOF?(this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(pt))}[CR](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(My)):e===R.GREATER_THAN_SIGN?(this._err(Q.missingEndTagName),this.state=pt):e===R.EOF?(this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(K1))}[My](e){oi(e)?this.state=ss:e===R.SOLIDUS?this.state=ul:e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):So(e)?this.currentToken.tagName+=pl(e):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.tagName+=zt.REPLACEMENT_CHARACTER):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=Ci(e)}[wR](e){e===R.SOLIDUS?(this.tempBuff=[],this.state=xR):(this._emitChars("<"),this._reconsumeInState(Eh))}[xR](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(ER)):(this._emitChars("</"),this._reconsumeInState(Eh))}[ER](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=Ci(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(oi(e)){this.state=ss;return}if(e===R.SOLIDUS){this.state=ul;return}if(e===R.GREATER_THAN_SIGN){this.state=pt,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Eh)}}[TR](e){e===R.SOLIDUS?(this.tempBuff=[],this.state=IR):(this._emitChars("<"),this._reconsumeInState(Y1))}[IR](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(kR)):(this._emitChars("</"),this._reconsumeInState(Y1))}[kR](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=Ci(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(oi(e)){this.state=ss;return}if(e===R.SOLIDUS){this.state=ul;return}if(e===R.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=pt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Y1)}}[AR](e){e===R.SOLIDUS?(this.tempBuff=[],this.state=LR):e===R.EXCLAMATION_MARK?(this.state=RR,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(sa))}[LR](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(NR)):(this._emitChars("</"),this._reconsumeInState(sa))}[NR](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=Ci(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(oi(e)){this.state=ss;return}else if(e===R.SOLIDUS){this.state=ul;return}else if(e===R.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=pt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(sa)}}[RR](e){e===R.HYPHEN_MINUS?(this.state=DR,this._emitChars("-")):this._reconsumeInState(sa)}[DR](e){e===R.HYPHEN_MINUS?(this.state=Oy,this._emitChars("-")):this._reconsumeInState(sa)}[yo](e){e===R.HYPHEN_MINUS?(this.state=MR,this._emitChars("-")):e===R.LESS_THAN_SIGN?this.state=r_:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[MR](e){e===R.HYPHEN_MINUS?(this.state=Oy,this._emitChars("-")):e===R.LESS_THAN_SIGN?this.state=r_:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.state=yo,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=yo,this._emitCodePoint(e))}[Oy](e){e===R.HYPHEN_MINUS?this._emitChars("-"):e===R.LESS_THAN_SIGN?this.state=r_:e===R.GREATER_THAN_SIGN?(this.state=sa,this._emitChars(">")):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.state=yo,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=yo,this._emitCodePoint(e))}[r_](e){e===R.SOLIDUS?(this.tempBuff=[],this.state=OR):fl(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(FR)):(this._emitChars("<"),this._reconsumeInState(yo))}[OR](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(PR)):(this._emitChars("</"),this._reconsumeInState(yo))}[PR](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=Ci(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(oi(e)){this.state=ss;return}if(e===R.SOLIDUS){this.state=ul;return}if(e===R.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=pt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(yo)}}[FR](e){oi(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?ra:yo,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(yo)}[ra](e){e===R.HYPHEN_MINUS?(this.state=HR,this._emitChars("-")):e===R.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[HR](e){e===R.HYPHEN_MINUS?(this.state=BR,this._emitChars("-")):e===R.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[BR](e){e===R.HYPHEN_MINUS?this._emitChars("-"):e===R.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===R.GREATER_THAN_SIGN?(this.state=sa,this._emitChars(">")):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===R.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[o_](e){e===R.SOLIDUS?(this.tempBuff=[],this.state=zR,this._emitChars("/")):this._reconsumeInState(ra)}[zR](e){oi(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?yo:ra,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(ra)}[ss](e){oi(e)||(e===R.SOLIDUS||e===R.GREATER_THAN_SIGN||e===R.EOF?this._reconsumeInState(Py):e===R.EQUALS_SIGN?(this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=s_):(this._createAttr(""),this._reconsumeInState(s_)))}[s_](e){oi(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN||e===R.EOF?(this._leaveAttrName(Py),this._unconsume()):e===R.EQUALS_SIGN?this._leaveAttrName(Fy):So(e)?this.currentAttr.name+=pl(e):e===R.QUOTATION_MARK||e===R.APOSTROPHE||e===R.LESS_THAN_SIGN?(this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ci(e)):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=zt.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ci(e)}[Py](e){oi(e)||(e===R.SOLIDUS?this.state=ul:e===R.EQUALS_SIGN?this.state=Fy:e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(s_)))}[Fy](e){oi(e)||(e===R.QUOTATION_MARK?this.state=a_:e===R.APOSTROPHE?this.state=l_:e===R.GREATER_THAN_SIGN?(this._err(Q.missingAttributeValue),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(c_))}[a_](e){e===R.QUOTATION_MARK?this.state=Hy:e===R.AMPERSAND?(this.returnState=a_,this.state=xh):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ci(e)}[l_](e){e===R.APOSTROPHE?this.state=Hy:e===R.AMPERSAND?(this.returnState=l_,this.state=xh):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ci(e)}[c_](e){oi(e)?this._leaveAttrValue(ss):e===R.AMPERSAND?(this.returnState=c_,this.state=xh):e===R.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===R.QUOTATION_MARK||e===R.APOSTROPHE||e===R.LESS_THAN_SIGN||e===R.EQUALS_SIGN||e===R.GRAVE_ACCENT?(this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ci(e)):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ci(e)}[Hy](e){oi(e)?this._leaveAttrValue(ss):e===R.SOLIDUS?this._leaveAttrValue(ul):e===R.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.missingWhitespaceBetweenAttributes),this._reconsumeInState(ss))}[ul](e){e===R.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.unexpectedSolidusInTag),this._reconsumeInState(ss))}[K1](e){e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):this.currentToken.data+=Ci(e)}[UR](e){this._consumeSequenceIfMatch(Cc.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=WR):this._consumeSequenceIfMatch(Cc.DOCTYPE_STRING,e,!1)?this.state=YR:this._consumeSequenceIfMatch(Cc.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=p_:(this._err(Q.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=K1):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(K1))}[WR](e){e===R.HYPHEN_MINUS?this.state=jR:e===R.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(ml)}[jR](e){e===R.HYPHEN_MINUS?this.state=h_:e===R.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[ml](e){e===R.HYPHEN_MINUS?this.state=d_:e===R.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=VR):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):e===R.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ci(e)}[VR](e){e===R.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=KR):e===R.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ml)}[KR](e){e===R.HYPHEN_MINUS?this.state=qR:this._reconsumeInState(ml)}[qR](e){e===R.HYPHEN_MINUS?this.state=GR:this._reconsumeInState(d_)}[GR](e){e!==R.GREATER_THAN_SIGN&&e!==R.EOF&&this._err(Q.nestedComment),this._reconsumeInState(h_)}[d_](e){e===R.HYPHEN_MINUS?this.state=h_:e===R.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[h_](e){e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===R.EXCLAMATION_MARK?this.state=$R:e===R.HYPHEN_MINUS?this.currentToken.data+="-":e===R.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ml))}[$R](e){e===R.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=d_):e===R.GREATER_THAN_SIGN?(this._err(Q.incorrectlyClosedComment),this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ml))}[YR](e){oi(e)?this.state=u_:e===R.GREATER_THAN_SIGN?this._reconsumeInState(u_):e===R.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(u_))}[u_](e){oi(e)||(So(e)?(this._createDoctypeToken(pl(e)),this.state=m_):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(zt.REPLACEMENT_CHARACTER),this.state=m_):e===R.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ci(e)),this.state=m_))}[m_](e){oi(e)?this.state=XR:e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):So(e)?this.currentToken.name+=pl(e):e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.name+=zt.REPLACEMENT_CHARACTER):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ci(e)}[XR](e){oi(e)||(e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(Cc.PUBLIC_STRING,e,!1)?this.state=QR:this._consumeSequenceIfMatch(Cc.SYSTEM_STRING,e,!1)?this.state=eD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[QR](e){oi(e)?this.state=JR:e===R.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=By):e===R.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=zy):e===R.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[JR](e){oi(e)||(e===R.QUOTATION_MARK?(this.currentToken.publicId="",this.state=By):e===R.APOSTROPHE?(this.currentToken.publicId="",this.state=zy):e===R.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[By](e){e===R.QUOTATION_MARK?this.state=Uy:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===R.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ci(e)}[zy](e){e===R.APOSTROPHE?this.state=Uy:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===R.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ci(e)}[Uy](e){oi(e)?this.state=ZR:e===R.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===R.QUOTATION_MARK?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=q1):e===R.APOSTROPHE?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=G1):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[ZR](e){oi(e)||(e===R.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===R.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===R.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[eD](e){oi(e)?this.state=tD:e===R.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=q1):e===R.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=G1):e===R.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[tD](e){oi(e)||(e===R.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===R.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===R.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[q1](e){e===R.QUOTATION_MARK?this.state=Wy:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===R.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ci(e)}[G1](e){e===R.APOSTROPHE?this.state=Wy:e===R.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===R.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ci(e)}[Wy](e){oi(e)||(e===R.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===R.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(oa)))}[oa](e){e===R.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===R.NULL?this._err(Q.unexpectedNullCharacter):e===R.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[p_](e){e===R.RIGHT_SQUARE_BRACKET?this.state=iD:e===R.EOF?(this._err(Q.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[iD](e){e===R.RIGHT_SQUARE_BRACKET?this.state=nD:(this._emitChars("]"),this._reconsumeInState(p_))}[nD](e){e===R.GREATER_THAN_SIGN?this.state=pt:e===R.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(p_))}[xh](e){this.tempBuff=[R.AMPERSAND],e===R.NUMBER_SIGN?(this.tempBuff.push(e),this.state=sD):jy(e)?this._reconsumeInState(rD):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[rD](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[R.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===R.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(Q.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=oD}[oD](e){jy(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ci(e):this._emitCodePoint(e):(e===R.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[sD](e){this.charRefCode=0,e===R.LATIN_SMALL_X||e===R.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=aD):this._reconsumeInState(lD)}[aD](e){hq(e)?this._reconsumeInState(cD):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[lD](e){X1(e)?this._reconsumeInState(dD):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[cD](e){gD(e)?this.charRefCode=this.charRefCode*16+e-55:_D(e)?this.charRefCode=this.charRefCode*16+e-87:X1(e)?this.charRefCode=this.charRefCode*16+e-48:e===R.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[dD](e){X1(e)?this.charRefCode=this.charRefCode*10+e-48:e===R.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[$1](){if(this.charRefCode===R.NULL)this._err(Q.nullCharacterReference),this.charRefCode=R.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Q.characterReferenceOutsideUnicodeRange),this.charRefCode=R.REPLACEMENT_CHARACTER;else if(zt.isSurrogate(this.charRefCode))this._err(Q.surrogateCharacterReference),this.charRefCode=R.REPLACEMENT_CHARACTER;else if(zt.isUndefinedCodePoint(this.charRefCode))this._err(Q.noncharacterCharacterReference);else if(zt.isControlCodePoint(this.charRefCode)||this.charRefCode===R.CARRIAGE_RETURN){this._err(Q.controlCharacterReference);let e=cq[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};ar.CHARACTER_TOKEN="CHARACTER_TOKEN";ar.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";ar.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";ar.START_TAG_TOKEN="START_TAG_TOKEN";ar.END_TAG_TOKEN="END_TAG_TOKEN";ar.COMMENT_TOKEN="COMMENT_TOKEN";ar.DOCTYPE_TOKEN="DOCTYPE_TOKEN";ar.EOF_TOKEN="EOF_TOKEN";ar.HIBERNATION_TOKEN="HIBERNATION_TOKEN";ar.MODE={DATA:pt,RCDATA:Eh,RAWTEXT:Y1,SCRIPT_DATA:sa,PLAINTEXT:fD};ar.getTokenAttr=function(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null};vD.exports=ar});var Ec=lt(Th=>{"use strict";var Vy=Th.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Th.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Th.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var ue=Th.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Th.SPECIAL_ELEMENTS={[Vy.HTML]:{[ue.ADDRESS]:!0,[ue.APPLET]:!0,[ue.AREA]:!0,[ue.ARTICLE]:!0,[ue.ASIDE]:!0,[ue.BASE]:!0,[ue.BASEFONT]:!0,[ue.BGSOUND]:!0,[ue.BLOCKQUOTE]:!0,[ue.BODY]:!0,[ue.BR]:!0,[ue.BUTTON]:!0,[ue.CAPTION]:!0,[ue.CENTER]:!0,[ue.COL]:!0,[ue.COLGROUP]:!0,[ue.DD]:!0,[ue.DETAILS]:!0,[ue.DIR]:!0,[ue.DIV]:!0,[ue.DL]:!0,[ue.DT]:!0,[ue.EMBED]:!0,[ue.FIELDSET]:!0,[ue.FIGCAPTION]:!0,[ue.FIGURE]:!0,[ue.FOOTER]:!0,[ue.FORM]:!0,[ue.FRAME]:!0,[ue.FRAMESET]:!0,[ue.H1]:!0,[ue.H2]:!0,[ue.H3]:!0,[ue.H4]:!0,[ue.H5]:!0,[ue.H6]:!0,[ue.HEAD]:!0,[ue.HEADER]:!0,[ue.HGROUP]:!0,[ue.HR]:!0,[ue.HTML]:!0,[ue.IFRAME]:!0,[ue.IMG]:!0,[ue.INPUT]:!0,[ue.LI]:!0,[ue.LINK]:!0,[ue.LISTING]:!0,[ue.MAIN]:!0,[ue.MARQUEE]:!0,[ue.MENU]:!0,[ue.META]:!0,[ue.NAV]:!0,[ue.NOEMBED]:!0,[ue.NOFRAMES]:!0,[ue.NOSCRIPT]:!0,[ue.OBJECT]:!0,[ue.OL]:!0,[ue.P]:!0,[ue.PARAM]:!0,[ue.PLAINTEXT]:!0,[ue.PRE]:!0,[ue.SCRIPT]:!0,[ue.SECTION]:!0,[ue.SELECT]:!0,[ue.SOURCE]:!0,[ue.STYLE]:!0,[ue.SUMMARY]:!0,[ue.TABLE]:!0,[ue.TBODY]:!0,[ue.TD]:!0,[ue.TEMPLATE]:!0,[ue.TEXTAREA]:!0,[ue.TFOOT]:!0,[ue.TH]:!0,[ue.THEAD]:!0,[ue.TITLE]:!0,[ue.TR]:!0,[ue.TRACK]:!0,[ue.UL]:!0,[ue.WBR]:!0,[ue.XMP]:!0},[Vy.MATHML]:{[ue.MI]:!0,[ue.MO]:!0,[ue.MN]:!0,[ue.MS]:!0,[ue.MTEXT]:!0,[ue.ANNOTATION_XML]:!0},[Vy.SVG]:{[ue.TITLE]:!0,[ue.FOREIGN_OBJECT]:!0,[ue.DESC]:!0}}});var CD=lt((h1e,SD)=>{"use strict";var yD=Ec(),fe=yD.TAG_NAMES,Ut=yD.NAMESPACES;function bD(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI;case 3:return i===fe.RTC;case 6:return i===fe.OPTION;case 8:return i===fe.OPTGROUP}return!1}function uq(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI||i===fe.TD||i===fe.TH||i===fe.TR;case 3:return i===fe.RTC;case 5:return i===fe.TBODY||i===fe.TFOOT||i===fe.THEAD;case 6:return i===fe.OPTION;case 7:return i===fe.CAPTION;case 8:return i===fe.OPTGROUP||i===fe.COLGROUP}return!1}function g_(i,e){switch(i.length){case 2:if(i===fe.TD||i===fe.TH)return e===Ut.HTML;if(i===fe.MI||i===fe.MO||i===fe.MN||i===fe.MS)return e===Ut.MATHML;break;case 4:if(i===fe.HTML)return e===Ut.HTML;if(i===fe.DESC)return e===Ut.SVG;break;case 5:if(i===fe.TABLE)return e===Ut.HTML;if(i===fe.MTEXT)return e===Ut.MATHML;if(i===fe.TITLE)return e===Ut.SVG;break;case 6:return(i===fe.APPLET||i===fe.OBJECT)&&e===Ut.HTML;case 7:return(i===fe.CAPTION||i===fe.MARQUEE)&&e===Ut.HTML;case 8:return i===fe.TEMPLATE&&e===Ut.HTML;case 13:return i===fe.FOREIGN_OBJECT&&e===Ut.SVG;case 14:return i===fe.ANNOTATION_XML&&e===Ut.MATHML}return!1}var Ky=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===fe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ut.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){let n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===Ut.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){let t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.H1||e===fe.H2||e===fe.H3||e===fe.H4||e===fe.H5||e===fe.H6&&t===Ut.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.TD||e===fe.TH&&t===Ut.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==fe.TABLE&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==fe.TBODY&&this.currentTagName!==fe.TFOOT&&this.currentTagName!==fe.THEAD&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==fe.TR&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let e=this.items[1];return e&&this.treeAdapter.getTagName(e)===fe.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===fe.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(g_(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===fe.H1||t===fe.H2||t===fe.H3||t===fe.H4||t===fe.H5||t===fe.H6)&&n===Ut.HTML)return!0;if(g_(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if((n===fe.UL||n===fe.OL)&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(n===fe.BUTTON&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n===fe.TABLE||n===fe.TEMPLATE||n===fe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===Ut.HTML){if(t===fe.TBODY||t===fe.THEAD||t===fe.TFOOT)return!0;if(t===fe.TABLE||t===fe.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n!==fe.OPTION&&n!==fe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;bD(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;uq(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;bD(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};SD.exports=Ky});var xD=lt((u1e,wD)=>{"use strict";var J1=class i{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){let t=[];if(this.length>=3){let n=this.treeAdapter.getAttrList(e).length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let s=this.length-1;s>=0;s--){let a=this.entries[s];if(a.type===i.MARKER_ENTRY)break;let l=a.element,c=this.treeAdapter.getAttrList(l);this.treeAdapter.getTagName(l)===r&&this.treeAdapter.getNamespaceURI(l)===o&&c.length===n&&t.push({idx:s,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){let t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){let r=this.treeAdapter.getAttrList(e),o=r.length,s=Object.create(null);for(let a=0;a<o;a++){let l=r[a];s[l.name]=l.value}for(let a=0;a<o;a++)for(let l=0;l<n;l++){let c=t[l].attrs[a];if(s[c.name]!==c.value&&(t.splice(l,1),n--),t.length<3)return}for(let a=n-1;a>=3-1;a--)this.entries.splice(t[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:i.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let e=this.entries.pop();if(this.length--,e.type===i.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.ELEMENT_ENTRY&&n.element===e)return n}return null}};J1.MARKER_ENTRY="MARKER_ENTRY";J1.ELEMENT_ENTRY="ELEMENT_ENTRY";wD.exports=J1});var as=lt((m1e,ED)=>{"use strict";var __=class{constructor(e){let t={},n=this._getOverriddenMethods(this,t);for(let r of Object.keys(n))typeof n[r]=="function"&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}};__.install=function(i,e,t){i.__mixins||(i.__mixins=[]);for(let r=0;r<i.__mixins.length;r++)if(i.__mixins[r].constructor===e)return i.__mixins[r];let n=new e(i,t);return i.__mixins.push(n),n};ED.exports=__});var Gy=lt((p1e,TD)=>{"use strict";var mq=as(),qy=class extends mq{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){let n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),(r===`
|
|
`||r==="\r"&&this.html[n+1]!==`
|
|
`)&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){let n=this.pos;t.dropParsedChunk.call(this);let r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}};TD.exports=qy});var Xy=lt((f1e,kD)=>{"use strict";var ID=as(),$y=Q1(),pq=Gy(),Yy=class extends ID{constructor(e){super(e),this.tokenizer=e,this.posTracker=ID.install(e.preprocessor,pq),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;let e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){let n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(r){t._createDoctypeToken.call(this,r),this.currentToken.location=e.ctLoc},_createCharacterToken(r,o){t._createCharacterToken.call(this,r,o),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(r){t._createAttr.call(this,r),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(r){t._leaveAttrName.call(this,r),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(r){t._leaveAttrValue.call(this,r),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){let r=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentToken.type===$y.EOF_TOKEN?(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset):(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col+1,r.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){let r=this.currentCharacterToken&&this.currentCharacterToken.location;r&&r.endOffset===-1&&(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col,r.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys($y.MODE).forEach(r=>{let o=$y.MODE[r];n[o]=function(s){e.ctLoc=e._getCurrentLocation(),t[o].call(this,s)}}),n}};kD.exports=Yy});var LD=lt((g1e,AD)=>{"use strict";var fq=as(),Qy=class extends fq{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let n=this.stackTop;n>0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}};AD.exports=Qy});var DD=lt((_1e,RD)=>{"use strict";var Jy=as(),ND=Q1(),gq=Xy(),_q=LD(),vq=Ec(),Zy=vq.TAG_NAMES,e3=class extends Jy{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,o=this.treeAdapter.getTagName(e),s=t.type===ND.END_TAG_TOKEN&&o===t.tagName,a={};s?(a.endTag=Object.assign({},r),a.endLine=r.endLine,a.endCol=r.endCol,a.endOffset=r.endOffset):(a.endLine=r.startLine,a.endCol=r.startCol,a.endOffset=r.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;let o=Jy.install(this.tokenizer,gq);e.posTracker=o.posTracker,Jy.install(this.openElements,_q,{onItemPop:function(s){e._setEndLocation(s,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===ND.END_TAG_TOKEN&&(n.tagName===Zy.HTML||n.tagName===Zy.BODY&&this.openElements.hasInScope(Zy.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){let s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===n.tagName){e._setEndLocation(s,n);break}}},_setDocumentType(n){t._setDocumentType.call(this,n);let r=this.treeAdapter.getChildNodes(this.document),o=r.length;for(let s=0;s<o;s++){let a=r[s];if(this.treeAdapter.isDocumentTypeNode(a)){this.treeAdapter.setNodeSourceCodeLocation(a,n.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n)},_appendElement(n,r){e.lastStartTagToken=n,t._appendElement.call(this,n,r)},_insertElement(n,r){e.lastStartTagToken=n,t._insertElement.call(this,n,r)},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);let r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(n,r){t._appendCommentNode.call(this,n,r);let o=this.treeAdapter.getChildNodes(r),s=o[o.length-1];this.treeAdapter.setNodeSourceCodeLocation(s,n.location)},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);let r=this._shouldFosterParentOnInsertion(),o=r&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,s=this.treeAdapter.getChildNodes(o),a=r&&e.lastFosterParentingLocation.beforeElement?s.indexOf(e.lastFosterParentingLocation.beforeElement)-1:s.length-1,l=s[a];if(this.treeAdapter.getNodeSourceCodeLocation(l)){let{endLine:d,endCol:h,endOffset:u}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:h,endOffset:u})}else this.treeAdapter.setNodeSourceCodeLocation(l,n.location)}}}};RD.exports=e3});var v_=lt((v1e,MD)=>{"use strict";var bq=as(),t3=class extends bq{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){let t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}};MD.exports=t3});var PD=lt((b1e,OD)=>{"use strict";var yq=v_(),Sq=Gy(),Cq=as(),i3=class extends yq{constructor(e,t){super(e,t),this.posTracker=Cq.install(e,Sq),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}};OD.exports=i3});var HD=lt((y1e,FD)=>{"use strict";var wq=v_(),xq=PD(),Eq=as(),n3=class extends wq{constructor(e,t){super(e,t);let n=Eq.install(e.preprocessor,xq,t);this.posTracker=n.posTracker}};FD.exports=n3});var UD=lt((S1e,zD)=>{"use strict";var Tq=v_(),Iq=HD(),kq=Xy(),BD=as(),r3=class extends Tq{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),BD.install(this.tokenizer,Iq,e.opts),BD.install(this.tokenizer,kq)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(n,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(n)}}}};zD.exports=r3});var VD=lt(Ct=>{"use strict";var{DOCUMENT_MODE:Aq}=Ec();Ct.createDocument=function(){return{nodeName:"#document",mode:Aq.NO_QUIRKS,childNodes:[]}};Ct.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};Ct.createElement=function(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}};Ct.createCommentNode=function(i){return{nodeName:"#comment",data:i,parentNode:null}};var WD=function(i){return{nodeName:"#text",value:i,parentNode:null}},jD=Ct.appendChild=function(i,e){i.childNodes.push(e),e.parentNode=i},Lq=Ct.insertBefore=function(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i};Ct.setTemplateContent=function(i,e){i.content=e};Ct.getTemplateContent=function(i){return i.content};Ct.setDocumentType=function(i,e,t,n){let r=null;for(let o=0;o<i.childNodes.length;o++)if(i.childNodes[o].nodeName==="#documentType"){r=i.childNodes[o];break}r?(r.name=e,r.publicId=t,r.systemId=n):jD(i,{nodeName:"#documentType",name:e,publicId:t,systemId:n})};Ct.setDocumentMode=function(i,e){i.mode=e};Ct.getDocumentMode=function(i){return i.mode};Ct.detachNode=function(i){if(i.parentNode){let e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}};Ct.insertText=function(i,e){if(i.childNodes.length){let t=i.childNodes[i.childNodes.length-1];if(t.nodeName==="#text"){t.value+=e;return}}jD(i,WD(e))};Ct.insertTextBefore=function(i,e,t){let n=i.childNodes[i.childNodes.indexOf(t)-1];n&&n.nodeName==="#text"?n.value+=e:Lq(i,WD(e),t)};Ct.adoptAttributes=function(i,e){let t=[];for(let n=0;n<i.attrs.length;n++)t.push(i.attrs[n].name);for(let n=0;n<e.length;n++)t.indexOf(e[n].name)===-1&&i.attrs.push(e[n])};Ct.getFirstChild=function(i){return i.childNodes[0]};Ct.getChildNodes=function(i){return i.childNodes};Ct.getParentNode=function(i){return i.parentNode};Ct.getAttrList=function(i){return i.attrs};Ct.getTagName=function(i){return i.tagName};Ct.getNamespaceURI=function(i){return i.namespaceURI};Ct.getTextNodeContent=function(i){return i.value};Ct.getCommentNodeContent=function(i){return i.data};Ct.getDocumentTypeNodeName=function(i){return i.name};Ct.getDocumentTypeNodePublicId=function(i){return i.publicId};Ct.getDocumentTypeNodeSystemId=function(i){return i.systemId};Ct.isTextNode=function(i){return i.nodeName==="#text"};Ct.isCommentNode=function(i){return i.nodeName==="#comment"};Ct.isDocumentTypeNode=function(i){return i.nodeName==="#documentType"};Ct.isElementNode=function(i){return!!i.tagName};Ct.setNodeSourceCodeLocation=function(i,e){i.sourceCodeLocation=e};Ct.getNodeSourceCodeLocation=function(i){return i.sourceCodeLocation};Ct.updateNodeSourceCodeLocation=function(i,e){i.sourceCodeLocation=Object.assign(i.sourceCodeLocation,e)}});var qD=lt((w1e,KD)=>{"use strict";KD.exports=function(e,t){return t=t||Object.create(null),[e,t].reduce((n,r)=>(Object.keys(r).forEach(o=>{n[o]=r[o]}),n),Object.create(null))}});var JD=lt(b_=>{"use strict";var{DOCUMENT_MODE:Ih}=Ec(),YD="html",Nq="about:legacy-compat",Rq="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",XD=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Dq=XD.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),Mq=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],QD=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Oq=QD.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function GD(i){let e=i.indexOf('"')!==-1?"'":'"';return e+i+e}function $D(i,e){for(let t=0;t<e.length;t++)if(i.indexOf(e[t])===0)return!0;return!1}b_.isConforming=function(i){return i.name===YD&&i.publicId===null&&(i.systemId===null||i.systemId===Nq)};b_.getDocumentMode=function(i){if(i.name!==YD)return Ih.QUIRKS;let e=i.systemId;if(e&&e.toLowerCase()===Rq)return Ih.QUIRKS;let t=i.publicId;if(t!==null){if(t=t.toLowerCase(),Mq.indexOf(t)>-1)return Ih.QUIRKS;let n=e===null?Dq:XD;if($D(t,n))return Ih.QUIRKS;if(n=e===null?QD:Oq,$D(t,n))return Ih.LIMITED_QUIRKS}return Ih.NO_QUIRKS};b_.serializeContent=function(i,e,t){let n="!DOCTYPE ";return i&&(n+=i),e?n+=" PUBLIC "+GD(e):t&&(n+=" SYSTEM"),t!==null&&(n+=" "+GD(t)),n}});var eM=lt(gl=>{"use strict";var o3=Q1(),s3=Ec(),Fe=s3.TAG_NAMES,mn=s3.NAMESPACES,y_=s3.ATTRS,ZD={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Pq="definitionurl",Fq="definitionURL",Hq={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Bq={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:mn.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:mn.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:mn.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:mn.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:mn.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:mn.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:mn.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:mn.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:mn.XML},"xml:space":{prefix:"xml",name:"space",namespace:mn.XML},xmlns:{prefix:"",name:"xmlns",namespace:mn.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:mn.XMLNS}},zq=gl.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Uq={[Fe.B]:!0,[Fe.BIG]:!0,[Fe.BLOCKQUOTE]:!0,[Fe.BODY]:!0,[Fe.BR]:!0,[Fe.CENTER]:!0,[Fe.CODE]:!0,[Fe.DD]:!0,[Fe.DIV]:!0,[Fe.DL]:!0,[Fe.DT]:!0,[Fe.EM]:!0,[Fe.EMBED]:!0,[Fe.H1]:!0,[Fe.H2]:!0,[Fe.H3]:!0,[Fe.H4]:!0,[Fe.H5]:!0,[Fe.H6]:!0,[Fe.HEAD]:!0,[Fe.HR]:!0,[Fe.I]:!0,[Fe.IMG]:!0,[Fe.LI]:!0,[Fe.LISTING]:!0,[Fe.MENU]:!0,[Fe.META]:!0,[Fe.NOBR]:!0,[Fe.OL]:!0,[Fe.P]:!0,[Fe.PRE]:!0,[Fe.RUBY]:!0,[Fe.S]:!0,[Fe.SMALL]:!0,[Fe.SPAN]:!0,[Fe.STRONG]:!0,[Fe.STRIKE]:!0,[Fe.SUB]:!0,[Fe.SUP]:!0,[Fe.TABLE]:!0,[Fe.TT]:!0,[Fe.U]:!0,[Fe.UL]:!0,[Fe.VAR]:!0};gl.causesExit=function(i){let e=i.tagName;return e===Fe.FONT&&(o3.getTokenAttr(i,y_.COLOR)!==null||o3.getTokenAttr(i,y_.SIZE)!==null||o3.getTokenAttr(i,y_.FACE)!==null)?!0:Uq[e]};gl.adjustTokenMathMLAttrs=function(i){for(let e=0;e<i.attrs.length;e++)if(i.attrs[e].name===Pq){i.attrs[e].name=Fq;break}};gl.adjustTokenSVGAttrs=function(i){for(let e=0;e<i.attrs.length;e++){let t=Hq[i.attrs[e].name];t&&(i.attrs[e].name=t)}};gl.adjustTokenXMLAttrs=function(i){for(let e=0;e<i.attrs.length;e++){let t=Bq[i.attrs[e].name];t&&(i.attrs[e].prefix=t.prefix,i.attrs[e].name=t.name,i.attrs[e].namespace=t.namespace)}};gl.adjustTokenSVGTagName=function(i){let e=zq[i.tagName];e&&(i.tagName=e)};function Wq(i,e){return e===mn.MATHML&&(i===Fe.MI||i===Fe.MO||i===Fe.MN||i===Fe.MS||i===Fe.MTEXT)}function jq(i,e,t){if(e===mn.MATHML&&i===Fe.ANNOTATION_XML){for(let n=0;n<t.length;n++)if(t[n].name===y_.ENCODING){let r=t[n].value.toLowerCase();return r===ZD.TEXT_HTML||r===ZD.APPLICATION_XML}}return e===mn.SVG&&(i===Fe.FOREIGN_OBJECT||i===Fe.DESC||i===Fe.TITLE)}gl.isIntegrationPoint=function(i,e,t,n){return!!((!n||n===mn.HTML)&&jq(i,e,t)||(!n||n===mn.MATHML)&&Wq(i,e))}});var f3=lt((T1e,xM)=>{"use strict";var M=Q1(),Vq=CD(),tM=xD(),Kq=DD(),qq=UD(),iM=as(),Gq=VD(),$q=qD(),nM=JD(),ls=eM(),pn=n_(),Yq=i_(),Ic=Ec(),S=Ic.TAG_NAMES,Ae=Ic.NAMESPACES,mM=Ic.ATTRS,Xq={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:Gq},pM="hidden",Qq=8,Jq=3,fM="INITIAL_MODE",l3="BEFORE_HTML_MODE",k_="BEFORE_HEAD_MODE",Lh="IN_HEAD_MODE",gM="IN_HEAD_NO_SCRIPT_MODE",A_="AFTER_HEAD_MODE",cs="IN_BODY_MODE",x_="TEXT_MODE",Dn="IN_TABLE_MODE",_M="IN_TABLE_TEXT_MODE",L_="IN_CAPTION_MODE",a0="IN_COLUMN_GROUP_MODE",io="IN_TABLE_BODY_MODE",da="IN_ROW_MODE",N_="IN_CELL_MODE",c3="IN_SELECT_MODE",d3="IN_SELECT_IN_TABLE_MODE",E_="IN_TEMPLATE_MODE",h3="AFTER_BODY_MODE",R_="IN_FRAMESET_MODE",vM="AFTER_FRAMESET_MODE",bM="AFTER_AFTER_BODY_MODE",yM="AFTER_AFTER_FRAMESET_MODE",Zq={[S.TR]:da,[S.TBODY]:io,[S.THEAD]:io,[S.TFOOT]:io,[S.CAPTION]:L_,[S.COLGROUP]:a0,[S.TABLE]:Dn,[S.BODY]:cs,[S.FRAMESET]:R_},eG={[S.CAPTION]:Dn,[S.COLGROUP]:Dn,[S.TBODY]:Dn,[S.TFOOT]:Dn,[S.THEAD]:Dn,[S.COL]:a0,[S.TR]:io,[S.TD]:da,[S.TH]:da},rM={[fM]:{[M.CHARACTER_TOKEN]:e0,[M.NULL_CHARACTER_TOKEN]:e0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:lG,[M.START_TAG_TOKEN]:e0,[M.END_TAG_TOKEN]:e0,[M.EOF_TOKEN]:e0},[l3]:{[M.CHARACTER_TOKEN]:i0,[M.NULL_CHARACTER_TOKEN]:i0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:cG,[M.END_TAG_TOKEN]:dG,[M.EOF_TOKEN]:i0},[k_]:{[M.CHARACTER_TOKEN]:n0,[M.NULL_CHARACTER_TOKEN]:n0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:hG,[M.END_TAG_TOKEN]:uG,[M.EOF_TOKEN]:n0},[Lh]:{[M.CHARACTER_TOKEN]:r0,[M.NULL_CHARACTER_TOKEN]:r0,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:Zi,[M.END_TAG_TOKEN]:kc,[M.EOF_TOKEN]:r0},[gM]:{[M.CHARACTER_TOKEN]:o0,[M.NULL_CHARACTER_TOKEN]:o0,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:mG,[M.END_TAG_TOKEN]:pG,[M.EOF_TOKEN]:o0},[A_]:{[M.CHARACTER_TOKEN]:s0,[M.NULL_CHARACTER_TOKEN]:s0,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:fG,[M.END_TAG_TOKEN]:gG,[M.EOF_TOKEN]:s0},[cs]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:cr,[M.END_TAG_TOKEN]:u3,[M.EOF_TOKEN]:la},[x_]:{[M.CHARACTER_TOKEN]:lr,[M.NULL_CHARACTER_TOKEN]:lr,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:vt,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:vt,[M.END_TAG_TOKEN]:GG,[M.EOF_TOKEN]:$G},[Dn]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:m3,[M.END_TAG_TOKEN]:p3,[M.EOF_TOKEN]:la},[_M]:{[M.CHARACTER_TOKEN]:r$,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:n$,[M.COMMENT_TOKEN]:t0,[M.DOCTYPE_TOKEN]:t0,[M.START_TAG_TOKEN]:t0,[M.END_TAG_TOKEN]:t0,[M.EOF_TOKEN]:t0},[L_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:o$,[M.END_TAG_TOKEN]:s$,[M.EOF_TOKEN]:la},[a0]:{[M.CHARACTER_TOKEN]:T_,[M.NULL_CHARACTER_TOKEN]:T_,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:a$,[M.END_TAG_TOKEN]:l$,[M.EOF_TOKEN]:la},[io]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:c$,[M.END_TAG_TOKEN]:d$,[M.EOF_TOKEN]:la},[da]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:h$,[M.END_TAG_TOKEN]:u$,[M.EOF_TOKEN]:la},[N_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:m$,[M.END_TAG_TOKEN]:p$,[M.EOF_TOKEN]:la},[c3]:{[M.CHARACTER_TOKEN]:lr,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:SM,[M.END_TAG_TOKEN]:CM,[M.EOF_TOKEN]:la},[d3]:{[M.CHARACTER_TOKEN]:lr,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:f$,[M.END_TAG_TOKEN]:g$,[M.EOF_TOKEN]:la},[E_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:_$,[M.END_TAG_TOKEN]:v$,[M.EOF_TOKEN]:wM},[h3]:{[M.CHARACTER_TOKEN]:I_,[M.NULL_CHARACTER_TOKEN]:I_,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:aG,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:b$,[M.END_TAG_TOKEN]:y$,[M.EOF_TOKEN]:Z1},[R_]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:S$,[M.END_TAG_TOKEN]:C$,[M.EOF_TOKEN]:Z1},[vM]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:lr,[M.COMMENT_TOKEN]:Gi,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:w$,[M.END_TAG_TOKEN]:x$,[M.EOF_TOKEN]:Z1},[bM]:{[M.CHARACTER_TOKEN]:w_,[M.NULL_CHARACTER_TOKEN]:w_,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:oM,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:E$,[M.END_TAG_TOKEN]:w_,[M.EOF_TOKEN]:Z1},[yM]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:oM,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:T$,[M.END_TAG_TOKEN]:vt,[M.EOF_TOKEN]:Z1}},a3=class{constructor(e){this.options=$q(Xq,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&iM.install(this,Kq),this.options.onParseError&&iM.install(this,qq,{onParseError:this.options.onParseError})}parse(e){let t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(S.TEMPLATE,Ae.HTML,[]));let n=this.treeAdapter.createElement("documentmock",Ae.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===S.TEMPLATE&&this._pushTmplInsertionMode(E_),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);let r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(e,t){this.tokenizer=new M(this.options),this.stopped=!1,this.insertionMode=fM,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new Vq(this.document,this.treeAdapter),this.activeFormattingElements=new tM(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();let t=this.tokenizer.getNextToken();if(t.type===M.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===M.WHITESPACE_CHARACTER_TOKEN&&t.chars[0]===`
|
|
`)){if(t.chars.length===1)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){let n=this.pendingScript;this.pendingScript=null,t(n);return}e&&e()}_setupTokenizerCDATAMode(){let e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==Ae.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,Ae.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=x_}switchToPlaintextParsing(){this.insertionMode=x_,this.originalInsertionMode=cs,this.tokenizer.state=M.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===S.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===Ae.HTML){let e=this.treeAdapter.getTagName(this.fragmentContext);e===S.TITLE||e===S.TEXTAREA?this.tokenizer.state=M.MODE.RCDATA:e===S.STYLE||e===S.XMP||e===S.IFRAME||e===S.NOEMBED||e===S.NOFRAMES||e===S.NOSCRIPT?this.tokenizer.state=M.MODE.RAWTEXT:e===S.SCRIPT?this.tokenizer.state=M.MODE.SCRIPT_DATA:e===S.PLAINTEXT&&(this.tokenizer.state=M.MODE.PLAINTEXT)}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){let t=this.treeAdapter.createElement(e,Ae.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,Ae.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(S.HTML,Ae.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){let t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;let n=this.treeAdapter.getNamespaceURI(t);if(n===Ae.HTML||this.treeAdapter.getTagName(t)===S.ANNOTATION_XML&&n===Ae.MATHML&&e.type===M.START_TAG_TOKEN&&e.tagName===S.SVG)return!1;let r=e.type===M.CHARACTER_TOKEN||e.type===M.NULL_CHARACTER_TOKEN||e.type===M.WHITESPACE_CHARACTER_TOKEN;return(e.type===M.START_TAG_TOKEN&&e.tagName!==S.MGLYPH&&e.tagName!==S.MALIGNMARK||r)&&this._isIntegrationPoint(t,Ae.MATHML)||(e.type===M.START_TAG_TOKEN||r)&&this._isIntegrationPoint(t,Ae.HTML)?!1:e.type!==M.EOF_TOKEN}_processToken(e){rM[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){rM[cs][e.type](this,e)}_processTokenInForeignContent(e){e.type===M.CHARACTER_TOKEN?k$(this,e):e.type===M.NULL_CHARACTER_TOKEN?I$(this,e):e.type===M.WHITESPACE_CHARACTER_TOKEN?lr(this,e):e.type===M.COMMENT_TOKEN?Gi(this,e):e.type===M.START_TAG_TOKEN?A$(this,e):e.type===M.END_TAG_TOKEN&&L$(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===M.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(pn.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){let n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return ls.isIntegrationPoint(n,r,o,t)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.length;if(e){let t=e,n=null;do if(t--,n=this.activeFormattingElements.entries[t],n.type===tM.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}while(t>0);for(let r=t;r<e;r++)n=this.activeFormattingElements.entries[r],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=da}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(S.P),this.openElements.popUntilTagNamePopped(S.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let n=this.openElements.items[e];e===0&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));let r=this.treeAdapter.getTagName(n),o=Zq[r];if(o){this.insertionMode=o;break}else if(!t&&(r===S.TD||r===S.TH)){this.insertionMode=N_;break}else if(!t&&r===S.HEAD){this.insertionMode=Lh;break}else if(r===S.SELECT){this._resetInsertionModeForSelect(e);break}else if(r===S.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(r===S.HTML){this.insertionMode=this.headElement?A_:k_;break}else if(t){this.insertionMode=cs;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===S.TEMPLATE)break;if(r===S.TABLE){this.insertionMode=d3;return}}this.insertionMode=c3}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){let t=this.treeAdapter.getTagName(e);return t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){let e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===S.TEMPLATE&&o===Ae.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}else if(r===S.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){let t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return Ic.SPECIAL_ELEMENTS[n][t]}};xM.exports=a3;function tG(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagName)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):Co(i,e),t}function iG(i,e){let t=null;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n];if(r===e.element)break;i._isSpecialElement(r)&&(t=r)}return t||(i.openElements.popUntilElementPopped(e.element),i.activeFormattingElements.removeEntry(e)),t}function nG(i,e,t){let n=e,r=i.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==t;o++,s=r){r=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=Jq;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=rG(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function rG(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function oG(i,e,t){if(i._isElementCausesFosterParenting(e))i._fosterParentElement(t);else{let n=i.treeAdapter.getTagName(e),r=i.treeAdapter.getNamespaceURI(e);n===S.TEMPLATE&&r===Ae.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function sG(i,e,t){let n=i.treeAdapter.getNamespaceURI(t.element),r=t.token,o=i.treeAdapter.createElement(r.tagName,n,r.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,t.token),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o)}function vl(i,e){let t;for(let n=0;n<Qq&&(t=tG(i,e,t),!!t);n++){let r=iG(i,t);if(!r)break;i.activeFormattingElements.bookmark=t;let o=nG(i,r,t.element),s=i.openElements.getCommonAncestor(t.element);i.treeAdapter.detachNode(o),oG(i,s,o),sG(i,r,t)}}function vt(){}function S_(i){i._err(pn.misplacedDoctype)}function Gi(i,e){i._appendCommentNode(e,i.openElements.currentTmplContent||i.openElements.current)}function aG(i,e){i._appendCommentNode(e,i.openElements.items[0])}function oM(i,e){i._appendCommentNode(e,i.document)}function lr(i,e){i._insertCharacters(e)}function Z1(i){i.stopped=!0}function lG(i,e){i._setDocumentType(e);let t=e.forceQuirks?Ic.DOCUMENT_MODE.QUIRKS:nM.getDocumentMode(e);nM.isConforming(e)||i._err(pn.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=l3}function e0(i,e){i._err(pn.missingDoctype,{beforeToken:!0}),i.treeAdapter.setDocumentMode(i.document,Ic.DOCUMENT_MODE.QUIRKS),i.insertionMode=l3,i._processToken(e)}function cG(i,e){e.tagName===S.HTML?(i._insertElement(e,Ae.HTML),i.insertionMode=k_):i0(i,e)}function dG(i,e){let t=e.tagName;(t===S.HTML||t===S.HEAD||t===S.BODY||t===S.BR)&&i0(i,e)}function i0(i,e){i._insertFakeRootElement(),i.insertionMode=k_,i._processToken(e)}function hG(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.HEAD?(i._insertElement(e,Ae.HTML),i.headElement=i.openElements.current,i.insertionMode=Lh):n0(i,e)}function uG(i,e){let t=e.tagName;t===S.HEAD||t===S.BODY||t===S.HTML||t===S.BR?n0(i,e):i._err(pn.endTagWithoutMatchingOpenElement)}function n0(i,e){i._insertFakeElement(S.HEAD),i.headElement=i.openElements.current,i.insertionMode=Lh,i._processToken(e)}function Zi(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.BASE||t===S.BASEFONT||t===S.BGSOUND||t===S.LINK||t===S.META?(i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0):t===S.TITLE?i._switchToTextParsing(e,M.MODE.RCDATA):t===S.NOSCRIPT?i.options.scriptingEnabled?i._switchToTextParsing(e,M.MODE.RAWTEXT):(i._insertElement(e,Ae.HTML),i.insertionMode=gM):t===S.NOFRAMES||t===S.STYLE?i._switchToTextParsing(e,M.MODE.RAWTEXT):t===S.SCRIPT?i._switchToTextParsing(e,M.MODE.SCRIPT_DATA):t===S.TEMPLATE?(i._insertTemplate(e,Ae.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=E_,i._pushTmplInsertionMode(E_)):t===S.HEAD?i._err(pn.misplacedStartTagForHeadElement):r0(i,e)}function kc(i,e){let t=e.tagName;t===S.HEAD?(i.openElements.pop(),i.insertionMode=A_):t===S.BODY||t===S.BR||t===S.HTML?r0(i,e):t===S.TEMPLATE&&i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagName!==S.TEMPLATE&&i._err(pn.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(S.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode()):i._err(pn.endTagWithoutMatchingOpenElement)}function r0(i,e){i.openElements.pop(),i.insertionMode=A_,i._processToken(e)}function mG(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.BASEFONT||t===S.BGSOUND||t===S.HEAD||t===S.LINK||t===S.META||t===S.NOFRAMES||t===S.STYLE?Zi(i,e):t===S.NOSCRIPT?i._err(pn.nestedNoscriptInHead):o0(i,e)}function pG(i,e){let t=e.tagName;t===S.NOSCRIPT?(i.openElements.pop(),i.insertionMode=Lh):t===S.BR?o0(i,e):i._err(pn.endTagWithoutMatchingOpenElement)}function o0(i,e){let t=e.type===M.EOF_TOKEN?pn.openElementsLeftAfterEof:pn.disallowedContentInNoscriptInHead;i._err(t),i.openElements.pop(),i.insertionMode=Lh,i._processToken(e)}function fG(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.BODY?(i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode=cs):t===S.FRAMESET?(i._insertElement(e,Ae.HTML),i.insertionMode=R_):t===S.BASE||t===S.BASEFONT||t===S.BGSOUND||t===S.LINK||t===S.META||t===S.NOFRAMES||t===S.SCRIPT||t===S.STYLE||t===S.TEMPLATE||t===S.TITLE?(i._err(pn.abandonedHeadElementChild),i.openElements.push(i.headElement),Zi(i,e),i.openElements.remove(i.headElement)):t===S.HEAD?i._err(pn.misplacedStartTagForHeadElement):s0(i,e)}function gG(i,e){let t=e.tagName;t===S.BODY||t===S.HTML||t===S.BR?s0(i,e):t===S.TEMPLATE?kc(i,e):i._err(pn.endTagWithoutMatchingOpenElement)}function s0(i,e){i._insertFakeElement(S.BODY),i.insertionMode=cs,i._processToken(e)}function Tc(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function C_(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function _G(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function vG(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function bG(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,Ae.HTML),i.insertionMode=R_)}function aa(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function yG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement();let t=i.openElements.currentTagName;(t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6)&&i.openElements.pop(),i._insertElement(e,Ae.HTML)}function sM(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function SG(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),t||(i.formElement=i.openElements.current))}function CG(i,e){i.framesetOk=!1;let t=e.tagName;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n],o=i.treeAdapter.getTagName(r),s=null;if(t===S.LI&&o===S.LI?s=S.LI:(t===S.DD||t===S.DT)&&(o===S.DD||o===S.DT)&&(s=o),s){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(o!==S.ADDRESS&&o!==S.DIV&&o!==S.P&&i._isSpecialElement(r))break}i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function wG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.tokenizer.state=M.MODE.PLAINTEXT}function xG(i,e){i.openElements.hasInScope(S.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(S.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.framesetOk=!1}function EG(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);t&&(vl(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function kh(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function TG(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(S.NOBR)&&(vl(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function aM(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function IG(i,e){i.treeAdapter.getDocumentMode(i.document)!==Ic.DOCUMENT_MODE.QUIRKS&&i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode=Dn}function Ah(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,Ae.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function kG(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,Ae.HTML);let t=M.getTokenAttr(e,mM.TYPE);(!t||t.toLowerCase()!==pM)&&(i.framesetOk=!1),e.ackSelfClosing=!0}function lM(i,e){i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0}function AG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._appendElement(e,Ae.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function LG(i,e){e.tagName=S.IMG,Ah(i,e)}function NG(i,e){i._insertElement(e,Ae.HTML),i.skipNextNewLine=!0,i.tokenizer.state=M.MODE.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=x_}function RG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,M.MODE.RAWTEXT)}function DG(i,e){i.framesetOk=!1,i._switchToTextParsing(e,M.MODE.RAWTEXT)}function cM(i,e){i._switchToTextParsing(e,M.MODE.RAWTEXT)}function MG(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode===Dn||i.insertionMode===L_||i.insertionMode===io||i.insertionMode===da||i.insertionMode===N_?i.insertionMode=d3:i.insertionMode=c3}function dM(i,e){i.openElements.currentTagName===S.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML)}function hM(i,e){i.openElements.hasInScope(S.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,Ae.HTML)}function OG(i,e){i.openElements.hasInScope(S.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(S.RTC),i._insertElement(e,Ae.HTML)}function PG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function FG(i,e){i._reconstructActiveFormattingElements(),ls.adjustTokenMathMLAttrs(e),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,Ae.MATHML):i._insertElement(e,Ae.MATHML),e.ackSelfClosing=!0}function HG(i,e){i._reconstructActiveFormattingElements(),ls.adjustTokenSVGAttrs(e),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,Ae.SVG):i._insertElement(e,Ae.SVG),e.ackSelfClosing=!0}function eo(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML)}function cr(i,e){let t=e.tagName;switch(t.length){case 1:t===S.I||t===S.S||t===S.B||t===S.U?kh(i,e):t===S.P?aa(i,e):t===S.A?EG(i,e):eo(i,e);break;case 2:t===S.DL||t===S.OL||t===S.UL?aa(i,e):t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6?yG(i,e):t===S.LI||t===S.DD||t===S.DT?CG(i,e):t===S.EM||t===S.TT?kh(i,e):t===S.BR?Ah(i,e):t===S.HR?AG(i,e):t===S.RB?hM(i,e):t===S.RT||t===S.RP?OG(i,e):t!==S.TH&&t!==S.TD&&t!==S.TR&&eo(i,e);break;case 3:t===S.DIV||t===S.DIR||t===S.NAV?aa(i,e):t===S.PRE?sM(i,e):t===S.BIG?kh(i,e):t===S.IMG||t===S.WBR?Ah(i,e):t===S.XMP?RG(i,e):t===S.SVG?HG(i,e):t===S.RTC?hM(i,e):t!==S.COL&&eo(i,e);break;case 4:t===S.HTML?_G(i,e):t===S.BASE||t===S.LINK||t===S.META?Zi(i,e):t===S.BODY?vG(i,e):t===S.MAIN||t===S.MENU?aa(i,e):t===S.FORM?SG(i,e):t===S.CODE||t===S.FONT?kh(i,e):t===S.NOBR?TG(i,e):t===S.AREA?Ah(i,e):t===S.MATH?FG(i,e):t===S.MENU?PG(i,e):t!==S.HEAD&&eo(i,e);break;case 5:t===S.STYLE||t===S.TITLE?Zi(i,e):t===S.ASIDE?aa(i,e):t===S.SMALL?kh(i,e):t===S.TABLE?IG(i,e):t===S.EMBED?Ah(i,e):t===S.INPUT?kG(i,e):t===S.PARAM||t===S.TRACK?lM(i,e):t===S.IMAGE?LG(i,e):t!==S.FRAME&&t!==S.TBODY&&t!==S.TFOOT&&t!==S.THEAD&&eo(i,e);break;case 6:t===S.SCRIPT?Zi(i,e):t===S.CENTER||t===S.FIGURE||t===S.FOOTER||t===S.HEADER||t===S.HGROUP||t===S.DIALOG?aa(i,e):t===S.BUTTON?xG(i,e):t===S.STRIKE||t===S.STRONG?kh(i,e):t===S.APPLET||t===S.OBJECT?aM(i,e):t===S.KEYGEN?Ah(i,e):t===S.SOURCE?lM(i,e):t===S.IFRAME?DG(i,e):t===S.SELECT?MG(i,e):t===S.OPTION?dM(i,e):eo(i,e);break;case 7:t===S.BGSOUND?Zi(i,e):t===S.DETAILS||t===S.ADDRESS||t===S.ARTICLE||t===S.SECTION||t===S.SUMMARY?aa(i,e):t===S.LISTING?sM(i,e):t===S.MARQUEE?aM(i,e):t===S.NOEMBED?cM(i,e):t!==S.CAPTION&&eo(i,e);break;case 8:t===S.BASEFONT?Zi(i,e):t===S.FRAMESET?bG(i,e):t===S.FIELDSET?aa(i,e):t===S.TEXTAREA?NG(i,e):t===S.TEMPLATE?Zi(i,e):t===S.NOSCRIPT?i.options.scriptingEnabled?cM(i,e):eo(i,e):t===S.OPTGROUP?dM(i,e):t!==S.COLGROUP&&eo(i,e);break;case 9:t===S.PLAINTEXT?wG(i,e):eo(i,e);break;case 10:t===S.BLOCKQUOTE||t===S.FIGCAPTION?aa(i,e):eo(i,e);break;default:eo(i,e)}}function BG(i){i.openElements.hasInScope(S.BODY)&&(i.insertionMode=h3)}function zG(i,e){i.openElements.hasInScope(S.BODY)&&(i.insertionMode=h3,i._processToken(e))}function _l(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function UG(i){let e=i.openElements.tmplCount>0,t=i.formElement;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(S.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(S.FORM):i.openElements.remove(t))}function WG(i){i.openElements.hasInButtonScope(S.P)||i._insertFakeElement(S.P),i._closePElement()}function jG(i){i.openElements.hasInListItemScope(S.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(S.LI),i.openElements.popUntilTagNamePopped(S.LI))}function VG(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function KG(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function uM(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function qG(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(S.BR),i.openElements.pop(),i.framesetOk=!1}function Co(i,e){let t=e.tagName;for(let n=i.openElements.stackTop;n>0;n--){let r=i.openElements.items[n];if(i.treeAdapter.getTagName(r)===t){i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilElementPopped(r);break}if(i._isSpecialElement(r))break}}function u3(i,e){let t=e.tagName;switch(t.length){case 1:t===S.A||t===S.B||t===S.I||t===S.S||t===S.U?vl(i,e):t===S.P?WG(i,e):Co(i,e);break;case 2:t===S.DL||t===S.UL||t===S.OL?_l(i,e):t===S.LI?jG(i,e):t===S.DD||t===S.DT?VG(i,e):t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6?KG(i,e):t===S.BR?qG(i,e):t===S.EM||t===S.TT?vl(i,e):Co(i,e);break;case 3:t===S.BIG?vl(i,e):t===S.DIR||t===S.DIV||t===S.NAV||t===S.PRE?_l(i,e):Co(i,e);break;case 4:t===S.BODY?BG(i,e):t===S.HTML?zG(i,e):t===S.FORM?UG(i,e):t===S.CODE||t===S.FONT||t===S.NOBR?vl(i,e):t===S.MAIN||t===S.MENU?_l(i,e):Co(i,e);break;case 5:t===S.ASIDE?_l(i,e):t===S.SMALL?vl(i,e):Co(i,e);break;case 6:t===S.CENTER||t===S.FIGURE||t===S.FOOTER||t===S.HEADER||t===S.HGROUP||t===S.DIALOG?_l(i,e):t===S.APPLET||t===S.OBJECT?uM(i,e):t===S.STRIKE||t===S.STRONG?vl(i,e):Co(i,e);break;case 7:t===S.ADDRESS||t===S.ARTICLE||t===S.DETAILS||t===S.SECTION||t===S.SUMMARY||t===S.LISTING?_l(i,e):t===S.MARQUEE?uM(i,e):Co(i,e);break;case 8:t===S.FIELDSET?_l(i,e):t===S.TEMPLATE?kc(i,e):Co(i,e);break;case 10:t===S.BLOCKQUOTE||t===S.FIGCAPTION?_l(i,e):Co(i,e);break;default:Co(i,e)}}function la(i,e){i.tmplInsertionModeStackTop>-1?wM(i,e):i.stopped=!0}function GG(i,e){e.tagName===S.SCRIPT&&(i.pendingScript=i.openElements.current),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function $G(i,e){i._err(pn.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i._processToken(e)}function ca(i,e){let t=i.openElements.currentTagName;t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR?(i.pendingCharacterTokens=[],i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=_M,i._processToken(e)):to(i,e)}function YG(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,Ae.HTML),i.insertionMode=L_}function XG(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,Ae.HTML),i.insertionMode=a0}function QG(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(S.COLGROUP),i.insertionMode=a0,i._processToken(e)}function JG(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,Ae.HTML),i.insertionMode=io}function ZG(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(S.TBODY),i.insertionMode=io,i._processToken(e)}function e$(i,e){i.openElements.hasInTableScope(S.TABLE)&&(i.openElements.popUntilTagNamePopped(S.TABLE),i._resetInsertionMode(),i._processToken(e))}function t$(i,e){let t=M.getTokenAttr(e,mM.TYPE);t&&t.toLowerCase()===pM?i._appendElement(e,Ae.HTML):to(i,e),e.ackSelfClosing=!0}function i$(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,Ae.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function m3(i,e){let t=e.tagName;switch(t.length){case 2:t===S.TD||t===S.TH||t===S.TR?ZG(i,e):to(i,e);break;case 3:t===S.COL?QG(i,e):to(i,e);break;case 4:t===S.FORM?i$(i,e):to(i,e);break;case 5:t===S.TABLE?e$(i,e):t===S.STYLE?Zi(i,e):t===S.TBODY||t===S.TFOOT||t===S.THEAD?JG(i,e):t===S.INPUT?t$(i,e):to(i,e);break;case 6:t===S.SCRIPT?Zi(i,e):to(i,e);break;case 7:t===S.CAPTION?YG(i,e):to(i,e);break;case 8:t===S.COLGROUP?XG(i,e):t===S.TEMPLATE?Zi(i,e):to(i,e);break;default:to(i,e)}}function p3(i,e){let t=e.tagName;t===S.TABLE?i.openElements.hasInTableScope(S.TABLE)&&(i.openElements.popUntilTagNamePopped(S.TABLE),i._resetInsertionMode()):t===S.TEMPLATE?kc(i,e):t!==S.BODY&&t!==S.CAPTION&&t!==S.COL&&t!==S.COLGROUP&&t!==S.HTML&&t!==S.TBODY&&t!==S.TD&&t!==S.TFOOT&&t!==S.TH&&t!==S.THEAD&&t!==S.TR&&to(i,e)}function to(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,i._processTokenInBodyMode(e),i.fosterParentingEnabled=t}function n$(i,e){i.pendingCharacterTokens.push(e)}function r$(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function t0(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t<i.pendingCharacterTokens.length;t++)to(i,i.pendingCharacterTokens[t]);else for(;t<i.pendingCharacterTokens.length;t++)i._insertCharacters(i.pendingCharacterTokens[t]);i.insertionMode=i.originalInsertionMode,i._processToken(e)}function o$(i,e){let t=e.tagName;t===S.CAPTION||t===S.COL||t===S.COLGROUP||t===S.TBODY||t===S.TD||t===S.TFOOT||t===S.TH||t===S.THEAD||t===S.TR?i.openElements.hasInTableScope(S.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(S.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=Dn,i._processToken(e)):cr(i,e)}function s$(i,e){let t=e.tagName;t===S.CAPTION||t===S.TABLE?i.openElements.hasInTableScope(S.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(S.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=Dn,t===S.TABLE&&i._processToken(e)):t!==S.BODY&&t!==S.COL&&t!==S.COLGROUP&&t!==S.HTML&&t!==S.TBODY&&t!==S.TD&&t!==S.TFOOT&&t!==S.TH&&t!==S.THEAD&&t!==S.TR&&u3(i,e)}function a$(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.COL?(i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0):t===S.TEMPLATE?Zi(i,e):T_(i,e)}function l$(i,e){let t=e.tagName;t===S.COLGROUP?i.openElements.currentTagName===S.COLGROUP&&(i.openElements.pop(),i.insertionMode=Dn):t===S.TEMPLATE?kc(i,e):t!==S.COL&&T_(i,e)}function T_(i,e){i.openElements.currentTagName===S.COLGROUP&&(i.openElements.pop(),i.insertionMode=Dn,i._processToken(e))}function c$(i,e){let t=e.tagName;t===S.TR?(i.openElements.clearBackToTableBodyContext(),i._insertElement(e,Ae.HTML),i.insertionMode=da):t===S.TH||t===S.TD?(i.openElements.clearBackToTableBodyContext(),i._insertFakeElement(S.TR),i.insertionMode=da,i._processToken(e)):t===S.CAPTION||t===S.COL||t===S.COLGROUP||t===S.TBODY||t===S.TFOOT||t===S.THEAD?i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Dn,i._processToken(e)):m3(i,e)}function d$(i,e){let t=e.tagName;t===S.TBODY||t===S.TFOOT||t===S.THEAD?i.openElements.hasInTableScope(t)&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Dn):t===S.TABLE?i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Dn,i._processToken(e)):(t!==S.BODY&&t!==S.CAPTION&&t!==S.COL&&t!==S.COLGROUP||t!==S.HTML&&t!==S.TD&&t!==S.TH&&t!==S.TR)&&p3(i,e)}function h$(i,e){let t=e.tagName;t===S.TH||t===S.TD?(i.openElements.clearBackToTableRowContext(),i._insertElement(e,Ae.HTML),i.insertionMode=N_,i.activeFormattingElements.insertMarker()):t===S.CAPTION||t===S.COL||t===S.COLGROUP||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR?i.openElements.hasInTableScope(S.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=io,i._processToken(e)):m3(i,e)}function u$(i,e){let t=e.tagName;t===S.TR?i.openElements.hasInTableScope(S.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=io):t===S.TABLE?i.openElements.hasInTableScope(S.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=io,i._processToken(e)):t===S.TBODY||t===S.TFOOT||t===S.THEAD?(i.openElements.hasInTableScope(t)||i.openElements.hasInTableScope(S.TR))&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=io,i._processToken(e)):(t!==S.BODY&&t!==S.CAPTION&&t!==S.COL&&t!==S.COLGROUP||t!==S.HTML&&t!==S.TD&&t!==S.TH)&&p3(i,e)}function m$(i,e){let t=e.tagName;t===S.CAPTION||t===S.COL||t===S.COLGROUP||t===S.TBODY||t===S.TD||t===S.TFOOT||t===S.TH||t===S.THEAD||t===S.TR?(i.openElements.hasInTableScope(S.TD)||i.openElements.hasInTableScope(S.TH))&&(i._closeTableCell(),i._processToken(e)):cr(i,e)}function p$(i,e){let t=e.tagName;t===S.TD||t===S.TH?i.openElements.hasInTableScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=da):t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR?i.openElements.hasInTableScope(t)&&(i._closeTableCell(),i._processToken(e)):t!==S.BODY&&t!==S.CAPTION&&t!==S.COL&&t!==S.COLGROUP&&t!==S.HTML&&u3(i,e)}function SM(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.OPTION?(i.openElements.currentTagName===S.OPTION&&i.openElements.pop(),i._insertElement(e,Ae.HTML)):t===S.OPTGROUP?(i.openElements.currentTagName===S.OPTION&&i.openElements.pop(),i.openElements.currentTagName===S.OPTGROUP&&i.openElements.pop(),i._insertElement(e,Ae.HTML)):t===S.INPUT||t===S.KEYGEN||t===S.TEXTAREA||t===S.SELECT?i.openElements.hasInSelectScope(S.SELECT)&&(i.openElements.popUntilTagNamePopped(S.SELECT),i._resetInsertionMode(),t!==S.SELECT&&i._processToken(e)):(t===S.SCRIPT||t===S.TEMPLATE)&&Zi(i,e)}function CM(i,e){let t=e.tagName;if(t===S.OPTGROUP){let n=i.openElements.items[i.openElements.stackTop-1],r=n&&i.treeAdapter.getTagName(n);i.openElements.currentTagName===S.OPTION&&r===S.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagName===S.OPTGROUP&&i.openElements.pop()}else t===S.OPTION?i.openElements.currentTagName===S.OPTION&&i.openElements.pop():t===S.SELECT&&i.openElements.hasInSelectScope(S.SELECT)?(i.openElements.popUntilTagNamePopped(S.SELECT),i._resetInsertionMode()):t===S.TEMPLATE&&kc(i,e)}function f$(i,e){let t=e.tagName;t===S.CAPTION||t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR||t===S.TD||t===S.TH?(i.openElements.popUntilTagNamePopped(S.SELECT),i._resetInsertionMode(),i._processToken(e)):SM(i,e)}function g$(i,e){let t=e.tagName;t===S.CAPTION||t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR||t===S.TD||t===S.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(S.SELECT),i._resetInsertionMode(),i._processToken(e)):CM(i,e)}function _$(i,e){let t=e.tagName;if(t===S.BASE||t===S.BASEFONT||t===S.BGSOUND||t===S.LINK||t===S.META||t===S.NOFRAMES||t===S.SCRIPT||t===S.STYLE||t===S.TEMPLATE||t===S.TITLE)Zi(i,e);else{let n=eG[t]||cs;i._popTmplInsertionMode(),i._pushTmplInsertionMode(n),i.insertionMode=n,i._processToken(e)}}function v$(i,e){e.tagName===S.TEMPLATE&&kc(i,e)}function wM(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(S.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode(),i._processToken(e)):i.stopped=!0}function b$(i,e){e.tagName===S.HTML?cr(i,e):I_(i,e)}function y$(i,e){e.tagName===S.HTML?i.fragmentContext||(i.insertionMode=bM):I_(i,e)}function I_(i,e){i.insertionMode=cs,i._processToken(e)}function S$(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.FRAMESET?i._insertElement(e,Ae.HTML):t===S.FRAME?(i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0):t===S.NOFRAMES&&Zi(i,e)}function C$(i,e){e.tagName===S.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagName!==S.FRAMESET&&(i.insertionMode=vM))}function w$(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.NOFRAMES&&Zi(i,e)}function x$(i,e){e.tagName===S.HTML&&(i.insertionMode=yM)}function E$(i,e){e.tagName===S.HTML?cr(i,e):w_(i,e)}function w_(i,e){i.insertionMode=cs,i._processToken(e)}function T$(i,e){let t=e.tagName;t===S.HTML?cr(i,e):t===S.NOFRAMES&&Zi(i,e)}function I$(i,e){e.chars=Yq.REPLACEMENT_CHARACTER,i._insertCharacters(e)}function k$(i,e){i._insertCharacters(e),i.framesetOk=!1}function A$(i,e){if(ls.causesExit(e)&&!i.fragmentContext){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==Ae.HTML&&!i._isIntegrationPoint(i.openElements.current);)i.openElements.pop();i._processToken(e)}else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===Ae.MATHML?ls.adjustTokenMathMLAttrs(e):n===Ae.SVG&&(ls.adjustTokenSVGTagName(e),ls.adjustTokenSVGAttrs(e)),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function L$(i,e){for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===Ae.HTML){i._processToken(e);break}if(i.treeAdapter.getTagName(n).toLowerCase()===e.tagName){i.openElements.popUntilElementPopped(n);break}}}});var jM=lt((Q0e,WM)=>{var HM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Y$=/\n/g,X$=/^\s*/,Q$=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J$=/^:\s*/,Z$=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eY=/^[;\s]*/,tY=/^\s+|\s+$/g,iY=`
|
|
`,BM="/",zM="*",Nc="",nY="comment",rY="declaration";WM.exports=function(i,e){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];e=e||{};var t=1,n=1;function r(f){var _=f.match(Y$);_&&(t+=_.length);var b=f.lastIndexOf(iY);n=~b?f.length-b:n+f.length}function o(){var f={line:t,column:n};return function(_){return _.position=new s(f),d(),_}}function s(f){this.start=f,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(f){var _=new Error(e.source+":"+t+":"+n+": "+f);if(_.reason=f,_.filename=e.source,_.line=t,_.column=n,_.source=i,e.silent)a.push(_);else throw _}function c(f){var _=f.exec(i);if(_){var b=_[0];return r(b),i=i.slice(b.length),_}}function d(){c(X$)}function h(f){var _;for(f=f||[];_=u();)_!==!1&&f.push(_);return f}function u(){var f=o();if(!(BM!=i.charAt(0)||zM!=i.charAt(1))){for(var _=2;Nc!=i.charAt(_)&&(zM!=i.charAt(_)||BM!=i.charAt(_+1));)++_;if(_+=2,Nc===i.charAt(_-1))return l("End of comment missing");var b=i.slice(2,_-2);return n+=2,r(b),i=i.slice(_),n+=2,f({type:nY,comment:b})}}function m(){var f=o(),_=c(Q$);if(_){if(u(),!c(J$))return l("property missing ':'");var b=c(Z$),C=f({type:rY,property:UM(_[0].replace(HM,Nc)),value:b?UM(b[0].replace(HM,Nc)):Nc});return c(eY),C}}function p(){var f=[];h(f);for(var _;_=m();)_!==!1&&(f.push(_),h(f));return f}return d(),p()};function UM(i){return i?i.replace(tY,Nc):Nc}});var KM=lt((J0e,VM)=>{var oY=jM();function sY(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=oY(i),o=typeof e=="function",s,a,l=0,c=r.length;l<c;l++)n=r[l],s=n.property,a=n.value,o?e(s,a,n):a&&(t||(t={}),t[s]=a);return t}VM.exports=sY});var nH=lt(Qc=>{Rt();Gt();it();Bs();re();Me();xn();V2();Ie();ht();Qf();ut();cj();lj();be();Si();qe();st();mc();var iH=Qc&&Qc.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c4=Qc&&Qc.__param||function(i,e){return function(t,n){e(t,n,i)}},s8=Qc&&Qc.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},G0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new W,this._sessionDisposables=new W,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new oc;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new qt,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a<l;a++)if(s.changes[a].range.endLineNumber<=n.lineNumber){r.cancel(),o.dispose();return}});Vk(this._workerService,this._languageFeaturesService,t,n,e,t.getFormattingOptions(),r.token).then(s=>{r.token.isCancellationRequested||Xt(s)&&(Uk.execute(this._editor,s,!0),Wk(s))}).finally(()=>{o.dispose()})}};G0.ID="editor.contrib.autoFormat";G0=iH([c4(1,le),c4(2,Xs)],G0);var $0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new W,this._callOnModel=new W,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(u9,this.editor,e,2,Qo.None,ze.None).catch(Be))}};$0.ID="editor.contrib.formatOnPaste";$0=iH([c4(1,le),c4(2,Ce)],$0);var r8=class extends K{constructor(){super({id:"editor.action.formatDocument",label:g("formatDocument.label","Format Document"),alias:"Format Document",precondition:G.and(I.notInCompositeEditor,I.writable,I.hasDocumentFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return s8(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(Ce);yield e.get(Gs).showWhile(n.invokeFunction(jk,t,1,Qo.None,ze.None),250)}})}},o8=class extends K{constructor(){super({id:"editor.action.formatSelection",label:g("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:G.and(I.writable,I.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2084),weight:100},contextMenuOpts:{when:I.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return s8(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(Ce),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(Gs).showWhile(n.invokeFunction(u9,t,o,1,Qo.None,ze.None),250)})}};Se(G0.ID,G0,2);Se($0.ID,$0,2);F(r8);F(o8);Je.registerCommand("editor.action.format",i=>s8(void 0,void 0,void 0,function*(){let e=i.get(_t).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(Pt);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var $5,IB=Ka(()=>{Di();$5=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new ye(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new ye(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var kB=Ka(()=>{});var AB=Ka(()=>{kB()});var LB=lt(jm=>{ct();it();g1();Me();Ie();Di();ht();dn();Qf();be();IB();AB();var Bte=jm&&jm.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zte=jm&&jm.__param||function(i,e){return function(t,n){e(t,n,i)}},Hl=class aw{static get(e){return e.getContribution(aw.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new jf(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Ht(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let h=k.lift(c.range),u=c.range,m=c.value.length-(s.endColumn-s.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+c.value.length},m>1&&(s=new ye(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+m-1));let p=new $5(h,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,p),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:aw.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=$d(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Be)}).catch(Be)):Promise.resolve(void 0)}};Hl.ID="editor.contrib.inPlaceReplaceController";Hl.DECORATION=Ue.register({description:"in-place-replace",className:"valueSetReplacement"});Hl=Bte([zte(1,Xs)],Hl);var lw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.up",label:g("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},cw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.down",label:g("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Se(Hl.ID,Hl,4);F(lw);F(cw)});var mz=Ka(()=>{});var pz=Ka(()=>{mz()});var Ed,fz=Ka(()=>{wr();dj();be();mi();qe();Ed=class i extends Gr{constructor(){super({id:i.ID,title:{value:g({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(we).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!p9.getTabFocusMode(t);p9.setTabFocusMode(r,t),r?Kt(g("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Kt(g("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Ed.ID="editor.action.toggleTabFocusMode";Ft(Ed)});var bz=lt(gp=>{pz();gt();aj();wr();Kf();re();yn();Bt();Cn();Me();ht();fz();qe();st();hn();Xr();ch();var gz=gp&&gp.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ob=gp&&gp.__param||function(i,e){return function(t,n){e(t,n,i)}},_z=new Ne("accessibilityHelpWidgetVisible",!1),Td=class vz extends Y{static get(e){return e.getContribution(vz.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Du,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};Td.ID="editor.contrib.accessibilityHelpController";Td=gz([Ob(1,Ce)],Td);function Kie(i,e){return!i||i.length===0?ri.noSelection:i.length===1?e?xr(ri.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):xr(ri.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?xr(ri.multiSelectionRange,i.length,e):i.length>0?xr(ri.multiSelection,i.length):""}var Du=class Pb extends $s{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=_z.bindTo(this._contextKeyService),this._domNode=t9(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-modal","true"),this._domNode.setAttribute("aria-hidden","true");let o=oe(this._domNode.domNode,te("h1",void 0,ri.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=t9(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(Vr(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Kt(ri.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),nn(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Kt(ri.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(Qe.parse(a)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Pb.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){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())}_descriptionForCommand(e,t,n){let r=this._keybindingService.lookupKeybinding(e);return r?xr(t,r.getAriaLabel()):xr(n,e)}_buildContent(){let e=this._contentDomNode.domNode,t=this._editor.getOptions(),n=this._editor.getSelections(),r=0;if(n){let c=this._editor.getModel();c&&n.forEach(d=>{r+=c.getValueLengthInRange(d)})}oe(e,te("p",void 0,Kie(n,r)));let o=oe(e,te("p"));t.get(59)?t.get(88)?o.textContent=ri.readonlyDiffEditor:o.textContent=ri.editableDiffEditor:t.get(88)?o.textContent=ri.readonlyEditor:o.textContent=ri.editableEditor;let s=oe(e,te("ul")),a=Ui?ri.changeConfigToOnMac:ri.changeConfigToOnWinLinux;switch(t.get(2)){case 0:oe(s,te("li",void 0,a));break;case 2:oe(s,te("li",void 0,ri.auto_on));break;case 1:oe(s,te("li",void 0,ri.auto_off,a));break}t.get(139)?oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,ri.tabFocusModeOnMsg,ri.tabFocusModeOnMsgNoKb))):oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,ri.tabFocusModeOffMsg,ri.tabFocusModeOffMsgNoKb)));let l=Ui?ri.openDocMac:ri.openDocWinLinux;oe(s,te("li",void 0,l)),oe(e,te("p",void 0,ri.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,nn(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(Pb.WIDTH,e.width-40)),n=Math.max(5,Math.min(Pb.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(n);let r=Math.round((e.height-n)/2);this._domNode.setTop(r);let o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};Du.ID="editor.contrib.accessibilityHelpWidget";Du.WIDTH=500;Du.HEIGHT=300;Du=gz([Ob(1,we),Ob(2,mt),Ob(3,ci)],Du);var gx=class extends K{constructor(){super({id:"editor.action.showAccessibilityHelp",label:ri.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=Td.get(t);n==null||n.show()}};Se(Td.ID,Td,4);F(gx);var qie=ii.bindToContribution(Td.get);ge(new qie({id:"closeAccessibilityHelp",precondition:_z,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:I.focus,primary:9,secondary:[1033]}}))});var yz=Ka(()=>{});var Sz=Ka(()=>{yz()});var xz=lt(_p=>{Sz();gt();Xd();re();Me();cn();JW();rj();$r();hj();ch();var Gie=_p&&_p.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Cz=_p&&_p.__param||function(i,e){return function(t,n){e(t,n,i)}},Mu=class wz extends Y{static get(e){return e.getContribution(wz.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(ih.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Fb(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mu.ID="editor.contrib.inspectTokens";Mu=Gie([Cz(1,lA),Cz(2,li)],Mu);var _x=class extends K{constructor(){super({id:"editor.action.inspectTokens",label:sA.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Mu.get(t);n==null||n.launch()}};function $ie(i){let e="";for(let t=0,n=i.length;t<n;t++){let r=i.charCodeAt(t);switch(r){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(r)}}return e}function Yie(i,e){let t=ih.get(e);if(t)return t;let n=i.encodeLanguageId(e);return{getInitialState:()=>lk,tokenize:(r,o,s)=>ck(e,s),tokenizeEncoded:(r,o,s)=>dk(n,s)}}var Fb=class i extends Y{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=Yie(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n<t.tokens1.length){let l=t.tokens1[n].offset,c=n+1<t.tokens1.length?t.tokens1[n+1].offset:o.length;s=o.substring(l,c)}uf(this._domNode,te("h2.tm-token",void 0,$ie(s),te("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),oe(this._domNode,te("hr.tokens-inspect-separator",{style:"clear:both"}));let a=(r<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(r<<1)+1]):null;oe(this._domNode,te("table.tm-metadata-table",void 0,te("tbody",void 0,te("tr",void 0,te("td.tm-metadata-key",void 0,"language"),te("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"token type"),te("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"font style"),te("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"foreground"),te("td.tm-metadata-value",void 0,`${a?xt.Format.CSS.formatHex(a.foreground):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"background"),te("td.tm-metadata-value",void 0,`${a?xt.Format.CSS.formatHex(a.background):"-?-"}`))))),oe(this._domNode,te("hr.tokens-inspect-separator")),n<t.tokens1.length&&oe(this._domNode,te("span.tm-token-type",void 0,t.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=ih.getColorMap(),n=Jd.getLanguageId(e),r=Jd.getTokenType(e),o=Jd.getFontStyle(e),s=Jd.getForeground(e),a=Jd.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:r,fontStyle:o,foreground:t[s],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),r=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:n.tokens,tokens2:r.tokens,endState:n.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let n=1;n<e;n++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};Fb._ID="editor.contrib.inspectTokensWidget";Se(Mu.ID,Mu,4);F(_x)});var TW=lt((EW,KE)=>{(function(i){if(typeof EW=="object"&&typeof KE!="undefined")KE.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,h){if(!o[d]){if(!r[d]){var u=typeof Xl=="function"&&Xl;if(!h&&u)return u(d,!0);if(l)return l(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var p=o[d]={exports:{}};r[d][0].call(p.exports,function(f){var _=r[d][1][f];return a(_||f)},p,p.exports,n,r,o,s)}return o[d].exports}for(var l=typeof Xl=="function"&&Xl,c=0;c<s.length;c++)a(s[c]);return a}return n}()({1:[function(n,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function m(p,f){for(var _=0;_<f.length;_++){var b=f[_];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,f,_){return f&&m(p.prototype,f),_&&m(p,_),p}}();function a(m,p,f){return p in m?Object.defineProperty(m,p,{value:f,enumerable:!0,configurable:!0,writable:!0}):m[p]=f,m}function l(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")}var c={width:"100%",height:"100%"},d=function(p){return Number(p)===Number(p)},h="classList"in document.documentElement?function(m,p){m.classList.add(p)}:function(m,p){var f=m.getAttribute("class")||"";m.setAttribute("class",f+" "+p)},u=function(){s(m,null,[{key:"create",value:function(f,_){return new m(f,_)}},{key:"mergeStyle",value:function(f,_){for(var b in _)f.style[b]!==_[b]&&(f.style[b]=_[b])}},{key:"getMaxBrowserHeight",value:function(){var f=document.createElement("div"),_=document.createElement("div");m.mergeStyle(f,{position:"absolute",height:"1px",opacity:0}),m.mergeStyle(_,{height:"1e7px"}),f.appendChild(_),document.body.appendChild(f);var b=_.offsetHeight;return document.body.removeChild(f),b}}]);function m(p,f){var _=this;l(this,m),this._config={},this._lastRepaint=null,this._maxElementHeight=m.getMaxBrowserHeight(),this.refresh(p,f);var b=this._config,C=function T(){var w=_._getScrollPosition(),A=_._lastRepaint;if(_._renderAnimationFrame=window.requestAnimationFrame(T),w!==A){var O=A?w-A:0;if(!A||O<0||O>_._averageHeight){var D=_._renderChunk();_._lastRepaint=w,D!==!1&&typeof b.afterRender=="function"&&b.afterRender()}}};C()}return s(m,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(f,_){var b;if(Object.assign(this._config,c,_),!f||f.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=f;var C=this._config,T=this._scroller||C.scroller||document.createElement(C.scrollerTagName||"tr");if(typeof C.useFragment!="boolean"&&(this._config.useFragment=!0),!C.generate)throw new Error("Missing required `generate` function");if(!d(C.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(C.itemHeight)&&!d(C.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(C.itemHeight)?this._itemHeights=Array(C.total).fill(C.itemHeight):this._itemHeights=C.itemHeight,Object.keys(c).filter(function(B){return B in C}).forEach(function(B){var Z=C[B],ee=d(Z);if(Z&&typeof Z!="string"&&typeof Z!="number"){var V="Invalid optional `"+B+"`, expected string or number";throw new Error(V)}else ee&&(C[B]=Z+"px")});var w=!!C.horizontal,A=C[w?"width":"height"];if(A){var O=d(A),D=O?!1:A.slice(-1)==="%",j=O?A:parseInt(A.replace(/px|%/,""),10),q=window[w?"innerWidth":"innerHeight"];D?this._containerSize=q*j/100:this._containerSize=d(A)?A:j}var _e=C.scrollContainer,J=C.itemHeight*C.total,ke=this._maxElementHeight;J>ke&&console.warn(["HyperList: The maximum element height",ke+"px has","been exceeded; please reduce your item height."].join(" "));var Oe={width:""+C.width,height:_e?J+"px":""+C.height,overflow:_e?"none":"auto",position:"relative"};m.mergeStyle(f,Oe),_e&&m.mergeStyle(C.scrollContainer,{overflow:"auto"});var Pe=(b={opacity:"0",position:"absolute"},a(b,w?"height":"width","1px"),a(b,w?"width":"height",J+"px"),b);m.mergeStyle(T,Pe),this._scroller||f.appendChild(T);var et=this._computeScrollPadding();this._scrollPaddingBottom=et.bottom,this._scrollPaddingTop=et.top,this._scroller=T,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(C.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof C.afterRender=="function"&&C.afterRender()}},{key:"_getRow",value:function(f){var _=this._config,b=_.generate(f),C=b.height;if(C!==void 0&&d(C)?(b=b.element,C!==this._itemHeights[f]&&(this._itemHeights[f]=C,this._computePositions(f),this._scrollHeight=this._computeScrollHeight(f))):C=this._itemHeights[f],!b||b.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+f);h(b,_.rowClassName||"vrow");var T=this._itemPositions[f]+this._scrollPaddingTop;return m.mergeStyle(b,a({position:"absolute"},_.horizontal?"left":"top",T+"px")),b}},{key:"_getScrollPosition",value:function(){var f=this._config;return typeof f.overrideScrollPosition=="function"?f.overrideScrollPosition():this._element[f.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(f){var _=this._config,b=this._element,C=this._getScrollPosition(),T=_.total,w=_.reverse?this._getReverseFrom(C):this._getFrom(C)-1;if((w<0||w-this._screenItemsLen<0)&&(w=0),!f&&this._lastFrom===w)return!1;this._lastFrom=w;var A=w+this._cachedItemsLen;(A>T||A+this._cachedItemsLen>T)&&(A=T);var O=_.useFragment?document.createDocumentFragment():[],D=this._scroller;O[_.useFragment?"appendChild":"push"](D);for(var j=w;j<A;j++){var q=this._getRow(j);O[_.useFragment?"appendChild":"push"](q)}if(_.applyPatch)return _.applyPatch(b,O);b.innerHTML="",b.appendChild(O)}},{key:"_computePositions",value:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,_=this._config,b=_.total,C=_.reverse;f<1&&!C&&(f=1);for(var T=f;T<b;T++)C?T===0?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[T]=this._itemPositions[T-1]-this._itemHeights[T]:this._itemPositions[T]=this._itemHeights[T-1]+this._itemPositions[T-1]}},{key:"_computeScrollHeight",value:function(){var f,_=this,b=this._config,C=!!b.horizontal,T=b.total,w=this._itemHeights.reduce(function(J,ke){return J+ke},0)+this._scrollPaddingBottom+this._scrollPaddingTop;m.mergeStyle(this._scroller,(f={opacity:0,position:"absolute",top:"0px"},a(f,C?"height":"width","1px"),a(f,C?"width":"height",w+"px"),f));var A=this._itemHeights.slice(0).sort(function(J,ke){return J-ke}),O=Math.floor(T/2),D=T%2===0?(A[O]+A[O-1])/2:A[O],j=C?"clientWidth":"clientHeight",q=b.scrollContainer?b.scrollContainer:this._element,_e=q[j]?q[j]:this._containerSize;return this._screenItemsLen=Math.ceil(_e/D),this._containerSize=_e,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,this._screenItemsLen*3),this._averageHeight=D,b.reverse&&window.requestAnimationFrame(function(){C?_._element.scrollLeft=w:_._element.scrollTop=w}),w}},{key:"_computeScrollPadding",value:function(){var f=this._config,_=!!f.horizontal,b=f.reverse,C=window.getComputedStyle(this._element),T=function(A){var O=C.getPropertyValue("padding-"+A);return parseInt(O,10)||0};return _&&b?{bottom:T("left"),top:T("right")}:_?{bottom:T("right"),top:T("left")}:b?{bottom:T("top"),top:T("bottom")}:{bottom:T("bottom"),top:T("top")}}},{key:"_getFrom",value:function(f){for(var _=0;this._itemPositions[_]<f;)_++;return _}},{key:"_getReverseFrom",value:function(f){for(var _=this._config.total-1;_>0&&this._itemPositions[_]<f+this._containerSize;)_--;return _}}]),m}();o.default=u,r.exports=o.default},{}]},{},[1])(1)})});var RW=lt((NW,S2)=>{(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var h=n.getContext("2d");h.shadowBlur=c.shadowBlur,h.shadowColor=c.shadowColor;var u,m=h.createLinearGradient(0,0,n.width,0);for(u in c.barColors)m.addColorStop(u,c.barColors[u]);h.lineWidth=c.barThickness,h.beginPath(),h.moveTo(0,c.barThickness/2),h.lineTo(Math.ceil(r*n.width),c.barThickness/2),h.strokeStyle=m,h.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(h){for(var u in h)c.hasOwnProperty(u)&&(c[u]=h[u])},show:function(h){var u,m;o||(h?l=l||setTimeout(()=>d.show(),h):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((m=(n=e.createElement("canvas")).style).position="fixed",m.top=m.left=m.right=m.margin=m.padding=0,m.zIndex=100001,m.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),u="resize",h=t,(m=i).addEventListener?m.addEventListener(u,h,!1):m.attachEvent?m.attachEvent("on"+u,h):m["on"+u]=h),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function p(){s=i.requestAnimationFrame(p),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(h){return h===void 0||(typeof h=="string"&&(h=(0<=h.indexOf("+")||0<=h.indexOf("-")?r:0)+parseFloat(h)),r=1<h?1:h,t()),r},hide:function(){clearTimeout(l),l=null,o&&(o=!1,s!=null&&(i.cancelAnimationFrame(s),s=null),function h(){return 1<=d.progress("+.1")&&(n.style.opacity-=.05,n.style.opacity<=.05)?(n.style.display="none",void(a=null)):void(a=i.requestAnimationFrame(h))}())}};typeof S2=="object"&&typeof S2.exports=="object"?S2.exports=d:typeof define=="function"&&define.amd?define(function(){return d}):this.topbar=d}).call(NW,window,document)});(function(){var i=e();function e(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function r(o,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(o,s.bubbles,s.cancelable,s.detail),a}return r.prototype=window.Event.prototype,r}function t(r,o){var s=document.createElement("input");return s.type="hidden",s.name=r,s.value=o,s}function n(r,o){var s=r.getAttribute("data-to"),a=t("_method",r.getAttribute("data-method")),l=t("_csrf_token",r.getAttribute("data-csrf")),c=document.createElement("form"),d=document.createElement("input"),h=r.getAttribute("target");c.method=r.getAttribute("data-method")==="get"?"get":"post",c.action=s,c.style.display="none",h?c.target=h:o&&(c.target="_blank"),c.appendChild(l),c.appendChild(a),document.body.appendChild(c),d.type="submit",c.appendChild(d),d.click()}window.addEventListener("click",function(r){var o=r.target;if(!r.defaultPrevented)for(;o&&o.getAttribute;){var s=new i("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!o.dispatchEvent(s))return r.preventDefault(),r.stopImmediatePropagation(),!1;if(o.getAttribute("data-method"))return n(o,r.metaKey||r.shiftKey),r.preventDefault(),!1;o=o.parentNode}},!1),window.addEventListener("phoenix.link.click",function(r){var o=r.target.getAttribute("data-confirm");o&&!window.confirm(o)&&r.preventDefault()},!1)})();var E1=i=>typeof i=="function"?i:function(){return i},uj=typeof self!="undefined"?self:null,x1=typeof window!="undefined"?window:null,T1=uj||x1||T1,mj="2.0.0",ts={connecting:0,open:1,closing:2,closed:3},pj=1e4,fj=1e3,Lr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Zs={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},T9={longpoll:"longpoll",websocket:"websocket"},gj={complete:4},cg=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},cA=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},_j=class{constructor(i,e,t){this.state=Lr.closed,this.topic=i,this.params=E1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new cg(this,Zs.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cA(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Lr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Lr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new cg(this,Zs.leave,E1({}),this.timeout).send(),this.state=Lr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Zs.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Zs.close,i)}onError(i){return this.on(Zs.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new cg(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Lr.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Zs.close,"leave")},t=new cg(this,Zs.leave,E1({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Lr.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s<o.length;s++)o[s].callback(r,t,n||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===Lr.closed}isErrored(){return this.state===Lr.errored}isJoined(){return this.state===Lr.joined}isJoining(){return this.state===Lr.joining}isLeaving(){return this.state===Lr.leaving}},hg=class{static request(i,e,t,n,r,o,s){if(T1.XDomainRequest){let a=new T1.XDomainRequest;return this.xdomainRequest(a,i,e,n,r,o,s)}else{let a=new T1.XMLHttpRequest;return this.xhrRequest(a,i,e,t,n,r,o,s)}}static xdomainRequest(i,e,t,n,r,o,s){return i.timeout=r,i.open(e,t),i.onload=()=>{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===gj.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},E9=class{constructor(i){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ts.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+T9.websocket),"$1/"+T9.longpoll)}endpointURL(){return hg.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=ts.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ts.open||this.readyState===ts.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ts.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(`
|
|
`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,e,t){for(let r of this.reqs)r.abort();this.readyState=ts.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(i,e,t,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=hg.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var dg={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,e){if(i.payload.constructor===ArrayBuffer)return e(this.binaryEncode(i));{let t=[i.join_ref,i.ref,i.topic,i.event,i.payload];return e(JSON.stringify(t))}},decode(i,e){if(i.constructor===ArrayBuffer)return e(this.binaryDecode(i));{let[t,n,r,o,s]=JSON.parse(i);return e({join_ref:t,ref:n,topic:r,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:n,topic:r,payload:o}=i,s=this.META_LENGTH+e.length+t.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(t,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(c++,h.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(i){let e=new DataView(i),t=e.getUint8(0),n=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,n);case this.KINDS.reply:return this.decodeReply(i,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,n)}},decodePush(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+n));s=s+n;let l=t.decode(i.slice(s,s+r));s=s+r;let c=t.decode(i.slice(s,s+o));s=s+o;let d=i.slice(s,i.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:d}},decodeReply(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=t.decode(i.slice(a,a+n));a=a+n;let c=t.decode(i.slice(a,a+r));a=a+r;let d=t.decode(i.slice(a,a+o));a=a+o;let h=t.decode(i.slice(a,a+s));a=a+s;let u=i.slice(a,i.byteLength),m={status:h,response:u};return{join_ref:l,ref:c,topic:d,event:Zs.reply,payload:m}},decodeBroadcast(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+n));o=o+n;let a=t.decode(i.slice(o,o+r));o=o+r;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},ug=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||pj,this.transport=e.transport||T1.WebSocket||E9,this.establishedConnections=0,this.defaultEncoder=dg.encode.bind(dg),this.defaultDecoder=dg.decode.bind(dg),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==E9?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;x1&&x1.addEventListener&&(x1.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),x1.addEventListener("pageshow",n=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=E1(e.params||{}),this.endPoint=`${i}/${T9.websocket}`,this.vsn=e.vsn||mj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new cA(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return E9}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=hg.appendParams(hg.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,e,t){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(i,e,t)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=E1(i)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(i,e,t){this.logger(i,e,t)}hasLogger(){return this.logger!==null}onOpen(i){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,i]),e}onClose(i){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,i]),e}onError(i){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,i]),e}onMessage(i){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,i]),e}ping(i){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),i(Date.now()-t))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,i])=>i())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),fj,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,e,t){if(!this.conn)return i&&i();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,t||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){i();return}setTimeout(()=>{this.waitForBufferDone(i,e+1)},150*e)}waitForSocketClosed(i,e=1){if(e===5||!this.conn||this.conn.readyState===ts.closed){i();return}setTimeout(()=>{this.waitForSocketClosed(i,e+1)},150*e)}onConnClose(i){let e=i&&i.code;this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(i))}onConnError(i){this.hasLogger()&&this.log("transport",i);let e=this.transport,t=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(Zs.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case ts.connecting:return"connecting";case ts.open:return"open";case ts.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(e=>e.joinRef()!==i.joinRef())}off(i){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>i.indexOf(t)===-1)}channel(i,e={}){let t=new _j(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:n,ref:r,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${r})`,n)}this.isConnected()?this.encode(i,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(i,e=>this.conn.send(e)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;a<this.channels.length;a++){let l=this.channels[a];l.isMember(t,n,r,s)&&l.trigger(n,r,o,s)}for(let a=0;a<this.stateChangeCallbacks.message.length;a++){let[,l]=this.stateChangeCallbacks.message[a];l(e)}})}leaveOpenTopic(i){let e=this.channels.find(t=>t.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var DA="consecutive-reloads",vj=10,bj=5e3,yj=1e4,Sj=3e4,MA=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Rr="data-phx-component",I9="data-phx-link",Cj="track-static",wj="data-phx-link-state",Jr="data-phx-ref",fc="data-phx-ref-src",OA="track-uploads",gc="data-phx-upload-ref",W9="data-phx-preflighted-refs",xj="data-phx-done-refs",dA="drop-target",H9="data-phx-active-refs",wg="phx:live-file:updated",B9="data-phx-skip",hA="data-phx-prune",uA="page-loading",mA="phx-connected",I1="phx-loading",k9="phx-no-feedback",mg="phx-error",pA="phx-client-error",A9="phx-server-error",uh="data-phx-parent-id",j9="data-phx-main",P1="data-phx-root-id",PA="viewport-top",FA="viewport-bottom",Ej="trigger-action",Eg="feedback-for",z9="phx-has-focused",Tj=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],HA=["checkbox","radio"],Tg="phx-has-submitted",cl="data-phx-session",ph=`[${cl}]`,fA="data-phx-sticky",M1="data-phx-static",L9="data-phx-readonly",pg="data-phx-disabled",U9="disable-with",fg="data-phx-disable-with-restore",k1="hook",Ij="debounce",kj="throttle",Ig="update",N9="stream",A1="data-phx-stream",Aj="key",is="phxPrivate",gA="auto-recover",gg="phx:live-socket:debug",R9="phx:live-socket:profiling",D9="phx:live-socket:latency-sim",Lj="progress",_A="mounted",Nj=1,Rj=200,Dj="phx-",Mj=3e4,L1="debounce-trigger",_g="throttled",vA="debounce-prev-key",Oj={debounce:300,throttle:300},M9="d",ns="s",Nr="c",bA="e",yA="r",SA="t",Pj="p",CA="stream",Fj=class{constructor(i,e,t){this.liveSocket=t,this.entry=i,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=t.channel(`lvu:${i.ref}`,{token:i.metadata()})}error(i){this.errored||(this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(i))}upload(){this.uploadChannel.onError(i=>this.error(i)),this.uploadChannel.join().receive("ok",i=>this.readNextChunk()).receive("error",i=>this.error(i))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let i=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);i.onload=t=>{if(t.target.error===null)this.offset+=t.target.result.byteLength,this.pushChunk(t.target.result);else return Ln("Read error: "+t.target.error)},i.readAsArrayBuffer(e)}pushChunk(i){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",i).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Ln=(i,e)=>console.error&&console.error(i,e),al=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Hj(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,n=e.length;t<n;t++)i.has(e[t].id)?console.error(`Multiple IDs detected: ${e[t].id}. Ensure unique element ids.`):i.add(e[t].id)}var Bj=(i,e,t,n)=>{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},O9=i=>typeof i=="function"?i:function(){return i},xg=i=>JSON.parse(JSON.stringify(i)),O1=(i,e,t)=>{do{if(i.matches(`[${e}]`)&&!i.disabled)return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1&&!(t&&t.isSameNode(i)||i.matches(ph)));return null},N1=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),zj=(i,e)=>JSON.stringify(i)===JSON.stringify(e),wA=i=>{for(let e in i)return!1;return!0},ll=(i,e)=>i&&e(i),Uj=function(i,e,t,n){i.forEach(r=>{new Fj(r,t.config.chunk_size,n).upload()})},BA={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,n,r){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?n:r(o);return i.setItem(s,JSON.stringify(a)),a},getLocal(i,e,t){return JSON.parse(i.getItem(this.localKey(e,t)))},updateCurrentState(i){this.canPushState()&&history.replaceState(i(history.state||{}),"",window.location.href)},pushState(i,e,t){if(this.canPushState()){if(t!==window.location.href){if(e.type=="redirect"&&e.scroll){let r=history.state||{};r.scroll=e.scroll,history.replaceState(r,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(t)},setCookie(i,e){document.cookie=`${i}=${e}`},getCookie(i){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${i}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(i,e){e&&BA.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=i},localKey(i,e){return`${i}-${e}`},getHashTargetEl(i){let e=i.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},rs=BA,Qr={byId(i){return document.getElementById(i)||Ln(`no id found for ${i}`)},removeClass(i,e){i.classList.remove(e),i.classList.length===0&&i.removeAttribute("class")},all(i,e,t){if(!i)return[];let n=Array.from(i.querySelectorAll(e));return t?n.forEach(t):n},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(gc)!==null},findUploadInputs(i){return this.all(i,`input[type="file"][${gc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Rr}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&Qr.private(i,"destroyed"))},wantsNewTab(i){let e=i.ctrlKey||i.shiftKey||i.metaKey||i.button&&i.button===1,t=i.target instanceof HTMLAnchorElement&&i.target.hasAttribute("download"),n=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||n||t},isUnloadableFormSubmit(i){return!i.defaultPrevented&&!this.wantsNewTab(i)},isNewPageClick(i,e){let t=i.target instanceof HTMLAnchorElement?i.target.getAttribute("href"):null,n;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:"))return!1;try{n=new URL(t)}catch(r){try{n=new URL(t,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(cl,""),this.putPrivate(i,"destroyed",!0)},findPhxChildrenInFragment(i,e){let t=document.createElement("template");return t.innerHTML=i,this.findPhxChildren(t.content,e)},isIgnored(i,e){return(i.getAttribute(e)||i.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(i,e,t){return i.getAttribute&&t.indexOf(i.getAttribute(e))>=0},findPhxSticky(i){return this.all(i,`[${fA}]`)},findPhxChildren(i,e){return this.all(i,`${ph}[${uh}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Rr}="${o}"] [${Rr}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Rr))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(ph)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(cl)!==null)return!1}},private(i,e){return i[is]&&i[is][e]},deletePrivate(i,e){i[is]&&delete i[is][e]},putPrivate(i,e,t){i[is]||(i[is]={}),i[is][e]=t},updatePrivate(i,e,t,n){let r=this.private(i,e);r===void 0?this.putPrivate(i,e,n(t)):this.putPrivate(i,e,n(r))},copyPrivates(i,e){e[is]&&(i[is]=e[is])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:n}=e.dataset;document.title=`${t||""}${i}${n||""}`}else document.title=i},debounce(i,e,t,n,r,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let d=l||c;switch(d){case null:return a();case"blur":this.once(i,"debounce-blur")&&i.addEventListener("blur",()=>a());return;default:let h=parseInt(d),u=()=>c?this.deletePrivate(i,_g):a(),m=this.incCycle(i,L1,u);if(isNaN(h))return Ln(`invalid throttle/debounce value: ${d}`);if(c){let f=!1;if(e.type==="keydown"){let _=this.private(i,vA);this.putPrivate(i,vA,e.key),f=_!==e.key}if(!f&&this.private(i,_g))return!1;a(),this.putPrivate(i,_g,!0),setTimeout(()=>{s()&&this.triggerCycle(i,L1)},h)}else setTimeout(()=>{s()&&this.triggerCycle(i,L1,m)},h);let p=i.form;p&&this.once(p,"bind-debounce")&&p.addEventListener("submit",()=>{Array.from(new FormData(p).entries(),([f])=>{let _=p.querySelector(`[name="${f}"]`);this.incCycle(_,L1),this.deletePrivate(_,_g)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,L1))}},triggerCycle(i,e,t){let[n,r]=this.private(i,e);t||(t=n),t===n&&(this.incCycle(i,e),r())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[n]=this.private(i,e)||[0,t];return n++,this.putPrivate(i,e,[n,t]),n},maybeAddPrivateHooks(i,e,t){i.hasAttribute&&(i.hasAttribute(e)||i.hasAttribute(t))&&i.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},maybeHideFeedback(i,e,t){if(!(this.private(e,z9)||this.private(e,Tg))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");Qr.all(i,r,o=>o.classList.add(k9))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"],
|
|
[${e}="${t.name}"],
|
|
[${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,z9),this.deletePrivate(t,Tg),this.all(document,n,r=>{r.classList.add(k9)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,k9)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(uh)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(fA)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${uh}]`)[0]},dispatchEvent(i,e,t={}){let r={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",r):new CustomEvent(e,r);i.dispatchEvent(o)},cloneNode(i,e){if(typeof e=="undefined")return i.cloneNode(!0);{let t=i.cloneNode(!1);return t.innerHTML=e,t}},mergeAttrs(i,e,t={}){let n=t.exclude||[],r=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n.indexOf(l)<0&&i.setAttribute(l,e.getAttribute(l))}let s=i.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||Qr.mergeAttrs(i,e,{exclude:["value"]}),e.readOnly?i.setAttribute("readonly",!0):i.removeAttribute("readonly")},hasSelectionRange(i){return i.setSelectionRange&&(i.type==="text"||i.type==="textarea")},restoreFocus(i,e,t){if(!Qr.isTextualInput(i))return;let n=i.matches(":focus");i.readOnly&&i.blur(),n||i.focus(),this.hasSelectionRange(i)&&i.setSelectionRange(e,t)},isFormInput(i){return/^(?:input|select|textarea)$/i.test(i.tagName)&&i.type!=="button"},syncAttrsToProps(i){i instanceof HTMLInputElement&&HA.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return Tj.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(Jr);if(n===null)return!0;let r=i.getAttribute(fc);return Qr.isFormInput(i)||i.getAttribute(t)!==null?(Qr.isUploadInput(i)&&Qr.mergeAttrs(i,e,{isIgnored:!0}),Qr.putPrivate(i,Jr,e),!1):(MA.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(Jr,n),e.setAttribute(fc,r),!0)},cleanChildNodes(i,e){if(Qr.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Ln(`only HTML element tags with an id are allowed inside containers with phx-update.
|
|
|
|
removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}"
|
|
|
|
`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",cl,M1,j9,P1]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(Qr.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=Qr.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},$=Qr,P9=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(H9).split(",").indexOf(An.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(W9).split(",").indexOf(An.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=An.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(wg,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{An.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(wg,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),An.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(wg,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(H9).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Ln(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:Uj}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Ln(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},Wj=0,An=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(Wj++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return $.findUploadInputs(i).forEach(t=>{t.getAttribute(W9)!==t.getAttribute(xj)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(gc);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(gc),$.putPrivate(i,"files",[])}static untrackFile(i,e){$.putPrivate(i,"files",$.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));$.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),$.putPrivate(i,"files",e)}static activeFileInputs(i){let e=$.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return($.private(i,"files")||[]).filter(e=>P9.isActive(i,e))}static inputsAwaitingPreflight(i){let e=$.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!P9.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(An.filesAwaitingPreflight(i)||[]).map(n=>new P9(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},jj={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},mh=jj,zA={LiveFileUpload:{activeRefs(){return this.el.getAttribute(H9)},preflightedRefs(){return this.el.getAttribute(W9)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(wg))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(gc)),An.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>mh.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>mh.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&mh.focusFirst(this.el)}}},xA=()=>document.documentElement.scrollTop||document.body.scrollTop,V9=()=>window.innerHeight||document.documentElement.clientHeight,Vj=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()},Kj=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=V9()},EA=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()};zA.InfiniteScroll={mounted(){let i=xA(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=xA();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),h=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),u=this.el.lastElementChild,m=this.el.firstElementChild,p=l<i,f=l>i;p&&d&&!e&&c.top>=0?(e=!0,r(d,m)):f&&e&&c.top<=0&&(e=!1),d&&p&&Vj(m)?o(d,m):h&&f&&Kj(u)&&s(h,u),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var qj=zA,Gj=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=$.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?ll(document.getElementById(e.previousElementId),t=>{ll(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):ll(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{ll(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},TA=11;function $j(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===TA||i.nodeType===TA)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var vg,Yj="http://www.w3.org/1999/xhtml",rr=typeof document=="undefined"?void 0:document,Xj=!!rr&&"content"in rr.createElement("template"),Qj=!!rr&&rr.createRange&&"createContextualFragment"in rr.createRange();function Jj(i){var e=rr.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Zj(i){vg||(vg=rr.createRange(),vg.selectNode(rr.body));var e=vg.createContextualFragment(i);return e.childNodes[0]}function eV(i){var e=rr.createElement("body");return e.innerHTML=i,e.childNodes[0]}function tV(i){return i=i.trim(),Xj?Jj(i):Qj?Zj(i):eV(i)}function bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function iV(i,e){return!e||e===Yj?rr.createElement(i):rr.createElementNS(e,i)}function nV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function F9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var IA={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}F9(i,e,"selected")},INPUT:function(i,e){F9(i,e,"checked"),F9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},R1=1,kA=11,AA=3,LA=8;function sl(){}function rV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function oV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=rr.createElement("html"),n.innerHTML=o}else n=tV(n);else n.nodeType===kA&&(n=n.firstElementChild);var s=r.getNodeKey||rV,a=r.onBeforeNodeAdded||sl,l=r.onNodeAdded||sl,c=r.onBeforeElUpdated||sl,d=r.onElUpdated||sl,h=r.onBeforeNodeDiscarded||sl,u=r.onNodeDiscarded||sl,m=r.onBeforeElChildrenUpdated||sl,p=r.skipFromChildren||sl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===R1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===R1||Z.nodeType===kA)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function D(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):D(ee)}else D(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):IA.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,bi,Zt,Mt;e:for(;H;){for(Zt=H.nextSibling,X=s(H);!V&&U;){if(bi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=Zt,U=bi;continue e}Tt=s(U);var Ii=U.nodeType,Ot=void 0;if(Ii===H.nodeType&&(Ii===R1?(X?X!==Tt&&((Mt=b[X])?bi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&bg(U,H),Ot&&q(U,H)):(Ii===AA||Ii==LA)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=Zt,U=bi;continue e}Tt?T(Tt):A(U,Z,!0),U=bi}if(X&&(Mt=b[X])&&bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var Hn=a(H);Hn!==!1&&(Hn&&(H=Hn),H.actualize&&(H=H.actualize(Z.ownerDocument||rr)),f(Z,H),D(H))}H=Zt,U=bi}j(Z,U,Tt);var Cr=IA[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===R1)Oe===R1?bg(t,n)||(u(t),J=nV(t,iV(n.nodeName,n.namespaceURI))):J=n;else if(ke===AA||ke===LA){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe<et;Pe++){var B=b[C[Pe]];B&&A(B,B.parentNode,!1)}}return!_&&J!==t&&t.parentNode&&(J.actualize&&(J=J.actualize(t.ownerDocument||rr)),t.parentNode.replaceChild(J,t)),J}}var sV=oV($j),NA=sV,yg=class{static patchEl(i,e,t){NA(i,e,{childrenOnly:!1,onBeforeElUpdated:(n,r)=>{if(t&&t.isSameNode(n)&&$.isFormInput(n))return $.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=al(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Ig);$.all(this.container,`[${i}=${N9}]`,e=>e.innerHTML=""),$.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(hA,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&$.hasSelectionRange(o)?o:{},l=e.binding(Ig),c=e.binding(Eg),d=e.binding(U9),h=e.binding(PA),u=e.binding(FA),m=e.binding(Ej),p=[],f=[],_=[],b=[],C=null,T=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([w,A,O,D])=>{Object.entries(A).forEach(([j,[q,_e]])=>{this.streamInserts[j]={ref:w,streamAt:q,limit:_e}}),D!==void 0&&$.all(t,`[${A1}="${w}"]`,j=>{this.removeStreamChildElement(j)}),O.forEach(j=>{let q=t.querySelector(`[id="${j}"]`);q&&this.removeStreamChildElement(q)})}),NA(r,T,{childrenOnly:r.getAttribute(Rr)===null,getNodeKey:w=>$.isPhxDestroyed(w)?null:w.id,skipFromChildren:w=>w.getAttribute(l)===N9,addChild:(w,A)=>{let{ref:O,streamAt:D,limit:j}=this.getStreamInsert(A);if(O===void 0)return w.appendChild(A);if($.putSticky(A,A1,J=>J.setAttribute(A1,O)),D===0)w.insertAdjacentElement("afterbegin",A);else if(D===-1)w.appendChild(A);else if(D>0){let J=Array.from(w.children)[D];w.insertBefore(A,J)}let q=j!==null&&Array.from(w.children),_e=[];j&&j<0&&q.length>j*-1?_e=q.slice(0,q.length+j):j&&j>=0&&q.length>j&&(_e=q.slice(j)),_e.forEach(J=>{this.streamInserts[J.id]||this.removeStreamChildElement(J)})},onBeforeNodeAdded:w=>($.maybeAddPrivateHooks(w,h,u),this.trackBefore("added",w),w),onNodeAdded:w=>{w.getAttribute&&this.maybeReOrderStream(w),w instanceof HTMLImageElement&&w.srcset?w.srcset=w.srcset:w instanceof HTMLVideoElement&&w.autoplay&&w.play(),$.isNowTriggerFormExternal(w,m)&&(C=w),w.getAttribute&&w.getAttribute("name")&&$.isFormInput(w)&&f.push(w),($.isPhxChild(w)&&i.ownsElement(w)||$.isPhxSticky(w)&&i.ownsElement(w.parentNode))&&this.trackAfter("phxChildAdded",w),p.push(w)},onNodeDiscarded:w=>this.onNodeDiscarded(w),onBeforeNodeDiscarded:w=>w.getAttribute&&w.getAttribute(hA)!==null?!0:!(w.parentElement!==null&&w.id&&$.isPhxUpdate(w.parentElement,l,[N9,"append","prepend"])||this.maybePendingRemove(w)||this.skipCIDSibling(w)),onElUpdated:w=>{$.isNowTriggerFormExternal(w,m)&&(C=w),_.push(w),this.maybeReOrderStream(w)},onBeforeElUpdated:(w,A)=>{if($.maybeAddPrivateHooks(A,h,u),$.cleanChildNodes(A,l),this.skipCIDSibling(A)||$.isPhxSticky(w))return!1;if($.isIgnored(w,l)||w.form&&w.form.isSameNode(C))return this.trackBefore("updated",w,A),$.mergeAttrs(w,A,{isIgnored:!0}),_.push(w),$.applyStickyOperations(w),!1;if(w.type==="number"&&w.validity&&w.validity.badInput)return!1;if(!$.syncPendingRef(w,A,d))return $.isUploadInput(w)&&(this.trackBefore("updated",w,A),_.push(w)),$.applyStickyOperations(w),!1;if($.isPhxChild(A)){let D=w.getAttribute(cl);return $.mergeAttrs(w,A,{exclude:[M1]}),D!==""&&w.setAttribute(cl,D),w.setAttribute(P1,this.rootID),$.applyStickyOperations(w),!1}return $.copyPrivates(A,w),o&&w.isSameNode(o)&&$.isFormInput(w)&&w.type!=="hidden"?(this.trackBefore("updated",w,A),$.mergeFocusedInput(w,A),$.syncAttrsToProps(w),_.push(w),$.applyStickyOperations(w),f.push(w),!1):($.isPhxUpdate(A,l,["append","prepend"])&&b.push(new Gj(w,A,A.getAttribute(l))),$.syncAttrsToProps(A),$.applyStickyOperations(A),A.getAttribute("name")&&$.isFormInput(A)&&f.push(A),this.trackBefore("updated",w,A),!0)}})}),e.isDebugEnabled()&&Hj(),b.length>0&&e.time("post-morph append/prepend restoration",()=>{b.forEach(w=>w.perform())}),f.forEach(w=>{$.maybeHideFeedback(r,w,c)}),e.silenceEvents(()=>$.restoreFocus(o,s,a)),$.dispatchEvent(document,"phx:update"),p.forEach(w=>this.trackAfter("added",w)),_.forEach(w=>this.trackAfter("updated",w)),this.transitionPendingRemoves(),C&&(e.unload(),C.submit()),!0}onNodeDiscarded(i){($.isPhxChild(i)||$.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if($.putSticky(i,A1,r=>r.setAttribute(A1,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=$.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(B9)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=$.findComponentNodeList(this.container,this.targetCID);return t.length===0&&$.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Rr)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=$.cloneNode(n);let[l,...c]=$.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Rr)!==this.targetCID.toString()&&(d.setAttribute(B9,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},RA=class{static extract(i){let{[yA]:e,[bA]:t,[SA]:n}=i;return delete i[yA],delete i[bA],delete i[SA],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Nr],i);return[e,t]}recursiveToString(i,e=i[Nr],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Nr]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Nr]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Nr][e]}mergeDiff(i){let e=i[Nr],t={};if(delete i[Nr],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Nr]=this.rendered[Nr]||{},e){let n=this.rendered[Nr];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Nr]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[ns];if(al(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[ns],o=this.cloneMerge(l,e),o[ns]=s}else o=e[ns]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[ns]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];N1(n)&&n[ns]===void 0&&N1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=me(me({},i),e);for(let n in t){let r=e[n],o=i[n];N1(r)&&r[ns]===void 0&&N1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Nr],i);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Nr][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[ns]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[M9])return this.comprehensionToBuffer(i,e,t);let{[ns]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r<n.length;r++)this.dynamicToBuffer(i[r-1],e,t),t.buffer+=n[r]}comprehensionToBuffer(i,e,t){let{[M9]:n,[ns]:r,[CA]:o}=i,[s,a,l,c]=o||[null,{},[],null];r=this.templateStatic(r,e);let d=e||i[Pj];for(let h=0;h<n.length;h++){let u=n[h];t.buffer+=r[0];for(let m=1;m<r.length;m++)this.dynamicToBuffer(u[m-1],d,t),t.buffer+=r[m]}o!==void 0&&(i[M9].length>0||l.length>0||c)&&(delete i[CA],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else N1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t){let n=i[e]||Ln(`no component for CID ${e}`,i),r=document.createElement("template"),[o,s]=this.recursiveToString(n,i,t);r.innerHTML=o;let a=r.content,l=t&&!t.has(e),[c,d]=Array.from(a.childNodes).reduce(([h,u],m,p)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Rr)?[h,!0]:(m.setAttribute(Rr,e),m.id||(m.id=`${this.parentViewId()}-${e}-${p}`),l&&(m.setAttribute(B9,""),m.innerHTML=""),[!0,u]):m.nodeValue.trim()!==""?(Ln(`only HTML element tags are allowed at the root of components.
|
|
|
|
got: "${m.nodeValue.trim()}"
|
|
|
|
within:
|
|
`,r.innerHTML.trim()),m.replaceWith(this.createSpan(m.nodeValue,e)),[!0,u]):(m.remove(),[h,u]),[!1,!1]);return!c&&!d?(Ln(`expected at least one HTML element tag inside a component, but the component is empty:
|
|
`,r.innerHTML.trim()),[this.createSpan("",e).outerHTML,s]):!c&&d?(Ln("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",r.innerHTML.trim()),[r.innerHTML,s]):[r.innerHTML,s]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Rr,e),t}},aV=1,D1=class{static makeID(){return aV++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,n=>n.dispatchUploads(e,t))}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Sg=null,lV={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?$.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,$.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:h,dispatcher:u,callback:m}=o,p={loading:d,value:h,target:l,page_loading:!!c},f=i==="change"&&u?u:n,_=l||f.getAttribute(t.binding("target"))||f;t.withinTargets(_,(b,C)=>{if(i==="change"){let{newCid:T,_target:w}=o;w=w||($.isFormInput(n)?n.name:void 0),w&&(p._target=w),b.pushInput(n,C,T,s||e,p,m)}else if(i==="submit"){let{submitter:T}=o;b.submitForm(n,C,s||e,T,p,m)}else b.pushEvent(i,n,C,s||e,a,p,m)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>mh.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>mh.focusFirstInteractive(r)||mh.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Sg=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Sg&&Sg.focus(),Sg=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,h,u]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let m=()=>{this.addOrRemoveClasses(t,h,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,u,h))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],d.concat(u)),$.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let m=()=>{this.addOrRemoveClasses(t,l,d.concat(h).concat(u));let p=n||this.defaultDisplay(t);$.putSticky(t,"toggle",f=>f.style.display=p),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),$.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let m=n||this.defaultDisplay(t);$.putSticky(t,"toggle",p=>p.style.display=m),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>this.addOrRemoveClasses(i,a.concat(s),[]),d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=$.getSticky(i,"classes",[[],[]]),h=e.filter(f=>c.indexOf(f)<0&&!i.classList.contains(f)),u=t.filter(f=>d.indexOf(f)<0&&i.classList.contains(f)),m=c.filter(f=>t.indexOf(f)<0).concat(h),p=d.filter(f=>e.indexOf(f)<0).concat(u);$.putSticky(i,"classes",f=>(f.classList.remove(...p),f.classList.add(...m),[m,p]))})},setOrRemoveAttrs(i,e,t){let[n,r]=$.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);$.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?$.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},vo=lV,Cg=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=Ho(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,h)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},UA=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}))}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(j9)}connectParams(i){let e=this.liveSocket.params(this.el),t=$.all(document,`[${this.binding(Cj)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(cl)}getStatic(){let i=this.el.getAttribute(M1);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};$.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(mA,I1,mg,pA,A9),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(I1)}}execAll(i){$.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(mA),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(al(i))$.findComponentNodeList(this.el,i).length===0?Ln(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Ln(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",xg(e)]);let{diff:n,reply:r,events:o,title:s}=RA.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>$.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=$.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,rs.dropLocal(this.liveSocket.localStorage,window.location.pathname,DA),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new RA(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],h)=>{this.pushFormRecovery(l,d,u=>{h===a.length-1&&this.onJoinComplete(u,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){$.all(document,`[${fc}="${this.id}"][${Jr}]`,i=>{i.removeAttribute(Jr),i.removeAttribute(fc)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);$.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(M1);return a&&o.setAttribute(M1,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=$.byId(this.id),this.el.setAttribute(P1,this.root.id)}execNewMounted(){let i=this.binding(PA),e=this.binding(FA);$.all(this.el,`[${i}], [${e}]`,t=>{$.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),$.all(this.el,`[${this.binding(k1)}], [data-phx-${k1}]`,t=>{this.maybeAddNewHook(t)}),$.all(this.el,`[${this.binding(_A)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new yg(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&$.isIgnored(i,this.binding(Ig));if(t&&!i.isEqualNode(e)&&!(n&&zj(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(_A)),t=e&&$.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),$.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{$.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=$.all(n,`[${Rr}]`),o=$.all(n,`[${this.binding(k1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);al(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){$.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(uh)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new UA(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{$.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):wA(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new yg(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}</${t}>`,o]})}componentPatch(i,e){if(wA(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new yg(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[D1.elementID(i)]}addHook(i){if(D1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${k1}`)||i.getAttribute(this.binding(k1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Ln(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new D1(this,i,t);return this.viewHooks[D1.elementID(n.el)]=n,n}else e!==null&&Ln(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[D1.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload")return this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.onRedirect({to:this.href});if(i.reason==="unauthorized"||i.reason==="stale")return this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.onRedirect({to:this.href});if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([I1,mg,A9]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(Rj)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([I1,mg,A9]):this.displayError([I1,mg,pA]))}displayError(i){this.isMain()&&$.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(uA))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,Mj).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:h,events:u})=>{r!==null&&this.undoRefs(r),this.update(d,u),c(h)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&$.all(document,`[${fc}="${this.id}"][${Jr}="${i}"]`,e=>{let t=e.getAttribute(pg);e.removeAttribute(Jr),e.removeAttribute(fc),e.getAttribute(L9)!==null&&(e.readOnly=!1,e.removeAttribute(L9)),t!==null&&(e.disabled=t==="true",e.removeAttribute(pg)),MA.forEach(o=>$.removeClass(e,o));let n=e.getAttribute(fg);n!==null&&(e.innerText=n,e.removeAttribute(fg));let r=$.private(e,Jr);if(r){let o=this.triggerBeforeUpdateHook(e,r);yg.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),$.deletePrivate(e,Jr)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(U9);return t.loading&&(i=i.concat($.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(Jr,n),o.setAttribute(fc,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(fg)||o.setAttribute(fg,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Rr);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(al(e))return e;let n=i.getAttribute(this.binding("target"));return al(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return al(i)?i:i?ll(i.closest(`[${Rr}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r<i.attributes.length;r++){e||(e={});let o=i.attributes[r].name;o.startsWith(n)&&(e[o.replace(n,"")]=i.getAttribute(o))}if(i.value!==void 0&&!(i instanceof HTMLFormElement)&&(e||(e={}),e.value=i.value,i.tagName==="INPUT"&&HA.indexOf(i.type)>=0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(Lj)),ref:i.getAttribute(gc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=al(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=Cg(i.form,me({_target:r._target},d),[i.name]):c=Cg(i.form,me({_target:r._target},d)),$.isUploadInput(i)&&i.files&&i.files.length>0&&An.trackFiles(i,Array.from(i.files)),s=An.serializeUploads(i);let h={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",h,u=>{if($.showError(i,this.liveSocket.binding(Eg)),$.isUploadInput(i)&&i.getAttribute("data-phx-auto-upload")!==null){if(An.filesAwaitingPreflight(i).length>0){let[m,p]=l();this.uploadFiles(i.form,e,m,a,f=>{o&&o(u),this.triggerAwaitingSubmit(i.form)})}}else o&&o(u)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(O1(d,`${this.binding(Ig)}=ignore`,d.form)||O1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(U9)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(pg,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(L9,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(pg,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(uA),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(An.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(An.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,h=>{let u=this.extractMeta(i),m=Cg(i,me({submitter:n},u));this.pushWithReply(d,"event",{type:"form",event:t,value:m,cid:a},o)})}else if(!(i.hasAttribute(Jr)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Cg(i,me({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=An.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new An(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(u=>u.toPreflightPayload()),h={ref:l.getAttribute(gc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",h]),this.pushWithReply(null,"allow_upload",h,u=>{if(this.log("upload",()=>["got preflight response",u]),u.error){this.undoRefs(t);let[m,p]=u.error;this.log("upload",()=>[`error for entry ${m}`,p])}else{let m=p=>{this.channel.onError(()=>{this.joinCount===o&&p()})};c.initAdapterUpload(u,m,this.liveSocket)}})})}dispatchUploads(i,e){let t=$.findUploadInputs(this.el).filter(n=>n.name===i);t.length===0?Ln(`no live file inputs found matching the name "${i}"`):t.length>1?Ln(`duplicate live file inputs found matching the name "${i}"`):$.dispatchEvent(t[0],OA,{detail:{files:e}})}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>$.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;let a=s.find(c=>c.type!=="hidden")||a[0],l=i.getAttribute(this.binding(gA))||i.getAttribute(this.binding("change"));vo.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=this.pushWithReply(r,"live_patch",{url:i},a=>{this.liveSocket.requestDOMUpdate(()=>{a.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});s?s.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,$.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(gA))!=="ignore").map(n=>{let r=t.content.querySelector(`form[id="${n.id}"][${e}="${n.getAttribute(e)}"]`);return r?[n,r,this.targetComponentID(r)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>$.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>$.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(ph);return i.getAttribute(uh)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){$.putPrivate(i,Tg,!0);let o=this.liveSocket.binding(Eg),s=Array.from(i.elements);s.forEach(a=>$.putPrivate(a,Tg,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>$.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},WA=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(`
|
|
a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:
|
|
|
|
import {Socket} from "phoenix"
|
|
import {LiveSocket} from "phoenix_live_view"
|
|
let liveSocket = new LiveSocket("/live", Socket, {...})
|
|
`);this.socket=new e(i,t),this.bindingPrefix=t.bindingPrefix||Dj,this.opts=t,this.params=O9(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(xg(Oj),t.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=xg(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Nj,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||vj,this.reloadJitterMin=t.reloadJitterMin||bj,this.reloadJitterMax=t.reloadJitterMax||yj,this.failsafeJitter=t.failsafeJitter||Sj,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:O9(),onBeforeElUpdated:O9()},t.dom||{}),this.transitions=new cV,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(R9)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(gg)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(gg)==="false"}enableDebug(){this.sessionStorage.setItem(gg,"true")}enableProfiling(){this.sessionStorage.setItem(R9,"true")}disableDebug(){this.sessionStorage.setItem(gg,"false")}disableProfiling(){this.sessionStorage.removeItem(R9)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(D9,i)}disableLatencySim(){this.sessionStorage.removeItem(D9)}getLatencySim(){let i=this.sessionStorage.getItem(D9);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>vo.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{vo.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();Bj(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=rs.updateLocal(this.localStorage,window.location.pathname,DA,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?qj[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return $.all(document,`${ph}:not([${uh}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(j9)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),rs.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=$.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{$.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(t),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||$.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(cl)!==null}newRootView(i,e,t){let n=new UA(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=ll(i.closest(ph),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(P1);return ll(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(P1));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(Aj)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);vo.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=ll(O1(e.target,this.binding(dA)),o=>o.getAttribute(this.binding(dA))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(An.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(OA,e=>{let t=e.target;if(!$.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);An.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):$.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=O1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&$.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(Jr)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{vo.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");$.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);vo.isVisible(n)&&vo.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!rs.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{rs.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=O1(e.target,I9),n=t&&t.getAttribute(I9);if(!n||!this.isConnected()||!this.main||$.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(wj);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${I9} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){$.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){$.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>$.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return rs.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(rs.pushState(e,{type:"patch",id:this.main.id},i),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return rs.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,()=>{rs.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),this.registerNewLocation(window.location),r()})})}replaceRootHistory(){rs.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=xg(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{$.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){$.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{vo.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:h,type:u}=$.private(o,"prev-iteration")||{};h===d-1&&t!==u||($.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,m=>{$.putPrivate(o,z9,!0),$.isTextualInput(o)||this.setActiveElement(o),vo.exec("change",l,m,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;$.resetForm(n,this.binding(Eg));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(Ij),o=this.binding(kj),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);$.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},cV=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var jA="livebook:";function _c(i){try{let e=localStorage.getItem(jA+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function fh(i,e){try{let t=JSON.stringify(e);localStorage.setItem(jA+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var VA="app_auth_token:";function KA(i,e){fh(VA+i,e)}function qA(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=_c(VA+e);if(t)return t}return null}var dV={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{KA(i,e),this.pushEvent("app_auth_persisted")})}},GA=dV;function We(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function di(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function ea(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function Zr(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}var iL=zi(QA()),nL=zi(ZA()),K9=zi(tL());function rL(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function vc(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function q9(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function gh(i){return i.offsetParent===null}function G9(i){return!gh(i)&&q9(i)}function oL(i,e,t){return Math.min(Math.max(i,e),t)}function sL(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let n=i.cloneNode();n.innerHTML="<br>",i.appendChild(n);let r=n.clientHeight;n.innerHTML="<br><br>";let o=n.clientHeight;return i.removeChild(n),o-r}else return t}function aL(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function dl(i){let{height:e}=i.getBoundingClientRect();e<window.innerHeight?i.scrollIntoView({behavior:"smooth",block:"center"}):i.scrollIntoView({behavior:"smooth",block:"start"})}function lL(i){return Math.abs(i.scrollHeight-i.clientHeight-i.scrollTop)<1}function F1(i){i.scrollTop=i.scrollHeight}function cL(i){return btoa(unescape(encodeURIComponent(i)))}function dL(i){return decodeURIComponent(escape(atob(i)))}function Dg(){return uL(24)}function hL(){return uL(40)}function uL(i){let e=new Uint8Array(i);crypto.getRandomValues(e);let t=String.fromCharCode(...e);return btoa(t)}function Mg(i){return(0,iL.default)(i).toString(K9.default)}function mL(i){return(0,nL.default)(i).toString(K9.default)}function Og(i){let e=document.querySelector('[rel="icon"]');e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=`/${i}.svg`}function _h(i,e){let t=i.querySelector(e);if(!t)throw new Error(`expected a child matching ${e}, but none was found`);return t}function ta(i){i.preventDefault(),i.stopPropagation()}var hV={"&":"&","<":"<",">":">",'"':""","'":"'"};function pL(i){return(i||"").replace(/[&<>"']/g,e=>hV[e])}function Pg(i){let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function vh(i){let e=atob(i),t=new Uint8Array(e.length),n=t.byteLength;for(let r=0;r<n;r++)t[r]=e.charCodeAt(r);return t.buffer}function Fg(){return document.body.hasAttribute("data-within-iframe")?";SameSite=None;Secure":";SameSite=Lax"}var $9=["bg-yellow-100","border-yellow-300"],uV={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.audioEl=this.el.querySelector("[data-preview]"),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.recordButton=this.el.querySelector("[data-btn-record]"),this.stopButton=this.el.querySelector("[data-btn-stop]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.mediaRecorder=null,this.handleEvent(`audio_input_change:${this.props.id}`,({audio_info:i})=>{i?this.updatePreview({data:this.decodeAudio(vh(i.data)),numChannels:i.num_channels,samplingRate:i.sampling_rate}):this.clearPreview()}),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...$9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...$9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...$9)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps()},getProps(){return{id:We(this.el,"data-id"),phxTarget:We(this.el,"data-phx-target",Zr),samplingRate:We(this.el,"data-sampling-rate",Zr),endianness:We(this.el,"data-endianness"),format:We(this.el,"data-format")}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=mV(t);this.pushAudio(n)})},updatePreview(i){let e=this.audioEl.src,t=pV(i);this.audioEl.src=URL.createObjectURL(t),e&&URL.revokeObjectURL(e)},clearPreview(){let i=this.audioEl.src;this.audioEl.src="",i&&URL.revokeObjectURL(i)},pushAudio(i){this.pushEventTo(this.props.phxTarget,"change",{data:Pg(this.encodeAudio(i)),num_channels:i.numChannels,sampling_rate:i.samplingRate})},encodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i.data);if(this.props.format==="wav")return fL(i.data,i.numChannels,i.samplingRate)},decodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i);if(this.props.format==="wav")return fV(i)},fixEndianness32(i){if(gV()===this.props.endianness)return i;for(let e=0;e<i.byteLength/4;e++){let t=i[e],n=i[e+1],r=i[e+2],o=i[e+3];i[e]=o,i[e+1]=r,i[e+2]=n,i[e+3]=t}return i}};function mV(i){let e=i.numberOfChannels,t=i.sampleRate,n=i.length,r=4*e*n,o=new ArrayBuffer(r),s=new Float32Array(o);for(let a=0;a<e;a++){let l=i.getChannelData(a);for(let c=0;c<l.length;c++)s[e*c+a]=l[c]}return{data:s.buffer,numChannels:e,samplingRate:t}}function pV({data:i,numChannels:e,samplingRate:t}){let n=fL(i,e,t);return new Blob([n],{type:"audio/wav"})}function fL(i,e,t){let r=new ArrayBuffer(44+i.byteLength),o=new DataView(r),s=i.byteLength/4,a=4,l=e*a,c=t*l,d=s*l,h=0;function u(b){o.setUint32(h,b,!1),h+=4}function m(b){o.setUint32(h,b,!0),h+=4}function p(b){o.setUint16(h,b,!0),h+=2}function f(b){o.setFloat32(h,b,!0),h+=4}u(1380533830),m(36+d),u(1463899717),u(1718449184),m(16),p(3),p(e),m(t),m(c),p(l),p(a*8),u(1684108385),m(d);let _=new Float32Array(i);for(let b=0;b<_.length;b++)f(_[b]);return r}function fV(i){let t=new ArrayBuffer(i.byteLength-44),n=new Float32Array(t),r=new DataView(i);for(let o=0;o<n.length;o++){let s=44+o*4;n[o]=r.getFloat32(s,!0)}return t}function gV(){let i=new ArrayBuffer(2),e=new Uint16Array(i),t=new Uint8Array(i);return e[0]=1,t[0]===1?"little":"big"}var gL=uV;var _L=11;function _V(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===_L||i.nodeType===_L)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Hg,vV="http://www.w3.org/1999/xhtml",or=typeof document=="undefined"?void 0:document,bV=!!or&&"content"in or.createElement("template"),yV=!!or&&or.createRange&&"createContextualFragment"in or.createRange();function SV(i){var e=or.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function CV(i){Hg||(Hg=or.createRange(),Hg.selectNode(or.body));var e=Hg.createContextualFragment(i);return e.childNodes[0]}function wV(i){var e=or.createElement("body");return e.innerHTML=i,e.childNodes[0]}function xV(i){return i=i.trim(),bV?SV(i):yV?CV(i):wV(i)}function Bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function EV(i,e){return!e||e===vV?or.createElement(i):or.createElementNS(e,i)}function TV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function Y9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var vL={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}Y9(i,e,"selected")},INPUT:function(i,e){Y9(i,e,"checked"),Y9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},H1=1,bL=11,yL=3,SL=8;function hl(){}function IV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function kV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=or.createElement("html"),n.innerHTML=o}else n=xV(n);else n.nodeType===bL&&(n=n.firstElementChild);var s=r.getNodeKey||IV,a=r.onBeforeNodeAdded||hl,l=r.onNodeAdded||hl,c=r.onBeforeElUpdated||hl,d=r.onElUpdated||hl,h=r.onBeforeNodeDiscarded||hl,u=r.onNodeDiscarded||hl,m=r.onBeforeElChildrenUpdated||hl,p=r.skipFromChildren||hl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===H1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===H1||Z.nodeType===bL)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function D(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&Bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):D(ee)}else D(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):vL.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,bi,Zt,Mt;e:for(;H;){for(Zt=H.nextSibling,X=s(H);!V&&U;){if(bi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=Zt,U=bi;continue e}Tt=s(U);var Ii=U.nodeType,Ot=void 0;if(Ii===H.nodeType&&(Ii===H1?(X?X!==Tt&&((Mt=b[X])?bi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&Bg(U,H),Ot&&q(U,H)):(Ii===yL||Ii==SL)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=Zt,U=bi;continue e}Tt?T(Tt):A(U,Z,!0),U=bi}if(X&&(Mt=b[X])&&Bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var Hn=a(H);Hn!==!1&&(Hn&&(H=Hn),H.actualize&&(H=H.actualize(Z.ownerDocument||or)),f(Z,H),D(H))}H=Zt,U=bi}j(Z,U,Tt);var Cr=vL[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===H1)Oe===H1?Bg(t,n)||(u(t),J=TV(t,EV(n.nodeName,n.namespaceURI))):J=n;else if(ke===yL||ke===SL){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe<et;Pe++){var B=b[C[Pe]];B&&A(B,B.parentNode,!1)}}return!_&&J!==t&&t.parentNode&&(J.actualize&&(J=J.actualize(t.ownerDocument||or)),t.parentNode.replaceChild(J,t)),J}}var AV=kV(_V),CL=AV;function X9(i){if(i)throw i}var UL=zi(Q9(),1),ry=zi(RL(),1);function B1(i){if(Object.prototype.toString.call(i)!=="[object Object]")return!1;let e=Object.getPrototypeOf(i);return e===null||e===Object.prototype}function DL(){let i=[],e={run:t,use:n};return e;function t(...r){let o=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...r);function a(l,...c){let d=i[++o],h=-1;if(l){s(l);return}for(;++h<r.length;)(c[h]===null||c[h]===void 0)&&(c[h]=r[h]);r=c,d?LV(d,a)(...c):s(null,...c)}}function n(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return i.push(r),e}}function LV(i,e){let t;return n;function n(...s){let a=i.length>s.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}var FL=zi(Q9(),1);var Un=class extends Error{constructor(e,t,n){let r=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(n=t,t=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?r[1]=n:(r[0]=n.slice(0,s),r[1]=n.slice(s+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=YE(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack=typeof e=="object"?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=r[0],this.ruleId=r[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};Un.prototype.file="";Un.prototype.name="";Un.prototype.reason="";Un.prototype.message="";Un.prototype.stack="";Un.prototype.fatal=null;Un.prototype.column=null;Un.prototype.line=null;Un.prototype.source=null;Un.prototype.ruleId=null;Un.prototype.position=null;var bo={basename:NV,dirname:RV,extname:DV,join:MV,sep:"/"};function NV(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');z1(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.charCodeAt(r)===e.charCodeAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function RV(i){if(z1(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.charCodeAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.charCodeAt(0)===47?"/":".":e===1&&i.charCodeAt(0)===47?"//":i.slice(0,e)}function DV(i){z1(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.charCodeAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function MV(...i){let e=-1,t;for(;++e<i.length;)z1(i[e]),i[e]&&(t=t===void 0?i[e]:t+"/"+i[e]);return t===void 0?".":OV(t)}function OV(i){z1(i);let e=i.charCodeAt(0)===47,t=PV(i,!e);return t.length===0&&!e&&(t="."),t.length>0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function PV(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s<i.length)a=i.charCodeAt(s);else{if(a===47)break;a=47}if(a===47){if(!(r===s-1||o===1))if(r!==s-1&&o===2){if(t.length<2||n!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function z1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var ML={cwd:FV};function FV(){return"/"}function bh(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function OL(i){if(typeof i=="string")i=new URL(i);else if(!bh(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return HV(i)}function HV(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t<e.length;)if(e.charCodeAt(t)===37&&e.charCodeAt(t+1)===50){let n=e.charCodeAt(t+2);if(n===70||n===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}var J9=["history","path","basename","stem","extname","dirname"],U1=class{constructor(e){let t;e?typeof e=="string"||(0,FL.default)(e)?t={value:e}:bh(e)?t={path:e}:t=e:t={},this.data={},this.messages=[],this.history=[],this.cwd=ML.cwd(),this.value,this.stored,this.result,this.map;let n=-1;for(;++n<J9.length;){let o=J9[n];o in t&&t[o]!==void 0&&(this[o]=o==="history"?[...t[o]]:t[o])}let r;for(r in t)J9.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){bh(e)&&(e=OL(e)),ey(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return typeof this.path=="string"?bo.dirname(this.path):void 0}set dirname(e){PL(this.basename,"dirname"),this.path=bo.join(e||"",this.basename)}get basename(){return typeof this.path=="string"?bo.basename(this.path):void 0}set basename(e){ey(e,"basename"),Z9(e,"basename"),this.path=bo.join(this.dirname||"",e)}get extname(){return typeof this.path=="string"?bo.extname(this.path):void 0}set extname(e){if(Z9(e,"extname"),PL(this.dirname,"extname"),e){if(e.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bo.join(this.dirname,this.stem+(e||""))}get stem(){return typeof this.path=="string"?bo.basename(this.path,this.extname):void 0}set stem(e){ey(e,"stem"),Z9(e,"stem"),this.path=bo.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){let r=new Un(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}};function Z9(i,e){if(i&&i.includes(bo.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+bo.sep+"`")}function ey(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function PL(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}var Ug=jL().freeze(),WL={}.hasOwnProperty;function jL(){let i=DL(),e=[],t={},n,r=-1;return o.data=s,o.Parser=void 0,o.Compiler=void 0,o.freeze=a,o.attachers=e,o.use=l,o.parse=c,o.stringify=d,o.run=h,o.runSync=u,o.process=m,o.processSync=p,o;function o(){let f=jL(),_=-1;for(;++_<e.length;)f.use(...e[_]);return f.data((0,ry.default)(!0,{},t)),f}function s(f,_){return typeof f=="string"?arguments.length===2?(ny("data",n),t[f]=_,o):WL.call(t,f)&&t[f]||null:f?(ny("data",n),t=f,o):t}function a(){if(n)return o;for(;++r<e.length;){let[f,..._]=e[r];if(_[0]===!1)continue;_[0]===!0&&(_[0]=void 0);let b=f.call(o,..._);typeof b=="function"&&i.use(b)}return n=!0,r=Number.POSITIVE_INFINITY,o}function l(f,..._){let b;if(ny("use",n),f!=null)if(typeof f=="function")A(f,..._);else if(typeof f=="object")Array.isArray(f)?w(f):T(f);else throw new TypeError("Expected usable value, not `"+f+"`");return b&&(t.settings=Object.assign(t.settings||{},b)),o;function C(O){if(typeof O=="function")A(O);else if(typeof O=="object")if(Array.isArray(O)){let[D,...j]=O;A(D,...j)}else T(O);else throw new TypeError("Expected usable value, not `"+O+"`")}function T(O){w(O.plugins),O.settings&&(b=Object.assign(b||{},O.settings))}function w(O){let D=-1;if(O!=null)if(Array.isArray(O))for(;++D<O.length;){let j=O[D];C(j)}else throw new TypeError("Expected a list of plugins, not `"+O+"`")}function A(O,D){let j=-1,q;for(;++j<e.length;)if(e[j][0]===O){q=e[j];break}q?(B1(q[1])&&B1(D)&&(D=(0,ry.default)(!0,q[1],D)),q[1]=D):e.push([...arguments])}}function c(f){o.freeze();let _=W1(f),b=o.Parser;return ty("parse",b),HL(b,"parse")?new b(String(_),_).parse():b(String(_),_)}function d(f,_){o.freeze();let b=W1(_),C=o.Compiler;return iy("stringify",C),BL(f),HL(C,"compile")?new C(f,b).compile():C(f,b)}function h(f,_,b){if(BL(f),o.freeze(),!b&&typeof _=="function"&&(b=_,_=void 0),!b)return new Promise(C);C(null,b);function C(T,w){i.run(f,W1(_),A);function A(O,D,j){D=D||f,O?w(O):T?T(D):b(null,D,j)}}}function u(f,_){let b,C;return o.run(f,_,T),zL("runSync","run",C),b;function T(w,A){X9(w),b=A,C=!0}}function m(f,_){if(o.freeze(),ty("process",o.Parser),iy("process",o.Compiler),!_)return new Promise(b);b(null,_);function b(C,T){let w=W1(f);o.run(o.parse(w),w,(O,D,j)=>{if(O||!D||!j)A(O);else{let q=o.stringify(D,j);q==null||(UV(q)?j.value=q:j.result=q),A(O,j)}});function A(O,D){O||!D?T(O):C?C(D):_(null,D)}}}function p(f){let _;o.freeze(),ty("processSync",o.Parser),iy("processSync",o.Compiler);let b=W1(f);return o.process(b,C),zL("processSync","process",_),b;function C(T){_=!0,X9(T)}}}function HL(i,e){return typeof i=="function"&&i.prototype&&(BV(i.prototype)||e in i.prototype)}function BV(i){let e;for(e in i)if(WL.call(i,e))return!0;return!1}function ty(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function iy(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function ny(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function BL(i){if(!B1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function zL(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function W1(i){return zV(i)?i:new U1(i)}function zV(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function UV(i){return typeof i=="string"||(0,UL.default)(i)}function Wg(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return tT(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var WV={tokenize:qV,partial:!0},KL={tokenize:GV,partial:!0},qL={tokenize:$V,partial:!0},yh={tokenize:XV,partial:!0},GL={tokenize:YV,partial:!0},$L={tokenize:VV,previous:QL},YL={tokenize:KV,previous:ay},ia={tokenize:jV,previous:JL},os={},oy={text:os},bc=48;for(;bc<123;)os[bc]=ia,bc++,bc===58?bc=65:bc===91&&(bc=97);os[43]=ia;os[45]=ia;os[46]=ia;os[95]=ia;os[72]=[ia,YL];os[104]=[ia,YL];os[87]=[ia,$L];os[119]=[ia,$L];function jV(i,e,t){let n=this,r,o;return s;function s(m){return!VL(m)||!JL(n.previous)||ly(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(m))}function a(m){return VL(m)?(i.consume(m),a):m===64?(i.consume(m),l):t(m)}function l(m){return m===46?i.check(yh,u,c)(m):m===45||m===95?i.check(yh,t,d)(m):Fd(m)?(!o&&QE(m)&&(o=!0),i.consume(m),l):u(m)}function c(m){return i.consume(m),r=!0,o=void 0,l}function d(m){return i.consume(m),h}function h(m){return m===46?i.check(yh,t,c)(m):l(m)}function u(m){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(m)):t(m)}}function VV(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!QL(n.previous)||ly(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(WV,i.attempt(KL,i.attempt(qL,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function KV(i,e,t){let n=this;return r;function r(p){return p!==72&&p!==104||!ay(n.previous)||ly(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(p),o)}function o(p){return p===84||p===116?(i.consume(p),s):t(p)}function s(p){return p===84||p===116?(i.consume(p),a):t(p)}function a(p){return p===80||p===112?(i.consume(p),l):t(p)}function l(p){return p===83||p===115?(i.consume(p),c):c(p)}function c(p){return p===58?(i.consume(p),d):t(p)}function d(p){return p===47?(i.consume(p),h):t(p)}function h(p){return p===47?(i.consume(p),u):t(p)}function u(p){return p===null||T2(p)||qu(p)||Gu(p)?t(p):i.attempt(KL,i.attempt(qL,m),t)(p)}function m(p){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(p)}}function qV(i,e,t){return n;function n(l){return i.consume(l),r}function r(l){return l===87||l===119?(i.consume(l),o):t(l)}function o(l){return l===87||l===119?(i.consume(l),s):t(l)}function s(l){return l===46?(i.consume(l),a):t(l)}function a(l){return l===null||yi(l)?t(l):e(l)}}function GV(i,e,t){let n,r;return o;function o(l){return l===38?i.check(GL,a,s)(l):l===46||l===95?i.check(yh,a,s)(l):l===null||T2(l)||qu(l)||l!==45&&Gu(l)?a(l):(i.consume(l),o)}function s(l){return l===46?(r=n,n=void 0,i.consume(l),o):(l===95&&(n=!0),i.consume(l),o)}function a(l){return!r&&!n?e(l):t(l)}}function $V(i,e){let t=0;return n;function n(s){return s===38?i.check(GL,e,r)(s):(s===40&&t++,s===41?i.check(yh,o,r)(s):sy(s)?e(s):XL(s)?i.check(yh,e,r)(s):(i.consume(s),n))}function r(s){return i.consume(s),n}function o(s){return t--,t<0?e(s):r(s)}}function YV(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return E2(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return sy(s)?e(s):t(s)}}function XV(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return XL(o)?(i.consume(o),r):sy(o)?e(o):t(o)}}function XL(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===95||i===126}function sy(i){return i===null||i===60||Ur(i)}function VL(i){return i===43||i===45||i===46||i===95||Fd(i)}function QL(i){return i===null||i===40||i===42||i===95||i===126||Ur(i)}function ay(i){return i===null||!E2(i)}function JL(i){return i!==47&&ay(i)}function ly(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var QV={'"':"quot","&":"amp","<":"lt",">":"gt"};function ZL(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+QV[t]+";"}}function jg(i,e){let t=ZL(JV(i||""));if(!e)return t;let n=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),s=t.indexOf("/");return n<0||s>-1&&n>s||r>-1&&n>r||o>-1&&n>o||e.test(t.slice(0,n))?t:""}function JV(i){let e=[],t=-1,n=0,r=0;for(;++t<i.length;){let o=i.charCodeAt(t),s="";if(o===37&&Fd(i.charCodeAt(t+1))&&Fd(i.charCodeAt(t+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}var ZV={tokenize:sK,partial:!0};function cy(){return{document:{91:{tokenize:nK,continuation:{tokenize:rK},exit:oK}},text:{91:{tokenize:iK},93:{add:"after",tokenize:eK,resolveTo:tK}}}}function eK(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Ql(n.sliceSerialize({start:s.end,end:n.now()}));return c.charCodeAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function tK(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function iK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){let m;return u===null||u===91||o++>999?t(u):u===93?s?(i.exit("chunkString"),m=i.exit("gfmFootnoteCallString"),r.includes(Ql(n.sliceSerialize(m)))?h(u):t(u)):t(u):(i.consume(u),Ur(u)||(s=!0),u===92?d:c)}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}function h(u){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function nK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(f){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(f){return f===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(f)}function d(f){let _;return f===null||f===91||s>999?t(f):f===93?a?(_=i.exit("gfmFootnoteDefinitionLabelString"),o=Ql(n.sliceSerialize(_)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),m):t(f):yi(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",h(f))}function h(f){return f===null||yi(f)||f===91||f===93||s>999?(i.exit("chunkString"),d(f)):(Ur(f)||(a=!0),s++,i.consume(f),f===92?u:h)}function u(f){return f===91||f===92||f===93?(i.consume(f),s++,h):h(f)}function m(f){return f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),Xn(i,p,"gfmFootnoteDefinitionWhitespace")):t(f)}function p(f){return r.includes(o)||r.push(o),e(f)}}function rK(i,e,t){return i.check(ZE,e,i.attempt(ZV,e,t))}function oK(i){i.exit("gfmFootnoteDefinition")}function sK(i,e,t){let n=this;return Xn(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function dy(i={}){let e=i.singleTilde,t={tokenize:r,resolveAll:n};return e==null&&(e=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function n(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let l=a;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[a][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[a][1].end)},d={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",d,s]];Jp(h,h.length,0,JE(s.parser.constructs.insideSpan.null,o.slice(l+1,a),s)),Jp(h,h.length,0,[["exit",d,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",c,s]]),Jp(o,l-1,a-l+3,h),a=l+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function r(o,s,a){let l=this.previous,c=this.events,d=0;return h;function h(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?a(m):(o.enter("strikethroughSequenceTemporary"),u(m))}function u(m){let p=I2(l);if(m===126)return d>1?a(m):(o.consume(m),d++,u);if(d<2&&!e)return a(m);let f=o.exit("strikethroughSequenceTemporary"),_=I2(m);return f._open=!_||_===2&&!!p,f._close=!p||p===2&&!!_,s(m)}}}var hy={flow:{null:{tokenize:lK,resolve:aK}}},eN={tokenize:cK,partial:!0};function aK(i,e){let t=-1,n,r,o,s,a,l,c;for(;++t<i.length;){let d=i[t][1];if(o&&(d.type==="temporaryTableCellContent"&&(s=s||t,a=t),(d.type==="tableCellDivider"||d.type==="tableRow")&&a)){let h={type:"tableContent",start:i[s][1].start,end:i[a][1].end},u={type:"chunkText",start:h.start,end:h.end,contentType:"text"};i.splice(s,a-s+1,["enter",h,e],["enter",u,e],["exit",u,e],["exit",h,e]),t-=a-s-3,s=void 0,a=void 0}if(i[t][0]==="exit"&&l!==void 0&&l+(c?0:1)<t&&(d.type==="tableCellDivider"||d.type==="tableRow"&&(l+3<t||i[l][1].type!=="whitespace"))){let h={type:r?"tableDelimiter":n?"tableHeader":"tableData",start:i[l][1].start,end:i[t][1].end};i.splice(t+(d.type==="tableCellDivider"?1:0),0,["exit",h,e]),i.splice(l,0,["enter",h,e]),t+=2,l=t+1,c=!0}d.type==="tableRow"&&(o=i[t][0]==="enter",o&&(l=t+1,c=!1)),d.type==="tableDelimiterRow"&&(r=i[t][0]==="enter",r&&(l=t+1,c=!1)),d.type==="tableHead"&&(n=i[t][0]==="enter")}return i}function lK(i,e,t){let n=this,r=[],o=0,s,a;return l;function l(B){return i.enter("table")._align=r,i.enter("tableHead"),i.enter("tableRow"),B===124?c(B):(o++,i.enter("temporaryTableCellContent"),u(B))}function c(B){return i.enter("tableCellDivider"),i.consume(B),i.exit("tableCellDivider"),s=!0,d}function d(B){return B===null||yi(B)?p(B):qa(B)?(i.enter("whitespace"),i.consume(B),h):(s&&(s=void 0,o++),B===124?c(B):(i.enter("temporaryTableCellContent"),u(B)))}function h(B){return qa(B)?(i.consume(B),h):(i.exit("whitespace"),d(B))}function u(B){return B===null||B===124||Ur(B)?(i.exit("temporaryTableCellContent"),d(B)):(i.consume(B),B===92?m:u)}function m(B){return B===92||B===124?(i.consume(B),u):u(B)}function p(B){if(B===null)return t(B);i.exit("tableRow"),i.exit("tableHead");let Z=n.interrupt;return n.interrupt=!0,i.attempt({tokenize:et,partial:!0},function(ee){return n.interrupt=Z,i.enter("tableDelimiterRow"),f(ee)},function(ee){return n.interrupt=Z,t(ee)})(B)}function f(B){return B===null||yi(B)?w(B):qa(B)?(i.enter("whitespace"),i.consume(B),_):B===45?(i.enter("tableDelimiterFiller"),i.consume(B),a=!0,r.push("none"),b):B===58?(i.enter("tableDelimiterAlignment"),i.consume(B),i.exit("tableDelimiterAlignment"),r.push("left"),C):B===124?(i.enter("tableCellDivider"),i.consume(B),i.exit("tableCellDivider"),f):t(B)}function _(B){return qa(B)?(i.consume(B),_):(i.exit("whitespace"),f(B))}function b(B){return B===45?(i.consume(B),b):(i.exit("tableDelimiterFiller"),B===58?(i.enter("tableDelimiterAlignment"),i.consume(B),i.exit("tableDelimiterAlignment"),r[r.length-1]=r[r.length-1]==="left"?"center":"right",T):f(B))}function C(B){return B===45?(i.enter("tableDelimiterFiller"),i.consume(B),a=!0,b):t(B)}function T(B){return B===null||yi(B)?w(B):qa(B)?(i.enter("whitespace"),i.consume(B),_):B===124?(i.enter("tableCellDivider"),i.consume(B),i.exit("tableCellDivider"),f):t(B)}function w(B){return i.exit("tableDelimiterRow"),!a||o!==r.length?t(B):B===null?A(B):i.check(eN,A,i.attempt({tokenize:et,partial:!0},Xn(i,O,"linePrefix",4),A))(B)}function A(B){return i.exit("table"),e(B)}function O(B){return i.enter("tableBody"),D(B)}function D(B){return i.enter("tableRow"),B===124?j(B):(i.enter("temporaryTableCellContent"),J(B))}function j(B){return i.enter("tableCellDivider"),i.consume(B),i.exit("tableCellDivider"),q}function q(B){return B===null||yi(B)?Oe(B):qa(B)?(i.enter("whitespace"),i.consume(B),_e):B===124?j(B):(i.enter("temporaryTableCellContent"),J(B))}function _e(B){return qa(B)?(i.consume(B),_e):(i.exit("whitespace"),q(B))}function J(B){return B===null||B===124||Ur(B)?(i.exit("temporaryTableCellContent"),q(B)):(i.consume(B),B===92?ke:J)}function ke(B){return B===92||B===124?(i.consume(B),J):J(B)}function Oe(B){return i.exit("tableRow"),B===null?Pe(B):i.check(eN,Pe,i.attempt({tokenize:et,partial:!0},Xn(i,D,"linePrefix",4),Pe))(B)}function Pe(B){return i.exit("tableBody"),A(B)}function et(B,Z,ee){return V;function V(U){return B.enter("lineEnding"),B.consume(U),B.exit("lineEnding"),Xn(B,H,"linePrefix")}function H(U){if(n.parser.lazy[n.now().line]||U===null||yi(U))return ee(U);let X=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&X&&X[1].type==="linePrefix"&&X[2].sliceSerialize(X[1],!0).length>=4?ee(U):(n._gfmTableDynamicInterruptHack=!0,B.check(n.parser.constructs.flow,function(Tt){return n._gfmTableDynamicInterruptHack=!1,ee(Tt)},function(Tt){return n._gfmTableDynamicInterruptHack=!1,Z(Tt)})(U))}}}function cK(i,e,t){let n=0;return r;function r(s){return i.enter("check"),i.consume(s),o}function o(s){return s===-1||s===32?(i.consume(s),n++,n===4?e:o):s===null||Ur(s)?e(s):t(s)}}var dK={tokenize:hK},uy={text:{91:dK}};function hK(i,e,t){let n=this;return r;function r(a){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(a):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),o)}function o(a){return Ur(a)?(i.enter("taskListCheckValueUnchecked"),i.consume(a),i.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(i.enter("taskListCheckValueChecked"),i.consume(a),i.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),i.check({tokenize:uK},e,t)):t(a)}}function uK(i,e,t){let n=this;return Xn(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||yi(o))&&o!==null?e(o):t(o)}}function tN(i){return XE([oy,cy(),dy(i),hy,uy])}function Sh(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}function my(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var un=function(i){if(i==null)return gK;if(typeof i=="string")return fK(i);if(typeof i=="object")return Array.isArray(i)?mK(i):pK(i);if(typeof i=="function")return Vg(i);throw new Error("Expected function, string, or object as test")};function mK(i){let e=[],t=-1;for(;++t<i.length;)e[t]=un(i[t]);return Vg(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].call(this,...r))return!0;return!1}}function pK(i){return Vg(e);function e(t){let n;for(n in i)if(t[n]!==i[n])return!1;return!0}}function fK(i){return Vg(e);function e(t){return t&&t.type===i}}function Vg(i){return e;function e(...t){return!!i.call(this,...t)}}function gK(){return!0}var iN=!0,nN="skip",py=!1,Kg=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null);var r=un(e),o=n?-1:1;s(i,null,[])();function s(a,l,c){var d=typeof a=="object"&&a!==null?a:{},h;return typeof d.type=="string"&&(h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0,Object.defineProperty(u,"name",{value:"node ("+(d.type+(h?"<"+h+">":""))+")"})),u;function u(){var m=[],p,f,_;if((!e||r(a,l,c[c.length-1]||null))&&(m=_K(t(a,c)),m[0]===py))return m;if(a.children&&m[0]!==nN)for(f=(n?a.children.length:-1)+o,_=c.concat(a);f>-1&&f<a.children.length;){if(p=s(a.children[f],f,_)(),p[0]===py)return p;f=typeof p[1]=="number"?p[1]:f+o}return m}}};function _K(i){return Array.isArray(i)?i:typeof i=="number"?[iN,i]:[i]}var vK={}.hasOwnProperty,sN=function(i,e,t,n){let r,o;typeof e=="string"||e instanceof RegExp?(o=[[e,t]],r=n):(o=e,r=t),r||(r={});let s=un(r.ignore||[]),a=bK(o),l=-1;for(;++l<a.length;)Kg(i,"text",c);return i;function c(h,u){let m=-1,p;for(;++m<u.length;){let f=u[m];if(s(f,p?p.children.indexOf(f):void 0,p))return;p=f}if(p)return d(h,p)}function d(h,u){let m=a[l][0],p=a[l][1],f=0,_=u.children.indexOf(h),b=[],C;m.lastIndex=0;let T=m.exec(h.value);for(;T;){C=T.index;let w=p(...T,{index:T.index,input:T.input});if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w!==!1&&(f!==C&&b.push({type:"text",value:h.value.slice(f,C)}),Array.isArray(w)?b.push(...w):w&&b.push(w),f=C+T[0].length),!m.global)break;T=m.exec(h.value)}return C===void 0?(b=[h],_--):(f<h.value.length&&b.push({type:"text",value:h.value.slice(f)}),u.children.splice(_,1,...b)),_+b.length+1}};function bK(i){let e=[];if(typeof i!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(i)){let t=-1;for(;++t<i.length;)e.push([rN(i[t][0]),oN(i[t][1])])}else{let t;for(t in i)vK.call(i,t)&&e.push([rN(t),oN(i[t])])}return e}function rN(i){return typeof i=="string"?new RegExp(my(i),"g"):i}function oN(i){return typeof i=="function"?i:()=>i}var fy="phrasing",gy=["autolink","link","image","label"],aN={transforms:[EK],enter:{literalAutolink:yK,literalAutolinkEmail:_y,literalAutolinkHttp:_y,literalAutolinkWww:_y},exit:{literalAutolink:xK,literalAutolinkEmail:wK,literalAutolinkHttp:SK,literalAutolinkWww:CK}},lN={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:gy}]};function yK(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function _y(i){this.config.enter.autolinkProtocol.call(this,i)}function SK(i){this.config.exit.autolinkProtocol.call(this,i)}function CK(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function wK(i){this.config.exit.autolinkEmail.call(this,i)}function xK(i){this.exit(i)}function EK(i){sN(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TK],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,IK]],{ignore:["link","linkReference"]})}function TK(i,e,t,n,r){let o="";if(!cN(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!kK(t)))return!1;let s=AK(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function IK(i,e,t,n){return!cN(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function kK(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function AK(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i),t,n,r,o;if(e)for(i=i.slice(0,e.index),o=e[0],t=o.indexOf(")"),n=Sh(i,"("),r=Sh(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function cN(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||qu(t)||Gu(t))&&(!e||t!==47)}function vy(i){return i.label||!i.identifier?i.label||"":eT(i.identifier)}function Nn(i){let e=i||{},t=e.now||{},n=e.lineShift||0,r=t.line||1,o=t.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:r,column:o},lineShift:n}}function a(c){n+=c}function l(c=""){let d=c.split(/\r?\n|\r/g),h=d[d.length-1];return r+=d.length-1,o=d.length===1?o+h.length:1+h.length+n,c}}function qg(i,e,t){let n=e.indexStack,r=i.children||[],o=Nn(t),s=[],a=-1;for(n.push(-1);++a<r.length;){let c=r[a];n[n.length-1]=a,s.push(o.move(e.handle(c,i,e,me({before:`
|
|
`,after:`
|
|
`},o.current())))),c.type!=="list"&&(e.bulletLastUsed=void 0),a<r.length-1&&s.push(o.move(l(c,r[a+1])))}return n.pop(),s.join("");function l(c,d){let h=e.join.length;for(;h--;){let u=e.join[h](c,d,i,e);if(u===!0||u===1)break;if(typeof u=="number")return`
|
|
`.repeat(1+u);if(u===!1)return`
|
|
|
|
<!---->
|
|
|
|
`}return`
|
|
|
|
`}}var LK=/\r?\n|\r/g;function Gg(i,e){let t=[],n=0,r=0,o;for(;o=LK.exec(i);)s(i.slice(n,o.index)),t.push(o[0]),n=o.index+o[0].length,r++;return s(i.slice(n)),t.join("");function s(a){t.push(e(a,r,!a))}}function $g(i){if(!i._compiled){let e=(i.atBreak?"[\\r\\n][\\t ]*":"")+(i.before?"(?:"+i.before+")":"");i._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(i.character)?"\\":"")+i.character+(i.after?"(?:"+i.after+")":""),"g")}return i._compiled}function hN(i,e){return dN(i,e.inConstruct,!0)&&!dN(i,e.notInConstruct,!1)}function dN(i,e,t){if(!e)return t;typeof e=="string"&&(e=[e]);let n=-1;for(;++n<e.length;)if(i.includes(e[n]))return!0;return!1}function j1(i,e,t){let n=(t.before||"")+(e||"")+(t.after||""),r=[],o=[],s={},a=-1;for(;++a<i.unsafe.length;){let d=i.unsafe[a];if(!hN(i.stack,d))continue;let h=$g(d),u;for(;u=h.exec(n);){let m="before"in d||!!d.atBreak,p="after"in d,f=u.index+(m?u[1].length:0);r.includes(f)?(s[f].before&&!m&&(s[f].before=!1),s[f].after&&!p&&(s[f].after=!1)):(r.push(f),s[f]={before:m,after:p})}}r.sort(NK);let l=t.before?t.before.length:0,c=n.length-(t.after?t.after.length:0);for(a=-1;++a<r.length;){let d=r[a];d<l||d>=c||d+1<c&&r[a+1]===d+1&&s[d].after&&!s[d+1].before&&!s[d+1].after||r[a-1]===d-1&&s[d].before&&!s[d-1].before&&!s[d-1].after||(l!==d&&o.push(uN(n.slice(l,d),"\\")),l=d,/[!-/:-@[-`{-~]/.test(n.charAt(d))&&(!t.encode||!t.encode.includes(n.charAt(d)))?o.push("\\"):(o.push("&#x"+n.charCodeAt(d).toString(16).toUpperCase()+";"),l++))}return o.push(uN(n.slice(l,c),t.after)),o.join("")}function NK(i,e){return i-e}function uN(i,e){let t=/\\(?=[!-/:-@[-`{-~])/g,n=[],r=[],o=i+e,s=-1,a=0,l;for(;l=t.exec(o);)n.push(l.index);for(;++s<n.length;)a!==n[s]&&r.push(i.slice(a,n[s])),r.push("\\"),a=n[s];return r.push(i.slice(a)),r.join("")}function mN(){return{enter:{gfmFootnoteDefinition:i,gfmFootnoteDefinitionLabelString:e,gfmFootnoteCall:r,gfmFootnoteCallString:o},exit:{gfmFootnoteDefinition:n,gfmFootnoteDefinitionLabelString:t,gfmFootnoteCall:a,gfmFootnoteCallString:s}};function i(l){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},l)}function e(){this.buffer()}function t(l){let c=this.resume(),d=this.stack[this.stack.length-1];d.label=c,d.identifier=Ql(this.sliceSerialize(l)).toLowerCase()}function n(l){this.exit(l)}function r(l){this.enter({type:"footnoteReference",identifier:"",label:""},l)}function o(){this.buffer()}function s(l){let c=this.resume(),d=this.stack[this.stack.length-1];d.label=c,d.identifier=Ql(this.sliceSerialize(l)).toLowerCase()}function a(l){this.exit(l)}}function pN(){return i.peek=e,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:t,footnoteReference:i}};function i(n,r,o,s){let a=Nn(s),l=a.move("[^"),c=o.enter("footnoteReference"),d=o.enter("reference");return l+=a.move(j1(o,vy(n),Xe(me({},a.current()),{before:l,after:"]"}))),d(),c(),l+=a.move("]"),l}function e(){return"["}function t(n,r,o,s){let a=Nn(s),l=a.move("[^"),c=o.enter("footnoteDefinition"),d=o.enter("label");return l+=a.move(j1(o,vy(n),Xe(me({},a.current()),{before:l,after:"]"}))),d(),l+=a.move("]:"+(n.children&&n.children.length>0?" ":"")),a.shift(4),l+=a.move(Gg(qg(n,o,a.current()),h)),c(),l;function h(u,m,p){return m?(p?"":" ")+u:u}}}function Yg(i,e,t){let n=e.indexStack,r=i.children||[],o=[],s=-1,a=t.before;n.push(-1);let l=Nn(t);for(;++s<r.length;){let c=r[s],d;if(n[n.length-1]=s,s+1<r.length){let h=e.handle.handlers[r[s+1].type];h&&h.peek&&(h=h.peek),d=h?h(r[s+1],i,e,me({before:"",after:""},l.current())).charAt(0):""}else d=t.after;o.length>0&&(a==="\r"||a===`
|
|
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=Nn(t),l.move(o.join(""))),o.push(l.move(e.handle(c,i,e,Xe(me({},l.current()),{before:a,after:d})))),a=o[o.length-1].slice(-1)}return n.pop(),o.join("")}var fN={canContainEols:["delete"],enter:{strikethrough:RK},exit:{strikethrough:DK}},gN={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:_N}};_N.peek=MK;function RK(i){this.enter({type:"delete",children:[]},i)}function DK(i){this.exit(i)}function _N(i,e,t,n){let r=Nn(n),o=t.enter("emphasis"),s=r.move("~~");return s+=Yg(i,t,Xe(me({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function MK(){return"~"}by.peek=OK;function by(i,e,t){let n=i.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<t.unsafe.length;){let s=t.unsafe[o],a=$g(s),l;if(s.atBreak)for(;l=a.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return r+n+r}function OK(){return"`"}function bN(i,e={}){let t=(e.align||[]).concat(),n=e.stringLength||FK,r=[],o=[],s=[],a=[],l=0,c=-1;for(;++c<i.length;){let p=[],f=[],_=-1;for(i[c].length>l&&(l=i[c].length);++_<i[c].length;){let b=PK(i[c][_]);if(e.alignDelimiters!==!1){let C=n(b);f[_]=C,(a[_]===void 0||C>a[_])&&(a[_]=C)}p.push(b)}o[c]=p,s[c]=f}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<l;)r[d]=vN(t[d]);else{let p=vN(t);for(;++d<l;)r[d]=p}d=-1;let h=[],u=[];for(;++d<l;){let p=r[d],f="",_="";p===99?(f=":",_=":"):p===108?f=":":p===114&&(_=":");let b=e.alignDelimiters===!1?1:Math.max(1,a[d]-f.length-_.length),C=f+"-".repeat(b)+_;e.alignDelimiters!==!1&&(b=f.length+b+_.length,b>a[d]&&(a[d]=b),u[d]=b),h[d]=C}o.splice(1,0,h),s.splice(1,0,u),c=-1;let m=[];for(;++c<o.length;){let p=o[c],f=s[c];d=-1;let _=[];for(;++d<l;){let b=p[d]||"",C="",T="";if(e.alignDelimiters!==!1){let w=a[d]-(f[d]||0),A=r[d];A===114?C=" ".repeat(w):A===99?w%2?(C=" ".repeat(w/2+.5),T=" ".repeat(w/2-.5)):(C=" ".repeat(w/2),T=C):T=" ".repeat(w)}e.delimiterStart!==!1&&!d&&_.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&b==="")&&(e.delimiterStart!==!1||d)&&_.push(" "),e.alignDelimiters!==!1&&_.push(C),_.push(b),e.alignDelimiters!==!1&&_.push(T),e.padding!==!1&&_.push(" "),(e.delimiterEnd!==!1||d!==l-1)&&_.push("|")}m.push(e.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return m.join(`
|
|
`)}function PK(i){return i==null?"":String(i)}function FK(i){return i.length}function vN(i){let e=typeof i=="string"?i.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}var Sy={enter:{table:HK,tableData:yN,tableHeader:yN,tableRow:zK},exit:{codeText:UK,table:BK,tableData:yy,tableHeader:yy,tableRow:yy}};function HK(i){let e=i._align;this.enter({type:"table",align:e.map(t=>t==="none"?null:t),children:[]},i),this.setData("inTable",!0)}function BK(i){this.exit(i),this.setData("inTable")}function zK(i){this.enter({type:"tableRow",children:[]},i)}function yy(i){this.exit(i)}function yN(i){this.enter({type:"tableCell",children:[]},i)}function UK(i){let e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,WK));let t=this.stack[this.stack.length-1];t.value=e,this.exit(i)}function WK(i,e){return e==="|"?e:i}function Cy(i){let e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:l,inlineCode:u}};function s(m,p,f,_){return c(d(m,f,_),m.align)}function a(m,p,f,_){let b=h(m,f,_),C=c([b]);return C.slice(0,C.indexOf(`
|
|
`))}function l(m,p,f,_){let b=f.enter("tableCell"),C=f.enter("phrasing"),T=Yg(m,f,Xe(me({},_),{before:o,after:o}));return C(),b(),T}function c(m,p){return bN(m,{align:p,alignDelimiters:n,padding:t,stringLength:r})}function d(m,p,f){let _=m.children,b=-1,C=[],T=p.enter("table");for(;++b<_.length;)C[b]=h(_[b],p,f);return T(),C}function h(m,p,f){let _=m.children,b=-1,C=[],T=p.enter("tableRow");for(;++b<_.length;)C[b]=l(_[b],m,p,f);return T(),C}function u(m,p,f){let _=by(m,p,f);return f.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function SN(i){let e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function CN(i){let e=i.options.listItemIndent||"tab";if(e===1||e==="1")return"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function wN(i,e,t,n){let r=CN(t),o=t.bulletCurrent||SN(t);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=Nn(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=Gg(qg(i,t,a.current()),d);return l(),c;function d(h,u,m){return u?(m?"":" ".repeat(s))+h:(m?o:o+" ".repeat(s-o.length))+h}}var EN={exit:{taskListCheckValueChecked:xN,taskListCheckValueUnchecked:xN,paragraph:jK}},TN={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VK}};function xN(i){let e=this.stack[this.stack.length-2];e.checked=i.type==="taskListCheckValueChecked"}function jK(i){let e=this.stack[this.stack.length-2],t=this.stack[this.stack.length-1],n=e.children,r=t.children[0],o=-1,s;if(e&&e.type==="listItem"&&typeof e.checked=="boolean"&&r&&r.type==="text"){for(;++o<n.length;){let a=n[o];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}this.exit(i)}function VK(i,e,t,n){let r=i.children[0],o=typeof i.checked=="boolean"&&r&&r.type==="paragraph",s="["+(i.checked?"x":" ")+"] ",a=Nn(n);o&&a.move(s);let l=wN(i,e,t,me(me({},n),a.current()));return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function wy(){return[aN,mN(),fN,Sy,EN]}function xy(i){return{extensions:[lN,pN(),gN,Cy(i),TN]}}function Ey(i={}){let e=this.data();t("micromarkExtensions",tN(i)),t("fromMarkdownExtensions",wy()),t("toMarkdownExtensions",xy(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var IN={tokenize:qK,concrete:!0},KK={tokenize:GK,partial:!0};function qK(i,e,t){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(_){return i.enter("mathFlow"),i.enter("mathFlowFence"),i.enter("mathFlowFenceSequence"),l(_)}function l(_){return _===36?(i.consume(_),s++,l):(i.exit("mathFlowFenceSequence"),s<2?t(_):Xn(i,c,"whitespace")(_))}function c(_){return _===null||yi(_)?h(_):(i.enter("mathFlowFenceMeta"),i.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||yi(_)?(i.exit("chunkString"),i.exit("mathFlowFenceMeta"),h(_)):_===36?t(_):(i.consume(_),d)}function h(_){return i.exit("mathFlowFence"),n.interrupt?e(_):u(_)}function u(_){return _===null?p(_):yi(_)?i.attempt(KK,i.attempt({tokenize:f,partial:!0},p,o?Xn(i,u,"linePrefix",o+1):u),p)(_):(i.enter("mathFlowValue"),m(_))}function m(_){return _===null||yi(_)?(i.exit("mathFlowValue"),u(_)):(i.consume(_),m)}function p(_){return i.exit("mathFlow"),e(_)}function f(_,b,C){let T=0;return Xn(_,w,"linePrefix",4);function w(D){return _.enter("mathFlowFence"),_.enter("mathFlowFenceSequence"),A(D)}function A(D){return D===36?(_.consume(D),T++,A):T<s?C(D):(_.exit("mathFlowFenceSequence"),Xn(_,O,"whitespace")(D))}function O(D){return D===null||yi(D)?(_.exit("mathFlowFence"),b(D)):C(D)}}}function GK(i,e,t){let n=this;return r;function r(s){return i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o}function o(s){return n.parser.lazy[n.now().line]?t(s):e(s)}}function kN(i={}){let e=i.singleDollarTextMath;return e==null&&(e=!0),{tokenize:t,resolve:$K,previous:YK};function t(n,r,o){let s=this,a=0,l,c;return d;function d(f){return n.enter("mathText"),n.enter("mathTextSequence"),h(f)}function h(f){return f===36?(n.consume(f),a++,h):a<2&&!e?o(f):(n.exit("mathTextSequence"),u(f))}function u(f){return f===null?o(f):f===36?(c=n.enter("mathTextSequence"),l=0,p(f)):f===32?(n.enter("space"),n.consume(f),n.exit("space"),u):yi(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),u):(n.enter("mathTextData"),m(f))}function m(f){return f===null||f===32||f===36||yi(f)?(n.exit("mathTextData"),u(f)):(n.consume(f),m)}function p(f){return f===36?(n.consume(f),l++,p):l===a?(n.exit("mathTextSequence"),n.exit("mathText"),r(f)):(c.type="mathTextData",m(f))}}}function $K(i){let e=i.length-4,t=3,n,r;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(n=t;++n<e;)if(i[n][1].type==="mathTextData"){i[e][1].type="mathTextPadding",i[t][1].type="mathTextPadding",t+=2,e-=2;break}}for(n=t-1,e++;++n<=e;)r===void 0?n!==e&&i[n][1].type!=="lineEnding"&&(r=n):(n===e||i[n][1].type==="lineEnding")&&(i[r][1].type="mathTextData",n!==r+2&&(i[r][1].end=i[n-1][1].end,i.splice(r+2,n-r-2),e-=n-r-2,n=r+2),r=void 0);return i}function YK(i){return i!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Ty(i){return{flow:{36:IN},text:{36:kN(i)}}}function AN(i,e){let t=String(i),n=t.indexOf(e),r=n,o=0,s=0;if(typeof e!="string"||e.length!==1)throw new Error("Expected character");for(;n!==-1;)n===r?++o>s&&(s=o):o=1,r=n+1,n=t.indexOf(e,r);return s}function LN(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:r,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.meta=l}function n(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))}function r(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c,this.setData("mathFlowInside")}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function NN(i={}){let e=i.singleDollarTextMath;return e==null&&(e=!0),n.peek=r,{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},e?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,s,a,l){let c=o.value||"",d="$".repeat(Math.max(AN(c,"$")+1,2)),h=a.enter("mathFlow"),u=Nn(l),m=u.move(d);if(o.meta){let p=a.enter("mathFlowMeta");m+=u.move(j1(a,o.meta,Xe(me({},u.current()),{before:m,after:" ",encode:["$"]}))),p()}return m+=u.move(`
|
|
`),c&&(m+=u.move(c+`
|
|
`)),m+=u.move(d),h(),m}function n(o){let s=o.value||"",a=1,l="";for(e||a++;new RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(s);)a++;/[^ \r\n]/.test(s)&&(/[ \r\n$]/.test(s.charAt(0))||/[ \r\n$]/.test(s.charAt(s.length-1)))&&(l=" ");let c="$".repeat(a);return c+l+s+l+c}function r(){return"$"}}function Iy(i={}){let e=this.data();t("micromarkExtensions",Ty(i)),t("fromMarkdownExtensions",LN()),t("toMarkdownExtensions",NN(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var At=function(i,e,t){var n={type:String(i)};return t==null&&(typeof e=="string"||Array.isArray(e))?t=e:Object.assign(n,e),Array.isArray(t)?n.children=t:t!=null&&(n.value=String(t)),n};var Xg={}.hasOwnProperty;function XK(i,e){let t=e.data||{};return"value"in e&&!(Xg.call(t,"hName")||Xg.call(t,"hProperties")||Xg.call(t,"hChildren"))?i.augment(e,At("text",e.value)):i(e,"div",Dt(i,e))}function ky(i,e,t){let n=e&&e.type,r;if(!n)throw new Error("Expected node, got `"+e+"`");return Xg.call(i.handlers,n)?r=i.handlers[n]:i.passThrough&&i.passThrough.includes(n)?r=QK:r=i.unknownHandler,(typeof r=="function"?r:XK)(i,e,t)}function QK(i,e){return"children"in e?Xe(me({},e),{children:Dt(i,e)}):e}function Dt(i,e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let o=ky(i,n[r],e);if(o){if(r&&n[r-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){let s=o.children[0];s&&s.type==="text"&&(s.value=s.value.replace(/^\s+/,""))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t}var RN=!0,DN="skip",Ay=!1,MN=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null);let r=un(e),o=n?-1:1;s(i,null,[])();function s(a,l,c){let d=typeof a=="object"&&a!==null?a:{},h;return typeof d.type=="string"&&(h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0,Object.defineProperty(u,"name",{value:"node ("+(d.type+(h?"<"+h+">":""))+")"})),u;function u(){let m=[],p,f,_;if((!e||r(a,l,c[c.length-1]||null))&&(m=JK(t(a,c)),m[0]===Ay))return m;if(a.children&&m[0]!==DN)for(f=(n?a.children.length:-1)+o,_=c.concat(a);f>-1&&f<a.children.length;){if(p=s(a.children[f],f,_)(),p[0]===Ay)return p;f=typeof p[1]=="number"?p[1]:f+o}return m}}};function JK(i){return Array.isArray(i)?i:typeof i=="number"?[RN,i]:[i]}var Rn=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),MN(i,e,r,n);function r(o,s){let a=s[s.length-1];return t(o,a?a.children.indexOf(o):null,a)}};var yc=ON("start"),Ch=ON("end");function ON(i){return e;function e(t){let n=t&&t.position&&t.position[i]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}function PN(i){return!i||!i.position||!i.position.start||!i.position.start.line||!i.position.start.column||!i.position.end||!i.position.end.line||!i.position.end.column}var FN=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),Kg(i,e,r,n);function r(o,s){var a=s[s.length-1];return t(o,a?a.children.indexOf(o):null,a)}};var HN={}.hasOwnProperty;function zN(i){let e=Object.create(null);if(!i||!i.type)throw new Error("mdast-util-definitions expected node");return FN(i,"definition",t),n;function t(r){let o=BN(r.identifier);o&&!HN.call(e,o)&&(e[o]=r)}function n(r){let o=BN(r);return o&&HN.call(e,o)?e[o]:null}}function BN(i){return String(i||"").toUpperCase()}function sr(i,e){let t=[],n=-1;for(e&&t.push(At("text",`
|
|
`));++n<i.length;)n&&t.push(At("text",`
|
|
`)),t.push(i[n]);return e&&i.length>0&&t.push(At("text",`
|
|
`)),t}function UN(i){let e=-1,t=[];for(;++e<i.footnoteOrder.length;){let n=i.footnoteById[i.footnoteOrder[e].toUpperCase()];if(!n)continue;let r=Dt(i,n),o=String(n.identifier),s=jg(o.toLowerCase()),a=0,l=[];for(;++a<=i.footnoteCounts[o];){let h={type:"element",tagName:"a",properties:{href:"#"+i.clobberPrefix+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:i.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};a>1&&h.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(h)}let c=r[r.length-1];if(c&&c.type==="element"&&c.tagName==="p"){let h=c.children[c.children.length-1];h&&h.type==="text"?h.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else r.push(...l);let d={type:"element",tagName:"li",properties:{id:i.clobberPrefix+"fn-"+s},children:sr(r,!0)};n.position&&(d.position=n.position),t.push(d)}return t.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:"h2",properties:{id:"footnote-label",className:["sr-only"]},children:[At("text",i.footnoteLabel)]},{type:"text",value:`
|
|
`},{type:"element",tagName:"ol",properties:{},children:sr(t,!0)},{type:"text",value:`
|
|
`}]}}function WN(i,e){return i(e,"blockquote",sr(Dt(i,e),!0))}function jN(i,e){return[i(e,"br"),At("text",`
|
|
`)]}function VN(i,e){let t=e.value?e.value+`
|
|
`:"",n=e.lang&&e.lang.match(/^[^ \t]+(?=[ \t]|$)/),r={};n&&(r.className=["language-"+n]);let o=i(e,"code",r,[At("text",t)]);return e.meta&&(o.data={meta:e.meta}),i(e.position,"pre",[o])}function KN(i,e){return i(e,"del",Dt(i,e))}function qN(i,e){return i(e,"em",Dt(i,e))}function Qg(i,e){let t=String(e.identifier),n=jg(t.toLowerCase()),r=i.footnoteOrder.indexOf(t),o;r===-1?(i.footnoteOrder.push(t),i.footnoteCounts[t]=1,o=i.footnoteOrder.length):(i.footnoteCounts[t]++,o=r+1);let s=i.footnoteCounts[t];return i(e,"sup",[i(e.position,"a",{href:"#"+i.clobberPrefix+"fn-"+n,id:i.clobberPrefix+"fnref-"+n+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[At("text",String(o))])])}function GN(i,e){let t=i.footnoteById,n=1;for(;n in t;)n++;let r=String(n);return t[r]={type:"footnoteDefinition",identifier:r,children:[{type:"paragraph",children:e.children}],position:e.position},Qg(i,{type:"footnoteReference",identifier:r,position:e.position})}function $N(i,e){return i(e,"h"+e.depth,Dt(i,e))}function YN(i,e){return i.dangerous?i.augment(e,At("raw",e.value)):null}var JN=zi(V1(),1);function Zg(i,e){let t=e.referenceType,n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return At("text","!["+e.alt+n);let r=Dt(i,e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift(At("text","["));let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push(At("text",n)),r}function ZN(i,e){let t=i.definition(e.identifier);if(!t)return Zg(i,e);let n={src:(0,JN.default)(t.url||""),alt:e.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"img",n)}var eR=zi(V1(),1);function tR(i,e){let t={src:(0,eR.default)(e.url),alt:e.alt};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"img",t)}function iR(i,e){return i(e,"code",[At("text",e.value.replace(/\r?\n|\r/g," "))])}var nR=zi(V1(),1);function rR(i,e){let t=i.definition(e.identifier);if(!t)return Zg(i,e);let n={href:(0,nR.default)(t.url||"")};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"a",n,Dt(i,e))}var oR=zi(V1(),1);function sR(i,e){let t={href:(0,oR.default)(e.url)};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"a",t,Dt(i,e))}function aR(i,e,t){let n=Dt(i,e),r=t?eq(t):lR(e),o={},s=[];if(typeof e.checked=="boolean"){let c;n[0]&&n[0].type==="element"&&n[0].tagName==="p"?c=n[0]:(c=i(null,"p",[]),n.unshift(c)),c.children.length>0&&c.children.unshift(At("text"," ")),c.children.unshift(i(null,"input",{type:"checkbox",checked:e.checked,disabled:!0})),o.className=["task-list-item"]}let a=-1;for(;++a<n.length;){let c=n[a];(r||a!==0||c.type!=="element"||c.tagName!=="p")&&s.push(At("text",`
|
|
`)),c.type==="element"&&c.tagName==="p"&&!r?s.push(...c.children):s.push(c)}let l=n[n.length-1];return l&&(r||!("tagName"in l)||l.tagName!=="p")&&s.push(At("text",`
|
|
`)),i(e,"li",o,s)}function eq(i){let e=i.spread,t=i.children,n=-1;for(;!e&&++n<t.length;)e=lR(t[n]);return!!e}function lR(i){let e=i.spread;return e==null?i.children.length>1:e}function cR(i,e){let t={},n=e.ordered?"ol":"ul",r=Dt(i,e),o=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++o<r.length;){let s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}return i(e,n,t,sr(r,!0))}function dR(i,e){return i(e,"p",Dt(i,e))}function hR(i,e){return i.augment(e,At("root",sr(Dt(i,e))))}function uR(i,e){return i(e,"strong",Dt(i,e))}function mR(i,e){let t=e.children,n=-1,r=e.align||[],o=[];for(;++n<t.length;){let s=t[n].children,a=n===0?"th":"td",l=[],c=-1,d=e.align?r.length:s.length;for(;++c<d;){let h=s[c];l.push(i(h,a,{align:r[c]},h?Dt(i,h):[]))}o[n]=i(t[n],"tr",sr(l,!0))}return i(e,"table",sr([i(o[0].position,"thead",sr([o[0]],!0))].concat(o[1]?i({start:yc(o[1]),end:Ch(o[o.length-1])},"tbody",sr(o.slice(1),!0)):[]),!0))}function pR(i,e){return i.augment(e,At("text",String(e.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}function fR(i,e){return i(e,"hr")}var Ly={blockquote:WN,break:jN,code:VN,delete:KN,emphasis:qN,footnoteReference:Qg,footnote:GN,heading:$N,html:YN,imageReference:ZN,image:tR,inlineCode:iR,linkReference:rR,link:sR,listItem:aR,list:cR,paragraph:dR,root:hR,strong:uR,table:mR,text:pR,thematicBreak:fR,toml:e_,yaml:e_,definition:e_,footnoteDefinition:e_};function e_(){return null}var tq={}.hasOwnProperty;function iq(i,e){let t=e||{},n=t.allowDangerousHtml||!1,r={};return s.dangerous=n,s.clobberPrefix=t.clobberPrefix===void 0||t.clobberPrefix===null?"user-content-":t.clobberPrefix,s.footnoteLabel=t.footnoteLabel||"Footnotes",s.footnoteBackLabel=t.footnoteBackLabel||"Back to content",s.definition=zN(i),s.footnoteById=r,s.footnoteOrder=[],s.footnoteCounts={},s.augment=o,s.handlers=me(me({},Ly),t.handlers),s.unknownHandler=t.unknownHandler,s.passThrough=t.passThrough,Rn(i,"footnoteDefinition",a=>{let l=String(a.identifier).toUpperCase();tq.call(r,l)||(r[l]=a)}),s;function o(a,l){if(a&&"data"in a&&a.data){let c=a.data;c.hName&&(l.type!=="element"&&(l={type:"element",tagName:"",properties:{},children:[]}),l.tagName=c.hName),l.type==="element"&&c.hProperties&&(l.properties=me(me({},l.properties),c.hProperties)),"children"in l&&l.children&&c.hChildren&&(l.children=c.hChildren)}if(a){let c="type"in a?a:{position:a};PN(c)||(l.position={start:yc(c),end:Ch(c)})}return l}function s(a,l,c,d){return Array.isArray(c)&&(d=c,c={}),o(a,{type:"element",tagName:l,properties:c||{},children:d||[]})}}function t_(i,e){let t=iq(i,e),n=ky(t,i,null),r=UN(t);return r&&n.children.push(At("text",`
|
|
`),r),Array.isArray(n)?{type:"root",children:n}:n}var nq=function(i,e){return i&&"run"in i?rq(i,e):oq(i||e)},Ny=nq;function rq(i,e){return(t,n,r)=>{i.run(t_(t,e),n,o=>{r(o)})}}function oq(i){return e=>t_(e,i)}var QM=zi(f3(),1);var ha=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};ha.prototype.property={};ha.prototype.normal={};ha.prototype.space=null;function g3(i,e){let t={},n={},r=-1;for(;++r<i.length;)Object.assign(t,i[r].property),Object.assign(n,i[r].normal);return new ha(t,n,e)}function ua(i){return i.toLowerCase()}var Mn=class{constructor(e,t){this.property=e,this.attribute=t}};Mn.prototype.space=null;Mn.prototype.boolean=!1;Mn.prototype.booleanish=!1;Mn.prototype.overloadedBoolean=!1;Mn.prototype.number=!1;Mn.prototype.commaSeparated=!1;Mn.prototype.spaceSeparated=!1;Mn.prototype.commaOrSpaceSeparated=!1;Mn.prototype.mustUseProperty=!1;Mn.prototype.defined=!1;var l0={};BW(l0,{boolean:()=>Ze,booleanish:()=>wi,commaOrSpaceSeparated:()=>dr,commaSeparated:()=>bl,number:()=>ce,overloadedBoolean:()=>_3,spaceSeparated:()=>Wt});var N$=0,Ze=Ac(),wi=Ac(),_3=Ac(),ce=Ac(),Wt=Ac(),bl=Ac(),dr=Ac();function Ac(){return 2**++N$}var v3=Object.keys(l0),Lc=class extends Mn{constructor(e,t,n,r){let o=-1;if(super(e,t),EM(this,"space",r),typeof n=="number")for(;++o<v3.length;){let s=v3[o];EM(this,v3[o],(n&l0[s])===l0[s])}}};Lc.prototype.defined=!0;function EM(i,e,t){t&&(i[e]=t)}var R$={}.hasOwnProperty;function no(i){let e={},t={},n;for(n in i.properties)if(R$.call(i.properties,n)){let r=i.properties[n],o=new Lc(n,i.transform(i.attributes||{},n),r,i.space);i.mustUseProperty&&i.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[ua(n)]=n,t[ua(o.attribute)]=n}return new ha(e,t,i.space)}var b3=no({space:"xlink",transform(i,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var y3=no({space:"xml",transform(i,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function D_(i,e){return e in i?i[e]:e}function M_(i,e){return D_(i,e.toLowerCase())}var S3=no({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:M_,properties:{xmlns:null,xmlnsXLink:null}});var C3=no({transform(i,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:wi,ariaAutoComplete:null,ariaBusy:wi,ariaChecked:wi,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:Wt,ariaCurrent:null,ariaDescribedBy:Wt,ariaDetails:null,ariaDisabled:wi,ariaDropEffect:Wt,ariaErrorMessage:null,ariaExpanded:wi,ariaFlowTo:Wt,ariaGrabbed:wi,ariaHasPopup:null,ariaHidden:wi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wt,ariaLevel:ce,ariaLive:null,ariaModal:wi,ariaMultiLine:wi,ariaMultiSelectable:wi,ariaOrientation:null,ariaOwns:Wt,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:wi,ariaReadOnly:wi,ariaRelevant:null,ariaRequired:wi,ariaRoleDescription:Wt,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:wi,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null}});var TM=no({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:M_,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bl,acceptCharset:Wt,accessKey:Wt,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Wt,autoFocus:Ze,autoPlay:Ze,capture:Ze,charSet:null,checked:Ze,cite:null,className:Wt,cols:ce,colSpan:null,content:null,contentEditable:wi,controls:Ze,controlsList:Wt,coords:ce|bl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:_3,draggable:wi,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Wt,height:ce,hidden:Ze,high:ce,href:null,hrefLang:null,htmlFor:Wt,httpEquiv:Wt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Wt,itemRef:Wt,itemScope:Ze,itemType:Wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ze,optimum:ce,pattern:null,ping:Wt,placeholder:null,playsInline:Ze,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Wt,required:Ze,reversed:Ze,rows:ce,rowSpan:ce,sandbox:Wt,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:wi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:wi,width:ce,wrap:null,align:null,aLink:null,archive:Wt,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:wi,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:ce,security:null,unselectable:null}});var IM=no({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:D_,properties:{about:dr,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:Wt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bl,g2:bl,glyphName:bl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:dr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:dr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:dr,rev:dr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:dr,requiredFeatures:dr,requiredFonts:dr,requiredFormats:dr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:dr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:dr,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:dr,to:null,transform:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var D$=/^data[-\w.:]+$/i,kM=/-[a-z]/g,M$=/[A-Z]/g;function wo(i,e){let t=ua(e),n=e,r=Mn;if(t in i.normal)return i.property[i.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&D$.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(kM,P$);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!kM.test(o)){let s=o.replace(M$,O$);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=Lc}return new r(n,e)}function O$(i){return"-"+i.toLowerCase()}function P$(i){return i.charAt(1).toUpperCase()}var w3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var xo=g3([y3,b3,S3,C3,TM],"html"),Wn=g3([y3,b3,S3,C3,IM],"svg");var AM=/[#.]/g,LM=function(i,e="div"){for(var t=i||"",n={},r=0,o,s,a;r<t.length;)AM.lastIndex=r,a=AM.exec(t),o=t.slice(r,a?a.index:t.length),o&&(s?s==="#"?n.id=o:Array.isArray(n.className)?n.className.push(o):n.className=[o]:e=o,r+=o.length),a&&(s=a[0],r++);return{type:"element",tagName:e,properties:n,children:[]}};function x3(i){let e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function O_(i){return i.join(" ").trim()}function E3(i){for(var e=[],t=String(i||""),n=t.indexOf(","),r=0,o,s;!o;)n===-1&&(n=t.length,o=!0),s=t.slice(r,n).trim(),(s||!o)&&e.push(s),r=n+1,n=t.indexOf(",",r);return e}function P_(i,e){var t=e||{};return i[i.length-1]===""&&(i=i.concat("")),i.join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var F$=new Set(["menu","submit","reset","button"]),T3={}.hasOwnProperty;function F_(i,e,t){let n=t&&U$(t);return function(o,s,...a){let l=-1,c;if(o==null)c={type:"root",children:[]},a.unshift(s);else if(c=LM(o,e),c.tagName=c.tagName.toLowerCase(),n&&T3.call(n,c.tagName)&&(c.tagName=n[c.tagName]),H$(s,c.tagName)){let d;for(d in s)T3.call(s,d)&&B$(i,c.properties,d,s[d])}else a.unshift(s);for(;++l<a.length;)I3(c.children,a[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}}function H$(i,e){return i==null||typeof i!="object"||Array.isArray(i)?!1:e==="input"||!i.type||typeof i.type!="string"?!0:"children"in i&&Array.isArray(i.children)?!1:e==="button"?F$.has(i.type.toLowerCase()):!("value"in i)}function B$(i,e,t,n){let r=wo(i,t),o=-1,s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?r.spaceSeparated?s=x3(n):r.commaSeparated?s=E3(n):r.commaOrSpaceSeparated?s=x3(E3(n).join(" ")):s=NM(r,r.property,n):Array.isArray(n)?s=n.concat():s=r.property==="style"?z$(n):String(n);if(Array.isArray(s)){let a=[];for(;++o<s.length;)a[o]=NM(r,r.property,s[o]);s=a}r.property==="className"&&Array.isArray(e.className)&&(s=e.className.concat(s)),e[r.property]=s}}function I3(i,e){let t=-1;if(e!=null)if(typeof e=="string"||typeof e=="number")i.push({type:"text",value:String(e)});else if(Array.isArray(e))for(;++t<e.length;)I3(i,e[t]);else if(typeof e=="object"&&"type"in e)e.type==="root"?I3(i,e.children):i.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function NM(i,e,t){if(typeof t=="string"){if(i.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((i.boolean||i.overloadedBoolean)&&(t===""||ua(t)===ua(e)))return!0}return t}function z$(i){let e=[],t;for(t in i)T3.call(i,t)&&e.push([t,i[t]].join(": "));return e.join("; ")}function U$(i){let e={},t=-1;for(;++t<i.length;)e[i[t].toLowerCase()]=i[t];return e}var Nh=F_(xo,"div");var RM=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var Rh=F_(Wn,"g",RM);function DM(i){for(var e=String(i),t=[],n=/\r?\n|\r/g;n.test(e);)t.push(n.lastIndex);return t.push(e.length+1),{toPoint:r,toOffset:o};function r(s){var a=-1;if(s>-1&&s<t[t.length-1]){for(;++a<t.length;)if(t[a]>s)return{line:a+1,column:s-(t[a-1]||0)+1,offset:s}}return{line:void 0,column:void 0,offset:void 0}}function o(s){var a=s&&s.line,l=s&&s.column,c;return typeof a=="number"&&typeof l=="number"&&!Number.isNaN(a)&&!Number.isNaN(l)&&a-1 in t&&(c=(t[a-2]||0)+l-1||0),c>-1&&c<t[t.length-1]?c:-1}}var jn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var FM={}.hasOwnProperty,MM={"#document":OM,"#document-fragment":OM,"#text":V$,"#comment":K$,"#documentType":j$};function c0(i,e={}){let t,n;return $$(e)?(n=e,t={}):(n=e.file,t=e),k3({schema:t.space==="svg"?Wn:xo,file:n,verbose:t.verbose,location:!1},i)}function k3(i,e){let t=i.schema,n=FM.call(MM,e.nodeName)?MM[e.nodeName]:q$,r;"tagName"in e&&(i.schema=e.namespaceURI===jn.svg?Wn:xo),"childNodes"in e&&(r=W$(i,e.childNodes));let o=n(i,e,r);if("sourceCodeLocation"in e&&e.sourceCodeLocation&&i.file){let s=G$(i,o,e.sourceCodeLocation);s&&(i.location=!0,o.position=s)}return i.schema=t,o}function W$(i,e){let t=-1,n=[];for(;++t<e.length;)n[t]=k3(i,e[t]);return n}function OM(i,e,t){let n={type:"root",children:t,data:{quirksMode:e.mode==="quirks"||e.mode==="limited-quirks"}};if(i.file&&i.location){let r=String(i.file),o=DM(r);n.position={start:o.toPoint(0),end:o.toPoint(r.length)}}return n}function j$(){return{type:"doctype"}}function V$(i,e){return{type:"text",value:e.value}}function K$(i,e){return{type:"comment",value:e.data}}function q$(i,e,t){let n=i.schema.space==="svg"?Rh:Nh,r=-1,o={};for(;++r<e.attrs.length;){let a=e.attrs[r];o[(a.prefix?a.prefix+":":"")+a.name]=a.value}let s=n(e.tagName,o,t);if(s.tagName==="template"&&"content"in e){let a=e.sourceCodeLocation,l=a&&a.startTag&&Dh(a.startTag),c=a&&a.endTag&&Dh(a.endTag),d=k3(i,e.content);l&&c&&i.file&&(d.position={start:l.end,end:c.start}),s.content=d}return s}function G$(i,e,t){let n=Dh(t);if(e.type==="element"){let r=e.children[e.children.length-1];if(n&&!t.endTag&&r&&r.position&&r.position.end&&(n.end=Object.assign({},r.position.end)),i.verbose){let o={},s;for(s in t.attrs)FM.call(t.attrs,s)&&(o[wo(i.schema,s).property]=Dh(t.attrs[s]));e.data={position:{opening:Dh(t.startTag),closing:t.endTag?Dh(t.endTag):null,properties:o}}}}return n}function Dh(i){let e=PM({line:i.startLine,column:i.startCol,offset:i.startOffset}),t=PM({line:i.endLine,column:i.endCol,offset:i.endOffset});return e||t?{start:e,end:t}:null}function PM(i){return i.line&&i.column?i:null}function $$(i){return"messages"in i}var qM=zi(KM(),1);var aY=jn,lY=w3,cY={}.hasOwnProperty,dY=un("root"),A3=un("element"),hY=un("text");function GM(i,e,t){if(typeof i!="function")throw new TypeError("h is not a function");let n=mY(i),r=gY(i),o=fY(i),s,a;if(typeof t=="string"||typeof t=="boolean"?(s=t,t={}):(t||(t={}),s=t.prefix),dY(e))a=e.children.length===1&&A3(e.children[0])?e.children[0]:{type:"element",tagName:"div",properties:{},children:e.children};else if(A3(e))a=e;else throw new Error("Expected root or element, not `"+(e&&e.type||e)+"`");return $M(i,a,{schema:t.space==="svg"?Wn:xo,prefix:s==null?n||r||o?"h-":null:typeof s=="string"?s:s?"h-":null,key:0,react:n,vue:r,vdom:o,hyperscript:pY(i)})}function $M(i,e,t){let n=t.schema,r=n,o=e.tagName,s={},a=[],l=-1,c;n.space==="html"&&o.toLowerCase()==="svg"&&(r=Wn,t.schema=r);for(c in e.properties)e.properties&&cY.call(e.properties,c)&&uY(s,c,e.properties[c],t,o);if(t.vdom&&(r.space==="html"?o=o.toUpperCase():r.space&&(s.namespace=aY[r.space])),t.prefix&&(t.key++,s.key=t.prefix+t.key),e.children)for(;++l<e.children.length;){let d=e.children[l];A3(d)?a.push($M(i,d,t)):hY(d)&&a.push(d.value)}return t.schema=n,a.length>0?i.call(e,o,s,a):i.call(e,o,s)}function uY(i,e,t,n,r){let o=wo(n.schema,e),s;t==null||typeof t=="number"&&Number.isNaN(t)||t===!1&&(n.vue||n.vdom||n.hyperscript)||!t&&o.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(t)&&(t=o.commaSeparated?P_(t):O_(t)),o.boolean&&n.hyperscript&&(t=""),o.property==="style"&&typeof t=="string"&&(n.react||n.vue||n.vdom)&&(t=_Y(t,r)),n.vue?o.property!=="style"&&(s="attrs"):o.mustUseProperty||(n.vdom?o.property!=="style"&&(s="attributes"):n.hyperscript&&(s="attrs")),s?i[s]=Object.assign(i[s]||{},{[o.attribute]:t}):o.space&&n.react?i[lY[o.property]||o.property]=t:i[o.attribute]=t)}function mY(i){let e=i("div",{});return!!(e&&("_owner"in e||"_store"in e)&&(e.key===void 0||e.key===null))}function pY(i){return"context"in i&&"cleanup"in i}function fY(i){return i("div",{}).type==="VirtualNode"}function gY(i){let e=i("div",{});return!!(e&&e.context&&e.context._isVue)}function _Y(i,e){let t={};try{(0,qM.default)(i,(n,r)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),t[n.replace(/-([a-z])/g,(o,s)=>s.toUpperCase())]=r})}catch(n){throw n.message=e+"[style]"+n.message.slice(9),n}return t}var YM={}.hasOwnProperty;function H_(i,e){var t=e||{};function n(r){var o=n.invalid,s=n.handlers;if(r&&YM.call(r,i)&&(o=YM.call(s,r[i])?s[r[i]]:n.unknown),o)return o.apply(this,arguments)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}var vY={}.hasOwnProperty,XM=H_("type",{handlers:{root:bY,element:xY,text:CY,comment:wY,doctype:SY}});function L3(i,e){return XM(i,e==="svg"?Wn:xo)}function bY(i,e){var t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=N3(i.children,t,e),Mh(i,t)}function yY(i,e){var t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=N3(i.children,t,e),Mh(i,t)}function SY(i){return Mh(i,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}function CY(i){return Mh(i,{nodeName:"#text",value:i.value,parentNode:void 0})}function wY(i){return Mh(i,{nodeName:"#comment",data:i.value,parentNode:void 0})}function xY(i,e){var t=e.space;return GM(n,Object.assign({},i,{children:[]}),{space:t});function n(r,o){var s=[],a,l,c,d,h;for(c in o)!vY.call(o,c)||o[c]===!1||(a=wo(e,c),!(a.boolean&&!o[c])&&(l={name:c,value:o[c]===!0?"":String(o[c])},a.space&&a.space!=="html"&&a.space!=="svg"&&(d=c.indexOf(":"),d<0?l.prefix="":(l.name=c.slice(d+1),l.prefix=c.slice(0,d)),l.namespace=jn[a.space]),s.push(l)));return e.space==="html"&&i.tagName==="svg"&&(e=Wn),h=Mh(i,{nodeName:r,tagName:r,attrs:s,namespaceURI:jn[e.space],childNodes:[],parentNode:void 0}),h.childNodes=N3(i.children,h,e),r==="template"&&(h.content=yY(i.content,e)),h}}function N3(i,e,t){var n=-1,r=[],o;if(i)for(;++n<i.length;)o=XM(i[n],t),o.parentNode=e,r.push(o);return r}function Mh(i,e){var t=i.position;return t&&t.start&&t.end&&(e.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset}),e}var B_=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];var EY="IN_TEMPLATE_MODE",TY="DATA_STATE",IY="CHARACTER_TOKEN",kY="START_TAG_TOKEN",AY="END_TAG_TOKEN",LY="COMMENT_TOKEN",NY="DOCTYPE_TOKEN",RY={sourceCodeLocationInfo:!0,scriptingEnabled:!1},z_=function(i,e,t){let n=-1,r=new QM.default(RY),o=H_("type",{handlers:{root:f,element:_,text:b,comment:T,doctype:C,raw:w},unknown:PY}),s,a,l,c,d;if(HY(e)&&(t=e,e=void 0),t&&t.passThrough)for(;++n<t.passThrough.length;)o.handlers[t.passThrough[n]]=A;let h=c0(FY(i)?m():u(),e);if(s&&Rn(h,"comment",(D,j,q)=>{let _e=D;if(_e.value.stitch&&q!==null&&j!==null)return q.children[j]=_e.value.stitch,j}),i.type!=="root"&&h.type==="root"&&h.children.length===1)return h.children[0];return h;function u(){let D={nodeName:"template",tagName:"template",attrs:[],namespaceURI:jn.html,childNodes:[]},j={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:jn.html,childNodes:[]},q={nodeName:"#document-fragment",childNodes:[]};if(r._bootstrap(j,D),r._pushTmplInsertionMode(EY),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),r._adoptNodes(j.childNodes[0],q),q}function m(){let D=r.treeAdapter.createDocument();if(r._bootstrap(D,void 0),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),D}function p(D){let j=-1;if(D)for(;++j<D.length;)o(D[j])}function f(D){p(D.children)}function _(D){O(),r._processToken(DY(D),jn.html),p(D.children),B_.includes(D.tagName)||(O(),r._processToken(OY(D)))}function b(D){O(),r._processToken({type:IY,chars:D.value,location:Oh(D)})}function C(D){O(),r._processToken({type:NY,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Oh(D)})}function T(D){O(),r._processToken({type:LY,data:D.value,location:Oh(D)})}function w(D){let j=yc(D),q=j.line||1,_e=j.column||1,J=j.offset||0;if(!l)throw new Error("Expected `preprocessor`");if(!a)throw new Error("Expected `tokenizer`");if(!c)throw new Error("Expected `posTracker`");if(!d)throw new Error("Expected `locationTracker`");l.html=void 0,l.pos=-1,l.lastGapPos=-1,l.lastCharPos=-1,l.gapStack=[],l.skipNextNewLine=!1,l.lastChunkWritten=!1,l.endOfChunkHit=!1,c.isEol=!1,c.lineStartPos=-_e+1,c.droppedBufferSize=J,c.offset=0,c.col=1,c.line=q,d.currentAttrLocation=void 0,d.ctLoc=Oh(D),a.write(D.value),r._runParsingLoop(null),(a.state==="NAMED_CHARACTER_REFERENCE_STATE"||a.state==="NUMERIC_CHARACTER_REFERENCE_END_STATE")&&(l.lastChunkWritten=!0,a[a.state](a._consume()));let ke=a.currentCharacterToken;ke&&(ke.location.endLine=c.line,ke.location.endCol=c.col+1,ke.location.endOffset=c.offset+1,r._processToken(ke))}function A(D){s=!0;let j;"children"in D?j=Xe(me({},D),{children:z_({type:"root",children:D.children},e,t).children}):j=me({},D),T({type:"comment",value:{stitch:j}})}function O(){if(!a)throw new Error("Expected `tokenizer`");a.tokenQueue=[],a.state=TY,a.returnState="",a.charRefCode=-1,a.tempBuff=[],a.lastStartTagName="",a.consumedAfterSnapshot=-1,a.active=!1,a.currentCharacterToken=void 0,a.currentToken=void 0,a.currentAttr=void 0}};function DY(i){let e=Object.assign(Oh(i));return e.startTag=Object.assign({},e),{type:kY,tagName:i.tagName,selfClosing:!1,attrs:MY(i),location:e}}function MY(i){return L3({tagName:i.tagName,type:"element",properties:i.properties,children:[]}).attrs}function OY(i){let e=Object.assign(Oh(i));return e.startTag=Object.assign({},e),{type:AY,tagName:i.tagName,attrs:[],location:e}}function PY(i){throw new Error("Cannot compile `"+i.type+"` node")}function FY(i){let e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName==="html"))}function Oh(i){let e=yc(i),t=Ch(i);return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function HY(i){return!!(i&&!("message"in i&&"messages"in i))}function R3(i={}){return(e,t)=>z_(e,t,i)}var Dr=class i{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new i(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},ms=class i{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,Dr.range(this,e))}},he=class i{constructor(e,t){this.position=void 0;var n="KaTeX parse error: "+e,r,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start;var a=o.end;r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&\u0332"),c;r>15?c="\u2026"+s.slice(r-15,r):c=s.slice(0,r);var d;a+15<s.length?d=s.slice(a,a+15)+"\u2026":d=s.slice(a),n+=c+l+d}var h=new Error(n);return h.name="ParseError",h.__proto__=i.prototype,h.position=r,h}};he.prototype.__proto__=Error.prototype;var BY=function(e,t){return e.indexOf(t)!==-1},zY=function(e,t){return e===void 0?t:e},UY=/([A-Z])/g,WY=function(e){return e.replace(UY,"-$1").toLowerCase()},jY={"&":"&",">":">","<":"<",'"':""","'":"'"},VY=/[&><"']/g;function KY(i){return String(i).replace(VY,e=>jY[e])}var AO=function i(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?i(e.body[0]):e:e.type==="font"?i(e.body):e},qY=function(e){var t=AO(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},GY=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},$Y=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},Ge={contains:BY,deflt:zY,escape:KY,hyphenate:WY,getBaseElem:AO,isCharacterBox:qY,protocolFromUrl:$Y},J_={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:i=>"#"+i},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:i=>Math.max(0,i),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:i=>Math.max(0,i),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:i=>Math.max(0,i),cli:"-e, --max-expand <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function YY(i){if(i.default)return i.default;var e=i.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var p0=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in J_)if(J_.hasOwnProperty(t)){var n=J_[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:YY(n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new he("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch(o){r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Ge.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},ds=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return hs[XY[this.id]]}sub(){return hs[QY[this.id]]}fracNum(){return hs[JY[this.id]]}fracDen(){return hs[ZY[this.id]]}cramp(){return hs[eX[this.id]]}text(){return hs[tX[this.id]]}isTight(){return this.size>=2}},nS=0,ev=1,Fh=2,fa=3,f0=4,ro=5,Hh=6,Kn=7,hs=[new ds(nS,0,!1),new ds(ev,0,!0),new ds(Fh,1,!1),new ds(fa,1,!0),new ds(f0,2,!1),new ds(ro,2,!0),new ds(Hh,3,!1),new ds(Kn,3,!0)],XY=[f0,ro,f0,ro,Hh,Kn,Hh,Kn],QY=[ro,ro,ro,ro,Kn,Kn,Kn,Kn],JY=[Fh,fa,f0,ro,Hh,Kn,Hh,Kn],ZY=[fa,fa,ro,ro,Kn,Kn,Kn,Kn],eX=[ev,ev,fa,fa,ro,ro,Kn,Kn],tX=[nS,ev,Fh,fa,Fh,fa,Fh,fa],je={DISPLAY:hs[nS],TEXT:hs[Fh],SCRIPT:hs[f0],SCRIPTSCRIPT:hs[Hh]},K3=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function iX(i){for(var e=0;e<K3.length;e++)for(var t=K3[e],n=0;n<t.blocks.length;n++){var r=t.blocks[n];if(i>=r[0]&&i<=r[1])return t.name}return null}var Z_=[];K3.forEach(i=>i.blocks.forEach(e=>Z_.push(...e)));function LO(i){for(var e=0;e<Z_.length;e+=2)if(i>=Z_[e]&&i<=Z_[e+1])return!0;return!1}var Ph=80,nX=function(e,t){return"M95,"+(622+e+t)+`
|
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
c69,-144,104.5,-217.7,106.5,-221
|
|
l`+e/2.075+" -"+e+`
|
|
c5.3,-9.3,12,-14,20,-14
|
|
H400000v`+(40+e)+`H845.2724
|
|
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},rX=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
c340,-704.7,510.7,-1060.3,512,-1067
|
|
l`+e/2.084+" -"+e+`
|
|
c4.7,-7.3,11,-11,19,-11
|
|
H40000v`+(40+e)+`H1012.3
|
|
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},oX=function(e,t){return"M983 "+(10+e+t)+`
|
|
l`+e/3.13+" -"+e+`
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},sX=function(e,t){return"M424,"+(2398+e+t)+`
|
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
v`+(40+e)+`H1014.6
|
|
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
|
|
h400000v`+(40+e)+"h-400000z"},aX=function(e,t){return"M473,"+(2713+e+t)+`
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},lX=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},cX=function(e,t,n){var r=n-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
|
|
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},dX=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=nX(t,Ph);break;case"sqrtSize1":r=rX(t,Ph);break;case"sqrtSize2":r=oX(t,Ph);break;case"sqrtSize3":r=sX(t,Ph);break;case"sqrtSize4":r=aX(t,Ph);break;case"sqrtTall":r=cX(t,Ph,n)}return r},hX=function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},JM={doubleleftarrow:`M262 157
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},uX=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84
|
|
H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
|
|
M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
|
|
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
|
|
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
|
|
M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
|
|
M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Mc=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Ge.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=t=>t.toText();return this.children.map(e).join("")}},us={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},U_={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ZM={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function mX(i,e){us[i]=e}function rS(i,e,t){if(!us[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=us[e][n];if(!r&&i[0]in ZM&&(n=ZM[i[0]].charCodeAt(0),r=us[e][n]),!r&&t==="text"&&LO(n)&&(r=us[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var D3={};function pX(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!D3[e]){var t=D3[e]={cssEmPerMu:U_.quad[e]/18};for(var n in U_)U_.hasOwnProperty(n)&&(t[n]=U_[n][e])}return D3[e]}var fX=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],eO=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],tO=function(e,t){return t.size<2?e:fX[e-1][t.size-1]},tv=class i{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||i.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=eO[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:tO(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:eO[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=tO(i.BASESIZE,e);return this.size===t&&this.textSize===i.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=pX(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};tv.BASESIZE=6;var q3={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},gX={ex:!0,em:!0,mu:!0},NO=function(e){return typeof e!="string"&&(e=e.unit),e in q3||e in gX||e==="ex"},gi=function(e,t){var n;if(e.unit in q3)n=q3[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new he("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ve=function(e){return+e.toFixed(4)+"em"},Cl=function(e){return e.filter(t=>t).join(" ")},RO=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},DO=function(e){var t=document.createElement(e);t.className=Cl(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},MO=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Ge.escape(Cl(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Ge.hyphenate(r)+":"+this.style[r]+";");n&&(t+=' style="'+Ge.escape(n)+'"');for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+Ge.escape(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t},Oc=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,RO.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Ge.contains(this.classes,e)}toNode(){return DO.call(this,"span")}toMarkup(){return MO.call(this,"span")}},g0=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,RO.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Ge.contains(this.classes,e)}toNode(){return DO.call(this,"a")}toMarkup(){return MO.call(this,"a")}},G3=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Ge.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Ge.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Ge.escape(t)+'"'),e+="'/>",e}},_X={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},mr=class{constructor(e,t,n,r,o,s,a,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=s||0,this.classes=a||[],this.style=l||{},this.maxFontSize=0;var c=iX(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=_X[this.text])}hasClass(e){return Ge.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=ve(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Cl(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Ge.escape(Cl(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Ge.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Ge.escape(n)+'"');var o=Ge.escape(this.text);return e?(t+=">",t+=o,t+="</span>",t):o}},To=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}},ps=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",JM[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+JM[this.pathName]+"'/>"}},_0=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>",e}};function iO(i){if(i instanceof mr)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function vX(i){if(i instanceof Oc)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var bX={bin:1,close:1,inner:1,open:1,punct:1,rel:1},yX={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Jt={math:{},text:{}};function v(i,e,t,n,r,o){Jt[i][r]={font:e,group:t,replace:n},o&&n&&(Jt[i][n]=Jt[i][r])}var y="math",ne="text",x="main",L="ams",hi="accent-token",Te="bin",qn="close",Bh="inner",Ke="mathord",Oi="op-token",Mr="open",lv="punct",N="rel",ba="spacing",P="textord";v(y,x,N,"\u2261","\\equiv",!0);v(y,x,N,"\u227A","\\prec",!0);v(y,x,N,"\u227B","\\succ",!0);v(y,x,N,"\u223C","\\sim",!0);v(y,x,N,"\u22A5","\\perp");v(y,x,N,"\u2AAF","\\preceq",!0);v(y,x,N,"\u2AB0","\\succeq",!0);v(y,x,N,"\u2243","\\simeq",!0);v(y,x,N,"\u2223","\\mid",!0);v(y,x,N,"\u226A","\\ll",!0);v(y,x,N,"\u226B","\\gg",!0);v(y,x,N,"\u224D","\\asymp",!0);v(y,x,N,"\u2225","\\parallel");v(y,x,N,"\u22C8","\\bowtie",!0);v(y,x,N,"\u2323","\\smile",!0);v(y,x,N,"\u2291","\\sqsubseteq",!0);v(y,x,N,"\u2292","\\sqsupseteq",!0);v(y,x,N,"\u2250","\\doteq",!0);v(y,x,N,"\u2322","\\frown",!0);v(y,x,N,"\u220B","\\ni",!0);v(y,x,N,"\u221D","\\propto",!0);v(y,x,N,"\u22A2","\\vdash",!0);v(y,x,N,"\u22A3","\\dashv",!0);v(y,x,N,"\u220B","\\owns");v(y,x,lv,".","\\ldotp");v(y,x,lv,"\u22C5","\\cdotp");v(y,x,P,"#","\\#");v(ne,x,P,"#","\\#");v(y,x,P,"&","\\&");v(ne,x,P,"&","\\&");v(y,x,P,"\u2135","\\aleph",!0);v(y,x,P,"\u2200","\\forall",!0);v(y,x,P,"\u210F","\\hbar",!0);v(y,x,P,"\u2203","\\exists",!0);v(y,x,P,"\u2207","\\nabla",!0);v(y,x,P,"\u266D","\\flat",!0);v(y,x,P,"\u2113","\\ell",!0);v(y,x,P,"\u266E","\\natural",!0);v(y,x,P,"\u2663","\\clubsuit",!0);v(y,x,P,"\u2118","\\wp",!0);v(y,x,P,"\u266F","\\sharp",!0);v(y,x,P,"\u2662","\\diamondsuit",!0);v(y,x,P,"\u211C","\\Re",!0);v(y,x,P,"\u2661","\\heartsuit",!0);v(y,x,P,"\u2111","\\Im",!0);v(y,x,P,"\u2660","\\spadesuit",!0);v(y,x,P,"\xA7","\\S",!0);v(ne,x,P,"\xA7","\\S");v(y,x,P,"\xB6","\\P",!0);v(ne,x,P,"\xB6","\\P");v(y,x,P,"\u2020","\\dag");v(ne,x,P,"\u2020","\\dag");v(ne,x,P,"\u2020","\\textdagger");v(y,x,P,"\u2021","\\ddag");v(ne,x,P,"\u2021","\\ddag");v(ne,x,P,"\u2021","\\textdaggerdbl");v(y,x,qn,"\u23B1","\\rmoustache",!0);v(y,x,Mr,"\u23B0","\\lmoustache",!0);v(y,x,qn,"\u27EF","\\rgroup",!0);v(y,x,Mr,"\u27EE","\\lgroup",!0);v(y,x,Te,"\u2213","\\mp",!0);v(y,x,Te,"\u2296","\\ominus",!0);v(y,x,Te,"\u228E","\\uplus",!0);v(y,x,Te,"\u2293","\\sqcap",!0);v(y,x,Te,"\u2217","\\ast");v(y,x,Te,"\u2294","\\sqcup",!0);v(y,x,Te,"\u25EF","\\bigcirc",!0);v(y,x,Te,"\u2219","\\bullet",!0);v(y,x,Te,"\u2021","\\ddagger");v(y,x,Te,"\u2240","\\wr",!0);v(y,x,Te,"\u2A3F","\\amalg");v(y,x,Te,"&","\\And");v(y,x,N,"\u27F5","\\longleftarrow",!0);v(y,x,N,"\u21D0","\\Leftarrow",!0);v(y,x,N,"\u27F8","\\Longleftarrow",!0);v(y,x,N,"\u27F6","\\longrightarrow",!0);v(y,x,N,"\u21D2","\\Rightarrow",!0);v(y,x,N,"\u27F9","\\Longrightarrow",!0);v(y,x,N,"\u2194","\\leftrightarrow",!0);v(y,x,N,"\u27F7","\\longleftrightarrow",!0);v(y,x,N,"\u21D4","\\Leftrightarrow",!0);v(y,x,N,"\u27FA","\\Longleftrightarrow",!0);v(y,x,N,"\u21A6","\\mapsto",!0);v(y,x,N,"\u27FC","\\longmapsto",!0);v(y,x,N,"\u2197","\\nearrow",!0);v(y,x,N,"\u21A9","\\hookleftarrow",!0);v(y,x,N,"\u21AA","\\hookrightarrow",!0);v(y,x,N,"\u2198","\\searrow",!0);v(y,x,N,"\u21BC","\\leftharpoonup",!0);v(y,x,N,"\u21C0","\\rightharpoonup",!0);v(y,x,N,"\u2199","\\swarrow",!0);v(y,x,N,"\u21BD","\\leftharpoondown",!0);v(y,x,N,"\u21C1","\\rightharpoondown",!0);v(y,x,N,"\u2196","\\nwarrow",!0);v(y,x,N,"\u21CC","\\rightleftharpoons",!0);v(y,L,N,"\u226E","\\nless",!0);v(y,L,N,"\uE010","\\@nleqslant");v(y,L,N,"\uE011","\\@nleqq");v(y,L,N,"\u2A87","\\lneq",!0);v(y,L,N,"\u2268","\\lneqq",!0);v(y,L,N,"\uE00C","\\@lvertneqq");v(y,L,N,"\u22E6","\\lnsim",!0);v(y,L,N,"\u2A89","\\lnapprox",!0);v(y,L,N,"\u2280","\\nprec",!0);v(y,L,N,"\u22E0","\\npreceq",!0);v(y,L,N,"\u22E8","\\precnsim",!0);v(y,L,N,"\u2AB9","\\precnapprox",!0);v(y,L,N,"\u2241","\\nsim",!0);v(y,L,N,"\uE006","\\@nshortmid");v(y,L,N,"\u2224","\\nmid",!0);v(y,L,N,"\u22AC","\\nvdash",!0);v(y,L,N,"\u22AD","\\nvDash",!0);v(y,L,N,"\u22EA","\\ntriangleleft");v(y,L,N,"\u22EC","\\ntrianglelefteq",!0);v(y,L,N,"\u228A","\\subsetneq",!0);v(y,L,N,"\uE01A","\\@varsubsetneq");v(y,L,N,"\u2ACB","\\subsetneqq",!0);v(y,L,N,"\uE017","\\@varsubsetneqq");v(y,L,N,"\u226F","\\ngtr",!0);v(y,L,N,"\uE00F","\\@ngeqslant");v(y,L,N,"\uE00E","\\@ngeqq");v(y,L,N,"\u2A88","\\gneq",!0);v(y,L,N,"\u2269","\\gneqq",!0);v(y,L,N,"\uE00D","\\@gvertneqq");v(y,L,N,"\u22E7","\\gnsim",!0);v(y,L,N,"\u2A8A","\\gnapprox",!0);v(y,L,N,"\u2281","\\nsucc",!0);v(y,L,N,"\u22E1","\\nsucceq",!0);v(y,L,N,"\u22E9","\\succnsim",!0);v(y,L,N,"\u2ABA","\\succnapprox",!0);v(y,L,N,"\u2246","\\ncong",!0);v(y,L,N,"\uE007","\\@nshortparallel");v(y,L,N,"\u2226","\\nparallel",!0);v(y,L,N,"\u22AF","\\nVDash",!0);v(y,L,N,"\u22EB","\\ntriangleright");v(y,L,N,"\u22ED","\\ntrianglerighteq",!0);v(y,L,N,"\uE018","\\@nsupseteqq");v(y,L,N,"\u228B","\\supsetneq",!0);v(y,L,N,"\uE01B","\\@varsupsetneq");v(y,L,N,"\u2ACC","\\supsetneqq",!0);v(y,L,N,"\uE019","\\@varsupsetneqq");v(y,L,N,"\u22AE","\\nVdash",!0);v(y,L,N,"\u2AB5","\\precneqq",!0);v(y,L,N,"\u2AB6","\\succneqq",!0);v(y,L,N,"\uE016","\\@nsubseteqq");v(y,L,Te,"\u22B4","\\unlhd");v(y,L,Te,"\u22B5","\\unrhd");v(y,L,N,"\u219A","\\nleftarrow",!0);v(y,L,N,"\u219B","\\nrightarrow",!0);v(y,L,N,"\u21CD","\\nLeftarrow",!0);v(y,L,N,"\u21CF","\\nRightarrow",!0);v(y,L,N,"\u21AE","\\nleftrightarrow",!0);v(y,L,N,"\u21CE","\\nLeftrightarrow",!0);v(y,L,N,"\u25B3","\\vartriangle");v(y,L,P,"\u210F","\\hslash");v(y,L,P,"\u25BD","\\triangledown");v(y,L,P,"\u25CA","\\lozenge");v(y,L,P,"\u24C8","\\circledS");v(y,L,P,"\xAE","\\circledR");v(ne,L,P,"\xAE","\\circledR");v(y,L,P,"\u2221","\\measuredangle",!0);v(y,L,P,"\u2204","\\nexists");v(y,L,P,"\u2127","\\mho");v(y,L,P,"\u2132","\\Finv",!0);v(y,L,P,"\u2141","\\Game",!0);v(y,L,P,"\u2035","\\backprime");v(y,L,P,"\u25B2","\\blacktriangle");v(y,L,P,"\u25BC","\\blacktriangledown");v(y,L,P,"\u25A0","\\blacksquare");v(y,L,P,"\u29EB","\\blacklozenge");v(y,L,P,"\u2605","\\bigstar");v(y,L,P,"\u2222","\\sphericalangle",!0);v(y,L,P,"\u2201","\\complement",!0);v(y,L,P,"\xF0","\\eth",!0);v(ne,x,P,"\xF0","\xF0");v(y,L,P,"\u2571","\\diagup");v(y,L,P,"\u2572","\\diagdown");v(y,L,P,"\u25A1","\\square");v(y,L,P,"\u25A1","\\Box");v(y,L,P,"\u25CA","\\Diamond");v(y,L,P,"\xA5","\\yen",!0);v(ne,L,P,"\xA5","\\yen",!0);v(y,L,P,"\u2713","\\checkmark",!0);v(ne,L,P,"\u2713","\\checkmark");v(y,L,P,"\u2136","\\beth",!0);v(y,L,P,"\u2138","\\daleth",!0);v(y,L,P,"\u2137","\\gimel",!0);v(y,L,P,"\u03DD","\\digamma",!0);v(y,L,P,"\u03F0","\\varkappa");v(y,L,Mr,"\u250C","\\@ulcorner",!0);v(y,L,qn,"\u2510","\\@urcorner",!0);v(y,L,Mr,"\u2514","\\@llcorner",!0);v(y,L,qn,"\u2518","\\@lrcorner",!0);v(y,L,N,"\u2266","\\leqq",!0);v(y,L,N,"\u2A7D","\\leqslant",!0);v(y,L,N,"\u2A95","\\eqslantless",!0);v(y,L,N,"\u2272","\\lesssim",!0);v(y,L,N,"\u2A85","\\lessapprox",!0);v(y,L,N,"\u224A","\\approxeq",!0);v(y,L,Te,"\u22D6","\\lessdot");v(y,L,N,"\u22D8","\\lll",!0);v(y,L,N,"\u2276","\\lessgtr",!0);v(y,L,N,"\u22DA","\\lesseqgtr",!0);v(y,L,N,"\u2A8B","\\lesseqqgtr",!0);v(y,L,N,"\u2251","\\doteqdot");v(y,L,N,"\u2253","\\risingdotseq",!0);v(y,L,N,"\u2252","\\fallingdotseq",!0);v(y,L,N,"\u223D","\\backsim",!0);v(y,L,N,"\u22CD","\\backsimeq",!0);v(y,L,N,"\u2AC5","\\subseteqq",!0);v(y,L,N,"\u22D0","\\Subset",!0);v(y,L,N,"\u228F","\\sqsubset",!0);v(y,L,N,"\u227C","\\preccurlyeq",!0);v(y,L,N,"\u22DE","\\curlyeqprec",!0);v(y,L,N,"\u227E","\\precsim",!0);v(y,L,N,"\u2AB7","\\precapprox",!0);v(y,L,N,"\u22B2","\\vartriangleleft");v(y,L,N,"\u22B4","\\trianglelefteq");v(y,L,N,"\u22A8","\\vDash",!0);v(y,L,N,"\u22AA","\\Vvdash",!0);v(y,L,N,"\u2323","\\smallsmile");v(y,L,N,"\u2322","\\smallfrown");v(y,L,N,"\u224F","\\bumpeq",!0);v(y,L,N,"\u224E","\\Bumpeq",!0);v(y,L,N,"\u2267","\\geqq",!0);v(y,L,N,"\u2A7E","\\geqslant",!0);v(y,L,N,"\u2A96","\\eqslantgtr",!0);v(y,L,N,"\u2273","\\gtrsim",!0);v(y,L,N,"\u2A86","\\gtrapprox",!0);v(y,L,Te,"\u22D7","\\gtrdot");v(y,L,N,"\u22D9","\\ggg",!0);v(y,L,N,"\u2277","\\gtrless",!0);v(y,L,N,"\u22DB","\\gtreqless",!0);v(y,L,N,"\u2A8C","\\gtreqqless",!0);v(y,L,N,"\u2256","\\eqcirc",!0);v(y,L,N,"\u2257","\\circeq",!0);v(y,L,N,"\u225C","\\triangleq",!0);v(y,L,N,"\u223C","\\thicksim");v(y,L,N,"\u2248","\\thickapprox");v(y,L,N,"\u2AC6","\\supseteqq",!0);v(y,L,N,"\u22D1","\\Supset",!0);v(y,L,N,"\u2290","\\sqsupset",!0);v(y,L,N,"\u227D","\\succcurlyeq",!0);v(y,L,N,"\u22DF","\\curlyeqsucc",!0);v(y,L,N,"\u227F","\\succsim",!0);v(y,L,N,"\u2AB8","\\succapprox",!0);v(y,L,N,"\u22B3","\\vartriangleright");v(y,L,N,"\u22B5","\\trianglerighteq");v(y,L,N,"\u22A9","\\Vdash",!0);v(y,L,N,"\u2223","\\shortmid");v(y,L,N,"\u2225","\\shortparallel");v(y,L,N,"\u226C","\\between",!0);v(y,L,N,"\u22D4","\\pitchfork",!0);v(y,L,N,"\u221D","\\varpropto");v(y,L,N,"\u25C0","\\blacktriangleleft");v(y,L,N,"\u2234","\\therefore",!0);v(y,L,N,"\u220D","\\backepsilon");v(y,L,N,"\u25B6","\\blacktriangleright");v(y,L,N,"\u2235","\\because",!0);v(y,L,N,"\u22D8","\\llless");v(y,L,N,"\u22D9","\\gggtr");v(y,L,Te,"\u22B2","\\lhd");v(y,L,Te,"\u22B3","\\rhd");v(y,L,N,"\u2242","\\eqsim",!0);v(y,x,N,"\u22C8","\\Join");v(y,L,N,"\u2251","\\Doteq",!0);v(y,L,Te,"\u2214","\\dotplus",!0);v(y,L,Te,"\u2216","\\smallsetminus");v(y,L,Te,"\u22D2","\\Cap",!0);v(y,L,Te,"\u22D3","\\Cup",!0);v(y,L,Te,"\u2A5E","\\doublebarwedge",!0);v(y,L,Te,"\u229F","\\boxminus",!0);v(y,L,Te,"\u229E","\\boxplus",!0);v(y,L,Te,"\u22C7","\\divideontimes",!0);v(y,L,Te,"\u22C9","\\ltimes",!0);v(y,L,Te,"\u22CA","\\rtimes",!0);v(y,L,Te,"\u22CB","\\leftthreetimes",!0);v(y,L,Te,"\u22CC","\\rightthreetimes",!0);v(y,L,Te,"\u22CF","\\curlywedge",!0);v(y,L,Te,"\u22CE","\\curlyvee",!0);v(y,L,Te,"\u229D","\\circleddash",!0);v(y,L,Te,"\u229B","\\circledast",!0);v(y,L,Te,"\u22C5","\\centerdot");v(y,L,Te,"\u22BA","\\intercal",!0);v(y,L,Te,"\u22D2","\\doublecap");v(y,L,Te,"\u22D3","\\doublecup");v(y,L,Te,"\u22A0","\\boxtimes",!0);v(y,L,N,"\u21E2","\\dashrightarrow",!0);v(y,L,N,"\u21E0","\\dashleftarrow",!0);v(y,L,N,"\u21C7","\\leftleftarrows",!0);v(y,L,N,"\u21C6","\\leftrightarrows",!0);v(y,L,N,"\u21DA","\\Lleftarrow",!0);v(y,L,N,"\u219E","\\twoheadleftarrow",!0);v(y,L,N,"\u21A2","\\leftarrowtail",!0);v(y,L,N,"\u21AB","\\looparrowleft",!0);v(y,L,N,"\u21CB","\\leftrightharpoons",!0);v(y,L,N,"\u21B6","\\curvearrowleft",!0);v(y,L,N,"\u21BA","\\circlearrowleft",!0);v(y,L,N,"\u21B0","\\Lsh",!0);v(y,L,N,"\u21C8","\\upuparrows",!0);v(y,L,N,"\u21BF","\\upharpoonleft",!0);v(y,L,N,"\u21C3","\\downharpoonleft",!0);v(y,x,N,"\u22B6","\\origof",!0);v(y,x,N,"\u22B7","\\imageof",!0);v(y,L,N,"\u22B8","\\multimap",!0);v(y,L,N,"\u21AD","\\leftrightsquigarrow",!0);v(y,L,N,"\u21C9","\\rightrightarrows",!0);v(y,L,N,"\u21C4","\\rightleftarrows",!0);v(y,L,N,"\u21A0","\\twoheadrightarrow",!0);v(y,L,N,"\u21A3","\\rightarrowtail",!0);v(y,L,N,"\u21AC","\\looparrowright",!0);v(y,L,N,"\u21B7","\\curvearrowright",!0);v(y,L,N,"\u21BB","\\circlearrowright",!0);v(y,L,N,"\u21B1","\\Rsh",!0);v(y,L,N,"\u21CA","\\downdownarrows",!0);v(y,L,N,"\u21BE","\\upharpoonright",!0);v(y,L,N,"\u21C2","\\downharpoonright",!0);v(y,L,N,"\u21DD","\\rightsquigarrow",!0);v(y,L,N,"\u21DD","\\leadsto");v(y,L,N,"\u21DB","\\Rrightarrow",!0);v(y,L,N,"\u21BE","\\restriction");v(y,x,P,"\u2018","`");v(y,x,P,"$","\\$");v(ne,x,P,"$","\\$");v(ne,x,P,"$","\\textdollar");v(y,x,P,"%","\\%");v(ne,x,P,"%","\\%");v(y,x,P,"_","\\_");v(ne,x,P,"_","\\_");v(ne,x,P,"_","\\textunderscore");v(y,x,P,"\u2220","\\angle",!0);v(y,x,P,"\u221E","\\infty",!0);v(y,x,P,"\u2032","\\prime");v(y,x,P,"\u25B3","\\triangle");v(y,x,P,"\u0393","\\Gamma",!0);v(y,x,P,"\u0394","\\Delta",!0);v(y,x,P,"\u0398","\\Theta",!0);v(y,x,P,"\u039B","\\Lambda",!0);v(y,x,P,"\u039E","\\Xi",!0);v(y,x,P,"\u03A0","\\Pi",!0);v(y,x,P,"\u03A3","\\Sigma",!0);v(y,x,P,"\u03A5","\\Upsilon",!0);v(y,x,P,"\u03A6","\\Phi",!0);v(y,x,P,"\u03A8","\\Psi",!0);v(y,x,P,"\u03A9","\\Omega",!0);v(y,x,P,"A","\u0391");v(y,x,P,"B","\u0392");v(y,x,P,"E","\u0395");v(y,x,P,"Z","\u0396");v(y,x,P,"H","\u0397");v(y,x,P,"I","\u0399");v(y,x,P,"K","\u039A");v(y,x,P,"M","\u039C");v(y,x,P,"N","\u039D");v(y,x,P,"O","\u039F");v(y,x,P,"P","\u03A1");v(y,x,P,"T","\u03A4");v(y,x,P,"X","\u03A7");v(y,x,P,"\xAC","\\neg",!0);v(y,x,P,"\xAC","\\lnot");v(y,x,P,"\u22A4","\\top");v(y,x,P,"\u22A5","\\bot");v(y,x,P,"\u2205","\\emptyset");v(y,L,P,"\u2205","\\varnothing");v(y,x,Ke,"\u03B1","\\alpha",!0);v(y,x,Ke,"\u03B2","\\beta",!0);v(y,x,Ke,"\u03B3","\\gamma",!0);v(y,x,Ke,"\u03B4","\\delta",!0);v(y,x,Ke,"\u03F5","\\epsilon",!0);v(y,x,Ke,"\u03B6","\\zeta",!0);v(y,x,Ke,"\u03B7","\\eta",!0);v(y,x,Ke,"\u03B8","\\theta",!0);v(y,x,Ke,"\u03B9","\\iota",!0);v(y,x,Ke,"\u03BA","\\kappa",!0);v(y,x,Ke,"\u03BB","\\lambda",!0);v(y,x,Ke,"\u03BC","\\mu",!0);v(y,x,Ke,"\u03BD","\\nu",!0);v(y,x,Ke,"\u03BE","\\xi",!0);v(y,x,Ke,"\u03BF","\\omicron",!0);v(y,x,Ke,"\u03C0","\\pi",!0);v(y,x,Ke,"\u03C1","\\rho",!0);v(y,x,Ke,"\u03C3","\\sigma",!0);v(y,x,Ke,"\u03C4","\\tau",!0);v(y,x,Ke,"\u03C5","\\upsilon",!0);v(y,x,Ke,"\u03D5","\\phi",!0);v(y,x,Ke,"\u03C7","\\chi",!0);v(y,x,Ke,"\u03C8","\\psi",!0);v(y,x,Ke,"\u03C9","\\omega",!0);v(y,x,Ke,"\u03B5","\\varepsilon",!0);v(y,x,Ke,"\u03D1","\\vartheta",!0);v(y,x,Ke,"\u03D6","\\varpi",!0);v(y,x,Ke,"\u03F1","\\varrho",!0);v(y,x,Ke,"\u03C2","\\varsigma",!0);v(y,x,Ke,"\u03C6","\\varphi",!0);v(y,x,Te,"\u2217","*",!0);v(y,x,Te,"+","+");v(y,x,Te,"\u2212","-",!0);v(y,x,Te,"\u22C5","\\cdot",!0);v(y,x,Te,"\u2218","\\circ",!0);v(y,x,Te,"\xF7","\\div",!0);v(y,x,Te,"\xB1","\\pm",!0);v(y,x,Te,"\xD7","\\times",!0);v(y,x,Te,"\u2229","\\cap",!0);v(y,x,Te,"\u222A","\\cup",!0);v(y,x,Te,"\u2216","\\setminus",!0);v(y,x,Te,"\u2227","\\land");v(y,x,Te,"\u2228","\\lor");v(y,x,Te,"\u2227","\\wedge",!0);v(y,x,Te,"\u2228","\\vee",!0);v(y,x,P,"\u221A","\\surd");v(y,x,Mr,"\u27E8","\\langle",!0);v(y,x,Mr,"\u2223","\\lvert");v(y,x,Mr,"\u2225","\\lVert");v(y,x,qn,"?","?");v(y,x,qn,"!","!");v(y,x,qn,"\u27E9","\\rangle",!0);v(y,x,qn,"\u2223","\\rvert");v(y,x,qn,"\u2225","\\rVert");v(y,x,N,"=","=");v(y,x,N,":",":");v(y,x,N,"\u2248","\\approx",!0);v(y,x,N,"\u2245","\\cong",!0);v(y,x,N,"\u2265","\\ge");v(y,x,N,"\u2265","\\geq",!0);v(y,x,N,"\u2190","\\gets");v(y,x,N,">","\\gt",!0);v(y,x,N,"\u2208","\\in",!0);v(y,x,N,"\uE020","\\@not");v(y,x,N,"\u2282","\\subset",!0);v(y,x,N,"\u2283","\\supset",!0);v(y,x,N,"\u2286","\\subseteq",!0);v(y,x,N,"\u2287","\\supseteq",!0);v(y,L,N,"\u2288","\\nsubseteq",!0);v(y,L,N,"\u2289","\\nsupseteq",!0);v(y,x,N,"\u22A8","\\models");v(y,x,N,"\u2190","\\leftarrow",!0);v(y,x,N,"\u2264","\\le");v(y,x,N,"\u2264","\\leq",!0);v(y,x,N,"<","\\lt",!0);v(y,x,N,"\u2192","\\rightarrow",!0);v(y,x,N,"\u2192","\\to");v(y,L,N,"\u2271","\\ngeq",!0);v(y,L,N,"\u2270","\\nleq",!0);v(y,x,ba,"\xA0","\\ ");v(y,x,ba,"\xA0","\\space");v(y,x,ba,"\xA0","\\nobreakspace");v(ne,x,ba,"\xA0","\\ ");v(ne,x,ba,"\xA0"," ");v(ne,x,ba,"\xA0","\\space");v(ne,x,ba,"\xA0","\\nobreakspace");v(y,x,ba,null,"\\nobreak");v(y,x,ba,null,"\\allowbreak");v(y,x,lv,",",",");v(y,x,lv,";",";");v(y,L,Te,"\u22BC","\\barwedge",!0);v(y,L,Te,"\u22BB","\\veebar",!0);v(y,x,Te,"\u2299","\\odot",!0);v(y,x,Te,"\u2295","\\oplus",!0);v(y,x,Te,"\u2297","\\otimes",!0);v(y,x,P,"\u2202","\\partial",!0);v(y,x,Te,"\u2298","\\oslash",!0);v(y,L,Te,"\u229A","\\circledcirc",!0);v(y,L,Te,"\u22A1","\\boxdot",!0);v(y,x,Te,"\u25B3","\\bigtriangleup");v(y,x,Te,"\u25BD","\\bigtriangledown");v(y,x,Te,"\u2020","\\dagger");v(y,x,Te,"\u22C4","\\diamond");v(y,x,Te,"\u22C6","\\star");v(y,x,Te,"\u25C3","\\triangleleft");v(y,x,Te,"\u25B9","\\triangleright");v(y,x,Mr,"{","\\{");v(ne,x,P,"{","\\{");v(ne,x,P,"{","\\textbraceleft");v(y,x,qn,"}","\\}");v(ne,x,P,"}","\\}");v(ne,x,P,"}","\\textbraceright");v(y,x,Mr,"{","\\lbrace");v(y,x,qn,"}","\\rbrace");v(y,x,Mr,"[","\\lbrack",!0);v(ne,x,P,"[","\\lbrack",!0);v(y,x,qn,"]","\\rbrack",!0);v(ne,x,P,"]","\\rbrack",!0);v(y,x,Mr,"(","\\lparen",!0);v(y,x,qn,")","\\rparen",!0);v(ne,x,P,"<","\\textless",!0);v(ne,x,P,">","\\textgreater",!0);v(y,x,Mr,"\u230A","\\lfloor",!0);v(y,x,qn,"\u230B","\\rfloor",!0);v(y,x,Mr,"\u2308","\\lceil",!0);v(y,x,qn,"\u2309","\\rceil",!0);v(y,x,P,"\\","\\backslash");v(y,x,P,"\u2223","|");v(y,x,P,"\u2223","\\vert");v(ne,x,P,"|","\\textbar",!0);v(y,x,P,"\u2225","\\|");v(y,x,P,"\u2225","\\Vert");v(ne,x,P,"\u2225","\\textbardbl");v(ne,x,P,"~","\\textasciitilde");v(ne,x,P,"\\","\\textbackslash");v(ne,x,P,"^","\\textasciicircum");v(y,x,N,"\u2191","\\uparrow",!0);v(y,x,N,"\u21D1","\\Uparrow",!0);v(y,x,N,"\u2193","\\downarrow",!0);v(y,x,N,"\u21D3","\\Downarrow",!0);v(y,x,N,"\u2195","\\updownarrow",!0);v(y,x,N,"\u21D5","\\Updownarrow",!0);v(y,x,Oi,"\u2210","\\coprod");v(y,x,Oi,"\u22C1","\\bigvee");v(y,x,Oi,"\u22C0","\\bigwedge");v(y,x,Oi,"\u2A04","\\biguplus");v(y,x,Oi,"\u22C2","\\bigcap");v(y,x,Oi,"\u22C3","\\bigcup");v(y,x,Oi,"\u222B","\\int");v(y,x,Oi,"\u222B","\\intop");v(y,x,Oi,"\u222C","\\iint");v(y,x,Oi,"\u222D","\\iiint");v(y,x,Oi,"\u220F","\\prod");v(y,x,Oi,"\u2211","\\sum");v(y,x,Oi,"\u2A02","\\bigotimes");v(y,x,Oi,"\u2A01","\\bigoplus");v(y,x,Oi,"\u2A00","\\bigodot");v(y,x,Oi,"\u222E","\\oint");v(y,x,Oi,"\u222F","\\oiint");v(y,x,Oi,"\u2230","\\oiiint");v(y,x,Oi,"\u2A06","\\bigsqcup");v(y,x,Oi,"\u222B","\\smallint");v(ne,x,Bh,"\u2026","\\textellipsis");v(y,x,Bh,"\u2026","\\mathellipsis");v(ne,x,Bh,"\u2026","\\ldots",!0);v(y,x,Bh,"\u2026","\\ldots",!0);v(y,x,Bh,"\u22EF","\\@cdots",!0);v(y,x,Bh,"\u22F1","\\ddots",!0);v(y,x,P,"\u22EE","\\varvdots");v(y,x,hi,"\u02CA","\\acute");v(y,x,hi,"\u02CB","\\grave");v(y,x,hi,"\xA8","\\ddot");v(y,x,hi,"~","\\tilde");v(y,x,hi,"\u02C9","\\bar");v(y,x,hi,"\u02D8","\\breve");v(y,x,hi,"\u02C7","\\check");v(y,x,hi,"^","\\hat");v(y,x,hi,"\u20D7","\\vec");v(y,x,hi,"\u02D9","\\dot");v(y,x,hi,"\u02DA","\\mathring");v(y,x,Ke,"\uE131","\\@imath");v(y,x,Ke,"\uE237","\\@jmath");v(y,x,P,"\u0131","\u0131");v(y,x,P,"\u0237","\u0237");v(ne,x,P,"\u0131","\\i",!0);v(ne,x,P,"\u0237","\\j",!0);v(ne,x,P,"\xDF","\\ss",!0);v(ne,x,P,"\xE6","\\ae",!0);v(ne,x,P,"\u0153","\\oe",!0);v(ne,x,P,"\xF8","\\o",!0);v(ne,x,P,"\xC6","\\AE",!0);v(ne,x,P,"\u0152","\\OE",!0);v(ne,x,P,"\xD8","\\O",!0);v(ne,x,hi,"\u02CA","\\'");v(ne,x,hi,"\u02CB","\\`");v(ne,x,hi,"\u02C6","\\^");v(ne,x,hi,"\u02DC","\\~");v(ne,x,hi,"\u02C9","\\=");v(ne,x,hi,"\u02D8","\\u");v(ne,x,hi,"\u02D9","\\.");v(ne,x,hi,"\xB8","\\c");v(ne,x,hi,"\u02DA","\\r");v(ne,x,hi,"\u02C7","\\v");v(ne,x,hi,"\xA8",'\\"');v(ne,x,hi,"\u02DD","\\H");v(ne,x,hi,"\u25EF","\\textcircled");var OO={"--":!0,"---":!0,"``":!0,"''":!0};v(ne,x,P,"\u2013","--",!0);v(ne,x,P,"\u2013","\\textendash");v(ne,x,P,"\u2014","---",!0);v(ne,x,P,"\u2014","\\textemdash");v(ne,x,P,"\u2018","`",!0);v(ne,x,P,"\u2018","\\textquoteleft");v(ne,x,P,"\u2019","'",!0);v(ne,x,P,"\u2019","\\textquoteright");v(ne,x,P,"\u201C","``",!0);v(ne,x,P,"\u201C","\\textquotedblleft");v(ne,x,P,"\u201D","''",!0);v(ne,x,P,"\u201D","\\textquotedblright");v(y,x,P,"\xB0","\\degree",!0);v(ne,x,P,"\xB0","\\degree");v(ne,x,P,"\xB0","\\textdegree",!0);v(y,x,P,"\xA3","\\pounds");v(y,x,P,"\xA3","\\mathsterling",!0);v(ne,x,P,"\xA3","\\pounds");v(ne,x,P,"\xA3","\\textsterling",!0);v(y,L,P,"\u2720","\\maltese");v(ne,L,P,"\u2720","\\maltese");var nO='0123456789/@."';for(W_=0;W_<nO.length;W_++)M3=nO.charAt(W_),v(y,x,P,M3,M3);var M3,W_,rO='0123456789!@*()-=+";:?/.,';for(j_=0;j_<rO.length;j_++)O3=rO.charAt(j_),v(ne,x,P,O3,O3);var O3,j_,iv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(V_=0;V_<iv.length;V_++)d0=iv.charAt(V_),v(y,x,Ke,d0,d0),v(ne,x,P,d0,d0);var d0,V_;v(y,L,P,"C","\u2102");v(ne,L,P,"C","\u2102");v(y,L,P,"H","\u210D");v(ne,L,P,"H","\u210D");v(y,L,P,"N","\u2115");v(ne,L,P,"N","\u2115");v(y,L,P,"P","\u2119");v(ne,L,P,"P","\u2119");v(y,L,P,"Q","\u211A");v(ne,L,P,"Q","\u211A");v(y,L,P,"R","\u211D");v(ne,L,P,"R","\u211D");v(y,L,P,"Z","\u2124");v(ne,L,P,"Z","\u2124");v(y,x,Ke,"h","\u210E");v(ne,x,Ke,"h","\u210E");var $e="";for(Vn=0;Vn<iv.length;Vn++)ki=iv.charAt(Vn),$e=String.fromCharCode(55349,56320+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56372+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56424+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56580+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56736+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56788+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56840+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56944+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),Vn<26&&($e=String.fromCharCode(55349,56632+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e),$e=String.fromCharCode(55349,56476+Vn),v(y,x,Ke,ki,$e),v(ne,x,P,ki,$e));var ki,Vn;$e=String.fromCharCode(55349,56668);v(y,x,Ke,"k",$e);v(ne,x,P,"k",$e);for(yl=0;yl<10;yl++)ma=yl.toString(),$e=String.fromCharCode(55349,57294+yl),v(y,x,Ke,ma,$e),v(ne,x,P,ma,$e),$e=String.fromCharCode(55349,57314+yl),v(y,x,Ke,ma,$e),v(ne,x,P,ma,$e),$e=String.fromCharCode(55349,57324+yl),v(y,x,Ke,ma,$e),v(ne,x,P,ma,$e),$e=String.fromCharCode(55349,57334+yl),v(y,x,Ke,ma,$e),v(ne,x,P,ma,$e);var ma,yl,$3="\xD0\xDE\xFE";for(K_=0;K_<$3.length;K_++)h0=$3.charAt(K_),v(y,x,Ke,h0,h0),v(ne,x,P,h0,h0);var h0,K_,q_=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],oO=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],SX=function(e,t){var n=e.charCodeAt(0),r=e.charCodeAt(1),o=(n-55296)*1024+(r-56320)+65536,s=t==="math"?0:1;if(119808<=o&&o<120484){var a=Math.floor((o-119808)/26);return[q_[a][2],q_[a][s]]}else if(120782<=o&&o<=120831){var l=Math.floor((o-120782)/10);return[oO[l][2],oO[l][s]]}else{if(o===120485||o===120486)return[q_[0][2],q_[0][s]];if(120486<o&&o<120782)return["",""];throw new he("Unsupported character: "+e)}},cv=function(e,t,n){return Jt[n][e]&&Jt[n][e].replace&&(e=Jt[n][e].replace),{value:e,metrics:rS(e,t,n)}},Eo=function(e,t,n,r,o){var s=cv(e,t,n),a=s.metrics;e=s.value;var l;if(a){var c=a.italic;(n==="text"||r&&r.font==="mathit")&&(c=0),l=new mr(e,a.height,a.depth,c,a.skew,a.width,o)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+n+"'")),l=new mr(e,0,0,0,0,0,o);if(r){l.maxFontSize=r.sizeMultiplier,r.style.isTight()&&l.classes.push("mtight");var d=r.getColor();d&&(l.style.color=d)}return l},CX=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&cv(e,"Main-Bold",t).metrics?Eo(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||Jt[t][e].font==="main"?Eo(e,"Main-Regular",t,n,r):Eo(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},wX=function(e,t,n,r,o){return o!=="textord"&&cv(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},xX=function(e,t,n){var r=e.mode,o=e.text,s=["mord"],a=r==="math"||r==="text"&&t.font,l=a?t.font:t.fontFamily;if(o.charCodeAt(0)===55349){var[c,d]=SX(o,r);return Eo(o,c,r,t,s.concat(d))}else if(l){var h,u;if(l==="boldsymbol"){var m=wX(o,r,t,s,n);h=m.fontName,u=[m.fontClass]}else a?(h=HO[l].fontName,u=[l]):(h=G_(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(cv(o,h,r).metrics)return Eo(o,h,r,t,s.concat(u));if(OO.hasOwnProperty(o)&&h.slice(0,10)==="Typewriter"){for(var p=[],f=0;f<o.length;f++)p.push(Eo(o[f],h,r,t,s.concat(u)));return FO(p)}}if(n==="mathord")return Eo(o,"Math-Italic",r,t,s.concat(["mathnormal"]));if(n==="textord"){var _=Jt[r][o]&&Jt[r][o].font;if(_==="ams"){var b=G_("amsrm",t.fontWeight,t.fontShape);return Eo(o,b,r,t,s.concat("amsrm",t.fontWeight,t.fontShape))}else if(_==="main"||!_){var C=G_("textrm",t.fontWeight,t.fontShape);return Eo(o,C,r,t,s.concat(t.fontWeight,t.fontShape))}else{var T=G_(_,t.fontWeight,t.fontShape);return Eo(o,T,r,t,s.concat(T,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},EX=(i,e)=>{if(Cl(i.classes)!==Cl(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize)return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n in i.style)if(i.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;for(var r in e.style)if(e.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;return!0},TX=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof mr&&n instanceof mr&&EX(t,n)&&(t.text+=n.text,t.height=Math.max(t.height,n.height),t.depth=Math.max(t.depth,n.depth),t.italic=n.italic,i.splice(e+1,1),e--)}return i},oS=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var s=e.children[o];s.height>t&&(t=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},hr=function(e,t,n,r){var o=new Oc(e,t,n,r);return oS(o),o},PO=(i,e,t,n)=>new Oc(i,e,t,n),IX=function(e,t,n){var r=hr([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ve(r.height),r.maxFontSize=1,r},kX=function(e,t,n,r){var o=new g0(e,t,n,r);return oS(o),o},FO=function(e){var t=new Mc(e);return oS(t),t},AX=function(e,t){return e instanceof Mc?hr([],[e],t):e},LX=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,s=1;s<t.length;s++){var a=-t[s].shift-o-t[s].elem.depth,l=a-(t[s-1].elem.height+t[s-1].elem.depth);o=o+a,n.push({type:"kern",size:l}),n.push(t[s])}return{children:n,depth:r}}var c;if(e.positionType==="top"){for(var d=e.positionData,h=0;h<e.children.length;h++){var u=e.children[h];d-=u.type==="kern"?u.size:u.elem.height+u.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var m=e.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-m.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-m.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},NX=function(e,t){for(var{children:n,depth:r}=LX(e),o=0,s=0;s<n.length;s++){var a=n[s];if(a.type==="elem"){var l=a.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=hr(["pstrut"],[]);c.style.height=ve(o);for(var d=[],h=r,u=r,m=r,p=0;p<n.length;p++){var f=n[p];if(f.type==="kern")m+=f.size;else{var _=f.elem,b=f.wrapperClasses||[],C=f.wrapperStyle||{},T=hr(b,[c,_],void 0,C);T.style.top=ve(-o-m-_.depth),f.marginLeft&&(T.style.marginLeft=f.marginLeft),f.marginRight&&(T.style.marginRight=f.marginRight),d.push(T),m+=_.height+_.depth}h=Math.min(h,m),u=Math.max(u,m)}var w=hr(["vlist"],d);w.style.height=ve(u);var A;if(h<0){var O=hr([],[]),D=hr(["vlist"],[O]);D.style.height=ve(-h);var j=hr(["vlist-s"],[new mr("\u200B")]);A=[hr(["vlist-r"],[w,j]),hr(["vlist-r"],[D])]}else A=[hr(["vlist-r"],[w])];var q=hr(["vlist-t"],A);return A.length===2&&q.classes.push("vlist-t2"),q.height=u,q.depth=-h,q},RX=(i,e)=>{var t=hr(["mspace"],[],e),n=gi(i,e);return t.style.marginRight=ve(n),t},G_=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}var o;return t==="textbf"&&n==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",r+"-"+o},HO={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},BO={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},DX=function(e,t){var[n,r,o]=BO[e],s=new ps(n),a=new To([s],{width:ve(r),height:ve(o),style:"width:"+ve(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=PO(["overlay"],[a],t);return l.height=o,l.style.height=ve(o),l.style.width=ve(r),l},z={fontMap:HO,makeSymbol:Eo,mathsym:CX,makeSpan:hr,makeSvgSpan:PO,makeLineSpan:IX,makeAnchor:kX,makeFragment:FO,wrapFragment:AX,makeVList:NX,makeOrd:xX,makeGlue:RX,staticSvg:DX,svgData:BO,tryCombineChars:TX},fi={number:3,unit:"mu"},Rc={number:4,unit:"mu"},pa={number:5,unit:"mu"},MX={mord:{mop:fi,mbin:Rc,mrel:pa,minner:fi},mop:{mord:fi,mop:fi,mrel:pa,minner:fi},mbin:{mord:Rc,mop:Rc,mopen:Rc,minner:Rc},mrel:{mord:pa,mop:pa,mopen:pa,minner:pa},mopen:{},mclose:{mop:fi,mbin:Rc,mrel:pa,minner:fi},mpunct:{mord:fi,mop:fi,mrel:pa,mopen:fi,mclose:fi,mpunct:fi,minner:fi},minner:{mord:fi,mop:fi,mbin:Rc,mrel:pa,mopen:fi,mpunct:fi,minner:fi}},OX={mord:{mop:fi},mop:{mord:fi,mop:fi},mbin:{},mrel:{},mopen:{},mclose:{mop:fi},mpunct:{},minner:{mop:fi}},zO={},nv={},rv={};function xe(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:r},l=0;l<t.length;++l)zO[t[l]]=a;e&&(o&&(nv[e]=o),s&&(rv[e]=s))}function Pc(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;xe({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var ov=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Ai=function(e){return e.type==="ordgroup"?e.body:[e]},_a=z.makeSpan,PX=["leftmost","mbin","mopen","mrel","mop","mpunct"],FX=["rightmost","mrel","mclose","mpunct"],HX={display:je.DISPLAY,text:je.TEXT,script:je.SCRIPT,scriptscript:je.SCRIPTSCRIPT},BX={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},$i=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var o=[],s=0;s<e.length;s++){var a=Et(e[s],t);if(a instanceof Mc){var l=a.children;o.push(...l)}else o.push(a)}if(z.tryCombineChars(o),!n)return o;var c=t;if(e.length===1){var d=e[0];d.type==="sizing"?c=t.havingSize(d.size):d.type==="styling"&&(c=t.havingStyle(HX[d.style]))}var h=_a([r[0]||"leftmost"],[],t),u=_a([r[1]||"rightmost"],[],t),m=n==="root";return sO(o,(p,f)=>{var _=f.classes[0],b=p.classes[0];_==="mbin"&&Ge.contains(FX,b)?f.classes[0]="mord":b==="mbin"&&Ge.contains(PX,_)&&(p.classes[0]="mord")},{node:h},u,m),sO(o,(p,f)=>{var _=Y3(f),b=Y3(p),C=_&&b?p.hasClass("mtight")?OX[_][b]:MX[_][b]:null;if(C)return z.makeGlue(C,c)},{node:h},u,m),o},sO=function i(e,t,n,r,o){r&&e.push(r);for(var s=0;s<e.length;s++){var a=e[s],l=UO(a);if(l){i(l.children,t,n,null,o);continue}var c=!a.hasClass("mspace");if(c){var d=t(a,n.node);d&&(n.insertAfter?n.insertAfter(d):(e.unshift(d),s++))}c?n.node=a:o&&a.hasClass("newline")&&(n.node=_a(["leftmost"])),n.insertAfter=(h=>u=>{e.splice(h+1,0,u),s++})(s)}r&&e.pop()},UO=function(e){return e instanceof Mc||e instanceof g0||e instanceof Oc&&e.hasClass("enclosing")?e:null},zX=function i(e,t){var n=UO(e);if(n){var r=n.children;if(r.length){if(t==="right")return i(r[r.length-1],"right");if(t==="left")return i(r[0],"left")}}return e},Y3=function(e,t){return e?(t&&(e=zX(e,t)),BX[e.classes[0]]||null):null},v0=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return _a(t.concat(n))},Et=function(e,t,n){if(!e)return _a();if(nv[e.type]){var r=nv[e.type](e,t);if(n&&t.size!==n.size){r=_a(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new he("Got group of unknown type: '"+e.type+"'")};function $_(i,e){var t=_a(["base"],i,e),n=_a(["strut"]);return n.style.height=ve(t.height+t.depth),t.depth&&(n.style.verticalAlign=ve(-t.depth)),t.children.unshift(n),t}function X3(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=$i(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var o=[],s=[],a=0;a<n.length;a++)if(s.push(n[a]),n[a].hasClass("mbin")||n[a].hasClass("mrel")||n[a].hasClass("allowbreak")){for(var l=!1;a<n.length-1&&n[a+1].hasClass("mspace")&&!n[a+1].hasClass("newline");)a++,s.push(n[a]),n[a].hasClass("nobreak")&&(l=!0);l||(o.push($_(s,e)),s=[])}else n[a].hasClass("newline")&&(s.pop(),s.length>0&&(o.push($_(s,e)),s=[]),o.push(n[a]));s.length>0&&o.push($_(s,e));var c;t?(c=$_($i(t,e,!0)),c.classes=["tag"],o.push(c)):r&&o.push(r);var d=_a(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var h=c.children[0];h.style.height=ve(d.height+d.depth),d.depth&&(h.style.verticalAlign=ve(-d.depth))}return d}function WO(i){return new Mc(i)}var ur=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Cl(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Ge.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Ge.escape(Cl(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Dc=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ge.escape(this.toText())}toText(){return this.text}},Q3=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ve(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ve(this.width)+'"/>'}toText(){return this.character?this.character:" "}},se={MathNode:ur,TextNode:Dc,SpaceNode:Q3,newDocumentFragment:WO},oo=function(e,t,n){return Jt[t][e]&&Jt[t][e].replace&&e.charCodeAt(0)!==55349&&!(OO.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Jt[t][e].replace),new se.TextNode(e)},sS=function(e){return e.length===1?e[0]:new se.MathNode("mrow",e)},aS=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=e.text;if(Ge.contains(["\\imath","\\jmath"],o))return null;Jt[r][o]&&Jt[r][o].replace&&(o=Jt[r][o].replace);var s=z.fontMap[n].fontName;return rS(o,s,r)?z.fontMap[n].variant:null},pr=function(e,t,n){if(e.length===1){var r=$t(e[0],t);return n&&r instanceof ur&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],s,a=0;a<e.length;a++){var l=$t(e[a],t);if(l instanceof ur&&s instanceof ur){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mi"&&l.children.length===1&&s.type==="mn"){var c=l.children[0];if(c instanceof Dc&&c.text==="."){s.children.push(...l.children);continue}}else if(s.type==="mi"&&s.children.length===1){var d=s.children[0];if(d instanceof Dc&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof Dc&&h.text.length>0&&(h.text=h.text.slice(0,1)+"\u0338"+h.text.slice(1),o.pop())}}}o.push(l),s=l}return o},wl=function(e,t,n){return sS(pr(e,t,n))},$t=function(e,t){if(!e)return new se.MathNode("mrow");if(rv[e.type]){var n=rv[e.type](e,t);return n}else throw new he("Got group of unknown type: '"+e.type+"'")};function aO(i,e,t,n,r){var o=pr(i,t),s;o.length===1&&o[0]instanceof ur&&Ge.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new se.MathNode("mrow",o);var a=new se.MathNode("annotation",[new se.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new se.MathNode("semantics",[s,a]),c=new se.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=r?"katex":"katex-mathml";return z.makeSpan([d],[c])}var jO=function(e){return new tv({style:e.displayMode?je.DISPLAY:je.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},VO=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=z.makeSpan(n,[e])}return e},UX=function(e,t,n){var r=jO(n),o;if(n.output==="mathml")return aO(e,t,r,n.displayMode,!0);if(n.output==="html"){var s=X3(e,r);o=z.makeSpan(["katex"],[s])}else{var a=aO(e,t,r,n.displayMode,!1),l=X3(e,r);o=z.makeSpan(["katex"],[a,l])}return VO(o,n)},WX=function(e,t,n){var r=jO(n),o=X3(e,r),s=z.makeSpan(["katex"],[o]);return VO(s,n)},jX={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},VX=function(e){var t=new se.MathNode("mo",[new se.TextNode(jX[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},KX={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},qX=function(e){return e.type==="ordgroup"?e.body.length:1},GX=function(e,t){function n(){var a=4e5,l=e.label.slice(1);if(Ge.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=qX(c.base),h,u,m;if(d>5)l==="widehat"||l==="widecheck"?(h=420,a=2364,m=.42,u=l+"4"):(h=312,a=2340,m=.34,u="tilde4");else{var p=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],m=[0,.24,.3,.3,.36,.42][p],u=l+p):(a=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],m=[0,.26,.286,.3,.306,.34][p],u="tilde"+p)}var f=new ps(u),_=new To([f],{width:"100%",height:ve(m),viewBox:"0 0 "+a+" "+h,preserveAspectRatio:"none"});return{span:z.makeSvgSpan([],[_],t),minWidth:0,height:m}}else{var b=[],C=KX[l],[T,w,A]=C,O=A/1e3,D=T.length,j,q;if(D===1){var _e=C[3];j=["hide-tail"],q=[_e]}else if(D===2)j=["halfarrow-left","halfarrow-right"],q=["xMinYMin","xMaxYMin"];else if(D===3)j=["brace-left","brace-center","brace-right"],q=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+D+" children.");for(var J=0;J<D;J++){var ke=new ps(T[J]),Oe=new To([ke],{width:"400em",height:ve(O),viewBox:"0 0 "+a+" "+A,preserveAspectRatio:q[J]+" slice"}),Pe=z.makeSvgSpan([j[J]],[Oe],t);if(D===1)return{span:Pe,minWidth:w,height:O};Pe.style.height=ve(O),b.push(Pe)}return{span:z.makeSpan(["stretchy"],b,t),minWidth:w,height:O}}}var{span:r,minWidth:o,height:s}=n();return r.height=s,r.style.height=ve(s),o>0&&(r.style.minWidth=ve(o)),r},$X=function(e,t,n,r,o){var s,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(s=z.makeSpan(["stretchy",t],[],o),t==="fbox"){var l=o.color&&o.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new _0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new _0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new To(c,{width:"100%",height:ve(a)});s=z.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=ve(a),s},va={encloseSpan:$X,mathMLnode:VX,svgSpan:GX};function tt(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function lS(i){var e=dv(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function dv(i){return i&&(i.type==="atom"||yX.hasOwnProperty(i.type))?i:null}var cS=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=tt(i.base,"accent"),t=n.base,i.base=t,r=vX(Et(i,e)),i.base=n):(n=tt(i,"accent"),t=n.base);var o=Et(t,e.havingCrampedStyle()),s=n.isShifty&&Ge.isCharacterBox(t),a=0;if(s){var l=Ge.getBaseElem(t),c=Et(l,e.havingCrampedStyle());a=iO(c).skew}var d=n.label==="\\c",h=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),u;if(n.isStretchy)u=va.svgSpan(n,e),u=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:u,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ve(2*a)+")",marginLeft:ve(2*a)}:void 0}]},e);else{var m,p;n.label==="\\vec"?(m=z.staticSvg("vec",e),p=z.svgData.vec[1]):(m=z.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=iO(m),m.italic=0,p=m.width,d&&(h+=m.depth)),u=z.makeSpan(["accent-body"],[m]);var f=n.label==="\\textcircled";f&&(u.classes.push("accent-full"),h=o.height);var _=a;f||(_-=p/2),u.style.left=ve(_),n.label==="\\textcircled"&&(u.style.top=".2em"),u=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-h},{type:"elem",elem:u}]},e)}var b=z.makeSpan(["mord","accent"],[u],e);return r?(r.children[0]=b,r.height=Math.max(b.height,r.height),r.classes[0]="mord",r):b},KO=(i,e)=>{var t=i.isStretchy?va.mathMLnode(i.label):new se.MathNode("mo",[oo(i.label,i.mode)]),n=new se.MathNode("mover",[$t(i.base,e),t]);return n.setAttribute("accent","true"),n},YX=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));xe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(i,e)=>{var t=ov(e[0]),n=!YX.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:cS,mathmlBuilder:KO});xe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:cS,mathmlBuilder:KO});xe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=Et(i.base,e),n=va.svgSpan(i,e),r=i.label==="\\utilde"?.12:0,o=z.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]},e);return z.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=va.mathMLnode(i.label),n=new se.MathNode("munder",[$t(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var Y_=i=>{var e=new se.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};xe({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=z.wrapFragment(Et(i.body,n,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(o+"-arrow-pad");var s;i.below&&(n=e.havingStyle(t.sub()),s=z.wrapFragment(Et(i.below,n,e),e),s.classes.push(o+"-arrow-pad"));var a=va.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(c-=r.depth);var d;if(s){var h=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:h}]},e)}else d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),z.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=va.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=Y_($t(i.body,e));if(i.below){var o=Y_($t(i.below,e));n=new se.MathNode("munderover",[t,o,r])}else n=new se.MathNode("mover",[t,r])}else if(i.below){var s=Y_($t(i.below,e));n=new se.MathNode("munder",[t,s])}else n=Y_(),n=new se.MathNode("mover",[t,n]);return n}});var XX=z.makeSpan;function qO(i,e){var t=$i(i.body,e,!0);return XX([i.mclass],t,e)}function GO(i,e){var t,n=pr(i.body,e);return i.mclass==="minner"?t=new se.MathNode("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new se.MathNode("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new se.MathNode("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}xe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Ai(r),isCharacterBox:Ge.isCharacterBox(r)}},htmlBuilder:qO,mathmlBuilder:GO});var hv=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};xe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:hv(e[0]),body:Ai(e[1]),isCharacterBox:Ge.isCharacterBox(e[1])}}});xe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],o=e[0],s;n!=="\\stackrel"?s=hv(r):s="mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ai(r)},l={type:"supsub",mode:o.mode,base:a,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:Ge.isCharacterBox(l)}},htmlBuilder:qO,mathmlBuilder:GO});xe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:hv(e[0]),body:Ai(e[0])}},htmlBuilder(i,e){var t=$i(i.body,e,!0),n=z.makeSpan([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=pr(i.body,e),n=new se.MathNode("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var QX={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},lO=()=>({type:"styling",body:[],mode:"math",style:"display"}),cO=i=>i.type==="textord"&&i.text==="@",JX=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function ZX(i,e,t){var n=QX[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,s,a]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function eQ(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new he("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],o=0;o<e.length;o++){for(var s=e[o],a=lO(),l=0;l<s.length;l++)if(!cO(s[l]))a.body.push(s[l]);else{n.push(a),l+=1;var c=lS(s[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var h=0;h<2;h++){for(var u=!0,m=l+1;m<s.length;m++){if(JX(s[m],c)){u=!1,l=m;break}if(cO(s[m]))throw new he("Missing a "+c+" character to complete a CD arrow.",s[m]);d[h].body.push(s[m])}if(u)throw new he("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new he('Expected one of "<>AV=|." after @',s[l]);var p=ZX(c,d,i),f={type:"styling",body:[p],mode:"math",style:"display"};n.push(f),a=lO()}o%2===0?n.push(a):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var _=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:_,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}xe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=z.wrapFragment(Et(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ve(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new se.MathNode("mrow",[$t(i.label,e)]);return t=new se.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new se.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});xe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=z.wrapFragment(Et(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new se.MathNode("mrow",[$t(i.fragment,e)])}});xe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=tt(e[0],"ordgroup"),r=n.body,o="",s=0;s<r.length;s++){var a=tt(r[s],"textord");o+=a.text}var l=parseInt(o),c;if(isNaN(l))throw new he("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new he("\\@char with invalid code point "+o);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:c}}});var $O=(i,e)=>{var t=$i(i.body,e.withColor(i.color),!1);return z.makeFragment(t)},YO=(i,e)=>{var t=pr(i.body,e.withColor(i.color)),n=new se.MathNode("mstyle",t);return n.setAttribute("mathcolor",i.color),n};xe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=tt(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:Ai(r)}},htmlBuilder:$O,mathmlBuilder:YO});xe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=tt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:o}},htmlBuilder:$O,mathmlBuilder:YO});xe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:r&&tt(r,"size").value}},htmlBuilder(i,e){var t=z.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ve(gi(i.size,e)))),t},mathmlBuilder(i,e){var t=new se.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ve(gi(i.size,e)))),t}});var J3={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},XO=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new he("Expected a control sequence",i);return e},tQ=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},QO=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};xe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(J3[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=J3[n.text]),tt(e.parseFunction(),"internal");throw new he("Invalid token after macro prefix",n)}});xe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new he("Expected a control sequence",n);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new he('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new he('Argument number "'+n.text+'" out of order');o++,a.push([])}else{if(n.text==="EOF")throw new he("Expected a macro definition");a[o].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:o,delimiters:a},t===J3[t]),{type:"internal",mode:e.mode}}});xe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=XO(e.gullet.popToken());e.gullet.consumeSpaces();var r=tQ(e);return QO(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});xe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=XO(e.gullet.popToken()),r=e.gullet.popToken(),o=e.gullet.popToken();return QO(e,n,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var u0=function(e,t,n){var r=Jt.math[e]&&Jt.math[e].replace,o=rS(r||e,t,n);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},dS=function(e,t,n,r){var o=n.havingBaseStyle(t),s=z.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},JO=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ve(o),e.height-=o,e.depth+=o},iQ=function(e,t,n,r,o,s){var a=z.makeSymbol(e,"Main-Regular",o,r),l=dS(a,t,r,s);return n&&JO(l,r,t),l},nQ=function(e,t,n,r){return z.makeSymbol(e,"Size"+t+"-Regular",n,r)},ZO=function(e,t,n,r,o,s){var a=nQ(e,t,o,r),l=dS(z.makeSpan(["delimsizing","size"+t],[a],r),je.TEXT,r,s);return n&&JO(l,r,je.TEXT),l},P3=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=z.makeSpan(["delimsizinginner",r],[z.makeSpan([],[z.makeSymbol(e,t,n)])]);return{type:"elem",elem:o}},F3=function(e,t,n){var r=us["Size4-Regular"][e.charCodeAt(0)]?us["Size4-Regular"][e.charCodeAt(0)][4]:us["Size1-Regular"][e.charCodeAt(0)][4],o=new ps("inner",hX(e,Math.round(1e3*t))),s=new To([o],{width:ve(r),height:ve(t),style:"width:"+ve(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=z.makeSvgSpan([],[s],n);return a.height=t,a.style.height=ve(t),a.style.width=ve(r),{type:"elem",elem:a}},Z3=.008,X_={type:"kern",size:-1*Z3},rQ=["|","\\lvert","\\rvert","\\vert"],oQ=["\\|","\\lVert","\\rVert","\\Vert"],eP=function(e,t,n,r,o,s){var a,l,c,d,h="",u=0;a=c=d=e,l=null;var m="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?a=c="\u23D0":e==="\\Downarrow"?a=c="\u2016":e==="\\updownarrow"?(a="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(a="\\Uparrow",c="\u2016",d="\\Downarrow"):Ge.contains(rQ,e)?(c="\u2223",h="vert",u=333):Ge.contains(oQ,e)?(c="\u2225",h="doublevert",u=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",m="Size4-Regular",h="lbrack",u=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",m="Size4-Regular",h="rbrack",u=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",m="Size4-Regular",h="lfloor",u=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",m="Size4-Regular",h="lceil",u=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",m="Size4-Regular",h="rfloor",u=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",m="Size4-Regular",h="rceil",u=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",m="Size4-Regular",h="lparen",u=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",m="Size4-Regular",h="rparen",u=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",m="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",m="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",m="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",m="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",m="Size4-Regular");var p=u0(a,m,o),f=p.height+p.depth,_=u0(c,m,o),b=_.height+_.depth,C=u0(d,m,o),T=C.height+C.depth,w=0,A=1;if(l!==null){var O=u0(l,m,o);w=O.height+O.depth,A=2}var D=f+T+w,j=Math.max(0,Math.ceil((t-D)/(A*b))),q=D+j*A*b,_e=r.fontMetrics().axisHeight;n&&(_e*=r.sizeMultiplier);var J=q/2-_e,ke=[];if(h.length>0){var Oe=q-f-T,Pe=Math.round(q*1e3),et=uX(h,Math.round(Oe*1e3)),B=new ps(h,et),Z=(u/1e3).toFixed(3)+"em",ee=(Pe/1e3).toFixed(3)+"em",V=new To([B],{width:Z,height:ee,viewBox:"0 0 "+u+" "+Pe}),H=z.makeSvgSpan([],[V],r);H.height=Pe/1e3,H.style.width=Z,H.style.height=ee,ke.push({type:"elem",elem:H})}else{if(ke.push(P3(d,m,o)),ke.push(X_),l===null){var U=q-f-T+2*Z3;ke.push(F3(c,U,r))}else{var X=(q-f-T-w)/2+2*Z3;ke.push(F3(c,X,r)),ke.push(X_),ke.push(P3(l,m,o)),ke.push(X_),ke.push(F3(c,X,r))}ke.push(X_),ke.push(P3(a,m,o))}var Tt=r.havingBaseStyle(je.TEXT),bi=z.makeVList({positionType:"bottom",positionData:J,children:ke},Tt);return dS(z.makeSpan(["delimsizing","mult"],[bi],Tt),je.TEXT,r,s)},H3=80,B3=.08,z3=function(e,t,n,r,o){var s=dX(e,r,n),a=new ps(e,s),l=new To([a],{width:"400em",height:ve(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return z.makeSvgSpan(["hide-tail"],[l],o)},sQ=function(e,t){var n=t.havingBaseSizing(),r=rP("\\surd",e*n.sizeMultiplier,nP,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,h;return r.type==="small"?(d=1e3+1e3*s+H3,e<1?o=1:e<1.4&&(o=.7),l=(1+s+B3)/o,c=(1+s)/o,a=z3("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",h=.833/o):r.type==="large"?(d=(1e3+H3)*m0[r.size],c=(m0[r.size]+s)/o,l=(m0[r.size]+s+B3)/o,a=z3("sqrtSize"+r.size,l,d,s,t),a.style.minWidth="1.02em",h=1/o):(l=e+s+B3,c=e+s,d=Math.floor(1e3*e+s)+H3,a=z3("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",h=1.056),a.height=c,a.style.height=ve(l),{span:a,advanceWidth:h,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},tP=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],aQ=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],iP=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],m0=[0,1.2,1.8,2.4,3],lQ=function(e,t,n,r,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Ge.contains(tP,e)||Ge.contains(iP,e))return ZO(e,t,!1,n,r,o);if(Ge.contains(aQ,e))return eP(e,m0[t],!1,n,r,o);throw new he("Illegal delimiter: '"+e+"'")},cQ=[{type:"small",style:je.SCRIPTSCRIPT},{type:"small",style:je.SCRIPT},{type:"small",style:je.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],dQ=[{type:"small",style:je.SCRIPTSCRIPT},{type:"small",style:je.SCRIPT},{type:"small",style:je.TEXT},{type:"stack"}],nP=[{type:"small",style:je.SCRIPTSCRIPT},{type:"small",style:je.SCRIPT},{type:"small",style:je.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],hQ=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},rP=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size),s=o;s<n.length&&n[s].type!=="stack";s++){var a=u0(e,hQ(n[s]),"math"),l=a.height+a.depth;if(n[s].type==="small"){var c=r.havingBaseStyle(n[s].style);l*=c.sizeMultiplier}if(l>t)return n[s]}return n[n.length-1]},oP=function(e,t,n,r,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;Ge.contains(iP,e)?a=cQ:Ge.contains(tP,e)?a=nP:a=dQ;var l=rP(e,t,a,r);return l.type==="small"?iQ(e,l.style,n,r,o,s):l.type==="large"?ZO(e,l.size,n,r,o,s):eP(e,t,n,r,o,s)},uQ=function(e,t,n,r,o,s){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,c=5/r.fontMetrics().ptPerEm,d=Math.max(t-a,n+a),h=Math.max(d/500*l,2*d-c);return oP(e,h,!0,r,o,s)},ga={sqrtImage:sQ,sizedDelim:lQ,sizeToMaxHeight:m0,customSizedDelim:oP,leftRightDelim:uQ},dO={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},mQ=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function uv(i,e){var t=dv(i);if(t&&Ge.contains(mQ,t.text))return t;throw t?new he("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new he("Invalid delimiter type '"+i.type+"'",i)}xe({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(i,e)=>{var t=uv(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:dO[i.funcName].size,mclass:dO[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?z.makeSpan([i.mclass]):ga.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(oo(i.delim,i.mode));var t=new se.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ve(ga.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function hO(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}xe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new he("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:uv(e[0],i).text,color:t}}});xe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=uv(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=tt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{hO(i);for(var t=$i(i.body,e,!0,["mopen","mclose"]),n=0,r=0,o=!1,s=0;s<t.length;s++)t[s].isMiddle?o=!0:(n=Math.max(t[s].height,n),r=Math.max(t[s].depth,r));n*=e.sizeMultiplier,r*=e.sizeMultiplier;var a;if(i.left==="."?a=v0(e,["mopen"]):a=ga.leftRightDelim(i.left,n,r,e,i.mode,["mopen"]),t.unshift(a),o)for(var l=1;l<t.length;l++){var c=t[l],d=c.isMiddle;d&&(t[l]=ga.leftRightDelim(d.delim,n,r,d.options,i.mode,[]))}var h;if(i.right===".")h=v0(e,["mclose"]);else{var u=i.rightColor?e.withColor(i.rightColor):e;h=ga.leftRightDelim(i.right,n,r,u,i.mode,["mclose"])}return t.push(h),z.makeSpan(["minner"],t,e)},mathmlBuilder:(i,e)=>{hO(i);var t=pr(i.body,e);if(i.left!=="."){var n=new se.MathNode("mo",[oo(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new se.MathNode("mo",[oo(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return sS(t)}});xe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=uv(e[0],i);if(!i.parser.leftrightDepth)throw new he("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=v0(e,[]);else{t=ga.sizedDelim(i.delim,1,e,i.mode,[]);var n={delim:i.delim,options:e};t.isMiddle=n}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?oo("|","text"):oo(i.delim,i.mode),n=new se.MathNode("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var hS=(i,e)=>{var t=z.wrapFragment(Et(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,o,s=0,a=Ge.isCharacterBox(i.body);if(n==="sout")o=z.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/r,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=gi({number:.6,unit:"pt"},e),c=gi({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var h=t.height+t.depth+l+c;t.style.paddingLeft=ve(h/2+l);var u=Math.floor(1e3*h*r),m=lX(u),p=new To([new ps("phase",m)],{width:"400em",height:ve(u/1e3),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});o=z.makeSvgSpan(["hide-tail"],[p],e),o.style.height=ve(h),s=t.depth+l+c}else{/cancel/.test(n)?a||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var f=0,_=0,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),f=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),_=f):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),f=4*b,_=Math.max(0,.25-t.depth)):(f=a?.2:0,_=f),o=va.encloseSpan(t,n,f,_,e),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ve(b)):n==="angl"&&b!==.049&&(o.style.borderTopWidth=ve(b),o.style.borderRightWidth=ve(b)),s=t.depth+_,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var C;if(i.backgroundColor)C=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var T=/cancel|phase/.test(n)?["svg-align"]:[];C=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:T}]},e)}return/cancel/.test(n)&&(C.height=t.height,C.depth=t.depth),/cancel/.test(n)&&!a?z.makeSpan(["mord","cancel-lap"],[C],e):z.makeSpan(["mord"],[C],e)},uS=(i,e)=>{var t=0,n=new se.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[$t(i.body,e)]);switch(i.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(i.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};xe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=tt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:o,body:s}},htmlBuilder:hS,mathmlBuilder:uS});xe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=tt(e[0],"color-token").color,s=tt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:hS,mathmlBuilder:uS});xe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});xe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:hS,mathmlBuilder:uS});xe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var sP={};function fs(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l<t.length;++l)sP[t[l]]=a;o&&(nv[e]=o),s&&(rv[e]=s)}var aP={};function E(i,e){aP[i]=e}function uO(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var mv=i=>{var e=i.parser.settings;if(!e.displayMode)throw new he("{"+i.envName+"} can be used only in display mode.")};function mS(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function xl(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:o,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:h,leqno:u}=e;if(i.gullet.beginGroup(),c||i.gullet.macros.set("\\cr","\\\\\\relax"),!s){var m=i.gullet.expandMacroAsText("\\arraystretch");if(m==null)s=1;else if(s=parseFloat(m),!s||s<0)throw new he("Invalid \\arraystretch: "+m)}i.gullet.beginGroup();var p=[],f=[p],_=[],b=[],C=l!=null?[]:void 0;function T(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function w(){C&&(i.gullet.macros.get("\\df@tag")?(C.push(i.subparse([new ms("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):C.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(T(),b.push(uO(i));;){var A=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),A={type:"ordgroup",mode:i.mode,body:A},t&&(A={type:"styling",mode:i.mode,style:t,body:[A]}),p.push(A);var O=i.fetch().text;if(O==="&"){if(h&&p.length===h){if(c||a)throw new he("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(O==="\\end"){w(),p.length===1&&A.type==="styling"&&A.body[0].body.length===0&&(f.length>1||!d)&&f.pop(),b.length<f.length+1&&b.push([]);break}else if(O==="\\\\"){i.consume();var D=void 0;i.gullet.future().text!==" "&&(D=i.parseSizeGroup(!0)),_.push(D?D.value:null),w(),b.push(uO(i)),p=[],f.push(p),T()}else throw new he("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:r,arraystretch:s,body:f,cols:o,rowGaps:_,hskipBeforeAndAfter:n,hLinesBeforeRow:b,colSeparationType:a,tags:C,leqno:u}}function pS(i){return i.slice(0,1)==="d"?"display":"text"}var gs=function(e,t){var n,r,o=e.body.length,s=e.hLinesBeforeRow,a=0,l=new Array(o),c=[],d=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),h=1/t.fontMetrics().ptPerEm,u=5*h;if(e.colSeparationType&&e.colSeparationType==="small"){var m=t.havingStyle(je.SCRIPT).sizeMultiplier;u=.2778*(m/t.sizeMultiplier)}var p=e.colSeparationType==="CD"?gi({number:3,unit:"ex"},t):12*h,f=3*h,_=e.arraystretch*p,b=.7*_,C=.3*_,T=0;function w(Xp){for(var Qp=0;Qp<Xp.length;++Qp)Qp>0&&(T+=.25),c.push({pos:T,isDashed:Xp[Qp]})}for(w(s[0]),n=0;n<e.body.length;++n){var A=e.body[n],O=b,D=C;a<A.length&&(a=A.length);var j=new Array(A.length);for(r=0;r<A.length;++r){var q=Et(A[r],t);D<q.depth&&(D=q.depth),O<q.height&&(O=q.height),j[r]=q}var _e=e.rowGaps[n],J=0;_e&&(J=gi(_e,t),J>0&&(J+=C,D<J&&(D=J),J=0)),e.addJot&&(D+=f),j.height=O,j.depth=D,T+=O,j.pos=T,T+=D+J,l[n]=j,w(s[n+1])}var ke=T/2+t.fontMetrics().axisHeight,Oe=e.cols||[],Pe=[],et,B,Z=[];if(e.tags&&e.tags.some(Xp=>Xp))for(n=0;n<o;++n){var ee=l[n],V=ee.pos-ke,H=e.tags[n],U=void 0;H===!0?U=z.makeSpan(["eqn-num"],[],t):H===!1?U=z.makeSpan([],[],t):U=z.makeSpan([],$i(H,t,!0),t),U.depth=ee.depth,U.height=ee.height,Z.push({type:"elem",elem:U,shift:V})}for(r=0,B=0;r<a||B<Oe.length;++r,++B){for(var X=Oe[B]||{},Tt=!0;X.type==="separator";){if(Tt||(et=z.makeSpan(["arraycolsep"],[]),et.style.width=ve(t.fontMetrics().doubleRuleSep),Pe.push(et)),X.separator==="|"||X.separator===":"){var bi=X.separator==="|"?"solid":"dashed",Zt=z.makeSpan(["vertical-separator"],[],t);Zt.style.height=ve(T),Zt.style.borderRightWidth=ve(d),Zt.style.borderRightStyle=bi,Zt.style.margin="0 "+ve(-d/2);var Mt=T-ke;Mt&&(Zt.style.verticalAlign=ve(-Mt)),Pe.push(Zt)}else throw new he("Invalid separator type: "+X.separator);B++,X=Oe[B]||{},Tt=!1}if(!(r>=a)){var Ii=void 0;(r>0||e.hskipBeforeAndAfter)&&(Ii=Ge.deflt(X.pregap,u),Ii!==0&&(et=z.makeSpan(["arraycolsep"],[]),et.style.width=ve(Ii),Pe.push(et)));var Ot=[];for(n=0;n<o;++n){var Hn=l[n],Cr=Hn[r];if(Cr){var $p=Hn.pos-ke;Cr.depth=Hn.depth,Cr.height=Hn.height,Ot.push({type:"elem",elem:Cr,shift:$p})}}Ot=z.makeVList({positionType:"individualShift",children:Ot},t),Ot=z.makeSpan(["col-align-"+(X.align||"c")],[Ot]),Pe.push(Ot),(r<a-1||e.hskipBeforeAndAfter)&&(Ii=Ge.deflt(X.postgap,u),Ii!==0&&(et=z.makeSpan(["arraycolsep"],[]),et.style.width=ve(Ii),Pe.push(et)))}}if(l=z.makeSpan(["mtable"],Pe),c.length>0){for(var Yp=z.makeLineSpan("hline",t,d),HW=z.makeLineSpan("hdashline",t,d),w2=[{type:"elem",elem:l,shift:0}];c.length>0;){var GE=c.pop(),$E=GE.pos-ke;GE.isDashed?w2.push({type:"elem",elem:HW,shift:$E}):w2.push({type:"elem",elem:Yp,shift:$E})}l=z.makeVList({positionType:"individualShift",children:w2},t)}if(Z.length===0)return z.makeSpan(["mord"],[l],t);var x2=z.makeVList({positionType:"individualShift",children:Z},t);return x2=z.makeSpan(["tag"],[x2],t),z.makeFragment([l,x2])},pQ={c:"center ",l:"left ",r:"right "},_s=function(e,t){for(var n=[],r=new se.MathNode("mtd",[],["mtr-glue"]),o=new se.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var a=e.body[s],l=[],c=0;c<a.length;c++)l.push(new se.MathNode("mtd",[$t(a[c],t)]));e.tags&&e.tags[s]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(o):l.push(o)),n.push(new se.MathNode("mtr",l))}var d=new se.MathNode("mtable",n),h=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",ve(h));var u="",m="";if(e.cols&&e.cols.length>0){var p=e.cols,f="",_=!1,b=0,C=p.length;p[0].type==="separator"&&(u+="top ",b=1),p[p.length-1].type==="separator"&&(u+="bottom ",C-=1);for(var T=b;T<C;T++)p[T].type==="align"?(m+=pQ[p[T].align],_&&(f+="none "),_=!0):p[T].type==="separator"&&_&&(f+=p[T].separator==="|"?"solid ":"dashed ",_=!1);d.setAttribute("columnalign",m.trim()),/[sd]/.test(f)&&d.setAttribute("columnlines",f.trim())}if(e.colSeparationType==="align"){for(var w=e.cols||[],A="",O=1;O<w.length;O++)A+=O%2?"0em ":"1em ";d.setAttribute("columnspacing",A.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var D="",j=e.hLinesBeforeRow;u+=j[0].length>0?"left ":"",u+=j[j.length-1].length>0?"right ":"";for(var q=1;q<j.length-1;q++)D+=j[q].length===0?"none ":j[q][0]?"dashed ":"solid ";return/[sd]/.test(D)&&d.setAttribute("rowlines",D.trim()),u!==""&&(d=new se.MathNode("menclose",[d]),d.setAttribute("notation",u.trim())),e.arraystretch&&e.arraystretch<1&&(d=new se.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},lP=function(e,t){e.envName.indexOf("ed")===-1&&mv(e);var n=[],r=e.envName.indexOf("at")>-1?"alignat":"align",o=e.envName==="split",s=xl(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:mS(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var d="",h=0;h<t[0].body.length;h++){var u=tt(t[0].body[h],"textord");d+=u.text}a=Number(d),l=a*2}var m=!l;s.body.forEach(function(b){for(var C=1;C<b.length;C+=2){var T=tt(b[C],"styling"),w=tt(T.body[0],"ordgroup");w.body.unshift(c)}if(m)l<b.length&&(l=b.length);else{var A=b.length/2;if(a<A)throw new he("Too many math in a row: "+("expected "+a+", but got "+A),b[0])}});for(var p=0;p<l;++p){var f="r",_=0;p%2===1?f="l":p>0&&m&&(_=1),n[p]={type:"align",align:f,pregap:_,postgap:0}}return s.colSeparationType=m?"align":"alignat",s};fs({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=dv(e[0]),n=t?[e[0]]:tt(e[0],"ordgroup").body,r=n.map(function(s){var a=lS(s),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new he("Unknown column alignment: "+l,s)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return xl(i.parser,o,pS(i.envName))},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,"lcr".indexOf(t)===-1)throw new he("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var o=xl(i.parser,n,pS(i.envName)),s=Math.max(0,...o.body.map(a=>a.length));return o.cols=new Array(s).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=xl(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=dv(e[0]),n=t?[e[0]]:tt(e[0],"ordgroup").body,r=n.map(function(s){var a=lS(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new he("Unknown column alignment: "+l,s)});if(r.length>1)throw new he("{subarray} can contain only one column");var o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=xl(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new he("{subarray} can contain only one column");return o},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=xl(i.parser,e,pS(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.indexOf("r")>-1?".":"\\{",right:i.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:lP,htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){Ge.contains(["gather","gather*"],i.envName)&&mv(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:mS(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return xl(i.parser,e,"display")},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:lP,htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){mv(i);var e={autoTag:mS(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return xl(i.parser,e,"display")},htmlBuilder:gs,mathmlBuilder:_s});fs({type:"array",names:["CD"],props:{numArgs:0},handler(i){return mv(i),eQ(i.parser)},htmlBuilder:gs,mathmlBuilder:_s});E("\\nonumber","\\gdef\\@eqnsw{0}");E("\\notag","\\nonumber");xe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new he(i.funcName+" valid only within array environment")}});var mO=sP;xe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new he("Invalid environment name",r);for(var o="",s=0;s<r.body.length;++s)o+=tt(r.body[s],"textord").text;if(n==="\\begin"){if(!mO.hasOwnProperty(o))throw new he("No such environment: "+o,r);var a=mO[o],{args:l,optArgs:c}=t.parseArguments("\\begin{"+o+"}",a),d={mode:t.mode,envName:o,parser:t},h=a.handler(d,l,c);t.expect("\\end",!1);var u=t.nextToken,m=tt(t.parseFunction(),"environment");if(m.name!==o)throw new he("Mismatch: \\begin{"+o+"} matched by \\end{"+m.name+"}",u);return h}return{type:"environment",mode:t.mode,name:o,nameGroup:r}}});var cP=(i,e)=>{var t=i.font,n=e.withFont(t);return Et(i.body,n)},dP=(i,e)=>{var t=i.font,n=e.withFont(t);return $t(i.body,n)},pO={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};xe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=ov(e[0]),o=n;return o in pO&&(o=pO[o]),{type:"font",mode:t.mode,font:o.slice(1),body:r}},htmlBuilder:cP,mathmlBuilder:dP});xe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0],r=Ge.isCharacterBox(n);return{type:"mclass",mode:t.mode,mclass:hv(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:r}}});xe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:o}=t,s=t.parseExpression(!0,r),a="math"+n.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:cP,mathmlBuilder:dP});var hP=(i,e)=>{var t=e;return i==="display"?t=t.id>=je.SCRIPT.id?t.text():je.DISPLAY:i==="text"&&t.size===je.DISPLAY.size?t=je.TEXT:i==="script"?t=je.SCRIPT:i==="scriptscript"&&(t=je.SCRIPTSCRIPT),t},fS=(i,e)=>{var t=hP(i.size,e.style),n=t.fracNum(),r=t.fracDen(),o;o=e.havingStyle(n);var s=Et(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}o=e.havingStyle(r);var c=Et(i.denom,o,e),d,h,u;i.hasBarLine?(i.barSize?(h=gi(i.barSize,e),d=z.makeLineSpan("frac-line",e,h)):d=z.makeLineSpan("frac-line",e),h=d.height,u=d.height):(d=null,h=0,u=e.fontMetrics().defaultRuleThickness);var m,p,f;t.size===je.DISPLAY.size||i.size==="display"?(m=e.fontMetrics().num1,h>0?p=3*u:p=7*u,f=e.fontMetrics().denom1):(h>0?(m=e.fontMetrics().num2,p=u):(m=e.fontMetrics().num3,p=3*u),f=e.fontMetrics().denom2);var _;if(d){var C=e.fontMetrics().axisHeight;m-s.depth-(C+.5*h)<p&&(m+=p-(m-s.depth-(C+.5*h))),C-.5*h-(c.height-f)<p&&(f+=p-(C-.5*h-(c.height-f)));var T=-(C-.5*h);_=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:f},{type:"elem",elem:d,shift:T},{type:"elem",elem:s,shift:-m}]},e)}else{var b=m-s.depth-(c.height-f);b<p&&(m+=.5*(p-b),f+=.5*(p-b)),_=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:f},{type:"elem",elem:s,shift:-m}]},e)}o=e.havingStyle(t),_.height*=o.sizeMultiplier/e.sizeMultiplier,_.depth*=o.sizeMultiplier/e.sizeMultiplier;var w;t.size===je.DISPLAY.size?w=e.fontMetrics().delim1:t.size===je.SCRIPTSCRIPT.size?w=e.havingStyle(je.SCRIPT).fontMetrics().delim2:w=e.fontMetrics().delim2;var A,O;return i.leftDelim==null?A=v0(e,["mopen"]):A=ga.customSizedDelim(i.leftDelim,w,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?O=z.makeSpan([]):i.rightDelim==null?O=v0(e,["mclose"]):O=ga.customSizedDelim(i.rightDelim,w,!0,e.havingStyle(t),i.mode,["mclose"]),z.makeSpan(["mord"].concat(o.sizingClasses(e)),[A,z.makeSpan(["mfrac"],[_]),O],e)},gS=(i,e)=>{var t=new se.MathNode("mfrac",[$t(i.numer,e),$t(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=gi(i.barSize,e);t.setAttribute("linethickness",ve(n))}var r=hP(i.size,e.style);if(r.size!==e.style.size){t=new se.MathNode("mstyle",[t]);var o=r.size===je.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",o),t.setAttribute("scriptlevel","0")}if(i.leftDelim!=null||i.rightDelim!=null){var s=[];if(i.leftDelim!=null){var a=new se.MathNode("mo",[new se.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new se.MathNode("mo",[new se.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return sS(s)}return t};xe({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1],s,a=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,a="(",l=")";break;case"\\\\bracefrac":s=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:r,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:fS,mathmlBuilder:gS});xe({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});xe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var fO=["display","text","script","scriptscript"],gO=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};xe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],o=ov(e[0]),s=o.type==="atom"&&o.family==="open"?gO(o.text):null,a=ov(e[1]),l=a.type==="atom"&&a.family==="close"?gO(a.text):null,c=tt(e[2],"size"),d,h=null;c.isBlank?d=!0:(h=c.value,d=h.number>0);var u="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var p=tt(m.body[0],"textord");u=fO[Number(p.text)]}}else m=tt(m,"textord"),u=fO[Number(m.text)];return{type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:d,barSize:h,leftDelim:s,rightDelim:l,size:u}},htmlBuilder:fS,mathmlBuilder:gS});xe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:tt(e[0],"size").value,token:r}}});xe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=GY(tt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:fS,mathmlBuilder:gS});var uP=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?Et(i.sup,e.havingStyle(t.sup()),e):Et(i.sub,e.havingStyle(t.sub()),e),r=tt(i.base,"horizBrace")):r=tt(i,"horizBrace");var o=Et(r.base,e.havingBaseStyle(je.DISPLAY)),s=va.svgSpan(r,e),a;if(r.isOver?(a=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),a.children[0].children[0].children[1].classes.push("svg-align")):(a=z.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),a.children[0].children[0].children[0].classes.push("svg-align")),n){var l=z.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);r.isOver?a=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=z.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return z.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)},fQ=(i,e)=>{var t=va.mathMLnode(i.label);return new se.MathNode(i.isOver?"mover":"munder",[$t(i.base,e),t])};xe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:uP,mathmlBuilder:fQ});xe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=tt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:Ai(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=$i(i.body,e,!1);return z.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=wl(i.body,e);return t instanceof ur||(t=new ur("mrow",[t])),t.setAttribute("href",i.href),t}});xe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=tt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],o=0;o<n.length;o++){var s=n[o];s==="~"&&(s="\\textasciitilde"),r.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:t.mode,font:"\\texttt",body:r};return{type:"href",mode:t.mode,href:n,body:Ai(a)}}});xe({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:Ai(e[0])}},htmlBuilder(i,e){var t=$i(i.body,e,!1);return z.makeFragment(t)},mathmlBuilder(i,e){return new se.MathNode("mrow",pr(i.body,e))}});xe({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,token:r}=i,o=tt(e[0],"raw").string,s=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(n){case"\\htmlClass":l.class=o,a={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,a={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,a={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var c=o.split(","),d=0;d<c.length;d++){var h=c[d].split("=");if(h.length!==2)throw new he("Error parsing key-value for \\htmlData");l["data-"+h[0].trim()]=h[1].trim()}a={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(a)?{type:"html",mode:t.mode,attributes:l,body:Ai(s)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=$i(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=z.makeSpan(n,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&r.setAttribute(o,i.attributes[o]);return r},mathmlBuilder:(i,e)=>wl(i.body,e)});xe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:Ai(e[0]),mathml:Ai(e[1])}},htmlBuilder:(i,e)=>{var t=$i(i.html,e,!1);return z.makeFragment(t)},mathmlBuilder:(i,e)=>wl(i.mathml,e)});var U3=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new he("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!NO(n))throw new he("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};xe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=tt(t[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var h=c[d].split("=");if(h.length===2){var u=h[1].trim();switch(h[0].trim()){case"alt":a=u;break;case"width":r=U3(u);break;case"height":o=U3(u);break;case"totalheight":s=U3(u);break;default:throw new he("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var m=tt(e[0],"url").url;return a===""&&(a=m,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:a,width:r,height:o,totalheight:s,src:m}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=gi(i.height,e),n=0;i.totalheight.number>0&&(n=gi(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=gi(i.width,e));var o={height:ve(t+n)};r>0&&(o.width=ve(r)),n>0&&(o.verticalAlign=ve(-n));var s=new G3(i.src,i.alt,o);return s.height=t,s.depth=n,s},mathmlBuilder:(i,e)=>{var t=new se.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var n=gi(i.height,e),r=0;if(i.totalheight.number>0&&(r=gi(i.totalheight,e)-n,t.setAttribute("valign",ve(-r))),t.setAttribute("height",ve(n+r)),i.width.number>0){var o=gi(i.width,e);t.setAttribute("width",ve(o))}return t.setAttribute("src",i.src),t}});xe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=tt(e[0],"size");if(t.settings.strict){var o=n[1]==="m",s=r.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return z.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=gi(i.dimension,e);return new se.SpaceNode(t)}});xe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=z.makeSpan([],[Et(i.body,e)]),t=z.makeSpan(["inner"],[t],e)):t=z.makeSpan(["inner"],[Et(i.body,e)]);var n=z.makeSpan(["fix"],[]),r=z.makeSpan([i.alignment],[t,n],e),o=z.makeSpan(["strut"]);return o.style.height=ve(r.height+r.depth),r.depth&&(o.style.verticalAlign=ve(-r.depth)),r.children.unshift(o),r=z.makeSpan(["thinbox"],[r],e),z.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new se.MathNode("mpadded",[$t(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});xe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",s=n.parseExpression(!1,o);return n.expect(o),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",body:s}}});xe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new he("Mismatched "+i.funcName)}});var _O=(i,e)=>{switch(e.style.size){case je.DISPLAY.size:return i.display;case je.TEXT.size:return i.text;case je.SCRIPT.size:return i.script;case je.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};xe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:Ai(e[0]),text:Ai(e[1]),script:Ai(e[2]),scriptscript:Ai(e[3])}},htmlBuilder:(i,e)=>{var t=_O(i,e),n=$i(t,e,!1);return z.makeFragment(n)},mathmlBuilder:(i,e)=>{var t=_O(i,e);return wl(t,e)}});var mP=(i,e,t,n,r,o,s)=>{i=z.makeSpan([],[i]);var a=t&&Ge.isCharacterBox(t),l,c;if(e){var d=Et(e,n.havingStyle(r.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var h=Et(t,n.havingStyle(r.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var u;if(c&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;u=z.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ve(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ve(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=i.height-s;u=z.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ve(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},n)}else if(c){var f=i.depth+s;u=z.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ve(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return i;var _=[u];if(l&&o!==0&&!a){var b=z.makeSpan(["mspace"],[],n);b.style.marginRight=ve(o),_.unshift(b)}return z.makeSpan(["mop","op-limits"],_,n)},pP=["\\smallint"],zh=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=tt(i.base,"op"),r=!0):o=tt(i,"op");var s=e.style,a=!1;s.size===je.DISPLAY.size&&o.symbol&&!Ge.contains(pP,o.name)&&(a=!0);var l;if(o.symbol){var c=a?"Size2-Regular":"Size1-Regular",d="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(d=o.name.slice(1),o.name=d==="oiint"?"\\iint":"\\iiint"),l=z.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var h=l.italic,u=z.staticSvg(d+"Size"+(a?"2":"1"),e);l=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:u,shift:a?.08:0}]},e),o.name="\\"+d,l.classes.unshift("mop"),l.italic=h}}else if(o.body){var m=$i(o.body,e,!0);m.length===1&&m[0]instanceof mr?(l=m[0],l.classes[0]="mop"):l=z.makeSpan(["mop"],m,e)}else{for(var p=[],f=1;f<o.name.length;f++)p.push(z.mathsym(o.name[f],o.mode,e));l=z.makeSpan(["mop"],p,e)}var _=0,b=0;return(l instanceof mr||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift&&(_=(l.height-l.depth)/2-e.fontMetrics().axisHeight,b=l.italic),r?mP(l,t,n,e,s,b,_):(_&&(l.style.position="relative",l.style.top=ve(_)),l)},b0=(i,e)=>{var t;if(i.symbol)t=new ur("mo",[oo(i.name,i.mode)]),Ge.contains(pP,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new ur("mo",pr(i.body,e));else{t=new ur("mi",[new Dc(i.name.slice(1))]);var n=new ur("mo",[oo("\u2061","text")]);i.parentIsSupSub?t=new ur("mrow",[t,n]):t=WO([t,n])}return t},gQ={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};xe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=gQ[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:zh,mathmlBuilder:b0});xe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ai(n)}},htmlBuilder:zh,mathmlBuilder:b0});var _Q={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};xe({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:zh,mathmlBuilder:b0});xe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:zh,mathmlBuilder:b0});xe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=_Q[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:zh,mathmlBuilder:b0});var fP=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=tt(i.base,"operatorname"),r=!0):o=tt(i,"operatorname");var s;if(o.body.length>0){for(var a=o.body.map(h=>{var u=h.text;return typeof u=="string"?{type:"textord",mode:h.mode,text:u}:h}),l=$i(a,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof mr&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=z.makeSpan(["mop"],l,e)}else s=z.makeSpan(["mop"],[],e);return r?mP(s,t,n,e,e.style,0,0):s},vQ=(i,e)=>{for(var t=pr(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var o=t[r];if(!(o instanceof se.SpaceNode))if(o instanceof se.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=o.children[0];o.children.length===1&&s instanceof se.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var a=t.map(d=>d.toText()).join("");t=[new se.TextNode(a)]}var l=new se.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new se.MathNode("mo",[oo("\u2061","text")]);return i.parentIsSupSub?new se.MathNode("mrow",[l,c]):se.newDocumentFragment([l,c])};xe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:Ai(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:fP,mathmlBuilder:vQ});E("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pc({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?z.makeFragment($i(i.body,e,!1)):z.makeSpan(["mord"],$i(i.body,e,!0),e)},mathmlBuilder(i,e){return wl(i.body,e,!0)}});xe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=Et(i.body,e.havingCrampedStyle()),n=z.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]},e);return z.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new se.MathNode("mo",[new se.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new se.MathNode("mover",[$t(i.body,e),t]);return n.setAttribute("accent","true"),n}});xe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:Ai(n)}},htmlBuilder:(i,e)=>{var t=$i(i.body,e.withPhantom(),!1);return z.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=pr(i.body,e);return new se.MathNode("mphantom",t)}});xe({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"hphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=z.makeSpan([],[Et(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var n=0;n<t.children.length;n++)t.children[n].height=0,t.children[n].depth=0;return t=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),z.makeSpan(["mord"],[t],e)},mathmlBuilder:(i,e)=>{var t=pr(Ai(i.body),e),n=new se.MathNode("mphantom",t),r=new se.MathNode("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});xe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=z.makeSpan(["inner"],[Et(i.body,e.withPhantom())]),n=z.makeSpan(["fix"],[]);return z.makeSpan(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=pr(Ai(i.body),e),n=new se.MathNode("mphantom",t),r=new se.MathNode("mpadded",[n]);return r.setAttribute("width","0px"),r}});xe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=tt(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=Et(i.body,e),n=gi(i.dy,e);return z.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new se.MathNode("mpadded",[$t(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});xe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});xe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],o=tt(e[0],"size"),s=tt(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&tt(r,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=z.makeSpan(["mord","rule"],[],e),n=gi(i.width,e),r=gi(i.height,e),o=i.shift?gi(i.shift,e):0;return t.style.borderRightWidth=ve(n),t.style.borderTopWidth=ve(r),t.style.bottom=ve(o),t.width=n,t.height=r+o,t.depth=-o,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=gi(i.width,e),n=gi(i.height,e),r=i.shift?gi(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new se.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",ve(t)),s.setAttribute("height",ve(n));var a=new se.MathNode("mpadded",[s]);return r>=0?a.setAttribute("height",ve(r)):(a.setAttribute("height",ve(r)),a.setAttribute("depth",ve(-r))),a.setAttribute("voffset",ve(r)),a}});function gP(i,e,t){for(var n=$i(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,o=0;o<n.length;o++){var s=n[o].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[o].classes,e.sizingClasses(t)):n[o].classes[s+1]==="reset-size"+e.size&&(n[o].classes[s+1]="reset-size"+t.size),n[o].height*=r,n[o].depth*=r}return z.makeFragment(n)}var vO=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],bQ=(i,e)=>{var t=e.havingSize(i.size);return gP(i.body,t,e)};xe({type:"sizing",names:vO,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:vO.indexOf(n)+1,body:o}},htmlBuilder:bQ,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=pr(i.body,t),r=new se.MathNode("mstyle",n);return r.setAttribute("mathsize",ve(t.sizeMultiplier)),r}});xe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,o=!1,s=t[0]&&tt(t[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){var c=s.body[l];if(a=c.text,a==="t")r=!0;else if(a==="b")o=!0;else{r=!1,o=!1;break}}else r=!0,o=!0;var d=e[0];return{type:"smash",mode:n.mode,body:d,smashHeight:r,smashDepth:o}},htmlBuilder:(i,e)=>{var t=z.makeSpan([],[Et(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var n=0;n<t.children.length;n++)t.children[n].height=0;if(i.smashDepth&&(t.depth=0,t.children))for(var r=0;r<t.children.length;r++)t.children[r].depth=0;var o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return z.makeSpan(["mord"],[o],e)},mathmlBuilder:(i,e)=>{var t=new se.MathNode("mpadded",[$t(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});xe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],o=e[0];return{type:"sqrt",mode:n.mode,body:o,index:r}},htmlBuilder(i,e){var t=Et(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=z.wrapFragment(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,o=r;e.style.id<je.TEXT.id&&(o=e.fontMetrics().xHeight);var s=r+o/4,a=t.height+t.depth+s+r,{span:l,ruleWidth:c,advanceWidth:d}=ga.sqrtImage(a,e),h=l.height-c;h>t.height+t.depth+s&&(s=(s+h-t.height-t.depth)/2);var u=l.height-t.height-s-c;t.style.paddingLeft=ve(d);var m=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+u)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(i.index){var p=e.havingStyle(je.SCRIPTSCRIPT),f=Et(i.index,p,e),_=.6*(m.height-m.depth),b=z.makeVList({positionType:"shift",positionData:-_,children:[{type:"elem",elem:f}]},e),C=z.makeSpan(["root"],[b]);return z.makeSpan(["mord","sqrt"],[C,m],e)}else return z.makeSpan(["mord","sqrt"],[m],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new se.MathNode("mroot",[$t(t,e),$t(n,e)]):new se.MathNode("msqrt",[$t(t,e)])}});var bO={display:je.DISPLAY,text:je.TEXT,script:je.SCRIPT,scriptscript:je.SCRIPTSCRIPT};xe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!0,t),s=n.slice(1,n.length-5);return{type:"styling",mode:r.mode,style:s,body:o}},htmlBuilder(i,e){var t=bO[i.style],n=e.havingStyle(t).withFont("");return gP(i.body,n,e)},mathmlBuilder(i,e){var t=bO[i.style],n=e.havingStyle(t),r=pr(i.body,n),o=new se.MathNode("mstyle",r),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=s[i.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var yQ=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===je.DISPLAY.size||n.alwaysHandleSupSub);return r?zh:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===je.DISPLAY.size||n.limits);return o?fP:null}else{if(n.type==="accent")return Ge.isCharacterBox(n.base)?cS:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?uP:null}else return null}else return null};Pc({type:"supsub",htmlBuilder(i,e){var t=yQ(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:o}=i,s=Et(n,e),a,l,c=e.fontMetrics(),d=0,h=0,u=n&&Ge.isCharacterBox(n);if(r){var m=e.havingStyle(e.style.sup());a=Et(r,m,e),u||(d=s.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(o){var p=e.havingStyle(e.style.sub());l=Et(o,p,e),u||(h=s.depth+p.fontMetrics().subDrop*p.sizeMultiplier/e.sizeMultiplier)}var f;e.style===je.DISPLAY?f=c.sup1:e.style.cramped?f=c.sup3:f=c.sup2;var _=e.sizeMultiplier,b=ve(.5/c.ptPerEm/_),C=null;if(l){var T=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof mr||T)&&(C=ve(-s.italic))}var w;if(a&&l){d=Math.max(d,f,a.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var A=c.defaultRuleThickness,O=4*A;if(d-a.depth-(l.height-h)<O){h=O-(d-a.depth)+l.height;var D=.8*c.xHeight-(d-a.depth);D>0&&(d+=D,h-=D)}var j=[{type:"elem",elem:l,shift:h,marginRight:b,marginLeft:C},{type:"elem",elem:a,shift:-d,marginRight:b}];w=z.makeVList({positionType:"individualShift",children:j},e)}else if(l){h=Math.max(h,c.sub1,l.height-.8*c.xHeight);var q=[{type:"elem",elem:l,marginLeft:C,marginRight:b}];w=z.makeVList({positionType:"shift",positionData:h,children:q},e)}else if(a)d=Math.max(d,f,a.depth+.25*c.xHeight),w=z.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:b}]},e);else throw new Error("supsub must have either sup or sub.");var _e=Y3(s,"right")||"mord";return z.makeSpan([_e],[s,z.makeSpan(["msupsub"],[w])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[$t(i.base,e)];i.sub&&o.push($t(i.sub,e)),i.sup&&o.push($t(i.sup,e));var s;if(t)s=n?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===je.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===je.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===je.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===je.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===je.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===je.DISPLAY)?s="mover":s="msup"}return new se.MathNode(s,o)}});Pc({type:"atom",htmlBuilder(i,e){return z.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new se.MathNode("mo",[oo(i.text,i.mode)]);if(i.family==="bin"){var n=aS(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var _P={mi:"italic",mn:"normal",mtext:"normal"};Pc({type:"mathord",htmlBuilder(i,e){return z.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new se.MathNode("mi",[oo(i.text,i.mode,e)]),n=aS(i,e)||"italic";return n!==_P[t.type]&&t.setAttribute("mathvariant",n),t}});Pc({type:"textord",htmlBuilder(i,e){return z.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=oo(i.text,i.mode,e),n=aS(i,e)||"normal",r;return i.mode==="text"?r=new se.MathNode("mtext",[t]):/[0-9]/.test(i.text)?r=new se.MathNode("mn",[t]):i.text==="\\prime"?r=new se.MathNode("mo",[t]):r=new se.MathNode("mi",[t]),n!==_P[r.type]&&r.setAttribute("mathvariant",n),r}});var W3={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},j3={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pc({type:"spacing",htmlBuilder(i,e){if(j3.hasOwnProperty(i.text)){var t=j3[i.text].className||"";if(i.mode==="text"){var n=z.makeOrd(i,e,"textord");return n.classes.push(t),n}else return z.makeSpan(["mspace",t],[z.mathsym(i.text,i.mode,e)],e)}else{if(W3.hasOwnProperty(i.text))return z.makeSpan(["mspace",W3[i.text]],[],e);throw new he('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(j3.hasOwnProperty(i.text))t=new se.MathNode("mtext",[new se.TextNode("\xA0")]);else{if(W3.hasOwnProperty(i.text))return new se.MathNode("mspace");throw new he('Unknown type of space "'+i.text+'"')}return t}});var yO=()=>{var i=new se.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Pc({type:"tag",mathmlBuilder(i,e){var t=new se.MathNode("mtable",[new se.MathNode("mtr",[yO(),new se.MathNode("mtd",[wl(i.body,e)]),yO(),new se.MathNode("mtd",[wl(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var SO={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},CO={"\\textbf":"textbf","\\textmd":"textmd"},SQ={"\\textit":"textit","\\textup":"textup"},wO=(i,e)=>{var t=i.font;return t?SO[t]?e.withTextFontFamily(SO[t]):CO[t]?e.withTextFontWeight(CO[t]):e.withTextFontShape(SQ[t]):e};xe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:Ai(r),font:n}},htmlBuilder(i,e){var t=wO(i,e),n=$i(i.body,t,!0);return z.makeSpan(["mord","text"],n,t)},mathmlBuilder(i,e){var t=wO(i,e);return wl(i.body,t)}});xe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=Et(i.body,e),n=z.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,o=z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]},e);return z.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new se.MathNode("mo",[new se.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new se.MathNode("munder",[$t(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});xe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=Et(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new se.MathNode("mpadded",[$t(i.body,e)],["vcenter"])}});xe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new he("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=xO(i),n=[],r=e.havingStyle(e.style.text()),o=0;o<t.length;o++){var s=t[o];s==="~"&&(s="\\textasciitilde"),n.push(z.makeSymbol(s,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return z.makeSpan(["mord","text"].concat(r.sizingClasses(e)),z.tryCombineChars(n),r)},mathmlBuilder(i,e){var t=new se.TextNode(xO(i)),n=new se.MathNode("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var xO=i=>i.body.replace(/ /g,i.star?"\u2423":"\xA0"),Sl=zO,vP=`[ \r
|
|
]`,CQ="\\\\[a-zA-Z@]+",wQ="\\\\[^\uD800-\uDFFF]",xQ="("+CQ+")"+vP+"*",EQ=`\\\\(
|
|
|[ \r ]+
|
|
?)[ \r ]*`,eS="[\u0300-\u036F]",TQ=new RegExp(eS+"+$"),IQ="("+vP+"+)|"+(EQ+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(eS+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(eS+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+xQ)+("|"+wQ+")"),sv=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(IQ,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ms("EOF",new Dr(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new he("Unexpected character: '"+e[t]+"'",new ms(e[t],new Dr(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var o=e.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new ms(r,new Dr(this,t,this.tokenRegex.lastIndex))}},tS=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new he("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},kQ=aP;E("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});E("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});E("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});E("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});E("\\@ifnextchar",function(i){var e=i.consumeArgs(3);i.consumeSpaces();var t=i.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});E("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");E("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var EO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};E("\\char",function(i){var e=i.popToken(),t,n="";if(e.text==="'")t=8,e=i.popToken();else if(e.text==='"')t=16,e=i.popToken();else if(e.text==="`")if(e=i.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new he("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=EO[e.text],n==null||n>=t)throw new he("Invalid base-"+t+" digit "+e.text);for(var r;(r=EO[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var _S=(i,e,t)=>{var n=i.consumeArg().tokens;if(n.length!==1)throw new he("\\newcommand's first argument must be a macro name");var r=n[0].text,o=i.isDefined(r);if(o&&!e)throw new he("\\newcommand{"+r+"} attempting to redefine "+(r+"; use \\renewcommand"));if(!o&&!t)throw new he("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");var s=0;if(n=i.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var a="",l=i.expandNextToken();l.text!=="]"&&l.text!=="EOF";)a+=l.text,l=i.expandNextToken();if(!a.match(/^\s*[0-9]+\s*$/))throw new he("Invalid number of arguments: "+a);s=parseInt(a),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:s}),""};E("\\newcommand",i=>_S(i,!1,!0));E("\\renewcommand",i=>_S(i,!0,!1));E("\\providecommand",i=>_S(i,!0,!0));E("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});E("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});E("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),Sl[t],Jt.math[t],Jt.text[t]),""});E("\\bgroup","{");E("\\egroup","}");E("~","\\nobreakspace");E("\\lq","`");E("\\rq","'");E("\\aa","\\r a");E("\\AA","\\r A");E("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");E("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");E("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");E("\u212C","\\mathscr{B}");E("\u2130","\\mathscr{E}");E("\u2131","\\mathscr{F}");E("\u210B","\\mathscr{H}");E("\u2110","\\mathscr{I}");E("\u2112","\\mathscr{L}");E("\u2133","\\mathscr{M}");E("\u211B","\\mathscr{R}");E("\u212D","\\mathfrak{C}");E("\u210C","\\mathfrak{H}");E("\u2128","\\mathfrak{Z}");E("\\Bbbk","\\Bbb{k}");E("\xB7","\\cdotp");E("\\llap","\\mathllap{\\textrm{#1}}");E("\\rlap","\\mathrlap{\\textrm{#1}}");E("\\clap","\\mathclap{\\textrm{#1}}");E("\\mathstrut","\\vphantom{(}");E("\\underbar","\\underline{\\text{#1}}");E("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');E("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");E("\\ne","\\neq");E("\u2260","\\neq");E("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");E("\u2209","\\notin");E("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");E("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");E("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");E("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");E("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");E("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");E("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");E("\u27C2","\\perp");E("\u203C","\\mathclose{!\\mkern-0.8mu!}");E("\u220C","\\notni");E("\u231C","\\ulcorner");E("\u231D","\\urcorner");E("\u231E","\\llcorner");E("\u231F","\\lrcorner");E("\xA9","\\copyright");E("\xAE","\\textregistered");E("\uFE0F","\\textregistered");E("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');E("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');E("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');E("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');E("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");E("\u22EE","\\vdots");E("\\varGamma","\\mathit{\\Gamma}");E("\\varDelta","\\mathit{\\Delta}");E("\\varTheta","\\mathit{\\Theta}");E("\\varLambda","\\mathit{\\Lambda}");E("\\varXi","\\mathit{\\Xi}");E("\\varPi","\\mathit{\\Pi}");E("\\varSigma","\\mathit{\\Sigma}");E("\\varUpsilon","\\mathit{\\Upsilon}");E("\\varPhi","\\mathit{\\Phi}");E("\\varPsi","\\mathit{\\Psi}");E("\\varOmega","\\mathit{\\Omega}");E("\\substack","\\begin{subarray}{c}#1\\end{subarray}");E("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");E("\\boxed","\\fbox{$\\displaystyle{#1}$}");E("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");E("\\implies","\\DOTSB\\;\\Longrightarrow\\;");E("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var TO={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};E("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in TO?e=TO[t]:(t.slice(0,4)==="\\not"||t in Jt.math&&Ge.contains(["bin","rel"],Jt.math[t].group))&&(e="\\dotsb"),e});var vS={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};E("\\dotso",function(i){var e=i.future().text;return e in vS?"\\ldots\\,":"\\ldots"});E("\\dotsc",function(i){var e=i.future().text;return e in vS&&e!==","?"\\ldots\\,":"\\ldots"});E("\\cdots",function(i){var e=i.future().text;return e in vS?"\\@cdots\\,":"\\@cdots"});E("\\dotsb","\\cdots");E("\\dotsm","\\cdots");E("\\dotsi","\\!\\cdots");E("\\dotsx","\\ldots\\,");E("\\DOTSI","\\relax");E("\\DOTSB","\\relax");E("\\DOTSX","\\relax");E("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");E("\\,","\\tmspace+{3mu}{.1667em}");E("\\thinspace","\\,");E("\\>","\\mskip{4mu}");E("\\:","\\tmspace+{4mu}{.2222em}");E("\\medspace","\\:");E("\\;","\\tmspace+{5mu}{.2777em}");E("\\thickspace","\\;");E("\\!","\\tmspace-{3mu}{.1667em}");E("\\negthinspace","\\!");E("\\negmedspace","\\tmspace-{4mu}{.2222em}");E("\\negthickspace","\\tmspace-{5mu}{.277em}");E("\\enspace","\\kern.5em ");E("\\enskip","\\hskip.5em\\relax");E("\\quad","\\hskip1em\\relax");E("\\qquad","\\hskip2em\\relax");E("\\tag","\\@ifstar\\tag@literal\\tag@paren");E("\\tag@paren","\\tag@literal{({#1})}");E("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new he("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});E("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");E("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");E("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");E("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");E("\\newline","\\\\\\relax");E("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var bP=ve(us["Main-Regular"]["T".charCodeAt(0)][1]-.7*us["Main-Regular"]["A".charCodeAt(0)][1]);E("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+bP+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");E("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+bP+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");E("\\hspace","\\@ifstar\\@hspacer\\@hspace");E("\\@hspace","\\hskip #1\\relax");E("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");E("\\ordinarycolon",":");E("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");E("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');E("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');E("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');E("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');E("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');E("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');E("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');E("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');E("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');E("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');E("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');E("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');E("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');E("\u2237","\\dblcolon");E("\u2239","\\eqcolon");E("\u2254","\\coloneqq");E("\u2255","\\eqqcolon");E("\u2A74","\\Coloneqq");E("\\ratio","\\vcentcolon");E("\\coloncolon","\\dblcolon");E("\\colonequals","\\coloneqq");E("\\coloncolonequals","\\Coloneqq");E("\\equalscolon","\\eqqcolon");E("\\equalscoloncolon","\\Eqqcolon");E("\\colonminus","\\coloneq");E("\\coloncolonminus","\\Coloneq");E("\\minuscolon","\\eqcolon");E("\\minuscoloncolon","\\Eqcolon");E("\\coloncolonapprox","\\Colonapprox");E("\\coloncolonsim","\\Colonsim");E("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");E("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");E("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");E("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");E("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");E("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");E("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");E("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");E("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");E("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");E("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");E("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");E("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");E("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");E("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");E("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");E("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");E("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");E("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");E("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");E("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");E("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");E("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");E("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");E("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");E("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");E("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");E("\\imath","\\html@mathml{\\@imath}{\u0131}");E("\\jmath","\\html@mathml{\\@jmath}{\u0237}");E("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");E("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");E("\u27E6","\\llbracket");E("\u27E7","\\rrbracket");E("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");E("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");E("\u2983","\\lBrace");E("\u2984","\\rBrace");E("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");E("\u29B5","\\minuso");E("\\darr","\\downarrow");E("\\dArr","\\Downarrow");E("\\Darr","\\Downarrow");E("\\lang","\\langle");E("\\rang","\\rangle");E("\\uarr","\\uparrow");E("\\uArr","\\Uparrow");E("\\Uarr","\\Uparrow");E("\\N","\\mathbb{N}");E("\\R","\\mathbb{R}");E("\\Z","\\mathbb{Z}");E("\\alef","\\aleph");E("\\alefsym","\\aleph");E("\\Alpha","\\mathrm{A}");E("\\Beta","\\mathrm{B}");E("\\bull","\\bullet");E("\\Chi","\\mathrm{X}");E("\\clubs","\\clubsuit");E("\\cnums","\\mathbb{C}");E("\\Complex","\\mathbb{C}");E("\\Dagger","\\ddagger");E("\\diamonds","\\diamondsuit");E("\\empty","\\emptyset");E("\\Epsilon","\\mathrm{E}");E("\\Eta","\\mathrm{H}");E("\\exist","\\exists");E("\\harr","\\leftrightarrow");E("\\hArr","\\Leftrightarrow");E("\\Harr","\\Leftrightarrow");E("\\hearts","\\heartsuit");E("\\image","\\Im");E("\\infin","\\infty");E("\\Iota","\\mathrm{I}");E("\\isin","\\in");E("\\Kappa","\\mathrm{K}");E("\\larr","\\leftarrow");E("\\lArr","\\Leftarrow");E("\\Larr","\\Leftarrow");E("\\lrarr","\\leftrightarrow");E("\\lrArr","\\Leftrightarrow");E("\\Lrarr","\\Leftrightarrow");E("\\Mu","\\mathrm{M}");E("\\natnums","\\mathbb{N}");E("\\Nu","\\mathrm{N}");E("\\Omicron","\\mathrm{O}");E("\\plusmn","\\pm");E("\\rarr","\\rightarrow");E("\\rArr","\\Rightarrow");E("\\Rarr","\\Rightarrow");E("\\real","\\Re");E("\\reals","\\mathbb{R}");E("\\Reals","\\mathbb{R}");E("\\Rho","\\mathrm{P}");E("\\sdot","\\cdot");E("\\sect","\\S");E("\\spades","\\spadesuit");E("\\sub","\\subset");E("\\sube","\\subseteq");E("\\supe","\\supseteq");E("\\Tau","\\mathrm{T}");E("\\thetasym","\\vartheta");E("\\weierp","\\wp");E("\\Zeta","\\mathrm{Z}");E("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");E("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");E("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");E("\\bra","\\mathinner{\\langle{#1}|}");E("\\ket","\\mathinner{|{#1}\\rangle}");E("\\braket","\\mathinner{\\langle{#1}\\rangle}");E("\\Bra","\\left\\langle#1\\right|");E("\\Ket","\\left|#1\\right\\rangle");var yP=i=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,s=e.macros.get("|"),a=e.macros.get("\\|");e.macros.beginGroup();var l=h=>u=>{i&&(u.macros.set("|",s),r.length&&u.macros.set("\\|",a));var m=h;if(!h&&r.length){var p=u.future();p.text==="|"&&(u.popToken(),m=!0)}return{tokens:m?r:n,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,d=e.expandTokens([...o,...c,...t]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};E("\\bra@ket",yP(!1));E("\\bra@set",yP(!0));E("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");E("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");E("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");E("\\angln","{\\angl n}");E("\\blue","\\textcolor{##6495ed}{#1}");E("\\orange","\\textcolor{##ffa500}{#1}");E("\\pink","\\textcolor{##ff00af}{#1}");E("\\red","\\textcolor{##df0030}{#1}");E("\\green","\\textcolor{##28ae7b}{#1}");E("\\gray","\\textcolor{gray}{#1}");E("\\purple","\\textcolor{##9d38bd}{#1}");E("\\blueA","\\textcolor{##ccfaff}{#1}");E("\\blueB","\\textcolor{##80f6ff}{#1}");E("\\blueC","\\textcolor{##63d9ea}{#1}");E("\\blueD","\\textcolor{##11accd}{#1}");E("\\blueE","\\textcolor{##0c7f99}{#1}");E("\\tealA","\\textcolor{##94fff5}{#1}");E("\\tealB","\\textcolor{##26edd5}{#1}");E("\\tealC","\\textcolor{##01d1c1}{#1}");E("\\tealD","\\textcolor{##01a995}{#1}");E("\\tealE","\\textcolor{##208170}{#1}");E("\\greenA","\\textcolor{##b6ffb0}{#1}");E("\\greenB","\\textcolor{##8af281}{#1}");E("\\greenC","\\textcolor{##74cf70}{#1}");E("\\greenD","\\textcolor{##1fab54}{#1}");E("\\greenE","\\textcolor{##0d923f}{#1}");E("\\goldA","\\textcolor{##ffd0a9}{#1}");E("\\goldB","\\textcolor{##ffbb71}{#1}");E("\\goldC","\\textcolor{##ff9c39}{#1}");E("\\goldD","\\textcolor{##e07d10}{#1}");E("\\goldE","\\textcolor{##a75a05}{#1}");E("\\redA","\\textcolor{##fca9a9}{#1}");E("\\redB","\\textcolor{##ff8482}{#1}");E("\\redC","\\textcolor{##f9685d}{#1}");E("\\redD","\\textcolor{##e84d39}{#1}");E("\\redE","\\textcolor{##bc2612}{#1}");E("\\maroonA","\\textcolor{##ffbde0}{#1}");E("\\maroonB","\\textcolor{##ff92c6}{#1}");E("\\maroonC","\\textcolor{##ed5fa6}{#1}");E("\\maroonD","\\textcolor{##ca337c}{#1}");E("\\maroonE","\\textcolor{##9e034e}{#1}");E("\\purpleA","\\textcolor{##ddd7ff}{#1}");E("\\purpleB","\\textcolor{##c6b9fc}{#1}");E("\\purpleC","\\textcolor{##aa87ff}{#1}");E("\\purpleD","\\textcolor{##7854ab}{#1}");E("\\purpleE","\\textcolor{##543b78}{#1}");E("\\mintA","\\textcolor{##f5f9e8}{#1}");E("\\mintB","\\textcolor{##edf2df}{#1}");E("\\mintC","\\textcolor{##e0e5cc}{#1}");E("\\grayA","\\textcolor{##f6f7f7}{#1}");E("\\grayB","\\textcolor{##f0f1f2}{#1}");E("\\grayC","\\textcolor{##e3e5e6}{#1}");E("\\grayD","\\textcolor{##d6d8da}{#1}");E("\\grayE","\\textcolor{##babec2}{#1}");E("\\grayF","\\textcolor{##888d93}{#1}");E("\\grayG","\\textcolor{##626569}{#1}");E("\\grayH","\\textcolor{##3b3e40}{#1}");E("\\grayI","\\textcolor{##21242c}{#1}");E("\\kaBlue","\\textcolor{##314453}{#1}");E("\\kaGreen","\\textcolor{##71B307}{#1}");var SP={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},iS=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new tS(kQ,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new sv(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg(["]"])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ms("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),o,s=0,a=0;do{if(o=this.popToken(),t.push(o),o.text==="{")++s;else if(o.text==="}"){if(--s,s===-1)throw new he("Extra }",o)}else if(o.text==="EOF")throw new he("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",o);if(e&&n)if((s===0||s===1&&e[a]==="{")&&o.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(s!==0||n);return r.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new he("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var o=this.popToken();if(n[r]!==o.text)throw new he("Use of the macro doesn't match its definition",o)}}for(var s=[],a=0;a<e;a++)s.push(this.consumeArg(t&&t[a+1]).tokens);return s}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new he("Undefined control sequence: "+n);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new he("Too many expansions: infinite loop or need to increase maxExpand setting");var o=r.tokens,s=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){o=o.slice();for(var a=o.length-1;a>=0;--a){var l=o[a];if(l.text==="#"){if(a===0)throw new he("Incomplete placeholder at end of macro body",l);if(l=o[--a],l.text==="#")o.splice(a+1,1);else if(/^[1-9]$/.test(l.text))o.splice(a,2,...s[+l.text-1]);else throw new he("Not a valid argument number",l)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ms(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t=="function"?t(this):t;if(typeof r=="string"){var o=0;if(r.indexOf("#")!==-1)for(var s=r.replace(/##/g,"");s.indexOf("#"+(o+1))!==-1;)++o;for(var a=new sv(r,this.settings),l=[],c=a.lex();c.text!=="EOF";)l.push(c),c=a.lex();l.reverse();var d={tokens:l,numArgs:o};return d}return r}isDefined(e){return this.macros.has(e)||Sl.hasOwnProperty(e)||Jt.math.hasOwnProperty(e)||Jt.text.hasOwnProperty(e)||SP.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Sl.hasOwnProperty(e)&&!Sl[e].primitive}},IO=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Q_=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),V3={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},kO={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},av=class i{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new iS(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new he("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ms("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(i.endOfExpression.indexOf(r.text)!==-1||t&&r.text===t||e&&Sl[r.text]&&Sl[r.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;n.push(o)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++)if(e[r].type==="infix"){if(t!==-1)throw new he("only one infix operator per group",e[r].token);t=r,n=e[r].replaceWith}if(t!==-1&&n){var o,s,a=e.slice(0,t),l=e.slice(t+1);a.length===1&&a[0].type==="ordgroup"?o=a[0]:o={type:"ordgroup",mode:this.mode,body:a},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[o,e[t],s],[]):c=this.callFunction(n,[o,s],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new he("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return o}parseAtom(e){var t=this.parseGroup("atom",e);if(this.mode==="text")return t;for(var n,r;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(t&&t.type==="op"){var s=o.text==="\\limits";t.limits=s,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=o.text==="\\limits");else throw new he("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(n)throw new he("Double superscript",o);n=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(r)throw new he("Double subscript",o);r=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(n)throw new he("Double superscript",o);var a={type:"textord",mode:this.mode,text:"\\prime"},l=[a];for(this.consume();this.fetch().text==="'";)l.push(a),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(Q_[o.text]){var c=Q_[o.text],d=IO.test(o.text);for(this.consume();;){var h=this.fetch().text;if(!Q_[h]||IO.test(h)!==d)break;this.consume(),c+=Q_[h]}var u=new i(c,this.settings).parse();d?r={type:"ordgroup",mode:"math",body:u}:n={type:"ordgroup",mode:"math",body:u}}else break}return n||r?{type:"supsub",mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,o=Sl[r];if(!o)return null;if(this.consume(),t&&t!=="atom"&&!o.allowedInArgument)throw new he("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!o.allowedInText)throw new he("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&o.allowedInMath===!1)throw new he("Can't use function '"+r+"' in math mode",n);var{args:s,optArgs:a}=this.parseArguments(r,o);return this.callFunction(r,s,a,n,e)}callFunction(e,t,n,r,o){var s={funcName:e,parser:this,token:r,breakOnTokenText:o},a=Sl[e];if(a&&a.handler)return a.handler(s,t,n);throw new he("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],o=[],s=0;s<n;s++){var a=t.argTypes&&t.argTypes[s],l=s<t.numOptionalArgs;(t.primitive&&a==null||t.type==="sqrt"&&s===1&&o[0]==null)&&(a="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",a,l);if(l)o.push(c);else if(c!=null)r.push(c);else throw new he("Null argument, please report this as a bug")}return{args:r,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text"}:null}case"raw":{var o=this.parseStringGroup("raw",n);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(n)throw new he("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new he("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new he("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r="",o;(o=this.fetch()).text!=="EOF";)r+=o.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,o="",s;(s=this.fetch()).text!=="EOF"&&e.test(o+s.text);)r=s,o+=r.text,this.consume();if(o==="")throw new he("Invalid "+t+": '"+n.text+"'",n);return n.range(r,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new he("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new he("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!NO(o))throw new he("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:o};return t&&this.switchMode(r),s}parseGroup(e,t){var n=this.fetch(),r=n.text,o;if(r==="{"||r==="\\begingroup"){this.consume();var s=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:Dr.range(n,l),body:a,semisimple:r==="\\begingroup"||void 0}}else if(o=this.parseFunction(t,e)||this.parseSymbol(),o==null&&r[0]==="\\"&&!SP.hasOwnProperty(r)){if(this.settings.throwOnError)throw new he("Undefined control sequence: "+r,n);o=this.formatUnsupportedCmd(r),this.consume()}return o}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],o=r.text;o==="-"&&e[n+1].text==="-"&&(n+1<t&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:Dr.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Dr.range(r,e[n+1]),text:"--"}),t-=1)),(o==="'"||o==="`")&&e[n+1].text===o&&(e.splice(n,2,{type:"textord",mode:"text",loc:Dr.range(r,e[n+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new he(`\\verb assertion failed --
|
|
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}kO.hasOwnProperty(t[0])&&!Jt[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=kO[t[0]]+t.slice(1));var o=TQ.exec(t);o&&(t=t.substring(0,o.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var s;if(Jt[this.mode][t]){this.settings.strict&&this.mode==="math"&&$3.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=Jt[this.mode][t].group,l=Dr.range(e),c;if(bX.hasOwnProperty(a)){var d=a;c={type:"atom",mode:this.mode,family:d,loc:l,text:t}}else c={type:a,mode:this.mode,loc:l,text:t};s=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(LO(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Dr.range(e),text:t};else return null;if(this.consume(),o)for(var h=0;h<o[0].length;h++){var u=o[0][h];if(!V3[u])throw new he("Unknown accent ' "+u+"'",e);var m=V3[u][this.mode]||V3[u].text;if(!m)throw new he("Accent "+u+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Dr.range(e),label:m,isStretchy:!1,isShifty:!0,base:s}}return s}};av.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var bS=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new av(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new he("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new ms("\\df@tag")])}]}return r},CP=function(e,t,n){t.textContent="";var r=yS(e,n).toNode();t.appendChild(r)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),CP=function(){throw new he("KaTeX doesn't work in quirks mode.")});var AQ=function(e,t){var n=yS(e,t).toMarkup();return n},LQ=function(e,t){var n=new p0(t);return bS(e,n)},wP=function(e,t,n){if(n.throwOnError||!(e instanceof he))throw e;var r=z.makeSpan(["katex-error"],[new mr(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},yS=function(e,t){var n=new p0(t);try{var r=bS(e,n);return UX(r,e,n)}catch(o){return wP(o,e,n)}},NQ=function(e,t){var n=new p0(t);try{var r=bS(e,n);return WX(r,e,n)}catch(o){return wP(o,e,n)}},Uh={version:"0.16.7",render:CP,renderToString:AQ,ParseError:he,SETTINGS_SCHEMA:J_,__parse:LQ,__renderToDomTree:yS,__renderToHTMLTree:NQ,__setFontMetrics:mX,__defineSymbol:v,__defineFunction:xe,__defineMacro:E,__domTree:{Span:Oc,Anchor:g0,SymbolNode:mr,SvgNode:To,PathNode:ps,LineNode:_0}};var Li=function(i,e,t,n,r){let o=ya(e);if(t!=null&&(typeof t!="number"||t<0||t===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index for child node");if(n!=null&&(!n.type||!n.children))throw new Error("Expected parent node");if(!i||!i.type||typeof i.type!="string")return!1;if(n==null!=(t==null))throw new Error("Expected both parent and index");return o.call(r,i,t,n)},ya=function(i){if(i==null)return SS;if(typeof i=="string")return DQ(i);if(typeof i=="object")return RQ(i);if(typeof i=="function")return xP(i);throw new Error("Expected function, string, or array as test")};function RQ(i){let e=[],t=-1;for(;++t<i.length;)e[t]=ya(i[t]);return xP(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].call(this,...r))return!0;return!1}}function DQ(i){return e;function e(t){return SS(t)&&t.tagName===i}}function xP(i){return e;function e(t,...n){return SS(t)&&!!i.call(this,t,...n)}}function SS(i){return!!(i&&typeof i=="object"&&i.type==="element"&&typeof i.tagName=="string")}var CS=function(i,e,t){var n=un(t);if(!i||!i.type||!i.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=i.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<i.children.length;)if(n(i.children[e],e,i))return i.children[e];return null};var EP=/\n/g,TP=/[\t ]+/g,wS=ya("br"),MQ=ya("p"),IP=ya(["th","td"]),kP=ya("tr"),OQ=ya(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",BQ,zQ]),AP=ya(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function y0(i,e={}){let t="children"in i?i.children:[],n=AP(i),r=RP(i,{whitespace:e.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(i.type==="text"||i.type==="comment")&&o.push(...NP(i,{whitespace:r,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<t.length;)o.push(...LP(t[s],i,{whitespace:r,breakBefore:s?void 0:n,breakAfter:s<t.length-1?wS(t[s+1]):n}));let a=[],l;for(s=-1;++s<o.length;){let c=o[s];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&a.push(`
|
|
`.repeat(l)||" "),l=-1,a.push(c))}return a.join("")}function LP(i,e,t){return i.type==="element"?PQ(i,e,t):i.type==="text"?t.whitespace==="normal"?NP(i,t):FQ(i):[]}function PQ(i,e,t){let n=RP(i,t),r=i.children||[],o=-1,s=[];if(OQ(i))return s;let a,l;for(wS(i)||kP(i)&&CS(e,i,kP)?l=`
|
|
`:MQ(i)?(a=2,l=2):AP(i)&&(a=1,l=1);++o<r.length;)s=s.concat(LP(r[o],i,{whitespace:n,breakBefore:o?void 0:a,breakAfter:o<r.length-1?wS(r[o+1]):l}));return IP(i)&&CS(e,i,IP)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function NP(i,e){let t=String(i.value),n=[],r=[],o=0;for(;o<=t.length;){EP.lastIndex=o;let l=EP.exec(t),c=l&&"index"in l?l.index:t.length;n.push(HQ(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?e.breakBefore:!0,c===t.length?e.breakAfter:!0)),o=c+1}let s=-1,a;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(r.push(n[s]),a=void 0):n[s]?(typeof a=="number"&&r.push(a),r.push(n[s]),a=0):(s===0||s===n.length-1)&&r.push(0);return r}function FQ(i){return[String(i.value)]}function HQ(i,e,t){let n=[],r=0,o;for(;r<i.length;){TP.lastIndex=r;let s=TP.exec(i);o=s?s.index:i.length,!r&&!o&&s&&!e&&n.push(""),r!==o&&n.push(i.slice(r,o)),r=s?o+s[0].length:o}return r!==o&&!t&&n.push(""),n.join(" ")}function RP(i,e){if(i.type==="element"){let t=i.properties||{};switch(i.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap";default:}}return e.whitespace}function BQ(i){return!!(i.properties||{}).hidden}function zQ(i){return i.tagName==="dialog"&&!(i.properties||{}).open}function xS(i,e){return(i?MP(i,e||{}):void 0)||{type:"root",children:[]}}function MP(i,e){let t=UQ(i,e);return t&&e.afterTransform&&e.afterTransform(i,t),t}function UQ(i,e){switch(i.nodeType){case 1:return KQ(i,e);case 3:return jQ(i);case 8:return VQ(i);case 9:return DP(i,e);case 10:return WQ();case 11:return DP(i,e);default:return}}function DP(i,e){return{type:"root",children:OP(i,e)}}function WQ(){return{type:"doctype"}}function jQ(i){return{type:"text",value:i.nodeValue||""}}function VQ(i){return{type:"comment",value:i.nodeValue||""}}function KQ(i,e){let t=i.namespaceURI,n=t===jn.svg?Rh:Nh,r=t===jn.html?i.tagName.toLowerCase():i.tagName,o=t===jn.html&&r==="template"?i.content:i,s=i.getAttributeNames(),a={},l=-1;for(;++l<s.length;)a[s[l]]=i.getAttribute(s[l])||"";return n(r,a,OP(o,e))}function OP(i,e){let t=i.childNodes,n=[],r=-1;for(;++r<t.length;){let o=MP(t[r],e);o!==void 0&&n.push(o)}return n}var qQ=new DOMParser;function PP(i,e){let t=e!=null&&e.fragment?GQ(i):qQ.parseFromString(i,"text/html");return xS(t)}function GQ(i){let e=document.createElement("template");return e.innerHTML=i,e.content}var FP=Object.assign,$Q="rehype-katex";function ES(i){let e=i||{},t=e.throwOnError||!1;return(n,r)=>{Rn(n,"element",o=>{let s=o.properties&&Array.isArray(o.properties.className)?o.properties.className:[],a=s.includes("math-inline"),l=s.includes("math-display");if(!a&&!l)return;let c=y0(o,{whitespace:"pre"}),d;try{d=Uh.renderToString(c,FP({},e,{displayMode:l,throwOnError:!0}))}catch(u){let m=u,p=t?"fail":"message",f=[$Q,m.name.toLowerCase()].join(":");if(r[p](m.message,o.position,f),m.name!=="ParseError"){o.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(m),style:"color:"+(e.errorColor||"#cc0000")},children:[{type:"text",value:c}]}];return}d=Uh.renderToString(c,FP({},e,{displayMode:l,throwOnError:!1,strict:"ignore"}))}let h=PP(d,{fragment:!0});o.children=h.children})}}var BP=zi(f3(),1);var HP={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}};var YQ="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",XQ={2:!0,1:!1,0:null};function pv(i){let e=this.data("settings"),t=Object.assign({},e,i);Object.assign(this,{Parser:n});function n(r,o){let s=t.fragment?"parseFragment":"parse",a=t.emitParseErrors?c:null,l=new BP.default({sourceCodeLocationInfo:!0,onParseError:a,scriptingEnabled:!1});return c0(l[s](r),{space:t.space,file:o,verbose:t.verbose});function c(d){let h=d.code,u=QQ(h),m=t[u],p=m==null?!0:m,f=typeof p=="number"?p:p?1:0,_={line:d.startLine,column:d.startCol,offset:d.startOffset},b={line:d.endLine,column:d.endCol,offset:d.endOffset};if(f){let T=HP[u]||{reason:"",description:"",url:""},w=o.message(C(T.reason),{start:_,end:b});w.source="parse-error",w.ruleId=h,w.fatal=XQ[f],w.note=C(T.description),w.url="url"in T&&T.url===!1?null:YQ+h}function C(T){return T.replace(/%c(?:-(\d+))?/g,(w,A)=>{let O=A?-Number.parseInt(A,10):0,D=r.charAt(d.startOffset+O);return D==="`"?"` ` `":D}).replace(/%x/g,()=>"0x"+r.charCodeAt(d.startOffset).toString(16).toUpperCase())}}}}function QQ(i){return i.replace(/-[a-z]/g,e=>e.charAt(1).toUpperCase())}var so={strip:["script"],clobberPrefix:"user-content-",clobber:["name","id"],ancestors:{tbody:["table"],tfoot:["table"],thead:["table"],td:["table"],th:["table"],tr:["table"]},protocols:{href:["http","https","mailto","xmpp","irc","ircs"],cite:["http","https"],src:["http","https"],longDesc:["http","https"]},tagNames:["h1","h2","h3","h4","h5","h6","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","input"],attributes:{a:["href"],img:["src","longDesc"],input:[["type","checkbox"],["disabled",!0]],li:[["className","task-list-item"]],div:["itemScope","itemType"],blockquote:["cite"],del:["cite"],ins:["cite"],q:["cite"],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","ariaDescribedBy","ariaHidden","ariaLabel","ariaLabelledBy","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","cols","colSpan","color","compact","coords","dateTime","dir","disabled","encType","htmlFor","frame","headers","height","hrefLang","hSpace","isMap","id","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rows","rowSpan","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","type","useMap","vAlign","value","vSpace","width","itemProp"]},required:{input:{type:"checkbox",disabled:!0}}};var vs={}.hasOwnProperty,JQ=[].push,TS={root:{children:zP},doctype:ZQ,comment:eJ,element:{tagName:VP,properties:tJ,children:zP},text:{value:rJ},"*":{data:UP,position:UP}};function IS(i,e){var t={type:"root",children:[]},n;return i&&typeof i=="object"&&i.type&&(n=jP(Object.assign({},so,e||{}),i,[]),n&&(Array.isArray(n)?n.length===1?t=n[0]:t.children=n:t=n)),t}function jP(i,e,t){var n=e&&e.type,r={type:e.type},o,s,a,l,c;if(vs.call(TS,n)&&(s=TS[n],typeof s=="function"&&(s=s(i,e)),s)){o=!0,a=Object.assign({},s,TS["*"]);for(c in a)vs.call(a,c)&&(l=a[c](i,e[c],e,t),l===!1?(o=null,r[c]=e[c]):l!=null&&(r[c]=l))}return o?r:r.type==="element"&&!i.strip.includes(r.tagName)?r.children:null}function zP(i,e,t,n){var r=[],o=-1,s;if(Array.isArray(e)){for(t.type==="element"&&n.push(t.tagName);++o<e.length;)s=jP(i,e[o],n),s&&("length"in s?JQ.apply(r,s):r.push(s));t.type==="element"&&n.pop()}return r}function ZQ(i){return i.allowDoctypes?{name:iJ}:null}function eJ(i){return i.allowComments?{value:nJ}:null}function tJ(i,e,t,n){var r=VP(i,t.tagName,t,n),o=i.required||{},s=e||{},a=Object.assign({},WP(i.attributes["*"]),WP(r&&vs.call(i.attributes,r)?i.attributes[r]:[])),l={},c,d,h;for(h in s)if(vs.call(s,h)){if(vs.call(a,h))c=a[h];else if(aJ(h)&&vs.call(a,"data*"))c=a["data*"];else continue;d=s[h],d=Array.isArray(d)?oJ(i,d,h,c):KP(i,d,h,c),d!=null&&(l[h]=d)}if(r&&vs.call(o,r))for(h in o[r])vs.call(l,h)||(l[h]=o[r][h]);return l}function iJ(){return"html"}function VP(i,e,t,n){var r=typeof e=="string"?e:"",o=-1;if(!r||r==="*"||!i.tagNames.includes(r))return!1;if(vs.call(i.ancestors,r)){for(;++o<i.ancestors[r].length;)if(n.includes(i.ancestors[r][o]))return r;return!1}return r}function nJ(i,e){var t=typeof e=="string"?e:"",n=t.indexOf("-->");return n<0?t:t.slice(0,n)}function rJ(i,e){return typeof e=="string"?e:""}function UP(i,e){return e}function oJ(i,e,t,n){for(var r=-1,o=[],s;++r<e.length;)s=KP(i,e[r],t,n),s!=null&&o.push(s);return o}function KP(i,e,t,n){if((typeof e=="boolean"||typeof e=="number"||typeof e=="string")&&sJ(i,e,t)&&(n.length===0||n.includes(e)))return i.clobber.includes(t)?i.clobberPrefix+e:e}function sJ(i,e,t){var n=String(e),r=n.indexOf(":"),o=n.indexOf("?"),s=n.indexOf("#"),a=n.indexOf("/"),l=vs.call(i.protocols,t)?i.protocols[t].concat():[],c=-1;if(l.length===0||r<0||a>-1&&r>a||o>-1&&r>o||s>-1&&r>s)return!0;for(;++c<l.length;)if(r===l[c].length&&n.slice(0,l[c].length)===l[c])return!0;return!1}function WP(i){for(var e={},t=-1,n;++t<i.length;)n=i[t],Array.isArray(n)?e[n[0]]=n.slice(1):e[n]=[];return e}function aJ(i){return i.length>4&&i.slice(0,4).toLowerCase()==="data"}function kS(i=so){return e=>IS(e,i)}var Fc=un("comment");function fv(i){var e=i&&typeof i=="object"&&i.type==="text"?i.value||"":i;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}var xi=qP(1),AS=qP(-1);function qP(i){return e;function e(t,n,r){let o=t&&t.children,s=n+i,a=o&&o[s];if(!r)for(;a&&fv(a);)s+=i,a=o[s];return a}}var lJ=un("text");function gv(i){return lJ(i)&&fv(i.value.charAt(0))}var cJ={}.hasOwnProperty;function _v(i){return e;function e(t,n,r){return cJ.call(i,t.tagName)&&i[t.tagName](t,n,r)}}var S0=_v({html:dJ,head:LS,body:hJ,p:uJ,li:mJ,dt:pJ,dd:fJ,rt:GP,rp:GP,optgroup:gJ,option:_J,menuitem:vJ,colgroup:LS,caption:LS,thead:bJ,tbody:yJ,tfoot:SJ,tr:CJ,td:$P,th:$P});function LS(i,e,t){let n=xi(t,e,!0);return!n||!Fc(n)&&!gv(n)}function dJ(i,e,t){let n=xi(t,e);return!n||!Fc(n)}function hJ(i,e,t){let n=xi(t,e);return!n||!Fc(n)}function uJ(i,e,t){let n=xi(t,e);return n?Li(n,["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]):!t||!Li(t,["a","audio","del","ins","map","noscript","video"])}function mJ(i,e,t){let n=xi(t,e);return!n||Li(n,"li")}function pJ(i,e,t){let n=xi(t,e);return n&&Li(n,["dt","dd"])}function fJ(i,e,t){let n=xi(t,e);return!n||Li(n,["dt","dd"])}function GP(i,e,t){let n=xi(t,e);return!n||Li(n,["rp","rt"])}function gJ(i,e,t){let n=xi(t,e);return!n||Li(n,"optgroup")}function _J(i,e,t){let n=xi(t,e);return!n||Li(n,["option","optgroup"])}function vJ(i,e,t){let n=xi(t,e);return!n||Li(n,["menuitem","hr","menu"])}function bJ(i,e,t){let n=xi(t,e);return n&&Li(n,["tbody","tfoot"])}function yJ(i,e,t){let n=xi(t,e);return!n||Li(n,["tbody","tfoot"])}function SJ(i,e,t){return!xi(t,e)}function CJ(i,e,t){let n=xi(t,e);return!n||Li(n,"tr")}function $P(i,e,t){let n=xi(t,e);return!n||Li(n,["td","th"])}var YP=_v({html:wJ,head:xJ,body:EJ,colgroup:TJ,tbody:IJ});function wJ(i){let e=xi(i,-1);return!e||!Fc(e)}function xJ(i){let e=i.children,t=[],n=-1,r;for(;++n<e.length;)if(r=e[n],Li(r,["title","base"])){if(t.includes(r.tagName))return!1;t.push(r.tagName)}return e.length>0}function EJ(i){let e=xi(i,-1,!0);return!e||!Fc(e)&&!gv(e)&&!Li(e,["meta","link","script","style","template"])}function TJ(i,e,t){let n=AS(t,e),r=xi(i,-1,!0);return Li(n,"colgroup")&&S0(n,t.children.indexOf(n),t)?!1:r&&Li(r,"col")}function IJ(i,e,t){let n=AS(t,e),r=xi(i,-1);return Li(n,["thead","tbody"])&&S0(n,t.children.indexOf(n),t)?!1:r&&Li(r,"tr")}var XP={opening:YP,closing:S0};function QP(i,e){if(i=i.replace(e.subset?kJ(e.subset):/["&'<>`]/g,n),e.subset||e.escapeOnly)return i;return i.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,n);function t(r,o,s){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(r,o,s){return e.format(r.charCodeAt(0),s.charCodeAt(o+1),e)}}function kJ(i){let e=[],t=-1;for(;++t<i.length;)e.push(i[t].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function JP(i,e,t){let n="&#x"+i.toString(16).toUpperCase();return t&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?n:n+";"}function ZP(i,e,t){let n="&#"+String(i);return t&&e&&!/\d/.test(String.fromCharCode(e))?n:n+";"}var eF=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var vv={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var tF=["cent","copy","divide","gt","lt","not","para","times"];var iF={}.hasOwnProperty,NS={},bv;for(bv in vv)iF.call(vv,bv)&&(NS[vv[bv]]=bv);function nF(i,e,t,n){let r=String.fromCharCode(i);if(iF.call(NS,r)){let o=NS[r],s="&"+o;return t&&eF.includes(o)&&!tF.includes(o)&&(!n||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?s:s+";"}return""}function rF(i,e,t){let n=JP(i,e,t.omitOptionalSemicolons),r;if((t.useNamedReferences||t.useShortestReferences)&&(r=nF(i,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!r)&&t.useShortestReferences){let o=ZP(i,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return r&&(!t.useShortestReferences||r.length<n.length)?r:n}function Sa(i,e){return QP(i,Object.assign({format:rF},e))}var C0={name:[[`
|
|
\f\r &/=>`.split(""),`
|
|
\f\r "&'/=>\``.split("")],[`\0
|
|
\f\r "&'/<=>`.split(""),`\0
|
|
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
\f\r &>`.split(""),`\0
|
|
\f\r "&'<=>\``.split("")],[`\0
|
|
\f\r "&'<=>\``.split(""),`\0
|
|
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function oF(i,e){return i.bogusComments?"<?"+Sa(e.value,Object.assign({},i.entities,{subset:[">"]}))+">":"<!--"+e.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,t)+"-->";function t(n){return Sa(n,Object.assign({},i.entities,{subset:["<",">"]}))}}function sF(i){return"<!"+(i.upperDoctype?"DOCTYPE":"doctype")+(i.tightDoctype?"":" ")+"html>"}function yv(i,e,t,n){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Sa(e.value,Object.assign({},i.entities,{subset:["<","&"]}))}function aF(i,e,t,n){return i.dangerous?e.value:yv(i,e,t,n)}var lF={comment:oF,doctype:sF,element:LJ,raw:aF,root:cF,text:yv},AJ={}.hasOwnProperty;function RS(i,e,t,n){if(!e||!e.type)throw new Error("Expected node, not `"+e+"`");if(!AJ.call(lF,e.type))throw new Error("Cannot compile unknown node `"+e.type+"`");return lF[e.type](i,e,t,n)}function cF(i,e){let t=[],n=e&&e.children||[],r=-1;for(;++r<n.length;)t[r]=RS(i,n[r],r,e);return t.join("")}function LJ(i,e,t,n){let r=i.schema,o=r.space==="svg"?void 0:i.omit,s=r.space==="svg"?i.closeEmpty:i.voids.includes(e.tagName.toLowerCase()),a=[],l;r.space==="html"&&e.tagName==="svg"&&(i.schema=Wn);let c=NJ(i,e.properties),d=cF(i,r.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=r,d&&(s=!1),(c||!o||!o.opening(e,t,n))&&(a.push("<",e.tagName,c?" "+c:""),s&&(r.space==="svg"||i.close)&&(l=c.charAt(c.length-1),(!i.tightClose||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(d),!s&&(!o||!o.closing(e,t,n))&&a.push("</"+e.tagName+">"),a.join("")}function NJ(i,e){let t=[],n=-1,r,o,s;for(r in e)e[r]!==void 0&&e[r]!==null&&(o=RJ(i,r,e[r]),o&&t.push(o));for(;++n<t.length;)s=i.tight?t[n].charAt(t[n].length-1):null,n!==t.length-1&&s!=='"'&&s!=="'"&&(t[n]+=" ");return t.join("")}function RJ(i,e,t){let n=wo(i.schema,e),r=i.quote,o;if(n.overloadedBoolean&&(t===n.attribute||t==="")?t=!0:(n.boolean||n.overloadedBoolean&&typeof t!="string")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";let s=Sa(n.attribute,Object.assign({},i.entities,{subset:C0.name[i.schema.space==="html"?i.valid:1][i.safe]}));return t===!0||(t=typeof t=="object"&&"length"in t?(n.commaSeparated?P_:O_)(t,{padLeft:!i.tightLists}):String(t),i.collapseEmpty&&!t)?s:(i.unquoted&&(o=Sa(t,Object.assign({},i.entities,{subset:C0.unquoted[i.valid][i.safe],attribute:!0}))),o!==t&&(i.smart&&Sh(t,r)>Sh(t,i.alternative)&&(r=i.alternative),o=r+Sa(t,Object.assign({},i.entities,{subset:(r==="'"?C0.single:C0.double)[i.schema.space==="html"?i.valid:1][i.safe],attribute:!0}))+r),s+(o&&"="+o))}function DS(i,e={}){let t=e.quote||'"',n=t==='"'?"'":'"';if(t!=='"'&&t!=="'")throw new Error("Invalid quote `"+t+"`, expected `'` or `\"`");let r={valid:e.allowParseErrors?0:1,safe:e.allowDangerousCharacters?0:1,schema:e.space==="svg"?Wn:xo,omit:e.omitOptionalTags?XP:void 0,quote:t,alternative:n,smart:e.quoteSmart,unquoted:e.preferUnquoted,tight:e.tightAttributes,upperDoctype:e.upperDoctype,tightDoctype:e.tightDoctype,bogusComments:e.bogusComments,tightLists:e.tightCommaSeparatedLists,tightClose:e.tightSelfClosing,collapseEmpty:e.collapseEmptyAttributes,dangerous:e.allowDangerousHtml,voids:e.voids||B_.concat(),entities:e.entities||{},close:e.closeSelfClosing,closeEmpty:e.closeEmptyElements};return RS(r,Array.isArray(i)?{type:"root",children:i}:i,null,null)}function Sv(i){let e=this.data("settings"),t=Object.assign({},e,i);Object.assign(this,{Compiler:n});function n(r){return DS(r,t)}}var DJ={inline:["$","$"],display:["$$","$$"]};function MJ(i,e){e===void 0&&(e=DJ);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),n=0;n<t.length;n++){var r=t[n];r.remove?r.remove():r.parentNode&&r.parentNode.removeChild(r)}for(var o=i.querySelectorAll(".katex-mathml"),s=0;s<o.length;s++){var a=o[s],l=a.querySelector("annotation");l&&(a.replaceWith?a.replaceWith(l):a.parentNode&&a.parentNode.replaceChild(l,a),l.innerHTML=e.inline[0]+l.innerHTML+e.inline[1])}for(var c=i.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var h=c[d];h.innerHTML=e.display[0]+h.innerHTML.substr(e.inline[0].length,h.innerHTML.length-e.inline[0].length-e.inline[1].length)+e.display[1]}return i}function dF(i){var e=i instanceof Element?i:i.parentElement;return e&&e.closest(".katex")}document.addEventListener("copy",function(i){var e=window.getSelection();if(!(e.isCollapsed||!i.clipboardData)){var t=i.clipboardData,n=e.getRangeAt(0),r=dF(n.startContainer);r&&n.setStartBefore(r);var o=dF(n.endContainer);o&&n.setEndAfter(o);var s=n.cloneContents();if(s.querySelector(".katex-mathml")){var a=Array.prototype.map.call(s.childNodes,l=>l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",MJ(s).textContent),i.preventDefault()}}});function MS(i,e){let t=typeof e=="boolean"?e:e?e.force:!1;return Rn(i,n),i;function n(r){t?delete r.position:r.position=void 0}}wr();Bs();Me();Di();ht();be();qe();var OJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},PJ=function(i,e){return function(t,n){e(t,n,i)}},Cv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wv=new Ne("selectionAnchorSet",!1),Ca=class hF{static get(e){return e.getContribution(hF.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=wv.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new pi().appendText(g("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Kt(g("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ca.ID="editor.contrib.selectionAnchorController";Ca=OJ([PJ(1,we)],Ca);var OS=class extends K{constructor(){super({id:"editor.action.setSelectionAnchor",label:g("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2080),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.setSelectionAnchor()})}},PS=class extends K{constructor(){super({id:"editor.action.goToSelectionAnchor",label:g("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:wv})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},FS=class extends K{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:g("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2089),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},HS=class extends K{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:g("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Se(Ca.ID,Ca,4);F(OS);F(PS);F(FS);F(HS);ct();re();Me();St();Ie();Di();ht();rl();dn();be();mi();kn();ln();var FJ=pe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),BS=class extends K{constructor(){super({id:"editor.action.jumpToBracket",label:g("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.jumpToBracket()}},zS=class extends K{constructor(){super({id:"editor.action.selectToBracket",label:g("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=bs.get(t))===null||r===void 0||r.selectToBracket(o)}},US=class extends K{constructor(){super({id:"editor.action.removeBrackets",label:g("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.removeBrackets(this.id)}},WS=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},bs=class i extends Y{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new kt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new ye(s.lineNumber,s.column,s.lineNumber,s.column):new ye(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(k.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let h=a;a=l,l=h}}a&&l&&n.push(new ye(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let h=0,u=e.length;h<u;h++){let m=e[h];m.isEmpty()&&(o[s++]=m.getStartPosition())}o.length>1&&o.sort(ie.compare);let a=[],l=0,c=0,d=r.length;for(let h=0,u=o.length;h<u;h++){let m=o[h];for(;c<d&&r[c].position.isBefore(m);)c++;if(c<d&&r[c].position.equals(m))a[l++]=r[c];else{let p=t.bracketPairs.matchBracket(m,20),f=i._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(m,20),f=i._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new WS(m,p,f)}}this._lastBracketsData=a,this._lastVersionId=n}};bs.ID="editor.contrib.bracketMatchingController";bs._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Ue.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Lt(FJ),position:zn.Center}});bs._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Ue.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});Se(bs.ID,bs,1);F(zS);F(BS);F(US);qr.appendMenuItem(ae.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:g({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});Me();ht();Ie();Di();var xv=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new k(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new k(n,o,n,o),a)}else{let s=new k(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new k(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new ye(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ye(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}};be();var Ev=class extends K{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let o of r)n.push(new xv(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},jS=class extends Ev{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:g("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:I.writable})}},VS=class extends Ev{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:g("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:I.writable})}};F(jS);F(VS);Me();Ie();ht();be();var KS=class extends K{constructor(){super({id:"editor.action.transposeLetters",label:g("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():vf.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),h=vf.leftPosition(n,d),u=vf.leftPosition(n,h),m=n.getValueInRange(k.fromPositions(u,h)),p=n.getValueInRange(k.fromPositions(h,d)),f=k.fromPositions(u,d);r.push(new js(f,p+m))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};F(KS);hT();yn();Me();xn();ht();be();mi();qe();var HJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hc="9_cutcopypaste",BJ=Ga||document.queryCommandSupported("cut"),uF=Ga||document.queryCommandSupported("copy"),zJ=typeof navigator.clipboard=="undefined"||cT?document.queryCommandSupported("paste"):!0;function $S(i){return i.register(),i}var UJ=BJ?$S(new gf({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ga?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.cutLabel","Cut"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1}]})):void 0,WJ=uF?$S(new gf({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ga?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.copyLabel","Copy"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;qr.appendMenuItem(ae.MenubarEditMenu,{submenu:ae.MenubarCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:Hc,order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1,when:G.and(G.notEquals("resourceScheme","output"),I.editorTextFocus)});qr.appendMenuItem(ae.EditorTitleContext,{submenu:ae.EditorTitleContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});qr.appendMenuItem(ae.ExplorerContext,{submenu:ae.ExplorerContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});var qS=zJ?$S(new gf({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ga?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4}]})):void 0,GS=class extends K{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:g("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(e9.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),e9.forceCopyWithSyntaxHighlighting=!1)}};function mF(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(_t).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}mF(UJ,"cut");mF(WJ,"copy");qS&&(qS.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(_t),n=i.get(qs),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&rf?(()=>HJ(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=mk.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),qS.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));uF&&F(GS);Me();Bt();Me();ht();Rt();Gt();it();re();Cn();Ie();Di();ut();Ya();g1();be();Si();mc();Qa();it();var jJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ee=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};Ee.sep=".";Ee.None=new Ee("@@none@@");Ee.Empty=new Ee("");Ee.QuickFix=new Ee("quickfix");Ee.Refactor=new Ee("refactor");Ee.RefactorExtract=Ee.Refactor.append("extract");Ee.RefactorInline=Ee.Refactor.append("inline");Ee.RefactorMove=Ee.Refactor.append("move");Ee.RefactorRewrite=Ee.Refactor.append("rewrite");Ee.Source=new Ee("source");Ee.SourceOrganizeImports=Ee.Source.append("organizeImports");Ee.SourceFixAll=Ee.Source.append("fixAll");Ee.SurroundWith=Ee.Refactor.append("surround");var Yi;(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(Yi||(Yi={}));function pF(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>gF(e,t,i.include))||!i.includeSourceActions&&Ee.Source.contains(e))}function fF(i,e){let t=e.kind?new Ee(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>gF(t,n,i.include))||!i.includeSourceActions&&t&&Ee.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function gF(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var Tl=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ee(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},Tv=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return jJ(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){bt(r)}n&&(this.action.edit=n.edit)}return this})}};var Iv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kv="editor.action.codeAction",Wh="editor.action.quickFix",Av="editor.action.autoFix",Lv="editor.action.refactor",Nv="editor.action.sourceAction",x0="editor.action.organizeImports",E0="editor.action.fixAll",YS=class i extends Y{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Xt(e.diagnostics)?Xt(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Xt(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ee.QuickFix.contains(new Ee(e.kind))&&!!e.isPreferred)}},_F={actions:[],documentation:void 0};function T0(i,e,t,n,r,o){var s;return Iv(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new _k(e,o),d=VJ(i,e,a),h=new W,u=d.map(p=>Iv(this,void 0,void 0,function*(){try{r.report(p);let f=yield p.provideCodeActions(e,t,l,c.token);if(f&&h.add(f),c.token.isCancellationRequested)return _F;let _=((f==null?void 0:f.actions)||[]).filter(C=>C&&fF(a,C)),b=qJ(p,_,a.include);return{actions:_.map(C=>new Tv(C,p)),documentation:b}}catch(f){if(Wr(f))throw f;return bt(f),_F}})),m=i.onDidChange(()=>{let p=i.all(e);Uo(p,d)||c.cancel()});try{let p=yield Promise.all(u),f=p.map(b=>b.actions).flat(),_=[...Wo(p.map(b=>b.documentation)),...KJ(i,e,n,f)];return new YS(f,_,h)}finally{m.dispose(),c.dispose()}})}function VJ(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>pF(t,new Ee(r))):!0)}function*KJ(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function qJ(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Ee(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Ee(r.kind)))return o.command}}var w0;(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(w0||(w0={}));function vF(i,e,t,n,r=ze.None){var o;return Iv(this,void 0,void 0,function*(){let s=i.get(Wf),a=i.get(Pt),l=i.get(En),c=i.get(ni);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==w0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let h=GJ(d);c.error(typeof h=="string"?h:g("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function GJ(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}Je.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return Iv(this,void 0,void 0,function*(){if(!(e instanceof Qe))throw Jl();let{codeActionProvider:o}=i.get(le),s=i.get(Ri).getModel(e);if(!s)throw Jl();let a=ye.isISelection(t)?ye.liftSelection(t):k.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Jl();let l=typeof n=="string"?new Ee(n):void 0,c=yield T0(o,s,a,{type:1,triggerAction:Yi.Default,filter:{includeSourceActions:!0,include:l}},Qo.None,ze.None),d=[],h=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let u=0;u<h;u++)d.push(c.validActions[u].resolve(ze.None));try{return yield Promise.all(d),c.validActions.map(u=>u.action)}finally{setTimeout(()=>c.dispose(),100)}})});be();qe();gt();it();O2();re();St();ut();O2();hn();var $J=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},YJ=function(i,e){return function(t,n){e(t,n,i)}},I0=class bF{constructor(e){this.keybindingService=e}getResolver(){let e=new Ud(()=>this.keybindingService.getKeybindings().filter(t=>bF.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===x0?n={kind:Ee.SourceOrganizeImports.value}:t.command===E0&&(n={kind:Ee.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Tl.fromUser(n,{kind:Ee.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Ee(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};I0.codeActionCommands=[Lv,kv,Nv,x0,E0];I0=$J([YJ(0,mt)],I0);on();be();kn();var h_e=pe("symbolIcon.arrayForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),u_e=pe("symbolIcon.booleanForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m_e=pe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p_e=pe("symbolIcon.colorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f_e=pe("symbolIcon.constantForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g_e=pe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),__e=pe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v_e=pe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b_e=pe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y_e=pe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S_e=pe("symbolIcon.fileForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C_e=pe("symbolIcon.folderForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w_e=pe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x_e=pe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E_e=pe("symbolIcon.keyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T_e=pe("symbolIcon.keywordForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I_e=pe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k_e=pe("symbolIcon.moduleForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A_e=pe("symbolIcon.namespaceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L_e=pe("symbolIcon.nullForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N_e=pe("symbolIcon.numberForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R_e=pe("symbolIcon.objectForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D_e=pe("symbolIcon.operatorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M_e=pe("symbolIcon.packageForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O_e=pe("symbolIcon.propertyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P_e=pe("symbolIcon.referenceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F_e=pe("symbolIcon.snippetForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),H_e=pe("symbolIcon.stringForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B_e=pe("symbolIcon.structForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z_e=pe("symbolIcon.textForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),U_e=pe("symbolIcon.typeParameterForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),W_e=pe("symbolIcon.unitForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),j_e=pe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));be();var yF=Object.freeze({kind:Ee.Empty,title:g("codeAction.widget.id.more","More Actions...")}),XJ=Object.freeze([{kind:Ee.QuickFix,title:g("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Ee.RefactorExtract,title:g("codeAction.widget.id.extract","Extract..."),icon:De.wrench},{kind:Ee.RefactorInline,title:g("codeAction.widget.id.inline","Inline..."),icon:De.wrench},{kind:Ee.RefactorRewrite,title:g("codeAction.widget.id.convert","Rewrite..."),icon:De.wrench},{kind:Ee.RefactorMove,title:g("codeAction.widget.id.move","Move..."),icon:De.wrench},{kind:Ee.SurroundWith,title:g("codeAction.widget.id.surround","Surround With..."),icon:De.symbolSnippet},{kind:Ee.Source,title:g("codeAction.widget.id.source","Source Action..."),icon:De.symbolFile},yF]);function SF(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:yF,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=XJ.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Ee(o.action.kind):Ee.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}gt();bk();on();wt();re();Zn();ti();ik();be();hn();var QJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},JJ=function(i,e){return function(t,n){e(t,n,i)}},jh;(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(jh||(jh={}));var wa=class CF extends Y{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Re),this.onClick=this._onClick.event,this._state=jh.Hidden,this._domNode=te("div.lightBulbWidget"),this._register(Vf.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(bT(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=wn(this._domNode),s=this._editor.getOption(64),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=s),this._onClick.fire({x:n.posx,y:r+o+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register(jt(this._domNode,"mouseenter",n=>{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Nt.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=Wi((n=t.lookupKeybinding(Av))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Wi((r=t.lookupKeybinding(Wh))===null||r===void 0?void 0:r.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(48),d=o.getLineContent(s),h=h1(d,l),u=c.spaceWidth*h>22,m=f=>f>2&&this._editor.getTopForLineNumber(f)===this._editor.getTopForLineNumber(f-1),p=s;if(!u){if(s>1&&!m(s-1))p-=1;else if(!m(s+1))p+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new jh.Showing(e,t,n,{position:{lineNumber:p,column:1},preference:CF._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==jh.Hidden&&(this.state=jh.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...Ve.asClassNameArray(De.lightBulb)),this._domNode.classList.add(...Ve.asClassNameArray(De.lightbulbAutofix)),this._preferredKbLabel)){this.title=g("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...Ve.asClassNameArray(De.lightbulbAutofix)),this._domNode.classList.add(...Ve.asClassNameArray(De.lightBulb)),this._quickFixKbLabel?this.title=g("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=g("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};wa.ID="editor.contrib.lightbulbWidget";wa._posPref=[0];wa=QJ([JJ(1,mt)],wa);wr();ct();re();Me();Ie();be();qe();var ZJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eZ=function(i,e){return function(t,n){e(t,n,i)}},Xi=class XS{static get(e){return e.getContribution(XS.ID)}constructor(e,t){this._messageWidget=new ai,this._messageListeners=new W,this._editor=e,this._visible=XS.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Kt(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Rv(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new jo(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new k(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Rv.fadeOut(this._messageWidget.value))}};Xi.ID="editor.contrib.messageController";Xi.MESSAGE_VISIBLE=new Ne("messageVisible",!1,g("messageVisible","Whether the editor is currently showing an inline message"));Xi=ZJ([eZ(1,we)],Xi);var tZ=ii.bindToContribution(Xi.get);ge(new tZ({id:"leaveEditorMessage",precondition:Xi.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));var Rv=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Se(Xi.ID,Xi,4);be();gt();re();be();gt();on();re();yn();Zn();be();hn();kn();var wF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QS=function(i,e){return function(t,n){e(t,n,i)}},tC="acceptSelectedCodeAction",iC="previewSelectedCodeAction",JS=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},ZS=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new Gf(e,of);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=Ve.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Ko(e.group.icon.color.id))):(n.icon.className=Ve.asClassName(De.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=xF(e.label),n.keybinding.set(e.keybinding),ET(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(tC))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(iC))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=g({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=g({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};ZS=wF([QS(1,mt)],ZS);var eC=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Dv=class extends UIEvent{constructor(){super("previewSelectedAction")}},Mv=class extends Y{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new qf(e,this.domNode,a,[new ZS(t,this._keybindingService),new JS],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?xF(l==null?void 0:l.label):"";return l.disabled&&(c=g({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>g({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Ik),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let h=document.getElementById(this._list.getElementID(d));if(h){h.style.width="auto";let u=h.getBoundingClientRect().width;return h.style.width="",u}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new Dv:new eC;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Dv):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Mv=wF([QS(4,ol),QS(5,mt)],Mv);function xF(i){return i.replace(/\r\n|\r|\n/g," ")}mi();qe();ac();st();var iZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nC=function(i,e){return function(t,n){e(t,n,i)}},Bc={Visible:new Ne("codeActionMenuVisible",!1,g("codeActionMenuVisible","Whether the action widget list is visible"))},Il=Jn("actionWidgetService"),zc=class extends Y{get isVisible(){return Bc.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new ai)}show(e,t,n,r,o,s,a){let l=Bc.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Mv,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new W,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(jt(l,Qn.MOUSE_DOWN,p=>p.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(jt(d,Qn.POINTER_MOVE,()=>d.remove())),s.add(jt(d,Qn.MOUSE_DOWN,()=>d.remove()));let h=0;if(n.length){let p=this._createActionBar(".action-widget-action-bar",n);p&&(o.appendChild(p.getContainer().parentElement),s.add(p),h=p.getContainer().offsetWidth)}let u=(r=this._list.value)===null||r===void 0?void 0:r.layout(h);o.style.width=`${u}px`;let m=s.add(zs(e));return s.add(m.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=te(e),r=new kr(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};zc=iZ([nC(0,ol),nC(1,we),nC(2,Ce)],zc);tr(Il,zc,1);var k0=100+1e3;Ft(class extends Gr{constructor(){super({id:"hideCodeActionWidget",title:{value:g("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Bc.Visible,keybinding:{weight:k0,primary:9,secondary:[1033]}})}run(i){i.get(Il).hide()}});Ft(class extends Gr{constructor(){super({id:"selectPrevCodeAction",title:{value:g("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusPrevious()}});Ft(class extends Gr{constructor(){super({id:"selectNextCodeAction",title:{value:g("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusNext()}});Ft(class extends Gr{constructor(){super({id:tC,title:{value:g("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected()}});Ft(class extends Gr{constructor(){super({id:iC,title:{value:g("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:2051}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected(!0)}});Si();sn();qe();st();mc();ct();it();wt();re();Tr();qe();mc();var rC=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},nZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},Vh,sC=new Ne("supportedCodeAction",""),oC=class extends Y{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new jo),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>qd(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Yi.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}},Uc;(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(Wr(s))return rZ;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Uc||(Uc={}));var rZ=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Ov=class extends Y{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new ai),this._state=Uc.Empty,this._onDidChangeState=this._register(new Re),this.onDidChangeState=this._onDidChangeState.event,Vh.set(this,!1),this._supportedCodeActions=sC.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){rC(this,Vh,"f")||(nZ(this,Vh,!0,"f"),super.dispose(),this.setState(Uc.Empty,!0))}_update(){if(rC(this,Vh,"f"))return;this._codeActionOracle.value=void 0,this.setState(Uc.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new oC(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Uc.Empty);return}let o=Ht(s=>T0(this._registry,e,n.selection,n.trigger,Qo.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Uc.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Yi.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!rC(this,Vh,"f")&&this._onDidChangeState.fire(e))}};Vh=new WeakMap;var oZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xa=function(i,e){return function(t,n){e(t,n,i)}},Pv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},sZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},aZ=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},Fv,ys=class EF extends Y{static get(e){return e.getContribution(EF.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new ai),this._showDisabled=!1,Fv.set(this,!1),this._editor=e,this._model=this._register(new Ov(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Ud(()=>{let h=this._editor.getContribution(wa.ID);return h&&this._register(h.onClick(u=>this.showCodeActionList(u.actions,u,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=r.createInstance(I0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){sZ(this,Fv,!0,"f"),super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Xi.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return Pv(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(vF,e,w0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Yi.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return Pv(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){Be(d);return}if(!aZ(this,Fv,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let h=this.tryGetValidActionToApply(e.trigger,c);if(h){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(h,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(u&&u.action.disabled){(s=Xi.get(this._editor))===null||s===void 0||s.showMessage(u.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Xi.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return Pv(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Pv(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,SF(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=wn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:g("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:g("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};Fv=new WeakMap;ys.ID="editor.contrib.codeActionController";ys=oZ([xa(1,v1),xa(2,we),xa(3,Ce),xa(4,le),xa(5,Gs),xa(6,Pt),xa(7,nt),xa(8,Il),xa(9,Ce)],ys);function A0(i){return G.regex(sC.keys()[0],new RegExp("(\\s|^)"+Ws(i.value)+"\\b"))}var aC={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:g("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:g("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[g("args.schema.apply.first","Always apply the first returned code action."),g("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),g("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:g("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function Wc(i,e,t,n,r=Yi.Default){if(i.hasModel()){let o=ys.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var Hv=class extends K{constructor(){super({id:Wh,label:g("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:G.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:2137,weight:100}})}run(e,t){return Wc(t,g("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Yi.QuickFix)}},Bv=class extends ii{constructor(){super({id:kv,precondition:G.and(I.writable,I.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:aC}]}})}runEditorCommand(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Empty,apply:"ifSingle"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):g("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?g("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):g("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},zv=class extends K{constructor(){super({id:Lv,label:g("refactor.label","Refactor..."),alias:"Refactor...",precondition:G.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:G.and(I.writable,A0(Ee.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Refactor,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):g("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?g("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):g("editor.action.refactor.noneMessage","No refactorings available"),{include:Ee.Refactor.contains(r.kind)?r.kind:Ee.None,onlyIncludePreferredActions:r.preferred},r.apply,Yi.Refactor)}},Uv=class extends K{constructor(){super({id:Nv,label:g("source.label","Source Action..."),alias:"Source Action...",precondition:G.and(I.writable,I.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:G.and(I.writable,A0(Ee.Source))},description:{description:"Source Action...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Source,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):g("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?g("editor.action.source.noneMessage.preferred","No preferred source actions available"):g("editor.action.source.noneMessage","No source actions available"),{include:Ee.Source.contains(r.kind)?r.kind:Ee.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Yi.SourceAction)}},Wv=class extends K{constructor(){super({id:x0,label:g("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:G.and(I.writable,A0(Ee.SourceOrganizeImports)),kbOpts:{kbExpr:I.textInputFocus,primary:1581,weight:100}})}run(e,t){return Wc(t,g("editor.action.organize.noneMessage","No organize imports action available"),{include:Ee.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Yi.OrganizeImports)}},jv=class extends K{constructor(){super({id:E0,label:g("fixAll.label","Fix All"),alias:"Fix All",precondition:G.and(I.writable,A0(Ee.SourceFixAll))})}run(e,t){return Wc(t,g("fixAll.noneMessage","No fix all action available"),{include:Ee.SourceFixAll,includeSourceActions:!0},"ifSingle",Yi.FixAll)}},Vv=class extends K{constructor(){super({id:Av,label:g("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:G.and(I.writable,A0(Ee.QuickFix)),kbOpts:{kbExpr:I.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Wc(t,g("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ee.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Yi.AutoFix)}};be();tI();rc();Se(ys.ID,ys,3);Se(wa.ID,wa,4);F(Hv);F(zv);F(Uv);F(Wv);F(Vv);F(jv);ge(new Bv);er.as(Cf.Configuration).registerConfiguration(Object.assign(Object.assign({},gk),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:g("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));Bs();Me();Ie();ht();an();Zo();St();Ie();Di();var Ea=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s<r;s++){let a=e.charCodeAt(n+s),l=t.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=o.getLineContent(a),u=o.getLineContent(c),m=h.lastIndexOf(t,l-1+t.length),p=u.indexOf(n,d-1-n.length);if(m!==-1&&p!==-1)if(a===c)h.substring(m+t.length,p).indexOf(n)>=0&&(m=-1,p=-1);else{let _=h.substring(m+t.length),b=u.substring(0,p);(_.indexOf(n)>=0||b.indexOf(n)>=0)&&(m=-1,p=-1)}let f;m!==-1&&p!==-1?(r&&m+t.length<h.length&&h.charCodeAt(m+t.length)===32&&(t=t+" "),r&&p>0&&u.charCodeAt(p-1)===32&&(n=" "+n,p-=1),f=i._createRemoveBlockCommentOperations(new k(a,m+t.length+1,c,p+1),t,n)):(f=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=f.length===1?n:null);for(let _ of f)s.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return k.isEmpty(e)?r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(at.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return k.isEmpty(e)?o.push(at.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(at.insert(new ie(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(at.insert(new ie(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new ye(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new ye(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}};Bt();Zo();St();Ie();Di();var Kv=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;c<d;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,n,r,o,s,a,l){let c=!0,d;e===0?d=!0:e===1?d=!1:d=!0;for(let h=0,u=r.length;h<u;h++){let m=r[h],p=o+h;if(p===o&&a){m.ignore=!0;continue}let f=n.getLineContent(p),_=Xu(f);if(_===-1){m.ignore=s,m.commentStrOffset=f.length;continue}if(c=!1,m.ignore=!1,m.commentStrOffset=_,d&&!Ea._haystackHasNeedleAtOffset(f,m.commentStr,_)&&(e===0?d=!1:e===1||(m.ignore=!0)),d&&t){let b=_+m.commentStrLength;b<f.length&&f.charCodeAt(b)===32&&(m.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let h=0,u=r.length;h<u;h++)r[h].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:r}}static _gatherPreflightData(e,t,n,r,o,s,a,l){let c=i._gatherPreflightCommentStrings(n,r,o,l);return c===null?{supported:!1}:i._analyzeLines(e,t,n,c,r,s,a,l)}_executeLineComments(e,t,n,r){let o;n.shouldRemoveComments?o=i._createRemoveLineCommentsOperations(n.lines,r.startLineNumber):(i._normalizeInsertionPoint(e,n.lines,r.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(n.lines,r.startLineNumber));let s=new ie(r.positionLineNumber,r.positionColumn);for(let a=0,l=o.length;a<l;a++)t.addEditOperation(o[a].range,o[a].text),k.isEmpty(o[a].range)&&k.getStartPosition(o[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[a].text||"").length);this._selectionId=t.trackSelection(r)}_attemptRemoveBlockComment(e,t,n,r){let o=t.startLineNumber,s=t.endLineNumber,a=r.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(o).lastIndexOf(n,a-1),c=e.getLineContent(s).indexOf(r,t.endColumn-1-n.length);return l!==-1&&c===-1&&(c=e.getLineContent(o).indexOf(r,l+n.length),s=o),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(n,c),o=s),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(o).indexOf(n),l!==-1&&(c=e.getLineContent(o).indexOf(r,l+n.length))),l!==-1&&e.getLineContent(o).charCodeAt(l+n.length)===32&&(n+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(r=" "+r,c-=1),l!==-1&&c!==-1?Ea._createRemoveBlockCommentOperations(new k(o,l+n.length+1,s,c+1),n,r):null}_executeBlockComment(e,t,n){e.tokenization.tokenizeIfCheap(n.startLineNumber);let r=e.getLanguageIdAtPosition(n.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(r).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;let s=o.blockCommentStartToken,a=o.blockCommentEndToken,l=this._attemptRemoveBlockComment(e,n,s,a);if(!l){if(n.isEmpty()){let c=e.getLineContent(n.startLineNumber),d=Xu(c);d===-1&&(d=c.length),l=Ea._createAddBlockCommentOperations(new k(n.startLineNumber,d+1,n.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=Ea._createAddBlockCommentOperations(new k(n.startLineNumber,e.getLineFirstNonWhitespaceColumn(n.startLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(n);for(let c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let n=this._selection;if(this._moveEndPositionDown=!1,n.startLineNumber===n.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new k(n.startLineNumber,e.getLineMaxColumn(n.startLineNumber),n.startLineNumber+1,1),n.startLineNumber===e.getLineCount()?"":`
|
|
`),this._selectionId=t.trackSelection(n);return}n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let r=i._gatherPreflightData(this._type,this._insertSpace,e,n.startLineNumber,n.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return r.supported?this._executeLineComments(e,t,r,n):this._executeBlockComment(e,t,n)}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new ye(n.selectionStartLineNumber,n.selectionStartColumn+this._deltaColumn,n.positionLineNumber,n.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];s.ignore||n.push(at.delete(new k(t+r,s.commentStrOffset+1,t+r,s.commentStrOffset+s.commentStrLength+1)))}return n}_createAddLineCommentsOperations(e,t){let n=[],r=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){let a=e[o];a.ignore||n.push(at.insert(new ie(t+o,a.commentStrOffset+1),a.commentStr+r))}return n}static nextVisibleColumn(e,t,n,r){return n?e+(t-e%t):e+r}static _normalizeInsertionPoint(e,t,n,r){let o=1073741824,s,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(n+l),h=0;for(let u=0,m=t[l].commentStrOffset;h<o&&u<m;u++)h=i.nextVisibleColumn(h,r,d.charCodeAt(u)===9,1);h<o&&(o=h)}o=Math.floor(o/r)*r;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(n+l),h=0;for(s=0,a=t[l].commentStrOffset;h<o&&s<a;s++)h=i.nextVisibleColumn(h,r,d.charCodeAt(s)===9,1);h>o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}};be();mi();var L0=class extends K{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(rt);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>k.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d<l.length;d++){let h=l[d];c.selection.endLineNumber===h.selection.startLineNumber&&(c.index<h.index?h.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=h))}for(let d of l)o.push(new Kv(n,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},lC=class extends L0{constructor(){super(0,{id:"editor.action.commentLine",label:g("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"5_insert",title:g({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}},cC=class extends L0{constructor(){super(1,{id:"editor.action.addCommentLine",label:g("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2081),weight:100}})}},dC=class extends L0{constructor(){super(2,{id:"editor.action.removeCommentLine",label:g("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2099),weight:100}})}},hC=class extends K{constructor(){super({id:"editor.action.blockComment",label:g("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"5_insert",title:g({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){let n=e.get(rt);if(!t.hasModel())return;let r=t.getOption(21),o=[],s=t.getSelections();for(let a of s)o.push(new Ea(a,r.insertSpace,n));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}};F(lC);F(cC);F(dC);F(hC);gt();ic();re();yn();Me();ht();be();mi();qe();hn();sn();var lZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jc=function(i,e){return function(t,n){e(t,n,i)}},Kh=class TF{static get(e){return e.getContribution(TF.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new W,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let d=this._contextViewService.getContextViewElement(),h=c.srcElement;h.shadowRoot&&wT(d)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(22)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?ae.SimpleEditorContext:ae.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(let s of o){let[,a]=s,l=0;for(let c of a)if(c instanceof Qu){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Yu(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new fo)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),s=wn(this._editor.getDomNode()),a=s.left+o.left,l=s.top+o.top+o.height;t={x:a,y:l}}let r=this._editor.getOption(123)&&!A2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{let s=this._keybindingFor(o);if(s)return new i9(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});let a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new i9(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Rk(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(70),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled=="undefined"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,d)=>new Yu(`menu-action-${++n}`,c,d,void 0),s=(c,d,h,u,m)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let p=_=>()=>{this._configurationService.updateValue(h,_)},f=[];for(let _ of m)f.push(r({label:_.label,checked:u===_.value,run:p(_.value)}));return o(c,f)},a=[];a.push(r({label:g("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new fo),a.push(r({label:g("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(g("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:g("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:g("context.minimap.size.fill","Fill"),value:"fill"},{label:g("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(g("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:g("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:g("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(123)&&!A2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Kh.ID="editor.contrib.contextmenu";Kh=lZ([jc(1,Jo),jc(2,ol),jc(3,we),jc(4,mt),jc(5,go),jc(6,nt),jc(7,b1)],Kh);var uC=class extends K{constructor(){super({id:"editor.action.showContextMenu",label:g("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Kh.get(t))===null||n===void 0||n.showContextMenu()}};Se(Kh.ID,Kh,2);F(uC);re();Me();ht();be();var N0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r<t;r++)if(!this.selections[r].equalsSelection(e.selections[r]))return!1;return!0}},R0=class{constructor(e,t,n){this.cursorState=e,this.scrollTop=t,this.scrollLeft=n}},Vc=class i extends Y{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;let n=new N0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new R0(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new R0(new N0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new R0(new N0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Vc.ID="editor.contrib.cursorUndoRedoController";var mC=class extends K{constructor(){super({id:"cursorUndo",label:g("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Vc.get(t))===null||r===void 0||r.cursorUndo()}},pC=class extends K{constructor(){super({id:"cursorRedo",label:g("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Vc.get(t))===null||r===void 0||r.cursorRedo()}};Se(Vc.ID,Vc,0);F(mC);F(pC);re();yn();Me();St();Ie();Di();dn();Ie();Di();var qv=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new ye(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new ye(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);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new ye(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new ye(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new ye(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}};function qh(i){return Ui?i.altKey:i.ctrlKey}var Kc=class i extends Y{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(33)||this._editor.getOption(20)||(qh(e)&&(this._modifierPressed=!0),this._mouseDown&&qh(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(qh(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}qh(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new ie(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new ye(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new ye(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(qh(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new qv(this._dragSelection,t,qh(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:i._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};Kc.ID="editor.contrib.dragAndDrop";Kc.TRIGGER_KEY_VALUE=Ui?6:5;Kc._DECORATION_OPTIONS=Ue.register({description:"dnd-target",className:"dnd-target"});Se(Kc.ID,Kc,2);ct();re();Bt();Me();tk();ht();rl();Rt();ct();re();St();Ie();Di();ij();Ie();rl();dn();kn();ln();var Ss=class i{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(let n of t){let r=n.options;if(r===i._FIND_MATCH_DECORATION||r===i._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(n.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let r=0,o=this._decorations.length;r<o;r++){let s=this._editor.getModel().getDecorationRange(this._decorations[r]);if(e.equalsRange(s)){t=this._decorations[r],n=r+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(r=>{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new k(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c)),h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let m=1,p=e.length;m<p;m++){let f=e[m].range;u+d>=f.startLineNumber?f.endLineNumber>u&&(u=f.endLineNumber):(o.push({range:new k(h,1,u,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=f.startLineNumber,u=f.endLineNumber)}o.push({range:new k(h,1,u,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:r};this._decorations=n.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=n.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>n.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumber<e.lineNumber)return r;if(!(r.endColumn>e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;t<n;t++){let r=this._decorations[t],o=this._editor.getModel().getDecorationRange(r);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};Ss._CURRENT_FIND_MATCH_DECORATION=Ue.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:Lt(Pf),position:zn.Center},minimap:{color:Lt(Q2),position:Vo.Inline}});Ss._FIND_MATCH_DECORATION=Ue.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:Lt(Pf),position:zn.Center},minimap:{color:Lt(Q2),position:Vo.Inline}});Ss._FIND_MATCH_NO_OVERVIEW_DECORATION=Ue.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Ss._FIND_MATCH_ONLY_OVERVIEW_DECORATION=Ue.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Lt(Pf),position:zn.Center}});Ss._RANGE_HIGHLIGHT_DECORATION=Ue.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Ss._FIND_SCOPE_DECORATION=Ue.register({description:"find-scope",className:"findScope",isWholeLine:!0});Ie();var Gv=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;s<this._ranges.length;s++)n.push({range:this._ranges[s],text:this._replaceStrings[s]});n.sort((s,a)=>k.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s<n.length;s++)o.range.endLineNumber===n[s].range.startLineNumber&&o.range.endColumn===n[s].range.startColumn?(o.range=o.range.plusRange(n[s].range),o.text=o.text+n[s].text):(r.push(o),o=n[s]);r.push(o);for(let s of r)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}};Bt();function fC(i,e){if(i&&i[0]!==""){let t=IF(i,e,"-"),n=IF(i,e,"_");return t&&!n?kF(i,e,"-"):!t&&n?kF(i,e,"_"):i[0].toUpperCase()===i[0]?e.toUpperCase():i[0].toLowerCase()===i[0]?e.toLowerCase():PT(i[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function IF(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function kF(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=fC([r[a]],s)+t}),o.slice(0,-1)}var $v=class{constructor(e){this.staticValue=e,this.kind=0}},gC=class{constructor(e){this.pieces=e,this.kind=1}},$h=class i{static fromStaticValue(e){return new i([Gh.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new $v(""):e.length===1&&e[0].staticValue!==null?this._state=new $v(e[0].staticValue):this._state=new gC(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?fC(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r<o;r++){let s=this._state.pieces[r];if(s.staticValue!==null){n+=s.staticValue;continue}let a=i._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){let l=[],c=s.caseOps.length,d=0;for(let h=0,u=a.length;h<u;h++){if(d>=c){l.push(a.slice(h));break}switch(s.caseOps[d]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),d++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),d++;break;default:l.push(a[h])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e<t.length)return(t[e]||"")+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n}},Gh=class i{static staticValue(e){return new i(e,-1,null)}static caseOps(e,t){return new i(null,e,t)}constructor(e,t,n){this.staticValue=e,this.matchIndex=t,!n||n.length===0?this.caseOps=null:this.caseOps=n.slice(0)}},_C=class{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,n){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Gh.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Gh.caseOps(e,n),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Gh.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new $h(this._result)}};function AF(i){if(!i||i.length===0)return new $h(null);let e=[],t=new _C(i);for(let n=0,r=i.length;n<r;n++){let o=i.charCodeAt(n);if(o===92){if(n++,n>=r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(`
|
|
`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1<r){let l=i.charCodeAt(n+1);if(48<=l&&l<=57){n++,a=a*10+(l-48),t.emitUnchanged(n-2),t.emitMatchIndex(a,n+1,e),e.length=0;continue}}t.emitUnchanged(n-1),t.emitMatchIndex(a,n+1,e),e.length=0;continue}}}return t.finalize()}qe();var ws=new Ne("findWidgetVisible",!1),vbe=ws.toNegated(),Yh=new Ne("findInputFocussed",!1),D0=new Ne("replaceInputFocussed",!1),M0={primary:545,mac:{primary:2593}},O0={primary:565,mac:{primary:2613}},P0={primary:560,mac:{primary:2608}},F0={primary:554,mac:{primary:2602}},H0={primary:558,mac:{primary:2606}},dt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Cs=19999,cZ=240,Yv=class i{constructor(e,t){this._toDispose=new W,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new jo,this._decorations=new Ss(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new kt(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ei(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},cZ)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Cs);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=bf(r.map(l=>l.range),l=>k.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new ie(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<Cs){let d=this._decorations.matchBeforePosition(e);d&&d.isEmpty()&&d.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),d=this._decorations.matchBeforePosition(e)),d&&this._setCurrentFindMatch(d);return}if(this._cannotFind())return;let n=this._decorations.getFindScope(),r=i._getSearchRange(this._editor.getModel(),n);r.getEndPosition().isBefore(e)&&(e=r.getEndPosition()),e.isBefore(r.getStartPosition())&&(e=r.getEndPosition());let{lineNumber:o,column:s}=e,a=this._editor.getModel(),l=new ie(o,s),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,!1)),!!c){if(!t&&!r.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new ie(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()<Cs){let n=this._decorations.matchAfterPosition(e);n&&n.isEmpty()&&n.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),n=this._decorations.matchAfterPosition(e)),n&&this._setCurrentFindMatch(n);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,n,r=!1){if(this._cannotFind())return null;let o=this._decorations.getFindScope(),s=i._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),d=new ie(a,l),h=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t);return n&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t)),h?!r&&!s.containsRange(h.range)?this._getNextMatch(h.range.getEndPosition(),t,n,!0):h:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){let t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?AF(this._state.replaceString):$h.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){let r=e.buildReplaceString(n.matches,this._state.preserveCase),o=new js(t,r);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new ie(t.startLineNumber,t.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,t,n){let r=(e||[null]).map(o=>i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Cs?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new nk(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let h="mu";n.ignoreCase&&(h+="i"),n.global&&(h+="g"),n=new RegExp(n.source,h)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new _f(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;s<a;s++)r[s]=t.buildReplaceString(n[s].matches,this._state.preserveCase);let o=new Gv(this._editor.getSelection(),n.map(s=>s.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new ye(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o<s;o++)if(n[o].equalsRange(r)){n=[r].concat(n.slice(0,o)).concat(n.slice(o+1));break}this._editor.setSelections(n)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}};gt();Kf();ct();kn();var B0=class i extends $s{constructor(e,t,n){super(),this._hideSoon=this._register(new kt(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:Ko(Df),inputActiveOptionForeground:Ko(Of),inputActiveOptionBackground:Ko(Mf)};this.caseSensitive=this._register(new Dk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new Mk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Ok(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(jt(this._domNode,Qn.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(jt(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};B0.ID="editor.contrib.findOptionsWidget";wt();re();Ie();function Xv(i,e){return i===1?!0:i===2?!1:e}var Qv=class extends Y{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Xv(this._isRegexOverride,this._isRegex)}get wholeWord(){return Xv(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Xv(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Xv(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new Re),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(k.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(h=>{var u;return(u=this._searchScope)===null||u===void 0?void 0:u.some(m=>!k.equalsRange(m,h))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Cs}};gt();wr();Kf();ct();on();it();re();yn();Bt();Ie();be();gt();Kf();on();wt();be();var dZ=g("defaultLabel","input"),hZ=g("label.preserveCaseToggle","Preserve Case"),vC=class extends $f{constructor(e){super({icon:De.preserveCase,title:hZ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},Jv=class extends $s{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Re),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Re),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Re),this._onInput=this._register(new Re),this._onKeyUp=this._register(new Re),this._onPreserveCaseKeyDown=this._register(new Re),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||dZ;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Pk(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new vC(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(u=>{this._onPreserveCaseKeyDown.fire(u)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){let m=d.indexOf(document.activeElement);if(m>=0){let p=-1;u.equals(17)?p=(m+1)%d.length:u.equals(15)&&(m===0?p=d.length-1:p=m-1),u.equals(9)?(d[m].blur(),this.inputBox.focus()):p>=0&&d[p].focus(),tc.stop(u,!0)}}});let h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}};qe();z2();be();re();var LF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NF=function(i,e){return function(t,n){e(t,n,i)}},i4=new Ne("suggestWidgetVisible",!1,g("suggestWidgetVisible","Whether suggestion are visible")),bC="historyNavigationWidgetFocus",RF="historyNavigationForwardsEnabled",DF="historyNavigationBackwardsEnabled",Ta,Zv=[];function MF(i,e){if(Zv.includes(e))throw new Error("Cannot register the same widget multiple times");Zv.push(e);let t=new W,n=new Ne(bC,!1).bindTo(i),r=new Ne(RF,!0).bindTo(i),o=new Ne(DF,!0).bindTo(i),s=()=>{n.set(!0),Ta=e},a=()=>{n.set(!1),Ta===e&&(Ta=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ft(()=>{Zv.splice(Zv.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var e4=class extends Fk{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(MF(o,this.inputBox))}};e4=LF([NF(3,we)],e4);var t4=class extends Jv{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(MF(s,this.inputBox))}};t4=LF([NF(3,we)],t4);Er.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:G.and(G.has(bC),G.equals(DF,!0),i4.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Ta==null||Ta.showPreviousValue()}});Er.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:G.and(G.has(bC),G.equals(RF,!0),i4.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Ta==null||Ta.showNextValue()}});function yC(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}kn();ln();Zn();ek();ti();var uZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},mZ=Qt("find-selection",De.selection,g("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),OF=Qt("find-collapsed",De.chevronRight,g("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),PF=Qt("find-expanded",De.chevronDown,g("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),pZ=Qt("find-replace",De.replace,g("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),fZ=Qt("find-replace-all",De.replaceAll,g("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),gZ=Qt("find-previous-match",De.arrowUp,g("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),_Z=Qt("find-next-match",De.arrowDown,g("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),vZ=g("label.find","Find"),bZ=g("placeholder.find","Find"),yZ=g("label.previousMatchButton","Previous Match"),SZ=g("label.nextMatchButton","Next Match"),CZ=g("label.toggleSelectionFind","Find in Selection"),wZ=g("label.closeButton","Close"),xZ=g("label.replace","Replace"),EZ=g("placeholder.replace","Replace"),TZ=g("label.replaceButton","Replace"),IZ=g("label.replaceAllButton","Replace All"),kZ=g("label.toggleReplaceButton","Toggle Replace"),AZ=g("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Cs),LZ=g("label.matchesLocation","{0} of {1}"),FF=g("label.noResults","No results"),xs=419,NZ=275,RZ=NZ-54,z0=69,DZ=33,HF="ctrlEnterReplaceAll.windows.donotask",BF=Ui?256:2048,U0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=DZ,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};function zF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function UF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd<t.value.length){i.stopPropagation();return}}var W0=class i extends $s{constructor(e,t,n,r,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(HF,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ir(500),this._register(ft(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(140)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(39)){let h=this._codeEditor.getOption(39).loop;this._state.change({loop:h},!1);let u=this._codeEditor.getOption(39).addExtraSpaceOnTop;u&&!this._viewZone&&(this._viewZone=new U0(0),this._showViewZone()),!u&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>uZ(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=Yh.bindTo(s),this._findFocusTracker=this._register(zs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=D0.bindTo(s),this._replaceFocusTracker=this._register(zs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(39).addExtraSpaceOnTop&&(this._viewZone=new U0(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Bo(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),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.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Be)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=z0+"px",this._state.matchesCount>=Cs?this._matchesCount.title=AZ:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Cs&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=xr(LZ,n,t)}else e=FF;this._matchesCount.appendChild(document.createTextNode(e)),Kt(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),z0=Math.max(z0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===FF)return n===""?g("ariaSearchNoResultEmpty","{0} found",e):g("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=g("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return g("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=wn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);let l=ST(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new U0(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(81).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!vT(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&Bo(this._domNode)>xs){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=Bo(this._findInput.domNode);return}if(xs+28+r>=n&&(s=!0),xs+28+r-z0>=n&&(a=!0),xs+28+r-z0>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(BF|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
|
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return zF(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return UF(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(BF|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Hd&&Ga&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(g("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(HF,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
|
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return zF(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return UF(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new e4(null,this._contextViewProvider,{width:RZ,label:vZ,placeholder:bZ,appendCaseSensitiveLabel:this._keybindingLabelFor(dt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(dt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(dt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>yC(this._keybindingService),inputBoxStyles:r9,toggleStyles:n9},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(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),oT&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new kl({label:yZ+this._keybindingLabelFor(dt.PreviousMatchFindAction),icon:gZ,onTrigger:()=>{$a(this._codeEditor.getAction(dt.PreviousMatchFindAction)).run().then(void 0,Be)}})),this._nextBtn=this._register(new kl({label:SZ+this._keybindingLabelFor(dt.NextMatchFindAction),icon:_Z,onTrigger:()=>{$a(this._codeEditor.getAction(dt.NextMatchFindAction)).run().then(void 0,Be)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",n.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new $f({icon:mZ,title:CZ+this._keybindingLabelFor(dt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:Ko(Mf),inputActiveOptionBorder:Ko(Df),inputActiveOptionForeground:Ko(Of)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kl({label:wZ+this._keybindingLabelFor(dt.CloseFindWidgetCommand),icon:Yf,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),r.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new t4(null,void 0,{label:xZ,placeholder:EZ,appendPreserveCaseLabel:this._keybindingLabelFor(dt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>yC(this._keybindingService),inputBoxStyles:r9,toggleStyles:n9},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new kl({label:TZ+this._keybindingLabelFor(dt.ReplaceOneAction),icon:pZ,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new kl({label:IZ+this._keybindingLabelFor(dt.ReplaceAllAction),icon:fZ,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);let s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new kl({label:kZ,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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=`${xs}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(o),this._resizeSash=new Ys(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=xs;this._register(this._resizeSash.onDidStart(()=>{a=Bo(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<xs)return;let d=parseFloat(yT(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=Bo(this._domNode);if(l<xs)return;let c=xs;if(!this._resized||l===xs){let d=this._codeEditor.getLayoutInfo();c=d.width-28-d.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){let e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};W0.ID="editor.contrib.findWidget";var kl=class extends $s{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+Ve.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,n=>{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var r,o;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(o=(r=this._opts).onKeyDown)===null||o===void 0||o.call(r,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Ve.asClassNameArray(OF)),this._domNode.classList.add(...Ve.asClassNameArray(PF))):(this._domNode.classList.remove(...Ve.asClassNameArray(PF)),this._domNode.classList.add(...Ve.asClassNameArray(OF)))}};eh((i,e)=>{let t=(f,_)=>{_&&e.addRule(`.monaco-editor ${f} { background-color: ${_}; }`)};t(".findMatch",i.getColor(zI)),t(".currentFindMatch",i.getColor(BI)),t(".findScope",i.getColor(UI));let n=i.getColor(Ks);t(".find-widget",n);let r=i.getColor(Nf);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(Rf);o&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);let s=i.getColor(jI);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${d1(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(WI);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(VI);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${d1(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(Yr);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(PI);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let h=i.getColor(TI);h&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);let u=i.getColor(FI);if(u)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{let f=i.getColor(uc);f&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${f}; }`)}let m=i.getColor(ZI);m&&e.addRule(`
|
|
.monaco-editor .find-widget .button:not(.disabled):hover,
|
|
.monaco-editor .find-widget .codicon-find-selection:hover {
|
|
background-color: ${m} !important;
|
|
}
|
|
`);let p=i.getColor(II);p&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${p}; }`)});be();mi();qe();hn();ln();var WF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Es=function(i,e){return function(t,n){e(t,n,i)}},qc=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},MZ=524288;function SC(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n)<MZ)return i.getModel().getValueInRange(n)}return null}var en=class jF extends Y{get editor(){return this._editor}static get(e){return e.getContribution(jF.ID)}constructor(e,t,n,r){super(),this._editor=e,this._findWidgetVisible=ws.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._updateHistoryDelayer=new Ir(500),this._state=this._register(new Qv),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(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)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!Yh.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ws(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return qc(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=SC(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=Ws(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=SC(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Yv(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return qc(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};en.ID="editor.contrib.findController";en=WF([Es(1,we),Es(2,Ar),Es(3,qs)],en);var CC=class extends en{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return qc(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new W0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new B0(this._editor,this._state,this._keybindingService))}};CC=WF([Es(1,ol),Es(2,we),Es(3,mt),Es(4,Ki),Es(5,ni),Es(6,Ar),Es(7,qs)],CC);var OZ=W2(new U2({id:dt.StartFindAction,label:g("startFindAction","Find"),alias:"Find",precondition:G.or(I.focus,G.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));OZ.addImplementation(0,(i,e,t)=>{let n=en.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop}):!1});var PZ={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:g("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag.
|
|
The flag will not be saved for the future.
|
|
0: Do Nothing
|
|
1: True
|
|
2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:g("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.
|
|
The flag will not be saved for the future.
|
|
0: Do Nothing
|
|
1: True
|
|
2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:g("actions.find.matchCaseOverride",`Overrides "Math Case" flag.
|
|
The flag will not be saved for the future.
|
|
0: Do Nothing
|
|
1: True
|
|
2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:g("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.
|
|
The flag will not be saved for the future.
|
|
0: Do Nothing
|
|
1: True
|
|
2: False`)},findInSelection:{type:"boolean"}}}}]},wC=class extends K{constructor(){super({id:dt.StartFindWithArgs,label:g("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:PZ})}run(e,t,n){return qc(this,void 0,void 0,function*(){let r=en.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(39).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},xC=class extends K{constructor(){super({id:dt.StartFindWithSelection,label:g("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return qc(this,void 0,void 0,function*(){let n=en.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},n4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=en.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},EC=class extends n4{constructor(){super({id:dt.NextMatchFindAction,label:g("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:G.and(I.focus,Yh),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},TC=class extends n4{constructor(){super({id:dt.PreviousMatchFindAction,label:g("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:G.and(I.focus,Yh),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},IC=class extends K{constructor(){super({id:dt.GoToMatchFindAction,label:g("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:ws}),this._highlightDecorations=[]}run(e,t,n){let r=en.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(ni).notify({severity:rh.Warning,message:g("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(nr).createInputBox();a.placeholder=g("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let h=parseInt(d);if(isNaN(h))return;let u=r.getState().matchesCount;if(h>0&&h<=u)return h-1;if(h<0&&h>=-u)return u+h},c=d=>{let h=l(d);if(typeof h=="number"){a.validationMessage=void 0,r.goToMatch(h);let u=r.getState().currentMatch;u&&this.addDecorations(t,u)}else a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Lt(Hf),position:zn.Full}}}])})}},r4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=en.get(t);if(!n)return;let r=SC(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},kC=class extends r4{constructor(){super({id:dt.NextSelectionMatchFindAction,label:g("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},AC=class extends r4{constructor(){super({id:dt.PreviousSelectionMatchFindAction,label:g("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},FZ=W2(new U2({id:dt.StartFindReplaceAction,label:g("startReplace","Replace"),alias:"Replace",precondition:G.or(I.focus,G.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));FZ.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=en.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(39).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop})});Se(en.ID,CC,0);F(wC);F(xC);F(EC);F(TC);F(IC);F(kC);F(AC);var ko=ii.bindToContribution(en.get);ge(new ko({id:dt.CloseFindWidgetCommand,precondition:ws,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,G.not("isComposing")),primary:9,secondary:[1033]}}));ge(new ko({id:dt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:M0.primary,mac:M0.mac,win:M0.win,linux:M0.linux}}));ge(new ko({id:dt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:O0.primary,mac:O0.mac,win:O0.win,linux:O0.linux}}));ge(new ko({id:dt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:P0.primary,mac:P0.mac,win:P0.win,linux:P0.linux}}));ge(new ko({id:dt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:F0.primary,mac:F0.mac,win:F0.win,linux:F0.linux}}));ge(new ko({id:dt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:H0.primary,mac:H0.mac,win:H0.win,linux:H0.linux}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:3094}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,D0),primary:3}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:2563}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,D0),primary:void 0,mac:{primary:2051}}}));ge(new ko({id:dt.SelectAllMatchesAction,precondition:ws,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:515}}));ct();Gt();it();Bs();re();Bt();ti();c9();Me();ht();cn();an();wt();var HZ={0:" ",1:"u",2:"r"},VF=65535,Or=16777215,KF=4278190080,j0=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<<n)!==0}set(e,t){let n=e/32|0,r=e%32,o=this._states[n];t?this._states[n]=o|1<<r:this._states[n]=o&~(1<<r)}},tn=class i{constructor(e,t,n){if(e.length!==t.length||e.length>VF)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new j0(e.length),this._userDefinedStates=new j0(e.length),this._recoveredStates=new j0(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;n<r;n++){let o=this._startIndexes[n],s=this._endIndexes[n];if(o>Or||s>Or)throw new Error("startLineNumber or endLineNumber must not exceed "+Or);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Or}getEndLineNumber(e){return this._endIndexes[e]&Or}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r<this._types.length;r++)this._types[r]===e&&(this.setCollapsed(r,t),n=!0);return n}toRegion(e){return new LC(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&KF)>>>24)+((this._endIndexes[e]&KF)>>>16);return t===VF?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t<n;){let r=Math.floor((t+n)/2);e<this.getStartLineNumber(r)?n=r:t=r+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t<this.length;t++)e[t]=`[${HZ[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&Or,endLineNumber:this._endIndexes[e]&Or,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){let t=e.length,n=new Uint32Array(t),r=new Uint32Array(t),o=[],s=!1;for(let l=0;l<t;l++){let c=e[l];n[l]=c.startLineNumber,r[l]=c.endLineNumber,o.push(c.type),c.type&&(s=!0)}s||(o=void 0);let a=new i(n,r,o);for(let l=0;l<t;l++)e[l].isCollapsed&&a.setCollapsed(l,!0),a.setSource(l,e[l].source);return a}static sanitizeAndMerge(e,t,n){n=n!=null?n:Number.MAX_VALUE;let r=(f,_)=>Array.isArray(f)?b=>b<_?f[b]:void 0:b=>b<_?f.toFoldRange(b):void 0,o=r(e,e.length),s=r(t,t.length),a=0,l=0,c=o(0),d=s(0),h=[],u,m=0,p=[];for(;c||d;){let f;if(d&&(!c||c.startLineNumber>=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?f=d:(f=c,f.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,f.source=0),c=o(++a)):(f=d,d.isCollapsed&&d.source===0&&(f.source=2)),d=s(++l);else{let _=l,b=d;for(;;){if(!b||b.startLineNumber>c.endLineNumber){f=c;break}if(b.source===1&&b.endLineNumber>c.endLineNumber)break;b=s(++_)}c=o(++a)}if(f){for(;u&&u.endLineNumber<f.startLineNumber;)u=h.pop();f.endLineNumber>f.startLineNumber&&f.startLineNumber>m&&f.endLineNumber<=n&&(!u||u.endLineNumber>=f.endLineNumber)&&(p.push(f),m=f.startLineNumber,u&&h.push(u),u=f)}}return p}},LC=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}};var o4=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Re,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new tn(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;r<l;){let c=this._regions.getEndLineNumber(r),d=this._regions.isCollapsed(r);if(c<=o){let h=this.regions.getSource(r)!==0;n.changeDecorationOptions(this._editorDecorationIds[r],this._decorationProvider.getDecorationOption(d,c<=s,h))}d&&c>s&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let h=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,h),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;r<this._regions.length;r++){let o=this._regions.toFoldRange(r);(o.source===0||!n(o))&&t.push(o)}this.updatePost(tn.fromFoldRanges(t))}update(e,t=[]){let n=this._currentFoldedOrManualRanges(t),r=tn.sanitizeAndMerge(e,n,this._textModel.getLineCount());this.updatePost(tn.fromFoldRanges(r))}updatePost(e){let t=[],n=-1;for(let r=0,o=e.length;r<o;r++){let s=e.getStartLineNumber(r),a=e.getEndLineNumber(r),l=e.isCollapsed(r),c=e.getSource(r)!==0,d={startLineNumber:s,startColumn:this._textModel.getLineMaxColumn(s),endLineNumber:a,endColumn:this._textModel.getLineMaxColumn(a)+1};t.push({range:d,options:this._decorationProvider.getDecorationOption(l,a<=n,c)}),l&&a>n&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r<s&&s<=o)return!0;return!1},n=[];for(let r=0,o=this._regions.length;r<o;r++){let s=this.regions.isCollapsed(r),a=this.regions.getSource(r);if(s||a!==0){let l=this._regions.toFoldRange(r),c=this._textModel.getDecorationRange(this._editorDecorationIds[r]);c&&(s&&t(c.startLineNumber,c.endLineNumber)&&(s=!1),n.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:l.type,isCollapsed:s,source:a}))}}return n}getMemento(){let e=this._currentFoldedOrManualRanges(),t=[],n=this._textModel.getLineCount();for(let r=0,o=e.length;r<o;r++){let s=e[r];if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=tn.sanitizeAndMerge(this._regions,r,o);this.updatePost(tn.fromFoldRanges(s))}_getLinesChecksum(e,t){return Xf(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<o){for(;s.length>0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s<a;s++){let l=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<o)(!t||t(l))&&n.push(l);else break}return n}};function qF(i,e,t){let n=[];for(let r of t){let o=i.getRegionAtLine(r);if(o){let s=!o.isCollapsed;if(n.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c<e);n.push(...a)}}}i.toggleCollapseState(n)}function Gc(i,e,t=Number.MAX_VALUE,n){let r=[];if(n&&n.length>0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c<t);r.push(...a)}}else{let o=i.getRegionsInside(null,(s,a)=>s.isCollapsed!==e&&a<t);r.push(...o)}i.toggleCollapseState(r)}function NC(i,e,t,n){let r=[];for(let o of n){let s=i.getAllRegionsAtLine(o,(a,l)=>a.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function GF(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function $F(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function RC(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function s4(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function a4(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function YF(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function XF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber<i)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function QF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}Rt();wt();Ie();YW();var l4=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new Re,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||yI(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n<a.length;n++){if(!a.isCollapsed(n))continue;let l=a.getStartLineNumber(n)+1,c=a.getEndLineNumber(n);o<=l&&c<=s||(!e&&r<this._hiddenRanges.length&&this._hiddenRanges[r].startLineNumber===l&&this._hiddenRanges[r].endLineNumber===c?(t.push(this._hiddenRanges[r]),r++):(e=!0,t.push(new k(l,1,c,1))),o=l,s=c)}(this._hasLineChanges||e||r<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return JF(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!BZ(s,r))&&(r=JF(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s<a;s++){let l=e[s],c=o(l.startLineNumber);c&&(l=l.setStartPosition(c,n.getLineMaxColumn(c)),t=!0);let d=o(l.endLineNumber);d&&(l=l.setEndPosition(d,n.getLineMaxColumn(d)),t=!0),e[s]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}};function BZ(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function JF(i,e){let t=bf(i,n=>e<n.startLineNumber)-1;return t>=0&&i[t].endLineNumber>=e?i[t]:null}ik();var zZ=5e3,UZ="indent",$c=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=UZ}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(jZ(this.editorModel,n,r,this.foldingRangesLimit))}},DC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Or||t>Or)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new tn(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){let c=this._indentOccurrences[l];if(c){if(c+n>t){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],h=e.getLineContent(d),u=h1(h,o);(u<r||u===r&&n++<t)&&(s[c]=d,a[c]=this._endIndexes[l],c++)}return new tn(s,a)}}},WZ={limit:zZ,update:()=>{}};function jZ(i,e,t,n=WZ){let r=i.getOptions().tabSize,o=new DC(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),h=h1(d,r),u=a[a.length-1];if(h===-1){e&&(u.endAbove=c);continue}let m;if(s&&(m=d.match(s)))if(m[1]){let p=a.length-1;for(;p>0&&a[p].indent!==-2;)p--;if(p>0){a.length=p+1,u=a[p],o.insertFirst(c,u.line,h),u.line=c,u.indent=h,u.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(u.indent>h){do a.pop(),u=a[a.length-1];while(u.indent>h);let p=u.endAbove-1;p-c>=1&&o.insertFirst(c,p,h)}u.indent===h?u.endAbove=c:a.push({indent:h,endAbove:c,line:c})}return o.toIndentRanges(i)}be();qe();on();rl();dn();be();kn();ln();Zn();var VZ=pe("editor.foldBackground",{light:In(X2,.3),dark:In(X2,.3),hcDark:null,hcLight:null},g("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);pe("editorGutter.foldingControlForeground",{dark:i1,light:i1,hcDark:i1,hcLight:i1},g("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));var MC=Qt("folding-expanded",De.chevronDown,g("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),OC=Qt("folding-collapsed",De.chevronRight,g("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),ZF=Qt("folding-manual-collapsed",OC,g("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),eH=Qt("folding-manual-expanded",MC,g("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),PC={color:Lt(VZ),position:Vo.Inline},On=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};On.COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(OC)});On.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(OC)});On.MANUALLY_COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(ZF)});On.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(ZF)});On.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});On.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0});On.EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ve.asClassName(MC)});On.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(MC)});On.MANUALLY_EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ve.asClassName(eH)});On.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Ve.asClassName(eH)});On.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});On.HIDDEN_RANGE_DECORATION=Ue.register({description:"folding-hidden-range-decoration",stickiness:1});it();re();var KZ={},qZ="syntax",Yc=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=qZ,this.disposables=new W,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return GZ(this.providers,this.editorModel,e).then(t=>{var n,r;return t?$Z(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};function GZ(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,KZ,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},bt));return Promise.all(r).then(o=>n)}var FC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Or||t>Or)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._startIndexes[r],n[r]=this._endIndexes[r];return new tn(t,n,this._types)}else{this._foldingRangesLimit.update(this._length,e);let t=0,n=this._nestingLevelCounts.length;for(let a=0;a<this._nestingLevelCounts.length;a++){let l=this._nestingLevelCounts[a];if(l){if(l+t>e){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a<this._length;a++){let c=this._nestingLevels[a];(c<n||c===n&&t++<e)&&(r[l]=this._startIndexes[a],o[l]=this._endIndexes[a],s[l]=this._types[a],l++)}return new tn(r,o,s)}}};function $Z(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new FC(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}ec();ut();wt();Si();Cn();Ya();sn();var XZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V0=function(i,e){return function(t,n){e(t,n,i)}},QZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Qi=new Ne("foldingEnabled",!1),Ts=class K0 extends Y{static get(e){return e.getContribution(K0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=K0._foldingRangeSelector)===null||n===void 0?void 0:n.call(K0,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new W),this.editor=e,this._foldingLimitReporter=new q0(e);let a=this.editor.getOptions();this._isEnabled=a.get(41),this._useFoldingProviders=a.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(44),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new On(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Qi.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(45)&&this.onModelChanged(),l.hasChanged(106)||l.hasChanged(43)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(106),this.foldingDecorationProvider.showFoldingHighlights=c.get(43),this.triggerFoldingModelChanged()}l.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),l.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new o4(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new l4(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ir(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new kt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new $c(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=K0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Yc(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Sn(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Ht(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(th.Imports.value,!0);d&&(s=pc.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(Be(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,Be)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<5)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=u=>!u.containedBy(s)&&!s.containedBy(u),h=t.getRegionsInside(null,d);for(let u of h)u.isCollapsed&&c.push(u);c.length===0&&(c=h)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let h of t.getRegionsInside(s))h.isCollapsed===a&&c.push(h);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Ts.ID="editor.contrib.folding";Ts=XZ([V0(1,we),V0(2,rt),V0(3,ni),V0(4,qi),V0(5,le)],Ts);var q0=class{constructor(e){this.editor=e,this._onDidChange=new Re,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Pi=class extends K{runEditorCommand(e,t,n){let r=e.get(rt),o=Ts.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};function tH(i){if(!$u(i)){if(!af(i))return!1;let e=i;if(!$u(e.levels)&&!N2(e.levels)||!$u(e.direction)&&!sf(e.direction)||!$u(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(N2)))return!1}return!0}var HC=class extends Pi{constructor(){super({id:"editor.unfold",label:g("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|
|
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
|
|
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
|
|
`,constraint:tH,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=r&&r.levels||1,s=this.getLineNumbers(r,n);r&&r.direction==="up"?NC(t,!1,o,s):Gc(t,!1,o,s)}},BC=class extends Pi{constructor(){super({id:"editor.unfoldRecursively",label:g("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2142),weight:100}})}invoke(e,t,n,r){Gc(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},zC=class extends Pi{constructor(){super({id:"editor.fold",label:g("foldAction.label","Fold"),alias:"Fold",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
* 'levels': Number of levels to fold.
|
|
* 'direction': If 'up', folds given number of levels up otherwise folds down.
|
|
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
|
|
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
|
|
`,constraint:tH,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=this.getLineNumbers(r,n),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?GF(t,!0,o):a==="up"?NC(t,!0,s||1,o):Gc(t,!0,s||1,o)}},UC=class extends Pi{constructor(){super({id:"editor.toggleFold",label:g("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);qF(t,1,r)}},WC=class extends Pi{constructor(){super({id:"editor.foldRecursively",label:g("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Gc(t,!0,Number.MAX_VALUE,r)}},jC=class extends Pi{constructor(){super({id:"editor.foldAllBlockComments",label:g("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())a4(t,th.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+Ws(a.blockCommentStartToken));s4(t,l,!0)}}}},VC=class extends Pi{constructor(){super({id:"editor.foldAllMarkerRegions",label:g("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())a4(t,th.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);s4(t,l,!0)}}}},KC=class extends Pi{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:g("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())a4(t,th.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);s4(t,l,!1)}}}},qC=class extends Pi{constructor(){super({id:"editor.foldAllExcept",label:g("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);RC(t,!0,r)}},GC=class extends Pi{constructor(){super({id:"editor.unfoldAllExcept",label:g("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);RC(t,!1,r)}},$C=class extends Pi{constructor(){super({id:"editor.foldAll",label:g("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2069),weight:100}})}invoke(e,t,n){Gc(t,!0)}},YC=class extends Pi{constructor(){super({id:"editor.unfoldAll",label:g("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2088),weight:100}})}invoke(e,t,n){Gc(t,!1)}},Xc=class i extends Pi{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){$F(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};Xc.ID_PREFIX="editor.foldLevel";Xc.ID=i=>Xc.ID_PREFIX+i;var XC=class extends Pi{constructor(){super({id:"editor.gotoParentFold",label:g("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=YF(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},QC=class extends Pi{constructor(){super({id:"editor.gotoPreviousFold",label:g("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=XF(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},JC=class extends Pi{constructor(){super({id:"editor.gotoNextFold",label:g("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=QF(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},ZC=class extends Pi{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:g("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2135),weight:100}})}invoke(e,t,n){var r;let o=[],s=n.getSelections();if(s){for(let a of s){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(o.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((l,c)=>l.startLineNumber-c.startLineNumber);let a=tn.sanitizeAndMerge(t.regions,o,(r=n.getModel())===null||r===void 0?void 0:r.getLineCount());t.updatePost(tn.fromFoldRanges(a))}}}},e8=class extends Pi{constructor(){super({id:"editor.removeManualFoldingRanges",label:g("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2137),weight:100}})}invoke(e,t,n){let r=n.getSelections();if(r){let o=[];for(let s of r){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Se(Ts.ID,Ts,0);F(HC);F(BC);F(zC);F(WC);F($C);F(YC);F(jC);F(VC);F(KC);F(qC);F(GC);F(UC);F(XC);F(QC);F(JC);F(ZC);F(e8);for(let i=1;i<=7;i++)WT(new Xc({id:Xc.ID(i),label:g("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:Qi,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2048|21+i),weight:100}}));Je.registerCommand("_executeFoldingRangeProvider",function(i,...e){return QZ(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof Qe))throw Jl();let n=i.get(le),r=i.get(Ri).getModel(t);if(!r)throw Jl();let o=i.get(nt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(rt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(m,p)=>{}},c=new $c(r,s,l),d=c;if(a!=="indentation"){let m=Ts.getFoldingRangeProviders(n,r);m.length&&(d=new Yc(r,m,()=>{},l,c))}let h=yield d.compute(ze.None),u=[];try{if(h)for(let m=0;m<h.length;m++){let p=h.getType(m);u.push({start:h.getStartLineNumber(m),end:h.getEndLineNumber(m),kind:p?th.fromValue(p):void 0})}return u}finally{d.dispose()}})});Me();be();var t8=class extends K{constructor(){super({id:"editor.action.fontZoomIn",label:g("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){sh.setZoomLevel(sh.getZoomLevel()+1)}},i8=class extends K{constructor(){super({id:"editor.action.fontZoomOut",label:g("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){sh.setZoomLevel(sh.getZoomLevel()-1)}},n8=class extends K{constructor(){super({id:"editor.action.fontZoomReset",label:g("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){sh.setZoomLevel(0)}};F(t8);F(i8);F(n8);var Xqe=zi(nH());Me();var Xh=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}},Al=class{constructor(e,t,n,r,o,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},Ao=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var rH;function oH(i){rH=i}function ao(){return rH}var h4=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return JZ([d4(tee("| ",this.indentation)),e])}formatInfo(e){return e.didChange?[d4(" "),Is(u4(e.oldValue,70),{color:"red",strikeThrough:!0}),d4(" "),Is(u4(e.newValue,60),{color:"green"})]:[d4(" (unchanged)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([Y0("observable value changed"),Is(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return Is(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([Y0("derived recomputed"),Is(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n)])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([Y0("observable from event triggered"),Is(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([Y0("autorun"),Is(e.debugName,{color:"BlueViolet"}),this.formatChanges(t)])),t.clear()}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([Y0("transaction"),Is(t,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}};function JZ(i){let e=new Array,n={},r="";function o(a){if("length"in a)for(let l of a)l&&o(l);else"text"in a?(r+=`%c${a.text}`,e.push(a.style),a.data&&Object.assign(n,a.data)):"data"in a&&Object.assign(n,a.data)}o(i);let s=[r,...e];return Object.keys(n).length>0&&s.push(n),s}function d4(i){return Is(i,{color:"black"})}function Y0(i){return Is(iee(`${i}: `,10),{color:"black",bold:!0})}function Is(i,e={color:"black"}){function t(r){return Object.entries(r).reduce((o,[s,a])=>`${o}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function u4(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?ZZ(i,e):eee(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function ZZ(i,e){let t="[ ",n=!0;for(let r of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${u4(r,e-t.length)}`}return t+=" ]",t}function eee(i,e){let t="{ ",n=!0;for(let[r,o]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${r}: ${u4(o,e-t.length)}`}return t+=" }",t}function tee(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function iee(i,e){for(;i.length<e;)i+=" ";return i}var sH;function aH(i){sH=i}var X0=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return sH(()=>{let t=f4(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}},Ia=class extends X0{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};function _i(i,e){var t,n;let r=new m4(i,e);try{(t=ao())===null||t===void 0||t.handleBeginTransaction(r),i(r)}finally{r.finish(),(n=ao())===null||n===void 0||n.handleEndTransaction()}}function l8(i,e,t){i?e(i):_i(e,t)}var m4=class{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():f4(this.fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this.updatingObservers;this.updatingObservers=null;for(let{observer:t,observable:n}of e)t.endUpdate(n)}};function f4(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=n?n[1]:void 0;return r==null?void 0:r.trim()}function Lo(i,e){return new p4(i,e)}var p4=class extends Ia{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,n){var r;if(this._value===e)return;let o;t||(t=o=new m4(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(r=ao())===null||r===void 0||r.handleObservableChanged(this,{oldValue:s,newValue:e,change:n,didChange:!0});for(let a of this.observers)t.updateObserver(a,this),a.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};function Q0(i,e){return new a8(i,e)}var a8=class extends p4{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}};it();function fn(i,e){return new g4(i,e,void 0,void 0)}function lH(i,e,t){return new g4(i,t,e.createEmptyChangeSummary,e.handleChange)}aH(fn);var g4=class extends Ia{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(e,t,n,r){var o,s;super(),this._debugName=e,this.computeFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ao())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}get(){var e;if(this.observers.size===0){let t=this.computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){this.state=3;for(let t of this.dependencies)if(t.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;let r=this.state!==0,o=this.value;this.state=3;let s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this.computeFn(this,s)}finally{for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}let a=r&&o!==this.value;if((t=ao())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:a}),a)for(let l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}if(this.updateCount<0)throw new Zl}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(n&&(this.state===1||r)&&(this.state=2,r))for(let o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}};zT();re();function vi(i,e){return new _4(i,e,void 0,void 0)}function cH(i,e){return dH(e,i)}function dH(i,e){let t=new W,n=vi(e,r=>{t.clear(),i(r,t)});return ft(()=>{n.dispose(),t.dispose()})}var _4=class{constructor(e,t,n,r){var o,s;this.debugName=e,this.runFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ao())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3,(e=ao())===null||e===void 0||e.handleAutorunTriggered(this);try{let r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this.runFn(this,r)}finally{for(let r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,BT(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=_4})(vi||(vi={}));re();function b4(i){return new c8(i)}var c8=class extends X0{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};function No(i,e){return new v4(i,e)}var v4=class extends Ia{constructor(e,t){super(),this.event=e,this.getValue=t,this.hasValue=!1,this.handleEvent=n=>{var r;let o=this.getValue(n),s=!this.hasValue||this.value!==o;(r=ao())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&_i(a=>{for(let l of this.observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{let a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")}),this.hasValue=!0)}}getDebugName(){return f4(this.getValue)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}};(function(i){i.Observer=v4})(No||(No={}));function hH(i,e){return new d8(i,e)}var d8=class extends Ia{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{_i(n=>{for(let r of this.observers)n.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};function uH(i){return new h8(i)}var h8=class extends Ia{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){_i(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};function mH(i,e){let t=new u8(e!=null?e:!1);return i.addObserver(t),e&&i.reportChanges(),ft(()=>{i.removeObserver(t)})}var u8=class{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}};var nee=!1;nee&&oH(new h4);Me();ht();var y4="editor.action.inlineSuggest.commit",S4="editor.action.inlineSuggest.showPrevious",C4="editor.action.inlineSuggest.showNext";Bt();jW();qe();re();be();var Ni=class i extends Y{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(vi("update context key: inlineCompletionVisible, suppressSuggestions",n=>{let r=this.model.read(n),o=r==null?void 0:r.selectedInlineCompletion.read(n),s=r==null?void 0:r.ghostText.read(n),a=r==null?void 0:r.selectedSuggestItem.read(n);this.inlineCompletionVisible.set(a===void 0&&s!==void 0&&!s.isEmpty()),s&&o&&this.suppressSuggestions.set(o.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(vi("update context key: inlineCompletionSuggestsIndentation, inlineCompletionSuggestsIndentationLessThanTabSize",n=>{let r=this.model.read(n),o=!1,s=!0,a=r==null?void 0:r.ghostText.read(n);if(r!=null&&r.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],h=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=h){let m=Xu(d);m===-1&&(m=d.length-1),o=m>0;let p=r.textModel.getOptions().tabSize;s=jT.visibleColumnFromColumn(d,m+1,p)<p}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};Ni.inlineSuggestionVisible=new Ne("inlineSuggestionVisible",!1,g("inlineSuggestionVisible","Whether an inline suggestion is visible"));Ni.inlineSuggestionHasIndentation=new Ne("inlineSuggestionHasIndentation",!1,g("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));Ni.inlineSuggestionHasIndentationLessThanTabSize=new Ne("inlineSuggestionHasIndentationLessThanTabSize",!0,g("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));Ni.suppressSuggestions=new Ne("inlineSuggestionSuppressSuggestions",void 0,g("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"));wr();wt();re();St();ut();wt();re();Bt();St();Ie();eI();$r();rl();oj();it();re();St();Ie();function pH(i,e){let t=new m8(i),n=e.map(r=>{let o=k.lift(r.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:r.text}});n.sort((r,o)=>o.startOffset-r.startOffset);for(let r of n)i=i.substring(0,r.startOffset)+r.text+i.substring(r.endOffset);return i}var m8=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===`
|
|
`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}},ree=[];function fH(){return ree}var w4=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new Zl(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new k(e,this.startColumn,e,this.endColumnExclusive)}};function gH(i,e){let t=new W,n=i.createDecorationsCollection();return t.add(vi(`Apply decorations from ${e.debugName}`,r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function J0(i,e){return new ie(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function Z0(i){let e=1,t=1;for(let n of i)n===`
|
|
`?(e++,t=1):t++;return new ie(e,t)}var Qh=class{constructor(e,t){this.lineNumber=e,this.parts=t}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return pH(n,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(`
|
|
`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},Jh=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}},x4=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new Jh(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(`
|
|
`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}};var oee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},see=function(i,e){return function(t,n){e(t,n,i)}},E4=class extends Y{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Lo("isDisposed",!1),this.currentTextModel=No(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=fn("uiState",r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof x4?s.columnRange:void 0,l=[],c=[];function d(f,_){if(c.length>0){let b=c[c.length-1];_&&b.decorations.push(new y1(b.content.length+1,b.content.length+1+f[0].length,_,0)),b.content+=f[0],f=f.slice(1)}for(let b of f)c.push({content:b,decorations:_?[new y1(1,b.length+1,_,0)]:[]})}let h=o.getLineContent(s.lineNumber),u,m=0;for(let f of s.parts){let _=f.lines;u===void 0?(l.push({column:f.column,text:_[0],preview:f.preview}),_=_.slice(1)):d([h.substring(m,f.column-1)],void 0),_.length>0&&(d(_,"ghost-text"),u===void 0&&f.column<=h.length&&(u=f.column)),m=f.column-1}u!==void 0&&d([h.substring(m)],void 0);let p=u!==void 0?new w4(u,h.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:p,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=fn("decorations",r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:k.fromPositions(new ie(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:hc.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new p8(this.editor,this.languageService.languageIdCodec,fn("lines",r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(gH(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};E4=oee([see(2,li)],E4);var p8=class extends Y{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=hH("editorOptionChanged",Nt.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(31)||r.hasChanged(113)||r.hasChanged(95)||r.hasChanged(90)||r.hasChanged(49)||r.hasChanged(48)||r.hasChanged(64))),this._register(vi("update view zone",r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");aee(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};function aee(i,e,t,n,r){let o=n.get(31),s=n.get(113),a="none",l=n.get(90),c=n.get(49),d=n.get(48),h=n.get(64),u=new Sf(1e4);u.appendString('<div class="suggest-preview-text">');for(let f=0,_=t.length;f<_;f++){let b=t[f],C=b.content;u.appendString('<div class="view-line'),u.appendString('" style="top:'),u.appendString(String(f*h)),u.appendString('px;width:1000000px;">');let T=pf(C),w=OT(C),A=hk.createEmpty(C,r);tg(new eg(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,C,!1,T,w,0,A,b.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==pk.OFF,null),u),u.appendString("</div>")}u.appendString("</div>"),Zf(i,d);let m=u.build(),p=_H?_H.createHTML(m):m;i.innerHTML=p}var _H=ah("editorGhostText",{createHTML:i=>i});gt();ic();Rt();ct();on();re();yn();Zn();St();cn();be();gt();ic();on();Zn();wt();re();ti();be();var lee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},T4=class extends Y{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new lT),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new W,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new em(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new kr(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===em.ID)return this.toggleMenuActionViewItem=new m9(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ve.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:De.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Yu){let a=new m9(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,n;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return Wi(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},em=class i extends Kr{constructor(e,t){t=t||g("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return lee(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};em.ID="toolbar.toggle.more";ic();Rt();re();be();mi();qe();hn();Qa();var cee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tm=function(i,e){return function(t,n){e(t,n,i)}},I4=class extends T4{constructor(e,t,n,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=s.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new W),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],n){var r,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,h=[],u=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let m=0;m<a.length;m++){let p=a[m];!(p instanceof zo)&&!(p instanceof Qu)||p.hideActions&&(c.push(p.hideActions.toggle),p.hideActions.toggle.checked&&d++,p.hideActions.isHidden&&(u=!0,a[m]=void 0,((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==0&&(h[m]=p)))}if(((s=this._options)===null||s===void 0?void 0:s.maxNumberOfItems)!==void 0){let m=0;for(let p=0;p<a.length;p++){let f=a[p];f&&++m>=this._options.maxNumberOfItems&&(a[p]=void 0,h[p]=f)}}q2(a),q2(h),super.setActions(a,fo.join(h,l)),c.length>0&&this._sessionDisposables.add(jt(this.getElement(),"contextmenu",m=>{var p,f,_,b;let C=this.getItemAction(m.target);if(!C)return;m.preventDefault(),m.stopPropagation();let T=!1;if(d===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){T=!0;for(let O=0;O<c.length;O++)if(c[O].checked){c[O]=mf({id:C.id,label:C.label,checked:!0,enabled:!1,run(){}});break}}let w;if(!T&&(C instanceof zo||C instanceof Qu)){if(!C.hideActions)return;w=C.hideActions.hide}else w=mf({id:"label",label:g("hide","Hide"),enabled:!1,run(){}});let A=fo.join([w],c);!((f=this._options)===null||f===void 0)&&f.resetMenu&&!n&&(n=[this._options.resetMenu]),u&&n&&(A.push(new fo),A.push(mf({id:"resetThisMenu",label:g("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>m,getActions:()=>A,menuId:(_=this._options)===null||_===void 0?void 0:_.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(b=this._options)===null||b===void 0?void 0:b.menuOptions),contextKeyService:this._contextKeyService})}))}};I4=cee([tm(2,go),tm(3,we),tm(4,Jo),tm(5,mt),tm(6,En)],I4);mi();Si();qe();st();hn();Qa();var v8=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ro=function(i,e){return function(t,n){e(t,n,i)}},k4=class extends Y{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=No(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=fn("position",r=>{var o,s,a;let l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;let c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);let d=new ie(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(cH("setup content widget",(r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(Do,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),o.add(ft(()=>e.removeContentWidget(a))),o.add(vi("request explicit",l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==Yo.Explicit&&s.triggerExplicitly()}))}))}};k4=v8([Ro(2,Ce)],k4);var dee=Qt("inline-suggestion-hints-next",De.chevronRight,g("parameterHintsNextIcon","Icon for show next parameter hint.")),hee=Qt("inline-suggestion-hints-previous",De.chevronLeft,g("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Do=class f8 extends Y{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new Kr(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=g({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,d,h){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${f8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=zd("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[zd("div",{style:{display:"flex"}},[zd("div@actionBar",{className:"custom-actions"}),zd("div@toolBar")])]),this.previousAction=this.createCommandAction(S4,g("previous","Previous"),Ve.asClassName(hee)),this.availableSuggestionCountAction=new Kr("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(C4,g("next","Next"),Ve.asClassName(dee)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(ae.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new kt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new kt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];let u=this._register(new kr(this.nodes.actionBar));u.push(this.previousAction,{icon:!0,label:!1}),u.push(this.availableSuggestionCountAction),u.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(_8,this.nodes.toolBar,ae.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:m=>m.startsWith("primary")},actionViewItemProvider:(m,p)=>m instanceof zo?l.createInstance(g8,m,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(m=>{f8._dropDownVisible=m})),this._register(vi("update position",m=>{this._position.read(m),this.editor.layoutContentWidget(this)})),this._register(vi("counts",m=>{let p=this._suggestionCount.read(m),f=this._currentSuggestionIdx.read(m);p!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${f+1}/${p}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),p!==void 0&&p>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(vi("extra commands",m=>{let p=this._extraCommands.read(m);if(Uo(this.lastCommands,p))return;this.lastCommands=p;let f=p.map(_=>({class:void 0,id:_.id,enabled:!0,tooltip:_.tooltip||"",label:_.title,run:b=>this._commandService.executeCommand(_.id)}));for(let[_,b]of this.inlineCompletionsActionsMenus.getActions())for(let C of b)C instanceof zo&&f.push(C);f.length>0&&f.unshift(new fo),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Do._dropDownVisible=!1;Do.id=0;Do=v8([Ro(6,Pt),Ro(7,Ce),Ro(8,mt),Ro(9,we),Ro(10,go)],Do);var g8=class extends ng{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=zd("div.keybinding").root;new Gf(t,of,Object.assign({disableTitle:!0},Ek)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},_8=class extends I4{constructor(e,t,n,r,o,s,a,l){super(e,Object.assign({resetMenu:t},n),r,o,s,a,l),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,r,o,s,a;let l=[],c=[];ig(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),this.setActions(l,c)}setAdditionalSecondaryActions(e){Uo(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};_8=v8([Ro(3,go),Ro(4,we),Ro(5,Jo),Ro(6,mt),Ro(7,En)],_8);Rt();it();re();ti();Zo();St();Ie();cn();an();Gt();re();St();cn();an();ut();Bt();Ie();var Jc=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let n=t?this.range.intersectRanges(t):this.range;if(!n)return this;let r=e.getValueInRange(n,1),o=Xa(r,this.text),s=J0(this.range.getStartPosition(),Z0(r.substring(0,o))),a=this.text.substring(o),l=k.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&uee(this.range,e.range)}computeGhostText(e,t,n,r=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=Yt(s).length;if(o.range.startColumn-1<=a){let p=Yt(o.text).length,f=s.substring(o.range.startColumn-1,a),_=k.fromPositions(o.range.getStartPosition().delta(0,f.length),o.range.getEndPosition()),b=o.text.startsWith(f)?o.text.substring(f.length):o.text.substring(p);o=new i(_,b)}let c=e.getValueInRange(o.range),d=mee(c,o.text);if(!d)return;let h=o.range.startLineNumber,u=new Array;if(t==="prefix"){let p=d.filter(f=>f.originalLength===0);if(p.length>1||p.length===1&&p[0].originalStart!==c.length)return}let m=o.text.length-r;for(let p of d){let f=o.range.startColumn+p.originalStart+p.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&f<n.column||p.originalLength>0)return;if(p.modifiedLength===0)continue;let _=p.modifiedStart+p.modifiedLength,b=Math.max(p.modifiedStart,Math.min(_,m)),C=o.text.substring(p.modifiedStart,b),T=o.text.substring(b,Math.max(p.modifiedStart,_));if(C.length>0){let w=nc(C);u.push(new Jh(f,w,!1))}if(T.length>0){let w=nc(T);u.push(new Jh(f,w,!0))}}return new Qh(h,u)}};function uee(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}var ks;function mee(i,e){if((ks==null?void 0:ks.originalValue)===i&&(ks==null?void 0:ks.newValue)===e)return ks==null?void 0:ks.changes;{let t=bH(i,e,!0);if(t){let n=vH(t);if(n>0){let r=bH(i,e,!1);r&&vH(r)<n&&(t=r)}}return ks={originalValue:i,newValue:e,changes:t},t}}function vH(i){let e=0;for(let t of i)e+=t.originalLength;return e}function bH(i,e,t){if(i.length>5e3||e.length>5e3)return;function n(c){let d=0;for(let h=0,u=c.length;h<u;h++){let m=c.charCodeAt(h);m>d&&(d=m)}return d}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let d=0,h=0,u=new Int32Array(c.length);for(let m=0,p=c.length;m<p;m++)if(t&&c[m]==="("){let f=h*100+d;u[m]=o(2*f),d++}else if(t&&c[m]===")"){d=Math.max(d-1,0);let f=h*100+d;u[m]=o(2*f+1),d===0&&h++}else u[m]=c.charCodeAt(m);return u}let a=s(i),l=s(e);return new qk({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}zT();Gt();it();Ie();ej();XW();tj();QW();ZW();function yH(i,e){let t=new CI,n=new xI(t,c=>e.getLanguageConfiguration(c)),r=new wI(new b8([i]),n),o=EI(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=Qd(d,c.openingBracket.length),c.child&&(l(c.child,d),d=Qd(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=Qd(d,c.closingBracket.length);else{let u=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=u}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,Qd(d,c.length));else if(c.kind===4)for(let h of c.children)l(h,d),d=Qd(d,h.length)}}return l(o,SI),s}var b8=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}};var A4=class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]=="undefined"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}};A4._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};var Ll=class{constructor(){this._children=[]}appendChild(e){return e instanceof Fi&&this._children[this._children.length-1]instanceof Fi?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Zh)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Fi=class i extends Ll{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},L4=class extends Ll{},fr=class i extends L4{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Zc?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},Zc=class i extends Ll{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Fi&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},y8=class i extends Ll{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Mo&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Mo){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Mo=class i extends Ll{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},im=class i extends L4{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Fi(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function SH(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var Zh=class i extends Ll{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof fr&&(e.push(n),t=!t||t.index<n.index?n:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,n=!1;return this.walk(r=>r===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return SH([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof fr&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof im&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){SH(this.children,e)}},Pr=class{constructor(){this._scanner=new A4,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new Zh;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n!=null?n:!1,t!=null?t:!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof fr&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=r.get(l.index);if(!d)return;let h=new fr(l.index);h.transform=l.transform;for(let u of d){let m=u.clone();h.appendChild(m),m instanceof fr&&r.has(m.index)&&!c.has(m.index)&&(c.add(m.index),s(m,c),c.delete(m.index))}t.replace(l,[h])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new fr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Fi(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new fr(Number(t)):new im(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new fr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Fi("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new Zc;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new Fi(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new im(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Fi("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new y8,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new Fi(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Mo(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Mo(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Mo(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new Mo(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Fi(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};var CH=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function xH(i,e,t,n,r=ze.None,o){return CH(this,void 0,void 0,function*(){let s=pee(e,t),a=i.all(t),l=yield Promise.all(a.map(h=>CH(this,void 0,void 0,function*(){try{let u=yield h.provideInlineCompletions(t,e,n,r);return{provider:h,completions:u}}catch(u){bt(u)}return{provider:h,completions:void 0}}))),c=new Map,d=[];for(let h of l){let u=h.completions;if(!u)continue;let m=new C8(u,h.provider);d.push(m);for(let p of u.items){let f=w8.from(p,m,s,t,o);c.set(f.hash(),f)}}return new S8(Array.from(c.values()),new Set(c.keys()),d)})}var S8=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},C8=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},w8=class i{static from(e,t,n,r,o){let s,a,l=e.range?k.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=wH(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=wH(e.insertText.snippet,l.getStartPosition(),r,o);let h=e.insertText.snippet.length-c;h!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+h))}let d=new Pr().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof Fi?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else HT(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||fH(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,`
|
|
`),r=e.replace(/\r\n|\r/g,`
|
|
`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}};function pee(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new k(i.lineNumber,t.startColumn,i.lineNumber,n):k.fromPositions(i,i.with(void 0,n))}function wH(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?yH(a,n):i}var fee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EH=function(i,e){return function(t,n){e(t,n,i)}},gee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N4=class extends Y{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new ai),this.inlineCompletions=Q0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Q0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new x8(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new qt,d=(()=>gee(this,void 0,void 0,function*(){if((l||t.triggerKind===Yo.Automatic)&&(yield _ee(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let m=new Date,p=yield xH(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date;this._debounceValue.update(this.textModel,f.getTime()-m.getTime());let _=new T8(p,s,this.textModel,this.versionId);if(n){let b=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!p.has(b)&&_.prepend(n.inlineCompletion,b.range,!0)}return this._updateOperation.clear(),_i(b=>{a.set(_,b)}),!0}))(),h=new E8(s,c,d);return this._updateOperation.value=h,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};N4=fee([EH(3,le),EH(4,rt)],N4);function _ee(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}var x8=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&vee(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===Yo.Automatic||this.context.triggerKind===Yo.Explicit)&&this.versionId===e.versionId}};function vee(i,e,t){return!i||!e?i===e:t(i,e)}var E8=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},T8=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=fn("ranges",s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new R4(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new R4(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},R4=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),h=o.substring(a),u=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=u&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!sI(h,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return TH(this._getUpdatedRange(e)).isBefore(TH(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}};function TH(i){return i.startLineNumber===i.endLineNumber?new ie(1,1+i.endColumn-i.startColumn):new ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}re();ti();Me();St();ht();an();ut();Gt();it();re();ec();ti();Cn();St();Ie();Us();be();mi();Si();qe();ut();var nm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Le={Visible:i4,HasFocusedSuggestion:new Ne("suggestWidgetHasFocusedSuggestion",!1,g("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Ne("suggestWidgetDetailsVisible",!1,g("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Ne("suggestWidgetMultipleSuggestions",!1,g("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Ne("suggestionMakesTextEdit",!0,g("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Ne("acceptSuggestionOnEnter",!0,g("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Ne("suggestionHasInsertAndReplaceRange",!1,g("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Ne("suggestionInsertMode",void 0,{type:"string",description:g("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Ne("suggestionCanResolve",!1,g("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ls=new ae("suggestWidgetStatusBar"),I8=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=Vs.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,k.isIRange(t.range)?(this.editStart=new ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return nm(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{Wr(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},ka=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};ka.default=new ka;var eu;function IH(){return eu}var k8=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};function rm(i,e,t,n=ka.default,r={triggerKind:0},o=ze.None){return nm(this,void 0,void 0,function*(){let s=new Sn(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new k(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):k.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],h=new W,u=[],m=!1,p=(_,b,C)=>{var T,w,A;let O=!1;if(!b)return O;for(let D of b.suggestions)if(!n.kindFilter.has(D.kind)){if(!n.showDeprecated&&(!((T=D==null?void 0:D.tags)===null||T===void 0)&&T.includes(1)))continue;D.range||(D.range=c),D.sortText||(D.sortText=typeof D.label=="string"?D.label:D.label.label),!m&&D.insertTextRules&&D.insertTextRules&4&&(m=Pr.guessNeedsClipboard(D.insertText)),d.push(new I8(t,D,b,_)),O=!0}return tf(b)&&h.add(b),u.push({providerName:(w=_._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(A=b.duration)!==null&&A!==void 0?A:-1,elapsedOverall:C.elapsed()}),O},f=(()=>nm(this,void 0,void 0,function*(){if(!eu||n.kindFilter.has(27))return;let _=n.providerItemsToReuse.get(eu);if(_){_.forEach(T=>d.push(T));return}if(n.providerFilter.size>0&&!n.providerFilter.has(eu))return;let b=new Sn(!0),C=yield eu.provideCompletionItems(e,t,r,o);p(eu,C,b)}))();for(let _ of i.orderedGroups(e)){let b=!1;if(yield Promise.all(_.map(C=>nm(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(C)){let T=n.providerItemsToReuse.get(C);T.forEach(w=>d.push(w)),b=b||T.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(C)))try{let T=new Sn(!0),w=yield C.provideCompletionItems(e,t,r,o);b=p(C,w,T)||b}catch(T){bt(T)}}))),b||o.isCancellationRequested)break}return yield f,o.isCancellationRequested?(h.dispose(),Promise.reject(new Zp)):new k8(d.sort(See(n.snippetSortOrder)),m,{entries:u,elapsed:s.elapsed()},h)})}function A8(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow<e.sortTextLow)return-1;if(i.sortTextLow>e.sortTextLow)return 1}return i.textLabel<e.textLabel?-1:i.textLabel>e.textLabel?1:i.completion.kind-e.completion.kind}function bee(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return A8(i,e)}function yee(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return A8(i,e)}var D4=new Map;D4.set(0,bee);D4.set(2,yee);D4.set(1,A8);function See(i){return D4.get(i)}Je.registerCommand("_executeCompletionItemProvider",(i,...e)=>nm(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;ot(Qe.isUri(t)),ot(ie.isIPosition(n)),ot(typeof r=="string"||!r),ot(typeof o=="number"||!o);let{completionProvider:s}=i.get(le),a=yield i.get(Vi).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),h=yield rm(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let u of h.items)c.length<(o!=null?o:0)&&c.push(u.resolve(ze.None)),l.incomplete=l.incomplete||u.container.incomplete,l.suggestions.push(u.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>h.disposable.dispose(),100)}}finally{a.dispose()}}));function kH(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var As=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}};be();qe();ff();Rt();re();Bt();Zo();Ie();Di();an();dn();$W();yn();function L8(i,e=Hd){return hI(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}_T();Tr();Bt();var M4=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r<n.length;r++)n[r]=Math.floor(Math.random()*256);return n};let e=new Uint8Array(16),t=[];for(let n=0;n<256;n++)t.push(n.toString(16).padStart(2,"0"));return function(){i(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=0,o="";return o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+="-",o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o+=t[e[r++]],o}}();an();be();var Cee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wee=function(i,e){return function(t,n){e(t,n,i)}},WCe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),om=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},sm=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Yt(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Fi&&(a=Yt(nc(c.value).pop())),!0));let l=Xa(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,h)=>`${d}${a.substr(l)}${h}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},am=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Bd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Bd(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return gT(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(Gd(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},lm=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!kT(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},cm=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};cm=Cee([wee(2,rt)],cm);var Aa=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};Aa.dayNames=[g("Sunday","Sunday"),g("Monday","Monday"),g("Tuesday","Tuesday"),g("Wednesday","Wednesday"),g("Thursday","Thursday"),g("Friday","Friday"),g("Saturday","Saturday")];Aa.dayNamesShort=[g("SundayShort","Sun"),g("MondayShort","Mon"),g("TuesdayShort","Tue"),g("WednesdayShort","Wed"),g("ThursdayShort","Thu"),g("FridayShort","Fri"),g("SaturdayShort","Sat")];Aa.monthNames=[g("January","January"),g("February","February"),g("March","March"),g("April","April"),g("May","May"),g("June","June"),g("July","July"),g("August","August"),g("September","September"),g("October","October"),g("November","November"),g("December","December")];Aa.monthNamesShort=[g("JanuaryShort","Jan"),g("FebruaryShort","Feb"),g("MarchShort","Mar"),g("AprilShort","Apr"),g("MayShort","May"),g("JuneShort","Jun"),g("JulyShort","Jul"),g("AugustShort","Aug"),g("SeptemberShort","Sep"),g("OctoberShort","Oct"),g("NovemberShort","Nov"),g("DecemberShort","Dec")];var dm=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=Nk(this._workspaceService.getWorkspace());if(!Lk(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(s9(e))return Bd(e.uri.path);let t=Bd(e.configPath.path);return t.endsWith(a9)&&(t=t.substr(0,t.length-a9.length-1)),t}_resoveWorkspacePath(e){if(s9(e))return L8(e.uri.fsPath);let t=Bd(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?L8(n):"/"}},hm=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return M4()}};var xee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Eee=function(i,e){return function(t,n){e(t,n,i)}},um=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=K2(t.placeholders,fr.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=k.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d<c.length;d++)c[d]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[d]);r.push(at.replace(a,c.join(this._editor.getModel().getEOL())))}r.length>0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new ye(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let h=this._placeholderDecorations.get(d);r.changeDecorationOptions(h,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof fr){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Zc,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),h=k.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),u=n.addDecoration(h,i._decor.inactive);this._placeholderDecorations.set(l,u)}}this._placeholderGroups=K2(this._snippet.placeholders,fr.compareByIndex)})}};um._decor={active:Ue.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ue.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ue.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ue.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};var AH={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},tu=class Ns{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=Yt(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof Fi)||c.parent instanceof Zc||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let u=r.offset(c);if(u===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let m=l.charCodeAt(u-1);(m===10||m===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let m=1;m<d.length;m++)d[m]=e.normalizeIndentation(a+d[m])}let h=d.join(e.getEOL());return h!==c.value&&(c.parent.replace(c,[new Fi(h)]),l=void 0),!0}),a}static adjustSelection(e,t,n,r){if(n!==0||r!==0){let{positionLineNumber:o,positionColumn:s}=t,a=s-n,l=s+r,c=e.validateRange({startLineNumber:o,startColumn:a,endLineNumber:o,endColumn:l});t=ye.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,n,r,o,s,a,l,c){let d=[],h=[];if(!e.hasModel())return{edits:d,snippets:h};let u=e.getModel(),m=e.invokeWithinContext(w=>w.get(b1)),p=e.invokeWithinContext(w=>new am(w.get(Qs),u)),f=()=>a,_=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),n,0)),b=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),0,r)),C=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),T=e.getSelections().map((w,A)=>({selection:w,idx:A})).sort((w,A)=>k.compareRangesUsingStarts(w.selection,A.selection));for(let{selection:w,idx:A}of T){let O=Ns.adjustSelection(u,w,n,0),D=Ns.adjustSelection(u,w,0,r);_!==u.getValueInRange(O)&&(O=w),b!==u.getValueInRange(D)&&(D=w);let j=w.setStartPosition(O.startLineNumber,O.startColumn).setEndPosition(D.endLineNumber,D.endColumn),q=new Pr().parse(t,!0,o),_e=j.getStartPosition(),J=Ns.adjustWhitespace(u,_e,s||A>0&&C!==u.getLineFirstNonWhitespaceColumn(w.positionLineNumber),q);q.resolveVariables(new om([p,new lm(f,A,T.length,e.getOption(76)==="spread"),new sm(u,w,A,l),new cm(u,w,c),new Aa,new dm(m),new hm])),d[A]=at.replace(j,q.toString()),d[A].identifier={major:A,minor:0},d[A]._isTracked=!0,h[A]=new um(e,q,J)}return{edits:d,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Pr,h=new Zh,u=new om([e.invokeWithinContext(p=>new am(p.get(Qs),c)),new lm(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new sm(c,e.getSelection(),0,s),new cm(c,e.getSelection(),a),new Aa,new dm(e.invokeWithinContext(p=>p.get(b1))),new hm]);t=t.sort((p,f)=>k.compareRangesUsingStarts(p.range,f.range));let m=0;for(let p=0;p<t.length;p++){let{range:f,template:_}=t[p];if(p>0){let A=t[p-1].range,O=k.fromPositions(A.getEndPosition(),f.getStartPosition()),D=new Fi(c.getValueInRange(O));h.appendChild(D),m+=D.value.length}let b=d.parseFragment(_,h);Ns.adjustWhitespace(c,f.getStartPosition(),!0,h,new Set(b)),h.resolveVariables(u);let C=h.toString(),T=C.slice(m);m=C.length;let w=at.replace(f,T);w.identifier={major:p,minor:0},w._isTracked=!0,l.push(w)}return d.ensureFinalTabstop(h,n,!0),{edits:l,snippets:[new um(e,h,"")]}}constructor(e,t,n=AH,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){ei(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?Ns.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Ns.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;o<t.length;o++)t[o].initialize(r[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):r.map(o=>ye.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=AH){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=Ns.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l<r.length;l++)r[l].initialize(s[l].textChange);let a=r[0].isTrivialSnippet;if(!a){for(let l of this._snippets)l.merge(r);console.assert(r.length===0)}return this._snippets[0].hasPlaceholder&&!a?this._move(void 0):s.map(l=>ye.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(let n of this._snippets){let r=n.computePossibleSelections();if(t.size===0)for(let[o,s]of r){s.sort(k.compareRangesUsingStarts);for(let a of e)if(s[0].containsRange(a)){t.set(o,[]);break}}if(t.size===0)return!1;t.forEach((o,s)=>{o.push(...r.get(s))})}e.sort(k.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(k.compareRangesUsingStarts);for(let o=0;o<r.length;o++)if(!r[o].containsRange(e[o])){t.delete(n);continue}}return t.size>0}};tu=xee([Eee(3,rt)],tu);var Tee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O4=function(i,e){return function(t,n){e(t,n,i)}},LH={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},ui=class mm{static get(e){return e.getContribution(mm.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new W,this._modelVersionId=-1,this._inSnippet=mm.InSnippetMode.bindTo(r),this._hasNextTabstop=mm.HasNextTabstop.bindTo(r),this._hasPrevTabstop=mm.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?LH:Object.assign(Object.assign({},LH),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(ot(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tu(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,s)=>{if(!this._session||o!==this._editor.getModel()||!ie.equals(this._editor.getPosition(),s))return;let{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;let l=o.getValueInRange(a.range),c=!!a.choice.options.find(h=>h.value===l),d=[];for(let h=0;h<a.choice.options.length;h++){let u=a.choice.options[h];d.push({kind:13,label:u.value,insertText:u.value,sortText:"a".repeat(h+1),range:a.range,filterText:c?`${l}_${u.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:g("next","Go to next placeholder...")}})}return{suggestions:d}}};let r=this._languageFeaturesService.completionProvider.register({language:this._editor.getModel().getLanguageId(),pattern:this._editor.getModel().uri.fsPath,scheme:this._editor.getModel().uri.scheme,exclusive:!0},this._choiceCompletionItemProvider);this._snippetListener.add(r)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(r=>r.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){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._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{kH(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};ui.ID="snippetController2";ui.InSnippetMode=new Ne("inSnippetMode",!1,g("inSnippetMode","Whether the editor in current in snippet mode"));ui.HasNextTabstop=new Ne("hasNextTabstop",!1,g("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));ui.HasPrevTabstop=new Ne("hasPrevTabstop",!1,g("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));ui=Tee([O4(1,Ja),O4(2,le),O4(3,we),O4(4,rt)],ui);Se(ui.ID,ui,4);var P4=ii.bindToContribution(ui.get);ge(new P4({id:"jumpToNextSnippetPlaceholder",precondition:G.and(ui.InSnippetMode,ui.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:2}}));ge(new P4({id:"jumpToPrevSnippetPlaceholder",precondition:G.and(ui.InSnippetMode,ui.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:1026}}));ge(new P4({id:"leaveSnippet",precondition:ui.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:9,secondary:[1033]}}));ge(new P4({id:"acceptSnippet",precondition:ui.InSnippetMode,handler:i=>i.finish()}));Si();st();var Iee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N8=function(i,e){return function(t,n){e(t,n,i)}},iu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},gr;(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(gr||(gr={}));var F4=class extends Y{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,h,u){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(N4,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Lo("isActive",!1),this._forceUpdate=uH("forceUpdate"),this._selectedInlineCompletionId=Lo("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([gr.Redo,gr.Undo,gr.AcceptWord]),this._fetchInlineCompletions=lH("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Yo.Automatic}),handleChange:(p,f)=>(p.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(p.change)?f.preserveCurrentCompletion=!0:p.didChange(this._forceUpdate)&&(f.inlineCompletionTriggerKind=p.change),!0)},(p,f)=>{if(this._forceUpdate.read(p),!(this._enabled.read(p)&&this.selectedSuggestItem.read(p)||this._isActive.read(p))){this._source.cancelUpdate();return}this.textModelVersionId.read(p);let b=this.selectedInlineCompletion.get(),C=f.preserveCurrentCompletion||b!=null&&b.forwardStable?b:void 0,T=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(p);if(T&&!w){let D=this._source.inlineCompletions.get();_i(j=>{D&&T.request.versionId>D.request.versionId&&this._source.inlineCompletions.set(T.clone(),j),this._source.clearSuggestWidgetInlineCompletions(j)})}let A=this.cursorPosition.read(p),O={triggerKind:f.inlineCompletionTriggerKind,selectedSuggestionInfo:w==null?void 0:w.toSelectedSuggestionInfo()};return this._source.fetch(A,O,C)}),this._filteredInlineCompletionItems=fn("filteredInlineCompletionItems",p=>{let f=this._source.inlineCompletions.read(p);if(!f)return[];let _=this.cursorPosition.read(p);return f.inlineCompletions.filter(C=>C.isVisible(this.textModel,_,p))}),this.selectedInlineCompletionIndex=fn("selectedCachedCompletionIndex",p=>{let f=this._selectedInlineCompletionId.read(p),_=this._filteredInlineCompletionItems.read(p),b=this._selectedInlineCompletionId===void 0?-1:_.findIndex(C=>C.semanticId===f);return b===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):b}),this.selectedInlineCompletion=fn("selectedCachedCompletion",p=>{let f=this._filteredInlineCompletionItems.read(p),_=this.selectedInlineCompletionIndex.read(p);return f[_]}),this.lastTriggerKind=this._source.inlineCompletions.map(p=>p==null?void 0:p.request.context.triggerKind),this.inlineCompletionsCount=fn("selectedInlineCompletionsCount",p=>{if(this.lastTriggerKind.read(p)===Yo.Explicit)return this._filteredInlineCompletionItems.read(p).length}),this.state=fn("ghostTextAndCompletion",p=>{var f;let _=this.textModel,b=this.selectedSuggestItem.read(p);if(b){let C=this._source.suggestWidgetInlineCompletions.read(p),T=C?C.inlineCompletions:[this.selectedInlineCompletion.read(p)].filter(uT),w=b.toSingleTextEdit().removeCommonPrefix(_),A=YT(T,Oe=>{let Pe=Oe.toSingleTextEdit(p);return Pe=Pe.removeCommonPrefix(_,k.fromPositions(Pe.range.getStartPosition(),b.range.getEndPosition())),Pe.augments(w)?{edit:Pe,completion:Oe}:void 0});if(!this._suggestPreviewEnabled.read(p)&&!A)return;let D=(f=A==null?void 0:A.edit)!==null&&f!==void 0?f:w,j=A?A.edit.text.length-w.text.length:0,q=this._suggestPreviewMode.read(p),_e=this.cursorPosition.read(p),J=D.computeGhostText(_,q,_e,j);return{ghostText:J!=null?J:new Qh(D.range.endLineNumber,[]),completion:A==null?void 0:A.completion,suggestItem:b}}else{if(!this._isActive.read(p))return;let C=this.selectedInlineCompletion.read(p);if(!C)return;let T=C.toSingleTextEdit(p),w=this._inlineSuggestMode.read(p),A=this.cursorPosition.read(p),O=T.computeGhostText(_,w,A);return O?{ghostText:O,completion:C,suggestItem:void 0}:void 0}}),this.ghostText=fn("ghostText",p=>{let f=this.state.read(p);if(f)return f.ghostText}),this._register(mH(this._fetchInlineCompletions,!0));let m;this._register(vi("call handleItemDidShow",p=>{var f,_;let b=this.state.read(p),C=b==null?void 0:b.completion;if((C==null?void 0:C.semanticId)!==(m==null?void 0:m.semanticId)&&(m=C,C)){let T=C.inlineCompletion,w=T.source;(_=(f=w.provider).handleItemDidShow)===null||_===void 0||_.call(f,w.inlineCompletions,T.sourceInlineCompletion,T.insertText)}}))}trigger(e){return iu(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return iu(this,void 0,void 0,function*(){l8(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,Yo.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){l8(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return iu(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return iu(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(t=this.selectedInlineCompletion.get())===null||t===void 0?void 0:t.toInlineCompletion(void 0);!r||!o||(e.pushUndoStop(),o.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=ui.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,bt)),_i(s=>{this._source.clear(s),this._isActive.set(!1,s)}))})}acceptNextWord(e){this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length<l&&(l=d.index+d[0].length),l})}acceptNextLine(e){this._acceptNext(e,(t,n)=>{let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})}_acceptNext(e,t){var n;if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(n=this.selectedInlineCompletion.get())===null||n===void 0?void 0:n.toInlineCompletion(void 0);if(!r||!o)return;if(o.snippetInfo||o.filterText!==o.insertText){this.accept(e);return}if(r.parts.length===0)return;let s=r.parts[0],a=new ie(r.lineNumber,s.column),l=s.lines.join(`
|
|
`),c=t(a,l);if(c===l.length&&r.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[at.replace(k.fromPositions(a),d)]);let h=Z0(d);e.setPosition(J0(a,h))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let h=k.fromPositions(o.range.getStartPosition(),J0(a,Z0(d))),u=e.getModel().getValueInRange(h,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,u.length)}}};F4=Iee([N8(9,Ce),N8(10,Pt),N8(11,rt)],F4);wt();re();St();Ie();cn();wr();Rt();ct();Gt();it();wt();UW();re();yn();ec();ti();c9();Me();Zo();St();Ie();ht();ct();re();cn();sn();ac();st();var kee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NH=function(i,e){return function(t,n){e(t,n,i)}},pm=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;o<n.length;o++){let{score:s,completion:a}=n[o];if(s[0]!==r)break;if(a.preselect)return o}return 0}},B4=class extends pm{constructor(){super("first")}memorize(e,t,n){}toJSON(){}fromJSON(){}},R8=class extends pm{constructor(){super("recentlyUsed"),this._cache=new il(300,.66),this._seq=0}memorize(e,t,n){let r=`${e.getLanguageId()}/${n.textLabel}`;this._cache.set(r,{touch:this._seq++,type:n.completion.kind,insertText:n.completion.insertText})}select(e,t,n){if(n.length===0)return 0;let r=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(r))return super.select(e,t,n);let o=n[0].score[0],s=-1,a=-1,l=-1;for(let c=0;c<n.length&&n[c].score[0]===o;c++){let d=`${e.getLanguageId()}/${n[c].textLabel}`,h=this._cache.peek(d);if(h&&h.touch>l&&h.type===n[c].completion.kind&&h.insertText===n[c].completion.insertText&&(l=h.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:u1.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},D8=class extends pm{constructor(){super("recentlyUsedByPrefix"),this._trie=Ak.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a<n.length;a++){let{kind:l,insertText:c}=n[a].completion;if(l===s.type&&c===s.insertText)return a}return super.select(e,t,n)}toJSON(){let e=[];return this._trie.forEach((t,n)=>e.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:u1.fromString(n.type),this._trie.set(t,n)}}},fm=class H4{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new W,this._persistSoon=new kt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===Bk.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;let r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==r){this._saveState();let o=H4._strategyCtors.get(r)||B4;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${H4._storagePrefix}/${r}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch(s){}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${H4._storagePrefix}/${this._strategy.name}`,n,t,1)}}};fm._strategyCtors=new Map([["recentlyUsedByPrefix",D8],["recentlyUsed",R8],["first",B4]]);fm._storagePrefix="suggest/memories";fm=kee([NH(0,Ar),NH(1,nt)],fm);var nu=Jn("ISuggestMemories");tr(nu,fm,1);qe();var Aee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Lee=function(i,e){return function(t,n){e(t,n,i)}},ru=class RH{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=RH.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(119)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(119)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};ru.AtEnd=new Ne("atEndOfWord",!1);ru=Aee([Lee(1,we)],ru);be();Si();qe();st();ff();qe();var Nee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ree=function(i,e){return function(t,n){e(t,n,i)}},Nl=class z4{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=z4.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(z4._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=z4._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Nl.OtherSuggestions=new Ne("hasOtherSuggestions",!1);Nl=Nee([Ree(1,we)],Nl);Rt();re();V2();var U4=class{constructor(e,t,n,r){this._disposables=new W,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Xt(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new oc;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}};ct();Gt();it();wt();re();Bt();Di();Qf();Rt();Ie();rT();St();Ie();var Dee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Rl=class i{provideSelectionRanges(e,t){return Dee(this,void 0,void 0,function*(){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n})}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let d=l.bracketInfo.bracketText,h=s.has(d)?s.get(d):0;s.set(d,h+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,h=s.has(d)?s.get(d):0;if(h-=1,s.set(d,Math.max(0,h)),h<0){let u=o.get(d);u||(u=new nf,o.set(d,u)),u.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let h=c.bracketInfo.bracketText,u=a.has(h)?a.get(h):0;if(u-=1,a.set(h,Math.max(0,u)),u<0){let m=o.get(h);if(m){let p=m.shift();m.size===0&&o.delete(h);let f=k.fromPositions(c.range.getEndPosition(),p.getStartPosition()),_=k.fromPositions(c.range.getStartPosition(),p.getEndPosition());s.push({range:f}),s.push({range:_}),i._addBracketLeading(n,_,s)}}}else{let h=c.bracketInfo.getOpeningBrackets()[0].bracketText,u=a.has(h)?a.get(h):0;a.set(h,u+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:k.fromPositions(new ie(r,o),t.getEndPosition())}),n.push({range:k.fromPositions(new ie(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:k.fromPositions(new ie(s,a),t.getEndPosition())}),n.push({range:k.fromPositions(new ie(s,1),t.getEndPosition())}))}}};Rl._maxDuration=30;Rl._maxRounds=2;var Mee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Dl=class i{static create(e,t){return Mee(this,void 0,void 0,function*(){if(!t.getOption(114).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=yield new Rl().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,h=s[d];if(GT(h))return 2<<20;let u=sc(h,k.fromPositions(l),k.compareRangesUsingStarts),m=u>=0?h[u]:h[Math.max(0,~u-1)],p=o.length;for(let f of o){if(!k.containsRange(f.range,m))break;p-=1}return p}}})}};Dl.None=new class extends Dl{distance(){return 0}};sn();qe();ff();Qa();Rt();Bt();var gm=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},ou=class i{constructor(e,t,n,r,o,s,a=Tf.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();let e=new Set;for(let[t,n]of this.getItemsByProvider())n.length>0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?If:cI;for(let c=0;c<s.length;c++){let d=s[c];if(d.isInvalid)continue;let h=this._itemsByProvider.get(d.provider);h?h.push(d):this._itemsByProvider.set(d.provider,[d]);let u=d.position.column-d.editStart.column,m=u+n-(d.position.column-this._column);if(r.length!==m&&(r=m===0?"":t.slice(-m),o=r.toLowerCase()),d.word=r,m===0)d.score=Vs.Default;else{let p=0;for(;p<u;){let f=r.charCodeAt(p);if(f===32||f===9)p+=1;else break}if(p>=m)d.score=Vs.Default;else if(typeof d.completion.filterText=="string"){let f=l(r,o,p,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!f)continue;NT(d.completion.filterText,d.textLabel)===0?d.score=f:(d.score=lI(r,o,p,d.textLabel,d.labelLow,0),d.score[0]=f[0])}else{let f=l(r,o,p,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!f)continue;d.score=f}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?qT(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}};ut();ti();var Oee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ed=function(i,e){return function(t,n){e(t,n,i)}},Pee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},La=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){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.triggerOptions=n}};function Fee(i,e,t){if(!e.getContextKeyValue(Ni.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(Ni.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}function Hee(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(Ni.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}var W4=class DH{constructor(e,t,n,r,o,s,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._toDispose=new W,this._triggerCharacterListener=new W,this._triggerQuickSuggest=new jo,this._triggerState=void 0,this._completionDisposables=new W,this._onDidCancel=new Re,this._onDidTrigger=new Re,this._onDidSuggest=new Re,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new ye(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){ei(this._triggerCharacterListener),ei([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(88)||!this._editor.hasModel()||!this._editor.getOption(117))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(IH()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!Hee(this._editor,this._contextKeyService,this._configurationService)||La.shouldAutoTrigger(this._editor))return;if(!n){let a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";MT(n.charCodeAt(n.length-1))?DT(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let s=e.get(o);if(s){let a=new Map;if(this._completionModel)for(let[l,c]of this._completionModel.getItemsByProvider())s.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:(r=this._completionModel)===null||r===void 0?void 0:r.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;As.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((e=ui.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!La.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=this._editor.getOption(86);if(!As.isAllOff(r)){if(!As.isAllOn(r)){t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.tokenization.getLineTokens(n.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(As.valueFor(r,s)!=="on")return}Fee(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){ot(this._editor.hasModel()),ot(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new La(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,r,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new La(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new qt;let h=this._editor.getOption(108),u=1;switch(h){case"top":u=0;break;case"bottom":u=2;break}let{itemKind:m,showDeprecated:p}=DH._createSuggestFilter(this._editor),f=new ka(u,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:m,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,p),_=Dl.create(this._editorWorkerService,this._editor),b=rm(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),f,d,this._requestToken.token);Promise.all([b,_]).then(([C,T])=>Pee(this,void 0,void 0,function*(){var w;if((w=this._requestToken)===null||w===void 0||w.dispose(),!this._editor.hasModel())return;let A=e==null?void 0:e.clipboardText;if(!A&&C.needsClipboard&&(A=yield this._clipboardService.readText()),this._triggerState===void 0)return;let O=this._editor.getModel(),D=new La(O,this._editor.getPosition(),e),j=Object.assign(Object.assign({},Tf.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new ou(C.items,this._context.column,{leadingLineContent:D.leadingLineContent,characterCountDelta:D.column-this._context.column},T,this._editor.getOption(114),this._editor.getOption(108),j,A),this._completionDisposables.add(C.disposable),this._onNewContext(D),this._reportDurationsTelemetry(C.durations)})).catch(Be)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){let t=new Set;e.getOption(108)==="none"&&t.add(27);let r=e.getOption(114);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Yt(e.leadingLineContent)!==Yt(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(La.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?n.add(r):t.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let r=La.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=t,n=this._completionModel.items.length>0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};W4=Oee([ed(1,Xs),ed(2,qs),ed(3,En),ed(4,Ja),ed(5,we),ed(6,nt),ed(7,le)],W4);re();var _m=class i{constructor(e,t){this._disposables=new W,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),r=n.length,o=!1;for(let a=0;a<r;a++)if(!n[a].isEmpty()){o=!0;break}if(!o){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];let s=e.getModel();for(let a=0;a<r;a++){let l=n[a];if(s.getValueLengthInRange(l)>i._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};_m._maxSelectionLength=51200;gt();ct();it();wt();re();Bt();Y2();xn();Si();qe();st();ln();an();ut();var Bee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Na=function(i,e){return function(t,n){e(t,n,i)}},Fr=class extends Xk{constructor(e,t,n,r,o,s,a,l,c,d,h,u,m){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),n,o,s,a,l,c,d,h,u,m),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){Yd(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Fr=Bee([Na(4,Ce),Na(5,_t),Na(6,Pt),Na(7,we),Na(8,Ki),Na(9,ni),Na(10,rg),Na(11,rt),Na(12,le)],Fr);gt();re();be();mi();qe();st();var zee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},M8=function(i,e){return function(t,n){e(t,n,i)}},O8=class i extends ng{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=g({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,i.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}},j4=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new W,this.element=oe(e,te(".suggest-status-bar"));let s=a=>a instanceof zo?n.createInstance(O8,a,void 0):void 0;this._leftActions=new kr(this.element,{actionViewItemProvider:s}),this._rightActions=new kr(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],r=[];for(let[o,s]of e.getActions())o==="left"?n.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};j4=zee([M8(2,Ce),M8(3,go),M8(4,we)],j4);be();qe();st();kn();ek();ln();gt();wt();re();var su=class{constructor(){this._onDidWillResize=new Re,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Re,this.onDidResize=this._onDidResize.event,this._sashListener=new W,this._size=new Vt(0,0),this._minSize=new Vt(0,0),this._maxSize=new Vt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ys(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ys(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ys(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:l9.North}),this._southSash=new Ys(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:l9.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Nt.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Nt.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(n=r.currentX-r.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(n=-(r.currentX-r.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(t=-(r.currentY-r.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Nt.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Nt.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(r,Math.min(s,t));let a=new Vt(t,e);Vt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}};gt();on();Zn();wt();re();it();wt();re();$r();G2();Xr();var Uee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},OH=function(i,e){return function(t,n){e(t,n,i)}},PH=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Gn=class FH{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Re,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new W,o=r.add(Ck(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,r)=>PH(this,void 0,void 0,function*(){var o,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=Vd);let c=yield Yk(this._languageService,r,l),d=document.createElement("span");if(d.innerHTML=(a=(s=FH._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let h=this._options.editor.getOption(48);Zf(d,h)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Wee(this._openerService,n,e.isTrusted),disposables:t}}}};Gn._ttpTokenizer=ah("tokenizeToString",{createHTML(i){return i}});Gn=Uee([OH(1,li),OH(2,ci)],Gn);function Wee(i,e,t){return PH(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:jee(t)})}catch(n){return Be(n),!1}})}function jee(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}be();st();var Vee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Kee=function(i,e){return function(t,n){e(t,n,i)}};function vm(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var V4=class{constructor(e,t){this._editor=e,this._onDidClose=new Re,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Re,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new W,this._renderDisposeable=new W,this._borderWidth=1,this._size=new Vt(330,0),this.domNode=te(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Gn,{editor:e}),this._body=te(".body"),this._scrollbar=new oh(this._body,{alwaysConsumeMouseWheel:!0}),oe(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=oe(this._body,te(".header")),this._close=oe(this._header,te("span"+Ve.asCSSSelector(De.close))),this._close.title=g("details.close","Close"),this._type=oe(this._header,te("p.type")),this._docs=oe(this._body,te("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(48),n=t.getMassagedFontFamily(),r=e.get(115)||t.fontSize,o=e.get(116)||t.lineHeight,s=t.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(116)||this._editor.getOption(48).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=g("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,r;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let a="";a+=`score: ${e.score[0]}
|
|
`,a+=`prefix: ${(n=e.word)!==null&&n!==void 0?n:"(no prefix)"}
|
|
`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
|
|
`,a+=`distance: ${e.distance} (localityBonus-setting)
|
|
`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
|
|
`,a+=`commit_chars: ${(r=e.completion.commitCharacters)===null||r===void 0?void 0:r.join("")}
|
|
`,s=new pi().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!vm(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),o){let a=o.length>1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=a,this._type.title=a,rn(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else nn(this._type),this._type.title="",ji(this._type),this.domNode.classList.add("no-type");if(nn(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),nn(this._docs);let a=this._markdownRenderer.render(s);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){let n=new Vt(e,t);Vt.equals(n,this._size)||(this._size=n,CT(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};V4=Vee([Kee(1,Ce)],V4);var K4=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new W,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new su,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+o,left:n.left+s})}a.done&&(n=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;let r=e.getBoundingClientRect();this._anchorBox=r,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var r;let o=hf(document.body),s=this.widget.getLayoutInfo(),a=new Vt(220,2*s.lineHeight),l=e.top,c=function(){let T=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),w=-s.borderWidth+e.left+e.width,A=new Vt(T,o.height-e.top-s.borderHeight-s.verticalPadding),O=A.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:w,fit:T-t.width,maxSizeTop:A,maxSizeBottom:O,minSize:a.with(Math.min(T,a.width))}}(),d=function(){let T=e.left-s.borderWidth-s.horizontalPadding,w=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),A=new Vt(T,o.height-e.top-s.borderHeight-s.verticalPadding),O=A.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:w,fit:T-t.width,maxSizeTop:A,maxSizeBottom:O,minSize:a.with(Math.min(T,a.width))}}(),h=function(){let T=e.left,w=-s.borderWidth+e.top+e.height,A=new Vt(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:w,left:T,fit:A.height-t.height,maxSizeBottom:A,maxSizeTop:A,minSize:a.with(A.width)}}(),u=[c,d,h],m=(r=u.find(T=>T.fit>=0))!==null&&r!==void 0?r:u.sort((T,w)=>w.fit-T.fit)[0],p=e.top+e.height-s.borderHeight,f,_=t.height,b=Math.max(m.maxSizeTop.height,m.maxSizeBottom.height);_>b&&(_=b);let C;n?_<=m.maxSizeTop.height?(f=!0,C=m.maxSizeTop):(f=!1,C=m.maxSizeBottom):_<=m.maxSizeBottom.height?(f=!1,C=m.maxSizeBottom):(f=!0,C=m.maxSizeTop),this._applyTopLeft({left:m.left,top:f?m.top:p-_}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!f,m===c,f,m!==c),this._resizable.minSize=m.minSize,this._resizable.maxSize=C,this._resizable.layout(_,Math.min(C.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}};gt();on();Zn();wt();re();Cn();cn();df();Tr();G2();var Oo;(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Oo||(Oo={}));var qee=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function bm(i,e,t,n){let r=n===Oo.ROOT_FOLDER?["rootfolder-icon"]:n===Oo.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===po.data)o=t1.parseMetaData(t).get(t1.META_DATA_LABEL);else{let s=t.path.match(qee);s?(o=q4(s[2].toLowerCase()),s[1]&&r.push(`${q4(s[1].toLowerCase())}-name-dir-icon`)):o=q4(t.authority.toLowerCase())}if(n===Oo.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){if(r.push(`${o}-name-file-icon`),r.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l<a.length;l++)r.push(`${a.slice(l).join(".")}-ext-file-icon`)}r.push("ext-file-icon")}let s=Gee(i,e,t);s&&r.push(`${q4(s)}-lang-file-icon`)}}return r}function Gee(i,e,t){if(!t)return null;let n=null;if(t.scheme===po.data){let o=t1.parseMetaData(t).get(t1.META_DATA_MIME);o&&(n=e.getLanguageIdByMimeType(o))}else{let r=i.getModel(t);r&&(n=r.getLanguageId())}return n&&n!==Vd?n:e.guessLanguageIdByFilepathOrFirstLine(t)}function q4(i){return i.replace(/[\11\12\14\15\40]/g,"/")}Ya();$r();be();ln();var $ee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},P8=function(i,e){return function(t,n){e(t,n,i)}},ym;function H8(i){return`suggest-aria-id:${i}`}var Yee=Qt("suggest-more-info",De.chevronRight,g("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),Xee=new(ym=class G4{extract(e,t){if(e.textLabel.match(G4._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(G4._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let n=G4._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},ym._regexRelaxed=/(#([\da-fA-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*\))/,ym._regexStrict=new RegExp(`^${ym._regexRelaxed.source}$`,"i"),ym),$4=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new Re,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new W,n=e;n.classList.add("show-file-icons");let r=oe(e,te(".icon")),o=oe(r,te("span.colorspan")),s=oe(e,te(".contents")),a=oe(s,te(".main")),l=oe(a,te(".icon-label.codicon")),c=oe(a,te("span.left")),d=oe(a,te("span.right")),h=new og(c,{supportHighlights:!0,supportIcons:!0});t.add(h);let u=oe(c,te("span.signature-label")),m=oe(c,te("span.qualifier-label")),p=oe(d,te("span.details-label")),f=oe(d,te("span.readMore"+Ve.asCSSSelector(Yee)));f.title=g("readMore","Read More");let _=()=>{let b=this._editor.getOptions(),C=b.get(48),T=C.getMassagedFontFamily(),w=C.fontFeatureSettings,A=b.get(115)||C.fontSize,O=b.get(116)||C.lineHeight,D=C.fontWeight,j=C.letterSpacing,q=`${A}px`,_e=`${O}px`,J=`${j}px`;n.style.fontSize=q,n.style.fontWeight=D,n.style.letterSpacing=J,a.style.fontFamily=T,a.style.fontFeatureSettings=w,a.style.lineHeight=_e,r.style.height=_e,r.style.width=_e,f.style.height=_e,f.style.width=_e};return _(),t.add(this._editor.onDidChangeConfiguration(b=>{(b.hasChanged(48)||b.hasChanged(115)||b.hasChanged(116))&&_()})),{root:n,left:c,right:d,icon:r,colorspan:o,iconLabel:h,iconContainer:l,parametersLabel:u,qualifierLabel:m,detailsLabel:p,readMore:f,disposables:t}}renderElement(e,t,n){let{completion:r}=e;n.root.id=H8(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:cc(e.score)},s=[];if(r.kind===19&&Xee.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=bm(this._modelService,this._languageService,Qe.from({scheme:"fake",path:e.textLabel}),Oo.FILE),l=bm(this._modelService,this._languageService,Qe.from({scheme:"fake",path:r.detail}),Oo.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",o.extraClasses=[bm(this._modelService,this._languageService,Qe.from({scheme:"fake",path:e.textLabel}),Oo.FOLDER),bm(this._modelService,this._languageService,Qe.from({scheme:"fake",path:r.detail}),Oo.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...Ve.asClassNameArray(u1.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=F8(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=F8(r.label.detail||""),n.detailsLabel.textContent=F8(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(114).showInlineDetails?rn(n.detailsLabel):ji(n.detailsLabel),vm(e)?(n.right.classList.add("can-expand-details"),rn(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),ji(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};$4=$ee([P8(1,Ri),P8(2,li),P8(3,Ki)],$4);function F8(i){return i.replace(/\r\n|\r|\n/g,"")}var Qee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Y4=function(i,e){return function(t,n){e(t,n,i)}},Jee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};pe("editorSuggestWidget.background",{dark:Ks,light:Ks,hcDark:Ks,hcLight:Ks},g("editorSuggestWidgetBackground","Background color of the suggest widget."));pe("editorSuggestWidget.border",{dark:uc,light:uc,hcDark:uc,hcLight:uc},g("editorSuggestWidgetBorder","Border color of the suggest widget."));var X4=pe("editorSuggestWidget.foreground",{dark:Go,light:Go,hcDark:Go,hcLight:Go},g("editorSuggestWidgetForeground","Foreground color of the suggest widget."));pe("editorSuggestWidget.selectedForeground",{dark:s1,light:s1,hcDark:s1,hcLight:s1},g("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));pe("editorSuggestWidget.selectedIconForeground",{dark:a1,light:a1,hcDark:a1,hcLight:a1},g("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));var Zee=pe("editorSuggestWidget.selectedBackground",{dark:l1,light:l1,hcDark:l1,hcLight:l1},g("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));pe("editorSuggestWidget.highlightForeground",{dark:$o,light:$o,hcDark:$o,hcLight:$o},g("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));pe("editorSuggestWidget.focusHighlightForeground",{dark:o1,light:o1,hcDark:o1,hcLight:o1},g("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));pe("editorSuggestWidgetStatus.foreground",{dark:In(X4,.5),light:In(X4,.5),hcDark:In(X4,.5),hcLight:In(X4,.5)},g("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));var B8=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Fr}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let n=JSON.parse(t);if(Vt.is(n))return Vt.lift(n)}catch(n){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},au=class z8{constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new ai,this._pendingShowDetails=new ai,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new jo,this._disposables=new W,this._onDidSelect=new L2,this._onDidFocus=new L2,this._onDidHide=new Re,this._onDidShow=new Re,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Re,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new su,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new U8(this,e),this._persistedSize=new B8(t,e);class s{constructor(m,p,f=!1,_=!1){this.persistedSize=m,this.currentSize=p,this.persistHeight=f,this.persistWidth=_}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(u=>{var m,p,f,_;if(this._resize(u.dimension.width,u.dimension.height),a&&(a.persistHeight=a.persistHeight||!!u.north||!!u.south,a.persistWidth=a.persistWidth||!!u.east||!!u.west),!!u.done){if(a){let{itemHeight:b,defaultSize:C}=this.getLayoutInfo(),T=Math.round(b/2),{width:w,height:A}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-A)<=T)&&(A=(p=(m=a.persistedSize)===null||m===void 0?void 0:m.height)!==null&&p!==void 0?p:C.height),(!a.persistWidth||Math.abs(a.currentSize.width-w)<=T)&&(w=(_=(f=a.persistedSize)===null||f===void 0?void 0:f.width)!==null&&_!==void 0?_:C.width),this._persistedSize.store(new Vt(w,A))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=oe(this.element.domNode,te(".message")),this._listElement=oe(this.element.domNode,te(".tree"));let l=o.createInstance(V4,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new K4(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(114).showIcons);c();let d=o.createInstance($4,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new qf("SuggestWidget",this._listElement,{getHeight:u=>this.getLayoutInfo().itemHeight,getTemplateId:u=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>g("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:u=>{let m=u.textLabel;if(typeof u.completion.label!="string"){let{detail:b,description:C}=u.completion.label;b&&C?m=g("label.full","{0}{1}, {2}",m,b,C):b?m=g("label.detail","{0}{1}",m,b):C&&(m=g("label.desc","{0}, {1}",m,C))}if(!u.isResolved||!this._isDetailsVisible())return m;let{documentation:p,detail:f}=u.completion,_=xr("{0}{1}",f||"",p?typeof p=="string"?p:p.value:"");return g("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",m,_)}}}),this._list.style(kk({listInactiveFocusBackground:Zee,listInactiveFocusOutline:qo})),this._status=o.createInstance(j4,this.element.domNode,Ls);let h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(114).showStatusBar);h(),this._disposables.add(r.onDidColorThemeChange(u=>this._onThemeChange(u))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onTap(u=>this._onListMouseDownOrTap(u))),this._disposables.add(this._list.onDidChangeSelection(u=>this._onListSelection(u))),this._disposables.add(this._list.onDidChangeFocus(u=>this._onListFocus(u))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(u=>{u.hasChanged(114)&&(h(),c())})),this._ctxSuggestWidgetVisible=Le.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=Le.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=Le.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=Le.HasFocusedSuggestion.bindTo(n),this._disposables.add(Vr(this._details.widget.domNode,"keydown",u=>{this._onDetailsKeydown.fire(u)})),this._disposables.add(this.editor.onMouseDown(u=>this._onEditorMouseDown(u)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=d1(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let n=e.elements[0],r=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(r),this._currentSuggestionDetails=Ht(o=>Jee(this,void 0,void 0,function*(){let s=dc(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield n.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{r>=this._list.length||n!==this._list.element(r)||(this._ignoreFocusEvents=!0,this._list.splice(r,1,[n]),this._list.setFocus([r]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:H8(r)}))}).catch(Be)),this._onDidFocus.fire({item:n,index:r,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:ji(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=z8.LOADING_MESSAGE,ji(this._listElement,this._status.element),rn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=z8.NO_SUGGESTIONS_MESSAGE,ji(this._listElement,this._status.element),rn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:ji(this._messageElement),rn(this._listElement,this._status.element),this._show();break;case 4:ji(this._messageElement),rn(this._listElement,this._status.element),this._show();break;case 5:ji(this._messageElement),rn(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=dc(()=>this._setState(1),t)))}showSuggestions(e,t,n,r,o){var s,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let l=this._completionModel.items.length,c=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),c){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=D2(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(vm(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=D2(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<n&&this._persistedSize.store(t.with(void 0,n))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,n,r;if(!this.editor.hasModel()||!this.editor.getDomNode())return;let o=hf(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,this._state===2||this._state===1)a=s.itemHeight+s.borderHeight,l=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Vt(l,a),this._contentWidget.setPreference(2);else{let c=o.width-s.borderHeight-2*s.horizontalPadding;l>c&&(l=c);let d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:l,h=s.statusBarHeight+this._list.contentHeight+s.borderHeight,u=s.itemHeight+s.statusBarHeight,m=wn(this.editor.getDomNode()),p=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),f=m.top+p.top+p.height,_=Math.min(o.height-f-s.verticalPadding,h),b=m.top+p.top-s.verticalPadding,C=Math.min(b,h),T=Math.min(Math.max(C,_)+s.borderHeight,h);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<u&&(a=u),a>T&&(a=T);let w=150;a>_||this._forceRenderingAbove&&b>w?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),T=C):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),T=_),this.element.preferredSize=new Vt(d,s.defaultSize.height),this.element.maxSize=new Vt(c,T),this.element.minSize=new Vt(220,u),this._cappedHeight=a===h?{wanted:(r=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&r!==void 0?r:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:n,height:r}=this.element.maxSize;e=Math.min(n,e),t=Math.min(r,t);let{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){let e=this.editor.getOption(48),t=wk(this.editor.getOption(116)||e.lineHeight,8,1e3),n=!this.editor.getOption(114).showStatusBar||this._state===2||this._state===1?0:t,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Vt(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};au.LOADING_MESSAGE=g("suggestWidget.loading","Loading...");au.NO_SUGGESTIONS_MESSAGE=g("suggestWidget.noSuggestions","No suggestions.");au=Qee([Y4(1,Ar),Y4(2,we),Y4(3,Ki),Y4(4,Ce)],au);var U8=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:r}=this._widget.getLayoutInfo();return new Vt(t+2*n+r,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}};Qa();Tr();var ete=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lu=function(i,e){return function(t,n){e(t,n,i)}},tte=!1,W8=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let r=e.getOffsetAt(t),o=e.getPositionAt(r+1);this._marker=e.deltaDecorations([],[{range:k.fromPositions(t,o),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},Hr=class HH{static get(e){return e.getContribution(HH.ID)}constructor(e,t,n,r,o,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new ai,this._toDispose=new W,this._selectors=new j8(h=>h.priority),this._telemetryGate=0,this.editor=e,this.model=o.createInstance(W4,this.editor),this._selectors.register({priority:0,select:(h,u,m)=>this._memoryService.select(h,u,m)});let l=Le.InsertMode.bindTo(r);l.set(e.getOption(114).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(114).insertMode)),this.widget=this._toDispose.add(new Lf(()=>{let h=this._instantiationService.createInstance(au,this.editor);this._toDispose.add(h),this._toDispose.add(h.onDidSelect(_=>this._insertSuggestion(_,0),this));let u=new U4(this.editor,h,this.model,_=>this._insertSuggestion(_,2));this._toDispose.add(u);let m=Le.MakesTextEdit.bindTo(this._contextKeyService),p=Le.HasInsertAndReplaceRange.bindTo(this._contextKeyService),f=Le.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ft(()=>{m.reset(),p.reset(),f.reset()})),this._toDispose.add(h.onDidFocus(({item:_})=>{let b=this.editor.getPosition(),C=_.editStart.column,T=b.column,w=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!_.completion.additionalTextEdits&&!(_.completion.insertTextRules&4)&&T-C===_.completion.insertText.length&&(w=this.editor.getModel().getValueInRange({startLineNumber:b.lineNumber,startColumn:C,endLineNumber:b.lineNumber,endColumn:T})!==_.completion.insertText),m.set(w),p.set(!ie.equals(_.editInsertEnd,_.editReplaceEnd)),f.set(!!_.provider.resolveCompletionItem||!!_.completion.documentation||_.completion.detail!==_.completion.label)})),this._toDispose.add(h.onDetailsKeyDown(_=>{if(_.toKeyCodeChord().equals(new R2(!0,!1,!1,!1,33))||Ui&&_.toKeyCodeChord().equals(new R2(!1,!1,!1,!0,33))){_.stopPropagation();return}_.toKeyCodeChord().isModifierKey()||this.editor.focus()})),h})),this._overtypingCapturer=this._toDispose.add(new Lf(()=>this._toDispose.add(new _m(this.editor,this.model)))),this._alternatives=this._toDispose.add(new Lf(()=>this._toDispose.add(new Nl(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(ru,e)),this._toDispose.add(this.model.onDidTrigger(h=>{this.widget.value.showTriggered(h.auto,h.shy?250:50),this._lineSuffix.value=new W8(this.editor.getModel(),h.position)})),this._toDispose.add(this.model.onDidSuggest(h=>{if(h.triggerOptions.shy)return;let u=-1;for(let p of this._selectors.itemsOrderedByPriorityDesc)if(u=p.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items),u!==-1)break;u===-1&&(u=0);let m=!1;if(h.triggerOptions.auto){let p=this.editor.getOption(114);p.selectionMode==="never"||p.selectionMode==="always"?m=p.selectionMode==="never":p.selectionMode==="whenTriggerCharacter"?m=h.triggerOptions.triggerKind!==1:p.selectionMode==="whenQuickSuggestion"&&(m=h.triggerOptions.triggerKind===1&&!h.triggerOptions.refilter)}this.widget.value.showSuggestions(h.completionModel,u,h.isFrozen,h.triggerOptions.auto,m)})),this._toDispose.add(this.model.onDidCancel(h=>{h.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{tte||(this.model.cancel(),this.model.clear())}));let c=Le.AcceptSuggestionsOnEnter.bindTo(r),d=()=>{let h=this.editor.getOption(1);c.set(h==="on"||h==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=ui.get(this.editor);if(!n)return;let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new qt;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));if(this._memoryService.memorize(r,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let h=pc.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(u=>at.replaceMove(k.lift(u.range),u.text))),h.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){let h=new Sn(!0),u,m=r.onDidChangeContent(b=>{if(b.isFlush){l.cancel(),m.dispose();return}for(let C of b.changes){let T=k.getEndPosition(C.range);(!u||ie.isBefore(T,u))&&(u=T)}}),p=t;t|=2;let f=!1,_=this.editor.onWillType(()=>{_.dispose(),f=!0,p&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested||u&&s.completion.additionalTextEdits.some(C=>ie.isBefore(u,k.getStartPosition(C.range))))return!1;f&&this.editor.pushUndoStop();let b=pc.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(C=>at.replaceMove(k.lift(C.range),C.text))),b.restoreRelativeVerticalPositionOfCursor(this.editor),(f||!(p&2))&&this.editor.pushUndoStop(),!0}).then(b=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",h.elapsed(),b),m.dispose(),_.dispose()}))}let{insertText:d}=s.completion;s.completion.insertTextRules&4||(d=Pr.escape(d)),this.model.cancel(),n.insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command&&(s.completion.command.id===Sm.id?this.model.trigger({auto:!0,retrigger:!0}):a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(h=>{s.completion.extensionId?bt(h):Be(h)}))),t&4&&this._alternatives.value.set(e,h=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(h,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,e),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n){var r;if(this._telemetryGate++%100!==0)return;let o=e.extensionId?e.extensionId.value:((r=n.item.provider._debugDisplayName)!==null&&r!==void 0?r:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:o,kind:e.completion.kind,basenameHash:Xf(Tn(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:pI(t.uri)})}getOverwriteInfo(e,t){ot(this.editor.hasModel());let n=this.editor.getOption(114).insertMode==="replace";t&&(n=!n);let r=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(Xt(e.completion.additionalTextEdits)){let t=g("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Kt(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};Nt.once(this.model.onDidTrigger)(o=>{let s=[];Nt.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{ei(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(ei(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Hr.ID="editor.contrib.suggestController";Hr=ete([lu(1,nu),lu(2,Pt),lu(3,we),lu(4,Ce),lu(5,Ja),lu(6,En)],Hr);var j8=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},Sm=class i extends K{constructor(){super({id:i.id,label:g("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:G.and(I.writable,I.hasCompletionItemProvider,Le.Visible.toNegated()),kbOpts:{kbExpr:I.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=Hr.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};Sm.id="editor.action.triggerSuggest";Se(Hr.ID,Hr,2);F(Sm);var _r=100+90,gn=ii.bindToContribution(Hr.get);ge(new gn({id:"acceptSelectedSuggestion",precondition:G.and(Le.Visible,Le.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:G.and(Le.Visible,I.textInputFocus),weight:_r},{primary:3,kbExpr:G.and(Le.Visible,I.textInputFocus,Le.AcceptSuggestionsOnEnter,Le.MakesTextEdit),weight:_r}],menuOpts:[{menuId:Ls,title:g("accept.insert","Insert"),group:"left",order:1,when:Le.HasInsertAndReplaceRange.toNegated()},{menuId:Ls,title:g("accept.insert","Insert"),group:"left",order:1,when:G.and(Le.HasInsertAndReplaceRange,Le.InsertMode.isEqualTo("insert"))},{menuId:Ls,title:g("accept.replace","Replace"),group:"left",order:1,when:G.and(Le.HasInsertAndReplaceRange,Le.InsertMode.isEqualTo("replace"))}]}));ge(new gn({id:"acceptAlternativeSelectedSuggestion",precondition:G.and(Le.Visible,I.textInputFocus,Le.HasFocusedSuggestion),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Ls,group:"left",order:2,when:G.and(Le.HasInsertAndReplaceRange,Le.InsertMode.isEqualTo("insert")),title:g("accept.replace","Replace")},{menuId:Ls,group:"left",order:2,when:G.and(Le.HasInsertAndReplaceRange,Le.InsertMode.isEqualTo("replace")),title:g("accept.insert","Insert")}]}));Je.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");ge(new gn({id:"hideSuggestWidget",precondition:Le.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:9,secondary:[1033]}}));ge(new gn({id:"selectNextSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));ge(new gn({id:"selectNextPageSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:12,secondary:[2060]}}));ge(new gn({id:"selectLastSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));ge(new gn({id:"selectPrevSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));ge(new gn({id:"selectPrevPageSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:11,secondary:[2059]}}));ge(new gn({id:"selectFirstSuggestion",precondition:G.and(Le.Visible,G.or(Le.MultipleSuggestions,Le.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));ge(new gn({id:"focusSuggestion",precondition:G.and(Le.Visible,Le.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));ge(new gn({id:"focusAndAcceptSuggestion",precondition:G.and(Le.Visible,Le.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));ge(new gn({id:"toggleSuggestionDetails",precondition:G.and(Le.Visible,Le.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Ls,group:"right",order:1,when:G.and(Le.DetailsVisible,Le.CanResolve),title:g("detail.more","show less")},{menuId:Ls,group:"right",order:1,when:G.and(Le.DetailsVisible.toNegated(),Le.CanResolve),title:g("detail.less","show more")}]}));ge(new gn({id:"toggleExplainMode",precondition:Le.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));ge(new gn({id:"toggleSuggestionFocus",precondition:Le.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:2570,mac:{primary:778}}}));ge(new gn({id:"insertBestCompletion",precondition:G.and(I.textInputFocus,G.equals("config.editor.tabCompletion","on"),ru.AtEnd,Le.Visible.toNegated(),Nl.OtherSuggestions.toNegated(),ui.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(af(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:_r,primary:2}}));ge(new gn({id:"insertNextSuggestion",precondition:G.and(I.textInputFocus,G.equals("config.editor.tabCompletion","on"),Nl.OtherSuggestions,Le.Visible.toNegated(),ui.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:2}}));ge(new gn({id:"insertPrevSuggestion",precondition:G.and(I.textInputFocus,G.equals("config.editor.tabCompletion","on"),Nl.OtherSuggestions,Le.Visible.toNegated(),ui.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:_r,kbExpr:I.textInputFocus,primary:1026}}));F(class extends K{constructor(){super({id:"editor.action.resetSuggestSize",label:g("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=Hr.get(e))===null||t===void 0||t.resetWidgetSize()}});Rt();var Q4=class extends Y{get selectedItem(){return this._selectedItem}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Lo("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(o=>{o.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(o=>{o.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let r=Hr.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{var d;_i(_=>this.checkModelVersion(_));let h=this.editor.getModel();if(!h)return-1;let u=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(h);if(!u)return-1;let m=ie.lift(l),p=c.map((_,b)=>{let T=J4.fromSuggestion(r,h,m,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),w=u.augments(T);return{index:b,valid:w,prefixLength:T.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),f=JT(p,XT(_=>_.prefixLength,QT));return f?f.index:-1}}));let o=!1,s=()=>{o||(o=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Nt.once(r.model.onDidTrigger)(a=>{s()}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!ite(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,_i(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){let e=Hr.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),r=this.editor.getModel();if(!(!t||!n||!r))return J4.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=Hr.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=Hr.get(this.editor);e==null||e.forceRenderingAbove()}},J4=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new Pr().parse(s);c.children.length<100&&tu.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(k.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,t,n,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new rk(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Jc(this.range,this.insertText)}};function ite(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}Si();sn();qe();st();var nte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},td=function(i,e){return function(t,n){e(t,n,i)}},_n=class BH extends Y{static get(e){return e.getContribution(BH.ID)}constructor(e,t,n,r,o,s,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=r,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this.model=Q0("inlineCompletionModel",void 0),this.textModelVersionId=Lo("textModelVersionId",-1),this.cursorPosition=Lo("cursorPosition",new ie(1,1)),this.suggestWidgetAdaptor=this._register(new Q4(this.editor,()=>{var h,u;return(u=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||u===void 0?void 0:u.toSingleTextEdit(void 0)},h=>this.updateObservables(h,gr.Other))),this._enabled=No(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(E4,this.editor,{ghostText:this.model.map((h,u)=>h==null?void 0:h.ghostText.read(u)),minReservedLineCount:b4(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new Ni(this.contextKeyService,this.model)),this._register(Nt.runAndSubscribe(e.onDidChangeModel,()=>_i(h=>{this.model.set(void 0,h),this.updateObservables(h,gr.Other);let u=e.getModel();if(u){let m=t.createInstance(F4,u,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,No(e.onDidChangeConfiguration,()=>e.getOption(114).preview),No(e.onDidChangeConfiguration,()=>e.getOption(114).previewMode),No(e.onDidChangeConfiguration,()=>e.getOption(60).mode),this._enabled);this.model.set(m,h)}})));let c=h=>{var u;return h.isUndoing?gr.Undo:h.isRedoing?gr.Redo:!((u=this.model.get())===null||u===void 0)&&u.isAcceptingPartially?gr.AcceptWord:gr.Other};this._register(e.onDidChangeModelContent(h=>_i(u=>this.updateObservables(u,c(h))))),this._register(e.onDidChangeCursorPosition(h=>_i(u=>{var m;this.updateObservables(u,gr.Other),h.reason===3&&((m=this.model.get())===null||m===void 0||m.stop(u))}))),this._register(e.onDidType(()=>_i(h=>{var u;this.updateObservables(h,gr.Other),this._enabled.get()&&((u=this.model.get())===null||u===void 0||u.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([Kd.Tab.id,Kd.DeleteLeft.id,Kd.DeleteRight.id,y4,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&_i(m=>{var p;(p=this.model.get())===null||p===void 0||p.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(60).keepOnBlur||Do.dropDownVisible||_i(h=>{var u;(u=this.model.get())===null||u===void 0||u.stop(h)})})),this._register(vi("forceRenderingAbove",h=>{var u;let m=(u=this.model.read(h))===null||u===void 0?void 0:u.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(vi("play audio cue & read suggestion",h=>{let u=this.model.read(h),m=u==null?void 0:u.state.read(h);if(!u||!m||!m.completion){d=void 0;return}if(m.completion.semanticId!==d){if(d=m.completion.semanticId,u.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(Zk.inlineSuggestion).then(()=>{if(this.editor.getOption(6)){let p=u.textModel.getLineContent(m.ghostText.lineNumber);Kt(m.ghostText.renderForScreenReader(p))}})}})),this._register(new k4(this.editor,this.model,this.instantiationService))}updateObservables(e,t){var n,r;let o=this.editor.getModel();this.textModelVersionId.set((n=o==null?void 0:o.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((r=this.editor.getPosition())!==null&&r!==void 0?r:new ie(1,1),e)}shouldShowHoverAt(e){var t;let n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(r=>e.containsPosition(new ie(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};_n.ID="editor.contrib.inlineCompletionsController";_n=nte([td(1,Ce),td(2,we),td(3,nt),td(4,Pt),td(5,qi),td(6,le),td(7,Jk)],_n);be();mi();sn();qe();var Ml=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Cm=class i extends K{constructor(){super({id:i.ID,label:g("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:G.and(I.writable,Ni.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.next()})}};Cm.ID=C4;var wm=class i extends K{constructor(){super({id:i.ID,label:g("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:G.and(I.writable,Ni.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.previous()})}};wm.ID=S4;var Z4=class extends K{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:g("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:I.writable})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.triggerExplicitly()})}},e5=class extends K{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:g("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:G.and(I.writable,Ni.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:ae.InlineSuggestionToolbar,title:g("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextWord(r.editor)})}},t5=class extends K{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:g("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:G.and(I.writable,Ni.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:ae.InlineSuggestionToolbar,title:g("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextLine(r.editor)})}},i5=class extends K{constructor(){super({id:y4,label:g("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Ni.inlineSuggestionVisible,menuOpts:[{menuId:ae.InlineSuggestionToolbar,title:g("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:G.and(Ni.inlineSuggestionVisible,I.tabMovesFocus.toNegated(),Ni.inlineSuggestionHasIndentationLessThanTabSize)}})}run(e,t){var n;return Ml(this,void 0,void 0,function*(){let r=_n.get(t);r&&((n=r.model.get())===null||n===void 0||n.accept(r.editor),r.editor.focus())})}},xm=class i extends K{constructor(){super({id:i.ID,label:g("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Ni.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Ml(this,void 0,void 0,function*(){let n=_n.get(t);_i(r=>{var o;(o=n==null?void 0:n.model.get())===null||o===void 0||o.stop(r)})})}};xm.ID="editor.action.inlineSuggest.hide";var Em=class i extends Gr{constructor(){super({id:i.ID,title:g("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:ae.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:G.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Ml(this,void 0,void 0,function*(){let n=e.get(nt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)})}};Em.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";gt();re();Ie();$r();be();st();Xr();Qa();var rte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Tm=function(i,e){return function(t,n){e(t,n,i)}},V8=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},n5=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=_n.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let r=n.detail;if(t.shouldShowHoverAtViewZone(r.viewZoneId))return new Al(1e3,this,k.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new Al(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new Al(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(60).showToolbar==="always")return[];let n=_n.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new V8(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new W,r=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,r,n);let o=r.controller.model.get(),s=this._instantiationService.createInstance(Do,this._editor,!1,b4(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(s.getDomNode()),o.triggerExplicitly(),n.add(s),n}renderScreenReaderText(e,t,n){let r=te,o=r("div.hover-row.markdown-hover"),s=oe(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new Gn({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=g("inlineSuggestionFollows","Suggestion:"),h=n.add(a.render(new pi().appendText(d).appendCodeblock("text",c)));s.replaceChildren(h.element)};n.add(vi("update hover",c=>{var d;let h=(d=t.controller.model.read(c))===null||d===void 0?void 0:d.ghostText.read(c);if(h){let u=this._editor.getModel().getLineContent(h.lineNumber);l(h.renderForScreenReader(u))}else uf(s)})),e.fragment.appendChild(o)}};n5=rte([Tm(1,li),Tm(2,ci),Tm(3,rg),Tm(4,Ce),Tm(5,En)],n5);mi();Se(_n.ID,_n,3);F(Z4);F(Cm);F(wm);F(e5);F(t5);F(i5);F(xm);Ft(Em);Ao.register(n5);gt();ct();on();re();Bt();Zn();Ie();dn();st();var ote=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ste=function(i,e){return function(t,n){e(t,n,i)}},ate=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},lte=Ue.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:FT,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),r5=class i extends Y{constructor(e,t,n,r,o){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=te(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=te("span.icon");this.domNode.append(t),t.classList.add(...Ve.asClassNameArray(De.loading),"codicon-modifier-spin");let n=()=>{let r=this.editor.getOption(64);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};n(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(50)||r.hasChanged(64))&&n()})),this._register(jt(this.domNode,Qn.CLICK,r=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};r5.baseId="editor.widget.inlineProgressWidget";var zH=class extends Y{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new ai),this._currentWidget=new ai,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return ate(this,void 0,void 0,function*(){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=dc(()=>{let o=k.fromPositions(e);this._currentDecorations.set([{range:o,options:lte}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(r5,this.id,this._editor,o,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};zH=ote([ste(2,Ce)],zH);hT();wr();ct();Bs();yn();ti();Cn();g1();h9();Me();xn();St();Ie();ht();cn();ct();it();Bs();re();xn();St();Ie();gt();ic();on();Zn();Xd();wt();Y2();Me();xn();gt();Xd();re();Y2();Ie();dn();var UH=new xt(new bI(0,122,204)),cte={showArrow:!0,showFrame:!0,className:"",frameColor:UH,arrowColor:UH,keepEditorSelection:!1},dte="vs.editor.contrib.zoneWidget",K8=class{constructor(e,t,n,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},q8=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},o5=class i{constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),M2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){M2(this._ruleName),xT(`.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; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:k.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};o5._IdGenerator=new yk(".arrow-decoration-");var s5=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new W,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=vI(t),Yd(this.options,cte,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{let r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new o5(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){let n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;let r=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=k.isIRange(e)?k.lift(e):k.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Ue.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(64),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){let u=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,u)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(u=>{this._viewZone&&u.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new K8(s,n.lineNumber,n.column,t,m=>this._onViewZoneTop(m),m=>this._onViewZoneHeight(m),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=u.addZone(this._viewZone),this._overlayWidget=new q8(dte+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let u=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=u+"px",this.container.style.borderBottomWidth=u+"px"}let d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);let h=this.editor.getModel();if(h){let u=h.validateRange(new k(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(u,u.startLineNumber===h.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ys(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(64),r=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}};be();qe();ac();st();kn();var WH=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jH=function(i,e){return function(t,n){e(t,n,i)}},G8=Jn("IPeekViewService");tr(G8,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);var Hi;(function(i){i.inPeekEditor=new Ne("inReferenceSearchEditor",!0,g("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Hi||(Hi={}));var Im=class{constructor(e,t){e instanceof Fr&&Hi.inPeekEditor.bindTo(t)}dispose(){}};Im.ID="editor.contrib.referenceController";Im=WH([jH(1,we)],Im);Se(Im.ID,Im,0);function VH(i){let e=i.get(_t).getFocusedCodeEditor();return e instanceof Fr?e.getParentEditor():e}var hte={headerBackgroundColor:xt.white,primaryHeadingColor:xt.fromHex("#333333"),secondaryHeadingColor:xt.fromHex("#6c6c6cb3")},cu=class extends s5{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Re,this.onDidClose=this._onDidClose.event,Yd(this.options,hte,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=te(".head"),this._bodyElement=te(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=te(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Vr(this._titleElement,"click",o=>this._onTitleClick(o))),oe(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=te("span.filename"),this._secondaryHeading=te("span.dirname"),this._metaHeading=te("span.meta"),oe(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=te(".peekview-actions");oe(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new kr(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Kr("peekview.close",g("label.close","Close"),Ve.asClassName(De.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Kk.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:nn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,rn(this._metaHeading)):ji(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(64)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};cu=WH([jH(2,Ce)],cu);var KH=pe("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:xt.black,hcLight:xt.white},g("peekViewTitleBackground","Background color of the peek view title area.")),a5=pe("peekViewTitleLabel.foreground",{dark:xt.white,light:xt.black,hcDark:xt.white,hcLight:Go},g("peekViewTitleForeground","Color of the peek view title.")),l5=pe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},g("peekViewTitleInfoForeground","Color of the peek view title info.")),qH=pe("peekView.border",{dark:n1,light:n1,hcDark:Yr,hcLight:Yr},g("peekViewBorder","Color of the peek view borders and arrow.")),GH=pe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:xt.black,hcLight:xt.white},g("peekViewResultsBackground","Background color of the peek view result list.")),_Te=pe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:xt.white,hcLight:Go},g("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),vTe=pe("peekViewResult.fileForeground",{dark:xt.white,light:"#1E1E1E",hcDark:xt.white,hcLight:Go},g("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),bTe=pe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},g("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),yTe=pe("peekViewResult.selectionForeground",{dark:xt.white,light:"#6C6C6C",hcDark:xt.white,hcLight:Go},g("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Ol=pe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:xt.black,hcLight:xt.white},g("peekViewEditorBackground","Background color of the peek view editor.")),STe=pe("peekViewEditorGutter.background",{dark:Ol,light:Ol,hcDark:Ol,hcLight:Ol},g("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),CTe=pe("peekViewEditorStickyScroll.background",{dark:Ol,light:Ol,hcDark:Ol,hcLight:Ol},g("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),wTe=pe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},g("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),xTe=pe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},g("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),ETe=pe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:qo,hcLight:qo},g("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));be();Si();sn();qe();st();z2();it();wt();re();Tr();Bt();Ie();be();var mte=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Br=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=Sk.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;let t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?g({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,Tn(this.uri),this.range.startLineNumber,this.range.startColumn):g("aria.oneReference","in {0} on line {1} at column {2}",Tn(this.uri),this.range.startLineNumber,this.range.startColumn)}},$8=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:o-t}),c=new k(r,l.startColumn,r,o),d=new k(s,a,s,1073741824),h=n.getValueInRange(c).replace(/^\s+/,""),u=n.getValueInRange(e),m=n.getValueInRange(d).replace(/\s+$/,"");return{value:h+u+m,highlight:{start:h.length,end:h.length+u.length}}}},Ra=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new iI}dispose(){ei(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?g("aria.fileReferences.1","1 symbol in {0}, full path {1}",Tn(this.uri),this.uri.fsPath):g("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Tn(this.uri),this.uri.fsPath)}resolve(e){return mte(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new $8(n))}catch(n){Be(n)}return this})}},Pn=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Re,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let r;for(let o of e)if((!r||!$2.isEqual(r.uri,o.uri,!0))&&(r=new Ra(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new Br(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){ei(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?g("aria.result.0","No results found"):this.references.length===1?g("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?g("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):g("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.length,s=n.parent.groups.length;return s===1||t&&r+1<o||!t&&r>0?(t?r=(r+1)%o:r=(r+o-1)%o,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%s,n.parent.groups[r].children[0]):(r=(r+s-1)%s,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){let n=this.references.map((r,o)=>({idx:o,prefixLen:Xa(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLen<o.prefixLen?1:r.offsetDist<o.offsetDist?-1:r.offsetDist>o.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&k.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return $2.compare(e.uri,t.uri)||k.compareRangesUsingStarts(e.range,t.range)}};gt();Xd();wt();re();df();Tr();Ie();dn();an();G2();$r();Us();gt();re();Tr();Us();be();st();hn();var p5=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},f5=function(i,e){return function(t,n){e(t,n,i)}},c5=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Pn||e instanceof Ra}getChildren(e){if(e instanceof Pn)return e.groups;if(e instanceof Ra)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};c5=p5([f5(0,Vi)],c5);var d5=class{getHeight(){return 23}getTemplateId(e){return e instanceof Ra?du.id:hu.id}},h5=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Br){let n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Tn(e.uri)}};h5=p5([f5(0,mt)],h5);var u5=class{getId(e){return e instanceof Br?e.id:e.uri}},Y8=class extends Y{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new og(n,{supportHighlights:!0})),this.badge=new iA(oe(n,te(".count")),{},Tk),e.appendChild(n)}set(e,t){let n=Gd(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(g("referencesCount","{0} references",r)):this.badge.setTitleFormat(g("referenceCount","{0} reference",r))}};Y8=p5([f5(1,Qs)],Y8);var du=class $H{constructor(e){this._instantiationService=e,this.templateId=$H.id}renderTemplate(e){return this._instantiationService.createInstance(Y8,e)}renderElement(e,t,n){n.set(e.element,cc(e.filterData))}disposeTemplate(e){e.dispose()}};du.id="FileReferencesRenderer";du=p5([f5(0,Ce)],du);var X8=class{constructor(e){this.label=new Qk(e)}set(e,t){var n;let r=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!r||!r.value)this.label.set(`${Tn(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=r;t&&!Vs.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,cc(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},hu=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new X8(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}};hu.id="OneReferenceRenderer";var m5=class{getWidgetAriaLabel(){return g("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}};be();st();hn();ln();sj();var pte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Da=function(i,e){return function(t,n){e(t,n,i)}},YH=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},g5=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new W,this._callOnModelChange=new W,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));let t=[],n=[];for(let r=0,o=e.children.length;r<o;r++){let s=e.children[r];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:s.range,options:i.DecorationOptions}),n.push(r))}this._editor.changeDecorations(r=>{let o=r.deltaDecorations([],t);for(let s=0;s<o.length;s++)this._decorations.set(o[s],e.children[n[s]])})}_onDecorationChanged(){let e=[],t=this._editor.getModel();if(t){for(let[n,r]of this._decorations){let o=t.getDecorationRange(n);if(!o)continue;let s=!1;if(!k.equalsRange(o,r.range)){if(k.spansMultipleLines(o))s=!0;else{let a=r.range.endColumn-r.range.startColumn,l=o.endColumn-o.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(r.id),e.push(n)):r.range=o}}for(let n=0,r=e.length;n<r;n++)this._decorations.delete(e[n]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};g5.DecorationOptions=Ue.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});var _5=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,n;try{let r=JSON.parse(e);t=r.ratio,n=r.heightInLines}catch(r){}return{ratio:t||.7,heightInLines:n||18}}},Q8=class extends tA{},v5=class extends cu{constructor(e,t,n,r,o,s,a,l,c,d,h,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=n,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._languageService=h,this._languageConfigurationService=u,this._disposeOnNewModel=new W,this._callOnDispose=new W,this._onDidSelectReference=new Re,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Vt(0,0),this._applyTheme(r.getColorTheme()),this._callOnDispose.add(r.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),ei(this._preview),ei(this._previewNotAvailableMessage),ei(this._tree),ei(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){let t=e.getColor(qH)||xt.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(KH)||xt.transparent,primaryHeadingColor:e.getColor(a5),secondaryHeadingColor:e.getColor(l5)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=oe(e,te("div.messages")),ji(this._messageContainer),this._splitView=new eA(e,{orientation:1}),this._previewContainer=oe(e,te("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Fr,this._previewContainer,t,{},this.editor),ji(this._previewContainer),this._previewNotAvailableMessage=new Z2(g("missingPreviewMessage","no preview available"),Vd,Z2.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=oe(e,te("div.ref-tree.inline"));let n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new m5,keyboardNavigationLabelProvider:this._instantiationService.createInstance(h5),identityProvider:new u5,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:GH}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Vr(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Q8,"ReferencesWidget",this._treeContainer,new d5,[this._instantiationService.createInstance(du),this._instantiationService.createInstance(hu)],this._instantiationService.createInstance(c5),n),this._splitView.addView({onDidChange:Nt.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},v9.Distribute),this._splitView.addView({onDidChange:Nt.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},v9.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(o,s)=>{o instanceof Br&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),ji(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Vt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=g("noResults","No results"),rn(this._messageContainer),Promise.resolve(void 0)):(ji(this._messageContainer),this._decorationsManager=new g5(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{let{event:t,target:n}=e;if(t.detail!==2)return;let r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),rn(this._treeContainer),rn(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){let[e]=this._tree.getFocus();if(e instanceof Br)return e;if(e instanceof Ra&&e.children.length>0)return e.children[0]}revealReference(e){return YH(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return YH(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==po.inMemory?this.setTitle(mI(e.uri),this._uriLabel.getUriLabel(Gd(e.uri))):this.setTitle(g("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));let r=yield n;if(!this._model){r.dispose();return}ei(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=k.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};v5=pte([Da(3,Ki),Da(4,Vi),Da(5,Ce),Da(6,G8),Da(7,Qs),Da(8,uk),Da(9,mt),Da(10,li),Da(11,rt)],v5);var fte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},uu=function(i,e){return function(t,n){e(t,n,i)}},XH=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},id=new Ne("referenceSearchVisible",!1,g("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),Rs=class J8{static get(e){return e.getContribution(J8.ID)}constructor(e,t,n,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new W,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=id.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));let o="peekViewLayout",s=_5.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(v5,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(g("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:d}=l;if(c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(g("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,h=new ie(e.startLineNumber,e.startColumn),u=this._model.nearestReference(d,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return XH(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let r=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return XH(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;let r=k.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{let a=J8.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,Ht(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,Be(o)})}openReference(e,t,n){t||this.closeWidget();let{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Rs.ID="editor.contrib.referencesController";Rs=fte([uu(2,we),uu(3,_t),uu(4,ni),uu(5,Ce),uu(6,Ar),uu(7,nt)],Rs);function nd(i,e){let t=VH(i);if(!t)return;let n=Rs.get(t);n&&e(n)}Er.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:It(2089,60),when:G.or(id,Hi.inPeekEditor),handler(i){nd(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Er.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:G.or(id,Hi.inPeekEditor),handler(i){nd(i,e=>{e.goToNextOrPreviousReference(!0)})}});Er.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:G.or(id,Hi.inPeekEditor),handler(i){nd(i,e=>{e.goToNextOrPreviousReference(!1)})}});Je.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Je.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Je.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Je.registerCommand("closeReferenceSearch",i=>nd(i,e=>e.closeWidget()));Er.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:G.and(Hi.inPeekEditor,G.not("config.editor.stablePeek"))});Er.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:G.and(id,G.not("config.editor.stablePeek"))});Er.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:G.and(id,b9,y9.negate(),S9.negate()),handler(i){var e;let n=(e=i.get(sg).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Br&&nd(i,r=>r.revealReference(n[0]))}});Er.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:G.and(id,b9,y9.negate(),S9.negate()),handler(i){var e;let n=(e=i.get(sg).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Br&&nd(i,r=>r.openReference(n[0],!0,!0))}});Je.registerCommand("openReference",i=>{var e;let n=(e=i.get(sg).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Br&&nd(i,r=>r.openReference(n[0],!1,!0))});wt();re();Tr();Me();xn();Ie();be();qe();ac();st();hn();z2();var QH=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},km=function(i,e){return function(t,n){e(t,n,i)}},t6=new Ne("hasSymbols",!1,g("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Am=Jn("ISymbolNavigationService"),Z8=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=t6.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();let n=new e6(this._editorService),r=n.onDidChange(o=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,d=!1;for(let h of t.references)if(qd(h.uri,a.uri))c=!0,d=d||k.containsPosition(h.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=k2(n,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:k.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();let t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?g("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):g("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};Z8=QH([km(0,we),km(1,_t),km(2,ni),km(3,mt)],Z8);tr(Am,Z8,1);ge(new class extends ii{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:t6,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(Am).revealNext(e)}});Er.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:t6,primary:9,handler(i){i.get(Am).reset()}});var e6=class{constructor(e){this._listener=new Map,this._disposables=new W,this._onDidChange=new Re,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),ei(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,k2(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};e6=QH([km(0,_t)],e6);be();mi();Si();qe();st();mc();Rt();Gt();it();Me();ut();var i6=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function Lm(i,e,t,n){return i6(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(n(a,i,e)).then(void 0,l=>{bt(l)})),s=yield Promise.all(o);return Wo(s.flat())})}function rd(i,e,t,n){return Lm(e,t,i,(r,o,s)=>r.provideDefinition(o,s,n))}function n6(i,e,t,n){return Lm(e,t,i,(r,o,s)=>r.provideDeclaration(o,s,n))}function r6(i,e,t,n){return Lm(e,t,i,(r,o,s)=>r.provideImplementation(o,s,n))}function o6(i,e,t,n){return Lm(e,t,i,(r,o,s)=>r.provideTypeDefinition(o,s,n))}function Nm(i,e,t,n,r){return Lm(e,t,i,(o,s,a)=>i6(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!n||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return c&&c.length===1?c:l}))}function Rm(i){return i6(this,void 0,void 0,function*(){let e=yield i(),t=new Pn(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}Bn("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(le),r=rd(n.definitionProvider,e,t,ze.None);return Rm(()=>r)});Bn("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(le),r=o6(n.typeDefinitionProvider,e,t,ze.None);return Rm(()=>r)});Bn("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(le),r=n6(n.declarationProvider,e,t,ze.None);return Rm(()=>r)});Bn("_executeReferenceProvider",(i,e,t)=>{let n=i.get(le),r=Nm(n.referenceProvider,e,t,!1,ze.None);return Rm(()=>r)});Bn("_executeImplementationProvider",(i,e,t)=>{let n=i.get(le),r=r6(n.implementationProvider,e,t,ze.None);return Rm(()=>r)});ut();ef();var lo=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},s6,a6,l6,c6,d6,h6,u6,m6;qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextPeek,title:g("peek.submenu","Peek"),group:"navigation",order:100});var od=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||ie.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},co=class i extends Za{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let n of jr.wrap(t.menu))(n.id===ae.EditorContext||n.id===ae.EditorContextPeek)&&(n.when=G.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,r){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(ni),s=e.get(_t),a=e.get(Gs),l=e.get(Am),c=e.get(le),d=e.get(Ce),h=t.getModel(),u=t.getPosition(),m=od.is(n)?n:new od(h,u),p=new f1(t,5),f=kf(this._getLocationModel(c,m.model,m.position,p.token),p.token).then(_=>lo(this,void 0,void 0,function*(){var b;if(!_||p.token.isCancellationRequested)return;Kt(_.ariaMessage);let C;if(_.referenceAt(h.uri,u)){let w=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(w)&&i._allSymbolNavigationCommands.has(w)&&(C=i._allSymbolNavigationCommands.get(w))}let T=_.references.length;if(T===0){if(!this.configuration.muteMessage){let w=h.getWordAtPosition(u);(b=Xi.get(t))===null||b===void 0||b.showMessage(this._getNoResultFoundMessage(w),u)}}else if(T===1&&C)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(w=>C.runEditorCommand(w,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,_,r)}),_=>{o.error(_)}).finally(()=>{p.dispose()});return a.showWhile(f,250),f}_onResult(e,t,n,r,o){return lo(this,void 0,void 0,function*(){let s=this._getGoToPreference(n);if(!(n instanceof Fr)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r,o);else{let a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,n,r,o){return lo(this,void 0,void 0,function*(){let s;if(ok(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=yield t.openCodeEditor({resource:n.uri,options:{selection:k.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t,n){let r=Rs.get(e);r&&e.hasModel()?r.toggleWidget(n!=null?n:e.getSelection(),Ht(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};co._allSymbolNavigationCommands=new Map;co._activeAlternativeCommands=new Set;var Ma=class extends co{_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield rd(e.definitionProvider,t,n,r),g("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("noResultWord","No definition found for '{0}'",e.word):g("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}},JH=rf&&!dT()?2118:70;Ft((s6=class p6 extends Ma{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:p6.id,title:{value:g("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:g({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:G.and(I.hasDefinitionProvider,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:JH,weight:100},menu:[{id:ae.EditorContext,group:"navigation",order:1.1},{id:ae.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Je.registerCommandAlias("editor.action.goToDeclaration",p6.id)}},s6.id="editor.action.revealDefinition",s6));Ft((a6=class f6 extends Ma{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:f6.id,title:{value:g("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:G.and(I.hasDefinitionProvider,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:It(2089,JH),weight:100}}),Je.registerCommandAlias("editor.action.openDeclarationToTheSide",f6.id)}},a6.id="editor.action.revealDefinitionAside",a6));Ft((l6=class g6 extends Ma{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:g6.id,title:{value:g("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:G.and(I.hasDefinitionProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:ae.EditorContextPeek,group:"peek",order:2}}),Je.registerCommandAlias("editor.action.previewDeclaration",g6.id)}},l6.id="editor.action.peekDefinition",l6));var b5=class extends co{_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield n6(e.declarationProvider,t,n,r),g("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}};Ft((c6=class ZH extends b5{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ZH.id,title:{value:g("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:g({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:G.and(I.hasDeclarationProvider,I.isInWalkThroughSnippet.toNegated()),menu:[{id:ae.EditorContext,group:"navigation",order:1.3},{id:ae.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}},c6.id="editor.action.revealDeclaration",c6));Ft(class extends b5{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:g("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:G.and(I.hasDeclarationProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),menu:{id:ae.EditorContextPeek,group:"peek",order:3}})}});var y5=class extends co{_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield o6(e.typeDefinitionProvider,t,n,r),g("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):g("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}};Ft((d6=class eB extends y5{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:eB.ID,title:{value:g("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:g({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:G.and(I.hasTypeDefinitionProvider,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:0,weight:100},menu:[{id:ae.EditorContext,group:"navigation",order:1.4},{id:ae.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},d6.ID="editor.action.goToTypeDefinition",d6));Ft((h6=class tB extends y5{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tB.ID,title:{value:g("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:G.and(I.hasTypeDefinitionProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),menu:{id:ae.EditorContextPeek,group:"peek",order:4}})}},h6.ID="editor.action.peekTypeDefinition",h6));var S5=class extends co{_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield r6(e.implementationProvider,t,n,r),g("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):g("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}};Ft((u6=class iB extends S5{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:iB.ID,title:{value:g("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:g({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:G.and(I.hasImplementationProvider,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:2118,weight:100},menu:[{id:ae.EditorContext,group:"navigation",order:1.45},{id:ae.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},u6.ID="editor.action.goToImplementation",u6));Ft((m6=class nB extends S5{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:nB.ID,title:{value:g("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:G.and(I.hasImplementationProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:3142,weight:100},menu:{id:ae.EditorContextPeek,group:"peek",order:5}})}},m6.ID="editor.action.peekImplementation",m6));var C5=class extends co{_getNoResultFoundMessage(e){return e?g("references.no","No references found for '{0}'",e.word):g("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}};Ft(class extends C5{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:g("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:g({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:G.and(I.hasReferenceProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),keybinding:{when:I.editorTextFocus,primary:1094,weight:100},menu:[{id:ae.EditorContext,group:"navigation",order:1.45},{id:ae.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield Nm(e.referenceProvider,t,n,!0,r),g("ref.title","References"))})}});Ft(class extends C5{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:g("references.action.label","Peek References"),original:"Peek References"},precondition:G.and(I.hasReferenceProvider,Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated()),menu:{id:ae.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(yield Nm(e.referenceProvider,t,n,!1,r),g("ref.title","References"))})}});var _6=class extends co{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:g("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:G.and(Hi.notInPeekEditor,I.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return lo(this,void 0,void 0,function*(){return new Pn(this._references,g("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&g("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}};Je.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Qe},{name:"position",description:"The position at which to start",constraint:ie.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(i,e,t,n,r,o,s)=>lo(void 0,void 0,void 0,function*(){ot(Qe.isUri(e)),ot(ie.isIPosition(t)),ot(Array.isArray(n)),ot(typeof r=="undefined"||typeof r=="string"),ot(typeof s=="undefined"||typeof s=="boolean");let a=i.get(_t),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(d9(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends _6{_getNoResultFoundMessage(h){return o||super._getNoResultFoundMessage(h)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(Ce).invokeFunction(d.run.bind(d),l)})})});Je.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Qe},{name:"position",description:"The position at which to start",constraint:ie.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(i,e,t,n,r)=>lo(void 0,void 0,void 0,function*(){i.get(Pt).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})});Je.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{ot(Qe.isUri(e)),ot(ie.isIPosition(t));let n=i.get(le),r=i.get(_t);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!d9(o)||!o.hasModel())return;let s=Rs.get(o);if(!s)return;let a=Ht(c=>Nm(n.referenceProvider,o.getModel(),ie.lift(t),!1,c).then(d=>new Pn(d,g("ref.title","References")))),l=new k(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});Je.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");ct();it();re();ti();g1();Me();Ie();$r();Us();wt();re();yn();function v6(i,e){return!!i[e]}var Dm=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=v6(e.event,t.triggerModifier),this.hasSideBySideModifier=v6(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},w5=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=v6(e,t.triggerModifier)}},mu=class{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};function rB(i){return i==="altKey"?Ui?new mu(57,"metaKey",6,"altKey"):new mu(5,"ctrlKey",6,"altKey"):Ui?new mu(6,"altKey",57,"metaKey"):new mu(6,"altKey",5,"ctrlKey")}var Ds=class extends Y{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Re),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Re),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Re),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=rB(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){let r=rB(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Dm(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Dm(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Dm(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new w5(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new w5(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){let t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}};be();qe();ut();dn();var gte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},b6=function(i,e){return function(t,n){e(t,n,i)}},oB=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Pl=class x5{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new W,this.toUnhookForKeyboard=new W,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new Ds(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,Wi(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{Be(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(x5.ID)}startFindDefinitionFromCursor(e){return oB(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return oB(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;let r=new jf(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ht(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){Be(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?k.lift(o[0].originSelectionRange):new k(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=k.plusRange(a,l));this.addDecoration(a,new pi().appendText(g("multipleResults","Click to show {0} definitions.",o.length)))}else{let a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}let{object:{textEditorModel:c}}=l,{startLineNumber:d}=a.range;if(d<1||d>c.getLineCount()){l.dispose();return}let h=this.getPreviewValue(c,d,a),u=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,h?new pi().appendCodeblock(u||"",h):void 0),l.dispose()})}})}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=x5.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<n.endLineNumber;a++){let l=e.getLineFirstNonWhitespaceColumn(a);o=Math.min(o,l)}return e.getValueInRange(n).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let n=e.getLineFirstNonWhitespaceColumn(t),r=Math.min(e.getLineCount(),t+x5.MAX_SOURCE_PREVIEW_LINES),o=t+1;for(;o<r;o++){let s=e.getLineFirstNonWhitespaceColumn(o);if(n===s)break}return new k(t,1,o+1,1)}addDecoration(e,t){let n={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([n])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var n;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((n=e.target.detail.injectedText)===null||n===void 0?void 0:n.options)instanceof nh)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let n=this.editor.getModel();return n?rd(this.languageFeaturesService.definitionProvider,n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(n=>{let r=!t&&this.editor.getOption(85)&&!this.isInPeekEditor(n);return new Ma({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(we);return Hi.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};Pl.ID="editor.contrib.gotodefinitionatposition";Pl.MAX_SOURCE_PREVIEW_LINES=8;Pl=gte([b6(1,Vi),b6(2,li),b6(3,le)],Pl);Se(Pl.ID,Pl,2);on();re();Me();xn();St();Ie();ht();Rt();wt();re();rT();Bt();Cn();Ie();ac();st();sn();var sB=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},E5=function(i,e){return function(t,n){e(t,n,i)}},T5=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},y6=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Re,this.onDidChange=this._onDidChange.event,this._dispoables=new W,this._markers=[],this._nextIdx=-1,Qe.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=P2(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=k.compareRangesUsingStarts(a,l)||Mi.compare(a.severity,l.severity):c=Mi.compare(a.severity,l.severity)||k.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:Qe.isUri(e)?e:void 0,severities:Mi.Error|Mi.Warning|Mi.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new T5(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=sc(this._markers,{resource:e.uri},(s,a)=>P2(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=k.lift(this._markers[s]);if(a.isEmpty()){let l=e.getWordAtPosition(a.getStartPosition());l&&(a=new k(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,r=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}r||(this._nextIdx=n?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,n){if(this._markers.length===0)return!1;let r=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,n,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),r!==this._nextIdx}find(e,t){let n=this._markers.findIndex(r=>r.resource.toString()===e.toString());if(!(n<0)){for(;n<this._markers.length;n++)if(k.containsPosition(this._markers[n],t))return new T5(this._markers[n],n+1,this._markers.length)}}};y6=sB([E5(1,v1),E5(2,nt)],y6);var C6=Jn("IMarkerNavigationService"),S6=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new nf}getMarkerList(e){for(let t of this._provider){let n=t.getMarkerList(e);if(n)return n}return new y6(e,this._markerService,this._configService)}};S6=sB([E5(0,v1),E5(1,nt)],S6);tr(C6,S6,1);be();mi();qe();st();gt();Rt();Xd();wt();re();Tr();Bt();Ie();be();mi();qe();st();Xr();on();Zn();var I5;(function(i){function e(t){switch(t){case _1.Ignore:return"severity-ignore "+Ve.asClassName(De.info);case _1.Info:return Ve.asClassName(De.info);case _1.Warning:return Ve.asClassName(De.warning);case _1.Error:return Ve.asClassName(De.error);default:return""}}i.className=e})(I5||(I5={}));kn();ln();var _te=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pu=function(i,e){return function(t,n){e(t,n,i)}},w6=class{constructor(e,t,n,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new W,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(Vr(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new xk(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){ei(this._disposables)}update(e){let{source:t,message:n,relatedInformation:r,code:o}=e,s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);let a=nc(n);this._lines=a.length,this._longestLineLength=0;for(let u of a)this._longestLineLength=Math.max(u.length+s,this._longestLineLength);nn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){let m=document.createElement("span");m.innerText=t,m.classList.add("source"),u.appendChild(m)}if(o)if(typeof o=="string"){let m=document.createElement("span");m.innerText=`(${o})`,m.classList.add("code"),u.appendChild(m)}else{this._codeLink=te("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(o.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};let m=oe(this._codeLink,te("span"));m.innerText=o.value,u.appendChild(this._codeLink)}}if(nn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Xt(r)){let u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(let m of r){let p=document.createElement("div"),f=document.createElement("a");f.classList.add("filename"),f.innerText=`${this._labelService.getUriBasenameLabel(m.resource)}(${m.startLineNumber}, ${m.startColumn}): `,f.title=this._labelService.getUriLabel(m.resource),this._relatedDiagnostics.set(f,m);let _=document.createElement("span");_.innerText=m.message,p.appendChild(f),p.appendChild(_),this._lines+=1,u.appendChild(p)}}let c=this._editor.getOption(48),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Mi.Error:t=g("Error","Error");break;case Mi.Warning:t=g("Warning","Warning");break;case Mi.Info:t=g("Info","Info");break;case Mi.Hint:t=g("Hint","Hint");break}let n=g("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(n=`${r.getLineContent(e.startLineNumber)}, ${n}`),n}},sd=class dB extends cu{constructor(e,t,n,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=n,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new W,this._onDidSelectRelatedInformation=new Re,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Mi.Warning,this._backgroundColor=xt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Ste);let t=x6,n=vte;this._severity===Mi.Warning?(t=k5,n=bte):this._severity===Mi.Info&&(t=E6,n=yte);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(a5),secondaryHeadingColor:e.getColor(l5)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(r=>this.editor.focus()));let t=[],n=this._menuService.createMenu(dB.TitleMenu,this._contextKeyService);ig(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=oe(e,te(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new w6(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=k.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?g("problems","{0} of {1} problems",t,n):g("change","{0} of {1} problem",t,n);this.setTitle(Tn(a.uri),l)}this._icon.className=`codicon ${I5.className(Mi.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};sd.TitleMenu=new ae("gotoErrorTitleMenu");sd=_te([pu(1,Ki),pu(2,ci),pu(3,go),pu(4,Ce),pu(5,we),pu(6,Qs)],sd);var aB=Ff(NI,RI),lB=Ff(DI,MI),cB=Ff(n1,OI),x6=pe("editorMarkerNavigationError.background",{dark:aB,light:aB,hcDark:Yr,hcLight:Yr},g("editorMarkerNavigationError","Editor marker navigation widget error color.")),vte=pe("editorMarkerNavigationError.headerBackground",{dark:In(x6,.1),light:In(x6,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),k5=pe("editorMarkerNavigationWarning.background",{dark:lB,light:lB,hcDark:Yr,hcLight:Yr},g("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),bte=pe("editorMarkerNavigationWarning.headerBackground",{dark:In(k5,.1),light:In(k5,.1),hcDark:"#0C141F",hcLight:In(k5,.2)},g("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),E6=pe("editorMarkerNavigationInfo.background",{dark:cB,light:cB,hcDark:Yr,hcLight:Yr},g("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),yte=pe("editorMarkerNavigationInfo.headerBackground",{dark:In(E6,.1),light:In(E6,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Ste=pe("editorMarkerNavigation.background",{dark:r1,light:r1,hcDark:r1,hcLight:r1},g("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Cte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},A5=function(i,e){return function(t,n){e(t,n,i)}},hB=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Oa=class L5{static get(e){return e.getContribution(L5.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new W,this._editor=e,this._widgetVisible=uB.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(sd,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!k.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:k.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ie(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,r;return hB(this,void 0,void 0,function*(){if(this._editor.hasModel()){let o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((n=L5.get(s))===null||n===void 0||n.close(),(r=L5.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};Oa.ID="editor.contrib.markerController";Oa=Cte([A5(1,C6),A5(2,we),A5(3,_t),A5(4,Ce)],Oa);var fu=class extends K{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return hB(this,void 0,void 0,function*(){t.hasModel()&&((n=Oa.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}},ad=class i extends fu{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:578,weight:100},menuOpts:{menuId:sd.TitleMenu,title:i.LABEL,icon:Qt("marker-navigation-next",De.arrowDown,g("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};ad.ID="editor.action.marker.next";ad.LABEL=g("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");var Mm=class i extends fu{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:1602,weight:100},menuOpts:{menuId:sd.TitleMenu,title:i.LABEL,icon:Qt("marker-navigation-previous",De.arrowUp,g("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};Mm.ID="editor.action.marker.prev";Mm.LABEL=g("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");var T6=class extends fu{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:g("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:66,weight:100},menuOpts:{menuId:ae.MenubarGoMenu,title:g({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},I6=class extends fu{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:g("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:1090,weight:100},menuOpts:{menuId:ae.MenubarGoMenu,title:g({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Se(Oa.ID,Oa,4);F(ad);F(Mm);F(T6);F(I6);var uB=new Ne("markersNavigationVisible",!1),wte=ii.bindToContribution(Oa.get);ge(new wte({id:"closeMarkersNavigation",precondition:uB,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:I.focus,primary:9,secondary:[1033]}}));Bs();re();Me();Ie();ht();$r();gt();gt();pT();re();var N5=te,gu=class extends Y{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new oh(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},R5=class i extends Y{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=oe(e,N5("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=oe(this.actionContainer,N5("a.action")),this.action.setAttribute("role","button"),t.iconClass&&oe(this.action,N5(`span.icon.${t.iconClass}`));let r=oe(this.action,N5("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(jt(this.actionContainer,Qn.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(jt(this.actionContainer,Qn.KEY_DOWN,o=>{let s=new lf(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}};Rt();re();St();Ie();dn();cn();ct();it();wt();re();var xte=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ete=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},k6=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},_u=class extends Y{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Re),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new kt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new kt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new kt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=_I(e=>this._computer.computeAsync(e)),xte(this,void 0,void 0,function*(){var e,t,n,r;try{try{for(var o=!0,s=Ete(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;let l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){Be(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new k6(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(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();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}};qe();st();hn();ct();ht();var M6=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},D5=function(i,e){return function(t,n){e(t,n,i)}},mB=te,Om=class A6 extends Y{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(Fl,this._editor)),this._currentResult=null,this._participants=[];for(let r of Ao.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new D6(this._editor,this._participants),this._hoverOperation=this._register(new _u(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;let o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new M5(this._computer.anchor,o,r.isComplete))})),this._register(Vr(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(ih.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){let t=[];for(let r of this._participants)if(r.suggestHoverAnchor){let o=r.suggestHoverAnchor(e);o&&t.push(o)}let n=e.target;if(n.type===6&&t.push(new Xh(0,n.range,e.event.posx,e.event.posy)),n.type===7){let r=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToText<r&&t.push(new Xh(0,n.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((r,o)=>o.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,r){this._startShowingOrUpdateHover(new Xh(0,e,void 0,void 0),t,n,r,null)}_startShowingOrUpdateHover(e,t,n,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,r,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(let t of this._participants)if(t.createLoadingMessage){let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){let{showAtPosition:n,showAtSecondaryPosition:r,highlightRange:o}=A6.computeHoverRanges(this._editor,e.range,t),s=new W,a=s.add(new R6(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:u=>c=u,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(let u of this._participants){let m=t.filter(p=>p.owner===u);m.length>0&&s.add(u.renderHoverParts(d,m))}let h=t.some(u=>u.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){let u=this._editor.createDecorationsCollection();u.set([{range:o,options:A6._DECORATION_OPTIONS}]),s.add(ft(()=>{u.clear()}))}this._widget.showAt(l,new N6(c,n,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,h,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,n){let r=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,h=d.convertModelRangeToViewRange(t),u=new ie(h.startLineNumber,c.getLineMinColumn(h.startLineNumber));r=d.convertViewPositionToModelPosition(u).column}let o=t.startLineNumber,s=t.startColumn,a=n[0].range,l=null;for(let c of n)a=k.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),r)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new ie(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new ie(o,s),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};Om._DECORATION_OPTIONS=Ue.register({description:"content-hover-highlight",className:"hoverHighlight"});Om=M6([D5(1,Ce),D5(2,mt)],Om);var M5=class{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){let t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new L6(this,this.anchor,t,this.isComplete)}},L6=class extends M5{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},N6=class{constructor(e,t,n,r,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},Fl=class fB extends Y{get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=I.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=I.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new gu),this._focusTracker=this._register(zs(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return fB.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(Le.Visible.key)&&(e=!0);let t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX=="undefined"||typeof this._visibleData.initialMousePosY=="undefined")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;let n=wn(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=pB(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));let r=pB(e,t,n.left,n.top,n.width,n.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!0)}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){let e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){var n;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout()}hide(){if(this._visibleData){let e=this._visibleData.stoleFocus;this._setVisibleData(null),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();let e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){let n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-this._horizontalScrollingBy})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+this._horizontalScrollingBy})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};Fl.ID="editor.contrib.contentHoverWidget";Fl=M6([D5(1,we)],Fl);var R6=class extends Y{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=mB("div.hover-row.status-bar"),this.actionsElement=oe(this.hoverElement,mB("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(R5.render(this.actionsElement,e,n))}append(e){let t=oe(this.actionsElement,e);return this._hasContent=!0,t}};R6=M6([D5(0,mt)],R6);var D6=class i{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let o=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return ir.EMPTY;let n=i._getLineDecorations(this._editor,t);return ir.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):ir.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return Wo(t)}};function pB(i,e,t,n,r,o){let s=t+r/2,a=n+o/2,l=Math.max(Math.abs(i-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}gt();Rt();re();var gB=te,ld=class i extends Y{constructor(e,t,n){super(),this._renderDisposeables=this._register(new W),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new gu),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Gn({editor:this._editor},t,n)),this._computer=new O6(this._editor),this._hoverOperation=this._register(new _u(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let r of t){let o=gB("div.hover-row.markdown-hover"),s=oe(o,gB("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(64),s=this._hover.containerDomNode.clientHeight,a=n-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}};ld.ID="editor.contrib.modesGlyphHoverWidget";var O6=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(let r of t){if(!r.options.glyphMarginClassName)continue;let o=r.options.glyphMarginHoverMessage;!o||nl(o)||n.push(...yf(o).map(e))}return n}};be();st();Xr();kn();ln();gt();Rt();ct();re();St();Ie();$r();ct();Gt();it();Me();ut();var Tte=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},P6=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};function Ite(i,e,t,n,r){return Tte(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,n,r));if(o&&Ate(o))return new P6(i,o,e)}catch(o){bt(o)}})}function Pm(i,e,t,n){let o=i.ordered(e).map((s,a)=>Ite(s,a,e,t,n));return ir.fromPromises(o).coalesce()}function kte(i,e,t,n){return Pm(i,e,t,n).map(r=>r.hover).toPromise()}Bn("_executeHoverProvider",(i,e,t)=>{let n=i.get(le);return kte(n.hoverProvider,e,t,ze.None)});function Ate(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}be();sn();Xr();ut();var Lte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O5=function(i,e){return function(t,n){e(t,n,i)}},_B=te,$n=class{constructor(e,t,n,r,o){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},vu=class{constructor(e,t,n,r,o){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new $n(this,e.range,[new pi().appendText(g("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[],a=1e3,l=n.getLineLength(r),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(113),h=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),u=!1;d>=0&&l>d&&e.range.startColumn>=d&&(u=!0,s.push(new $n(this,e.range,[{value:g("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!u&&typeof h=="number"&&l>=h&&s.push(new $n(this,e.range,[{value:g("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let m=!1;for(let p of t){let f=p.range.startLineNumber===r?p.range.startColumn:1,_=p.range.endLineNumber===r?p.range.endColumn:o,b=p.options.hoverMessage;if(!b||nl(b))continue;p.options.beforeContentClassName&&(m=!0);let C=new k(e.range.startLineNumber,f,e.range.startLineNumber,_);s.push(new $n(this,C,yf(b),m,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return ir.EMPTY;let r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return ir.EMPTY;let o=new ie(e.range.startLineNumber,e.range.startColumn);return Pm(this._languageFeaturesService.hoverProvider,r,o,n).filter(s=>!nl(s.hover.contents)).map(s=>{let a=s.hover.range?k.lift(s.hover.range):e.range;return new $n(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return F6(e,t,this._editor,this._languageService,this._openerService)}};vu=Lte([O5(1,li),O5(2,ci),O5(3,nt),O5(4,le)],vu);function F6(i,e,t,n,r){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new W;for(let s of e)for(let a of s.contents){if(nl(a))continue;let l=_B("div.hover-row.markdown-hover"),c=oe(l,_B("div.hover-contents")),d=o.add(new Gn({editor:t},n,r));o.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",i.onContentsChanged()}));let h=o.add(d.render(a));c.appendChild(h.element),i.fragment.appendChild(l)}return o}gt();Rt();ct();it();re();Tr();Ie();ut();be();Xr();mc();var Nte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},H6=function(i,e){return function(t,n){e(t,n,i)}},ho=te,B6=class{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},vB={type:1,filter:{include:Ee.QuickFix},triggerAction:Yi.QuickFixHover},P5=class{constructor(e,t,n,r){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[];for(let a of t){let l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(n.uri,a);if(!d)continue;let h=new k(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new B6(this,h,d))}return s}renderHoverParts(e,t){if(!t.length)return Y.None;let n=new W;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));let r=t.length===1?t[0]:t.sort((o,s)=>Mi.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),n}renderMarkerHover(e,t){let n=ho("div.hover-row"),r=oe(n,ho("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=oe(r,ho("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ho("span");if(o){let p=oe(d,ho("span"));p.innerText=o}let h=oe(d,ho("a.code-link"));h.setAttribute("href",a.target.toString()),t.add(jt(h,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));let u=oe(h,ho("span"));u.innerText=a.value;let m=oe(r,d);m.style.opacity="0.6",m.style.paddingLeft="6px"}else{let d=oe(r,ho("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Xt(l))for(let{message:d,resource:h,startLineNumber:u,startColumn:m}of l){let p=oe(r,ho("div"));p.style.marginTop="8px";let f=oe(p,ho("a"));f.innerText=`${Tn(h)}(${u}, ${m}): `,f.style.cursor="pointer",t.add(jt(f,"click",b=>{b.stopPropagation(),b.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:m}}}).catch(Be)}));let _=oe(p,ho("span"));_.innerText=d,this._editor.applyFontInfo(_)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Mi.Error||t.marker.severity===Mi.Warning||t.marker.severity===Mi.Info)&&e.statusBar.addAction({label:g("view problem","View Problem"),commandId:ad.ID,run:()=>{var r;e.hide(),(r=Oa.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){let r=e.statusBar.append(ho("div"));this.recentMarkerCodeActionsInfo&&(o9.makeKey(this.recentMarkerCodeActionsInfo.marker)===o9.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=g("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Y.None:n.add(dc(()=>r.textContent=g("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);n.add(ft(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=g("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(ft(()=>{l||a.dispose()})),e.statusBar.addAction({label:g("quick fixes","Quick Fix..."),commandId:Wh,run:c=>{l=!0;let d=ys.get(this._editor),h=wn(c);e.hide(),d==null||d.showCodeActions(vB,a,{x:h.left,y:h.top,width:h.width,height:h.height})}})},Be)}}getCodeActions(e){return Ht(t=>T0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),vB,Qo.None,t))}};P5=Nte([H6(1,Gk),H6(2,ci),H6(3,le)],P5);hn();var Rte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F5=function(i,e){return function(t,n){e(t,n,i)}},Fn=class bB{static get(e){return e.getContribution(bB.ID)}constructor(e,t,n,r,o){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=r,this._keybindingService=o,this._toUnhook=new W,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(58);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;let t=e.target;if(t.type===9&&t.detail===Fl.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===ld.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;let n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(n)||this._hideWidgets()}_onEditorMouseMove(e){var t,n,r,o,s,a,l,c;let d=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&d.type===9&&d.detail===Fl.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((o=(r=e.event.browserEvent.view)===null||r===void 0?void 0:r.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&d.type===9&&d.detail===Fl.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible())||this._isHoverSticky&&d.type===12&&d.detail===ld.ID||this._isHoverSticky&&(!((a=this._contentWidget)===null||a===void 0)&&a.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(l=this._glyphWidget)===null||l===void 0||l.hide();return}if(d.type===2&&d.position){(c=this._contentWidget)===null||c===void 0||c.hide(),this._glyphWidget||(this._glyphWidget=new ld(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(d.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||Do.dropDownVisible||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Om,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,n,r){this._getOrCreateContentWidget().startShowingAtRange(e,t,n,r)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}escape(){var e;(e=this._contentWidget)===null||e===void 0||e.escape()}isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible()}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Fn.ID="editor.contrib.hover";Fn=Rte([F5(1,Ce),F5(2,ci),F5(3,li),F5(4,mt)],Fn);var z6=class extends K{constructor(){super({id:"editor.action.showHover",label:g({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=Fn.get(t);if(!r)return;let o=t.getPosition(),s=new k(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(n!=null&&n.focus);r.isHoverVisible()?r.focus():r.showContentHover(s,1,1,a)}},U6=class extends K{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:g({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let n=Fn.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new k(r.lineNumber,r.column,r.lineNumber,r.column),s=Pl.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},W6=class extends K{constructor(){super({id:"editor.action.scrollUpHover",label:g({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:16,weight:100}})}run(e,t){let n=Fn.get(t);n&&n.scrollUp()}},j6=class extends K{constructor(){super({id:"editor.action.scrollDownHover",label:g({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:18,weight:100}})}run(e,t){let n=Fn.get(t);n&&n.scrollDown()}},V6=class extends K{constructor(){super({id:"editor.action.scrollLeftHover",label:g({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:15,weight:100}})}run(e,t){let n=Fn.get(t);n&&n.scrollLeft()}},K6=class extends K{constructor(){super({id:"editor.action.scrollRightHover",label:g({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:17,weight:100}})}run(e,t){let n=Fn.get(t);n&&n.scrollRight()}},q6=class extends K{constructor(){super({id:"editor.action.pageUpHover",label:g({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let n=Fn.get(t);n&&n.pageUp()}},G6=class extends K{constructor(){super({id:"editor.action.pageDownHover",label:g({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let n=Fn.get(t);n&&n.pageDown()}},$6=class extends K{constructor(){super({id:"editor.action.goToTopHover",label:g({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let n=Fn.get(t);n&&n.goToTop()}},Y6=class extends K{constructor(){super({id:"editor.action.goToBottomHover",label:g({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let n=Fn.get(t);n&&n.goToBottom()}},X6=class extends K{constructor(){super({id:"editor.action.escapeFocusHover",label:g({key:"escapeFocusHover",comment:["Action that allows to escape from the hover widget with the escape command when the hover widget is focused."]},"Escape Focus Hover"),alias:"Escape Focus Hover",precondition:I.hoverFocused,kbOpts:{kbExpr:I.hoverFocused,primary:9,weight:100}})}run(e,t){let n=Fn.get(t);n&&n.escape()}};Se(Fn.ID,Fn,2);F(z6);F(U6);F(W6);F(j6);F(V6);F(K6);F(q6);F(G6);F($6);F(Y6);F(X6);Ao.register(vu);Ao.register(P5);eh((i,e)=>{let t=i.getColor(KI);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});re();Bt();Me();Zo();Ie();Di();ht();an();Ya();function vn(i,e){let t=0;for(let n=0;n<i.length;n++)i.charAt(n)===" "?t+=e:t++;return t}function cd(i,e,t){i=i<0?0:i;let n="";if(!t){let r=Math.floor(i/e);i=i%e;for(let o=0;o<r;o++)n+=" "}for(let r=0;r<i;r++)n+=" ";return n}be();VW();var Dte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Mte=function(i,e){return function(t,n){e(t,n,i)}};function SB(i,e,t,n,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,i.getLineCount());t<=n&&o.unIndentedLinePattern;){let _=i.getLineContent(t);if(!o.unIndentedLinePattern.test(_))break;t++}if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(_,b)=>(b=b||1,tl.shiftIndent(_,_.length+b,s,a,l)),d=(_,b)=>(b=b||1,tl.unshiftIndent(_,_.length+b,s,a,l)),h=[],u,m=i.getLineContent(t),p=m;if(r!=null){u=r;let _=Yt(m);p=u+m.substring(_.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(p)&&(u=d(u),p=u+m.substring(_.length)),m!==p&&h.push(at.replaceMove(new ye(t,1,t,_.length+1),j2(u,a,l)))}else u=Yt(m);let f=u;o.increaseIndentPattern&&o.increaseIndentPattern.test(p)?(f=c(f),u=c(u)):o.indentNextLinePattern&&o.indentNextLinePattern.test(p)&&(f=c(f)),t++;for(let _=t;_<=n;_++){let b=i.getLineContent(_),C=Yt(b),T=f+b.substring(C.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(T)&&(f=d(f),u=d(u)),C!==f&&h.push(at.replaceMove(new ye(_,1,_,C.length+1),j2(f,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(b))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(T)?(u=c(u),f=u):o.indentNextLinePattern&&o.indentNextLinePattern.test(T)?f=c(f):f=u)}return h}var H5=class i extends K{constructor(){super({id:i.ID,label:g("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:I.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new ew(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};H5.ID="editor.action.indentationToSpaces";var B5=class i extends K{constructor(){super({id:i.ID,label:g("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:I.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new tw(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};B5.ID="editor.action.indentationToTabs";var Fm=class extends K{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(nr),r=e.get(Ri),o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(d=>({id:d.toString(),label:d.toString(),description:d===s.tabSize&&d===a.tabSize?g("configuredTabSize","Configured Tab Size"):d===s.tabSize?g("defaultTabSize","Default Tab Size"):d===a.tabSize?g("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:g({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(d=>{if(d&&o&&!o.isDisposed()){let h=parseInt(d.label,10);this.displaySizeOnly?o.updateOptions({tabSize:h}):o.updateOptions({tabSize:h,indentSize:h,insertSpaces:this.insertSpaces})}})},50)}},z5=class i extends Fm{constructor(){super(!1,!1,{id:i.ID,label:g("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};z5.ID="editor.action.indentUsingTabs";var U5=class i extends Fm{constructor(){super(!0,!1,{id:i.ID,label:g("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};U5.ID="editor.action.indentUsingSpaces";var W5=class i extends Fm{constructor(){super(!0,!0,{id:i.ID,label:g("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};W5.ID="editor.action.changeTabDisplaySize";var j5=class i extends K{constructor(){super({id:i.ID,label:g("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let n=e.get(Ri),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};j5.ID="editor.action.detectIndentation";var Q6=class extends K{constructor(){super({id:"editor.action.reindentlines",label:g("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:I.writable})}run(e,t){let n=e.get(rt),r=t.getModel();if(!r)return;let o=SB(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},J6=class extends K{constructor(){super({id:"editor.action.reindentselectedlines",label:g("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:I.writable})}run(e,t){let n=e.get(rt),r=t.getModel();if(!r)return;let o=t.getSelections();if(o===null)return;let s=[];for(let a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let d=SB(r,n,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},Z6=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let r of this._edits)t.addEditOperation(k.lift(r.range),r.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},Hm=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new W,this.callOnModel=new W,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(10)<4||this.editor.getOption(53))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(10),{tabSize:o,indentSize:s,insertSpaces:a}=n.getOptions(),l=[],c={shiftIndent:m=>tl.shiftIndent(m,m.length+1,o,s,a),unshiftIndent:m=>tl.unshiftIndent(m,m.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let h=n.getLineContent(d);if(!/\S/.test(h.substring(0,e.startColumn-1))){let m=lc(r,n,n.getLanguageId(),d,c,this._languageConfigurationService);if(m!==null){let p=Yt(h),f=vn(m,o),_=vn(p,o);if(f!==_){let b=cd(f,o,a);l.push({range:new k(d,1,d,p.length+1),text:b}),h=b+h.substr(p.length)}else{let b=xf(n,d,this._languageConfigurationService);if(b===0||b===8)return}}}let u=d;for(;d<e.endLineNumber;){if(!/\S/.test(n.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let p=lc(r,{tokenization:{getLineTokens:f=>n.tokenization.getLineTokens(f),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(f,_)=>n.getLanguageIdAtPosition(f,_)},getLineContent:f=>f===u?h:n.getLineContent(f)},n.getLanguageId(),d+1,c,this._languageConfigurationService);if(p!==null){let f=vn(p,o),_=vn(Yt(n.getLineContent(d+1)),o);if(f!==_){let b=f-_;for(let C=d+1;C<=e.endLineNumber;C++){let T=n.getLineContent(C),w=Yt(T),O=vn(w,o)+b,D=cd(O,o,a);D!==w&&l.push({range:new k(C,1,C,w.length+1),text:D})}}}}if(l.length>0){this.editor.pushUndoStop();let m=new Z6(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",m),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let r=e.tokenization.getLineTokens(t);if(r.getCount()>0){let o=r.findTokenIndexAtOffset(n);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Hm.ID="editor.contrib.autoIndentOnPaste";Hm=Dte([Mte(1,rt)],Hm);function CB(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s<t;s++)r+=" ";let o=new RegExp(r,"gi");for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineFirstNonWhitespaceColumn(s);if(l===0&&(l=i.getLineMaxColumn(s)),l===1)continue;let c=new k(s,1,s,l),d=i.getValueInRange(c),h=n?d.replace(/\t/ig,r):d.replace(o," ");e.addEditOperation(c,h)}}var ew=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),CB(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},tw=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),CB(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Se(Hm.ID,Hm,2);F(H5);F(B5);F(z5);F(U5);F(W5);F(j5);F(Q6);F(J6);Me();gt();Rt();ct();Gt();it();re();ti();Cn();c9();Zo();Ie();cn();rl();dn();ut();Us();it();re();St();Ie();df();Cn();var V5=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Bm=class{constructor(e,t){this.range=e,this.direction=t}},iw=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return V5(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return V5(this,void 0,void 0,function*(){try{let r=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=r==null?void 0:r.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=r==null?void 0:r.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(r){bt(r),this._isResolved=!1}})}},zm=class i{static create(e,t,n,r){return V5(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>n.map(l=>V5(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,r);c!=null&&c.hints.length&&o.push([c,a])}catch(c){bt(c)}})));if(yield Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new Zp;return new i(n,o,t)})}constructor(e,t,n){this._disposables=new W,this.ranges=e,this.provider=new Set;let r=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=n.validatePosition(a.position),c="before",d=i._getRangeAtPosition(n,l),h;d.getStartPosition().isBefore(l)?(h=k.fromPositions(d.getStartPosition(),l),c="after"):(h=k.fromPositions(l,d.getEndPosition()),c="before"),r.push(new iw(a,new Bm(h,c),s))}}this.items=r.sort((o,s)=>ie.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,r=e.getWordAtPosition(t);if(r)return new k(n,r.startColumn,n,r.endColumn);e.tokenization.tokenizeIfCheap(n);let o=e.tokenization.getLineTokens(n),s=t.column-1,a=o.findTokenIndexAtOffset(s),l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&a<o.getCount()-1&&(l=o.getStartOffset(a+1),c=o.getEndOffset(a+1))),new k(n,l+1,n,c+1)}};function wB(i){return Qe.from({scheme:po.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}gt();ic();Gt();Ie();Us();mi();Si();qe();st();var Um=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function xB(i,e,t,n){var r;return Um(this,void 0,void 0,function*(){let o=i.get(Vi),s=i.get(Jo),a=i.get(Pt),l=i.get(Ce),c=i.get(ni);if(yield n.item.resolve(ze.None),!n.part.location)return;let d=n.part.location,h=[],u=new Set(qr.getMenuItems(ae.EditorContext).map(p=>UT(p)?p.command.id:M4()));for(let p of co.all())u.has(p.desc.id)&&h.push(new Kr(p.desc.id,zo.label(p.desc,{renderShortTitle:!0}),void 0,!0,()=>Um(this,void 0,void 0,function*(){let f=yield o.createModelReference(d.uri);try{let _=new od(f.object.textEditorModel,k.getStartPosition(d.range)),b=n.item.anchor.range;yield l.invokeFunction(p.runEditorCommand.bind(p),e,_,b)}finally{f.dispose()}})));if(n.part.command){let{command:p}=n.part;h.push(new fo),h.push(new Kr(p.id,p.title,void 0,!0,()=>Um(this,void 0,void 0,function*(){var f;try{yield a.executeCommand(p.id,...(f=p.arguments)!==null&&f!==void 0?f:[])}catch(_){c.notify({severity:rh.Error,source:n.item.provider.displayName,message:_})}})))}let m=e.getOption(123);s.showContextMenu({domForShadowRoot:m&&(r=e.getDomNode())!==null&&r!==void 0?r:void 0,getAnchor:()=>{let p=wn(t);return{x:p.left,y:p.top+p.height+8}},getActions:()=>h,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function K5(i,e,t,n){return Um(this,void 0,void 0,function*(){let o=yield i.get(Vi).createModelReference(n.uri);yield t.invokeWithinContext(s=>Um(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(we),c=Hi.inPeekEditor.getValue(l),d=!a&&t.getOption(85)&&!c;return new Ma({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new od(o.object.textEditorModel,k.getStartPosition(n.range)),k.lift(n.range))})),o.dispose()})}Si();ac();st();kn();ln();var Ote=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},bu=function(i,e){return function(t,n){e(t,n,i)}},yu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},nw=class i{constructor(){this._entries=new il(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},EB=Jn("IInlayHintsCache");tr(EB,nw,1);var Su=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},rw=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},Pa=class ow{static get(e){var t;return(t=e.getContribution(ow.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,r,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new W,this._sessionDisposables=new W,this._decorationsMetadata=new Map,this._ruleFactory=new $k(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(136)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(136);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(ft(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let r,o=new Set,s=new kt(()=>yu(this,void 0,void 0,function*(){let a=Date.now();r==null||r.dispose(!0),r=new qt;let l=t.onWillDispose(()=>r==null?void 0:r.cancel());try{let c=r.token,d=yield zm.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(let h of d.provider)typeof h.onDidChangeInlayHints=="function"&&!o.has(h)&&(o.add(h),this._sessionDisposables.add(h.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){Be(c)}finally{r.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(ft(()=>r==null?void 0:r.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{let l=Math.max(s.delay,1250);s.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(TT.getInstance().event(c=>{if(!this._editor.hasModel())return;let d=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;let h=this._editor.getModel(),u=this._copyInlayHintsWithCurrentAnchor(h);this._updateHintsDecorators([h.getFullModelRange()],u),s.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new W,t=e.add(new Ds(this._editor)),n=new W;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(r=>{let[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new qt;n.add(ft(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new rw(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new k(c,1,c,a.getLineMaxColumn(c)),h=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],h),n.add(ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],h)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(r=>yu(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(K5,r,this._editor,s.location):ak.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>yu(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(ze.None),Xt(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>at.replace(k.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>yu(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(xB,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof nh&&(n==null?void 0:n.attachedData)instanceof Su)return n.attachedData}_invokeCommand(e,t){var n;return yu(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(r){this._notificationService.notify({severity:rh.Error,source:t.provider.displayName,message:r})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,r]of this._decorationsMetadata){if(t.has(r.item))continue;let o=e.getDecorationRange(n);if(o){let s=new Bm(o,r.item.anchor.direction),a=r.item.with({anchor:s});t.set(r.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(let o of n.sort(k.compareRangesUsingStarts)){let s=t.validateRange(new k(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!k.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=k.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){var n,r;let o=[],s=(f,_,b,C,T)=>{let w={content:b,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:_.className,cursorStops:C,attachedData:T};o.push({item:f,classNameRef:_,decoration:{range:f.anchor.range,options:{description:"InlayHint",showIfCollapsed:f.anchor.range.isEmpty(),collapseOnReplaceEdit:!f.anchor.range.isEmpty(),stickiness:0,[f.anchor.direction]:this._activeRenderMode===0?w:void 0}}})},a=(f,_)=>{let b=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(f,b,"\u200A",_?hc.Right:hc.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:h}=this._getLayoutInfo(),u="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(u,c);for(let f of t){f.hint.paddingLeft&&a(f,!1);let _=typeof f.hint.label=="string"?[{label:f.hint.label}]:f.hint.label;for(let b=0;b<_.length;b++){let C=_[b],T=b===0,w=b===_.length-1,A={fontSize:`${l}px`,fontFamily:`var(${u}), ${fk.fontFamily}`,verticalAlign:h?"baseline":"middle",unicodeBidi:"isolate"};Xt(f.hint.textEdits)&&(A.cursor="default"),this._fillInColors(A,f.hint),(C.command||C.location)&&((n=this._activeInlayHintPart)===null||n===void 0?void 0:n.part.item)===f&&this._activeInlayHintPart.part.index===b&&(A.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(A.color=Lt(qI),A.cursor="pointer")),d&&(T&&w?(A.padding=`1px ${Math.max(1,l/4)|0}px`,A.borderRadius=`${l/4|0}px`):T?(A.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,A.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):w?(A.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,A.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):A.padding="1px 0 1px 0"),s(f,this._ruleFactory.createClassNameRef(A),Pte(C.label),w&&!f.hint.paddingRight?hc.Right:hc.None,new Su(f,b))}if(f.hint.paddingRight&&a(f,!0),o.length>ow._MAX_DECORATORS)break}let m=[];for(let f of e)for(let{id:_}of(r=this._editor.getDecorationsInRange(f))!==null&&r!==void 0?r:[]){let b=this._decorationsMetadata.get(_);b&&(m.push(_),b.classNameRef.dispose(),this._decorationsMetadata.delete(_))}let p=pc.capture(this._editor);this._editor.changeDecorations(f=>{let _=f.deltaDecorations(m,o.map(b=>b.decoration));for(let b=0;b<_.length;b++){let C=o[b];this._decorationsMetadata.set(_[b],C)}}),p.restore(this._editor)}_fillInColors(e,t){t.kind===J2.Parameter?(e.backgroundColor=Lt(JI),e.color=Lt(QI)):t.kind===J2.Type?(e.backgroundColor=Lt(XI),e.color=Lt(YI)):(e.backgroundColor=Lt($I),e.color=Lt(GI))}_getLayoutInfo(){let e=this._editor.getOption(136),t=e.padding,n=this._editor.getOption(50),r=this._editor.getOption(47),o=e.fontSize;(!o||o<5||o>n)&&(o=n);let s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===r&&o===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Pa.ID="editor.contrib.InlayHints";Pa._MAX_DECORATORS=1500;Pa=Ote([bu(1,le),bu(2,qi),bu(3,EB),bu(4,Pt),bu(5,ni),bu(6,Ce)],Pa);function Pte(i){let e="\xA0";return i.replace(/[ \t]/g,e)}Je.registerCommand("_executeInlayHintProvider",(i,...e)=>yu(void 0,void 0,void 0,function*(){let[t,n]=e;ot(Qe.isUri(t)),ot(k.isIRange(n));let{inlayHintsProvider:r}=i.get(le),o=yield i.get(Vi).createModelReference(t);try{let s=yield zm.create(r,o.object.textEditorModel,[k.lift(n)],ze.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}));ct();St();dn();$r();Us();sn();Xr();ut();be();yn();Rt();var Fte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Wm=function(i,e){return function(t,n){e(t,n,i)}},TB=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hte=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},q5=class extends Al{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},G5=class extends vu{constructor(e,t,n,r,o,s){super(e,t,n,r,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Pa.get(this._editor)||e.target.type!==6)return null;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return r instanceof nh&&r.attachedData instanceof Su?new q5(r.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof q5?new ir(r=>TB(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(n),n.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new pi().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&r.emitOne(new $n(this,e.range,[d],!1,0)),Xt(c.item.hint.textEdits)&&r.emitOne(new $n(this,e.range,[new pi().appendText(g("hint.dbl","Double-click to insert"))],!1,10001));let h;if(typeof c.part.tooltip=="string"?h=new pi().appendText(c.part.tooltip):c.part.tooltip&&(h=c.part.tooltip),h&&r.emitOne(new $n(this,e.range,[h],!1,1)),c.part.location||c.part.command){let _,C=this._editor.getOption(75)==="altKey"?Ui?g("links.navigate.kb.meta.mac","cmd + click"):g("links.navigate.kb.meta","ctrl + click"):Ui?g("links.navigate.kb.alt.mac","option + click"):g("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?_=new pi().appendText(g("hint.defAndCommand","Go to Definition ({0}), right click for more",C)):c.part.location?_=new pi().appendText(g("hint.def","Go to Definition ({0})",C)):c.part.command&&(_=new pi(`[${g("hint.cmd","Execute Command")}](${wB(c.part.command)} "${c.part.command.title}") (${C})`,{isTrusted:!0})),_&&r.emitOne(new $n(this,e.range,[_],!1,1e4))}let u=yield this._resolveInlayHintLabelPartHover(c,n);try{for(var m=!0,p=Hte(u),f;f=yield p.next(),o=f.done,!o;m=!0){l=f.value,m=!1;let _=l;r.emitOne(_)}}catch(_){s={error:_}}finally{try{!m&&!o&&(a=p.return)&&(yield a.call(p))}finally{if(s)throw s.error}}})):ir.EMPTY}_resolveInlayHintLabelPartHover(e,t){return TB(this,void 0,void 0,function*(){if(!e.part.location)return ir.EMPTY;let{uri:n,range:r}=e.part.location,o=yield this._resolverService.createModelReference(n);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?Pm(this._languageFeaturesService.hoverProvider,s,new ie(r.startLineNumber,r.startColumn),t).filter(a=>!nl(a.hover.contents)).map(a=>new $n(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):ir.EMPTY}finally{o.dispose()}})}};G5=Fte([Wm(1,li),Wm(2,ci),Wm(3,nt),Wm(4,Vi),Wm(5,le)],G5);Se(Pa.ID,Pa,1);Ao.register(G5);var oGe=zi(LB());Me();ht();be();var dw=class extends K{constructor(){super({id:"expandLineSelection",label:g("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:I.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let r=t._getViewModel();r.model.pushStackElement(),r.setCursorStates(n.source,3,Zu.expandLineSelection(r,r.getCursorStates())),r.revealPrimaryCursor(n.source,!0)}};F(dw);Bs();Me();Bt();Zo();Ie();var Y5=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=Ute(e,this._cursors);for(let r=0,o=n.length;r<o;r++){let s=n[r];t.addEditOperation(s.range,s.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}};function Ute(i,e){e.sort((s,a)=>s.lineNumber===a.lineNumber?s.column-a.column:s.lineNumber-a.lineNumber);for(let s=e.length-2;s>=0;s--)e[s].lineNumber===e[s+1].lineNumber&&e.splice(s,1);let t=[],n=0,r=0,o=e.length;for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineContent(s),c=l.length+1,d=0;if(r<o&&e[r].lineNumber===s&&(d=e[r].column,r++,d===c)||l.length===0)continue;let h=Wd(l),u=0;if(h===-1)u=1;else if(h!==l.length-1)u=h+2;else continue;u=Math.max(d,u),t[n++]=at.delete(new k(s,u,s,c))}return t}Zo();St();Ie();Di();ht();Ie();Di();var Vm=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._endLineNumberDelta=1,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let r=[];for(let s=n.startLineNumber;s<=n.endLineNumber;s++)r.push(e.getLineContent(s));let o=r.join(`
|
|
`);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new k(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber+1,1),n.endLineNumber===e.getLineCount()?"":`
|
|
`):this._isCopyingDown?t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),o+`
|
|
`):t.addEditOperation(new k(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),`
|
|
`+o),this._selectionId=t.trackSelection(n),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let r=n.startLineNumber,o=n.startColumn,s=n.endLineNumber,a=n.endColumn;this._startLineNumberDelta!==0&&(r=r+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),n=ye.createWithDirection(r,o,s,a,this._selectionDirection)}return n}};Bt();Ie();Di();qW();an();var Wte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jte=function(i,e){return function(t,n){e(t,n,i)}},X5=class{constructor(e,t,n,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let{tabSize:o,indentSize:s,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(o,s,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,h)=>e.getLanguageIdAtPosition(d,h)},getLineContent:null};if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){let d=r.startLineNumber,h=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(h)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(d,1,d,1),e.getLineContent(h)),t.addEditOperation(new k(h,1,h,e.getLineMaxColumn(h)),null)),r=new ye(h,1,h,1)}else{let d,h;if(this._isMovingDown){d=r.endLineNumber+1,h=e.getLineContent(d),t.addEditOperation(new k(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let u=h;if(this.shouldAutoIndent(e,r)){let m=this.matchEnterRule(e,l,o,d,r.startLineNumber-1);if(m!==null){let f=Yt(e.getLineContent(d)),_=m+vn(f,o);u=cd(_,o,a)+this.trimLeft(h)}else{c.getLineContent=_=>_===r.startLineNumber?e.getLineContent(d):e.getLineContent(_);let f=lc(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber,l,this._languageConfigurationService);if(f!==null){let _=Yt(e.getLineContent(d)),b=vn(f,o),C=vn(_,o);b!==C&&(u=cd(b,o,a)+this.trimLeft(h))}}t.addEditOperation(new k(r.startLineNumber,1,r.startLineNumber,1),u+`
|
|
`);let p=this.matchEnterRuleMovingDown(e,l,o,r.startLineNumber,d,u);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,p);else{c.getLineContent=_=>_===r.startLineNumber?u:_>=r.startLineNumber+1&&_<=r.endLineNumber+1?e.getLineContent(_-1):e.getLineContent(_);let f=lc(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber+1,l,this._languageConfigurationService);if(f!==null){let _=Yt(e.getLineContent(r.startLineNumber)),b=vn(f,o),C=vn(_,o);if(b!==C){let T=b-C;this.getIndentEditsOfMovingBlock(e,t,r,o,a,T)}}}}else t.addEditOperation(new k(r.startLineNumber,1,r.startLineNumber,1),u+`
|
|
`)}else if(d=r.startLineNumber-1,h=e.getLineContent(d),t.addEditOperation(new k(d,1,d+1,1),null),t.addEditOperation(new k(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),`
|
|
`+h),this.shouldAutoIndent(e,r)){c.getLineContent=m=>m===d?e.getLineContent(r.startLineNumber):e.getLineContent(m);let u=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(u!==null)u!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,u);else{let m=lc(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),d,l,this._languageConfigurationService);if(m!==null){let p=Yt(e.getLineContent(r.startLineNumber)),f=vn(m,o),_=vn(p,o);if(f!==_){let b=f-_;this.getIndentEditsOfMovingBlock(e,t,r,o,a,b)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,n){return{shiftIndent:r=>tl.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>tl.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===e1.None||o.indentAction===e1.Indent?s=o.indentation+o.appendText:o.indentAction===e1.IndentOutdent?s=o.indentation:o.indentAction===e1.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimLeft(a).indexOf(this.trimLeft(s))>=0){let l=Yt(e.getLineContent(r)),c=Yt(s),d=xf(e,r,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let h=vn(c,n),u=vn(l,n);return h-u}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(Wd(s)>=0){let a=e.getLineMaxColumn(o),l=wf(this._autoIndent,e,new k(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,l)}else{let a=r-1;for(;a>=1;){let d=e.getLineContent(a);if(Wd(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=wf(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}}matchEnterRule(e,t,n,r,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),Wd(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=wf(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),r=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==r||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,r,o,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=Yt(l),h=vn(c,r)+s,u=cd(h,r,o);u!==c&&(t.addEditOperation(new k(a,1,a,c.length+1),u),a===n.endLineNumber&&n.endColumn<=c.length+1&&u===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber<n.endLineNumber&&(n=n.setEndPosition(n.endLineNumber,2)),n}};X5=Wte([jte(3,rt)],X5);Zo();Ie();var dd=class i{static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=Vte(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let r=NB(e,t,n);if(!r)return!1;for(let o=0,s=r.before.length;o<s;o++)if(r.before[o]!==r.after[o])return!0;return!1}};dd._COLLATOR=null;function NB(i,e,t){let n=e.startLineNumber,r=e.endLineNumber;if(e.endColumn===1&&r--,n>=r)return null;let o=[];for(let a=n;a<=r;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(dd.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function Vte(i,e,t){let n=NB(i,e,t);return n?at.replace(new k(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(`
|
|
`)):null}be();mi();an();var Q5=class extends K{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>k.compareRangesUsingStarts(s.selection,a.selection));let r=n[0];for(let s=1;s<n.length;s++){let a=n[s];r.selection.endLineNumber===a.selection.startLineNumber&&(r.index<a.index?a.ignore=!0:(r.ignore=!0,r=a))}let o=[];for(let s of n)o.push(new Vm(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},hw=class extends Q5{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:g("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"2_line",title:g({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}},uw=class extends Q5{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:g("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"2_line",title:g({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}},mw=class extends K{constructor(){super({id:"editor.action.duplicateSelection",label:g("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:I.writable,menuOpts:{menuId:ae.MenubarSelectionMenu,group:"2_line",title:g({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,n){if(!t.hasModel())return;let r=[],o=t.getSelections(),s=t.getModel();for(let a of o)if(a.isEmpty())r.push(new Vm(a,!0));else{let l=new ye(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);r.push(new KT(l,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},J5=class extends K{constructor(e,t){super(t),this.down=e}run(e,t){let n=e.get(rt),r=[],o=t.getSelections()||[],s=t.getOption(10);for(let a of o)r.push(new X5(a,this.down,s,n));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},pw=class extends J5{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:g("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"2_line",title:g({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}},fw=class extends J5{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:g("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"2_line",title:g({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}},Z5=class extends K{constructor(e,t){super(t),this.descending=e}run(e,t){let n=t.getSelections()||[];for(let o of n)if(!dd.canRun(t.getModel(),o,this.descending))return;let r=[];for(let o=0,s=n.length;o<s;o++)r[o]=new dd(n[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},gw=class extends Z5{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:g("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:I.writable})}},_w=class extends Z5{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:g("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:I.writable})}},vw=class extends K{constructor(){super({id:"editor.action.removeDuplicateLines",label:g("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:I.writable})}run(e,t){if(!t.hasModel())return;let n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let r=[],o=[],s=0;for(let a of t.getSelections()){let l=new Set,c=[];for(let m=a.startLineNumber;m<=a.endLineNumber;m++){let p=n.getLineContent(m);l.has(p)||(c.push(p),l.add(p))}let d=new ye(a.startLineNumber,1,a.endLineNumber,n.getLineMaxColumn(a.endLineNumber)),h=a.startLineNumber-s,u=new ye(h,1,h+c.length-1,c[c.length-1].length);r.push(at.replace(d,c.join(`
|
|
`))),o.push(u),s+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}},eb=class i extends K{constructor(){super({id:i.ID,label:g("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2102),weight:100}})}run(e,t,n){let r=[];n.reason==="auto-save"&&(r=(t.getSelections()||[]).map(a=>new ie(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new Y5(o,r);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};eb.ID="editor.action.trimTrailingWhitespace";var bw=class extends K{constructor(){super({id:"editor.action.deleteLines",label:g("lines.delete","Delete Line"),alias:"Delete Line",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=n.length;l<c;l++){let d=n[l],h=d.startLineNumber,u=d.endLineNumber,m=1,p=r.getLineMaxColumn(u);u<r.getLineCount()?(u+=1,p=1):h>1&&(h-=1,m=r.getLineMaxColumn(h)),s.push(at.replace(new ye(h,m,u,p),"")),a.push(new ye(h-o,d.positionColumn,h-o,d.positionColumn)),o+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(s-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:s,positionColumn:o.positionColumn}});t.sort((o,s)=>o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let n=[],r=t[0];for(let o=1;o<t.length;o++)r.endLineNumber+1>=t[o].startLineNumber?r.endLineNumber=t[o].endLineNumber:(n.push(r),r=t[o]);return n.push(r),n}},yw=class extends K{constructor(){super({id:"editor.action.indentLines",label:g("lines.indent","Indent Line"),alias:"Indent Line",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Ef.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},Sw=class extends K{constructor(){super({id:"editor.action.outdentLines",label:g("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2140,weight:100}})}run(e,t){Kd.Outdent.runEditorCommand(e,t,null)}},Cw=class extends K{constructor(){super({id:"editor.action.insertLineBefore",label:g("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Ef.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},ww=class extends K{constructor(){super({id:"editor.action.insertLineAfter",label:g("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Ef.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},tb=class extends K{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),r=this._getRangesToDelete(t),o=[];for(let l=0,c=r.length-1;l<c;l++){let d=r[l],h=r[l+1];k.intersectRanges(d,h)===null?o.push(d):r[l+1]=k.plusRange(d,h)}o.push(r[r.length-1]);let s=this._getEndCursorState(n,o),a=o.map(l=>at.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},xw=class extends tb{constructor(){super({id:"deleteAllLeft",label:g("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,r=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new ye(l,s.startColumn,l,s.startColumn)}else a=new ye(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:r.push(a)}),n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,r=e.getModel();return r===null?[]:(n.sort(k.compareRangesUsingStarts),n=n.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineContent(s).length+1;return new k(s,a,o.startLineNumber,1)}else return new k(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new k(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},Ew=class extends tb{constructor(){super({id:"deleteAllRight",label:g("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,r=[];for(let o=0,s=t.length,a=0;o<s;o++){let l=t[o],c=new ye(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?n=c:r.push(c)}return n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let n=e.getSelections();if(n===null)return[];let r=n.map(o=>{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new k(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new k(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(k.compareRangesUsingStarts),r}},Tw=class extends K{constructor(){super({id:"editor.action.joinLines",label:g("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getSelection();if(r===null)return;n.sort(k.compareRangesUsingStarts);let o=[],s=n.reduce((u,m)=>u.isEmpty()?u.endLineNumber===m.startLineNumber?(r.equalsSelection(u)&&(r=m),m):m.startLineNumber>u.endLineNumber+1?(o.push(u),m):new ye(u.startLineNumber,u.startColumn,m.endLineNumber,m.endColumn):m.startLineNumber>u.endLineNumber?(o.push(u),m):new ye(u.startLineNumber,u.startColumn,m.endLineNumber,m.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=r,h=0;for(let u=0,m=o.length;u<m;u++){let p=o[u],f=p.startLineNumber,_=1,b=0,C,T,w=a.getLineContent(p.endLineNumber).length-p.endColumn;if(p.isEmpty()||p.startLineNumber===p.endLineNumber){let D=p.getStartPosition();D.lineNumber<a.getLineCount()?(C=f+1,T=a.getLineMaxColumn(C)):(C=D.lineNumber,T=a.getLineMaxColumn(D.lineNumber))}else C=p.endLineNumber,T=a.getLineMaxColumn(C);let A=a.getLineContent(f);for(let D=f+1;D<=C;D++){let j=a.getLineContent(D),q=a.getLineFirstNonWhitespaceColumn(D);if(q>=1){let _e=!0;A===""&&(_e=!1),_e&&(A.charAt(A.length-1)===" "||A.charAt(A.length-1)===" ")&&(_e=!1,A=A.replace(/[\s\uFEFF\xA0]+$/g," "));let J=j.substr(q-1);A+=(_e?" ":"")+J,_e?b=J.length+1:b=J.length}else b=0}let O=new k(f,_,C,T);if(!O.isEmpty()){let D;p.isEmpty()?(l.push(at.replace(O,A)),D=new ye(O.startLineNumber-h,A.length-b+1,f-h,A.length-b+1)):p.startLineNumber===p.endLineNumber?(l.push(at.replace(O,A)),D=new ye(p.startLineNumber-h,p.startColumn,p.endLineNumber-h,p.endColumn)):(l.push(at.replace(O,A)),D=new ye(p.startLineNumber-h,p.startColumn,p.startLineNumber-h,A.length-w)),k.intersectRanges(O,r)!==null?d=D:c.push(D)}h+=O.endLineNumber-O.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},Iw=class extends K{constructor(){super({id:"editor.action.transpose",label:g("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:I.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=[];for(let s=0,a=n.length;s<a;s++){let l=n[s];if(!l.isEmpty())continue;let c=l.getStartPosition(),d=r.getLineMaxColumn(c.lineNumber);if(c.column>=d){if(c.lineNumber===r.getLineCount())continue;let h=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),u=r.getValueInRange(h).split("").reverse().join("");o.push(new js(new ye(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),u))}else{let h=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),u=r.getValueInRange(h).split("").reverse().join("");o.push(new _f(h,u,new ye(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Bl=class extends K{run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=t.getOption(126),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new k(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),h=r.getValueInRange(d);s.push(at.replace(d,this._modifyText(h,o)))}else{let l=r.getValueInRange(a);s.push(at.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},kw=class extends Bl{constructor(){super({id:"editor.action.transformToUppercase",label:g("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:I.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},Aw=class extends Bl{constructor(){super({id:"editor.action.transformToLowercase",label:g("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:I.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},Fa=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return this.get()!==null}},Km=class i extends Bl{constructor(){super({id:"editor.action.transformToTitlecase",label:g("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:I.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}};Km.titleBoundary=new Fa("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");var hd=class i extends Bl{constructor(){super({id:"editor.action.transformToSnakecase",label:g("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:I.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get();return!n||!r?e:e.replace(n,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}};hd.caseBoundary=new Fa("(\\p{Ll})(\\p{Lu})","gmu");hd.singleLetters=new Fa("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");var qm=class i extends Bl{constructor(){super({id:"editor.action.transformToCamelcase",label:g("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:I.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let r=e.split(n);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};qm.wordBoundary=new Fa("[_\\s-]","gm");var ud=class i extends Bl{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:g("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:I.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get(),o=i.underscoreBoundary.get();return!n||!r||!o?e:e.replace(o,"$1-$3").replace(n,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};ud.caseBoundary=new Fa("(\\p{Ll})(\\p{Lu})","gmu");ud.singleLetters=new Fa("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");ud.underscoreBoundary=new Fa("(\\S)(_)(\\S)","gm");F(hw);F(uw);F(mw);F(pw);F(fw);F(gw);F(_w);F(vw);F(eb);F(bw);F(yw);F(Sw);F(Cw);F(ww);F(xw);F(Ew);F(Tw);F(Iw);F(kw);F(Aw);hd.caseBoundary.isSupported()&&hd.singleLetters.isSupported()&&F(hd);qm.wordBoundary.isSupported()&&F(qm);Km.titleBoundary.isSupported()&&F(Km);ud.isSupported()&&F(ud);Rt();ct();Gt();Xd();it();wt();re();Bt();Cn();Me();xn();St();Ie();ht();dn();an();be();qe();ut();kn();ec();var Kte=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ib=function(i,e){return function(t,n){e(t,n,i)}},Lw=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},RB=new Ne("LinkedEditingInputVisible",!1),qte="linked-editing-decoration",zl=class Nw extends Y{static get(e){return e.getContribution(Nw.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new W),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=RB.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new W),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(67)||s.hasChanged(89))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(67)||this._editor.getOption(89))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(Nt.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new Ir(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new Ir(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(d=>c.intersectRanges(d.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let r=t.getValueInRange(n);if(this._currentWordPattern){let s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s<a;s++){let l=this._currentDecorations.getRange(s);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:r});else{let c=t.getValueInRange(l),d=r,h=l.startColumn,u=l.endColumn,m=Xa(c,d);h+=m,c=c.substr(m),d=d.substr(m);let p=RT(c,d);u-=p,c=c.substr(0,c.length-p),d=d.substr(0,d.length-p),(h!==u||d.length!==0)&&o.push({range:new k(l.startLineNumber,h,l.endLineNumber,u),text:d})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let s=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(s)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return Lw(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}let n=this._editor.getModel(),r=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=r;let o=Ht(s=>Lw(this,void 0,void 0,function*(){try{let a=new Sn(!1),l=yield DB(this._providers,n,t,s);if(this._debounceInformation.update(n,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,r!==n.getVersionId()))return;let c=[];l!=null&&l.ranges&&(c=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let d=!1;for(let u=0,m=c.length;u<m;u++)if(k.containsPosition(c[u],t)){if(d=!0,u!==0){let p=c[u];c.splice(u,1),c.unshift(p)}break}if(!d){this.clearRanges();return}let h=c.map(u=>({range:u,options:Nw.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(h),this._syncRangesToken++}catch(a){Wr(a)||Be(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};zl.ID="editor.contrib.linkedEditing";zl.DECORATION=Ue.register({description:"linked-editing",stickiness:0,className:qte});zl=Kte([ib(1,we),ib(2,le),ib(3,rt),ib(4,qi)],zl);var Rw=class extends K{constructor(){super({id:"editor.action.linkedEditing",label:g("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:G.and(I.writable,I.hasRenameProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(_t),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return Qe.isUri(r)&&ie.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},Be):super.runCommand(e,t)}run(e,t){let n=zl.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},Gte=ii.bindToContribution(zl.get);ge(new Gte({id:"cancelLinkedEditingInput",precondition:RB,handler:i=>i.clearRanges(),kbOpts:{kbExpr:I.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function DB(i,e,t,n){let r=i.ordered(e);return Af(r.map(o=>()=>Lw(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,n)}catch(s){bt(s);return}})),o=>!!o&&Xt(o==null?void 0:o.ranges))}var bOe=pe("editor.linkedEditingBackground",{dark:xt.fromHex("#f00").transparent(.3),light:xt.fromHex("#f00").transparent(.3),hcDark:xt.fromHex("#f00").transparent(.3),hcLight:xt.white},g("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Bn("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(le);return DB(n,e,t,ze.None)});Se(zl.ID,zl,1);F(Rw);ct();Gt();it();re();df();yn();Tr();ec();Cn();Me();dn();ut();Rt();Gt();it();re();ti();Cn();Ie();Ya();Si();ut();var MB=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Mw=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return MB(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}},nb=class i{constructor(e){this._disposables=new W;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new Mw(s,r));t=i._union(t,o),tf(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],r,o,s,a;for(r=0,s=0,o=e.length,a=t.length;r<o&&s<a;){let l=e[r],c=t[s];if(k.areIntersectingOrTouching(l.range,c.range)){r++;continue}k.compareRangesUsingStarts(l.range,c.range)<0?(n.push(l),r++):(n.push(c),s++)}for(;r<o;r++)n.push(e[r]);for(;s<a;s++)n.push(t[s]);return n}};function Ow(i,e,t){let n=[],r=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,o])},bt));return Promise.all(r).then(()=>{let o=new nb(Wo(n));return t.isCancellationRequested?(o.dispose(),new nb([])):o})}Je.registerCommand("_executeLinkProvider",(i,...e)=>MB(void 0,void 0,void 0,function*(){let[t,n]=e;ot(t instanceof Qe),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(le),o=i.get(Ri).getModel(t);if(!o)return[];let s=yield Ow(r,o,ze.None);if(!s)return[];for(let l=0;l<Math.min(n,s.links.length);l++)yield s.links[l].resolve(ze.None);let a=s.links.slice(0);return s.dispose(),a}));be();Xr();var $te=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rb=function(i,e){return function(t,n){e(t,n,i)}},Yte=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Cu=class PB extends Y{static get(e){return e.getContribution(PB.ID)}constructor(e,t,n,r,o){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new kt(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new Ds(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return Yte(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(68))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Ht(t=>Ow(this.providers,e,t));try{let t=new Sn(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){Be(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(75)==="altKey",n=[],r=Object.keys(this.currentOccurrences);for(let s of r){let a=this.currentOccurrences[s];n.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(ob.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l<c;l++){let d=new ob(e[l],a[l]);this.currentOccurrences[d.decorationId]=d}})}_onEditorMouseMove(e,t){let n=this.editor.getOption(75)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let r=this.getLinkOccurrence(e.target.position);r&&this.editor.changeDecorations(o=>{r.activate(o,n),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:r}=e;r.resolve(ze.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===po.file&&o.startsWith(`${po.file}:`)){let a=Qe.parse(o);if(a.scheme===po.file){let l=uI(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=fI(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(g("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(g("missing.url","Failed to open this link because its target is missing.")):Be(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let r=this.currentOccurrences[n.id];if(r)return r}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};Cu.ID="editor.linkDetector";Cu=$te([rb(1,ci),rb(2,ni),rb(3,le),rb(4,qi)],Cu);var OB={general:Ue.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Ue.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},ob=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let r=Object.assign({},n?OB.active:OB.general);return r.hoverMessage=Xte(e,t),r}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};function Xte(i,e){let t=i.url&&/^command:/i.test(i.url.toString()),n=i.tooltip?i.tooltip:t?g("links.navigate.executeCmd","Execute command"):g("links.navigate.follow","Follow link"),r=e?Ui?g("links.navigate.kb.meta.mac","cmd + click"):g("links.navigate.kb.meta","ctrl + click"):Ui?g("links.navigate.kb.alt.mac","option + click"):g("links.navigate.kb.alt","alt + click");if(i.url){let o="";if(/^command:/i.test(i.url.toString())){let a=i.url.toString().match(/^command:([^?#]+)/);if(a){let l=a[1];o=g("tooltip.explanation","Execute command {0}",l)}}return new pi("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),n,o).appendMarkdown(` (${r})`)}else return new pi().appendText(`${n} (${r})`)}var Pw=class extends K{constructor(){super({id:"editor.action.openLink",label:g("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=Cu.get(t);if(!n||!t.hasModel())return;let r=t.getSelections();for(let o of r){let s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};Se(Cu.ID,Cu,1);F(Pw);re();Me();var Gm=class extends Y{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(113);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};Gm.ID="editor.contrib.longLinesHelper";Se(Gm.ID,Gm,2);wr();ct();Bs();re();Me();Ie();Di();ht();be();mi();qe();ut();rl();dn();cn();be();kn();ln();var sb=pe("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},g("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);pe("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},g("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);pe("editor.wordHighlightTextBackground",{light:sb,dark:sb,hcDark:sb,hcLight:sb},g("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);var ab=pe("editor.wordHighlightBorder",{light:null,dark:null,hcDark:qo,hcLight:qo},g("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));pe("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:qo,hcLight:qo},g("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));pe("editor.wordHighlightTextBorder",{light:ab,dark:ab,hcDark:ab,hcLight:ab},g("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));var Qte=pe("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},g("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Jte=pe("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},g("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Zte=pe("editorOverviewRuler.wordHighlightTextForeground",{dark:Zd,light:Zd,hcDark:Zd,hcLight:Zd},g("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),eie=Ue.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Lt(Jte),position:zn.Center},minimap:{color:Lt(c1),position:Vo.Inline}}),tie=Ue.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Lt(Zte),position:zn.Center},minimap:{color:Lt(c1),position:Vo.Inline}}),iie=Ue.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Lt(Zd),position:zn.Center},minimap:{color:Lt(c1),position:Vo.Inline}}),nie=Ue.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),rie=Ue.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Lt(Qte),position:zn.Center},minimap:{color:Lt(c1),position:Vo.Inline}});function FB(i){return i===m1.Write?eie:i===m1.Text?tie:rie}function HB(i){return i?nie:iie}eh((i,e)=>{let t=i.getColor(HI);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});st();var oie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sie=function(i,e){return function(t,n){e(t,n,i)}};function Wl(i,e){let t=e.filter(n=>!i.find(r=>r.equals(n)));if(t.length>=1){let n=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=t.length===1?g("cursorAdded","Cursor added: {0}",n):g("cursorsAdded","Cursors added: {0}",n);IT(r)}}var Fw=class extends K{constructor(){super({id:"editor.action.insertCursorAbove",label:g("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Zu.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),Wl(s,o.getCursorStates())}},Hw=class extends K{constructor(){super({id:"editor.action.insertCursorBelow",label:g("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Zu.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),Wl(s,o.getCursorStates())}},Bw=class extends K{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:g("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let r=e.startLineNumber;r<e.endLineNumber;r++){let o=t.getLineMaxColumn(r);n.push(new ye(r,o,r,o))}e.endColumn>1&&n.push(new ye(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),Wl(s,o.getCursorStates())}},zw=class extends K{constructor(){super({id:"editor.action.addCursorsToBottom",label:g("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=t.getModel().getLineCount(),o=[];for(let l=n[0].startLineNumber;l<=r;l++)o.push(new ye(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Wl(a,s.getCursorStates())}},Uw=class extends K{constructor(){super({id:"editor.action.addCursorsToTop",label:g("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=[];for(let a=n[0].startLineNumber;a>=1;a--)r.push(new ye(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),Wl(s,o.getCursorStates())}},wu=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},lb=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let r=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,d=null;if(l.isEmpty()){let h=e.getConfiguredWordAtPosition(l.getStartPosition());if(!h)return null;c=h.word,d=new ye(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,`
|
|
`);return new i(e,t,r,c,o,s,d)}constructor(e,t,n,r,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new wu(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new wu(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new wu(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new wu(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824)}},md=class i extends Y{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new W),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=lb.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new ye(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let r=e.getState().matchCase;if(!UB(this._editor.getModel(),t,r)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(s,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,n=e.getState();if(n.isRevealed&&n.searchString.length>0&&n.isRegex){let r=this._editor.getModel();n.searchScope?t=r.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824):t=r.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let r=this._editor.getSelection();for(let o=0,s=t.length;o<s;o++){let a=t[o];if(a.range.intersectRanges(r)){t[o]=t[0],t[0]=a;break}}this._setSelections(t.map(o=>new ye(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};md.ID="editor.contrib.multiCursorController";var Ul=class extends K{run(e,t){let n=md.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=en.get(t);if(s)this._run(n,s);else{let a=e.get(Ce).createInstance(en,t);this._run(n,a),a.dispose()}Wl(o,r.getCursorStates())}}},Ww=class extends Ul{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:g("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2082,weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},jw=class extends Ul{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:g("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},Vw=class extends Ul{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:g("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:It(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},Kw=class extends Ul{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:g("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},qw=class extends Ul{constructor(){super({id:"editor.action.selectHighlights",label:g("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:3114,weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"3_multi",title:g({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},Gw=class extends Ul{constructor(){super({id:"editor.action.changeAll",label:g("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:G.and(I.writable,I.editorTextFocus),kbOpts:{kbExpr:I.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},$w=class{constructor(e,t,n,r,o){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(k.compareRangesUsingStarts)),this._cachedFindMatches}},$m=class zB extends Y{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(104),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new kt(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(104)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));let n=en.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(zB._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let r=n.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;let o=md.get(n);if(!o)return null;let s=en.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let d=n.getSelections();if(d.length>1){let u=s.getState().matchCase;if(!UB(n.getModel(),d,u))return null}a=lb.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let d=l.searchString;c||(d=d.toLowerCase());let h=a.searchText;if(c||(h=h.toLowerCase()),d===h&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new $w(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(126):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),r=this.editor.getSelections();r.sort(k.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,h=r.length;l<d;){let u=n[l];if(c>=h)o.push(u),l++;else{let m=k.compareRangesUsingStarts(u,r[c]);m<0?((r[c].isEmpty()||!k.areIntersecting(u,r[c]))&&o.push(u),l++):(m>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(78),a=o.map(l=>({range:l,options:HB(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};$m.ID="editor.contrib.selectionHighlighter";$m=oie([sie(1,le)],$m);function UB(i,e,t){let n=BB(i,e[0],!t);for(let r=1,o=e.length;r<o;r++){let s=e[r];if(s.isEmpty())return!1;let a=BB(i,s,!t);if(n!==a)return!1}return!0}function BB(i,e,t){let n=i.getValueInRange(e);return t?n.toLowerCase():n}var Yw=class extends K{constructor(){super({id:"editor.action.focusNextCursor",label:g("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:g("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Wl(o,r.getCursorStates()))}},Xw=class extends K{constructor(){super({id:"editor.action.focusPreviousCursor",label:g("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:g("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Wl(o,r.getCursorStates()))}};Se(md.ID,md,4);Se($m.ID,$m,1);F(Fw);F(Hw);F(Bw);F(Ww);F(jw);F(Vw);F(Kw);F(qw);F(Gw);F(zw);F(Uw);F(Yw);F(Xw);O2();re();Me();ht();cn();ut();ct();it();wt();re();V2();cn();Gt();it();ti();Cn();St();cn();ut();Us();Si();qe();var WB=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ha={Visible:new Ne("parameterHintsVisible",!1),MultipleSignatures:new Ne("parameterHintsMultipleSignatures",!1)};function Qw(i,e,t,n,r){return WB(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,r,n);if(a)return a}catch(a){bt(a)}})}Je.registerCommand("_executeSignatureHelpProvider",(i,...e)=>WB(void 0,void 0,void 0,function*(){let[t,n,r]=e;ot(Qe.isUri(t)),ot(ie.isIPosition(n)),ot(typeof r=="string"||!r);let o=i.get(le),s=yield i.get(Vi).createModelReference(t);try{let a=yield Qw(o.signatureHelpProvider,s.object.textEditorModel,ie.lift(n),{triggerKind:_o.Invoke,isRetrigger:!1,triggerCharacter:r},ze.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}));var aie=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jl;(function(i){i.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(r){this.hints=r,this.type=1}}i.Active=t})(jl||(jl={}));var Ym=class i extends Y{constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Re),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=jl.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new ai),this.triggerChars=new oc,this.retriggerChars=new oc,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Ir(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=jl.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),t).catch(Be)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new jl.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return aie(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let r=this._pendingTriggers.reduce(lie);this._pendingTriggers=[];let o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new jl.Pending(Ht(l=>Qw(this.providers,s,a,o,l)),n);try{let l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new jl.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=jl.Default),Be(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let r=n.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:_o.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:_o.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:_o.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(83).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};Ym.DEFAULT_DELAY=120;function lie(i,e){switch(e.triggerKind){case _o.Invoke:return e;case _o.ContentChange:return i;case _o.TriggerCharacter:default:return e}}be();qe();st();gt();wr();on();wt();re();Bt();ti();$r();be();qe();Xr();kn();Zn();var cie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Jw=function(i,e){return function(t,n){e(t,n,i)}},vr=te,die=Qt("parameter-hints-next",De.chevronDown,g("parameterHintsNextIcon","Icon for show next parameter hint.")),hie=Qt("parameter-hints-previous",De.chevronUp,g("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Xm=class jB extends Y{constructor(e,t,n,r,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new W),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Gn({editor:e},o,r)),this.keyVisible=Ha.Visible.bindTo(n),this.keyMultipleSignatures=Ha.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=vr(".editor-widget.parameter-hints-widget"),t=oe(e,vr(".phwrapper"));t.tabIndex=-1;let n=oe(t,vr(".controls")),r=oe(n,vr(".button"+Ve.asCSSSelector(hie))),o=oe(n,vr(".overloads")),s=oe(n,vr(".button"+Ve.asCSSSelector(die)));this._register(jt(r,"click",u=>{tc.stop(u),this.previous()})),this._register(jt(s,"click",u=>{tc.stop(u),this.next()}));let a=vr(".body"),l=new oh(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=oe(a,vr(".signature")),d=oe(a,vr(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(u=>{this.visible&&this.editor.layoutContentWidget(this)}));let h=()=>{if(!this.domNodes)return;let u=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${u.fontSize}px`,this.domNodes.element.style.lineHeight=`${u.lineHeight/u.fontSize}`};h(),this._register(Nt.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(u=>u.hasChanged(48)).on(h,null)),this._register(this.editor.onDidLayoutChange(u=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;let n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let r=e.signatures[e.activeSignature];if(!r)return;let o=oe(this.domNodes.signature,vr(".code")),s=this.editor.getOption(48);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=r.parameters.length>0,l=(t=r.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,r,l);else{let h=oe(o,vr("span"));h.textContent=r.label}let c=r.parameters[l];if(c!=null&&c.documentation){let h=vr("span.documentation");if(typeof c.documentation=="string")h.textContent=c.documentation;else{let u=this.renderMarkdownDocs(c.documentation);h.appendChild(u.element)}oe(this.domNodes.docs,vr("p",{},h))}if(r.documentation!==void 0)if(typeof r.documentation=="string")oe(this.domNodes.docs,vr("p",{},r.documentation));else{let h=this.renderMarkdownDocs(r.documentation);oe(this.domNodes.docs,h.element)}let d=this.hasDocs(r,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let h="",u=r.parameters[l];Array.isArray(u.label)?h=r.label.substring(u.label[0],u.label[1]):h=u.label,u.documentation&&(h+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),r.documentation&&(h+=typeof r.documentation=="string"?`, ${r.documentation}`:`, ${r.documentation.value}`),this.announcedLabel!==h&&(Kt(g("hint","{0}, hint",h)),this.announcedLabel=h)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&$a(t.documentation).length>0||t&&typeof t.documentation=="object"&&$a(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&$a(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&$a(e.documentation.value).length>0)}renderParameters(e,t,n){let[r,o]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,r);let a=document.createElement("span");a.textContent=t.label.substring(r,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),oe(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let r=new RegExp(`(\\W|^)${Ws(n.label)}(?=\\W|$)`,"g");r.test(e.label);let o=r.lastIndex-n.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return jB.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};Xm.ID="editor.widget.parameterHintsWidget";Xm=cie([Jw(2,we),Jw(3,ci),Jw(4,li)],Xm);pe("editorHoverWidget.highlightForeground",{dark:$o,light:$o,hcDark:$o,hcLight:$o},g("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var uie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},VB=function(i,e){return function(t,n){e(t,n,i)}},pd=class KB extends Y{static get(e){return e.getContribution(KB.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new Ym(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{var o;r?(this.widget.value.show(),this.widget.value.render(r)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new Ud(()=>this._register(t.createInstance(Xm,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};pd.ID="editor.controller.parameterHints";pd=uie([VB(1,Ce),VB(2,le)],pd);var Zw=class extends K{constructor(){super({id:"editor.action.triggerParameterHints",label:g("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:I.hasSignatureHelpProvider,kbOpts:{kbExpr:I.editorTextFocus,primary:3082,weight:100}})}run(e,t){let n=pd.get(t);n==null||n.trigger({triggerKind:_o.Invoke})}};Se(pd.ID,pd,2);F(Zw);var e7=100+75,t7=ii.bindToContribution(pd.get);ge(new t7({id:"closeParameterHints",precondition:Ha.Visible,handler:i=>i.cancel(),kbOpts:{weight:e7,kbExpr:I.focus,primary:9,secondary:[1033]}}));ge(new t7({id:"showPrevParameterHint",precondition:G.and(Ha.Visible,Ha.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:e7,kbExpr:I.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));ge(new t7({id:"showNextParameterHint",precondition:G.and(Ha.Visible,Ha.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:e7,kbExpr:I.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));wr();ct();Gt();it();re();ti();Cn();g1();Me();xn();St();Ie();ht();be();tI();qe();st();ff();mc();rc();re();St();be();qe();hn();kn();ln();var mie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},i7=function(i,e){return function(t,n){e(t,n,i)}},Qm=new Ne("renameInputVisible",!1,g("renameInputVisible","Whether the rename input widget is visible")),cb=class{constructor(e,t,n,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._disposables=new W,this.allowEditorOverflow=!0,this._visibleContextKey=Qm.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(48)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",g("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,r,o;if(!this._input||!this._domNode)return;let s=e.getColor(Nf),a=e.getColor(Rf);this._domNode.style.backgroundColor=String((t=e.getColor(Ks))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((n=e.getColor(AI))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((r=e.getColor(kI))!==null&&r!==void 0?r:"");let l=e.getColor(LI);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(o=l==null?void 0:l.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;let e=this._editor.getOption(48);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;let[n,r]=this._acceptKeybindings;return this._label.innerText=g({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(r))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,r,o,s){this._domNode.classList.toggle("preview",o),this._position=new ie(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new W;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:o&&c})},a.add(s.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};cb=mie([i7(2,Ki),i7(3,mt),i7(4,we)],cb);ut();var pie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fd=function(i,e){return function(t,n){e(t,n,i)}},gd=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jm=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return gd(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let r=this._providers[this._providerRenameIdx];if(!r.resolveRenameLocation)break;let o=yield r.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}let n=this.model.getWordAtPosition(this.position);return n?{range:new k(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word,rejectReason:t.length>0?t.join(`
|
|
`):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
|
`):void 0}})}provideRenameEdits(e,t){return gd(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,n,r){return gd(this,void 0,void 0,function*(){let o=this._providers[t];if(!o)return{edits:[],rejectReason:n.join(`
|
|
`)};let s=yield o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,t+1,n.concat(g("no result","No result.")),r);return s})}};function fie(i,e,t,n){return gd(this,void 0,void 0,function*(){let r=new Jm(e,t,i),o=yield r.resolveRenameLocation(ze.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,ze.None)})}var _d=class qB{static get(e){return e.getContribution(qB.ID)}constructor(e,t,n,r,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new W,this._cts=new qt,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(cb,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return gd(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new qt,!this.editor.hasModel())return;let n=this.editor.getPosition(),r=new Jm(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;let o=new f1(this.editor,5,void 0,this._cts.token),s;try{let p=r.resolveRenameLocation(o.token);this._progressService.showWhile(p,250),s=yield p}catch(p){(e=Xi.get(this.editor))===null||e===void 0||e.showMessage(p||g("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Xi.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(o.token.isCancellationRequested)return;let a=new f1(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!k.isEmpty(l)&&!k.spansMultipleLines(l)&&k.containsRange(s.range,l)&&(c=Math.max(0,l.startColumn-s.range.startColumn),d=Math.min(s.range.endColumn,l.endColumn)-s.range.startColumn);let h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),u=yield this._renameInputField.getInput(s.range,s.text,c,d,h,a.token);if(typeof u=="boolean"){u&&this.editor.focus(),a.dispose();return}this.editor.focus();let m=kf(r.provideRenameEdits(u.newName,a.token),a.token).then(p=>gd(this,void 0,void 0,function*(){if(!(!p||!this.editor.hasModel())){if(p.rejectReason){this._notificationService.info(p.rejectReason);return}this.editor.setSelection(k.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(p,{editor:this.editor,showPreview:u.wantsPreview,label:g("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,u.newName),code:"undoredo.rename",quotableLabel:g("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,u.newName),respectAutoSaveConfig:!0}).then(f=>{f.ariaSummary&&Kt(g("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,u.newName,f.ariaSummary))}).catch(f=>{this._notificationService.error(g("rename.failedApply","Rename failed to apply edits")),this._logService.error(f)})}}),p=>{this._notificationService.error(g("rename.failed","Rename failed to compute edits")),this._logService.error(p)}).finally(()=>{a.dispose()});return this._progressService.showWhile(m,250),m})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};_d.ID="editor.contrib.renameController";_d=pie([fd(1,Ce),fd(2,ni),fd(3,Wf),fd(4,Gs),fd(5,Ja),fd(6,nA),fd(7,le)],_d);var n7=class extends K{constructor(){super({id:"editor.action.rename",label:g("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:G.and(I.writable,I.hasRenameProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(_t),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return Qe.isUri(r)&&ie.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},Be):super.runCommand(e,t)}run(e,t){let n=_d.get(t);return n?n.run():Promise.resolve()}};Se(_d.ID,_d,4);F(n7);var r7=ii.bindToContribution(_d.get);ge(new r7({id:"acceptRenameInput",precondition:Qm,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:G.and(I.focus,G.not("isComposing")),primary:3}}));ge(new r7({id:"acceptRenameInputWithPreview",precondition:G.and(Qm,G.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:G.and(I.focus,G.not("isComposing")),primary:1024+3}}));ge(new r7({id:"cancelRenameInput",precondition:Qm,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:I.focus,primary:9,secondary:[1033]}}));Bn("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;ot(typeof r=="string");let{renameProvider:o}=i.get(le);return fie(o,e,t,r)});Bn("_executePrepareRename",function(i,e,t){return gd(this,void 0,void 0,function*(){let{renameProvider:n}=i.get(le),o=yield new Jm(e,t,n).resolveRenameLocation(ze.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});er.as(Cf.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:g("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});re();it();Ya();sn();ct();Gt();ln();Gt();it();Cn();Ya();Si();ti();GW();yn();function gie(i){for(let e=0,t=i.length;e<t;e+=4){let n=i[e+0],r=i[e+1],o=i[e+2],s=i[e+3];i[e+0]=s,i[e+1]=o,i[e+2]=r,i[e+3]=n}}function _ie(i){let e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return aT()||gie(e),ZT.wrap(e)}function o7(i){let e=new Uint32Array(vie(i)),t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(let n of i.deltas)e[t++]=n.start,e[t++]=n.deleteCount,n.data?(e[t++]=n.data.length,e.set(n.data,t),t+=n.data.length):e[t++]=0}return _ie(e)}function vie(i){let e=0;if(e+=1+1,i.type==="full")e+=1+i.data.length;else{e+=1,e+=(1+1+1)*i.deltas.length;for(let t of i.deltas)t.data&&(e+=t.data.length)}return e}Ie();ut();var Vl=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function Zm(i){return i&&!!i.data}function l7(i){return i&&Array.isArray(i.edits)}var s7=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};function c7(i,e){return i.has(e)}function bie(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function d7(i,e,t,n,r){return Vl(this,void 0,void 0,function*(){let o=bie(i,e),s=yield Promise.all(o.map(a=>Vl(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(d){c=d,l=null}return(!l||!Zm(l)&&!l7(l))&&(l=null),new s7(a,l,c)})));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null})}function yie(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}var a7=class{constructor(e,t){this.provider=e,this.tokens=t}};function GB(i,e){return i.has(e)}function $B(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function db(i,e,t,n){return Vl(this,void 0,void 0,function*(){let r=$B(i,e),o=yield Promise.all(r.map(s=>Vl(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){bt(l),a=null}return(!a||!Zm(a))&&(a=null),new a7(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}Je.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>Vl(void 0,void 0,void 0,function*(){let[t]=e;ot(t instanceof Qe);let n=i.get(Ri).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(le),o=yie(r,n);return o?o[0].getLegend():i.get(Pt).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));Je.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>Vl(void 0,void 0,void 0,function*(){let[t]=e;ot(t instanceof Qe);let n=i.get(Ri).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(le);if(!c7(r,n))return i.get(Pt).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=yield d7(r,n,null,null,ze.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!Zm(a))return;let l=o7({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));Je.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>Vl(void 0,void 0,void 0,function*(){let[t,n]=e;ot(t instanceof Qe);let r=i.get(Ri).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(le),s=$B(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!k.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield db(o,r,k.lift(n),ze.None);if(a)return a.provider.getLegend()}));Je.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>Vl(void 0,void 0,void 0,function*(){let[t,n]=e;ot(t instanceof Qe),ot(k.isIRange(n));let r=i.get(Ri).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(le),s=yield db(o,r,k.lift(n),ze.None);if(!(!s||!s.tokens))return o7({id:0,type:"full",data:s.tokens.data})}));ec();ut();var ep="editor.semanticHighlighting";function tp(i,e,t){var n;let r=(n=t.getValue(ep,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}var YB=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ms=function(i,e){return function(t,n){e(t,n,i)}},h7=class extends Y{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new ip(d,e,n,o,s)},l=(d,h)=>{h.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let h=this._watchers[d.uri.toString()];tp(d,n,r)?h||a(d):h&&l(d,h)}};this._register(t.onModelAdded(d=>{tp(d,n,r)&&a(d)})),this._register(t.onModelRemoved(d=>{let h=this._watchers[d.uri.toString()];h&&l(d,h)})),this._register(r.onDidChangeConfiguration(d=>{d.affectsConfiguration(ep)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};h7=YB([Ms(0,w1),Ms(1,Ri),Ms(2,Ki),Ms(3,nt),Ms(4,qi),Ms(5,le)],h7);var ip=class vd extends Y{constructor(e,t,n,r,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:vd.REQUEST_MIN_DELAY,max:vd.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new kt(()=>this._fetchDocumentSemanticTokensNow(),vd.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{ei(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!c7(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new qt,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=d7(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new Sn(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{let{provider:c,tokens:d}=l,h=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,h,o)}},l=>{l&&(Wr(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||Be(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,o){o=Math.min(o,n.length-r,e.length-t);for(let s=0;s<o;s++)n[r+s]=e[t+s]}_setDocumentSemanticTokens(e,t,n,r){let o=this._currentDocumentResponse,s=()=>{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(l7(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(let u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),d=l.length,h=c.length;for(let u=t.edits.length-1;u>=0;u--){let m=t.edits[u];if(m.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,u,m.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let p=d-(m.start+m.deleteCount);p>0&&(vd._copy(l,d-p,c,h-p,p),h-=p),m.data&&(vd._copy(m.data,0,c,h-m.data.length,m.data.length),h-=m.data.length),d=m.start}d>0&&vd._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(Zm(t)){this._currentDocumentResponse=new u7(e,t.resultId,t.data);let a=ag(t,n,this._model.getLanguageId());if(r.length>0)for(let l of r)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};ip.REQUEST_MIN_DELAY=300;ip.REQUEST_MAX_DELAY=2e3;ip=YB([Ms(1,w1),Ms(2,Ki),Ms(3,qi),Ms(4,le)],ip);var u7=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};rA(h7);ct();re();Me();sn();ln();ec();ut();var Sie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},np=function(i,e){return function(t,n){e(t,n,i)}},rp=class extends Y{constructor(e,t,n,r,o,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new kt(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(ep)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;t<n;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;let e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!tp(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!GB(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}let t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(n=>this._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),r=Ht(s=>Promise.resolve(db(this._provider,e,t,s))),o=new Sn(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,ag(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};rp.ID="editor.contrib.viewportSemanticTokens";rp=Sie([np(1,w1),np(2,Ki),np(3,nt),np(4,qi),np(5,le)],rp);Se(rp.ID,rp,1);Rt();Gt();it();Me();St();Ie();Di();ht();Bt();Ie();var hb=class{provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o),this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let r=t.getWordAtPosition(n);if(!r)return;let{word:o,startColumn:s}=r,a=n.column-s,l=a,c=a,d=0;for(;l>=0;l--){let h=o.charCodeAt(l);if(l!==a&&(h===95||h===45))break;if(F2(h)&&H2(d))break;d=h}for(l+=1;c<o.length;c++){let h=o.charCodeAt(c);if(H2(h)&&F2(d))break;if(h===95||h===45)break;d=h}l<c&&e.push({range:new k(n.lineNumber,s+l,n.lineNumber,s+c)})}_addWordRanges(e,t,n){let r=t.getWordAtPosition(n);r&&e.push({range:new k(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)})}_addWhitespaceLine(e,t,n){t.getLineLength(n.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new k(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}};be();mi();Si();ut();Us();ti();Cn();var Cie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wie=function(i,e){return function(t,n){e(t,n,i)}},mb=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},m7=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},xu=class XB{static get(e){return e.getContribution(XB.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return mb(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield QB(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(109),ze.None).then(o=>{var s;if(!(!Xt(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Uo(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new m7(0,a)),(s=this._selectionListener)===null||s===void 0||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));let r=this._state.map(o=>ye.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}})}};xu.ID="editor.contrib.smartSelectController";xu=Cie([wie(1,le)],xu);var ub=class extends K{constructor(e,t){super(t),this._forward=e}run(e,t){return mb(this,void 0,void 0,function*(){let n=xu.get(t);n&&(yield n.run(this._forward))})}},p7=class extends ub{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:g("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};Je.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");var f7=class extends ub{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:g("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ae.MenubarSelectionMenu,group:"1_basic",title:g({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Se(xu.ID,xu,4);F(p7);F(f7);function QB(i,e,t,n,r){return mb(this,void 0,void 0,function*(){let o=i.all(e).concat(new hb);o.length===1&&o.unshift(new Rl);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Xt(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(let h of c[d])k.isIRange(h.range)&&k.containsPosition(h.range,t[d])&&a[d].push(k.lift(h.range))}},bt));return yield Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((u,m)=>ie.isBefore(u.getStartPosition(),m.getStartPosition())?1:ie.isBefore(m.getStartPosition(),u.getStartPosition())||ie.isBefore(u.getEndPosition(),m.getEndPosition())?-1:ie.isBefore(m.getEndPosition(),u.getEndPosition())?1:0);let c=[],d;for(let u of l)(!d||k.containsRange(u,d)&&!k.equalsRange(u,d))&&(c.push(u),d=u);if(!n.selectLeadingAndTrailingWhitespace)return c;let h=[c[0]];for(let u=1;u<c.length;u++){let m=c[u-1],p=c[u];if(p.startLineNumber!==m.startLineNumber||p.endLineNumber!==m.endLineNumber){let f=new k(m.startLineNumber,e.getLineFirstNonWhitespaceColumn(m.startLineNumber),m.endLineNumber,e.getLineLastNonWhitespaceColumn(m.endLineNumber));f.containsRange(m)&&!f.equalsRange(m)&&p.containsRange(f)&&!p.equalsRange(f)&&h.push(f);let _=new k(m.startLineNumber,1,m.endLineNumber,e.getLineMaxColumn(m.endLineNumber));_.containsRange(m)&&!_.equalsRange(f)&&p.containsRange(_)&&!p.equalsRange(_)&&h.push(_)}h.push(p)}return h})})}Je.registerCommand("_executeSelectionRangeProvider",function(i,...e){return mb(this,void 0,void 0,function*(){let[t,n]=e;ot(Qe.isUri(t));let r=i.get(le).selectionRangeProvider,o=yield i.get(Vi).createModelReference(t);try{return QB(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0},ze.None)}finally{o.dispose()}})});Me();Me();be();be();var JB=Object.freeze({View:{value:g("view","View"),original:"View"},Help:{value:g("help","Help"),original:"Help"},Test:{value:g("test","Test"),original:"Test"},File:{value:g("file","File"),original:"File"},Preferences:{value:g("preferences","Preferences"),original:"Preferences"},Developer:{value:g({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}});mi();sn();qe();ht();re();ut();gt();WW();re();St();eI();var op=class{constructor(e,t){this.lineNumbers=e,this.lastLineRelativePosition=t}},ZB=ah("stickyScrollViewLayer",{createHTML:i=>i}),pb=class extends Y{constructor(e){super(),this._editor=e,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new W),this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Fr),this._rootDomNode.style.width=`${this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth}px`}get hoverOnLine(){return this._hoverOnLine}get hoverOnColumn(){return this._hoverOnColumn}get lineNumbers(){return this._lineNumbers}getCurrentLines(){return this._lineNumbers}setState(e){nn(this._rootDomNode),this._disposableStore.clear(),this._lineNumbers.length=0;let t=this._editor.getOption(64);e.lineNumbers.length*t+e.lastLineRelativePosition>0?(this._lastLineRelativePosition=e.lastLineRelativePosition,this._lineNumbers=e.lineNumbers):(this._lastLineRelativePosition=0,this._lineNumbers=[]),this._renderRootNode()}_renderRootNode(){if(!this._editor._getViewModel())return;for(let[r,o]of this._lineNumbers.entries()){let s=this._renderChildNode(r,o);this._rootDomNode.appendChild(s)}let e=this._editor.getOption(64),t=this._lineNumbers.length*e+this._lastLineRelativePosition;this._rootDomNode.style.display=t>0?"block":"none",this._rootDomNode.style.height=t.toString()+"px",this._rootDomNode.setAttribute("role","list"),this._editor.getOption(70).side==="left"&&(this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px")}_renderChildNode(e,t){let n=document.createElement("div"),r=this._editor._getViewModel(),o=r.coordinatesConverter.convertModelPositionToViewPosition(new ie(t,1)).lineNumber,s=r.getViewLineRenderingData(o),a=this._editor.getLayoutInfo(),l=a.width-a.minimap.minimapCanvasOuterWidth-a.verticalScrollbarWidth,c=this._editor.getOption(70).side,d=this._editor.getOption(64),h=this._editor.getOption(65),u;try{u=y1.filter(s.inlineDecorations,o,s.minColumn,s.maxColumn)}catch(T){u=[]}let m=new eg(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,u,s.tabSize,s.startVisibleColumn,1,1,1,500,"none",!0,!0,null),p=new Sf(2e3);tg(m,p);let f;ZB?f=ZB.createHTML(p.build()):f=p.build();let _=document.createElement("span");_.className="sticky-line",_.classList.add(`stickyLine${t}`),_.style.lineHeight=`${d}px`,_.innerHTML=f;let b=document.createElement("span");b.className="sticky-line",b.style.lineHeight=`${d}px`,c==="left"?b.style.width=`${a.contentLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(b.style.width=`${a.contentLeft}px`);let C=document.createElement("span");return h.renderType===1||h.renderType===3&&t%10===0?C.innerText=t.toString():h.renderType===2&&(C.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),C.className="sticky-line-number",C.style.lineHeight=`${d}px`,C.style.width=`${a.lineNumbersWidth}px`,c==="left"?C.style.paddingLeft=`${a.lineNumbersLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(C.style.paddingLeft=`${a.lineNumbersLeft}px`),b.appendChild(C),this._editor.applyFontInfo(_),this._editor.applyFontInfo(C),n.appendChild(b),n.appendChild(_),n.className="sticky-line-root",n.setAttribute("role","listitem"),n.tabIndex=0,n.style.lineHeight=`${d}px`,n.style.width=`${l}px`,n.style.height=`${d}px`,n.style.zIndex="0",e===this._lineNumbers.length-1&&(n.style.position="relative",n.style.zIndex="-1",n.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(jt(n,"mouseover",T=>{if(this._editor.hasModel()){let A=new fT(T).target.innerText;this._hoverOnLine=t,this._hoverOnColumn=this._editor.getModel().getLineContent(t).indexOf(A)+1||-1}})),n}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}};re();ut();Gt();ct();Rt();Tr();wt();an();re();ut();Rt();Gt();it();ef();St();Ie();st();ac();Ya();re();ut();var xie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},g7=function(i,e){return function(t,n){e(t,n,i)}},Eie=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kl=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=n;for(let o=0;t.children.get(r)!==void 0;o++)r=`${n}_${o}`;return r}static empty(e){return e.children.size===0}},Eu=class extends Kl{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},sp=class extends Kl{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},ap=class i extends Kl{static create(e,t,n){let r=new qt(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var h;let u=Kl.findId(`provider_${d}`,o),m=new sp(u,o,(h=c.displayName)!==null&&h!==void 0?h:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(p=>{for(let f of p||[])i._makeOutlineElement(f,m);return m},p=>(bt(p),m)).then(p=>{Kl.empty(p)?p.remove():o._groups.set(u,p)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Uo(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let n=Kl.findId(e,t),r=new Eu(n,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,r);t.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=jr.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Eu?e.push(t.symbol):e.push(...jr.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>k.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>ie.compare(k.getStartPosition(n.range),k.getStartPosition(r.range))||ie.compare(k.getEndPosition(r.range),k.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let r of t)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||n,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&i._flattenDocumentSymbols(e,r.children,r.name)}},lp=Jn("IOutlineModelService"),_7=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new W,this._cache=new il(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return Eie(this,void 0,void 0,function*(){let n=this._languageFeaturesService.documentSymbolProvider,r=n.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Uo(o.provider,r)){let a=new qt;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:ap.create(n,e,a.token),model:void 0},this._cache.set(e.id,o);let l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return yield o.promise}finally{s.dispose()}})}};_7=xie([g7(0,le),g7(1,qi),g7(2,Ri)],_7);tr(lp,_7,1);ct();an();it();var Ba=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},bd=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},yd=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}};ef();var vb=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dp=function(i,e){return function(t,n){e(t,n,i)}},ez=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},cp;(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(cp||(cp={}));var ql;(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(ql||(ql={}));var fb=class{constructor(e,t,n,r){this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new Ir(300);let o=new v7(n),s=new y7(this._editor,n),a=new b7(this._editor,t);switch(r){case cp.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case cp.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case cp.INDENTATION_MODEL:this._modelProviders.push(a);break}this._store=new W}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return ez(this,void 0,void 0,function*(){return this._store.clear(),this._store.add({dispose:()=>{var r;this._cancelModelPromise(),(r=this._updateScheduler)===null||r===void 0||r.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>ez(this,void 0,void 0,function*(){for(let r of this._modelProviders){let{statusPromise:o,modelPromise:s}=r.computeStickyModel(e,t,n);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case ql.CANCELED:return this._store.clear(),null;case ql.VALID:return r.stickyModel}}return null}))})}};fb=vb([dp(1,rt),dp(2,le)],fb);var gb=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,ql.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let r=Ht(o=>this.createModelFromProvider(e,t,o));return{statusPromise:r.then(o=>this.isModelValid(o)?n.isCancellationRequested?ql.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,o),ql.VALID):this._invalid()).then(void 0,o=>(Be(o),ql.CANCELED)),modelPromise:r}}isModelValid(e){return!0}isProviderValid(e){return!0}},v7=class extends gb{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return ap.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,r){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(r,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new yd(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(jr.first(e.children.values())instanceof sp){let a=jr.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[h,u]of e.children.entries()){let m=this._findSumOfRangesOfGroup(u);m>c&&(d=u,c=m,l=u.id)}t=l,n=d.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new Ba(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new Ba(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new bd(void 0,r,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())n.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));n.sort((o,s)=>this._comparator(o.range,s.range));let r=new Ba(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new bd(r,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Eu?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};v7=vb([dp(0,le)],v7);var _b=class extends gb{constructor(e){super(),this._foldingLimitReporter=new q0(e)}createStickyModel(e,t,n,r){let o=this._fromFoldingRegions(r);return new yd(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new bd(void 0,[],void 0);for(let o=0;o<t;o++){let s=e.getParentIndex(o),a;s!==-1?a=n[s]:a=r;let l=new bd(new Ba(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),n.push(l)}return r}},b7=class extends _b{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,n){return new $c(e,this._languageConfigurationService,this._foldingLimitReporter).compute(n)}};b7=vb([dp(1,rt)],b7);var y7=class extends _b{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return Ts.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,n){let r=Ts.getFoldingRangeProviders(this._languageFeaturesService,e);return new Yc(e,r,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};y7=vb([dp(1,le)],y7);var Tie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tz=function(i,e){return function(t,n){e(t,n,i)}},iz=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},S7=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},bb=class extends Y{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._store.add(new Re),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=new W,this._updateSoon=this._register(new kt(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(111)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(111),!this._options.enabled){this._sessionStore.clear();return}this._stickyModelProvider=new fb(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel),this._sessionStore.add(this._editor.onDidChangeModel(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update()}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return iz(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new qt,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return iz(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;let t=this._editor.getModel(),n=t.getVersionId(),o=(this._model?!qd(this._model.uri,t.uri):!1)?setTimeout(()=>{e.isCancellationRequested||(this._model=new yd(t.uri,t.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0;this._model=yield this._stickyModelProvider.update(t,n,e),clearTimeout(o)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,r,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;d<t.children.length;d++){let h=t.children[d];h.range&&a.push(h.range.startLineNumber)}let l=this.updateIndex(sc(a,e.startLineNumber,(d,h)=>d-h)),c=this.updateIndex(sc(a,e.startLineNumber+r,(d,h)=>d-h));for(let d=l;d<=c;d++){let h=t.children[d];if(!h)return;if(h.range){let u=h.range.startLineNumber,m=h.range.endLineNumber;e.startLineNumber<=m+1&&u-1<=e.endLineNumber&&u!==s&&(s=u,n.push(new S7(u,m-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,h,n,r+1,u))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,h,n,r,o)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let r=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,r,0,-1);let o=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(o)for(let s of o)r=r.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return r}};bb=Tie([tz(1,le),tz(2,rt)],bb);st();mi();qe();ht();Ie();St();Gt();an();gt();var Iie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Tu=function(i,e){return function(t,n){e(t,n,i)}},nz=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},uo=class rz extends Y{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=r,this._contextKeyService=a,this._sessionStore=new W,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._stickyScrollWidget=new pb(this._editor),this._stickyLineCandidateProvider=new bb(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new op([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(111)&&this._readConfiguration()})),this._register(jt(this._stickyScrollWidget.getDomNode(),Qn.CONTEXT_MENU,c=>nz(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=I.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=I.stickyScrollVisible.bindTo(this._contextKeyService);let l=this._register(zs(this._stickyScrollWidget.getDomNode()));this._register(l.onDidBlur(c=>{let d=this._stickyScrollWidget.getDomNode().clientHeight;this._positionRevealed===!1&&d===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(l.onDidFocus(c=>{this.focus()})),this._register(this._createClickLinkGesture()),this._register(jt(this._stickyScrollWidget.getDomNode(),Qn.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(rz.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}if(this._stickyScrollFocusedContextKey.get()===!0)return;this._focused=!0,this._focusDisposableStore=new W,this._stickyScrollFocusedContextKey.set(!0);let t=this._stickyScrollWidget.getDomNode();t.lastElementChild.focus(),this._stickyElements=t.children,this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1}focusNext(){this._focusedStickyElementIndex<this._stickyElements.length-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyElements.item(this._focusedStickyElementIndex).focus()}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._positionRevealed=!0,this._editor.revealPosition(e),this._editor.setSelection(k.fromPositions(e)),this._editor.focus()}_createClickLinkGesture(){let e=new W,t=new W;e.add(t);let n=new Ds(this._editor,!0);return e.add(n),e.add(n.onMouseMoveOrRelevantKeyDown(([r,o])=>{if(!this._editor.hasModel()||!r.hasTriggerModifier){t.clear();return}let s=r.target;if(s.detail===this._stickyScrollWidget.getId()&&s.element.innerText===s.element.innerHTML){let a=s.element.innerText;if(this._stickyScrollWidget.hoverOnColumn===-1)return;let l=this._stickyScrollWidget.hoverOnLine,c=this._stickyScrollWidget.hoverOnColumn,d=new k(l,c,l,c+a.length);if(!d.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=d,t.clear();else if(s.element.style.textDecoration==="underline")return;let h=new qt;t.add(ft(()=>h.dispose(!0)));let u;rd(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new ie(l,c+1),h.token).then(m=>{if(!h.token.isCancellationRequested)if(m.length!==0){this._candidateDefinitionsLength=m.length;let p=s.element;u!==p?(t.clear(),u=p,u.style.textDecoration="underline",t.add(ft(()=>{u.style.textDecoration="none"}))):u||(u=p,u.style.textDecoration="underline",t.add(ft(()=>{u.style.textDecoration="none"})))}else t.clear()})}else t.clear()})),e.add(n.onCancel(()=>{t.clear()})),e.add(n.onExecute(r=>nz(this,void 0,void 0,function*(){r.target.detail===this._stickyScrollWidget.getId()&&(r.hasTriggerModifier?(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:1})),this._instaService.invokeFunction(K5,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):r.isRightClick||(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:this._stickyScrollWidget.hoverOnColumn})))}))),e}_onContextMenu(e){this._contextMenuService.showContextMenu({menuId:ae.StickyScrollContext,getAnchor:()=>e})}_readConfiguration(){let e=this._editor.getOption(111);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._renderStickyScroll())),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>this._renderStickyScroll())),this._enabled=!0);this._editor.getOption(65).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>this._renderStickyScroll()))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let r of e.ranges)if(n>=r.fromLineNumber&&n<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let e=this._editor.getLayoutInfo(),t=e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${t}px`;let n=e.height/this._editor.getOption(64);this._maxStickyLines=Math.round(n*.25)}_renderStickyScroll(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.lineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._stickyElements=this._stickyScrollWidget.getDomNode().children,this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyElements.length-1,this._focusedStickyElementIndex!==-1&&this._stickyElements.item(this._focusedStickyElementIndex).focus();else{let n=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(n)||(this._focusedStickyElementIndex=this._stickyElements.length-1),this._stickyElements.item(this._focusedStickyElementIndex).focus())}}findScrollWidgetState(){let e=this._editor.getOption(64),t=Math.min(this._maxStickyLines,this._editor.getOption(111).maxLineCount),n=this._editor.getScrollTop(),r=0,o=[],s=this._editor.getVisibleRanges();if(s.length!==0){let a=new Ba(s[0].startLineNumber,s[s.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(let c of l){let d=c.startLineNumber,h=c.endLineNumber,u=c.nestingDepth;if(h-d>0){let m=(u-1)*e,p=u*e,f=this._editor.getBottomForLineNumber(d)-n,_=this._editor.getTopForLineNumber(h)-n,b=this._editor.getBottomForLineNumber(h)-n;if(m>_&&m<=b){o.push(d),r=b-p;break}else p>f&&p<=b&&o.push(d);if(o.length===t)break}}}return new op(o,r)}dispose(){super.dispose(),this._sessionStore.dispose()}};uo.ID="store.contrib.stickyScrollController";uo=Iie([Tu(1,Jo),Tu(2,le),Tu(3,Ce),Tu(4,rt),Tu(5,qi),Tu(6,we)],uo);var kie=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yb=class extends Gr{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:g("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:g({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:JB.View,toggled:{condition:G.equals("config.editor.stickyScroll.enabled",!0),title:g("stickyScroll","Sticky Scroll"),mnemonicTitle:g({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:ae.CommandPalette},{id:ae.MenubarViewMenu,group:"5_editor",order:2},{id:ae.StickyScrollContext}]})}run(e){return kie(this,void 0,void 0,function*(){let t=e.get(nt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}},Tb=100,Sb=class extends Za{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:g("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:g({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:G.and(G.has("config.editor.stickyScroll.enabled"),I.stickyScrollVisible),menu:[{id:ae.CommandPalette}]})}runEditorCommand(e,t){var n;(n=uo.get(t))===null||n===void 0||n.focus()}},Cb=class extends Za{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:g("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Tb,primary:18}})}runEditorCommand(e,t){var n;(n=uo.get(t))===null||n===void 0||n.focusNext()}},wb=class extends Za{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:g("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Tb,primary:16}})}runEditorCommand(e,t){var n;(n=uo.get(t))===null||n===void 0||n.focusPrevious()}},xb=class extends Za{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:g("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Tb,primary:3}})}runEditorCommand(e,t){var n;(n=uo.get(t))===null||n===void 0||n.goToFocused()}},Eb=class extends Za{constructor(){super({id:"editor.action.selectEditor",title:{value:g("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Tb,primary:9}})}runEditorCommand(e,t){var n;(n=uo.get(t))===null||n===void 0||n.selectEditor()}};mi();Se(uo.ID,uo,1);Ft(yb);Ft(Sb);Ft(wb);Ft(Cb);Ft(xb);Ft(Eb);Gt();ef();re();Me();xn();Ie();ut();st();var E7=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sd=function(i,e){return function(t,n){e(t,n,i)}},Aie=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},C7=class{constructor(e,t,n,r,o,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=r,this.command=o,this.completion=s}},w7=class extends nT{constructor(e,t,n,r,o,s){super(o.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn<n.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var e;let t=[],{items:n}=this.completionModel,r=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},n),o=jr.slice(n,r),s=jr.slice(n,0,r),a=5;for(let l of jr.concat(o,s)){if(l.score===Vs.Default)continue;let c=new k(l.editStart.lineNumber,l.editStart.column,l.editInsertEnd.lineNumber,l.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),d=l.completion.insertTextRules&&l.completion.insertTextRules&4?{snippet:l.completion.insertText}:l.completion.insertText;t.push(new C7(c,d,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(ze.None)}return t}};w7=E7([Sd(5,nu)],w7);var x7=class{constructor(e,t,n,r){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=r}provideInlineCompletions(e,t,n,r){var o;return Aie(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;let s=this._getEditorOption(86,e);if(As.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(As.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h,u=e.getValueInRange(new k(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let m=new gm(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=m,this._lastResult.acquire(),h=this._lastResult}else{let m=yield rm(this._languageFeatureService.completionProvider,e,t,new ka(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},r),p;m.needsClipboard&&(p=yield this._clipboardService.readText());let f=new ou(m.items,t.column,new gm(u,0),Dl.None,this._getEditorOption(114,e),this._getEditorOption(108,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},p);h=new w7(e,t.lineNumber,c,f,m,this._suggestMemoryService)}return this._lastResult=h,h})}handleItemDidShow(e,t){t.completion.resolve(ze.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let r=e.getValueInRange(k.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(r)&&o.add(s);if(o.size!==0)return{providers:o,ch:r}}};x7=E7([Sd(1,le),Sd(2,qs),Sd(3,nu)],x7);var Ib=class Iu{constructor(e,t,n,r){if(++Iu._counter===1){let o=r.createInstance(x7,(s,a)=>{var l;return((l=n.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Iu._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Iu._counter===0&&((e=Iu._disposable)===null||e===void 0||e.dispose(),Iu._disposable=void 0)}};Ib._counter=0;Ib=E7([Sd(1,le),Sd(2,_t),Sd(3,Ce)],Ib);Se("suggest.inlineCompletionsProvider",Ib,0);ct();on();re();yn();Bt();Me();dn();Qf();$r();gt();ic();re();st();gt();pT();bk();wt();re();Xr();var Lie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nie=function(i,e){return function(t,n){e(t,n,i)}},kb=class extends Y{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},r){var o;super(),this._link=t,this._enabled=!0,this.el=oe(e,te("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new zf(this.el,"click")),a=this._register(new zf(this.el,"keypress")),l=Nt.chain(a.event).map(h=>new lf(h)).filter(h=>h.keyCode===3).event,c=this._register(new zf(this.el,vk.Tap)).event;this._register(Vf.addTarget(this.el));let d=Nt.any(s.event,l,c);this._register(d(h=>{this.enabled&&(tc.stop(h,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};kb=Lie([Nie(3,ci)],kb);Zn();var oz=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sz=function(i,e){return function(t,n){e(t,n,i)}},Rie=26,Ab=class extends Y{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(T7))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Rie)}};Ab=oz([sz(1,Ce)],Ab);var T7=class extends Y{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Gn,{}),this.element=te("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=te("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){nn(this.element)}show(e){nn(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=oe(this.element,te("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(te(`div${Ve.asCSSSelector(e.icon)}`));let r=oe(this.element,te("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=oe(this.element,te("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(kb,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=oe(this.element,te("div.action-container"));this.actionBar=this._register(new kr(o)),this.actionBar.push(this._register(new Kr("banner.close","Close Banner",Ve.asClassName(Yf),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};T7=oz([sz(0,Ce)],T7);be();sn();st();Xr();var M7=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ku=function(i,e){return function(t,n){e(t,n,i)}},Ji=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Die=Qt("extensions-warning-message",De.warning,g("warningIcon","Icon shown with a warning message in the extensions editor.")),Au=class extends Y{constructor(e,t,n,r){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;let s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount),a;if(o.nonBasicAsciiCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new Ru};else if(o.ambiguousCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Gl};else if(o.invisibleCharacterCount>=s)a={message:g("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Nu};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Die,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(Ab,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(121),this._register(n.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(121)&&(this._options=e.getOption(121),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=Mie(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?sT:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new k7(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new A7(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Au.ID="editor.contrib.unicodeHighlighter";Au=M7([ku(1,Xs),ku(2,oA),ku(3,Ce)],Au);function Mie(i,e){return{nonBasicASCII:e.nonBasicASCII===Uf?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Uf?!i:e.includeComments,includeStrings:e.includeStrings===Uf?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}var k7=class extends Y{constructor(e,t,n,r){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new kt(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let r of t.ranges)n.push({range:r,options:Lu.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!f9(t,e))return null;let n=t.getValueInRange(e.range);return{reason:az(n,this._options),inComment:g9(t,e),inString:_9(t,e)}}};k7=M7([ku(3,Xs)],k7);var A7=class extends Y{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new kt(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let r of e){let o=C9.computeUnicodeHighlights(this._model,this._options,r);for(let s of o.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||o.hasMore}if(!n.hasMore)for(let r of n.ranges)t.push({range:r,options:Lu.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return f9(t,e)?{reason:az(n,this._options),inComment:g9(t,e),inString:_9(t,e)}:null}},L7=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=this._editor.getContribution(Au.ID);if(!r)return[];let o=[],s=300;for(let a of t){let l=r.getDecorationInfo(a);if(!l)continue;let d=n.getValueInRange(a.range).codePointAt(0),h=I7(d),u;switch(l.reason.kind){case 0:{pf(l.reason.confusableWith)?u=g("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,I7(l.reason.confusableWith.codePointAt(0))):u=g("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,I7(l.reason.confusableWith.codePointAt(0)));break}case 1:u=g("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:u=g("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}let m={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},p=g("unicodeHighlight.adjustSettings","Adjust settings"),f=`command:${hp.ID}?${encodeURIComponent(JSON.stringify(m))}`,_=new pi("",!0).appendMarkdown(u).appendText(" ").appendLink(f,p);o.push(new $n(this,a.range,[_],!1,s++))}return o}renderHoverParts(e,t){return F6(e,t,this._editor,this._languageService,this._openerService)}};L7=M7([ku(1,li),ku(2,ci)],L7);function N7(i){return`U+${i.toString(16).padStart(4,"0")}`}function I7(i){let e=`\`${N7(i)}\``;return B2.isInvisibleCharacter(i)||(e+=` "${`${Oie(i)}`}"`),e}function Oie(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function az(i,e){return C9.computeUnicodeHighlightReason(i,e)}var Lu=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,r=this.map.get(n);return r||(r=Ue.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,r)),r}};Lu.instance=new Lu;var R7=class extends K{constructor(){super({id:Gl.ID,label:g("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return Ji(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(nt);r&&this.runAction(r)})}runAction(e){return Ji(this,void 0,void 0,function*(){yield e.updateValue(Xo.includeComments,!1,2)})}},D7=class extends K{constructor(){super({id:Gl.ID,label:g("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return Ji(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(nt);r&&this.runAction(r)})}runAction(e){return Ji(this,void 0,void 0,function*(){yield e.updateValue(Xo.includeStrings,!1,2)})}},Gl=class i extends K{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return Ji(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(nt);r&&this.runAction(r)})}runAction(e){return Ji(this,void 0,void 0,function*(){yield e.updateValue(Xo.ambiguousCharacters,!1,2)})}};Gl.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";var Nu=class i extends K{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return Ji(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(nt);r&&this.runAction(r)})}runAction(e){return Ji(this,void 0,void 0,function*(){yield e.updateValue(Xo.invisibleCharacters,!1,2)})}};Nu.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";var Ru=class i extends K{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=g("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return Ji(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(nt);r&&this.runAction(r)})}runAction(e){return Ji(this,void 0,void 0,function*(){yield e.updateValue(Xo.nonBasicASCII,!1,2)})}};Ru.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";var hp=class i extends K{constructor(){super({id:i.ID,label:g("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return Ji(this,void 0,void 0,function*(){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(nr),d=e.get(nt);function h(p){return B2.isInvisibleCharacter(p)?g("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",N7(p)):g("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${N7(p)} "${l}"`)}let u=[];if(o.kind===0)for(let p of o.notAmbiguousInLocales)u.push({label:g("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',p),run:()=>Ji(this,void 0,void 0,function*(){Fie(d,[p])})});if(u.push({label:h(r),run:()=>Pie(d,[r])}),a){let p=new R7;u.push({label:p.label,run:()=>Ji(this,void 0,void 0,function*(){return p.runAction(d)})})}else if(s){let p=new D7;u.push({label:p.label,run:()=>Ji(this,void 0,void 0,function*(){return p.runAction(d)})})}if(o.kind===0){let p=new Gl;u.push({label:p.label,run:()=>Ji(this,void 0,void 0,function*(){return p.runAction(d)})})}else if(o.kind===1){let p=new Nu;u.push({label:p.label,run:()=>Ji(this,void 0,void 0,function*(){return p.runAction(d)})})}else if(o.kind===2){let p=new Ru;u.push({label:p.label,run:()=>Ji(this,void 0,void 0,function*(){return p.runAction(d)})})}else Hie(o);let m=yield c.pick(u,{title:g("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});m&&(yield m.run())})}};hp.ID="editor.action.unicodeHighlight.showExcludeOptions";function Pie(i,e){return Ji(this,void 0,void 0,function*(){let t=i.getValue(Xo.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;yield i.updateValue(Xo.allowedCharacters,n,2)})}function Fie(i,e){var t;return Ji(this,void 0,void 0,function*(){let n=(t=i.inspect(Xo.allowedLocales).user)===null||t===void 0?void 0:t.value,r;typeof n=="object"&&n?r=Object.assign({},n):r={};for(let o of e)r[o]=!0;yield i.updateValue(Xo.allowedLocales,r,2)})}function Hie(i){throw new Error(`Unexpected value: ${i}`)}F(Gl);F(Nu);F(Ru);F(hp);Se(Au.ID,Au,1);Ao.register(L7);re();Tr();Me();xn();be();var Bie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lz=function(i,e){return function(t,n){e(t,n,i)}},zie=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},cz="ignoreUnusualLineTerminators";function Uie(i,e,t){i.setModelProperty(e.uri,cz,t)}function Wie(i,e){return i.getModelProperty(e.uri,cz)}var up=class extends Y{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(122),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(122)&&(this._config=this._editor.getOption(122),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return zie(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||Wie(this._codeEditorService,e)===!0||this._editor.getOption(88))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:g("unusualLineTerminators.title","Unusual Line Terminators"),message:g("unusualLineTerminators.message","Detected unusual line terminators"),detail:g("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Tn(e.uri)),primaryButton:g({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:g("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){Uie(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};up.ID="editor.contrib.unusualLineTerminatorsDetector";up=Bie([lz(1,lh),lz(2,_t)],up);Se(up.ID,up,1);wr();Rt();ct();Gt();it();re();Me();Ie();ht();cn();be();qe();ut();var jie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dz=function(i,e){return function(t,n){e(t,n,i)}},Rb=new Ne("hasWordHighlights",!1);function hz(i,e,t,n){let r=i.ordered(e);return Af(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,bt)),Xt)}var Lb=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ht(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new k(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let r=t.startLineNumber,o=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c<d;c++){let h=n.getRange(c);h&&h.startLineNumber===r&&h.startColumn<=o&&h.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}},O7=class extends Lb{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return hz(this._providers,e,t.getPosition(),r).then(o=>o||[])}},P7=class extends Lb{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,r){return $d(250,r).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,n,!1).map(a=>({range:a.range,kind:m1.Text}))})}isValid(e,t,n){let r=t.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,t,n)}};function Vie(i,e,t,n){return i.has(e)?new O7(e,t,n,i):new P7(e,t,n)}Bn("_executeDocumentHighlights",(i,e,t)=>{let n=i.get(le);return hz(n.documentHighlightProvider,e,t,ze.None)});var F7=class{constructor(e,t,n){this.toUnhook=new W,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=Rb.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(78),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{let o=this.editor.getOption(78);this.occurrencesHighlight!==o&&(this.occurrencesHighlight=o,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(k.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Kt(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Kt(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,n=e.endColumn,r=this._getWord();if(!r||r.startColumn>t||r.endColumn<n){this._stopAll();return}let o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let s=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Vie(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(126)),this.workerRequest.result.then(a=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},Be)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(let t of this.workerRequestValue)t.range&&e.push({range:t.range,options:FB(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}},Cd=class uz extends Y{static get(e){return e.getContribution(uz.ID)}constructor(e,t,n){super(),this.wordHighlighter=null;let r=()=>{e.hasModel()&&(this.wordHighlighter=new F7(e,n.documentHighlightProvider,t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),r()})),r()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};Cd.ID="editor.contrib.wordHighlighter";Cd=jie([dz(1,we),dz(2,le)],Cd);var Nb=class extends K{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=Cd.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},H7=class extends Nb{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:g("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Rb,kbOpts:{kbExpr:I.editorTextFocus,primary:65,weight:100}})}},B7=class extends Nb{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:g("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Rb,kbOpts:{kbExpr:I.editorTextFocus,primary:1089,weight:100}})}},z7=class extends K{constructor(){super({id:"editor.action.wordHighlight.trigger",label:g("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Rb.toNegated(),kbOpts:{kbExpr:I.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=Cd.get(t);r&&r.restoreViewState(!0)}};Se(Cd.ID,Cd,0);F(H7);F(B7);F(z7);Me();KW();St();Ie();Di();ht();an();be();qe();var wd=class extends ii{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=el(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new ie(l.positionLineNumber,l.positionColumn),d=this._move(r,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>VT.fromModelSelection(l))),a.length===1){let l=new ie(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new ye(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ye(t.lineNumber,t.column,t.lineNumber,t.column)}},Os=class extends wd{_move(e,t,n,r){return jd.moveWordLeft(e,t,n,r)}},Ps=class extends wd{_move(e,t,n,r){return jd.moveWordRight(e,t,n,r)}},U7=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},W7=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},j7=class extends Os{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:G.and(I.textInputFocus,(e=G.and(S1,C1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},V7=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},K7=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},q7=class extends Os{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:G.and(I.textInputFocus,(e=G.and(S1,C1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},G7=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r){return super._move(el(p1.wordSeparators.defaultValue),t,n,r)}},$7=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r){return super._move(el(p1.wordSeparators.defaultValue),t,n,r)}},Y7=class extends Ps{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},X7=class extends Ps{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:G.and(I.textInputFocus,(e=G.and(S1,C1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},Q7=class extends Ps{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},J7=class extends Ps{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},Z7=class extends Ps{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:G.and(I.textInputFocus,(e=G.and(S1,C1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},ex=class extends Ps{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},tx=class extends Ps{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r){return super._move(el(p1.wordSeparators.defaultValue),t,n,r)}},ix=class extends Ps{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r){return super._move(el(p1.wordSeparators.defaultValue),t,n,r)}},xd=class extends ii{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(rt);if(!t.hasModel())return;let o=el(t.getOption(126)),s=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(9),d=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),u=a.map(m=>{let p=this._delete({wordSeparators:o,model:s,selection:m,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(7),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new js(p,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}},mp=class extends xd{_delete(e,t){let n=jd.deleteWordLeft(e,t);return n||new k(1,1,1,1)}},pp=class extends xd{_delete(e,t){let n=jd.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new k(r,o,r,o)}},nx=class extends mp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:I.writable})}},rx=class extends mp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:I.writable})}},ox=class extends mp{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},sx=class extends pp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:I.writable})}},ax=class extends pp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:I.writable})}},lx=class extends pp{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},cx=class extends K{constructor(){super({id:"deleteInsideWord",precondition:I.writable,label:g("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=el(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=jd.deleteInsideWord(r,o,l);return new js(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};ge(new U7);ge(new W7);ge(new j7);ge(new V7);ge(new K7);ge(new q7);ge(new Y7);ge(new X7);ge(new Q7);ge(new J7);ge(new Z7);ge(new ex);ge(new G7);ge(new $7);ge(new tx);ge(new ix);ge(new nx);ge(new rx);ge(new ox);ge(new sx);ge(new ax);ge(new lx);F(cx);Me();Ie();ht();Si();var dx=class extends xd{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=Ju.deleteWordPartLeft(e);return n||new k(1,1,1,1)}},hx=class extends xd{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=Ju.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new k(r,o,r,o)}},Db=class extends wd{_move(e,t,n,r){return Ju.moveWordPartLeft(e,t,n)}},ux=class extends Db{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Je.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var mx=class extends Db{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Je.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var Mb=class extends wd{_move(e,t,n,r){return Ju.moveWordPartRight(e,t,n)}},px=class extends Mb{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},fx=class extends Mb{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};ge(new dx);ge(new hx);ge(new ux);ge(new mx);ge(new px);ge(new fx);re();Me();be();var fp=class extends Y{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Xi.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(g("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(g("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}};fp.ID="editor.contrib.readOnlyMessageController";Se(fp.ID,fp,2);var IGe=zi(bz()),kGe=zi(xz());rc();ch();be();rc();re();hn();var Xie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ez=function(i,e){return function(t,n){e(t,n,i)}},vp=class Hb{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=er.as(es.Quickaccess)}provide(e){let t=new W;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let r=this.registry.getQuickAccessProvider(n.substr(Hb.PREFIX.length));r&&r.prefix&&r.prefix!==Hb.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==Hb.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,r=n||"\u2026";return{prefix:n,label:r,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:g("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};vp.PREFIX="?";vp=Xie([Ez(0,nr),Ez(1,mt)],vp);er.as(es.Quickaccess).registerQuickAccessProvider({ctor:vp,prefix:"",helpEntries:[{description:aA.helpQuickAccessActionLabel}]});re();h9();zW();re();ti();h9();rl();tk();ln();wr();var Ou=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let r=new W;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=r.add(new ai);return o.value=this.doProvide(e,t),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),r}doProvide(e,t){let n=new W,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let o={editor:r},s=Jf(r);if(s){let a=Wi(r.saveViewState());n.add(s.onDidChangeCursorPosition(()=>{a=Wi(r.saveViewState())})),o.restoreViewState=()=>{a&&r===this.activeTextEditorControl&&r.restoreViewState(a)},n.add(iT(t.onCancellationRequested)(()=>{var l;return(l=o.restoreViewState)===null||l===void 0?void 0:l.call(o)}))}n.add(ft(()=>this.clearDecorations(r))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&Kt(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return zk(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Lt(Hf),position:zn.Full}}}],[s,a]=n.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}};be();var bp=class i extends Ou{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=g("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,Y.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new W;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(r,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}let d=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(d,0),this.addDecorations(r,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=Jf(r);return a&&a.getOptions().get(65).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(ft(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?g("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):g("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?g("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):g("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let r=this.getModel(e);if(!r)return!1;let o={lineNumber:t,column:n};return r.validatePosition(o).equals(o)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};bp.PREFIX=":";rc();xn();ti();ch();wt();Me();ht();var Qie=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Jie=function(i,e){return function(t,n){e(t,n,i)}},yp=class extends bp{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Nt.None}get activeTextEditorControl(){return Wi(this.editorService.getFocusedCodeEditor())}};yp=Qie([Jie(0,_t)],yp);var Sp=class i extends K{constructor(){super({id:i.ID,label:w9.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(nr).quickAccess.show(yp.PREFIX)}};Sp.ID="editor.action.gotoLine";F(Sp);er.as(es.Quickaccess).registerQuickAccessProvider({ctor:yp,prefix:yp.PREFIX,helpEntries:[{description:w9.gotoLineActionLabel,commandId:Sp.ID}]});ct();Gt();on();Zn();_T();yn();Bt();var kz=[void 0,[]];function zb(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?Zie(i,r.values,t,n):Az(i,e,t,n)}function Zie(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=Az(i,s,t,n);if(typeof a!="number")return kz;r+=a,o.push(...l)}return[r,ene(o)]}function Az(i,e,t,n){let r=If(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],cc(r)]:kz}var HVe=Object.freeze({score:0});function ene(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!tne(n,r)?(n=r,t.push(r)):(n.start=Math.min(n.start,r.start),n.end=Math.max(n.end,r.end));return t}function tne(i,e){return!(i.end<e.start||e.end<i.start)}function Tz(i){return i.startsWith('"')&&i.endsWith('"')}var Lz=" ";function Bb(i){typeof i!="string"&&(i="");let e=i.toLowerCase(),{pathNormalized:t,normalized:n,normalizedLowercase:r}=Iz(i),o=t.indexOf(cf)>=0,s=Tz(i),a,l=i.split(Lz);if(l.length>1)for(let c of l){let d=Tz(c),{pathNormalized:h,normalized:u,normalizedLowercase:m}=Iz(c);u&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:m,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function Iz(i){let e;Hd?e=i.replace(/\//g,cf):e=i.replace(/\\/g,cf);let t=LT(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function vx(i){return Array.isArray(i)?Bb(i.map(e=>e.original).join(Lz)):Bb(i.original)}re();Bt();Ie();cn();be();ut();Rt();var ine=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nz=function(i,e){return function(t,n){e(t,n,i)}},Cp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},zr=class Sx extends Ou{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,g("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),Y.None}provideWithTextEditor(e,t,n){let r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n):this.doProvideWithoutEditorSymbols(e,o,t,n):Y.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new W;return this.provideLabelPick(n,g("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Cp(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,n,r))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return Cp(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new gI,r=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),n.complete(!0))}));return t.add(ft(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,r){var o;let s=e.editor,a=new W;a.add(n.onDidAccept(h=>{let[u]=n.selectedItems;u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,preserveFocus:h.inBackground}),h.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,d=h=>Cp(this,void 0,void 0,function*(){c==null||c.dispose(!0),n.busy=!1,c=new qt(r),n.busy=!0;try{let u=Bb(n.value.substr(Sx.PREFIX.length).trim()),m=yield this.doGetSymbolPicks(l,u,void 0,c.token);if(r.isCancellationRequested)return;if(m.length>0){if(n.items=m,h&&u.original.length===0){let p=$T(m,f=>!!(f.type!=="separator"&&f.range&&k.containsPosition(f.range.decoration,h)));p&&(n.activeItems=[p])}}else u.original.length>0?this.provideLabelPick(n,g("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,g("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(n.busy=!1)}});return a.add(n.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(n.onDidChangeActive(()=>{let[h]=n.activeItems;h&&h.range&&(s.revealRangeInCenter(h.range.selection,0),this.addDecorations(s,h.range.decoration))})),a}doGetSymbolPicks(e,t,n,r){var o,s;return Cp(this,void 0,void 0,function*(){let a=yield e;if(r.isCancellationRequested)return[];let l=t.original.indexOf(Sx.SCOPE_PREFIX)===0,c=l?1:0,d,h;t.values&&t.values.length>1?(d=vx(t.values[0]),h=vx(t.values.slice(1))):d=t;let u,m=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);m&&(u=[{iconClass:m==="right"?Ve.asClassName(De.splitHorizontal):Ve.asClassName(De.splitVertical),tooltip:m==="right"?g("openToSide","Open to the Side"):g("openToBottom","Open to the Bottom")}]);let p=[];for(let b=0;b<a.length;b++){let C=a[b],T=AT(C.name),w=`$(${sk.toIcon(C.kind).id}) ${T}`,A=w.length-T.length,O=C.containerName;n!=null&&n.extraContainerLabel&&(O?O=`${n.extraContainerLabel} \u2022 ${O}`:O=n.extraContainerLabel);let D,j,q,_e;if(t.original.length>c){let ke=!1;if(d!==t&&([D,j]=zb(w,Object.assign(Object.assign({},t),{values:void 0}),c,A),typeof D=="number"&&(ke=!0)),typeof D!="number"&&([D,j]=zb(w,d,c,A),typeof D!="number"))continue;if(!ke&&h){if(O&&h.original.length>0&&([q,_e]=zb(O,h)),typeof q!="number")continue;typeof D=="number"&&(D+=q)}}let J=C.tags&&C.tags.indexOf(1)>=0;p.push({index:b,kind:C.kind,score:D,label:w,ariaLabel:T,description:O,highlights:J?void 0:{label:j,description:_e},range:{selection:k.collapseToStart(C.selectionRange),decoration:C.range},strikethrough:J,buttons:u})}let f=p.sort((b,C)=>l?this.compareByKindAndScore(b,C):this.compareByScore(b,C)),_=[];if(l){let w=function(){C&&typeof b=="number"&&T>0&&(C.label=xr(yx[b]||bx,T))},b,C,T=0;for(let A of f)b!==A.kind?(w(),b=A.kind,T=1,C={type:"separator"},_.push(C)):T++,_.push(A);w()}else f.length>0&&(_=[{label:g("symbols","symbols ({0})",p.length),type:"separator"},...f]);return _})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){let n=yx[e.kind]||bx,r=yx[t.kind]||bx,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return Cp(this,void 0,void 0,function*(){let n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};zr.PREFIX="@";zr.SCOPE_PREFIX=":";zr.PREFIX_BY_CATEGORY=`${zr.PREFIX}${zr.SCOPE_PREFIX}`;zr=ine([Nz(0,le),Nz(1,lp)],zr);var bx=g("property","properties ({0})"),yx={5:g("method","methods ({0})"),11:g("function","functions ({0})"),8:g("_constructor","constructors ({0})"),12:g("variable","variables ({0})"),4:g("class","classes ({0})"),22:g("struct","structs ({0})"),23:g("event","events ({0})"),24:g("operator","operators ({0})"),10:g("interface","interfaces ({0})"),2:g("namespace","namespaces ({0})"),3:g("package","packages ({0})"),25:g("typeParameter","type parameters ({0})"),1:g("modules","modules ({0})"),6:g("property","properties ({0})"),9:g("enum","enumerations ({0})"),21:g("enumMember","enumeration members ({0})"),14:g("string","strings ({0})"),0:g("file","files ({0})"),17:g("array","arrays ({0})"),15:g("number","numbers ({0})"),16:g("boolean","booleans ({0})"),18:g("object","objects ({0})"),19:g("key","keys ({0})"),7:g("field","fields ({0})"),13:g("constant","constants ({0})")};rc();xn();ti();ch();wt();Me();ht();ut();var nne=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Cx=function(i,e){return function(t,n){e(t,n,i)}},wx=class extends zr{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Nt.None}get activeTextEditorControl(){return Wi(this.editorService.getFocusedCodeEditor())}};wx=nne([Cx(0,_t),Cx(1,le),Cx(2,lp)],wx);var wp=class i extends K{constructor(){super({id:i.ID,label:lg.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:I.hasDocumentSymbolProvider,kbOpts:{kbExpr:I.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(nr).quickAccess.show(zr.PREFIX,{itemActivation:Hk.NONE})}};wp.ID="editor.action.quickOutline";F(wp);er.as(es.Quickaccess).registerQuickAccessProvider({ctor:wx,prefix:zr.PREFIX,helpEntries:[{description:lg.quickOutlineActionLabel,prefix:zr.PREFIX,commandId:wp.ID},{description:lg.quickOutlineByCategoryActionLabel,prefix:zr.PREFIX_BY_CATEGORY}]});rc();ch();xn();Rt();ti();be();function xx(i,e){return e&&(i.stack||i.stacktrace)?g("stackTrace.format","{0}: {1}",Dz(i),Rz(i.stack)||Rz(i.stacktrace)):Dz(i)}function Rz(i){return Array.isArray(i)?i.join(`
|
|
`):i}function Dz(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?g("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function Ex(i=null,e=!1){if(!i)return g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=Wo(i),n=Ex(t[0],e);return t.length>1?g("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(sf(i))return i;if(i.detail){let t=i.detail;if(t.error)return xx(t.error,e);if(t.exception)return xx(t.exception,e)}return i.stack?xx(i,e):i.message?i.message:g("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}it();re();ti();be();Si();sn();st();hn();ct();Gt();re();ti();var xp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Pu;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(Pu||(Pu={}));function Tx(i){let e=i;return Array.isArray(e.items)}function Mz(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var Ub=class extends Y{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var r;let o=new W;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new ai),l=()=>xp(this,void 0,void 0,function*(){let c=a.value=new W;s==null||s.dispose(!0),e.busy=!1,s=new qt(t);let d=s.token,h=e.value.substr(this.prefix.length).trim(),u=this._getPicks(h,c,d,n),m=(f,_)=>{var b;let C,T;if(Tx(f)?(C=f.items,T=f.active):C=f,C.length===0){if(_)return!1;(h.length>0||e.hideInput)&&(!((b=this.options)===null||b===void 0)&&b.noResultsPick)&&(mT(this.options.noResultsPick)?C=[this.options.noResultsPick(h)]:C=[this.options.noResultsPick])}return e.items=C,T&&(e.activeItems=[T]),!0},p=f=>xp(this,void 0,void 0,function*(){let _=!1,b=!1;yield Promise.all([(()=>xp(this,void 0,void 0,function*(){typeof f.mergeDelay=="number"&&(yield $d(f.mergeDelay),d.isCancellationRequested)||b||(_=m(f.picks,!0))}))(),(()=>xp(this,void 0,void 0,function*(){e.busy=!0;try{let C=yield f.additionalPicks;if(d.isCancellationRequested)return;let T,w;Tx(f.picks)?(T=f.picks.items,w=f.picks.active):T=f.picks;let A,O;if(Tx(C)?(A=C.items,O=C.active):A=C,A.length>0||!_){let D;if(!w&&!O){let j=e.activeItems[0];j&&T.indexOf(j)!==-1&&(D=j)}m({items:[...T,...A],active:w||O||D})}}finally{d.isCancellationRequested||(e.busy=!1),b=!0}}))()])});if(u!==null)if(Mz(u))yield p(u);else if(!(u instanceof Promise))m(u);else{e.busy=!0;try{let f=yield u;if(d.isCancellationRequested)return;Mz(f)?yield p(f):m(f)}finally{d.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),o.add(e.onDidTriggerItemButton(({button:c,item:d})=>xp(this,void 0,void 0,function*(){var h,u;if(typeof d.trigger=="function"){let m=(u=(h=d.buttons)===null||h===void 0?void 0:h.indexOf(c))!==null&&u!==void 0?u:-1;if(m>=0){let p=d.trigger(m,e.keyMods),f=typeof p=="number"?p:yield p;if(t.isCancellationRequested)return;switch(f){case Pu.NO_ACTION:break;case Pu.CLOSE_PICKER:e.hide();break;case Pu.REFRESH_PICKER:l();break;case Pu.REMOVE_ITEM:{let _=e.items.indexOf(d);if(_!==-1){let b=e.items.slice(),C=b.splice(_,1),T=e.activeItems.filter(A=>A!==C[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,T&&(e.activeItems=T),e.keepScrollPosition=w}break}}}}}))),o}};Qa();var Oz=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Id=function(i,e){return function(t,n){e(t,n,i)}},Ix=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Fu=class Wb extends Ub{constructor(e,t,n,r,o,s){super(Wb.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(kd)),this.options=e}_getPicks(e,t,n,r){var o,s;return Ix(this,void 0,void 0,function*(){let a=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];let l=[];for(let m of a){let p=Wi(Wb.WORD_FILTER(e,m.label)),f=m.commandAlias?Wi(Wb.WORD_FILTER(e,m.commandAlias)):void 0;p||f?(m.highlights={label:p,detail:this.options.showAlias?f:void 0},l.push(m)):e===m.commandId&&l.push(m)}let c=new Map;for(let m of l){let p=c.get(m.label);p?(m.description=m.commandId,p.description=p.commandId):c.set(m.label,m)}l.sort((m,p)=>{let f=this.commandsHistory.peek(m.commandId),_=this.commandsHistory.peek(p.commandId);if(f&&_)return f>_?-1:1;if(f)return-1;if(_)return 1;if(this.options.suggestedCommandIds){let b=this.options.suggestedCommandIds.has(m.commandId),C=this.options.suggestedCommandIds.has(p.commandId);if(b&&C)return 0;if(b)return-1;if(C)return 1}return m.label.localeCompare(p.label)});let d=[],h=!1,u=!!this.options.suggestedCommandIds;for(let m=0;m<l.length;m++){let p=l[m];m===0&&this.commandsHistory.peek(p.commandId)&&(d.push({type:"separator",label:g("recentlyUsed","recently used")}),h=!0),u&&!this.commandsHistory.peek(p.commandId)&&(!((o=this.options.suggestedCommandIds)===null||o===void 0)&&o.has(p.commandId))&&(d.push({type:"separator",label:g("commonlyUsed","commonly used")}),h=!0,u=!1),h&&!this.commandsHistory.peek(p.commandId)&&!(!((s=this.options.suggestedCommandIds)===null||s===void 0)&&s.has(p.commandId))&&(d.push({type:"separator",label:g("morecCommands","other commands")}),h=!1),d.push(this.toCommandPick(p,r))}return this.hasAdditionalCommandPicks(e,n)?{picks:d,additionalPicks:(()=>Ix(this,void 0,void 0,function*(){let m=yield this.getAdditionalCommandPicks(a,l,e,n);return n.isCancellationRequested?[]:m.map(p=>this.toCommandPick(p,r))}))()}:d})}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?g("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>Ix(this,void 0,void 0,function*(){var o;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{yield this.commandService.executeCommand(e.commandId)}catch(s){Wr(s)||this.dialogService.error(g("canNotRun","Command '{0}' resulted in an error",e.label),Ex(s))}})})}};Fu.PREFIX=">";Fu.WORD_FILTER=nI(rI,aI,oI);Fu=Oz([Id(1,Ce),Id(2,mt),Id(3,Pt),Id(4,En),Id(5,lh)],Fu);var kd=class Ei extends Y{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Ei.getConfiguredCommandHistoryLength(this.configurationService),Ei.cache&&Ei.cache.limit!==this.configuredCommandsHistoryLength&&(Ei.cache.limit=this.configuredCommandsHistoryLength,Ei.saveState(this.storageService)))}load(){let e=this.storageService.get(Ei.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){}let n=Ei.cache=new il(this.configuredCommandsHistoryLength,1);if(t){let r;t.usesLRU?r=t.entries:r=t.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>n.set(o.key,o.value))}Ei.counter=this.storageService.getNumber(Ei.PREF_KEY_COUNTER,0,Ei.counter)}push(e){Ei.cache&&(Ei.cache.set(e,Ei.counter++),Ei.saveState(this.storageService))}peek(e){var t;return(t=Ei.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Ei.cache)return;let t={usesLRU:!0,entries:[]};Ei.cache.forEach((n,r)=>t.entries.push({key:r,value:n})),e.store(Ei.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Ei.PREF_KEY_COUNTER,Ei.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;let o=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof o=="number"?o:Ei.DEFAULT_COMMANDS_HISTORY_LENGTH}};kd.DEFAULT_COMMANDS_HISTORY_LENGTH=50;kd.PREF_KEY_CACHE="commandPalette.mru.cache";kd.PREF_KEY_COUNTER="commandPalette.mru.counter";kd.counter=1;kd=Oz([Id(0,Ar),Id(1,nt)],kd);var jb=class extends Fu{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:dI(n.label)||n.id});return t}};ti();st();hn();Si();Qa();Me();ht();var rne=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Hu=function(i,e){return function(t,n){e(t,n,i)}},Pz=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ep=class extends jb{get activeTextEditorControl(){return Wi(this.codeEditorService.getFocusedCodeEditor())}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}getCommandPicks(){return Pz(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return Pz(this,void 0,void 0,function*(){return[]})}};Ep=rne([Hu(0,Ce),Hu(1,_t),Hu(2,mt),Hu(3,Pt),Hu(4,En),Hu(5,lh)],Ep);var Tp=class i extends K{constructor(){super({id:i.ID,label:x9.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(nr).quickAccess.show(Ep.PREFIX)}};Tp.ID="editor.action.quickCommand";F(Tp);er.as(es.Quickaccess).registerQuickAccessProvider({ctor:Ep,prefix:Ep.PREFIX,helpEntries:[{description:x9.quickCommandHelp,commandId:Tp.ID}]});Me();xn();sn();qe();st();var one=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bu=function(i,e){return function(t,n){e(t,n,i)}},kx=class extends Rs{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};kx=one([Bu(1,we),Bu(2,_t),Bu(3,ni),Bu(4,Ce),Bu(5,Ar),Bu(6,nt)],kx);Se(Rs.ID,kx,4);var sne=Object.defineProperty,ane=Object.getOwnPropertyDescriptor,lne=Object.getOwnPropertyNames,cne=Object.prototype.hasOwnProperty,Fz=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of lne(e))!cne.call(i,r)&&r!==t&&sne(i,r,{get:()=>e[r],enumerable:!(n=ane(e,r))||n.enumerable});return i},dne=(i,e,t)=>(Fz(i,e,"default"),t&&Fz(t,e,"default")),Ip={};dne(Ip,hh);var hne=class{constructor(i,e,t){mo(this,"_onDidChange",new Ip.Emitter);mo(this,"_diagnosticsOptions");mo(this,"_modeConfiguration");mo(this,"_languageId");this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},une={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},mne={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Hz=new hne("json",une,mne);Ip.languages.json={jsonDefaults:Hz};function pne(){return import("./jsonMode-HM3NTNGY.js")}Ip.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Ip.languages.onLanguage("json",()=>{pne().then(i=>i.setupMode(Hz))});var fne=Object.defineProperty,gne=Object.getOwnPropertyDescriptor,_ne=Object.getOwnPropertyNames,vne=Object.prototype.hasOwnProperty,Bz=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of _ne(e))!vne.call(i,r)&&r!==t&&fne(i,r,{get:()=>e[r],enumerable:!(n=gne(e,r))||n.enumerable});return i},bne=(i,e,t)=>(Bz(i,e,"default"),t&&Bz(t,e,"default")),kp={};bne(kp,hh);var zz={},Ax={},Uz=class{constructor(i){mo(this,"_languageId");mo(this,"_loadingTriggered");mo(this,"_lazyLoadPromise");mo(this,"_lazyLoadPromiseResolve");mo(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return Ax[i]||(Ax[i]=new Uz(i)),Ax[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,zz[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}};function br(i){let e=i.id;zz[e]=i,kp.languages.register(i);let t=Uz.getOrCreate(e);kp.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),kp.languages.onLanguageEncountered(e,async()=>{let n=await t.load();kp.languages.setLanguageConfiguration(e,n.conf)})}br({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-3UA27RAW.js")});br({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-JXKKSJSD.js")});br({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-GIPI2MPD.js")});br({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-26TZPRDB.js")});br({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-KL7MLRE7.js")});br({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>import("./html-7CEXTKUW.js")});br({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>import("./xml-ZUVDD57X.js")});Si();var yne={autoFormatTriggerCharacters:[`
|
|
`],provideOnTypeFormattingEdits(i,e,t,n,r){return t===`
|
|
`?Sne(i,e):[]}};function Sne(i,e){let t=i.getLinesContent(),n=e.lineNumber-1,r=t[n],o=t[n-1],s=Lx(o);if(Cne(t,n)){let a=e.lineNumber<t.length&&Vz(r);return a?[wne(e,s,a)]:[]}return[]}function Cne(i,e){let t=i[e-1],n=Lx(t),r=Wz(t);if(jz(r)==="do"||r.includes("fn")&&jz(r)==="->"){let o=i.slice(e+1).filter(s=>!Vz(s)).find(s=>Lx(s)===n);if(o){let[s]=Wz(o);if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}function wne(i,e,t){return t?{range:new yt.Range(i.lineNumber+1,1,i.lineNumber+1,1),text:`${e}end
|
|
`}:{range:new yt.Range(i.lineNumber,i.column,i.lineNumber,i.column),text:`
|
|
${e}end`}}function Lx(i){let[e]=i.match(/^\s*/);return e}function Wz(i){return i.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function jz(i){return i[i.length-1]}function Vz(i){return i.trim()===""}var Kz=yne;var xne={keywords:["case","if","begin","end","when","of","fun","maybe","else","try","catch","receive","after"],attributes:["-module","-record","-export","-spec","-include","-include_lib","-export","-undef","-ifdef","-ifndef","-else","-endif","-if","-elif","-define"],operators:["=","==","=:=","/=","=/=",">","<","=<",">=","+","++","-","--","*","/","!","and","or","not","xor","andalso","orelse","bnot","div","rem","band","bor","bxor","bsl","bsr",":=","=>","->","?=","<-","||"],builtins:["error","exit"],brackets:[["(",")","delimiter.parenthesis"],["{","}","delimiter.curly"],["[","]","delimiter.square"]],symbols:/[=><~&|+\-*\/%@#]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(-[a-z_]+)/,{cases:{"@attributes":"keyword","@default":"identifier"}}],[/(\?[a-zA-Z_0-9]+)/,"constant"],[/[A-Z_][a-z0-9_]*/,"identifier"],[/[a-z_][\w\-']*/,{cases:{"@builtins":"predefined.identifier","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[()\[\]\{\}]/,"@brackets"],[/@symbols/,{cases:{"@operators":"predefined.operator","@default":"operator"}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/16#[0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/%.*$/,"comment"]]}},qz=xne;var Ene={comments:{lineComment:"%"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:'<<"',close:'">>',notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'"},{open:'"',close:'"'}],indentationRules:{increaseIndentPattern:/^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|(\|\|.*))\s*$/,decreaseIndentPattern:/^\s*([)}]]|end|->\s*$)/,indentNextLinePattern:/^((?!%).)*(::|=>|:=|<-)\s*$/}},Gz=Ene;var Nx={background:"#282c34",default:"#c4cad6",lightRed:"#e06c75",blue:"#61afef",gray:"#8c92a3",green:"#98c379",purple:"#c678dd",red:"#be5046",teal:"#56b6c2",peach:"#d19a66"},Ap={background:"#fafafa",default:"#304254",lightRed:"#e45649",blue:"#4078F2",gray:"#707177",green:"#50a14f",purple:"#a726a4",red:"#ca1243",teal:"#56b6c2",peach:"#986801"},$z=i=>[{token:"",foreground:i.default},{token:"variable",foreground:i.lightRed},{token:"constant",foreground:i.blue},{token:"constant.character.escape",foreground:i.blue},{token:"comment",foreground:i.gray},{token:"number",foreground:i.blue},{token:"regexp",foreground:i.lightRed},{token:"type",foreground:i.lightRed},{token:"string",foreground:i.green},{token:"keyword",foreground:i.purple},{token:"operator",foreground:i.peach},{token:"delimiter.bracket.embed",foreground:i.red},{token:"sigil",foreground:i.teal},{token:"function",foreground:i.blue},{token:"function.call",foreground:i.default},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"keyword.md",foreground:i.lightRed},{token:"keyword.table",foreground:i.lightRed},{token:"string.link.md",foreground:i.blue},{token:"variable.md",foreground:i.teal},{token:"string.md",foreground:i.default},{token:"variable.source.md",foreground:i.default},{token:"tag",foreground:i.lightRed},{token:"metatag",foreground:i.lightRed},{token:"attribute.name",foreground:i.peach},{token:"attribute.value",foreground:i.green},{token:"string.key",foreground:i.lightRed},{token:"keyword.json",foreground:i.blue},{token:"operator.sql",foreground:i.purple}],Yz={base:"vs-dark",inherit:!1,rules:$z(Nx),colors:{"editor.background":Nx.background,"editor.foreground":Nx.default,"editorLineNumber.foreground":"#636d83","editorCursor.foreground":"#636d83","editor.selectionBackground":"#3e4451","editor.findMatchHighlightBackground":"#528bff3d","editorSuggestWidget.background":"#21252b","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","input.background":"#1b1d23","input.border":"#181a1f","editorBracketMatch.border":"#282c34","editorBracketMatch.background":"#3e4451"}},Xz={base:"vs",inherit:!1,rules:$z(Ap),colors:{"editor.background":Ap.background,"editor.foreground":Ap.default,"editorLineNumber.foreground":"#9d9d9f","editorCursor.foreground":"#526fff","editor.selectionBackground":"#e5e5e6","editor.findMatchHighlightBackground":"#526fff33","editorSuggestWidget.highlightForeground":Ap.default,"editorSuggestWidget.focusHighlightForeground":"#0431fa","editorSuggestWidget.selectedForeground":Ap.default,"editorSuggestWidget.background":"#eaeaeb","editorSuggestWidget.border":"#dbdbdc","editorSuggestWidget.selectedBackground":"#ffffff","input.background":"#ffffff","input.border":"#dbdbdc","editorBracketMatch.border":"#fafafa","editorBracketMatch.background":"#e5e5e6"}};nj();var Qz="settings",Lp={normal:14,large:16},zu={default:"default",light:"light"},Tne={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:Lp.normal,editor_theme:zu.default,editor_markdown_word_wrap:!0},Rx=class{constructor(){this._subscribers=[],this._settings=Tne,this._loadSettings()}get(){return this._settings}update(e){let t=this._settings;this._settings=me(me({},this._settings),e),this._subscribers.forEach(n=>n(this._settings,t)),this._storeSettings()}getAndSubscribe(e){this._subscribers.push(e),e(this._settings)}_loadSettings(){let e=_c(Qz);e&&(Object.values(zu).includes(e.editor_theme)||delete e.editor_theme,this._settings=me(me({},this._settings),e))}_storeSettings(){fh(Qz,this._settings)}},Yn=new Rx;window.MonacoEnvironment={globalAPI:!0,getWorkerUrl(i,e){return e==="json"?"/assets/language/json/json.worker.js":"/assets/editor/editor.worker.js"}};if(Bf.prototype.finish){let i=Bf.prototype.finish;Bf.prototype.finish=function(...e){let t=i.apply(this,e);if(t._getEOL)t._getEOL=function(n){return`
|
|
`};else throw new Error("failed to override line endings to LF");return t}}else throw new Error("failed to override line endings to LF");Js.registerOnTypeFormattingEditProvider("elixir",Kz);Js.register({id:"erlang"});Js.setMonarchTokensProvider("erlang",qz);Js.setLanguageConfiguration("erlang",Gz);dh.defineTheme("default",Yz);dh.defineTheme("light",Xz);document.fonts.addEventListener("loadingdone",i=>{i.fontfaces.some(t=>t.family.includes("JetBrains Mono"))&&dh.remeasureFonts()});var Dx=null;Yn.getAndSubscribe(i=>{Dx&&Dx.dispose(),Dx=Js.registerCompletionItemProvider("elixir",{triggerCharacters:i.editor_auto_completion?["."]:[],provideCompletionItems:(e,t,n,r)=>e.__getCompletionItems__?e.__getCompletionItems__(e,t):null})});Js.registerHoverProvider("elixir",{provideHover:(i,e,t)=>i.__getHover__?i.__getHover__(i,e):null});Js.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:(i,e,t,n)=>i.__getSignatureHelp__?i.__getSignatureHelp__(i,e):null});Js.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:(i,e,t)=>i.__getDocumentFormattingEdits__?i.__getDocumentFormattingEdits__(i):null});var yt=hh;function Uu(i,e){if(!Uu.initialized){let t=Yn.get();dh.create(document.createElement("div"),{theme:t.editor_theme}),Uu.initialized=!0}return dh.colorize(i,e).then(t=>t.replace(/<br\/>$/,""))}var Np=class{constructor(e){this.size=e,this.cache=new Map}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}else return}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size===this.size){let n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,t)}};var Ine=0,kne=()=>`mermaid-graph-${Ine++}`,Jz=!1,Ane="5.15.4",Zz=new Np(25);function eU(i){let e=Mg(i),t=Zz.get(e);return t?Promise.resolve(t):Lne().then(n=>(Nne(i),n.render(kne(),i).then(({svg:r})=>(Zz.set(e,r),r)).catch(r=>`<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span>
|
|
${r.message}</div>`)))}function Lne(){return import("./mermaid.core-JNHMJ5VR.js").then(({default:i})=>(Jz||(i.initialize({startOnLoad:!1}),Jz=!0),i))}function Nne(i){let e=`https://cdnjs.cloudflare.com/ajax/libs/font-awesome/${Ane}/css/all.min.css`;if(i.includes("fa:")&&!document.querySelector(`link[href="${e}"]`)){let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.head.appendChild(t)}}var Mx=class{constructor(e,t,{baseUrl:n=null,emptyText:r="",allowedUriSchemes:o=[]}={}){this.container=e,this.content=t,this.baseUrl=n,this.emptyText=r,this.allowedUriSchemes=o,this._render()}setContent(e){this.content=e,this._render()}_render(){this._getHtml().then(e=>{let t=`<div>${e}</div>`;CL(this.container,t,{childrenOnly:!0})})}_getHtml(){return Ug().use(Wg).use(Ey).use(Iy).use(Pne).use(Dne,{highlight:Uu}).use(Ny,{allowDangerousHtml:!0}).use(R3).use(Mne,{baseUrl:this.baseUrl}).use(kS,Rne(this.allowedUriSchemes)).use(ES).use(Fne).use(Hne,{baseUrl:this.baseUrl}).use(Sv).process(this.content).then(e=>String(e)).catch(e=>{console.error(`Failed to render markdown, reason: ${e.message}`)}).then(e=>e||`
|
|
<div class="text-gray-300">
|
|
${this.emptyText}
|
|
</div>
|
|
`)}},Vb=Mx;function Rne(i){return Xe(me({},so),{attributes:Xe(me({},so.attributes),{"*":[...so.attributes["*"]||[],"className","style"]}),protocols:Xe(me({},so.protocols),{href:[...so.protocols.href,...i]})})}function Dne(i){return e=>{let t=[];return Rn(e,"code",n=>{if(n.lang){let r=function(s){n.type="html",n.value=`<pre><code>${s}</code></pre>`},o=i.highlight(n.value,n.lang);if(o&&typeof o.then=="function"){let s=Promise.resolve(o).then(r);t.push(s)}else r(o)}}),Promise.all(t).then(()=>null)}}function Mne(i){return e=>{i.baseUrl&&Rn(e,"element",t=>{if(t.tagName==="a"&&t.properties){let n=t.properties.href;n&&!Ox(n)&&!Px(n)&&!Bne(n)&&(t.properties.href=tU(i.baseUrl,n))}if(t.tagName==="img"&&t.properties){let n=t.properties.src;n&&!Ox(n)&&!Px(n)&&(t.properties.src=tU(i.baseUrl,n))}}),Rn(e,"element",t=>{t.tagName==="a"&&t.properties&&t.properties.href&&(t.properties.href=t.properties.href.split("/").map(n=>n===".."?"__parent__":n).join("/"))})}}var One=Ug().use(pv,{fragment:!0});function Pne(i){return e=>{Rn(e,"code",(t,n,r)=>{t.lang==="mermaid"&&(t.type="html",t.value=`
|
|
<div class="mermaid">${pL(t.value)}</div>
|
|
`)})}}function Fne(i){return e=>{let t=[];return Rn(e,"element",n=>{if((n.properties&&Array.isArray(n.properties.className)?n.properties.className:[]).includes("mermaid")){let o=function(l){n.children=MS(One.parse(l),!0).children},s=y0(n,{whitespace:"pre"}),a=eU(s).then(o);t.push(a)}}),Promise.all(t).then(()=>null)}}function Hne(i){return e=>{Rn(e,"element",t=>{if(t.properties&&t.properties.href){let n=t.properties.href;Px(n)?(t.properties["data-phx-link"]=i.baseUrl&&n.startsWith(i.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):Ox(n)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}})}}function Ox(i){return/^(?:[a-z]+:)?\/\//i.test(i)}function Bne(i){return i.startsWith("#")}function Px(i){return i.startsWith("/")||i.startsWith(window.location.origin)}function tU(i,e){return i.replace(/\/$/,"")+"/"+e}var Kb=class{constructor(){this.subscribersByTopic={}}subscribe(e,t){return Array.isArray(this.subscribersByTopic[e])||(this.subscribersByTopic[e]=[]),this.subscribersByTopic[e].push(t),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){let n=this.subscribersByTopic[e].indexOf(t);n!==-1&&this.subscribersByTopic[e].splice(n,1)}broadcast(e,t){Array.isArray(this.subscribersByTopic[e])&&this.subscribersByTopic[e].forEach(n=>{n(t)})}},Ti=new Kb;var iU=i=>typeof i=="object"&&i!=null&&i.nodeType===1,nU=(i,e)=>(!e||i!=="hidden")&&i!=="visible"&&i!=="clip",Fx=(i,e)=>{if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){let t=getComputedStyle(i,null);return nU(t.overflowY,e)||nU(t.overflowX,e)||(n=>{let r=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(s){return null}})(n);return!!r&&(r.clientHeight<n.scrollHeight||r.clientWidth<n.scrollWidth)})(i)}return!1},qb=(i,e,t,n,r,o,s,a)=>o<i&&s>e||o>i&&s<e?0:o<=i&&a<=t||s>=e&&a>=t?o-i-n:s>e&&a<t||o<i&&a>t?s-e+r:0,zne=i=>{let e=i.parentElement;return e==null?i.getRootNode().host||null:e},Hx=(i,e)=>{var t,n,r,o;if(typeof document=="undefined")return[];let{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,h=typeof c=="function"?c:ke=>ke!==c;if(!iU(i))throw new TypeError("Invalid target");let u=document.scrollingElement||document.documentElement,m=[],p=i;for(;iU(p)&&h(p);){if(p=zne(p),p===u){m.push(p);break}p!=null&&p===document.body&&Fx(p)&&!Fx(document.documentElement)||p!=null&&Fx(p,d)&&m.push(p)}let f=(n=(t=window.visualViewport)==null?void 0:t.width)!=null?n:innerWidth,_=(o=(r=window.visualViewport)==null?void 0:r.height)!=null?o:innerHeight,{scrollX:b,scrollY:C}=window,{height:T,width:w,top:A,right:O,bottom:D,left:j}=i.getBoundingClientRect(),q=a==="start"||a==="nearest"?A:a==="end"?D:A+T/2,_e=l==="center"?j+w/2:l==="end"?O:j,J=[];for(let ke=0;ke<m.length;ke++){let Oe=m[ke],{height:Pe,width:et,top:B,right:Z,bottom:ee,left:V}=Oe.getBoundingClientRect();if(s==="if-needed"&&A>=0&&j>=0&&D<=_&&O<=f&&A>=B&&D<=ee&&j>=V&&O<=Z)return J;let H=getComputedStyle(Oe),U=parseInt(H.borderLeftWidth,10),X=parseInt(H.borderTopWidth,10),Tt=parseInt(H.borderRightWidth,10),bi=parseInt(H.borderBottomWidth,10),Zt=0,Mt=0,Ii="offsetWidth"in Oe?Oe.offsetWidth-Oe.clientWidth-U-Tt:0,Ot="offsetHeight"in Oe?Oe.offsetHeight-Oe.clientHeight-X-bi:0,Hn="offsetWidth"in Oe?Oe.offsetWidth===0?0:et/Oe.offsetWidth:0,Cr="offsetHeight"in Oe?Oe.offsetHeight===0?0:Pe/Oe.offsetHeight:0;if(u===Oe)Zt=a==="start"?q:a==="end"?q-_:a==="nearest"?qb(C,C+_,_,X,bi,C+q,C+q+T,T):q-_/2,Mt=l==="start"?_e:l==="center"?_e-f/2:l==="end"?_e-f:qb(b,b+f,f,U,Tt,b+_e,b+_e+w,w),Zt=Math.max(0,Zt+C),Mt=Math.max(0,Mt+b);else{Zt=a==="start"?q-B-X:a==="end"?q-ee+bi+Ot:a==="nearest"?qb(B,ee,Pe,X,bi+Ot,q,q+T,T):q-(B+Pe/2)+Ot/2,Mt=l==="start"?_e-V-U:l==="center"?_e-(V+et/2)+Ii/2:l==="end"?_e-Z+Tt+Ii:qb(V,Z,et,U,Tt+Ii,_e,_e+w,w);let{scrollLeft:$p,scrollTop:Yp}=Oe;Zt=Math.max(0,Math.min(Yp+Zt/Cr,Oe.scrollHeight-Pe/Cr+Ot)),Mt=Math.max(0,Math.min($p+Mt/Hn,Oe.scrollWidth-et/Hn+Ii)),q+=Yp-Zt,_e+=$p-Mt}J.push({el:Oe,top:Zt,left:Mt})}return J};var Une=i=>i===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(i)?i:{block:"start",inline:"nearest"};function rU(i,e){if(!i.isConnected||!(n=>{let r=n;for(;r&&r.parentNode;){if(r.parentNode===document)return!0;r=r.parentNode instanceof ShadowRoot?r.parentNode.host:r.parentNode}return!1})(i))return;if((n=>typeof n=="object"&&typeof n.behavior=="function")(e))return e.behavior(Hx(i,e));let t=typeof e=="boolean"||e==null?void 0:e.behavior;for(let{el:n,top:r,left:o}of Hx(i,Une(e)))n.scroll({top:r,left:o,behavior:t})}function Ad(i){return["code","smart","setup"].includes(i)}function oU(i){return["markdown","code","setup"].includes(i)}var Wne={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.liveEditors={},this.updateInsertModeAvailability(),["code","smart"].includes(this.props.type)&&this.el.querySelector("[data-el-amplify-outputs-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-amplified")}),this.props.type==="smart"&&this.el.querySelector("[data-el-toggle-source-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-source-visible"),this.updateInsertModeAvailability(),this.maybeFocusCurrentEditor()}),this.el.addEventListener("lb:cell:editor_created",i=>{let{tag:e,liveEditor:t}=i.detail;this.handleCellEditorCreated(e,t)}),this.el.addEventListener("lb:cell:editor_removed",i=>{let{tag:e}=i.detail;this.handleCellEditorRemoved(e)}),this.el.addEventListener("mouseenter",i=>{this.el.setAttribute("data-js-hover","")}),this.el.addEventListener("mouseleave",i=>{this.el.removeAttribute("data-js-hover")}),this.unsubscribeFromNavigationEvents=Ti.subscribe("navigation",i=>this.handleNavigationEvent(i)),this.unsubscribeFromCellsEvents=Ti.subscribe("cells",i=>this.handleCellsEvent(i)),this.unsubscribeFromCellEvents=Ti.subscribe(`cells:${this.props.cellId}`,i=>this.handleCellEvent(i)),this._handleViewportResize=this.handleViewportResize.bind(this),window.visualViewport.addEventListener("resize",this._handleViewportResize)},disconnected(){this.el.removeAttribute("id")},destroyed(){this.unsubscribeFromNavigationEvents(),this.unsubscribeFromCellsEvents(),this.unsubscribeFromCellEvents(),window.visualViewport.removeEventListener("resize",this._handleViewportResize)},updated(){let i=this.props;this.props=this.getProps(),this.props.evaluationDigest!==i.evaluationDigest&&this.updateChangeIndicator()},getProps(){return{cellId:We(this.el,"data-cell-id"),type:We(this.el,"data-type"),sessionPath:We(this.el,"data-session-path"),evaluationDigest:di(this.el,"data-evaluation-digest",null),smartCellJSViewRef:di(this.el,"data-smart-cell-js-view-ref",null),allowedUriSchemes:We(this.el,"data-allowed-uri-schemes")}},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"?this.handleInsertModeChanged(i.enabled):i.type==="location_report"&&this.handleLocationReport(i.client,i.report)},handleCellsEvent(i){i.type==="cell_moved"?this.handleCellMoved(i.cellId):i.type==="cell_upload"&&this.handleCellUpload(i.cellId,i.url)},handleCellEvent(i){i.type==="dispatch_queue_evaluation"&&this.handleDispatchQueueEvaluation(i.dispatch)},handleElementFocused(i,e){this.props.cellId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&dl(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleCellEditorCreated(i,e){if(this.liveEditors[i]=e,this.updateInsertModeAvailability(),this.props.type!=="markdown"&&setTimeout(()=>{e.isMounted()||e.mount()},0),e===this.currentEditor()&&this.maybeFocusCurrentEditor(!0),e.onBlur(()=>{this.isFocused&&this.insertMode&&this.currentEditor().focus()}),e.onCursorSelectionChange(t=>{this.broadcastSelection(t)}),i==="primary"){let t=e.getSource();if(this.el.toggleAttribute("data-js-empty",t===""),e.onChange(n=>{this.el.toggleAttribute("data-js-empty",n==="")}),this.props.type==="markdown"){let n=this.el.querySelector("[data-el-markdown-container]"),r=new Vb(n,t,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes.split(",")});e.onChange(o=>{r.setContent(o)})}Ad(this.props.type)&&(this.updateChangeIndicator(),e.onChange(n=>{this.updateChangeIndicator()}),this.handleEvent(`evaluation_finished:${this.props.cellId}`,({code_markers:n})=>{e.setCodeMarkers(n)}),this.handleEvent(`start_evaluation:${this.props.cellId}`,()=>{e.clearDoctests()}),this.handleEvent(`doctest_report:${this.props.cellId}`,n=>{e.updateDoctest(n)}),this.handleEvent("erase_outputs",()=>{e.setCodeMarkers([]),e.clearDoctests()}))}},handleCellEditorRemoved(i){delete this.liveEditors[i]},handleViewportResize(){this.isFocused&&this.scrollActiveElementIntoView()},currentEditor(){return this.liveEditors[this.currentEditorTag()]},currentEditorTag(){return this.props.type==="smart"?this.el.hasAttribute("data-js-source-visible")?"primary":"secondary":"primary"},updateInsertModeAvailability(){this.el.toggleAttribute("data-js-insert-mode-disabled",!this.currentEditor())},maybeFocusCurrentEditor(i=!1){this.isFocused&&this.insertMode&&(this.currentEditor().focus(),i&&dl(this.el),this.broadcastSelection())},updateChangeIndicator(){let i=this.el.querySelector("[data-el-cell-status]");if(i&&i.querySelector("[data-el-change-indicator]")&&this.props.evaluationDigest){let t=this.liveEditors.primary.getSource(),n=Mg(t),r=this.props.evaluationDigest!==n;this.el.toggleAttribute("data-js-changed",r)}},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.currentEditor()&&(this.currentEditor().focus(),setTimeout(this.scrollActiveElementIntoView.bind(this),0),this.broadcastSelection())):this.insertMode&&!i&&(this.insertMode=i,this.currentEditor()&&this.currentEditor().blur())},handleCellMoved(i){this.isFocused&&i===this.props.cellId&&dl(this.el)},handleCellUpload(i,e){let t=this.liveEditors.primary;if(t&&this.props.cellId===i){let n=``;t.insert(n)}},handleDispatchQueueEvaluation(i){this.props.type==="smart"&&this.props.smartCellJSViewRef?Ti.broadcast(`js_views:${this.props.smartCellJSViewRef}`,{type:"sync",callback:i}):i()},handleLocationReport(i,e){Object.entries(this.liveEditors).forEach(([t,n])=>{this.props.cellId===e.focusableId&&e.selection&&e.selection.tag===t?n.updateUserSelection(i,e.selection.editorSelection):n.removeUserSelection(i)})},broadcastSelection(i=null){i=i||this.currentEditor().editor.getSelection();let e=this.currentEditorTag();this.isFocused&&this.insertMode&&Ti.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:e,editorSelection:i}})},scrollActiveElementIntoView(){rU(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}},sU=Wne;var jne=function(e,t,n){for(var r=n,o=0,s=e.length;r<t.length;){var a=t[r];if(o<=0&&t.slice(r,r+s)===e)return r;a==="\\"?r++:a==="{"?o++:a==="}"&&o--,r++}return-1},Vne=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},Kne=/^\\begin{/,qne=function(e,t){for(var n,r=[],o=new RegExp("("+t.map(c=>Vne(c.left)).join("|")+")");n=e.search(o),n!==-1;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var s=t.findIndex(c=>e.startsWith(c.left));if(n=jne(t[s].right,e,t[s].left.length),n===-1)break;var a=e.slice(0,n+t[s].right.length),l=Kne.test(a)?a:e.slice(t[s].left.length,n);r.push({type:"math",data:l,rawData:a,display:t[s].display}),e=e.slice(n+t[s].right.length)}return e!==""&&r.push({type:"text",data:e}),r},Gne=function(e,t){var n=qne(e,t.delimiters);if(n.length===1&&n[0].type==="text")return null;for(var r=document.createDocumentFragment(),o=0;o<n.length;o++)if(n[o].type==="text")r.appendChild(document.createTextNode(n[o].data));else{var s=document.createElement("span"),a=n[o].data;t.displayMode=n[o].display;try{t.preProcess&&(a=t.preProcess(a)),Uh.render(a,s,t)}catch(l){if(!(l instanceof Uh.ParseError))throw l;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[o].data+"` with ",l),r.appendChild(document.createTextNode(n[o].rawData));continue}r.appendChild(s)}return r},$ne=function i(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(r.nodeType===3){for(var o=r.textContent,s=r.nextSibling,a=0;s&&s.nodeType===Node.TEXT_NODE;)o+=s.textContent,s=s.nextSibling,a++;var l=Gne(o,t);if(l){for(var c=0;c<a;c++)r.nextSibling.remove();n+=l.childNodes.length-1,e.replaceChild(l,r)}else n+=a}else r.nodeType===1&&function(){var d=" "+r.className+" ",h=t.ignoredTags.indexOf(r.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(u=>d.indexOf(" "+u+" ")===-1);h&&i(r,t)}()}},aU=function(e,t){if(!e)throw new Error("No element provided to render");var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},$ne(e,n)};var Rp=class{constructor(e,t){this.serverAdapter=e,this.revision=t,this.state=new Gb(this),this._onDelta=null,this.serverAdapter.onDelta(n=>{this._handleServerDelta(n)}),this.serverAdapter.onAcknowledgement(()=>{this._handleServerAcknowledgement()})}setEditorAdapter(e){this.editorAdapter=e,this.editorAdapter.onDelta(t=>{this._handleClientDelta(t),this._emitDelta(t)})}onDelta(e){this._onDelta=e}_emitDelta(e){this._onDelta&&this._onDelta(e)}_handleClientDelta(e){this.state=this.state.onClientDelta(e)}_handleServerDelta(e){this.revision++,this.state=this.state.onServerDelta(e)}_handleServerAcknowledgement(){this.revision++,this.state=this.state.onServerAcknowledgement()}applyDelta(e){this.editorAdapter&&this.editorAdapter.applyDelta(e),this._emitDelta(e)}sendDelta(e){this.serverAdapter.sendDelta(e,this.revision+1)}reportCurrentRevision(){this.serverAdapter.reportRevision(this.revision)}},Gb=class{constructor(e,t=5e3){this.client=e,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=t}onClientDelta(e){return this.reportRevisionTimeoutId!==null&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new $b(this.client,e)}onServerDelta(e){return this.client.applyDelta(e),this.reportRevisionTimeoutId===null&&(this.reportRevisionTimeoutId=setTimeout(()=>{this.client.reportCurrentRevision(),this.reportRevisionTimeoutId=null},this.reportRevisionTimeout)),this}onServerAcknowledgement(){throw new Error("Unexpected server acknowledgement.")}},$b=class i{constructor(e,t){this.client=e,this.awaitedDelta=t}onClientDelta(e){return new Bx(this.client,this.awaitedDelta,e)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right");this.client.applyDelta(t);let n=e.transform(this.awaitedDelta,"left");return new i(this.client,n)}onServerAcknowledgement(){return new Gb(this.client)}},Bx=class i{constructor(e,t,n){this.client=e,this.awaitedDelta=t,this.buffer=n}onClientDelta(e){let t=this.buffer.compose(e);return new i(this.client,this.awaitedDelta,t)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right"),n=this.buffer.transform(t,"right");this.client.applyDelta(n);let r=e.transform(this.awaitedDelta,"left"),o=t.transform(this.buffer,"left");return new i(this.client,r,o)}onServerAcknowledgement(){return this.client.sendDelta(this.buffer),new $b(this.client,this.buffer)}};var Ld=class i{constructor(e=[]){this.ops=e}retain(e){return e<=0?this:this.append({retain:e})}insert(e){return e===""?this:this.append({insert:e})}delete(e){return e<=0?this:this.append({delete:e})}append(e){if(this.ops.length===0)return this.ops.push(e),this;let t=this.ops.pop();return yr(e)&&Sr(t)?this.append(e).append(t):yr(e)&&yr(t)?(this.ops.push({insert:t.insert+e.insert}),this):Sr(e)&&Sr(t)?(this.ops.push({delete:t.delete+e.delete}),this):Po(e)&&Po(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}compose(e){let t=new Wu(this.ops),n=new Wu(e.ops),r=new i;for(;t.hasNext()||n.hasNext();)if(yr(n.peek()))r.append(n.next());else if(Sr(t.peek()))r.append(t.next());else{let o=Math.min(t.peekLength(),n.peekLength()),s=t.next(o),a=n.next(o);Po(a)?r.append(s):Sr(a)&&Po(s)&&r.append(a)}return r._trim()}transform(e,t){if(t!=="left"&&t!=="right")throw new Error(`Invalid priority "${t}", should be either "left" or "right"`);let n=new Wu(this.ops),r=new Wu(e.ops),o=new i;for(;n.hasNext()||r.hasNext();)if(yr(n.peek())&&(!yr(r.peek())||t==="left")){let s=zx(n.next());o.retain(s)}else if(yr(r.peek()))o.append(r.next());else{let s=Math.min(n.peekLength(),r.peekLength()),a=n.next(s),l=r.next(s);if(Sr(a))continue;Sr(l)?o.append(l):o.retain(s)}return o._trim()}_trim(){return this.ops.length>0&&Po(this.ops[this.ops.length-1])&&this.ops.pop(),this}toCompressed(){return this.ops.map(e=>{if(yr(e))return e.insert;if(Po(e))return e.retain;if(Sr(e))return-e.delete;throw new Error(`Invalid operation ${e}`)})}static fromCompressed(e){return e.reduce((t,n)=>{if(typeof n=="string")return t.insert(n);if(typeof n=="number"&&n>=0)return t.retain(n);if(typeof n=="number"&&n<0)return t.delete(-n);throw new Error(`Invalid compressed operation ${n}`)},new this)}applyToString(e){let t="",n=0;return this.ops.forEach(r=>{Po(r)&&(t+=e.slice(n,n+r.retain),n+=r.retain),yr(r)&&(t+=r.insert),Sr(r)&&(n+=r.delete)}),t+=e.slice(n),t}},Wu=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e=1/0){let t=this.ops[this.index];if(t){let n=this.offset,r=zx(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,Sr(t))return{delete:e};if(Po(t))return{retain:e};if(yr(t))return{insert:t.insert.substr(n,e)}}else return{retain:e}}peek(){return this.ops[this.index]||{retain:1/0}}peekLength(){return this.ops[this.index]?zx(this.ops[this.index])-this.offset:1/0}};function zx(i){if(yr(i))return i.insert.length;if(Po(i))return i.retain;if(Sr(i))return i.delete}function yr(i){return typeof i.insert=="string"}function Po(i){return typeof i.retain=="number"}function Sr(i){return typeof i.delete=="number"}var Dp=class{constructor(e){this.editor=e,this._onDelta=null,this.isLastChangeRemote=!1,this.editor.onDidChangeModelContent(t=>{if(this.ignoreChange)return;this.isLastChangeRemote=!1;let n=this._deltaFromEditorChange(t);this._onDelta&&this._onDelta(n)})}onDelta(e){this._onDelta=e}applyDelta(e){e.ops.some(r=>Sr(r)?!0:yr(r)?r.insert.match(/\s+/):!1)||!this.isLastChangeRemote?this.editor.getModel().pushStackElement():this.editor.getModel().popStackElement();let n=this._deltaToEditorOperations(e);this.ignoreChange=!0,this.editor.getModel().pushEditOperations(null,n,null),this.editor.getModel().pushStackElement(),this.ignoreChange=!1,this.isLastChangeRemote=!0}_deltaFromEditorChange(e){return e.changes.map(n=>{let{rangeOffset:r,rangeLength:o,text:s}=n,a=new Ld;return r&&a.retain(r),o&&a.delete(o),s&&a.insert(s),a}).reduce((n,r)=>n.compose(r))}_deltaToEditorOperations(e){let t=this.editor.getModel(),n=[],r=0;return e.ops.forEach(o=>{if(Po(o)&&(r+=o.retain),yr(o)){let s=t.getPositionAt(r);n.push({forceMoveMarkers:!0,range:new yt.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:o.insert})}if(Sr(o)){let s=t.getPositionAt(r),a=t.getPositionAt(r+o.delete);n.push({forceMoveMarkers:!1,range:new yt.Range(s.lineNumber,s.column,a.lineNumber,a.column),text:null}),r+=o.delete}}),n}};var Mp=class{constructor(e,t,n){this.hook=e,this.cellId=t,this.tag=n,this._onDelta=null,this._onAcknowledgement=null,this.hook.handleEvent(`cell_delta:${this.cellId}:${this.tag}`,({delta:r})=>{this._onDelta&&this._onDelta(Ld.fromCompressed(r))}),this.hook.handleEvent(`cell_acknowledgement:${this.cellId}:${this.tag}`,()=>{this._onAcknowledgement&&this._onAcknowledgement()})}onDelta(e){this._onDelta=e}onAcknowledgement(e){this._onAcknowledgement=e}sendDelta(e,t){this.hook.pushEvent("apply_cell_delta",{cell_id:this.cellId,tag:this.tag,delta:e.toCompressed(),revision:t})}reportRevision(e){this.hook.pushEvent("report_cell_revision",{cell_id:this.cellId,tag:this.tag,revision:e})}};var Op=class{constructor(e,t,n,r){this._cursorWidget=new Ux(e,t.getPosition(),n,r),this._selectionDecoration=new Wx(e,t,n)}update(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}dispose(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}},Ux=class{constructor(e,t,n,r){this._id=Dg(),this._editor=e,this._position=t,this._isPositionValid=this._checkPositionValidity(t),this._buildDomNode(n,r),this._editor.addContentWidget(this),this._onDidChangeModelContentDisposable=this._editor.onDidChangeModelContent(o=>{this._isPositionValid||this.update(this._position)})}getId(){return this._id}getPosition(){return{position:this._position,preference:[yt.editor.ContentWidgetPositionPreference.EXACT]}}update(e){this._position=e,this._isPositionValid=this._checkPositionValidity(e),this._updateDomNode(),this._editor.layoutContentWidget(this)}getDomNode(){return this._domNode}dispose(){this._editor.removeContentWidget(this),this._onDidChangeModelContentDisposable.dispose()}_checkPositionValidity(e){let t=this._editor.getModel().validatePosition(e);return e.equals(t)}_buildDomNode(e,t){let n=this._editor.getOption(yt.editor.EditorOption.lineHeight),r=document.createElement("div");r.classList.add("monaco-cursor-widget-container");let o=document.createElement("div");o.classList.add("monaco-cursor-widget-cursor"),o.style.background=e,o.style.height=`${n}px`;let s=document.createElement("div");s.classList.add("monaco-cursor-widget-label"),s.style.height=`${n}px`,s.innerText=t,s.style.background=e,r.appendChild(o),r.appendChild(s),this._domNode=r,this._updateDomNode()}_updateDomNode(){let e=this._position.lineNumber===1;this._domNode.classList.toggle("inline",e)}},Wx=class{constructor(e,t,n){this._editor=e,this._decorations=[],this._className=`user-selection-${n.replace("#","")}`,this._styleElement=document.createElement("style"),this._styleElement.innerHTML=`
|
|
.${this._className} {
|
|
background-color: ${n}30;
|
|
}
|
|
`,document.body.appendChild(this._styleElement),this.update(t)}update(e){let t=[{range:e,options:{className:this._className}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[]),this._styleElement.remove()}};function lU(i,e){let t=e;for(;!i.endsWith(t);)t=t.slice(0,-1);return t.length}var Pp=class{constructor(e,t){this._editor=e,this._statusDecoration=new jx(e,t.line,t.status),t.status==="failed"&&(this._detailsWidget=new Yb(e,t))}update(e){this._statusDecoration.update(e.status),e.status==="failed"&&(this._detailsWidget&&this._detailsWidget.dispose(),this._detailsWidget=new Yb(this._editor,e))}dispose(){this._statusDecoration.dispose(),this._detailsWidget&&this._detailsWidget.dispose()}},jx=class{constructor(e,t,n){this._editor=e,this._lineNumber=t,this._decorations=[],this.update(n)}update(e){let t=[{range:new yt.Range(this._lineNumber,1,this._lineNumber,1),options:{isWholeLine:!0,linesDecorationsClassName:`doctest-status-decoration-${e}`}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[])}},Yb=class{constructor(e,t){this._editor=e;let{line:n,end_line:r,details:o,column:s}=t,a=o.join(`
|
|
`),l=o.length,c=this._editor.getOption(yt.editor.EditorOption.fontSize),d=this._editor.getOption(yt.editor.EditorOption.lineHeight),h=document.createElement("div");h.innerHTML=a,h.classList.add("doctest-details-widget","editor-theme-aware-ansi"),h.style.fontSize=`${c}px`,h.style.lineHeight=`${d}px`,this._overlayWidget={getId:()=>`livebook.doctest.overlay.${n}`,getDomNode:()=>h,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget),this._editor.changeViewZones(u=>{this._viewZone=u.addZone({afterLineNumber:r,heightInPx:l*d+12,domNode:document.createElement("div"),onDomNodeTop:m=>{h.style.top=`${m}px`;let p=this._editor.getDomNode().querySelector(".margin-view-overlays").offsetWidth;h.style.paddingLeft=`calc(${p}px + ${s}ch)`},onComputedHeight:m=>{h.style.height=`${m}px`}})})}dispose(){this._editor.removeOverlayWidget(this._overlayWidget),this._editor.changeViewZones(e=>{e.removeZone(this._viewZone)})}};var Vx=class{constructor(e,t,n,r,o,s,a,l,c,d,h){this.hook=e,this.container=t,this.cellId=n,this.source=o,this.language=a,this.intellisense=l,this.readOnly=c,this._onMount=[],this._onChange=[],this._onBlur=[],this._onCursorSelectionChange=[],this._remoteUserByClientId={},this._doctestByLine={},this._initializeWidgets=()=>{this.setCodeMarkers(d),h.forEach(m=>{this.updateDoctest(m)})};let u=new Mp(e,n,r);this.editorClient=new Rp(u,s),this.editorClient.onDelta(m=>{this.source=m.applyToString(this.source),this._onChange.forEach(p=>p(this.source))})}isMounted(){return!!this.editor}mount(){if(this.isMounted())throw new Error("The editor is already mounted");this._mountEditor(),this.intellisense&&this._setupIntellisense(),this.editorClient.setEditorAdapter(new Dp(this.editor)),this.editor.onDidFocusEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"always"})}),this.editor.onDidBlurEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"never"}),this._onBlur.forEach(e=>e())}),this.editor.onDidChangeCursorSelection(e=>{this._onCursorSelectionChange.forEach(t=>t(e.selection))}),this._onMount.forEach(e=>e())}_ensureMounted(){this.isMounted()||this.mount()}getSource(){return this.source}onMount(e){this._onMount.push(e)}onChange(e){this._onChange.push(e)}onCursorSelectionChange(e){this._onCursorSelectionChange.push(e)}onBlur(e){this._onBlur.push(e)}focus(){this._ensureMounted(),this.editor.focus()}blur(){this._ensureMounted(),this.editor.hasTextFocus()&&document.activeElement.blur()}insert(e){this._ensureMounted();let t=this.editor.getSelection();this.editor.getModel().pushEditOperations([],[{forceMoveMarkers:!0,range:t,text:e}])}dispose(){if(this.isMounted()){this.editor.dispose();let e=this.editor.getModel();e&&e.dispose()}}updateUserSelection(e,t){this._ensureMounted(),this._remoteUserByClientId[e.id]?this._remoteUserByClientId[e.id].update(t):this._remoteUserByClientId[e.id]=new Op(this.editor,t,e.hex_color,e.name)}removeUserSelection(e){this._ensureMounted(),this._remoteUserByClientId[e.id]&&(this._remoteUserByClientId[e.id].dispose(),delete this._remoteUserByClientId[e.id])}updateDoctest(e){this._ensureMounted(),this._doctestByLine[e.line]?this._doctestByLine[e.line].update(e):this._doctestByLine[e.line]=new Pp(this.editor,e)}clearDoctests(){this._ensureMounted(),Object.values(this._doctestByLine).forEach(e=>e.dispose()),this._doctestByLine={}}setCodeMarkers(e){this._ensureMounted();let t="livebook.code-marker",n=e.map(r=>{let o=this.editor.getModel().getLineContent(r.line),[,s,a]=o.match(/^(\s*).*?(\s*)$/);return{startLineNumber:r.line,startColumn:s.length+1,endLineNumber:r.line,endColumn:o.length+1-a.length,message:r.description,severity:{error:yt.MarkerSeverity.Error,warning:yt.MarkerSeverity.Warning}[r.severity]}});yt.editor.setModelMarkers(this.editor.getModel(),t,n)}_mountEditor(){let e=Yn.get();this.editor=yt.editor.create(this.container,{language:this.language,value:this.source,readOnly:this.readOnly,scrollbar:{vertical:"hidden",alwaysConsumeMouseWheel:!1},minimap:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,guides:{indentation:!1},occurrencesHighlight:!1,renderLineHighlight:"none",theme:e.editor_theme,fontFamily:"JetBrains Mono, Droid Sans Mono, monospace",fontSize:e.editor_font_size,tabIndex:-1,tabSize:2,autoIndent:!0,formatOnType:!0,formatOnPaste:!0,quickSuggestions:this.intellisense&&e.editor_auto_completion,tabCompletion:"on",suggestSelection:"first",wordBasedSuggestions:!this.intellisense,parameterHints:this.intellisense&&e.editor_auto_signature,wordWrap:this.language==="markdown"&&e.editor_markdown_word_wrap?"on":"off"}),this._setScreenDependantEditorOptions(),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"enable-word-wrapping",label:"Enable word wrapping",precondition:"config.editor.wordWrap == off",keybindings:[yt.KeyMod.Alt|yt.KeyCode.KeyZ],run:r=>r.updateOptions({wordWrap:"on"})}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"disable-word-wrapping",label:"Disable word wrapping",precondition:"config.editor.wordWrap == on",keybindings:[yt.KeyMod.Alt|yt.KeyCode.KeyZ],run:r=>r.updateOptions({wordWrap:"off"})}),new ResizeObserver(r=>{r.forEach(o=>{this.container.offsetHeight>0&&(this._setScreenDependantEditorOptions(),this.editor.layout())})}).observe(this.container),this.editor.onDidContentSizeChange(()=>{let r=this.editor.getContentHeight();this.container.style.height=`${r}px`});let n=this.editor.getContribution("editor.controller.quickInput").widget.domNode;n.remove(),this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(n),this._initializeWidgets()}_setScreenDependantEditorOptions(){window.screen.width<768?this.editor.updateOptions({folding:!1,lineDecorationsWidth:16,lineNumbersMinChars:Math.floor(Math.log10(this.editor.getModel().getLineCount()))+3}):this.editor.updateOptions({folding:!0,lineDecorationsWidth:10,lineNumbersMinChars:5})}_setupIntellisense(){let e=Yn.get();this.handlerByRef={},this.editor.getModel().__getCompletionItems__=(n,r)=>{let s=n.getLineContent(r.lineNumber).slice(0,r.column-1);return this._asyncIntellisenseRequest("completion",{hint:s,editor_auto_completion:e.editor_auto_completion}).then(a=>({suggestions:Yne(a.items,e).map(c=>{let d=lU(s,c.insertText),h=new yt.Range(r.lineNumber,r.column-d,r.lineNumber,r.column);return Xe(me({},c),{range:h})})})).catch(()=>null)},this.editor.getModel().__getHover__=(n,r)=>{this.hoverContentProcessed=!1,this.hoverContentEl||(this.hoverContentEl=this.container.querySelector(".monaco-hover-content"),this.hoverContentEl?new MutationObserver(a=>{this.hoverContentProcessed||(aU(this.hoverContentEl,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}),this.hoverContentProcessed=!0)}).observe(this.hoverContentEl,{childList:!0}):console.warn("Could not find an element matching .monaco-hover-content"));let o=n.getLineContent(r.lineNumber),s=r.column;return this._asyncIntellisenseRequest("details",{line:o,column:s}).then(a=>{let l=a.contents.map(d=>({value:d,isTrusted:!0})),c=new yt.Range(r.lineNumber,a.range.from,r.lineNumber,a.range.to);return{contents:l,range:c}}).catch(()=>null)};let t={codeUntilLastStop:null,response:null};this.editor.getModel().__getSignatureHelp__=(n,r)=>{let o=n.getLinesContent(),s=r.lineNumber-1,a=o.slice(0,s),l=o[s].slice(0,r.column-1),c=[...a,l].join(`
|
|
`),d=c.replace(/[^(),\s]*?$/,"").replace(/([(),])\s*$/,"$1");return d===t.codeUntilLastStop?{value:cU(t.response),dispose:()=>{}}:this._asyncIntellisenseRequest("signature",{hint:c}).then(h=>(t.response=h,t.codeUntilLastStop=d,{value:cU(h),dispose:()=>{}})).catch(()=>null)},this.editor.getModel().__getDocumentFormattingEdits__=n=>{let r=n.getValue();return this._asyncIntellisenseRequest("format",{code:r}).then(o=>(this.setCodeMarkers(o.code_markers),o.code?[{range:n.getFullModelRange(),text:o.code}]:[])).catch(()=>null)},this.hook.handleEvent("intellisense_response",({ref:n,response:r})=>{let o=this.handlerByRef[n];o&&(o(r),delete this.handlerByRef[n])})}_asyncIntellisenseRequest(e,t){return new Promise((n,r)=>{this.hook.pushEvent("intellisense_request",me({cell_id:this.cellId,type:e},t),({ref:o})=>{o?this.handlerByRef[o]=s=>{s?n(s):r(null)}:r(null)})})}};function Yne(i,e){return i.map(t=>Xne(t,e)).map((t,n)=>Xe(me({},t),{sortText:Jne(n,i.length)}))}function Xne(i,e){return{label:i.label,kind:Qne(i.kind),detail:i.detail,documentation:i.documentation&&{value:i.documentation,isTrusted:!0},insertText:i.insert_text,insertTextRules:yt.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:e.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}function Qne(i){switch(i){case"function":return yt.languages.CompletionItemKind.Function;case"module":return yt.languages.CompletionItemKind.Module;case"struct":return yt.languages.CompletionItemKind.Struct;case"interface":return yt.languages.CompletionItemKind.Interface;case"type":return yt.languages.CompletionItemKind.Class;case"variable":return yt.languages.CompletionItemKind.Variable;case"field":return yt.languages.CompletionItemKind.Field;case"keyword":return yt.languages.CompletionItemKind.Keyword;default:return null}}function Jne(i,e){return String(i).padStart(e,"0")}function cU(i){return{activeSignature:0,activeParameter:i.active_argument,signatures:i.signature_items.map(e=>({label:e.signature,parameters:e.arguments.map(t=>({label:t})),documentation:null}))}}var dU=Vx;var Zne={mounted(){this.props=this.getProps(),this.handleEvent(`cell_editor_init:${this.props.cellId}:${this.props.tag}`,({source:i,revision:e,doctest_reports:t,code_markers:n})=>{let r=this.el.querySelector("[data-el-editor-container]"),o=document.createElement("div");r.appendChild(o),this.liveEditor=new dU(this,o,this.props.cellId,this.props.tag,i,e,this.props.language,this.props.intellisense,this.props.readOnly,n,t),this.liveEditor.onMount(()=>{let s=r.querySelector("[data-el-skeleton]");s&&s.remove()}),this.el.dispatchEvent(new CustomEvent("lb:cell:editor_created",{detail:{tag:this.props.tag,liveEditor:this.liveEditor},bubbles:!0}))})},disconnected(){this.el.removeAttribute("id")},destroyed(){this.liveEditor&&(this.el.dispatchEvent(new CustomEvent("lb:cell:editor_removed",{detail:{tag:this.props.tag},bubbles:!0})),this.liveEditor.dispose())},getProps(){return{cellId:We(this.el,"data-cell-id"),tag:We(this.el,"data-tag"),language:We(this.el,"data-language"),intellisense:We(this.el,"data-intellisense",ea),readOnly:We(this.el,"data-read-only",ea)}}},hU=Zne;var Kx="data-js-dragging",ere={mounted(){this.el.addEventListener("dragenter",i=>{this.el.setAttribute(Kx,"")}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.removeAttribute(Kx)}),this.el.addEventListener("drop",i=>{this.el.removeAttribute(Kx)})}},uU=ere;var tre={mounted(){let i=Yn.get(),e=this.el.querySelector('[name="editor_auto_completion"][value="true"]'),t=this.el.querySelector('[name="editor_auto_signature"][value="true"]'),n=this.el.querySelector('[name="editor_font_size"][value="true"]'),r=this.el.querySelector('[name="editor_light_theme"][value="true"]'),o=this.el.querySelector('[name="editor_markdown_word_wrap"][value="true"]');e.checked=i.editor_auto_completion,t.checked=i.editor_auto_signature,n.checked=i.editor_font_size===Lp.large,r.checked=i.editor_theme===zu.light,o.checked=i.editor_markdown_word_wrap,e.addEventListener("change",s=>{Yn.update({editor_auto_completion:s.target.checked})}),t.addEventListener("change",s=>{Yn.update({editor_auto_signature:s.target.checked})}),n.addEventListener("change",s=>{Yn.update({editor_font_size:s.target.checked?Lp.large:Lp.normal})}),r.addEventListener("change",s=>{Yn.update({editor_theme:s.target.checked?zu.light:zu.default})}),o.addEventListener("change",s=>{Yn.update({editor_markdown_word_wrap:s.target.checked})})}},mU=tre;var NE=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ua=(i,e,t)=>(NE(i,e,"read from private field"),t?t.call(i):e.get(i)),za=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Jx=(i,e,t,n)=>(NE(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),Fo=(i,e,t)=>(NE(i,e,"access private method"),t),ire="14.0";function nre(i,e,t){let n=`https://cdn.jsdelivr.net/npm/emojibase-data@${e}/${i}`;return typeof t=="function"?n=t(i,e):typeof t=="string"&&(n=`${t}/${i}`),n}async function RE(i,e={}){let u=e,{local:t=!1,version:n="latest",cdnUrl:r}=u,o=Ho(u,["local","version","cdnUrl"]),s=nre(i,n,r),a=t?localStorage:sessionStorage,l=`emojibase/${n}/${i}`,c=a.getItem(l);if(c)return Promise.resolve(JSON.parse(c));let d=await fetch(s,me({credentials:"omit",mode:"cors",redirect:"error"},o));if(!d.ok)throw new Error("Failed to load Emojibase dataset.");let h=await d.json();try{a.setItem(l,JSON.stringify(h))}catch(m){}return h}var rre={discord:"joypixels",slack:"iamcal"};async function pU(i,e,t){var n;return RE(`${i}/shortcodes/${(n=rre[e])!==null&&n!==void 0?n:e}.json`,t)}function zp(i,e){if(e.length===0)return i;let t=new Set(i.shortcodes);return e.forEach(n=>{let r=n[i.hexcode];Array.isArray(r)?r.forEach(o=>t.add(o)):r&&t.add(r)}),i.shortcodes=[...t],i.skins&&i.skins.forEach(n=>{zp(n,e)}),i}function ore(i,e=[]){let t=[];return i.forEach(n=>{if(n.skins){let r=n,{skins:o}=r,s=Ho(r,["skins"]);t.push(zp(s,e)),o.forEach(a=>{let l=me({},a);s.tags&&(l.tags=[...s.tags]),t.push(zp(l,e))})}else t.push(zp(n,e))}),t}function sre(i,e){return e.length===0||i.forEach(t=>{zp(t,e)}),i}async function wU(i,e={}){let l=e,{compact:t=!1,flat:n=!1,shortcodes:r=[]}=l,o=Ho(l,["compact","flat","shortcodes"]),s=await RE(`${i}/${t?"compact":"data"}.json`,o),a=[];return r.length>0&&(a=await Promise.all(r.map(c=>{let d;if(c.includes("/")){let[h,u]=c.split("/");d=pU(h,u,o)}else d=pU(i,c,o);return d.catch(()=>({}))}))),n?ore(s,a):sre(s,a)}async function xU(i,e){return RE(`${i}/messages.json`,e)}function qx(i,e){let t=i.target.closest("[data-emoji]");if(t){let n=e.find(r=>r.emoji===t.dataset.emoji);if(n)return n}return null}function EU(i){var e;let t=(e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)");return i.animate&&!(t!=null&&t.matches)}function fU(i,e){return i.toLowerCase().includes(e.toLowerCase())}function are(i,e){let t=null;return()=>{t||(t=window.setTimeout(()=>{i(),t=null},e))}}function lre(i,e){let t=null;return(...n)=>{t&&window.clearTimeout(t),t=window.setTimeout(()=>{i(...n),t=null},e)}}function Nd(i,e,t,n){if(EU(n)&&i.animate)return i.animate(e,t).finished;let r=t.direction==="normal"?1:0,o=Object.entries(e).reduce((s,[a,l])=>Xe(me({},s),{[a]:l[r]}),{});return Object.assign(i.style,o),Promise.resolve()}function Zx(i){var e;let t=document.createElement("template");return t.innerHTML=i,(e=t.content)==null?void 0:e.firstElementChild}async function cre(i){let e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}function bn(...i){return i.reduce((e,t)=>Xe(me({},e),{[t]:DE(t)}),{})}function DE(i){return`picmo__${i}`}function Zb(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function ju(i,...e){Zb(i).append(...e)}function TU(i){try{return window[i].length,!0}catch(e){return!1}}function dre(){return TU("sessionStorage")}function hre(){return TU("localStorage")}function IU(){let i={};return{getItem:e=>i[e],setItem:(e,t)=>i[e]=t,length:Object.keys(i).length,clear:()=>i={},key:e=>Object.keys(i)[e],removeItem:e=>delete i[e]}}function Wp(i){var e;return{emoji:i.emoji,label:i.label,tags:i.tags,skins:(e=i.skins)==null?void 0:e.map(t=>Wp(t)),order:i.order,custom:!1,hexcode:i.hexcode,version:i.version}}function s2(i,e,t){var n;return t&&!t.some(r=>r.order===i.group)?!1:fU(i.label,e)||((n=i.tags)==null?void 0:n.some(r=>fU(r,e)))}var a2=class{constructor(e="en"){this.locale=e}},ure=[(i,e)=>(i.hexcode==="1F91D"&&e<14&&(i.skins=[]),i),(i,e)=>(i.skins&&(i.skins=i.skins.filter(t=>!t.version||t.version<=e)),i)];function mre(i,e){return ure.some(t=>t(i,e)===null)?null:i}function l2(i,e){return i.filter(t=>mre(t,e)!==null)}var Gx={};function kU(i){return Gx[i]||(Gx[i]=new eE(i)),Gx[i]}kU.deleteDatabase=i=>{};var eE=class extends a2{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let n=this.categories.filter(r=>r.key!=="component");if(e.showRecents&&n.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&n.push({key:"custom",order:10}),e.categories){let r=e.categories;n=n.filter(o=>r.includes(o.key)),n.sort((o,s)=>r.indexOf(o.key)-r.indexOf(s.key))}else n.sort((r,o)=>r.order-o.order);return Promise.resolve(n)}getEmojis(e,t){let n=this.emojis.filter(r=>r.group===e.order).filter(r=>r.version<=t).sort((r,o)=>r.order!=null&&o.order!=null?r.order-o.order:0).map(Wp);return Promise.resolve(l2(n,t))}searchEmojis(e,t,n,r){let o=this.emojis.filter(l=>s2(l,e,r)&&l.version<=n).map(Wp),s=t.filter(l=>s2(l,e,r)),a=[...l2(o,n),...s];return Promise.resolve(a)}setMeta(e){this.meta=e}};!dre()&&typeof window<"u"&&(console.warn("[picmo] sessionStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"sessionStorage",{value:IU()}));function pre(i,e){let t=`https://cdn.jsdelivr.net/npm/emojibase-data@${i}/${e}`;return{emojisUrl:`${t}/data.json`,messagesUrl:`${t}/messages.json`}}async function gU(i){try{return(await fetch(i,{method:"HEAD"})).headers.get("etag")}catch(e){return null}}function fre(i){let{emojisUrl:e,messagesUrl:t}=pre("latest",i);try{return Promise.all([gU(e),gU(t)])}catch(n){return Promise.all([null,null])}}async function gre(i,e,t){let n;try{n=await i.getEtags()}catch(s){n={}}let{storedEmojisEtag:r,storedMessagesEtag:o}=n;if(t!==o||e!==r){let[s,a]=await Promise.all([xU(i.locale),wU(i.locale)]);await i.populate({groups:s.groups,emojis:a,emojisEtag:e,messagesEtag:t})}}async function _re(i,e){let t=await i.getHash();return e!==t}async function AU(i,e,t){let n=t||e(i);try{await n.open()}catch(r){console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),n=kU(i)}return n}async function vre(i,e,t){let n=await AU(i,e,t),[r,o]=await fre(i);if(await n.isPopulated())r&&o&&await gre(n,r,o);else{let[s,a]=await Promise.all([xU(i),wU(i)]);await n.populate({groups:s.groups,emojis:a,emojisEtag:r,messagesEtag:o})}return n}async function bre(i,e,t,n,r){let o=await AU(i,e,r),s=await cre(n);return(!await o.isPopulated()||await _re(o,s))&&await o.populate({groups:t.groups,emojis:n,hash:s}),o}async function LU(i,e,t,n,r){return t&&n?bre(i,e,t,n,r):vre(i,e,r)}var jp=class{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;(e=this.rootElement)==null||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,n){e.target===t&&(n.focus(),e.preventDefault())}handleKeyDown(e){e.key==="Tab"&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}},{light:yre,dark:dYe,auto:hYe}=bn("light","dark","auto"),Ye=class{constructor({template:e,classes:t,parent:n}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=n,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then(t=>{this.emojiData=t})}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync(me({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync(me({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.on(e,this.appEvents[e],this)}),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.off(e,this.appEvents[e])}),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){let t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce((e,t)=>Xe(me({},e),{[t]:this.el.querySelector(this.uiElements[t])}),{})}bindUIEvents(){this.uiEvents.forEach(e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)})}unbindUIEvents(){this.uiEvents.forEach(e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)})}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){let e=new MutationObserver(t=>{let[n]=t;n.type==="childList"&&n.addedNodes[0]===this.el&&(EU(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)});e.observe(this.parent,{childList:!0})}}static childEvent(e,t,n,r={}){return{target:e,event:t,handler:n,options:r}}static uiEvent(e,t,n={}){return{event:e,handler:t,options:n}}static byClass(e){return`.${e}`}},Sre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',Cre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',wre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',xre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',Ere='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',Tre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',Ire='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',kre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',Are=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
<defs>
|
|
<radialGradient gradientUnits="userSpaceOnUse" cy="10%" id="gradient-0">
|
|
<stop offset="0" stop-color="hsl(50, 100%, 50%)" />
|
|
<stop offset="1" stop-color="hsl(50, 100%, 60%)" />
|
|
</radialGradient>
|
|
</defs>
|
|
<!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
|
|
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="172.586" cy="207.006" rx="39.974" ry="39.974"/>
|
|
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="334.523" cy="207.481" rx="39.974" ry="39.974"/>
|
|
<ellipse stroke="#000" fill="rgba(0, 0, 0, 0.6)" cx="313.325" cy="356.208" rx="91.497" ry="59.893"/>
|
|
<path fill="#55a7ff" d="M 159.427 274.06 L 102.158 363.286 L 124.366 417.011 L 160.476 423.338 L 196.937 414.736 L 218.502 375.214"></path>
|
|
<path fill="url(#gradient-0)" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM256 352C290.9 352 323.2 367.8 348.3 394.9C354.3 401.4 364.4 401.7 370.9 395.7C377.4 389.7 377.7 379.6 371.7 373.1C341.6 340.5 301 320 256 320C247.2 320 240 327.2 240 336C240 344.8 247.2 352 256 352H256zM208 369C208 349 179.6 308.6 166.4 291.3C163.2 286.9 156.8 286.9 153.6 291.3C140.6 308.6 112 349 112 369C112 395 133.5 416 160 416C186.5 416 208 395 208 369H208zM303.6 208C303.6 225.7 317.1 240 335.6 240C353.3 240 367.6 225.7 367.6 208C367.6 190.3 353.3 176 335.6 176C317.1 176 303.6 190.3 303.6 208zM207.6 208C207.6 190.3 193.3 176 175.6 176C157.1 176 143.6 190.3 143.6 208C143.6 225.7 157.1 240 175.6 240C193.3 240 207.6 225.7 207.6 208z" />
|
|
</svg>`,Lre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>',Nre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256.3 331.8C208.9 331.8 164.1 324.9 124.5 312.8C112.2 309 100.2 319.7 105.2 331.5C130.1 390.6 188.4 432 256.3 432C324.2 432 382.4 390.6 407.4 331.5C412.4 319.7 400.4 309 388.1 312.8C348.4 324.9 303.7 331.8 256.3 331.8H256.3zM176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176zM336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240z"/></svg>',Rre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"/></svg>',Dre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M413.8 447.1L256 448l0 31.99C256 497.7 241.8 512 224.1 512c-17.67 0-32.1-14.32-32.1-31.99l0-31.99l-158.9-.0099c-28.5 0-43.69-34.49-24.69-56.4l68.98-79.59H62.22c-25.41 0-39.15-29.8-22.67-49.13l60.41-70.85H89.21c-21.28 0-32.87-22.5-19.28-37.31l134.8-146.5c10.4-11.3 28.22-11.3 38.62-.0033l134.9 146.5c13.62 14.81 2.001 37.31-19.28 37.31h-10.77l60.35 70.86c16.46 19.34 2.716 49.12-22.68 49.12h-15.2l68.98 79.59C458.7 413.7 443.1 447.1 413.8 447.1z"/></svg>',Mre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M224 256c70.7 0 128-57.31 128-128S294.7 0 224 0C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3c-95.73 0-173.3 77.6-173.3 173.3C0 496.5 15.52 512 34.66 512H413.3C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304zM479.1 320h-73.85C451.2 357.7 480 414.1 480 477.3C480 490.1 476.2 501.9 470 512h138C625.7 512 640 497.6 640 479.1C640 391.6 568.4 320 479.1 320zM432 256C493.9 256 544 205.9 544 144S493.9 32 432 32c-25.11 0-48.04 8.555-66.72 22.51C376.8 76.63 384 101.4 384 128c0 35.52-11.93 68.14-31.59 94.71C372.7 243.2 400.8 256 432 256z"/></svg>',Ore=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
<defs>
|
|
<radialGradient id="radial" cy="85%">
|
|
<stop offset="20%" stop-color="var(--color-secondary)" />
|
|
<stop offset="100%" stop-color="var(--color-primary)" />
|
|
</radialGradient>
|
|
</defs>
|
|
<!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
|
|
<path fill="url('#radial')" d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z" />
|
|
</svg>`,Pre='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>';function Fre(i,e){let t=Zx(e);return t.dataset.icon=i,t.classList.add(DE("icon")),t}var _U={clock:Sre,flag:Cre,frown:wre,gamepad:xre,lightbulb:Ere,mug:Tre,plane:Ire,robot:kre,sad:Are,search:Lre,smiley:Nre,symbols:Rre,tree:Dre,users:Mre,warning:Ore,xmark:Pre},u2={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function NU(i,e){if(!(i in _U))return console.warn(`Unknown icon: "${i}"`),document.createElement("div");let t=Fre(i,_U[i]);return e&&t.classList.add(DE(`icon-${e}`)),t}var Hre={mode:"sync"},Bp,e2,t2,tE,i2,iE,n2,nE,Bi=class{constructor(e,t={}){za(this,t2),za(this,i2),za(this,n2),za(this,Bp,void 0),za(this,e2,void 0),Jx(this,Bp,e),Jx(this,e2,t.mode||Hre.mode)}renderSync(e={}){let t=Zx(Ua(this,Bp).call(this,e));return Fo(this,n2,nE).call(this,t,e),Fo(this,i2,iE).call(this,t),Fo(this,t2,tE).call(this,t,e),t}async renderAsync(e={}){let t=Zx(Ua(this,Bp).call(this,e));return Fo(this,n2,nE).call(this,t,e),Fo(this,i2,iE).call(this,t),await Fo(this,t2,tE).call(this,t,e),t}render(e){return Ua(this,e2)==="sync"?this.renderSync(e):this.renderAsync(e)}};Bp=new WeakMap,e2=new WeakMap,t2=new WeakSet,tE=async function(i,e){let t=i.querySelectorAll("[data-view]"),n=[];for(let r of t){let o=e[r.dataset.view];o?r.dataset.render!=="sync"?n.push(o.render().then(s=>(r.replaceWith(s),s))):r.replaceWith(o.renderSync()):r.remove()}return Promise.all(n)},i2=new WeakSet,iE=function(i){i.querySelectorAll("i[data-icon]").forEach(e=>{let{icon:t,size:n}=e.dataset;e.replaceWith(NU(t,n))})},n2=new WeakSet,nE=function(i,e){return i.querySelectorAll("[data-placeholder]").forEach(t=>{let n=t.dataset.placeholder;if(n&&e[n]){let r=e[n];t.replaceWith(...[r].flat())}else console.warn(`Missing placeholder element for key "${n}"`)}),i};var Bre=bn("imagePlaceholder","placeholder"),zre=new Bi(({classes:i})=>`
|
|
<div class="${i.placeholder} ${i.imagePlaceholder}"></div>
|
|
`),rE=class extends Ye{constructor({classNames:e}={}){super({template:zre,classes:Bre}),this.classNames=e}load(e){let t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",()=>{this.el.replaceWith(t)},{once:!0}),Promise.resolve(e).then(n=>t.src=n)}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach(e=>this.el.classList.add(e)),this.el}},Ure=bn("customEmoji"),oE=class{renderElement(e){return{content:e}}renderImage(e="",t){let n=new rE({classNames:e});return n.renderSync(),{content:n,resolver:()=>(n.load(t()),n.el)}}doRender(e,t,n){if(e.custom)return this.renderCustom(e,t,n);let{content:r,resolver:o}=this.render(e,n),s=r instanceof Element?r:r.el;return o&&o(),s}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:n,data:r}){return{url:e,label:t,emoji:n,data:r}}renderCustom(e,t,n=""){let r=[Ure.customEmoji,n].join(" ").trim(),{content:o,resolver:s}=this.renderImage(r,()=>e.url),a=o instanceof Element?o:o.el;return s&&s(),a}},Wre=new Bi(({emoji:i})=>`<span>${i}</span>`),sE=class extends oE{render(e){return this.renderElement(Wre.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:n}){return{emoji:e,hexcode:t,label:n}}},jre={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},aE="PicMo";function RU(i){return new lE(i)}RU.deleteDatabase=i=>new Promise((e,t)=>{let n=indexedDB.deleteDatabase(`${aE}-${i}`);n.addEventListener("success",e),n.addEventListener("error",t)});var lE=class extends a2{async open(){let e=indexedDB.open(`${aE}-${this.locale}`);return new Promise((t,n)=>{e.addEventListener("success",r=>{var o;this.db=(o=r.target)==null?void 0:o.result,t()}),e.addEventListener("error",n),e.addEventListener("upgradeneeded",async r=>{var o;this.db=(o=r.target)==null?void 0:o.result,this.db.createObjectStore("category",{keyPath:"order"});let s=this.db.createObjectStore("emoji",{keyPath:"emoji"});s.createIndex("category","group"),s.createIndex("version","version"),this.db.createObjectStore("meta")})})}async delete(){this.close();let e=indexedDB.deleteDatabase(`${aE}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){let e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){let e=this.db.transaction("meta","readonly").objectStore("meta"),[t,n]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:n.target.result}}async setMeta(e){let t=this.db.transaction("meta","readwrite"),n=t.objectStore("meta");return new Promise(r=>{t.oncomplete=r,Object.keys(e).filter(Boolean).forEach(o=>{n.put(e[o],o)})})}async getHash(){let e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){let e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:n,messagesEtag:r,hash:o}){await this.removeAllObjects("category","emoji");let s=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:n,messagesEtag:r,hash:o})];await Promise.all(s)}async getCategories(e){var t;let n=this.db.transaction("category","readonly").objectStore("category"),r=(await this.waitForRequest(n.getAll())).target.result.filter(o=>o.key!=="component");if(e.showRecents&&r.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&r.push({key:"custom",order:10}),e.categories){let o=e.categories;r=r.filter(s=>o.includes(s.key)),r.sort((s,a)=>o.indexOf(s.key)-o.indexOf(a.key))}else r.sort((o,s)=>o.order-s.order);return r}async getEmojis(e,t){let n=this.db.transaction("emoji","readonly").objectStore("emoji").index("category"),r=(await this.waitForRequest(n.getAll(e.order))).target.result.filter(o=>o.version<=t).sort((o,s)=>o.order!=null&&s.order!=null?o.order-s.order:0).map(Wp);return l2(r,t)}async searchEmojis(e,t,n,r){let o=[];return new Promise((s,a)=>{let l=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();l.addEventListener("success",c=>{var d;let h=(d=c.target)==null?void 0:d.result;if(!h)return s([...l2(o,n),...t.filter(m=>s2(m,e))]);let u=h.value;s2(u,e,r)&&u.version<=n&&o.push(Wp(u)),h.continue()}),l.addEventListener("error",c=>{a(c)})})}async waitForRequest(e){return new Promise((t,n)=>{e.onsuccess=t,e.onerror=n})}withTransaction(e,t="readwrite",n){return new Promise((r,o)=>{let s=this.db.transaction(e,t);s.oncomplete=r,s.onerror=o,n(s)})}async removeAllObjects(...e){let t=this.db.transaction(e,"readwrite"),n=e.map(r=>t.objectStore(r));await Promise.all(n.map(r=>this.waitForRequest(r.clear())))}async addObjects(e,t){return this.withTransaction(e,"readwrite",n=>{let r=n.objectStore(e);t.forEach(o=>{r.add(o)})})}},cE=class{},$x="PicMo:recents",dE=class extends cE{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem($x)}getRecents(e){var t;try{return JSON.parse((t=this.storage.getItem($x))!=null?t:"[]").slice(0,e)}catch(n){return[]}}addOrUpdateRecent(e,t){let n=[e,...this.getRecents(t).filter(r=>r.hexcode!==e.hexcode)].slice(0,t);try{this.storage.setItem($x,JSON.stringify(n))}catch(r){console.warn("storage is not available, recent emojis will not be saved")}}},hE=class extends dE{constructor(){super(localStorage)}},Vre={dataStore:RU,theme:yre,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:jre,locale:"en",maxRecents:50,custom:[]};!hre()&&typeof window<"u"&&(console.warn("[picmo] localStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"localStorage",{value:IU()}));function ME(i={}){return Xe(me(me({},Vre),i),{renderer:i.renderer||new sE,recentsProvider:i.recentsProvider||new hE})}var Rd,Up,c2,r2,uE,Dd=class{constructor(){za(this,Up),za(this,r2),za(this,Rd,new Map)}on(e,t,n){Fo(this,r2,uE).call(this,e,t,n)}once(e,t,n){Fo(this,r2,uE).call(this,e,t,n,!0)}off(e,t){let n=Fo(this,Up,c2).call(this,e);Ua(this,Rd).set(e,n.filter(r=>r.handler!==t))}emit(e,...t){Fo(this,Up,c2).call(this,e).forEach(n=>{n.handler.apply(n.context,t),n.once&&this.off(e,n.handler)})}removeAll(){Ua(this,Rd).clear()}};Rd=new WeakMap,Up=new WeakSet,c2=function(i){return Ua(this,Rd).has(i)||Ua(this,Rd).set(i,[]),Ua(this,Rd).get(i)},r2=new WeakSet,uE=function(i,e,t,n=!1){Fo(this,Up,c2).call(this,i).push({context:t,handler:e,once:n})};var Kre={injectStyles:!0},mE=class extends Dd{},pE=class extends Dd{},fE=bn("emojiCategory","categoryName","noRecents","recentEmojis"),Vp=class extends Ye{constructor({template:e,category:t,showVariants:n,lazyLoader:r}){super({template:e,classes:fE}),this.baseUIElements={categoryName:Ye.byClass(fE.categoryName)},this.category=t,this.showVariants=n,this.lazyLoader=r}setActive(e,t,n){this.emojiContainer.setActive(e,t,n)}},qre=new Bi(({classes:i,emoji:e})=>`
|
|
<button
|
|
type="button"
|
|
class="${i.emojiButton}"
|
|
title="${e.label}"
|
|
data-emoji="${e.emoji}"
|
|
tabindex="-1">
|
|
<div data-placeholder="emojiContent"></div>
|
|
</button>
|
|
`),Gre=bn("emojiButton"),d2=class extends Ye{constructor({emoji:e,lazyLoader:t,category:n}){super({template:qre,classes:Gre}),this.emoji=e,this.lazyLoader=t,this.category=n}initialize(){this.uiEvents=[Ye.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}},gE=class{constructor(e,t,n=0,r=0,o=!1){this.events=new Dd,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=n,this.focusedColumn=r,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,n=!0){let r=this.getIndex();this.focusedRow=e,t!==void 0&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:r,to:this.getIndex(),performFocus:n})}setFocusedIndex(e,t=!0){let n=Math.floor(e/this.columnCount),r=e%this.columnCount;this.setCell(n,r,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}},$re=new Bi(({classes:i})=>`
|
|
<div class="${i.emojiContainer}">
|
|
<div data-placeholder="emojis"></div>
|
|
</div>
|
|
`),Yre=bn("emojiContainer"),Md=class extends Ye{constructor({emojis:e,showVariants:t,preview:n=!0,lazyLoader:r,category:o,fullHeight:s=!1}){super({template:$re,classes:Yre}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=r,this.preview=n,this.emojis=e,this.category=o,this.fullHeight=s,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new gE(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[Ye.uiEvent("click",this.selectEmoji),Ye.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(Ye.uiEvent("mouseover",this.showPreview),Ye.uiEvent("mouseout",this.hidePreview),Ye.uiEvent("focus",this.showPreview,{capture:!0}),Ye.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if(typeof e=="string"){let n=this.emojis.findIndex(r=>r.emoji===e);this.grid.setFocusedIndex(n,!1),setTimeout(()=>{var r,o,s,a;let l=this.emojiViews[n].el;l.scrollIntoView();let c=(r=l.parentElement)==null?void 0:r.previousElementSibling,d=(s=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:s.parentElement;d.scrollTop-=(a=c==null?void 0:c.offsetHeight)!=null?a:0})}else e.row==="first"||e.row===0?this.grid.setCell(0,e.offset,t):e.row==="last"&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,n){var r;e?this.setFocusedView(t,n):(r=this.emojiViews[this.grid.getIndex()])==null||r.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map(e=>this.viewFactory.create(d2,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer})),this.emojiElements=this.emojiViews.map(e=>e.renderSync()),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach(e=>e.destroy()),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:n}){var r,o;(r=this.emojiViews[e])==null||r.deactivateFocus(),(o=this.emojiViews[t])==null||o.activateFocus(n)}selectEmoji(e){e.stopPropagation();let t=qx(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){let t=e.target.closest("button"),n=t==null?void 0:t.firstElementChild,r=qx(e,this.emojis);r&&this.events.emit("preview:show",r,n==null?void 0:n.cloneNode(!0))}hidePreview(e){qx(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}},Xre=new Bi(({classes:i,category:e,pickerId:t,icon:n,i18n:r})=>`
|
|
<section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}">
|
|
<h3 data-category="${e.key}" class="${i.categoryName}">
|
|
<i data-icon="${n}"></i>
|
|
${r.get(`categories.${e.key}`,e.message||e.key)}
|
|
</h3>
|
|
<div data-view="emojis" data-render="sync"></div>
|
|
</section>
|
|
`),_E=class extends Vp{constructor({category:e,showVariants:t,lazyLoader:n,emojiVersion:r}){super({category:e,showVariants:t,lazyLoader:n,template:Xre}),this.showVariants=t,this.lazyLoader=n,this.emojiVersion=r}initialize(){this.uiElements=me({},this.baseUIElements),super.initialize()}async render(){await this.emojiDataPromise;let e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(Md,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:u2[this.category.key]})}},vE=class extends Md{constructor({category:e,emojis:t,preview:n=!0,lazyLoader:r}){super({category:e,emojis:t,showVariants:!1,preview:n,lazyLoader:r})}async addOrUpdate(e){let t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter(r=>r!==e));let n=this.viewFactory.create(d2,{emoji:e});if(this.el.insertBefore(n.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter(r=>r!==e)],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);let r=this.el.childElementCount-this.options.maxRecents;for(let o=0;o<r;o++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}},Qre=new Bi(({emojiCount:i,classes:e,category:t,pickerId:n,icon:r,i18n:o})=>`
|
|
<section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${n}-category-${t.key}">
|
|
<h3 data-category="${t.key}" class="${e.categoryName}">
|
|
<i data-icon="${r}"></i>
|
|
${o.get(`categories.${t.key}`,t.message||t.key)}
|
|
</h3>
|
|
<div data-empty="${i===0}" class="${e.recentEmojis}">
|
|
<div data-view="emojis" data-render="sync"></div>
|
|
</div>
|
|
<div class="${e.noRecents}">
|
|
${o.get("recents.none")}
|
|
</div>
|
|
</section>
|
|
`,{mode:"async"}),bE=class extends Vp{constructor({category:e,lazyLoader:t,provider:n}){super({category:e,showVariants:!1,lazyLoader:t,template:Qre}),this.provider=n}initialize(){this.uiElements=Xe(me({},this.baseUIElements),{recents:Ye.byClass(fE.recentEmojis)}),this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;let t=(e=this.provider)==null?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(vE,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:u2[this.category.key]}),this.el}},Jre=new Bi(({classes:i,category:e,pickerId:t,icon:n,i18n:r})=>`
|
|
<section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}">
|
|
<h3 data-category="${e.key}" class="${i.categoryName}">
|
|
<i data-icon="${n}"></i>
|
|
${r.get(`categories.${e.key}`,e.message||e.key)}
|
|
</h3>
|
|
<div data-view="emojis" data-render="sync"></div>
|
|
</section>
|
|
`),yE=class extends Vp{constructor({category:e,lazyLoader:t}){super({template:Jre,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements=me({},this.baseUIElements),super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Md,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:u2[this.category.key]})}},h2=class{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){let t=new IntersectionObserver(n=>{n.filter(r=>r.intersectionRatio>0).map(r=>r.target).forEach(r=>{let o=this.elements.get(r);o==null||o(),t.unobserve(r)})},{root:e});this.elements.forEach((n,r)=>{t.observe(r)})}else this.elements.forEach(t=>{t()})}},vU=bn("emojiArea"),Zre=new Bi(({classes:i})=>`
|
|
<div class="${i.emojiArea}">
|
|
<div data-placeholder="emojis"></div>
|
|
</div>
|
|
`,{mode:"async"}),eoe={recents:bE,custom:yE};function toe(i){return eoe[i.key]||_E}function ioe(i){return!i||i==="button"?{row:"first",offset:0}:i}var SE=class extends Ye{constructor({categoryTabs:e,categories:t,emojiVersion:n}){super({template:Zre,classes:vU}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new h2,this.categoryTabs=e,this.categories=t,this.emojiVersion=n,this.handleScroll=are(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:Ye.byClass(vU.emojiArea)},this.uiEvents=[Ye.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);let e={};return this.categories.forEach((t,n)=>{e[`emojis-${t.key}`]=this.emojiCategories[n]}),await super.render({emojis:await Promise.all(this.emojiCategories.map(t=>t.render()))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach(e=>{var t;(t=this.observer)==null||t.unobserve(e.el),e.destroy()})}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){let t=toe(e);return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find(t=>t.key===this.options.initialCategory)?this.options.initialCategory:(e=this.categories.find(t=>t.key!=="recents"))==null?void 0:e.key}determineFocusTarget(e){let t=this.emojiCategories.find(n=>n.category.key===e);return this.options.initialEmoji&&(t!=null&&t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");let t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex(t=>t.key===e)}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:e!=null?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:e!=null?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var n;this.scrollListenerState="suspend";let{focus:r,performFocus:o,scroll:s}=me({performFocus:!1},t);this.emojiCategories[this.selectedCategory].setActive(!1);let a=this.selectedCategory=typeof e=="number"?e:this.getCategoryIndex(e);(n=this.categoryTabs)==null||n.setActiveTab(this.selectedCategory,{performFocus:o,scroll:r==="button"});let l=this.emojiCategories[a].el.offsetTop;this.emojiCategories[a].setActive(!0,ioe(r),r!=="button"&&o),s&&(this.el.scrollTop=l),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),(t=this.categoryTabs)==null||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if(this.scrollListenerState==="suspend"||!this.categoryTabs)return;if(this.scrollListenerState==="resume"){this.scrollListenerState="active";return}let e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,n=this.emojiCategories.findIndex((o,s)=>{var a;return e<((a=this.emojiCategories[s+1])==null?void 0:a.el.offsetTop)}),r={changeFocusable:!1,performFocus:!1,scroll:!1};e===0?this.categoryTabs.setActiveTab(0,r):Math.floor(e)===Math.floor(t)||n<0?this.categoryTabs.setActiveTab(this.categories.length-1,r):this.categoryTabs.setActiveTab(n,r)}},noe=new Bi(({classList:i,classes:e,icon:t,message:n})=>`
|
|
<div class="${i}" role="alert">
|
|
<div class="${e.iconContainer}"><i data-size="10x" data-icon="${t}"></i></div>
|
|
<h3 class="${e.title}">${n}</h3>
|
|
</div>
|
|
`),bU=bn("error","iconContainer","title"),Kp=class extends Ye{constructor({message:e,icon:t="warning",template:n=noe,className:r}){super({template:n,classes:bU}),this.message=e,this.icon=t,this.className=r}renderSync(){let e=[bU.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}},roe=new Bi(({classList:i,classes:e,icon:t,i18n:n,message:r})=>`
|
|
<div class="${i}" role="alert">
|
|
<div class="${e.icon}"><i data-size="10x" data-icon="${t}"></i></div>
|
|
<h3 class="${e.title}">${r}</h3>
|
|
<button type="button">${n.get("retry")}</button>
|
|
</div>
|
|
`),ooe=bn("dataError"),CE=class extends Kp{constructor({message:e}){super({message:e,template:roe,className:ooe.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[Ye.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");let e=await LU(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}},Fp=bn("preview","previewEmoji","previewName","tagList","tag"),soe=new Bi(({classes:i,tag:e})=>`
|
|
<li class="${i.tag}">${e}</li>
|
|
`),aoe=new Bi(({classes:i})=>`
|
|
<div class="${i.preview}">
|
|
<div class="${i.previewEmoji}"></div>
|
|
<div class="${i.previewName}"></div>
|
|
<ul class="${i.tagList}"></ul>
|
|
</div>
|
|
`),wE=class extends Ye{constructor(){super({template:aoe,classes:Fp})}initialize(){this.uiElements={emoji:Ye.byClass(Fp.previewEmoji),name:Ye.byClass(Fp.previewName),tagList:Ye.byClass(Fp.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(ju(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";let n=e.tags.map(r=>soe.renderSync({tag:r,classes:Fp}));ju(this.ui.tagList,...n)}}hidePreview(){Zb(this.ui.emoji),Zb(this.ui.name),Zb(this.ui.tagList)}},loe=new Bi(({classes:i,i18n:e})=>`
|
|
<button title="${e.get("search.clear")}" class="${i.clearSearchButton}">
|
|
<i data-icon="xmark"></i>
|
|
</button>
|
|
`),coe=new Bi(({classes:i,i18n:e})=>`
|
|
<div class="${i.searchContainer}">
|
|
<input class="${i.searchField}" placeholder="${e.get("search")}">
|
|
<span class="${i.searchAccessory}"></span>
|
|
</div>
|
|
`,{mode:"async"}),Hp=bn("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound"),xE=class extends Ye{constructor({categories:e,emojiVersion:t}){super({template:coe,classes:Hp}),this.categories=e.filter(n=>n.key!=="recents"),this.emojiVersion=t,this.search=lre(this.search.bind(this),100)}initialize(){this.uiElements={searchField:Ye.byClass(Hp.searchField),searchAccessory:Ye.byClass(Hp.searchAccessory)},this.uiEvents=[Ye.childEvent("searchField","keydown",this.onKeyDown),Ye.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=NU("search"),this.notFoundMessage=this.viewFactory.create(Kp,{message:this.i18n.get("search.notFound"),className:Hp.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Kp,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=loe.render({classes:Hp,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",e=>this.onClearSearch(e)),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){ju(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",(t=this.resultsContainer)==null||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&e.key==="Escape"&&this.onClearSearch(e)}onKeyDown(e){var t;e.key==="Escape"&&this.searchField.value?this.onClearSearch(e):(e.key==="Enter"||e.key==="ArrowDown")&&this.resultsContainer&&(e.preventDefault(),(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))==null||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{let t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){let n=new h2;this.resultsContainer=this.viewFactory.create(Md,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:n}),this.resultsContainer.renderSync(),(e=this.resultsContainer)!=null&&e.el&&(n.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",r=>this.handleResultsKeydown(r)),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch(t){this.events.emit("content:show",this.errorMessage)}}},doe=new Bi(({classes:i})=>`
|
|
<div class="${i.variantOverlay}">
|
|
<div class="${i.variantPopup}">
|
|
<div data-view="emojis" data-render="sync"></div>
|
|
</div>
|
|
</div>
|
|
`),yU=bn("variantOverlay","variantPopup"),Yx={easing:"ease-in-out",duration:250,fill:"both"},SU={opacity:[0,1]},CU={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]},EE=class extends Ye{constructor({emoji:e,parent:t}){super({template:doe,classes:yU,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new jp,this.animateShow=()=>Promise.all([Nd(this.el,SU,Yx,this.options),Nd(this.ui.popup,CU,Yx,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:Ye.byClass(yU.variantPopup)},this.uiEvents=[Ye.uiEvent("click",this.handleClick),Ye.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){let e=Xe(me({},Yx),{direction:"reverse"});return Promise.all([Nd(this.el,SU,e,this.options),Nd(this.ui.popup,CU,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){e.key==="Escape"&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){let t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=-1,this.focusedEmojiIndex=e;let n=this.getEmoji(this.focusedEmojiIndex);n.tabIndex=0,n.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){let e=Xe(me({},this.emoji),{skins:null}),t=(this.emoji.skins||[]).map(r=>Xe(me({},r),{label:this.emoji.label,tags:this.emoji.tags})),n=[e,...t];return this.emojiContainer=this.viewFactory.create(Md,{emojis:n,preview:!1}),super.renderSync({emojis:this.emojiContainer}),n.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",n.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}},hoe=new Bi(({classes:i,i18n:e,category:t,pickerId:n,icon:r})=>`
|
|
<li class="${i.categoryTab}">
|
|
<button
|
|
aria-selected="false"
|
|
role="tab"
|
|
class="${i.categoryButton}"
|
|
tabindex="-1"
|
|
title="${e.get(`categories.${t.key}`,t.message||t.key)}"
|
|
type="button"
|
|
data-category="${t.key}"
|
|
id="${n}-category-${t.key}"
|
|
>
|
|
<i data-icon="${r}"></i>
|
|
</li>
|
|
`),Xx=bn("categoryTab","categoryTabActive","categoryButton"),TE=class extends Ye{constructor({category:e,icon:t}){super({template:hoe,classes:Xx}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:Ye.byClass(Xx.categoryButton)},this.uiEvents=[Ye.childEvent("button","click",this.selectCategory),Ye.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){let{changeFocusable:n,performFocus:r,scroll:o}=me({changeFocusable:!0,performFocus:!0,scroll:!0},t);this.el.classList.toggle(Xx.categoryTabActive,e),n&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&r&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}},uoe=new Bi(({classes:i})=>`
|
|
<div class="${i.categoryButtonsContainer}">
|
|
<ul role="tablist" class="${i.categoryButtons}">
|
|
<div data-placeholder="tabs"></div>
|
|
</ul>
|
|
</div>
|
|
`),moe=bn("categoryButtons","categoryButtonsContainer"),IE=class extends Ye{constructor({categories:e}){super({template:uoe,classes:moe}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[Ye.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){let e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map(e=>this.viewFactory.create(TE,{category:e,icon:u2[e.key]})),super.renderSync({tabs:this.tabViews.map(e=>e.renderSync())}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();let n=this.currentTabView,r=this.tabViews[e];n.setActive(!1,t),r.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{let t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}},poe=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function foe(){var i;let e=poe.find(t=>goe(t.emoji));return(i=e==null?void 0:e.version)!=null?i:1}function goe(i){let e=document.createElement("canvas").getContext("2d");if(e)return e.textBaseline="top",e.font="32px Arial",e.fillText(i,0,0),e.getImageData(16,16,1,1).data[0]!==0}function Qx(i,e){return Array.from({length:i},()=>e).join("")}function _oe({showHeader:i,classes:e}){return i?`
|
|
<header class="${e.header}">
|
|
<div data-view="search"></div>
|
|
<div data-view="categoryTabs" data-render="sync"></div>
|
|
</header>
|
|
`:""}function voe(i){let{classes:e,theme:t,className:n=""}=i;return`
|
|
<div class="picmo__picker ${e.picker} ${t} ${n}">
|
|
${_oe(i)}
|
|
<div class="${e.content}">
|
|
<div data-view="emojiArea"></div>
|
|
</div>
|
|
<div data-view="preview"></div>
|
|
</div>
|
|
`}function boe(i){let{emojiCount:e,classes:t,theme:n,className:r,categoryCount:o}=i,s=({showSearch:d,classes:h})=>d?`
|
|
<div class="${h.searchSkeleton}">
|
|
<div class="${h.searchInput} ${h.placeholder}"></div>
|
|
</div>
|
|
`:"",a=({showCategoryTabs:d,classes:h})=>d?`
|
|
<div class="${h.categoryTabsSkeleton}">
|
|
${Qx(o,`<div class="${h.placeholder} ${h.categoryTab}"></div>`)}
|
|
</div>
|
|
`:"",l=({showHeader:d,classes:h})=>d?`
|
|
<header class="${h.headerSkeleton}">
|
|
${s(i)}
|
|
${a(i)}
|
|
</header>
|
|
`:"",c=({showPreview:d,classes:h})=>d?`
|
|
<div class="${h.previewSkeleton}">
|
|
<div class="${h.placeholder} ${h.previewEmoji}"></div>
|
|
<div class="${h.placeholder} ${h.previewName}"></div>
|
|
<ul class="${h.tagList}">
|
|
${Qx(3,`<li class="${h.placeholder} ${h.tag}"></li>`)}
|
|
</ul>
|
|
</div>
|
|
`:"";return`
|
|
<div class="picmo__picker ${t.skeleton} ${t.picker} ${n} ${r}">
|
|
${l(i)}
|
|
<div class="${t.contentSkeleton}">
|
|
<div class="${t.placeholder} ${t.categoryName}"></div>
|
|
<div class="${t.emojiGrid}">
|
|
${Qx(e,`<div class="${t.placeholder} ${t.emoji}"></div>`)}
|
|
</div>
|
|
</div>
|
|
${c(i)}
|
|
</div>
|
|
`}var yoe=new Bi(i=>i.isLoaded?voe(i):boe(i)),Xb=bn("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),Qb={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"},kE=class extends Ye{constructor(){super({template:yoe,classes:Xb}),this.pickerReady=!1,this.externalEvents=new pE,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(Qb[e],t.toString()),theme:e=>{let t=this.options.theme,n=this.el.closest(`.${t}`);this.el.classList.remove(t),n==null||n.classList.remove(t),this.el.classList.add(e),n==null||n.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:Ye.byClass(Xb.content),header:Ye.byClass(Xb.header)},this.uiEvents=[Ye.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),(e=this.search)==null||e.destroy(),this.emojiArea.destroy(),(t=this.categoryTabs)==null||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){let t=e.ctrlKey||e.metaKey;e.key==="s"&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(wE)),this.options.showSearch&&(this.search=this.viewFactory.create(xE,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(IE,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(SE,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(Qb).forEach(e=>{this.options[e]&&this.el.style.setProperty(Qb[e],this.options[e].toString())})}updateStyleProperty(e,t){this.el.style.setProperty(Qb[e],t.toString())}reinitialize(){this.renderSync()}onError(e){let t=this.viewFactory.createWithOptions({data:!1},CE,{message:this.i18n.get("error.load")}),n=this.el.offsetHeight||375;throw this.el.style.height=`${n}px`,ju(this.el,t.renderSync()),e}async onDataReady(e){let t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,this.options.emojiVersion==="auto"?this.emojiVersion=foe()||parseFloat(ire):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);let[n,r,o,s]=this.buildChildViews();await super.render({isLoaded:!0,search:r,categoryTabs:s,emojiArea:o,preview:n,showHeader:!!(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(n){this.events.emit("error",n)}}renderSync(){var e;let t=((e=this.options.categories)==null?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return ju(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(this.options.autoFocusSearch===!0)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||(e=this.getInitialFocusTarget())==null||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),(t=this.search)==null||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,n;e!==this.currentView&&(this.currentView!==this.emojiArea&&((t=this.currentView)==null||t.destroy()),this.ui.pickerContent.classList.toggle(Xb.fullHeight,e!==this.emojiArea),ju(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):(n=this.categoryTabs)==null||n.el.remove())}hideVariantPopup(){var e;(e=this.variantPopup)==null||e.destroy()}isPickerClick(e){var t,n;let r=e.target,o=this.el.contains(r),s=(n=(t=this.variantPopup)==null?void 0:t.el)==null?void 0:n.contains(r);return o||s}async selectEmoji({emoji:e}){var t,n;(t=e.skins)!=null&&t.length&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await((n=this.variantPopup)==null?void 0:n.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){let t=document.activeElement;this.events.once("variantPopup:hide",()=>{t==null||t.focus()}),this.variantPopup=this.viewFactory.create(EE,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach(t=>{this.updaters[t](e[t])}),Object.assign(this.options,e)}},AE=class{constructor({events:e,i18n:t,renderer:n,emojiData:r,options:o,customEmojis:s=[],pickerId:a}){this.events=e,this.i18n=t,this.renderer=n,this.emojiData=r,this.options=o,this.customEmojis=s,this.pickerId=a}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...n){let r=new t(...n);return r.setPickerId(this.pickerId),r.setEvents(this.events),r.setI18n(this.i18n),r.setRenderer(this.renderer),e.data!==!1&&r.setEmojiData(this.emojiData),r.setOptions(this.options),r.setCustomEmojis(this.customEmojis),r.viewFactory=this,r.initialize(),r}create(e,...t){return this.createWithOptions({},e,...t)}},o2,LE=class{constructor(e={}){za(this,o2,void 0),Jx(this,o2,new Map(Object.entries(e)))}get(e,t=e){return Ua(this,o2).get(e)||t}};o2=new WeakMap;function Soe(i,e){e===void 0&&(e={});var t=e.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i))}}function OE(){let i=!1;return function(e){Kre.injectStyles&&!i&&(Soe(e),i=!0)}}var Coe=`.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}
|
|
`;function woe(i){return LU(i.locale,i.dataStore,i.messages,i.emojiData)}var xoe=0,Jb;function Eoe(){return`picmo-${Date.now()}-${xoe++}`}var Toe=OE();function DU(i){Toe(Coe);let e=ME(i),t=((e==null?void 0:e.custom)||[]).map(s=>Xe(me({},s),{custom:!0,tags:["custom",...s.tags||[]]})),n=new mE;Jb||(Jb=woe(e));let r=new LE(e.i18n);Jb.then(s=>{n.emit("data:ready",s)}).catch(s=>{n.emit("error",s)});let o=new AE({events:n,i18n:r,customEmojis:t,renderer:e.renderer,options:e,emojiData:Jb,pickerId:Eoe()}).create(kE);return o.renderSync(),o}function Od(i){return i.split("-")[0]}function Vu(i){return i.split("-")[1]}function _2(i){return["top","bottom"].includes(Od(i))?"x":"y"}function jU(i){return i==="y"?"height":"width"}function MU(i,e,t){let{reference:n,floating:r}=i,o=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2,a=_2(e),l=jU(a),c=n[l]/2-r[l]/2,d=Od(e),h=a==="x",u;switch(d){case"top":u={x:o,y:n.y-r.height};break;case"bottom":u={x:o,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:s};break;case"left":u={x:n.x-r.width,y:s};break;default:u={x:n.x,y:n.y}}switch(Vu(e)){case"start":u[a]-=c*(t&&h?-1:1);break;case"end":u[a]+=c*(t&&h?-1:1);break}return u}var Ioe=async(i,e,t)=>{let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,a=await(s.isRTL==null?void 0:s.isRTL(e)),l=await s.getElementRects({reference:i,floating:e,strategy:r}),{x:c,y:d}=MU(l,n,a),h=n,u={},m=0;for(let p=0;p<o.length;p++){let{name:f,fn:_}=o[p],{x:b,y:C,data:T,reset:w}=await _({x:c,y:d,initialPlacement:n,placement:h,strategy:r,middlewareData:u,rects:l,platform:s,elements:{reference:i,floating:e}});if(c=b!=null?b:c,d=C!=null?C:d,u=Xe(me({},u),{[f]:me(me({},u[f]),T)}),w&&m<=50){m++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(l=w.rects===!0?await s.getElementRects({reference:i,floating:e,strategy:r}):w.rects),{x:c,y:d}=MU(l,h,a)),p=-1;continue}}return{x:c,y:d,placement:h,strategy:r,middlewareData:u}};function koe(i){return me({top:0,right:0,bottom:0,left:0},i)}function Aoe(i){return typeof i!="number"?koe(i):{top:i,right:i,bottom:i,left:i}}function m2(i){return Xe(me({},i),{top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height})}async function BE(i,e){var t;e===void 0&&(e={});let{x:n,y:r,platform:o,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:m=0}=e,p=Aoe(m),f=a[u?h==="floating"?"reference":"floating":h],_=m2(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(f)))==null||t?f:f.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),b=m2(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h==="floating"?Xe(me({},s.floating),{x:n,y:r}):s.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),strategy:l}):s[h]);return{top:_.top-b.top+p.top,bottom:b.bottom-_.bottom+p.bottom,left:_.left-b.left+p.left,right:b.right-_.right+p.right}}var Loe=Math.min,Noe=Math.max;function OU(i,e,t){return Noe(i,Loe(e,t))}var Roe={left:"right",right:"left",bottom:"top",top:"bottom"};function p2(i){return i.replace(/left|right|bottom|top/g,e=>Roe[e])}function VU(i,e,t){t===void 0&&(t=!1);let n=Vu(i),r=_2(i),o=jU(r),s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=p2(s)),{main:s,cross:p2(s)}}var Doe={start:"end",end:"start"};function PE(i){return i.replace(/start|end/g,e=>Doe[e])}var Moe=["top","right","bottom","left"],Ooe=Moe.reduce((i,e)=>i.concat(e,e+"-start",e+"-end"),[]);function Poe(i,e,t){return(i?[...t.filter(n=>Vu(n)===i),...t.filter(n=>Vu(n)!==i)]:t.filter(n=>Od(n)===n)).filter(n=>i?Vu(n)===i||(e?PE(n)!==n:!1):!0)}var Foe=function(i){return i===void 0&&(i={}),{name:"autoPlacement",options:i,async fn(e){var t,n,r,o,s;let{x:a,y:l,rects:c,middlewareData:d,placement:h,platform:u,elements:m}=e,Pe=i,{alignment:p=null,allowedPlacements:f=Ooe,autoAlignment:_=!0}=Pe,b=Ho(Pe,["alignment","allowedPlacements","autoAlignment"]),C=Poe(p,_,f),T=await BE(e,b),w=(t=(n=d.autoPlacement)==null?void 0:n.index)!=null?t:0,A=C[w];if(A==null)return{};let{main:O,cross:D}=VU(A,c,await(u.isRTL==null?void 0:u.isRTL(m.floating)));if(h!==A)return{x:a,y:l,reset:{placement:C[0]}};let j=[T[Od(A)],T[O],T[D]],q=[...(r=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?r:[],{placement:A,overflows:j}],_e=C[w+1];if(_e)return{data:{index:w+1,overflows:q},reset:{placement:_e}};let J=q.slice().sort((et,B)=>et.overflows[0]-B.overflows[0]),ke=(s=J.find(et=>{let{overflows:B}=et;return B.every(Z=>Z<=0)}))==null?void 0:s.placement,Oe=ke!=null?ke:J[0].placement;return Oe!==h?{data:{index:w+1,overflows:q},reset:{placement:Oe}}:{}}}};function Hoe(i){let e=p2(i);return[PE(i),e,PE(e)]}var Boe=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t;let{placement:n,middlewareData:r,rects:o,initialPlacement:s,platform:a,elements:l}=e,j=i,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",flipAlignment:m=!0}=j,p=Ho(j,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),f=Od(n),_=h||(f===s||!m?[p2(s)]:Hoe(s)),b=[s,..._],C=await BE(e,p),T=[],w=((t=r.flip)==null?void 0:t.overflows)||[];if(c&&T.push(C[f]),d){let{main:q,cross:_e}=VU(n,o,await(a.isRTL==null?void 0:a.isRTL(l.floating)));T.push(C[q],C[_e])}if(w=[...w,{placement:n,overflows:T}],!T.every(q=>q<=0)){var A,O;let q=((A=(O=r.flip)==null?void 0:O.index)!=null?A:0)+1,_e=b[q];if(_e)return{data:{index:q,overflows:w},reset:{placement:_e}};let J="bottom";switch(u){case"bestFit":{var D;let ke=(D=w.map(Oe=>[Oe,Oe.overflows.filter(Pe=>Pe>0).reduce((Pe,et)=>Pe+et,0)]).sort((Oe,Pe)=>Oe[1]-Pe[1])[0])==null?void 0:D[0].placement;ke&&(J=ke);break}case"initialPlacement":J=s;break}if(n!==J)return{reset:{placement:J}}}return{}}}};async function zoe(i,e){let{placement:t,platform:n,elements:r}=i,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=Od(t),a=Vu(t),l=_2(t)==="x",c=["left","top"].includes(s)?-1:1,d=o&&l?-1:1,h=typeof e=="function"?e(i):e,{mainAxis:u,crossAxis:m,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:me({mainAxis:0,crossAxis:0,alignmentAxis:null},h);return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:u*c}:{x:u*c,y:m*d}}var PU=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){let{x:t,y:n}=e,r=await zoe(e,i);return{x:t+r.x,y:n+r.y,data:r}}}};function Uoe(i){return i==="x"?"y":"x"}var FU=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:n,placement:r}=e,_=i,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:C,y:T}=b;return{x:C,y:T}}}}=_,l=Ho(_,["mainAxis","crossAxis","limiter"]),c={x:t,y:n},d=await BE(e,l),h=_2(Od(r)),u=Uoe(h),m=c[h],p=c[u];if(o){let b=h==="y"?"top":"left",C=h==="y"?"bottom":"right",T=m+d[b],w=m-d[C];m=OU(T,m,w)}if(s){let b=u==="y"?"top":"left",C=u==="y"?"bottom":"right",T=p+d[b],w=p-d[C];p=OU(T,p,w)}let f=a.fn(Xe(me({},e),{[h]:m,[u]:p}));return Xe(me({},f),{data:{x:f.x-t,y:f.y-n}})}}};function KU(i){return i&&i.document&&i.location&&i.alert&&i.setInterval}function Va(i){if(i==null)return window;if(!KU(i)){let e=i.ownerDocument;return e&&e.defaultView||window}return i}function Fs(i){return Va(i).getComputedStyle(i)}function Wa(i){return KU(i)?"":i?(i.nodeName||"").toLowerCase():""}function qU(){let i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function Hs(i){return i instanceof Va(i).HTMLElement}function $l(i){return i instanceof Va(i).Element}function Woe(i){return i instanceof Va(i).Node}function Ku(i){if(typeof ShadowRoot>"u")return!1;let e=Va(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function v2(i){let{overflow:e,overflowX:t,overflowY:n}=Fs(i);return/auto|scroll|overlay|hidden/.test(e+n+t)}function joe(i){return["table","td","th"].includes(Wa(i))}function GU(i){let e=/firefox/i.test(qU()),t=Fs(i);return t.transform!=="none"||t.perspective!=="none"||t.contain==="paint"||["transform","perspective"].includes(t.willChange)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)}function $U(){return!/^((?!chrome|android).)*safari/i.test(qU())}var HU=Math.min,qp=Math.max,f2=Math.round;function ja(i,e,t){var n,r,o,s;e===void 0&&(e=!1),t===void 0&&(t=!1);let a=i.getBoundingClientRect(),l=1,c=1;e&&Hs(i)&&(l=i.offsetWidth>0&&f2(a.width)/i.offsetWidth||1,c=i.offsetHeight>0&&f2(a.height)/i.offsetHeight||1);let d=$l(i)?Va(i):window,h=!$U()&&t,u=(a.left+(h&&(n=(r=d.visualViewport)==null?void 0:r.offsetLeft)!=null?n:0))/l,m=(a.top+(h&&(o=(s=d.visualViewport)==null?void 0:s.offsetTop)!=null?o:0))/c,p=a.width/l,f=a.height/c;return{width:p,height:f,top:m,right:u+p,bottom:m+f,left:u,x:u,y:m}}function Yl(i){return((Woe(i)?i.ownerDocument:i.document)||window.document).documentElement}function b2(i){return $l(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function YU(i){return ja(Yl(i)).left+b2(i).scrollLeft}function Voe(i){let e=ja(i);return f2(e.width)!==i.offsetWidth||f2(e.height)!==i.offsetHeight}function Koe(i,e,t){let n=Hs(e),r=Yl(e),o=ja(i,n&&Voe(e),t==="fixed"),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(n||!n&&t!=="fixed")if((Wa(e)!=="body"||v2(r))&&(s=b2(e)),Hs(e)){let l=ja(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else r&&(a.x=YU(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function XU(i){return Wa(i)==="html"?i:i.assignedSlot||i.parentNode||(Ku(i)?i.host:null)||Yl(i)}function BU(i){return!Hs(i)||Fs(i).position==="fixed"?null:qoe(i)}function qoe(i){let{offsetParent:e}=i,t=i,n=!1;for(;t&&t!==e;){let{assignedSlot:r}=t;if(r){let o=r.offsetParent;if(Fs(r).display==="contents"){let s=r.hasAttribute("style"),a=r.style.display;r.style.display=Fs(t).display,o=r.offsetParent,r.style.display=a,s||r.removeAttribute("style")}t=r,e!==o&&(e=o,n=!0)}else if(Ku(t)&&t.host&&n)break;t=Ku(t)&&t.host||t.parentNode}return e}function Goe(i){let e=XU(i);for(Ku(e)&&(e=e.host);Hs(e)&&!["html","body"].includes(Wa(e));){if(GU(e))return e;{let t=e.parentNode;e=Ku(t)?t.host:t}}return null}function FE(i){let e=Va(i),t=BU(i);for(;t&&joe(t)&&Fs(t).position==="static";)t=BU(t);return t&&(Wa(t)==="html"||Wa(t)==="body"&&Fs(t).position==="static"&&!GU(t))?e:t||Goe(i)||e}function zU(i){if(Hs(i))return{width:i.offsetWidth,height:i.offsetHeight};let e=ja(i);return{width:e.width,height:e.height}}function $oe(i){let{rect:e,offsetParent:t,strategy:n}=i,r=Hs(t),o=Yl(t);if(t===o)return e;let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if((r||!r&&n!=="fixed")&&((Wa(t)!=="body"||v2(o))&&(s=b2(t)),Hs(t))){let l=ja(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}return Xe(me({},e),{x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y})}function Yoe(i,e){let t=Va(i),n=Yl(i),r=t.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;let c=$U();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a,y:l}}function Xoe(i){var e;let t=Yl(i),n=b2(i),r=(e=i.ownerDocument)==null?void 0:e.body,o=qp(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=qp(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+YU(i),l=-n.scrollTop;return Fs(r||t).direction==="rtl"&&(a+=qp(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function QU(i){let e=XU(i);return["html","body","#document"].includes(Wa(e))?i.ownerDocument.body:Hs(e)&&v2(e)?e:QU(e)}function g2(i,e){var t;e===void 0&&(e=[]);let n=QU(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),o=Va(n),s=r?[o].concat(o.visualViewport||[],v2(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(g2(s))}function Qoe(i,e){let t=e.getRootNode==null?void 0:e.getRootNode();if(i.contains(e))return!0;if(t&&Ku(t)){let n=e;do{if(n&&i===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function Joe(i,e){let t=ja(i,!1,e==="fixed"),n=t.top+i.clientTop,r=t.left+i.clientLeft;return{top:n,left:r,x:r,y:n,right:r+i.clientWidth,bottom:n+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}function UU(i,e,t){return e==="viewport"?m2(Yoe(i,t)):$l(e)?Joe(e,t):m2(Xoe(Yl(i)))}function Zoe(i){let e=g2(i),t=["absolute","fixed"].includes(Fs(i).position)&&Hs(i)?FE(i):i;return $l(t)?e.filter(n=>$l(n)&&Qoe(n,t)&&Wa(n)!=="body"):[]}function ese(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i,o=[...t==="clippingAncestors"?Zoe(e):[].concat(t),n],s=o[0],a=o.reduce((l,c)=>{let d=UU(e,c,r);return l.top=qp(d.top,l.top),l.right=HU(d.right,l.right),l.bottom=HU(d.bottom,l.bottom),l.left=qp(d.left,l.left),l},UU(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}var tse={getClippingRect:ese,convertOffsetParentRelativeRectToViewportRelativeRect:$oe,isElement:$l,getDimensions:zU,getOffsetParent:FE,getDocumentElement:Yl,getElementRects:i=>{let{reference:e,floating:t,strategy:n}=i;return{reference:Koe(e,FE(t),n),floating:Xe(me({},zU(t)),{x:0,y:0})}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>Fs(i).direction==="rtl"};function ise(i,e,t,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=n,l=r&&!a,c=o&&!a,d=l||c?[...$l(i)?g2(i):[],...g2(e)]:[];d.forEach(f=>{l&&f.addEventListener("scroll",t,{passive:!0}),c&&f.addEventListener("resize",t)});let h=null;if(s){let f=!0;h=new ResizeObserver(()=>{f||t(),f=!1}),$l(i)&&!a&&h.observe(i),h.observe(e)}let u,m=a?ja(i):null;a&&p();function p(){let f=ja(i);m&&(f.x!==m.x||f.y!==m.y||f.width!==m.width||f.height!==m.height)&&t(),m=f,u=requestAnimationFrame(p)}return t(),()=>{var f;d.forEach(_=>{l&&_.removeEventListener("scroll",t),c&&_.removeEventListener("resize",t)}),(f=h)==null||f.disconnect(),h=null,a&&cancelAnimationFrame(u)}}var nse=(i,e,t)=>Ioe(i,e,me({platform:tse},t));async function rse(i,e,t,n){if(!n)throw new Error("Must provide a positioning option");return await(typeof n=="string"?ose(i,e,t,n):sse(e,n))}async function ose(i,e,t,n){if(!t)throw new Error("Reference element is required for relative positioning");let r;return n==="auto"?r={middleware:[Foe(),FU(),PU({mainAxis:5,crossAxis:12})]}:r={placement:n,middleware:[Boe(),FU(),PU(5)]},ise(t,e,async()=>{if((!t.isConnected||!t.offsetParent)&&ase(i))return;let{x:o,y:s}=await nse(t,e,r);Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${s}px`})})}function sse(i,e){return i.style.position="fixed",Object.entries(e).forEach(([t,n])=>{i.style[t]=n}),()=>{}}function ase(i){switch(i.options.onPositionLost){case"close":return i.close(),!0;case"destroy":return i.destroy(),!0;case"hold":return!0}}var lse={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function cse(i={}){return me(Xe(me({},lse),{rootElement:document.body}),i)}var dse='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>',WU=bn("popupContainer","closeButton"),HE=class{constructor(e,t){this.isOpen=!1,this.externalEvents=new Dd,this.options=me(me({},cse(t)),ME(e)),this.popupEl=document.createElement("div"),this.popupEl.classList.add(WU.popupContainer),this.popupEl.classList.add(this.options.theme),t.className&&this.popupEl.classList.add(t.className),this.options.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.type="button",this.closeButton.classList.add(WU.closeButton),this.closeButton.innerHTML=dse,this.closeButton.addEventListener("click",()=>{this.close()}),this.popupEl.appendChild(this.closeButton));let n=document.createElement("div");this.popupEl.appendChild(n),this.picker=DU(Xe(me({},this.options),{rootElement:n})),this.focusTrap=new jp,this.picker.addEventListener("data:ready",()=>{this.focusTrap.activate(this.picker.el),this.picker.setInitialFocus()}),this.options.hideOnEmojiSelect&&this.picker.addEventListener("emoji:select",()=>{var r;this.close(),(r=this.triggerElement)==null||r.focus()}),this.options.hideOnClickOutside&&(this.onDocumentClick=this.onDocumentClick.bind(this),document.addEventListener("click",this.onDocumentClick)),this.options.hideOnEscape&&(this.handleKeydown=this.handleKeydown.bind(this),this.popupEl.addEventListener("keydown",this.handleKeydown)),this.referenceElement=this.options.referenceElement,this.triggerElement=this.options.triggerElement}addEventListener(e,t){this.externalEvents.on(e,t),this.picker.addEventListener(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t),this.picker.removeEventListener(e,t)}handleKeydown(e){var t;e.key==="Escape"&&(this.close(),(t=this.triggerElement)==null||t.focus())}async destroy(){this.isOpen&&await this.close(),document.removeEventListener("click",this.onDocumentClick),this.picker.destroy(),this.externalEvents.removeAll()}toggle(e){return this.isOpen?this.close():this.open(e)}async open({triggerElement:e,referenceElement:t}={}){this.isOpen||(e&&(this.triggerElement=e),t&&(this.referenceElement=t),await this.initiateOpenStateChange(!0),this.popupEl.style.opacity="0",this.options.rootElement.appendChild(this.popupEl),await this.setPosition(),this.picker.reset(!1),await this.animatePopup(!0),await this.animateCloseButton(!0),this.picker.setInitialFocus(),this.externalEvents.emit("picker:open"))}async close(){var e;!this.isOpen||(await this.initiateOpenStateChange(!1),await this.animateCloseButton(!1),await this.animatePopup(!1),this.popupEl.remove(),this.picker.reset(),(e=this.positionCleanup)==null||e.call(this),this.focusTrap.deactivate(),this.externalEvents.emit("picker:close"))}getRunningAnimations(){return this.picker.el.getAnimations().filter(e=>e.playState==="running")}async setPosition(){var e;(e=this.positionCleanup)==null||e.call(this),this.positionCleanup=await rse(this,this.popupEl,this.referenceElement,this.options.position)}awaitPendingAnimations(){return Promise.all(this.getRunningAnimations().map(e=>e.finished))}onDocumentClick(e){var t;let n=e.target,r=(t=this.triggerElement)==null?void 0:t.contains(n);this.isOpen&&!this.picker.isPickerClick(e)&&!r&&this.close()}animatePopup(e){return Nd(this.popupEl,{opacity:[0,1],transform:["scale(0.9)","scale(1)"]},{duration:150,id:e?"show-picker":"hide-picker",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}animateCloseButton(e){if(this.closeButton)return Nd(this.closeButton,{opacity:[0,1]},{duration:25,id:e?"show-close":"hide-close",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}async initiateOpenStateChange(e){this.isOpen=e,await this.awaitPendingAnimations()}},hse=`.picmo__popupContainer{display:flex;flex-direction:column;position:absolute}.picmo__popupContainer .picmo__closeButton{position:absolute;opacity:0;background:transparent;border:none;z-index:1;right:0;top:0;cursor:pointer;padding:4px;align-self:flex-end;transform:translate(50%,-50%);background:#999999;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%}.picmo__popupContainer .picmo__closeButton:hover{background:var(--accent-color)}.picmo__popupContainer .picmo__closeButton svg{fill:#fff;width:1.25rem;height:1.25rem}
|
|
`,use=OE();function JU(i,e){return use(hse),new HE(me({autoFocus:"auto"},i),e)}var mse={mounted(){let i=this.el.querySelector("[data-emoji-button]"),e=this.el.querySelector("[data-emoji-preview]"),t=this.el.querySelector("[data-emoji-input]"),n=JU({showPreview:!1},{triggerElement:i,referenceElement:i,position:"bottom"});n.addEventListener("emoji:select",({emoji:r})=>{e.innerHTML=r,t.value=r}),i.addEventListener("click",r=>{n.toggle()})}},ZU=mse;var pse={mounted(){this.focus()},updated(){this.el!==document.activeElement&&this.focus()},focus(){vc(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}},eW=pse;var fse={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=Ti.subscribe("navigation",i=>{this.handleNavigationEvent(i)})},updated(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed(){this.unsubscribeFromNavigationEvents()},getProps(){return{focusableId:We(this.el,"data-focusable-id"),onValueChange:We(this.el,"data-on-value-change"),metadata:We(this.el,"data-metadata")}},initializeHeadingEl(){let i=this.el.querySelector("[data-el-heading]");i!==this.headingEl&&(this.headingEl=i,this.headingEl.addEventListener("paste",e=>{e.preventDefault();let t=e.clipboardData.getData("text/plain").replace(`
|
|
`," ");document.execCommand("insertText",!1,t)}),this.headingEl.addEventListener("keydown",e=>{e.key==="Enter"&&e.preventDefault()}),this.headingEl.addEventListener("blur",e=>{setTimeout(()=>{this.isFocused&&this.insertMode&&(this.headingEl.focus(),tW(this.headingEl))},0)}))},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"&&this.handleInsertModeChanged(i.enabled)},handleElementFocused(i,e){this.props.focusableId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&dl(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.el.setAttribute("phx-update","ignore"),this.headingEl.setAttribute("contenteditable",""),this.headingEl.focus(),tW(this.headingEl)):this.insertMode&&!i&&(this.insertMode=i,this.headingEl.removeAttribute("contenteditable"),this.el.removeAttribute("phx-update"),this.pushEvent(this.props.onValueChange,{value:this.headingEl.textContent.trim(),metadata:this.props.metadata}))}};function tW(i){let e=document.createRange();e.selectNodeContents(i),e.collapse(!1);let t=window.getSelection();t.removeAllRanges(),t.addRange(e)}var iW=fse;var gse={mounted(){this.props=this.getProps(),this.sourceEl=_h(this.el,"[data-source]"),this.targetEl=_h(this.el,"[data-target]"),this.updateDOM()},updated(){this.props=this.getProps(),this.updateDOM()},getProps(){return{language:We(this.el,"data-language")}},updateDOM(){let i=this.sourceEl.innerText;Uu(i,this.props.language).then(e=>{this.targetEl.innerHTML=e,this.el.setAttribute("data-highlighted","")})}},nW=gse;var zE=["bg-yellow-100","border-yellow-300"],_se={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.previewEl=this.el.querySelector("[data-preview]"),this.initialPreviewContentEl=this.previewEl.firstElementChild,this.cameraPreviewEl=this.el.querySelector("[data-camera-preview]"),this.cameraListEl=this.el.querySelector("[data-camera-list]"),this.cameraItemTemplateEl=this.cameraListEl.firstElementChild,this.cameraItemTemplateEl.remove(),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.openCameraButton=this.el.querySelector("[data-btn-open-camera]"),this.captureCameraButton=this.el.querySelector("[data-btn-capture-camera]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.cameraListPopulated=!1,this.cameraVideoEl=null,this.cameraStream=null,this.handleEvent(`image_input_change:${this.props.id}`,({image_info:i})=>{if(i){let e=yse(i,this.props.format);this.setPreview(e)}else this.setPreview(this.initialPreviewContentEl)}),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&this.loadFile(e),this.closeCameraView()}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...zE)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...zE)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...zE)}),this.openCameraButton.addEventListener("click",i=>{this.cameraListPopulated||(this.renderCameraList(),this.cameraListPopulated=!0)}),this.cameraListEl.addEventListener("click",i=>{let e=i.target.closest("[data-camera-id]");if(e){let t=e.dataset.cameraId;this.openCameraView(t)}}),this.captureCameraButton.addEventListener("click",i=>{let e=this.toCanvas(this.cameraVideoEl,this.cameraVideoEl.videoWidth,this.cameraVideoEl.videoHeight);this.pushImage(e),this.closeCameraView()}),this.cancelButton.addEventListener("click",i=>{this.closeCameraView()})},updated(){this.props=this.getProps()},getProps(){return{id:We(this.el,"data-id"),phxTarget:We(this.el,"data-phx-target",Zr),height:di(this.el,"data-height",null,Zr),width:di(this.el,"data-width",null,Zr),format:We(this.el,"data-format"),fit:We(this.el,"data-fit")}},loadFile(i){let e=new FileReader;e.onload=t=>{let n=document.createElement("img");n.addEventListener("load",r=>{let o=this.toCanvas(n,n.width,n.height);this.pushImage(o)}),n.src=t.target.result},e.readAsDataURL(i)},openCameraView(i){this.cameraPreviewEl.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.captureCameraButton.classList.remove("hidden"),this.previewEl.classList.add("hidden"),this.openCameraButton.classList.add("hidden"),this.uploadButton.classList.add("hidden"),navigator.mediaDevices.getUserMedia(this.cameraConstraints(i)).then(e=>{this.cameraStream=e,this.cameraVideoEl=document.createElement("video"),this.cameraVideoEl.autoplay=!0,this.cameraVideoEl.playsinline=!0,this.cameraVideoEl.muted=!0,this.cameraVideoEl.srcObject=e,this.setCameraPreview(this.cameraVideoEl)}).catch(()=>{})},cameraConstraints(i){return i==="system_default"?{audio:!1,video:!0}:{audio:!1,video:{deviceId:i}}},renderCameraList(){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(i=>navigator.mediaDevices.enumerateDevices().then(e=>(this.stopMediaStream(i),e))).then(i=>{let e=i.filter(t=>t.kind==="videoinput").map(t=>({deviceId:t.deviceId,label:t.label}));[{deviceId:"system_default",label:"System Default"},...e].forEach(({deviceId:t,label:n})=>{let r=this.cameraItemTemplateEl.cloneNode(!0);r.querySelector("[data-camera-id]").setAttribute("data-camera-id",t),r.querySelector("[data-label]").innerHTML=n,this.cameraListEl.appendChild(r)})}).catch(i=>{console.error(i),this.openCameraButton.disabled=!0})},closeCameraView(){return this.cameraStream!==null&&(this.stopMediaStream(this.cameraStream),this.cameraStream=null),this.cameraVideoEl!==null&&(this.cameraVideoEl.remove(),this.cameraVideoEl=null),this.cameraPreviewEl.classList.add("hidden"),this.cancelButton.classList.add("hidden"),this.captureCameraButton.classList.add("hidden"),this.previewEl.classList.remove("hidden"),this.openCameraButton.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),!0},stopMediaStream(i){i.getTracks().forEach(e=>{e.stop()})},pushImage(i){this.pushEventTo(this.props.phxTarget,"change",{data:vse(i,this.props.format),height:i.height,width:i.width})},toCanvas(i,e,t){let{width:n,height:r}=this.props,o=document.createElement("canvas"),s=o.getContext("2d");if(n===null&&r===null||n===e&&r===t)o.width=e,o.height=t,o.getContext("2d").drawImage(i,0,0,e,t,0,0,e,t);else if(this.props.fit==="contain"){let a=n/e,l=r/t,c=Math.min(a,l),d=Math.round(e*c),h=Math.round(t*c);o.width=d,o.height=h,s.drawImage(i,0,0,e,t,0,0,d,h)}else if(this.props.fit==="crop"){let a=n/e,l=r/t,c=Math.max(a,l),d=Math.round(e*c),h=Math.round(t*c);o.width=n,o.height=r,s.drawImage(i,Math.round((d-n)/c/2),Math.round((h-r)/c/2),e-Math.round((d-n)/c),t-Math.round((h-r)/c),0,0,n,r)}else if(this.props.fit==="pad"){let a=n/e,l=r/t,c=Math.min(a,l),d=Math.round(e*c),h=Math.round(t*c);o.width=n,o.height=r,s.fillStyle="black",s.fillRect(0,0,o.width,o.height),s.drawImage(i,0,0,e,t,Math.round((n-d)/2),Math.round((r-h)/2),d,h)}else o.width=n,o.height=r,s.drawImage(i,0,0,e,t,0,0,n,r);return o},setPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.previewEl.replaceChildren(i)},setCameraPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.cameraPreviewEl.replaceChildren(i)}};function vse(i,e){if(e==="png"||e==="jpeg"){let t=`data:image/${e};base64,`;return i.toDataURL(`image/${e}`).slice(t.length)}if(e==="rgb"){let t=i.getContext("2d").getImageData(0,0,i.width,i.height),n=bse(t);return Pg(n)}throw new Error(`Unexpected format: ${e}`)}function bse(i){let e=i.width*i.height,t=new Uint8ClampedArray(e*3);for(let n=0;n<e;n++)t[n*3]=i.data[n*4],t[n*3+1]=i.data[n*4+1],t[n*3+2]=i.data[n*4+2];return t.buffer}function yse(i,e){if(e==="png"||e==="jpeg"){let t=`data:image/${e};base64,${i.data}`,n=document.createElement("img");return n.src=t,n}if(e==="rgb"){let t=document.createElement("canvas");t.height=i.height,t.width=i.width;let n=vh(i.data),r=Sse(n,i.width,i.height);return t.getContext("2d").putImageData(r,0,0),t}throw new Error(`Unexpected format: ${e}`)}function Sse(i,e,t){let n=e*t,r=new Uint8Array(i),o=new Uint8ClampedArray(n*4);for(let s=0;s<n;s++)o[s*4]=r[s*3],o[s*4+1]=r[s*3+1],o[s*4+2]=r[s*3+2],o[s*4+3]=255;return new ImageData(o,e,t)}var rW=_se;var Cse={mounted(){this.updateSrc()},updated(){this.updateSrc()},updateSrc(){let i=this.el.src,e="data:image/x-pixel;base64,",t=i.slice(e.length);if(i.startsWith(e)){let n=vh(t),r=new DataView(n),o=r.getUint32(0,!1),s=r.getUint32(4,!1),a=r.getUint8(8),l=n.slice(9),c=wse(l,s,o,a),d=document.createElement("canvas");d.height=o,d.width=s,d.getContext("2d").putImageData(c,0,0);let h=d.toDataURL("image/png");this.el.src=h}}};function wse(i,e,t,n){let r=e*t,o=new Uint8Array(i),s=new Uint8ClampedArray(r*4);for(let a=0;a<r;a++)n===1?(s[a*4]=o[a],s[a*4+1]=o[a],s[a*4+2]=o[a],s[a*4+3]=255):n===2?(s[a*4]=o[a*2],s[a*4+1]=o[a*2],s[a*4+2]=o[a*2],s[a*4+3]=o[a*2+1]):n===3?(s[a*4]=o[a*3],s[a*4+1]=o[a*3+1],s[a*4+2]=o[a*3+2],s[a*4+3]=255):n===4&&(s[a*4]=o[a*4],s[a*4+1]=o[a*4+1],s[a*4+2]=o[a*4+2],s[a*4+3]=o[a*4+3]);return new ImageData(s,e,t)}var oW=Cse;var xse=document.querySelector("meta[name='csrf-token']").getAttribute("content"),UE=new ug(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:xse}}),Pd=null;function sW(i){return Pd||(UE.connect(),Pd=UE.channel("js_view",{session_token:i}),Pd.join()),Pd}function aW(){Pd&&(Pd.leave(),Pd=null,UE.disconnect())}function lW(i,e){if(Array.isArray(e)&&e[1]&&e[1].constructor===ArrayBuffer){let[t,n]=e;return Ese([i,t],n)}else return{root:[i,e]}}function WE(i){if(i.constructor===ArrayBuffer){let[[e,t],n]=Tse(i);return[e,[t,n]]}else{let{root:[e,t]}=i;return[e,t]}}var Gp=4;function Ese(i,e){let n=new TextEncoder().encode(JSON.stringify(i)),r=new ArrayBuffer(Gp+n.byteLength+e.byteLength);return new DataView(r).setUint32(0,n.byteLength),new Uint8Array(r,Gp,n.byteLength).set(n),new Uint8Array(r,Gp+n.byteLength).set(new Uint8Array(e)),r}function Tse(i){let t=new DataView(i).getUint32(0),n=new Uint8Array(i,Gp,t),r=i.slice(Gp+t),o=new TextDecoder;return[JSON.parse(o.decode(n)),r]}var cW="vd7g1B8fLBFZH6C6KNpG4H8B0SQ/oIuqKaTW6jD053A=";function dW(i,e,t){let n=Ise(e,t);return kse(n).then(()=>{i.sandbox="allow-scripts allow-same-origin allow-downloads allow-modals allow-popups",i.allow="accelerometer; ambient-light-sensor; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; microphone; midi; usb; xr-spatial-tracking; clipboard-read; clipboard-write",i.src=n})}function Ise(i,e){let t=window.location.protocol;return e?e.replace(/^https?:/,t):t==="https:"?"https://livebookusercontent.com/iframe/v4.html":`http://${window.location.hostname}:${i}/iframe/v4.html`}var jE=null;function kse(i){return jE||(jE=fetch(i).then(e=>e.text()).then(e=>{if(mL(e)!==cW)throw new Error(`The iframe loaded from ${i} doesn't have the expected checksum ${cW}`)})),jE}var Ase={mounted(){this.props=this.getProps(),this.id=Dg(),this.childToken=hL(),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout(()=>this.handleInitTimeout(),2e3),this.channel=sW(this.props.sessionToken),this.iframeActions=this.createIframe(),this.childReadyPromise=new Promise((r,o)=>{this._handleWindowMessage=s=>{s.source===this.iframe.contentWindow&&this.handleChildMessage(s.data,r)},window.addEventListener("message",this._handleWindowMessage)}),this.hiddenInput=document.createElement("input"),this.hiddenInput.style.display="none",this.el.appendChild(this.hiddenInput),this.iframeActions.visibilityPromise.then(()=>{this.loadIframe()});let i=this.channel.on(`init:${this.props.ref}:${this.id}`,r=>{let[,o]=WE(r);this.handleServerInit(o)}),e=this.channel.on(`event:${this.props.ref}`,r=>{let[[o],s]=WE(r);this.handleServerEvent(o,s)}),t=this.channel.on(`error:${this.props.ref}`,({message:r,init:o})=>{this.handleServerError(r,o)}),n=this.channel.on(`pong:${this.props.ref}`,()=>{this.handleServerPong()});this.unsubscribeFromChannelEvents=()=>{this.channel.off(`init:${this.props.ref}:${this.id}`,i),this.channel.off(`event:${this.props.ref}`,e),this.channel.off(`error:${this.props.ref}`,t),this.channel.off(`pong:${this.props.ref}`,n)},this.unsubscribeFromJSViewEvents=Ti.subscribe(`js_views:${this.props.ref}`,r=>this.handleJSViewEvent(r)),this.channel.push("connect",{connect_token:this.props.connectToken,ref:this.props.ref,id:this.id},3e4),this.unsubscribeFromCellEvents=Ti.subscribe("navigation",r=>this.handleNavigationEvent(r))},updated(){this.props=this.getProps(this)},disconnected(){this.el.removeAttribute("id")},destroyed(){window.removeEventListener("message",this._handleWindowMessage),this.iframeActions.remove(),this.unsubscribeFromChannelEvents(),this.channel.push("disconnect",{ref:this.props.ref}),this.unsubscribeFromJSViewEvents(),this.unsubscribeFromCellEvents()},getProps(){return{ref:We(this.el,"data-ref"),assetsBasePath:We(this.el,"data-assets-base-path"),assetsCdnUrl:di(this.el,"data-assets-cdn-url",null),jsPath:We(this.el,"data-js-path"),sessionToken:We(this.el,"data-session-token"),connectToken:We(this.el,"data-connect-token"),iframePort:We(this.el,"data-iframe-local-port",Zr),iframeUrl:di(this.el,"data-iframe-url",null),timeoutMessage:We(this.el,"data-timeout-message")}},createIframe(){this.iframePlaceholder=document.createElement("div"),this.el.appendChild(this.iframePlaceholder),this.iframe=document.createElement("iframe"),this.iframe.className="w-full h-0 absolute z-[1]";let i=document.querySelector("[data-el-notebook]"),e=i.querySelector("[data-el-notebook-content]"),t=new ResizeObserver(a=>{this.repositionIframe()});t.observe(e),t.observe(i);let n=Ti.subscribe("js_views",a=>{a.type==="reposition"&&this.repositionIframe()});this.iframe.addEventListener("mouseenter",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0}))}),this.iframe.addEventListener("mouseleave",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0}))});let r=null,o=new Promise((a,l)=>{G9(this.iframePlaceholder)?a():(r=new IntersectionObserver(c=>{G9(this.iframePlaceholder)&&(r.disconnect(),a())}),r.observe(this.iframePlaceholder))});return this.iframe.toggleAttribute("data-js-focused",!!this.el.closest("[data-js-focused]")),{visibilityPromise:o,remove:()=>{t.disconnect(),n(),r&&r.disconnect(),this.iframe.remove(),this.iframePlaceholder.remove()}}},repositionIframe(){let{iframe:i,iframePlaceholder:e}=this,t=document.querySelector("[data-el-notebook]");if(gh(e))i.classList.add("hidden");else{i.classList.remove("hidden");let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=r.top-n.top+t.scrollTop;i.style.top=`${o}px`;let s=r.left-n.left+t.scrollLeft;i.style.left=`${s}px`,i.style.height=`${r.height}px`,i.style.width=`${r.width}px`}},loadIframe(){let i=document.querySelector("[data-el-js-view-iframes]");dW(this.iframe,this.props.iframePort,this.props.iframeUrl).then(()=>{i.appendChild(this.iframe)})},handleChildMessage(i,e){if(i.type==="ready"&&!this.childReady)this.getAssetsBaseUrl().then(t=>{this.postMessage({type:"readyReply",token:this.childToken,baseUrl:t,jsPath:this.props.jsPath}),this.childReady=!0,e()});else{if(i.token!==this.childToken)throw new Error("Token mismatch");if(i.type==="resize")this.iframePlaceholder.style.height=`${i.height}px`,this.iframe.style.height=`${i.height}px`;else if(i.type==="domEvent"){let t=this.replicateDomEvent(i.event);i.isTargetEditable?this.hiddenInput.dispatchEvent(t):this.el.dispatchEvent(t)}else if(i.type==="event"){let{event:t,payload:n}=i,r=lW([t,this.props.ref],n);this.channel.push("event",r)}else i.type==="syncReply"?(this.pongCallbackQueue.push(this.syncCallbackQueue.shift()),this.channel.push("ping",{ref:this.props.ref})):i.type=="selectSecret"&&this.pushEvent("select_secret",{js_view_ref:this.props.ref,preselect_name:i.preselectName,options:i.options})}},getAssetsBaseUrl(){return y2().then(i=>!i&&this.props.assetsCdnUrl?this.props.assetsCdnUrl:window.location.origin+this.props.assetsBasePath)},postMessage(i){this.iframe.contentWindow.postMessage(i,"*")},replicateDomEvent(i){if(i.type==="focus")return new FocusEvent("focus");if(i.type==="mousedown")return new MouseEvent("mousedown",{bubbles:!0});if(i.type==="keydown")return new KeyboardEvent(i.type,i.props)},handleInitTimeout(){this.initTimeoutContainer=document.createElement("div"),this.initTimeoutContainer.classList.add("info-box"),this.el.prepend(this.initTimeoutContainer),this.initTimeoutContainer.textContent=this.props.timeoutMessage},clearInitTimeout(){clearTimeout(this.initTimeout),this.initTimeoutContainer&&this.initTimeoutContainer.remove()},handleServerInit(i){this.clearInitTimeout(),this.initReceived=!0,this.childReadyPromise.then(()=>{this.postMessage({type:"init",data:i})})},handleServerEvent(i,e){this.initReceived&&this.childReadyPromise.then(()=>{this.postMessage({type:"event",event:i,payload:e})})},handleServerError(i,e){e&&this.clearInitTimeout(),this.errorContainer||(this.errorContainer=document.createElement("div"),this.errorContainer.classList.add("error-box","mb-4"),this.el.prepend(this.errorContainer)),this.errorContainer.textContent=i},handleServerPong(){this.pongCallbackQueue.shift()()},handleJSViewEvent(i){i.type==="sync"?(this.syncCallbackQueue.push(i.callback),this.postMessage({type:"sync"})):i.type=="secretSelected"&&this.postMessage({type:"secretSelected",secretName:i.secretName})},handleNavigationEvent(i){if(i.type==="element_focused"){let e=this.el.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null;this.iframe.toggleAttribute("data-js-focused",t===i.focusableId)}}};function y2(){return y2.promise=y2.promise||fetch("/public/health").then(i=>i.status===200).catch(i=>!1),y2.promise}var hW=Ase;var Lse={mounted(){this.props=this.getProps(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),window.addEventListener("keydown",this._handleDocumentKeyDown,!0),window.addEventListener("keyup",this._handleDocumentKeyUp,!0),window.addEventListener("focus",this._handleDocumentFocus,!0)},updated(){this.props=this.getProps()},destroyed(){window.removeEventListener("keydown",this._handleDocumentKeyDown,!0),window.removeEventListener("keyup",this._handleDocumentKeyUp,!0),window.removeEventListener("focus",this._handleDocumentFocus,!0)},getProps(){return{isKeydownEnabled:We(this.el,"data-keydown-enabled",ea),isKeyupEnabled:We(this.el,"data-keyup-enabled",ea),target:We(this.el,"data-target")}},handleDocumentKeyDown(i){if(this.keyboardEnabled()&&ta(i),this.props.isKeydownEnabled){if(i.repeat)return;let{key:e}=i;this.pushEventTo(this.props.target,"keydown",{key:e})}},handleDocumentKeyUp(i){if(this.keyboardEnabled()&&ta(i),this.props.isKeyupEnabled){let{key:e}=i;this.pushEventTo(this.props.target,"keyup",{key:e})}},handleDocumentFocus(i){this.props.isKeydownEnabled&&vc(i.target)&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled(){return this.props.isKeydownEnabled||this.props.isKeyupEnabled}},uW=Lse;var Nse={mounted(){this.props=this.getProps();let i=new Vb(this.el,"",{baseUrl:this.props.sessionPath,allowedUriSchemes:this.props.allowedUriSchemes.split(",")});this.handleEvent(`markdown_renderer:${this.props.id}:content`,({content:e})=>{i.setContent(e)})},getProps(){return{id:We(this.el,"data-id"),sessionPath:We(this.el,"data-session-path"),allowedUriSchemes:We(this.el,"data-allowed-uri-schemes")}}},mW=Nse;var Rse={mounted(){this.scroll()},updated(){this.scroll()},scroll(){F1(this.el)}},pW=Rse;var VE=class{constructor(e=2e3){this.resetTimeout=e,this.buffer=[],this.resetTimeoutId=null}push(e){this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout(()=>{this.reset()},this.resetTimeout)}reset(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=null,this.buffer=[]}tryMatch(e){if(e.length>this.buffer.length)return!1;let t=this.buffer.slice(-e.length),n=e.every((r,o)=>r===t[o]);return n&&this.reset(),n}},fW=VE;var Dse={mounted(){this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.view=null,this.keyBuffer=new fW,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,Og(this.faviconForEvaluationStatus(this.props.globalStatus)),this.updateSectionListHighlight(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),this._handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("keydown",this._handleDocumentKeyDown,!0),document.addEventListener("mousedown",this._handleDocumentMouseDown),document.addEventListener("focus",this._handleDocumentFocus,!0),document.addEventListener("click",this._handleDocumentClick),this.getElement("sections-list").addEventListener("click",i=>{this.handleSectionsListClick(i),this.handleCellIndicatorsClick(i)}),this.getElement("clients-list").addEventListener("click",i=>this.handleClientsListClick(i)),this.getElement("sections-list-toggle").addEventListener("click",i=>this.toggleSectionsList()),this.getElement("clients-list-toggle").addEventListener("click",i=>this.toggleClientsList()),this.getElement("secrets-list-toggle").addEventListener("click",i=>this.toggleSecretsList()),this.getElement("runtime-info-toggle").addEventListener("click",i=>this.toggleRuntimeInfo()),this.getElement("app-info-toggle").addEventListener("click",i=>this.toggleAppInfo()),this.getElement("files-list-toggle").addEventListener("click",i=>this.toggleFilesList()),this.getElement("notebook").addEventListener("scroll",i=>this.updateSectionListHighlight()),this.getElement("notebook-indicators").addEventListener("click",i=>this.handleCellIndicatorsClick(i)),this.getElement("views").addEventListener("click",i=>{this.handleViewsClick(i)}),this.getElement("section-toggle-collapse-all-button").addEventListener("click",i=>this.toggleCollapseAllSections()),window.addEventListener("phx:page-loading-stop",()=>{this.initializeFocus()},{once:!0}),this.handleEvent("session_init",({clients:i})=>{i.forEach(e=>{this.clientsMap[e.id]=e})}),this.handleEvent("cell_inserted",({cell_id:i})=>{this.handleCellInserted(i)}),this.handleEvent("cell_deleted",({cell_id:i,sibling_cell_id:e})=>{this.handleCellDeleted(i,e)}),this.handleEvent("cell_restored",({cell_id:i})=>{this.handleCellRestored(i)}),this.handleEvent("cell_moved",({cell_id:i})=>{this.handleCellMoved(i)}),this.handleEvent("section_inserted",({section_id:i})=>{this.handleSectionInserted(i)}),this.handleEvent("section_deleted",({section_id:i})=>{this.handleSectionDeleted(i)}),this.handleEvent("section_moved",({section_id:i})=>{this.handleSectionMoved(i)}),this.handleEvent("cell_upload",({cell_id:i,url:e})=>{this.handleCellUpload(i,e)}),this.handleEvent("client_joined",({client:i})=>{this.handleClientJoined(i)}),this.handleEvent("client_left",({client_id:i})=>{this.handleClientLeft(i)}),this.handleEvent("clients_updated",({clients:i})=>{this.handleClientsUpdated(i)}),this.handleEvent("secret_selected",({select_secret_ref:i,secret_name:e})=>{this.handleSecretSelected(i,e)}),this.handleEvent("location_report",({client_id:i,focusable_id:e,selection:t})=>{let n={focusableId:e,selection:this.decodeSelection(t)};this.handleLocationReport(i,n)}),this.unsubscribeFromSessionEvents=Ti.subscribe("session",i=>{this.handleSessionEvent(i)})},updated(){let i=this.props;this.props=this.getProps(),this.props.globalStatus!==i.globalStatus&&Og(this.faviconForEvaluationStatus(this.props.globalStatus))},disconnected(){this.el.removeAttribute("id"),this.keepChannel=!0},destroyed(){this.unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this._handleDocumentKeyDown,!0),document.removeEventListener("mousedown",this._handleDocumentMouseDown),document.removeEventListener("focus",this._handleDocumentFocus,!0),document.removeEventListener("click",this._handleDocumentClick),Og("favicon"),this.keepChannel||aW()},getProps(){return{autofocusCellId:di(this.el,"data-autofocus-cell-id",null),globalStatus:di(this.el,"data-global-status",null)}},faviconForEvaluationStatus(i){return i==="evaluating"?"favicon-evaluating":i==="stale"?"favicon-stale":i==="errored"?"favicon-errored":"favicon"},handleDocumentKeyDown(i){if(i.repeat)return;let e=rL()?i.metaKey:i.ctrlKey,t=i.altKey,n=i.shiftKey,r=i.key,o=this.keyBuffer;if(!(vc(i.target)&&i.target.closest("[data-el-outputs-container]"))){if(e&&n&&!t&&r==="Enter"){ta(i),this.queueFullCellsEvaluation(!0);return}else if(!e&&n&&!t&&r==="Enter"){ta(i),Ad(this.focusedCellType())&&this.queueFocusedCellEvaluation(),this.moveFocus(1);return}else if(e&&!t&&r==="Enter"){ta(i),Ad(this.focusedCellType())&&this.queueFocusedCellEvaluation();return}else if(e&&r==="s"){ta(i),this.saveNotebook();return}else if(e||t)return}this.insertMode?(o.reset(),r==="Escape"&&(this.escapesMonacoWidget(i)||this.escapeInsertMode())):vc(i.target)?(o.reset(),r==="Escape"&&i.target.blur()):(o.push(i.key),o.tryMatch(["d","d"])?this.deleteFocusedCell():o.tryMatch(["e","a"])?this.queueFullCellsEvaluation(!1):o.tryMatch(["e","e"])?Ad(this.focusedCellType())&&this.queueFocusedCellEvaluation():o.tryMatch(["e","s"])?this.queueFocusedSectionEvaluation():o.tryMatch(["s","s"])?this.toggleSectionsList():o.tryMatch(["s","e"])?this.toggleSecretsList():o.tryMatch(["s","a"])?this.toggleAppInfo():o.tryMatch(["s","u"])?this.toggleClientsList():o.tryMatch(["s","f"])?this.toggleFilesList():o.tryMatch(["s","r"])?this.toggleRuntimeInfo():o.tryMatch(["s","b"])?this.showBin():o.tryMatch(["s","p"])?this.showPackageSearch():o.tryMatch(["e","x"])?this.cancelFocusedCellEvaluation():o.tryMatch(["0","0"])?this.reconnectRuntime():o.tryMatch(["Escape","Escape"])?this.setFocusedEl(null):o.tryMatch(["?"])?this.showShortcuts():o.tryMatch(["i"])||i.target.matches("body, [data-el-cell-body], [data-el-heading], [data-focusable-id]")&&this.focusedId&&r==="Enter"?(ta(i),this.isInsertModeAvailable()&&this.enterInsertMode()):o.tryMatch(["j"])?this.moveFocus(1):o.tryMatch(["k"])?this.moveFocus(-1):o.tryMatch(["J"])?this.moveFocusedCell(1):o.tryMatch(["K"])?this.moveFocusedCell(-1):o.tryMatch(["n"])?this.insertCellBelowFocused("code"):o.tryMatch(["N"])?this.insertCellAboveFocused("code"):o.tryMatch(["m"])?!this.isViewCodeZen()&&this.insertCellBelowFocused("markdown"):o.tryMatch(["M"])?!this.isViewCodeZen()&&this.insertCellAboveFocused("markdown"):o.tryMatch(["v","z"])?this.toggleView("code-zen"):o.tryMatch(["v","p"])?this.toggleView("presentation"):o.tryMatch(["c"])?!this.isViewCodeZen()&&this.toggleCollapseSection():o.tryMatch(["C"])&&!this.isViewCodeZen()&&this.toggleCollapseAllSections())},escapesMonacoWidget(i){if(i.target.closest(".monaco-inputbox"))return!0;let e=i.target.closest(".monaco-editor.focused");return e?!!(e.querySelector(".editor-widget.parameter-hints-widget.visible")||e.querySelector(".editor-widget.suggest-widget.visible")||e.querySelectorAll(".cursor").length>1):!1},handleDocumentMouseDown(i){if(!i.target.closest("[data-el-notebook]")||i.target.closest(".doctest-details-widget")){this.insertMode&&this.setInsertMode(!1);return}if(i.target.closest("[data-el-insert-buttons] button"))return;let e=i.target.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null,n=this.editableElementClicked(i,e);t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1}),!i.target.closest("[data-el-actions]")&&this.insertMode!==n&&this.setInsertMode(n)},editableElementClicked(i,e){if(e){let t=i.target.closest("[data-el-editor-container], [data-el-heading]");return t&&e.contains(t)}return!1},handleDocumentFocus(i){let e=i.target.closest&&i.target.closest("[data-focusable-id]");if(e){let t=e.dataset.focusableId;t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1})}},handleDocumentClick(i){i.target.closest("[data-el-enable-insert-mode-button]")&&this.setInsertMode(!0),i.target.closest("[data-btn-package-search]")&&this.insertMode&&this.setInsertMode(!1);let e=i.target.closest("[data-el-queue-cell-evaluation-button]");if(e){let n=e.getAttribute("data-cell-id"),r=e.hasAttribute("data-disable-dependencies-cache");this.queueCellEvaluation(n,r)}let t=window.location.hash;if(t){let n=t.replace(/^#/,"");!document.getElementById(n).contains(i.target)&&!i.target.closest("a")&&history.pushState(null,document.title,window.location.pathname+window.location.search)}},handleSectionsListClick(i){let e=i.target.closest("[data-el-sections-list-item]");if(e){let t=e.getAttribute("data-section-id");this.getSectionById(t).scrollIntoView({behavior:"smooth",block:"start"})}},handleClientsListClick(i){let e=i.target.closest("[data-el-clients-list-item]");if(e){let t=e.getAttribute("data-client-id");i.target.closest("[data-el-client-link]")&&this.handleClientLinkClick(t),i.target.closest("[data-el-client-follow-toggle]")&&this.handleClientFollowToggleClick(t,e)}},handleClientLinkClick(i){this.mirrorClientFocus(i)},handleClientFollowToggleClick(i,e){let t=this.el.querySelector("[data-el-clients-list-item][data-js-followed]");t&&t.removeAttribute("data-js-followed"),i===this.followedClientId?this.followedClientId=null:(e.setAttribute("data-js-followed",""),this.followedClientId=i,this.mirrorClientFocus(i))},mirrorClientFocus(i){let e=this.lastLocationReportByClientId[i];e&&e.focusableId&&this.setFocusedEl(e.focusableId)},handleCellIndicatorsClick(i){let e=i.target.closest("[data-el-focus-cell-button]");if(e){let t=e.getAttribute("data-target");this.setFocusedEl(t)}},initializeFocus(){let i=window.location.hash;if(i){let e=i.replace(/^#/,""),t=document.getElementById(e);if(t){let n=t.closest("[data-focusable-id]");n?this.setFocusedEl(n.dataset.focusableId):t.scrollIntoView()}}else this.props.autofocusCellId&&(this.setFocusedEl(this.props.autofocusCellId,{scroll:!1}),this.setInsertMode(!0))},updateSectionListHighlight(){let i=this.el.querySelector("[data-el-sections-list-item][data-js-is-viewed]");i&&i.removeAttribute("data-js-is-viewed");let e=this.getSections().reverse().find(t=>{let{top:n}=t.getBoundingClientRect(),r=document.documentElement.scrollTop;return n<=r+window.innerHeight*.35});if(e){let t=e.getAttribute("data-section-id");this.el.querySelector(`[data-el-sections-list-item][data-section-id="${t}"]`).setAttribute("data-js-is-viewed","")}},toggleSectionsList(){this.toggleSidePanelContent("sections-list")},toggleClientsList(){this.toggleSidePanelContent("clients-list")},toggleSecretsList(){this.toggleSidePanelContent("secrets-list")},toggleAppInfo(){this.toggleSidePanelContent("app-info")},toggleFilesList(){this.toggleSidePanelContent("files-list")},toggleRuntimeInfo(){this.toggleSidePanelContent("runtime-info")},toggleSidePanelContent(i){this.el.getAttribute("data-js-side-panel-content")===i?this.el.removeAttribute("data-js-side-panel-content"):this.el.setAttribute("data-js-side-panel-content",i)},showBin(){let i=this.el.querySelector("[data-btn-show-bin]");i&&i.click()},showPackageSearch(){this.setFocusedEl("setup");let i=this.el.querySelector("[data-btn-package-search]");i&&i.click()},saveNotebook(){this.pushEvent("save",{})},deleteFocusedCell(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("delete_cell",{cell_id:this.focusedId})},queueCellEvaluation(i,e){this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:i,disable_dependencies_cache:e})})},queueFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:this.focusedId})})},queueFullCellsEvaluation(i){let e=i&&this.focusedId&&this.isCell(this.focusedId)?[this.focusedId]:[];this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_full_evaluation",{forced_cell_ids:e})})},queueFocusedSectionEvaluation(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);i&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_section_evaluation",{section_id:i})})}},dispatchQueueEvaluation(i){Ad(this.focusedCellType())?Ti.broadcast(`cells:${this.focusedId}`,{type:"dispatch_queue_evaluation",dispatch:i}):i()},cancelFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("cancel_cell_evaluation",{cell_id:this.focusedId})},reconnectRuntime(){this.pushEvent("reconnect_runtime",{})},showShortcuts(){let i=this.el.querySelector("[data-btn-show-shortcuts]");i&&i.click()},isInsertModeAvailable(){if(!this.focusedId)return!1;let i=this.getFocusableEl(this.focusedId);return!this.isCell(this.focusedId)||!i.hasAttribute("data-js-insert-mode-disabled")},enterInsertMode(){this.focusedId&&this.setInsertMode(!0)},escapeInsertMode(){this.setInsertMode(!1)},moveFocus(i){let e=this.nearbyFocusableId(this.focusedId,i);this.setFocusedEl(e)},moveFocusedCell(i){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("move_cell",{cell_id:this.focusedId,offset:i})},insertCellBelowFocused(i){if(this.focusedId)this.insertCellBelowFocusableId(this.focusedId,i);else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[e.length-1],i)}},insertCellAboveFocused(i){if(this.focusedId){let e=this.nearbyFocusableId(this.focusedId,-1);this.insertCellBelowFocusableId(e,i)}else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[0],i)}},insertCellBelowFocusableId(i,e){if(this.isCell(i))this.pushEvent("insert_cell_below",{type:e,cell_id:i});else if(this.isSection(i))this.pushEvent("insert_cell_below",{type:e,section_id:i});else if(this.isNotebook(i)){let t=this.getSectionIds();t.length>0&&this.pushEvent("insert_cell_below",{type:e,section_id:t[0]})}},setFocusedEl(i,{scroll:e=!0,focusElement:t=!0}={}){if(this.focusedId=i,i){if(!this.isSection(i)){let r=this.getSectionIdByFocusableId(i);r&&this.getSectionById(r).removeAttribute("data-js-collapsed")}let n=this.getFocusableEl(i);t&&(n.querySelector("[data-el-cell-body]")||n.querySelector("[data-el-heading]")||n).focus({preventScroll:!0})}Ti.broadcast("navigation",{type:"element_focused",focusableId:i,scroll:e}),this.setInsertMode(!1)},setInsertMode(i){this.insertMode=i,i?this.el.setAttribute("data-js-insert-mode",""):(this.el.removeAttribute("data-js-insert-mode"),this.sendLocationReport({focusableId:this.focusedId,selection:null})),Ti.broadcast("navigation",{type:"insert_mode_changed",enabled:i})},handleViewsClick(i){let e=i.target.closest("[data-el-view-toggle]");if(e){let t=e.getAttribute("data-el-view-toggle");this.toggleView(t)}},toggleView(i){this.view===i?(this.view=null,this.el.removeAttribute("data-js-view")):(this.view=i,this.el.setAttribute("data-js-view",i));let e=this.focusedId||this.nearbyFocusableId(null,0);if(e){let t=this.ensureVisibleFocusableEl(e);t!==this.focused&&this.setFocusedEl(t,{scroll:!1}),t&&this.getFocusableEl(t).scrollIntoView({block:"center"})}},toggleCollapseSection(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);if(i){let e=this.getSectionById(i);e.hasAttribute("data-js-collapsed")?e.removeAttribute("data-js-collapsed"):(e.setAttribute("data-js-collapsed",""),this.setFocusedEl(i,{scroll:!0}))}}},toggleCollapseAllSections(){let i=this.getSections().every(e=>e.hasAttribute("data-js-collapsed"));if(this.getSections().forEach(e=>{e.toggleAttribute("data-js-collapsed",!i)}),this.focusedId){let e=this.getSectionIdByFocusableId(this.focusedId);e&&this.setFocusedEl(e,{scroll:!0})}},handleCellInserted(i){this.setFocusedEl(i),oU(this.focusedCellType())&&this.setInsertMode(!0)},handleCellDeleted(i,e){if(this.focusedId===i)if(this.isViewCodeZen()){let t=this.ensureVisibleFocusableEl(e);this.setFocusedEl(t)}else this.setFocusedEl(e)},handleCellRestored(i){this.setFocusedEl(i)},handleCellMoved(i){this.repositionJSViews(),this.focusedId===i&&Ti.broadcast("cells",{type:"cell_moved",cellId:i})},handleSectionInserted(i){let t=this.getSectionById(i).querySelector("[data-el-section-headline]"),{focusableId:n}=t.dataset;this.setFocusedEl(n),this.setInsertMode(!0),aL(document.activeElement)},handleSectionDeleted(i){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved(i){this.repositionJSViews();let e=this.getSectionById(i);dl(e)},handleCellUpload(i,e){this.focusedId!==i&&this.setFocusedEl(i),this.insertMode||this.setInsertMode(!0),Ti.broadcast("cells",{type:"cell_upload",cellId:i,url:e})},handleClientJoined(i){this.clientsMap[i.id]=i},handleClientLeft(i){let e=this.clientsMap[i];e&&(delete this.clientsMap[i],this.broadcastLocationReport(e,{focusableId:null,selection:null}),e.id===this.followedClientId&&(this.followedClientId=null))},handleClientsUpdated(i){i.forEach(e=>{this.clientsMap[e.id]=e})},handleSecretSelected(i,e){Ti.broadcast(`js_views:${i}`,{type:"secretSelected",secretName:e})},handleLocationReport(i,e){let t=this.clientsMap[i];this.lastLocationReportByClientId[i]=e,t&&(this.broadcastLocationReport(t,e),t.id===this.followedClientId&&e.focusableId!==this.focusedId&&this.setFocusedEl(e.focusableId))},handleSessionEvent(i){i.type==="cursor_selection_changed"&&this.sendLocationReport({focusableId:i.focusableId,selection:i.selection})},repositionJSViews(){Ti.broadcast("js_views",{type:"reposition"})},broadcastLocationReport(i,e){Ti.broadcast("navigation",{type:"location_report",client:i,report:e})},sendLocationReport(i){Object.keys(this.clientsMap).length>1&&this.pushEvent("location_report",{focusable_id:i.focusableId,selection:this.encodeSelection(i.selection)})},encodeSelection(i){if(i===null)return null;let{tag:e,editorSelection:t}=i;return[e,t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn]},decodeSelection(i){if(i===null)return null;let[e,t,n,r,o]=i,s=new yt.Selection(t,n,r,o);return{tag:e,editorSelection:s}},focusedCellType(){return this.focusedId&&this.isCell(this.focusedId)?this.getFocusableEl(this.focusedId).getAttribute("data-type"):null},nearbyFocusableId(i,e){let t=this.getFocusableIds();if(t.length===0)return null;let n=t.indexOf(i);if(n===-1){let r=this.getFocusableEls().find(q9);return r?r.getAttribute("data-focusable-id"):t[0]}else{let r=oL(n+e,0,t.length-1);return t[r]}},ensureVisibleFocusableEl(i){let e=this.getFocusableEl(i),t=Array.from(this.el.querySelectorAll("[data-focusable-id]")),n=t.indexOf(e),r=[...t.slice(n,-1),...t.slice(0,n).reverse()].find(o=>!gh(o));return r&&r.getAttribute("data-focusable-id")},isCell(i){return this.getFocusableEl(i).hasAttribute("data-el-cell")},isSection(i){return this.getFocusableEl(i).hasAttribute("data-el-section-headline")},isNotebook(i){return this.getFocusableEl(i).hasAttribute("data-el-notebook-headline")},getFocusableEl(i){return this.el.querySelector(`[data-focusable-id="${i}"]`)},getFocusableEls(){return Array.from(this.el.querySelectorAll("[data-focusable-id]")).filter(i=>!gh(i))},getFocusableIds(){return this.getFocusableEls().map(i=>i.getAttribute("data-focusable-id"))},getSectionIdByFocusableId(i){let t=this.getFocusableEl(i).closest("[data-el-section]");return t&&t.getAttribute("data-section-id")},getSectionIds(){return this.getSections().map(e=>e.getAttribute("data-section-id"))},getSections(){return Array.from(this.el.querySelectorAll("[data-el-section]"))},getSectionById(i){return this.el.querySelector(`[data-el-section][data-section-id="${i}"]`)},getElement(i){return this.el.querySelector(`[data-el-${i}]`)},isViewCodeZen(){return this.view==="code-zen"},isViewPresentation(){return this.view==="presentation"}},gW=Dse;var Mse={mounted(){this.autosize(),this.el.addEventListener("input",i=>{this.autosize()})},updated(){this.autosize()},autosize(){this.el.style.height="0px",this.el.style.height=`${this.el.scrollHeight+2}px`}},_W=Mse;var Ose=100,Pse={mounted(){this.props=this.getProps(),this.interval=setInterval(()=>this.updateDOM(),Ose)},updated(){this.props=this.getProps(),this.updateDOM()},destroyed(){clearInterval(this.interval)},getProps(){return{start:We(this.el,"data-start")}},updateDOM(){let e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML=`${e.toFixed(1)}s`}},vW=Pse;var bW="lb:user_data";function yW(i){let e=JSON.stringify(i),t=cL(e);Hse(bW,t,15768e4)}function SW(){let i=Fse(bW);if(i){let e=dL(i);return JSON.parse(e)}else return null}function Fse(i){let e=document.cookie.split("; ").find(t=>t.startsWith(`${i}=`));return e?e.replace(`${i}=`,""):null}function Hse(i,e,t){let n=`${i}=${e};max-age=${t};path=/${Fg()}`;document.cookie=n}var Bse={mounted(){this.el.addEventListener("submit",i=>{let e=this.el.user_form_name.value,t=this.el.user_form_hex_color.value;yW({name:e,hex_color:t})})}},CW=Bse;var zse={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.datetimeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return{utcValue:di(this.el,"data-utc-value",null),utcMin:di(this.el,"data-utc-min",null),utcMax:di(this.el,"data-utc-max",null),phxTarget:We(this.el,"data-phx-target")}},updateAttrs(){this.el.value=this.datetimeUtcToLocal(this.props.utcValue),this.el.min=this.datetimeUtcToLocal(this.props.utcMin),this.el.max=this.datetimeUtcToLocal(this.props.utcMax)},datetimeUtcToLocal(i){if(!i)return null;let e=new Date(i+"Z"),t=e.getFullYear().toString(),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return`${t}-${n}-${r}T${o}:${s}:${a}`},datetimeLocalToUtc(i){if(!i)return null;let e=new Date(i),t=e.getUTCFullYear().toString(),n=(e.getUTCMonth()+1).toString().padStart(2,"0"),r=e.getUTCDate().toString().padStart(2,"0"),o=e.getUTCHours().toString().padStart(2,"0"),s=e.getUTCMinutes().toString().padStart(2,"0"),a=e.getUTCSeconds().toString().padStart(2,"0");return`${t}-${n}-${r}T${o}:${s}:${a}`}},wW=zse;var Use={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.timeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return{utcValue:di(this.el,"data-utc-value",null),utcMin:di(this.el,"data-utc-min",null),utcMax:di(this.el,"data-utc-max",null),phxTarget:We(this.el,"data-phx-target")}},updateAttrs(){this.el.value=this.timeUtcToLocal(this.props.utcValue),this.el.min=this.timeUtcToLocal(this.props.utcMin),this.el.max=this.timeUtcToLocal(this.props.utcMax)},timeUtcToLocal(i){if(!i)return null;let e=new Date;e.setUTCHours(...i.split(":"));let t=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0"),r=e.getSeconds().toString().padStart(2,"0");return`${t}:${n}:${r}`},timeLocalToUtc(i){if(!i)return null;let e=new Date;e.setHours(...i.split(":"));let t=e.getUTCHours().toString().padStart(2,"0"),n=e.getUTCMinutes().toString().padStart(2,"0"),r=e.getUTCSeconds().toString().padStart(2,"0");return`${t}:${n}:${r}`}},xW=Use;var IW=zi(TW());var Wse={mounted(){this.props=this.getProps(),this.lineHeight=sL(this.el),this.templateEl=_h(this.el,"[data-template]"),this.contentEl=_h(this.el,"[data-content]"),this.capLines();let i=this.hyperListConfig();this.virtualizedList=new IW.default(this.contentEl,i),this.props.follow&&F1(this.contentEl)},updated(){this.props=this.getProps(),this.capLines();let i=this.props.follow&&lL(this.contentEl),e=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,e),i&&F1(this.contentEl)},getProps(){return{maxHeight:We(this.el,"data-max-height",Zr),follow:di(this.el,"data-follow",!1,ea),maxLines:di(this.el,"data-max-lines",null,Zr),ignoreTrailingEmptyLine:di(this.el,"data-ignore-trailing-empty-line",!1,ea)}},hyperListConfig(){let i=this.getLineElements(),e=i.length,t=Math.min(this.props.maxHeight,this.lineHeight*e);return{height:t,total:e,itemHeight:this.lineHeight,generate:n=>{let r=i[n].cloneNode(!0);return r.removeAttribute("id"),r},afterRender:()=>{this.contentEl.scrollWidth>this.contentEl.clientWidth?this.contentEl.style.height=`${t+12}px`:this.contentEl.style.height=`${t}px`}}},getLineElements(){let i=Array.from(this.templateEl.querySelectorAll("[data-line]"));if(i.length===0)return[];let e=i[i.length-1];return this.props.ignoreTrailingEmptyLine&&e.innerText===""?i.slice(0,-1):i},capLines(){if(this.props.maxLines){let e=Array.from(this.templateEl.querySelectorAll("[data-line]")).slice(0,-this.props.maxLines),[t,...n]=e;n.forEach(r=>r.remove()),t&&(t.innerHTML="...")}}},kW=Wse;var AW={AppAuth:GA,AudioInput:gL,Cell:sU,CellEditor:hU,Dropzone:uU,EditorSettings:mU,EmojiPicker:ZU,FocusOnUpdate:eW,Headline:iW,Highlight:nW,ImageInput:rW,ImageOutput:oW,JSView:hW,KeyboardControl:uW,MarkdownRenderer:mW,ScrollOnUpdate:pW,Session:gW,TextareaAutosize:_W,Timer:vW,UserForm:CW,UtcDateTimeInput:wW,UtcTimeInput:xW,VirtualizedLines:kW};var LW={onBeforeElUpdated(i,e){for(let t of i.attributes)t.name.startsWith("data-js-")&&e.setAttribute(t.name,t.value),t.name==="data-keep-attribute"&&(i.hasAttribute(t.value)?e.setAttribute(t.value,i.getAttribute(t.value)):e.removeAttribute(t.value))},onNodeAdded(i){if(i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute("autofocus")&&(i.focus(),i.setSelectionRange&&i.value)){let e=i.value.length;i.setSelectionRange(e,e)}}};var C2=zi(RW());function DW(){C2.default.config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",()=>{C2.default.show(500)}),window.addEventListener("phx:page-loading-stop",()=>{C2.default.hide()})}function MW(){window.addEventListener("lb:focus",i=>{requestAnimationFrame(()=>{i.target.focus()})}),window.addEventListener("lb:set_value",i=>{i.target.value=i.detail.value}),window.addEventListener("lb:check",i=>{i.target.checked=!0}),window.addEventListener("lb:uncheck",i=>{i.target.checked=!1}),window.addEventListener("lb:set_text",i=>{i.target.textContent=i.detail.value}),window.addEventListener("lb:clipcopy",i=>{"clipboard"in navigator?i.detail.content?navigator.clipboard.writeText(i.detail.content):i.target.tagName==="INPUT"?navigator.clipboard.writeText(i.target.value):navigator.clipboard.writeText(i.target.textContent):alert(`Sorry, your browser does not support clipboard copy.
|
|
This generally requires a secure origin \u2014 either HTTPS or localhost.`)}),window.addEventListener("phx:lb:exec_js",i=>{let e=i.detail.to||"body";document.querySelectorAll(e).forEach(t=>{window.liveSocket.execJS(t,i.detail.js)})}),window.addEventListener("lb:session_list:on_selection_change",()=>{let i=!!document.querySelector("[name='session_ids[]']:checked"),e=document.querySelector("#edit-sessions [name='disconnect']"),t=document.querySelector("#edit-sessions [name='close_all']");e.parentElement.classList.toggle("pointer-events-none",!i),e.parentElement.classList.toggle("opacity-50",!i),t.parentElement.classList.toggle("pointer-events-none",!i),t.parentElement.classList.toggle("opacity-50",!i)}),window.addEventListener("contextmenu",i=>{let e=i.target.closest("[data-contextmenu-trigger-click]");e&&(i.preventDefault(),e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0})))}),window.addEventListener("submit",i=>{i.target.hasAttribute("phx-nosubmit")&&(i.preventDefault(),i.stopPropagation())},{capture:!0})}function OW(){let i=/AppleWebKit/.test(navigator.userAgent),e="ontouchstart"in window||navigator.maxTouchPoints>0;if(i&&e){let t=document.querySelector("meta[name='viewport']");t&&(t.content+=", maximum-scale=1.0")}}var qE="confirm-opted-out-ids";function PW(){return _c(qE)||[]}function FW(){window.addEventListener("phx:add_confirm_opt_out_id",i=>{let e=_c(qE)||[],t=i.detail.opt_out_id;e.push(t),fh(qE,e)})}function jse(){let i=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e=new WA(window.LIVEBOOK_BASE_URL_PATH+"/live",ug,{params:t=>({_csrf_token:i,user_data:SW(),app_auth_token:qA(),confirm_opt_out_ids:PW()}),hooks:AW,dom:LW});DW(),MW(),FW(),OW(),Yn.getAndSubscribe(t=>{document.body.setAttribute("data-editor-theme",t.editor_theme)}),e.connect(),window.liveSocket=e}if(Vse())jse();else{let i=document.createElement("div");i.innerHTML=`
|
|
<div class="fixed top-0 bottom-0 left-0 right-0 z-[1000] px-4 py-8 bg-gray-900/95 flex justify-center items-center">
|
|
<div class="max-w-[600px] w-full flex flex-col">
|
|
<div class="text-xl text-gray-100 font-medium">
|
|
Action required
|
|
</div>
|
|
<div class="mt-3 text-sm text-gray-300">
|
|
It looks like Livebook does not have access to cookies. This usually happens when
|
|
it runs in an iframe. To make sure the app is fully functional open it in a new
|
|
tab directly. Alternatively you can relax security settings for this page to allow
|
|
third-party cookies.
|
|
</div>
|
|
<div class="mt-6">
|
|
<a id="open-app" class="button-base button-blue" target="_blank">
|
|
Open app
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`,i.querySelector("#open-app").href=window.location,document.body.appendChild(i)}function Vse(){return document.cookie=`lb:probe_cookie=;path=/${Fg()}`,document.cookie.split("; ").some(i=>i.startsWith("lb:probe_cookie="))}
|
|
/*! Bundled license information:
|
|
|
|
is-buffer/index.js:
|
|
(*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*)
|
|
|
|
topbar/topbar.min.js:
|
|
(**
|
|
* @license MIT
|
|
* topbar 2.0.0, 2023-02-04
|
|
* http://buunguyen.github.io/topbar
|
|
* Copyright (c) 2021 Buu Nguyen
|
|
*)
|
|
|
|
monaco-editor/esm/vs/language/json/monaco.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/_.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/elixir/elixir.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/css/css.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/html/html.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js:
|
|
(*!-----------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941)
|
|
* Released under the MIT license
|
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
*-----------------------------------------------------------------------------*)
|
|
*/
|