mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-08 14:04:31 +08:00
1370 lines
2 MiB
1370 lines
2 MiB
import{b as xoe}from"./chunk-GNZE3QMP.js";import{a as ON,b as a_,c as PN,d as GS,e as FN,f as qh,g as $S,h as Zo,i as fn,j as Dc,k as wm,l as xm,m as so,n as YS,o as HN,p as BN,q as Xd,r as zN,s as UN}from"./chunk-AC3NSOOG.js";import{$ as Un,$a as Se,$b as TR,$c as T_,$d as XR,$e as dO,$f as FO,$g as Tw,$h as Pre,$i as jre,$j as jw,$k as Tb,A as KN,Aa as aR,Ab as Ui,Ac as je,Ad as A_,Ae as Ri,Af as yO,Ag as VO,Ah as lu,Ai as Nw,Aj as Kre,Ak as wb,Al as Coe,B as Rc,Ba as lR,Bb as Qh,Bc as Mn,Bd as jR,Be as gi,Bf as z_,Bg as Km,Bh as Jm,Bi as e1,Bj as PP,Bk as Yw,Bl as Soe,C as h_,Ca as wn,Cb as rw,Cc as IR,Cd as Zh,Ce as Vt,Cf as U_,Cg as KO,Ch as Mre,Ci as rb,Cj as zw,Ck as Xw,Cl as woe,D as Tm,Da as la,Db as vR,Dc as rre,Dd as gw,De as Vc,Df as W_,Dg as qO,Dh as pf,Di as Kt,Dj as FP,Dk as Qw,Dl as du,E as qN,Ea as cR,Eb as ow,Ec as uw,Ed as Tt,Ee as Ro,Ef as CO,Eg as wre,Eh as Ei,Ei as xa,Ej as HP,Ek as eF,El as ka,F as f_,Fa as dR,Fb as sw,Fc as ore,Fd as Kn,Fe as of,Ff as SO,Fg as q_,Fh as Oo,Fi as SP,Fj as qre,Fk as tF,Fl as Rs,G as GN,Ga as iw,Gb as Fc,Gc as AR,Gd as L_,Ge as wl,Gf as wO,Gg as xre,Gh as sP,Gi as Bre,Gj as _f,Gk as iF,Gl as Os,H as nr,Ha as on,Hb as _R,Hc as sre,Hd as ure,He as P_,Hf as xO,Hg as qm,Hh as wa,Hi as kl,Hj as Uw,Hk as noe,I as Ln,Ia as Jd,Ib as bR,Ic as _l,Id as Wc,Ie as as,If as Hm,Ig as ya,Ih as El,Ii as Rw,Ij as fb,Ik as nF,J as ml,Ja as Ts,Jb as yR,Jc as LR,Jd as hre,Je as ti,Jf as EO,Jg as GO,Jh as Gc,Ji as wP,Jj as BP,Jk as roe,K as li,Ka as me,Kb as CR,Kc as w_,Kd as vw,Ke as sO,Kf as Bm,Kg as Ls,Kh as Bt,Ki as xP,Kj as t1,Kk as xb,L as $e,La as Zd,Lb as b_,Lc as x_,Ld as nu,Le as F_,Lf as _a,Lg as Gm,Lh as Gn,Li as Ow,Lj as zP,Lk as rF,M as QS,Ma as fe,Mb as SR,Mc as E_,Md as M_,Me as aO,Mf as xl,Mg as $O,Mh as aP,Mi as EP,Mj as pb,Mk as r1,N as $N,Na as uR,Nb as y_,Nc as are,Nd as VR,Ne as Rr,Nf as TO,Ng as YO,Nh as J_,Ni as ob,Nj as mb,Nk as oF,O as qt,Oa as gr,Ob as aw,Oc as tu,Od as D_,Oe as lO,Of as su,Og as uf,Oh as lP,Oi as sb,Oj as UP,Ok as Yc,P as YN,Pa as Wn,Pb as wi,Pc as hw,Pd as fre,Pe as Dt,Pf as kO,Pg as XO,Ph as Z_,Pi as TP,Pj as Ww,Pk as Eb,Q as XN,Qa as hR,Qb as ce,Qc as Uc,Qd as O,Qe as cO,Qf as yw,Qg as Ew,Qh as Dre,Qi as kP,Qj as Gre,Qk as Jw,R as QN,Ra as $h,Rb as nt,Rc as lre,Rd as jt,Re as sf,Rf as IO,Rg as hf,Rh as cP,Ri as IP,Rj as gb,Rk as ooe,S as JS,Sa as Ht,Sb as Ke,Sc as Jh,Sd as ef,Se as bw,Sf as AO,Sg as br,Sh as Nre,Si as AP,Sj as vb,Sk as sF,T as p_,Ta as Ni,Tb as ft,Tc as Dm,Td as N_,Te as $r,Tf as LO,Tg as QO,Th as dP,Ti as zre,Tj as WP,Tk as soe,U as m_,Ua as fR,Ub as wR,Uc as MR,Ud as KR,Ue as pa,Uf as MO,Ug as JO,Uh as uP,Ui as Pw,Uj as _b,Uk as bf,V as ZS,Va as Mo,Vb as xR,Vc as Nm,Vd as fa,Ve as ou,Vf as DO,Vg as ZO,Vh as hP,Vi as Il,Vj as jP,Vk as Zw,W as km,Wa as He,Wb as ER,Wc as DR,Wd as tf,We as Kc,Wf as NO,Wg as Ere,Wh as fP,Wi as Fw,Wj as $re,Wk as Ki,X as JN,Xa as rr,Xb as Mr,Xc as Rm,Xd as qR,Xe as As,Xf as RO,Xg as eP,Xh as Rre,Xi as LP,Xj as Dl,Xk as aF,Y as Lt,Ya as Et,Yb as Hc,Yc as cre,Yd as GR,Ye as Pm,Yf as Cw,Yg as Tre,Yh as pP,Yi as Ure,Yj as bb,Yk as e3,Z as Oc,Za as Zt,Zb as No,Zc as ha,Zd as $R,Ze as dt,Zf as OO,Zg as tP,Zh as Ore,Zi as Wre,Zj as VP,Zk as lF,_ as ZN,_a as Lr,_b as lw,_c as iu,_d as YR,_e as ma,_f as PO,_g as kre,_h as Iw,_i as MP,_j as Yre,_k as t3,a as v,aa as Mi,ab as ri,ac as xe,ad as NR,ae as QR,af as gre,ag as HO,ah as ff,ai as Aw,aj as Ti,ak as Xre,al as cF,b as De,ba as di,bb as Si,bc as Is,bd as fw,be as ru,bf as uO,bg as BO,bh as ct,bi as Fre,bj as ab,bk as yb,bl as Xc,c as at,ca as gl,cb as is,cc as rs,cd as vr,ce as yl,cf as af,cg as zO,ch as qn,ci as Ds,cj as Al,ck as i1,cl as kb,d as Ut,da as ew,db as xn,dc as Mm,dd as pw,de as R_,df as vre,dg as UO,dh as G_,di as Zm,dj as DP,dk as Vw,dl as dF,e as es,ea as ire,eb as ca,ec as da,ed as RR,ee as O_,ef as hO,eg as WO,eh as Ire,ei as mP,ej as lr,ek as Cb,el as Ta,f as l_,fa as g_,fb as ns,fc as os,fd as Wi,fe as JR,ff as _re,fg as ba,fh as kw,fi as mf,fj as Ll,fk as KP,fl as o1,g as Ao,ga as eR,gb as ks,gc as mi,gd as OR,ge as Cl,gf as lf,gg as zm,gh as iP,gi as eb,gj as Yr,gk as qP,gl as aoe,h as Qd,ha as tR,hb as Am,hc as Yi,hd as PR,he as ZR,hf as bre,hg as Um,hh as Are,hi as tb,hj as lb,hk as Qre,hl as uF,i as At,ia as nre,ib as Yh,ic as Dr,id as k_,ie as pre,if as fO,ig as Wm,ih as Ms,ii as gP,ij as cu,ik as Kw,il as loe,j as c_,ja as iR,jb as Pc,jc as Bc,jd as FR,je as eO,jf as yre,jg as jm,jh as $m,ji as Lw,jj as Ea,jk as qw,jl as coe,k as WN,ka as Gh,kb as lt,kc as zc,kd as HR,ke as mre,kf as pO,kg as jO,kh as nP,ki as Hre,kj as cb,kk as Gw,kl as hF,l as ao,la as v_,lb as or,lc as C_,ld as BR,le as tO,lf as Cre,lg as j_,lh as $_,li as Po,lj as db,lk as Jre,ll as doe,m as Em,ma as nR,mb as mt,mc as S_,md as zR,me as _w,mf as mO,mg as cf,mh as Ca,mi as gf,mj as NP,mk as GP,ml as fF,n as d_,na as ht,nb as qr,nc as xi,nd as oi,ne as nf,nf as Sre,ng as Sw,nh as Y_,ni as vP,nj as Qi,nk as $P,nl as pF,o as Vi,oa as Sn,ob as ui,oc as se,od as UR,oe as iO,of as ga,og as Vm,oh as Ym,oi as ib,oj as ds,ok as YP,ol as mF,p as XS,pa as Lo,pb as St,pc as cw,pd as dre,pe as Nr,pf as Oe,pg as Or,ph as Xm,pi as _P,pj as an,pk as Zre,pl as gF,q as Ft,qa as Im,qb as zi,qc as ua,qd as I_,qe as nO,qf as ke,qg as V_,qh as rP,qi as $c,qj as Ns,qk as Sb,ql as uoe,r as ne,ra as mr,rb as Xh,rc as Gr,rd as WR,re as rf,rf as gO,rg as _r,rh as Lre,ri as cs,rj as vf,rk as XP,rl as hoe,s as oe,sa as rR,sb as nw,sc as Me,sd as Mt,se as rO,sf as Fm,sg as au,sh as qc,si as Tl,sj as Vre,sk as QP,sl as foe,t as Bi,ta as Rt,tb as pR,tc as X,td as jn,te as oO,tf as vO,tg as ww,th as X_,ti as Mw,tj as Ml,tk as JP,tl as poe,u as jN,ua as ts,ub as Do,uc as dw,ud as Xi,ue as Om,uf as ls,ug as xw,uh as Qm,ui as Dw,uj as ub,uk as eoe,ul as moe,v as Ce,va as oR,vb as vl,vc as kR,vd as ss,ve as lo,vf as va,vg as pn,vh as be,vi as bP,vj as Hw,vk as $w,vl as goe,w as u_,wa as tw,wb as mR,wc as Ae,wd as sr,we as sn,wf as H_,wg as vi,wh as xt,wi as yP,wj as RP,wk as ZP,wl as voe,x as VN,xa as sR,xb as gR,xc as Ze,xd as bl,xe as jc,xf as B_,xg as df,xh as Q_,xi as CP,xj as hb,xk as toe,xl as _oe,y as Nc,ya as __,yb as eu,yc as P,yd as Vn,ye as Sl,yf as _O,yg as ar,yh as Sa,yi as nb,yj as Bw,yk as n1,yl as boe,z as zn,za as Di,zb as Lm,zc as qe,zd as mw,ze as et,zf as bO,zg as K_,zh as oP,zi as Dn,zj as OP,zk as ioe,zl as yoe}from"./chunk-XDVUM6M6.js";import{a as Re,b as Pt,c as Yd,d as aa,e as M,f as gt,g as RN,h as Hi,i as Kh,j as Cn}from"./chunk-3X664NSF.js";var x3=gt((r9e,hH)=>{hH.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var CH=gt((o9e,yH)=>{"use strict";var Xb=Object.prototype.hasOwnProperty,bH=Object.prototype.toString,fH=Object.defineProperty,pH=Object.getOwnPropertyDescriptor,mH=function(e){return typeof Array.isArray=="function"?Array.isArray(e):bH.call(e)==="[object Array]"},gH=function(e){if(!e||bH.call(e)!=="[object Object]")return!1;var t=Xb.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Xb.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||Xb.call(e,r)},vH=function(e,t){fH&&t.name==="__proto__"?fH(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_H=function(e,t){if(t==="__proto__")if(Xb.call(e,t)){if(pH)return pH(e,t).value}else return;return e[t]};yH.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=_H(a,t),r=_H(e,t),a!==r&&(d&&r&&(gH(r)||(o=mH(r)))?(o?(o=!1,s=n&&mH(n)?n:[]):s=n&&gH(n)?n:{},vH(a,{name:t,newValue:i(d,s,r)})):typeof r!="undefined"&&vH(a,{name:t,newValue:r}));return a}});var T1=gt((Q3e,zB)=>{"use strict";var BB={};function ule(i){var e,t,n=BB[i];if(n)return n;for(n=BB[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 l5(i,e,t){var n,r,o,s,a,l="";for(typeof e!="string"&&(t=e,e=l5.defaultChars),typeof t=="undefined"&&(t=!0),a=ule(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}l5.defaultChars=";/?:@&=+$,-_.!~*'()#";l5.componentChars="-_.!~*'()";zB.exports=l5});var h5=gt(Fl=>{"use strict";var _le=[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];Fl.REPLACEMENT_CHARACTER="\uFFFD";Fl.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};Fl.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]};Fl.isSurrogate=function(i){return i>=55296&&i<=57343};Fl.isSurrogatePair=function(i){return i>=56320&&i<=57343};Fl.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};Fl.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};Fl.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||_le.indexOf(i)>-1}});var f5=gt((_8e,oz)=>{"use strict";oz.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 az=gt((b8e,sz)=>{"use strict";var If=h5(),ox=f5(),mu=If.CODE_POINTS,ble=65536,sx=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=ble}_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(If.isSurrogatePair(t))return this.pos++,this._addGap(),If.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,mu.EOF;return this._err(ox.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,mu.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===mu.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===mu.CARRIAGE_RETURN?(this.skipNextNewLine=!0,mu.LINE_FEED):(this.skipNextNewLine=!1,If.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===mu.LINE_FEED||e===mu.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){If.isControlCodePoint(e)?this._err(ox.controlCharacterInInputStream):If.isUndefinedCodePoint(e)&&this._err(ox.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};sz.exports=sx});var cz=gt((y8e,lz)=>{"use strict";lz.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 N1=gt((C8e,aU)=>{"use strict";var yle=az(),ki=h5(),_u=cz(),_e=f5(),V=ki.CODE_POINTS,gu=ki.CODE_POINT_SEQUENCES,Cle={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},tU=1,iU=2,nU=4,Sle=tU|iU|nU,Yt="DATA_STATE",Lf="RCDATA_STATE",M1="RAWTEXT_STATE",zl="SCRIPT_DATA_STATE",rU="PLAINTEXT_STATE",dz="TAG_OPEN_STATE",uz="END_TAG_OPEN_STATE",ax="TAG_NAME_STATE",hz="RCDATA_LESS_THAN_SIGN_STATE",fz="RCDATA_END_TAG_OPEN_STATE",pz="RCDATA_END_TAG_NAME_STATE",mz="RAWTEXT_LESS_THAN_SIGN_STATE",gz="RAWTEXT_END_TAG_OPEN_STATE",vz="RAWTEXT_END_TAG_NAME_STATE",_z="SCRIPT_DATA_LESS_THAN_SIGN_STATE",bz="SCRIPT_DATA_END_TAG_OPEN_STATE",yz="SCRIPT_DATA_END_TAG_NAME_STATE",Cz="SCRIPT_DATA_ESCAPE_START_STATE",Sz="SCRIPT_DATA_ESCAPE_START_DASH_STATE",Hs="SCRIPT_DATA_ESCAPED_STATE",wz="SCRIPT_DATA_ESCAPED_DASH_STATE",lx="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",p5="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",xz="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",Ez="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",Tz="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",Hl="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",kz="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",Iz="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",m5="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",Az="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",Na="BEFORE_ATTRIBUTE_NAME_STATE",g5="ATTRIBUTE_NAME_STATE",cx="AFTER_ATTRIBUTE_NAME_STATE",dx="BEFORE_ATTRIBUTE_VALUE_STATE",v5="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",_5="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",b5="ATTRIBUTE_VALUE_UNQUOTED_STATE",ux="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",id="SELF_CLOSING_START_TAG_STATE",k1="BOGUS_COMMENT_STATE",Lz="MARKUP_DECLARATION_OPEN_STATE",Mz="COMMENT_START_STATE",Dz="COMMENT_START_DASH_STATE",nd="COMMENT_STATE",Nz="COMMENT_LESS_THAN_SIGN_STATE",Rz="COMMENT_LESS_THAN_SIGN_BANG_STATE",Oz="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",Pz="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",y5="COMMENT_END_DASH_STATE",C5="COMMENT_END_STATE",Fz="COMMENT_END_BANG_STATE",Hz="DOCTYPE_STATE",S5="BEFORE_DOCTYPE_NAME_STATE",w5="DOCTYPE_NAME_STATE",Bz="AFTER_DOCTYPE_NAME_STATE",zz="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",Uz="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",hx="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",fx="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",px="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Wz="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",jz="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",Vz="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",I1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",A1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",mx="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Bl="BOGUS_DOCTYPE_STATE",x5="CDATA_SECTION_STATE",Kz="CDATA_SECTION_BRACKET_STATE",qz="CDATA_SECTION_END_STATE",Af="CHARACTER_REFERENCE_STATE",Gz="NAMED_CHARACTER_REFERENCE_STATE",$z="AMBIGUOS_AMPERSAND_STATE",Yz="NUMERIC_CHARACTER_REFERENCE_STATE",Xz="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Qz="DECIMAL_CHARACTER_REFERENCE_START_STATE",Jz="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Zz="DECIMAL_CHARACTER_REFERENCE_STATE",L1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function qi(i){return i===V.SPACE||i===V.LINE_FEED||i===V.TABULATION||i===V.FORM_FEED}function D1(i){return i>=V.DIGIT_0&&i<=V.DIGIT_9}function Bs(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_Z}function vu(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_Z}function od(i){return vu(i)||Bs(i)}function gx(i){return od(i)||D1(i)}function oU(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_F}function sU(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_F}function wle(i){return D1(i)||oU(i)||sU(i)}function E5(i){return i+32}function mn(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function rd(i){return String.fromCharCode(E5(i))}function eU(i,e){let t=_u[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=_u[o];if(s<e)n=o+1;else if(s>e)r=o-1;else return _u[o+t]}return-1}var po=class i{constructor(){this.preprocessor=new yle,this.tokenQueue=[],this.allowCDATA=!1,this.state=Yt,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===V.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==E5(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==gu.SCRIPT_STRING.length)return!1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==gu.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(_e.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(_e.endTagWithAttributes),e.selfClosing&&this._err(_e.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;qi(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===V.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,mn(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=eU(0,e);for(this.tempBuff.push(e);r>-1;){let o=_u[r],s=o<Sle;s&&o&tU&&(t=o&iU?[_u[++r],_u[++r]]:[_u[++r]],n=0);let l=this._consume();if(this.tempBuff.push(l),n++,l===V.EOF)break;s?r=o&nU?eU(r,l):-1:r=l===o?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===v5||this.returnState===_5||this.returnState===b5}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){let t=this._consume();return this._unconsume(),t===V.EQUALS_SIGN||gx(t)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=mn(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[Yt](e){this.preprocessor.dropParsedChunk(),e===V.LESS_THAN_SIGN?this.state=dz:e===V.AMPERSAND?(this.returnState=Yt,this.state=Af):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitCodePoint(e)):e===V.EOF?this._emitEOFToken():this._emitCodePoint(e)}[Lf](e){this.preprocessor.dropParsedChunk(),e===V.AMPERSAND?(this.returnState=Lf,this.state=Af):e===V.LESS_THAN_SIGN?this.state=hz:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?this._emitEOFToken():this._emitCodePoint(e)}[M1](e){this.preprocessor.dropParsedChunk(),e===V.LESS_THAN_SIGN?this.state=mz:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?this._emitEOFToken():this._emitCodePoint(e)}[zl](e){this.preprocessor.dropParsedChunk(),e===V.LESS_THAN_SIGN?this.state=_z:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?this._emitEOFToken():this._emitCodePoint(e)}[rU](e){this.preprocessor.dropParsedChunk(),e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?this._emitEOFToken():this._emitCodePoint(e)}[dz](e){e===V.EXCLAMATION_MARK?this.state=Lz:e===V.SOLIDUS?this.state=uz:od(e)?(this._createStartTagToken(),this._reconsumeInState(ax)):e===V.QUESTION_MARK?(this._err(_e.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(k1)):e===V.EOF?(this._err(_e.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(_e.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(Yt))}[uz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(ax)):e===V.GREATER_THAN_SIGN?(this._err(_e.missingEndTagName),this.state=Yt):e===V.EOF?(this._err(_e.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(_e.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(k1))}[ax](e){qi(e)?this.state=Na:e===V.SOLIDUS?this.state=id:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):Bs(e)?this.currentToken.tagName+=rd(e):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.tagName+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=mn(e)}[hz](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=fz):(this._emitChars("<"),this._reconsumeInState(Lf))}[fz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(pz)):(this._emitChars("</"),this._reconsumeInState(Lf))}[pz](e){if(Bs(e))this.currentToken.tagName+=rd(e),this.tempBuff.push(e);else if(vu(e))this.currentToken.tagName+=mn(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(qi(e)){this.state=Na;return}if(e===V.SOLIDUS){this.state=id;return}if(e===V.GREATER_THAN_SIGN){this.state=Yt,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Lf)}}[mz](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=gz):(this._emitChars("<"),this._reconsumeInState(M1))}[gz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(vz)):(this._emitChars("</"),this._reconsumeInState(M1))}[vz](e){if(Bs(e))this.currentToken.tagName+=rd(e),this.tempBuff.push(e);else if(vu(e))this.currentToken.tagName+=mn(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(qi(e)){this.state=Na;return}if(e===V.SOLIDUS){this.state=id;return}if(e===V.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=Yt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(M1)}}[_z](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=bz):e===V.EXCLAMATION_MARK?(this.state=Cz,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(zl))}[bz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(yz)):(this._emitChars("</"),this._reconsumeInState(zl))}[yz](e){if(Bs(e))this.currentToken.tagName+=rd(e),this.tempBuff.push(e);else if(vu(e))this.currentToken.tagName+=mn(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(qi(e)){this.state=Na;return}else if(e===V.SOLIDUS){this.state=id;return}else if(e===V.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=Yt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(zl)}}[Cz](e){e===V.HYPHEN_MINUS?(this.state=Sz,this._emitChars("-")):this._reconsumeInState(zl)}[Sz](e){e===V.HYPHEN_MINUS?(this.state=lx,this._emitChars("-")):this._reconsumeInState(zl)}[Hs](e){e===V.HYPHEN_MINUS?(this.state=wz,this._emitChars("-")):e===V.LESS_THAN_SIGN?this.state=p5:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[wz](e){e===V.HYPHEN_MINUS?(this.state=lx,this._emitChars("-")):e===V.LESS_THAN_SIGN?this.state=p5:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hs,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hs,this._emitCodePoint(e))}[lx](e){e===V.HYPHEN_MINUS?this._emitChars("-"):e===V.LESS_THAN_SIGN?this.state=p5:e===V.GREATER_THAN_SIGN?(this.state=zl,this._emitChars(">")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hs,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hs,this._emitCodePoint(e))}[p5](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=xz):od(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(Tz)):(this._emitChars("<"),this._reconsumeInState(Hs))}[xz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(Ez)):(this._emitChars("</"),this._reconsumeInState(Hs))}[Ez](e){if(Bs(e))this.currentToken.tagName+=rd(e),this.tempBuff.push(e);else if(vu(e))this.currentToken.tagName+=mn(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(qi(e)){this.state=Na;return}if(e===V.SOLIDUS){this.state=id;return}if(e===V.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=Yt;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Hs)}}[Tz](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Hl:Hs,this._emitCodePoint(e)):Bs(e)?(this.tempBuff.push(E5(e)),this._emitCodePoint(e)):vu(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(Hs)}[Hl](e){e===V.HYPHEN_MINUS?(this.state=kz,this._emitChars("-")):e===V.LESS_THAN_SIGN?(this.state=m5,this._emitChars("<")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[kz](e){e===V.HYPHEN_MINUS?(this.state=Iz,this._emitChars("-")):e===V.LESS_THAN_SIGN?(this.state=m5,this._emitChars("<")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hl,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hl,this._emitCodePoint(e))}[Iz](e){e===V.HYPHEN_MINUS?this._emitChars("-"):e===V.LESS_THAN_SIGN?(this.state=m5,this._emitChars("<")):e===V.GREATER_THAN_SIGN?(this.state=zl,this._emitChars(">")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hl,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hl,this._emitCodePoint(e))}[m5](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=Az,this._emitChars("/")):this._reconsumeInState(Hl)}[Az](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Hs:Hl,this._emitCodePoint(e)):Bs(e)?(this.tempBuff.push(E5(e)),this._emitCodePoint(e)):vu(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(Hl)}[Na](e){qi(e)||(e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?this._reconsumeInState(cx):e===V.EQUALS_SIGN?(this._err(_e.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=g5):(this._createAttr(""),this._reconsumeInState(g5)))}[g5](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?(this._leaveAttrName(cx),this._unconsume()):e===V.EQUALS_SIGN?this._leaveAttrName(dx):Bs(e)?this.currentAttr.name+=rd(e):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN?(this._err(_e.unexpectedCharacterInAttributeName),this.currentAttr.name+=mn(e)):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.name+=ki.REPLACEMENT_CHARACTER):this.currentAttr.name+=mn(e)}[cx](e){qi(e)||(e===V.SOLIDUS?this.state=id:e===V.EQUALS_SIGN?this.state=dx:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(g5)))}[dx](e){qi(e)||(e===V.QUOTATION_MARK?this.state=v5:e===V.APOSTROPHE?this.state=_5:e===V.GREATER_THAN_SIGN?(this._err(_e.missingAttributeValue),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(b5))}[v5](e){e===V.QUOTATION_MARK?this.state=ux:e===V.AMPERSAND?(this.returnState=v5,this.state=Af):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[_5](e){e===V.APOSTROPHE?this.state=ux:e===V.AMPERSAND?(this.returnState=_5,this.state=Af):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[b5](e){qi(e)?this._leaveAttrValue(Na):e===V.AMPERSAND?(this.returnState=b5,this.state=Af):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN||e===V.EQUALS_SIGN||e===V.GRAVE_ACCENT?(this._err(_e.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=mn(e)):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[ux](e){qi(e)?this._leaveAttrValue(Na):e===V.SOLIDUS?this._leaveAttrValue(id):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._err(_e.missingWhitespaceBetweenAttributes),this._reconsumeInState(Na))}[id](e){e===V.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._err(_e.unexpectedSolidusInTag),this._reconsumeInState(Na))}[k1](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.data+=ki.REPLACEMENT_CHARACTER):this.currentToken.data+=mn(e)}[Lz](e){this._consumeSequenceIfMatch(gu.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Mz):this._consumeSequenceIfMatch(gu.DOCTYPE_STRING,e,!1)?this.state=Hz:this._consumeSequenceIfMatch(gu.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=x5:(this._err(_e.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=k1):this._ensureHibernation()||(this._err(_e.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(k1))}[Mz](e){e===V.HYPHEN_MINUS?this.state=Dz:e===V.GREATER_THAN_SIGN?(this._err(_e.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(nd)}[Dz](e){e===V.HYPHEN_MINUS?this.state=C5:e===V.GREATER_THAN_SIGN?(this._err(_e.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(nd))}[nd](e){e===V.HYPHEN_MINUS?this.state=y5:e===V.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Nz):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.data+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=mn(e)}[Nz](e){e===V.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Rz):e===V.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(nd)}[Rz](e){e===V.HYPHEN_MINUS?this.state=Oz:this._reconsumeInState(nd)}[Oz](e){e===V.HYPHEN_MINUS?this.state=Pz:this._reconsumeInState(y5)}[Pz](e){e!==V.GREATER_THAN_SIGN&&e!==V.EOF&&this._err(_e.nestedComment),this._reconsumeInState(C5)}[y5](e){e===V.HYPHEN_MINUS?this.state=C5:e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(nd))}[C5](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EXCLAMATION_MARK?this.state=Fz:e===V.HYPHEN_MINUS?this.currentToken.data+="-":e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(nd))}[Fz](e){e===V.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=y5):e===V.GREATER_THAN_SIGN?(this._err(_e.incorrectlyClosedComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(nd))}[Hz](e){qi(e)?this.state=S5:e===V.GREATER_THAN_SIGN?this._reconsumeInState(S5):e===V.EOF?(this._err(_e.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(S5))}[S5](e){qi(e)||(Bs(e)?(this._createDoctypeToken(rd(e)),this.state=w5):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._createDoctypeToken(ki.REPLACEMENT_CHARACTER),this.state=w5):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(mn(e)),this.state=w5))}[w5](e){qi(e)?this.state=Bz:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):Bs(e)?this.currentToken.name+=rd(e):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.name+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=mn(e)}[Bz](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(gu.PUBLIC_STRING,e,!1)?this.state=zz:this._consumeSequenceIfMatch(gu.SYSTEM_STRING,e,!1)?this.state=jz:this._ensureHibernation()||(this._err(_e.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[zz](e){qi(e)?this.state=Uz:e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=hx):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=fx):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Uz](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.publicId="",this.state=hx):e===V.APOSTROPHE?(this.currentToken.publicId="",this.state=fx):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[hx](e){e===V.QUOTATION_MARK?this.state=px:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.publicId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[fx](e){e===V.APOSTROPHE?this.state=px:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.publicId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[px](e){qi(e)?this.state=Wz:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=A1):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Wz](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=A1):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[jz](e){qi(e)?this.state=Vz:e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=A1):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Vz](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=A1):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[I1](e){e===V.QUOTATION_MARK?this.state=mx:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.systemId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[A1](e){e===V.APOSTROPHE?this.state=mx:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.systemId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[mx](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Bl)))}[Bl](e){e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.NULL?this._err(_e.unexpectedNullCharacter):e===V.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[x5](e){e===V.RIGHT_SQUARE_BRACKET?this.state=Kz:e===V.EOF?(this._err(_e.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[Kz](e){e===V.RIGHT_SQUARE_BRACKET?this.state=qz:(this._emitChars("]"),this._reconsumeInState(x5))}[qz](e){e===V.GREATER_THAN_SIGN?this.state=Yt:e===V.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(x5))}[Af](e){this.tempBuff=[V.AMPERSAND],e===V.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Yz):gx(e)?this._reconsumeInState(Gz):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Gz](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[V.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===V.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(_e.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=$z}[$z](e){gx(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=mn(e):this._emitCodePoint(e):(e===V.SEMICOLON&&this._err(_e.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Yz](e){this.charRefCode=0,e===V.LATIN_SMALL_X||e===V.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Xz):this._reconsumeInState(Qz)}[Xz](e){wle(e)?this._reconsumeInState(Jz):(this._err(_e.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Qz](e){D1(e)?this._reconsumeInState(Zz):(this._err(_e.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Jz](e){oU(e)?this.charRefCode=this.charRefCode*16+e-55:sU(e)?this.charRefCode=this.charRefCode*16+e-87:D1(e)?this.charRefCode=this.charRefCode*16+e-48:e===V.SEMICOLON?this.state=L1:(this._err(_e.missingSemicolonAfterCharacterReference),this._reconsumeInState(L1))}[Zz](e){D1(e)?this.charRefCode=this.charRefCode*10+e-48:e===V.SEMICOLON?this.state=L1:(this._err(_e.missingSemicolonAfterCharacterReference),this._reconsumeInState(L1))}[L1](){if(this.charRefCode===V.NULL)this._err(_e.nullCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(_e.characterReferenceOutsideUnicodeRange),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(ki.isSurrogate(this.charRefCode))this._err(_e.surrogateCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(ki.isUndefinedCodePoint(this.charRefCode))this._err(_e.noncharacterCharacterReference);else if(ki.isControlCodePoint(this.charRefCode)||this.charRefCode===V.CARRIAGE_RETURN){this._err(_e.controlCharacterReference);let e=Cle[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};po.CHARACTER_TOKEN="CHARACTER_TOKEN";po.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";po.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";po.START_TAG_TOKEN="START_TAG_TOKEN";po.END_TAG_TOKEN="END_TAG_TOKEN";po.COMMENT_TOKEN="COMMENT_TOKEN";po.DOCTYPE_TOKEN="DOCTYPE_TOKEN";po.EOF_TOKEN="EOF_TOKEN";po.HIBERNATION_TOKEN="HIBERNATION_TOKEN";po.MODE={DATA:Yt,RCDATA:Lf,RAWTEXT:M1,SCRIPT_DATA:zl,PLAINTEXT:rU};po.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};aU.exports=po});var bu=gt(Mf=>{"use strict";var vx=Mf.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/"};Mf.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Mf.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var Le=Mf.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"};Mf.SPECIAL_ELEMENTS={[vx.HTML]:{[Le.ADDRESS]:!0,[Le.APPLET]:!0,[Le.AREA]:!0,[Le.ARTICLE]:!0,[Le.ASIDE]:!0,[Le.BASE]:!0,[Le.BASEFONT]:!0,[Le.BGSOUND]:!0,[Le.BLOCKQUOTE]:!0,[Le.BODY]:!0,[Le.BR]:!0,[Le.BUTTON]:!0,[Le.CAPTION]:!0,[Le.CENTER]:!0,[Le.COL]:!0,[Le.COLGROUP]:!0,[Le.DD]:!0,[Le.DETAILS]:!0,[Le.DIR]:!0,[Le.DIV]:!0,[Le.DL]:!0,[Le.DT]:!0,[Le.EMBED]:!0,[Le.FIELDSET]:!0,[Le.FIGCAPTION]:!0,[Le.FIGURE]:!0,[Le.FOOTER]:!0,[Le.FORM]:!0,[Le.FRAME]:!0,[Le.FRAMESET]:!0,[Le.H1]:!0,[Le.H2]:!0,[Le.H3]:!0,[Le.H4]:!0,[Le.H5]:!0,[Le.H6]:!0,[Le.HEAD]:!0,[Le.HEADER]:!0,[Le.HGROUP]:!0,[Le.HR]:!0,[Le.HTML]:!0,[Le.IFRAME]:!0,[Le.IMG]:!0,[Le.INPUT]:!0,[Le.LI]:!0,[Le.LINK]:!0,[Le.LISTING]:!0,[Le.MAIN]:!0,[Le.MARQUEE]:!0,[Le.MENU]:!0,[Le.META]:!0,[Le.NAV]:!0,[Le.NOEMBED]:!0,[Le.NOFRAMES]:!0,[Le.NOSCRIPT]:!0,[Le.OBJECT]:!0,[Le.OL]:!0,[Le.P]:!0,[Le.PARAM]:!0,[Le.PLAINTEXT]:!0,[Le.PRE]:!0,[Le.SCRIPT]:!0,[Le.SECTION]:!0,[Le.SELECT]:!0,[Le.SOURCE]:!0,[Le.STYLE]:!0,[Le.SUMMARY]:!0,[Le.TABLE]:!0,[Le.TBODY]:!0,[Le.TD]:!0,[Le.TEMPLATE]:!0,[Le.TEXTAREA]:!0,[Le.TFOOT]:!0,[Le.TH]:!0,[Le.THEAD]:!0,[Le.TITLE]:!0,[Le.TR]:!0,[Le.TRACK]:!0,[Le.UL]:!0,[Le.WBR]:!0,[Le.XMP]:!0},[vx.MATHML]:{[Le.MI]:!0,[Le.MO]:!0,[Le.MN]:!0,[Le.MS]:!0,[Le.MTEXT]:!0,[Le.ANNOTATION_XML]:!0},[vx.SVG]:{[Le.TITLE]:!0,[Le.FOREIGN_OBJECT]:!0,[Le.DESC]:!0}}});var uU=gt((w8e,dU)=>{"use strict";var cU=bu(),Pe=cU.TAG_NAMES,Ii=cU.NAMESPACES;function lU(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI;case 3:return i===Pe.RTC;case 6:return i===Pe.OPTION;case 8:return i===Pe.OPTGROUP}return!1}function xle(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI||i===Pe.TD||i===Pe.TH||i===Pe.TR;case 3:return i===Pe.RTC;case 5:return i===Pe.TBODY||i===Pe.TFOOT||i===Pe.THEAD;case 6:return i===Pe.OPTION;case 7:return i===Pe.CAPTION;case 8:return i===Pe.OPTGROUP||i===Pe.COLGROUP}return!1}function T5(i,e){switch(i.length){case 2:if(i===Pe.TD||i===Pe.TH)return e===Ii.HTML;if(i===Pe.MI||i===Pe.MO||i===Pe.MN||i===Pe.MS)return e===Ii.MATHML;break;case 4:if(i===Pe.HTML)return e===Ii.HTML;if(i===Pe.DESC)return e===Ii.SVG;break;case 5:if(i===Pe.TABLE)return e===Ii.HTML;if(i===Pe.MTEXT)return e===Ii.MATHML;if(i===Pe.TITLE)return e===Ii.SVG;break;case 6:return(i===Pe.APPLET||i===Pe.OBJECT)&&e===Ii.HTML;case 7:return(i===Pe.CAPTION||i===Pe.MARQUEE)&&e===Ii.HTML;case 8:return i===Pe.TEMPLATE&&e===Ii.HTML;case 13:return i===Pe.FOREIGN_OBJECT&&e===Ii.SVG;case 14:return i===Pe.ANNOTATION_XML&&e===Ii.MATHML}return!1}var _x=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===Pe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ii.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===Ii.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===Pe.H1||e===Pe.H2||e===Pe.H3||e===Pe.H4||e===Pe.H5||e===Pe.H6&&t===Ii.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Pe.TD||e===Pe.TH&&t===Ii.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==Pe.TABLE&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==Pe.TBODY&&this.currentTagName!==Pe.TFOOT&&this.currentTagName!==Pe.THEAD&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==Pe.TR&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.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)===Pe.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===Pe.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===Ii.HTML)return!0;if(T5(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===Pe.H1||t===Pe.H2||t===Pe.H3||t===Pe.H4||t===Pe.H5||t===Pe.H6)&&n===Ii.HTML)return!0;if(T5(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===Ii.HTML)return!0;if((n===Pe.UL||n===Pe.OL)&&r===Ii.HTML||T5(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===Ii.HTML)return!0;if(n===Pe.BUTTON&&r===Ii.HTML||T5(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])===Ii.HTML){if(n===e)return!0;if(n===Pe.TABLE||n===Pe.TEMPLATE||n===Pe.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])===Ii.HTML){if(t===Pe.TBODY||t===Pe.THEAD||t===Pe.TFOOT)return!0;if(t===Pe.TABLE||t===Pe.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])===Ii.HTML){if(n===e)return!0;if(n!==Pe.OPTION&&n!==Pe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;lU(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xle(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;lU(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};dU.exports=_x});var fU=gt((x8e,hU)=>{"use strict";var R1=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}};R1.MARKER_ENTRY="MARKER_ENTRY";R1.ELEMENT_ENTRY="ELEMENT_ENTRY";hU.exports=R1});var Ra=gt((E8e,pU)=>{"use strict";var k5=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")}};k5.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};pU.exports=k5});var yx=gt((T8e,mU)=>{"use strict";var Ele=Ra(),bx=class extends Ele{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}}}};mU.exports=bx});var wx=gt((k8e,vU)=>{"use strict";var gU=Ra(),Cx=N1(),Tle=yx(),Sx=class extends gU{constructor(e){super(e),this.tokenizer=e,this.posTracker=gU.install(e.preprocessor,Tle),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===Cx.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(Cx.MODE).forEach(r=>{let o=Cx.MODE[r];n[o]=function(s){e.ctLoc=e._getCurrentLocation(),t[o].call(this,s)}}),n}};vU.exports=Sx});var bU=gt((I8e,_U)=>{"use strict";var kle=Ra(),xx=class extends kle{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)}}}};_U.exports=xx});var SU=gt((A8e,CU)=>{"use strict";var Ex=Ra(),yU=N1(),Ile=wx(),Ale=bU(),Lle=bu(),Tx=Lle.TAG_NAMES,kx=class extends Ex{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===yU.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=Ex.install(this.tokenizer,Ile);e.posTracker=o.posTracker,Ex.install(this.openElements,Ale,{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===yU.END_TAG_TOKEN&&(n.tagName===Tx.HTML||n.tagName===Tx.BODY&&this.openElements.hasInScope(Tx.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:u,endOffset:h}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:u,endOffset:h})}else this.treeAdapter.setNodeSourceCodeLocation(l,n.location)}}}};CU.exports=kx});var I5=gt((L8e,wU)=>{"use strict";var Mle=Ra(),Ix=class extends Mle{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)}}}};wU.exports=Ix});var EU=gt((M8e,xU)=>{"use strict";var Dle=I5(),Nle=yx(),Rle=Ra(),Ax=class extends Dle{constructor(e,t){super(e,t),this.posTracker=Rle.install(e,Nle),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}};xU.exports=Ax});var kU=gt((D8e,TU)=>{"use strict";var Ole=I5(),Ple=EU(),Fle=Ra(),Lx=class extends Ole{constructor(e,t){super(e,t);let n=Fle.install(e.preprocessor,Ple,t);this.posTracker=n.posTracker}};TU.exports=Lx});var LU=gt((N8e,AU)=>{"use strict";var Hle=I5(),Ble=kU(),zle=wx(),IU=Ra(),Mx=class extends Hle{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),IU.install(this.tokenizer,Ble,e.opts),IU.install(this.tokenizer,zle)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(n,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(n)}}}};AU.exports=Mx});var NU=gt(si=>{"use strict";var{DOCUMENT_MODE:Ule}=bu();si.createDocument=function(){return{nodeName:"#document",mode:Ule.NO_QUIRKS,childNodes:[]}};si.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};si.createElement=function(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}};si.createCommentNode=function(i){return{nodeName:"#comment",data:i,parentNode:null}};var MU=function(i){return{nodeName:"#text",value:i,parentNode:null}},DU=si.appendChild=function(i,e){i.childNodes.push(e),e.parentNode=i},Wle=si.insertBefore=function(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i};si.setTemplateContent=function(i,e){i.content=e};si.getTemplateContent=function(i){return i.content};si.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):DU(i,{nodeName:"#documentType",name:e,publicId:t,systemId:n})};si.setDocumentMode=function(i,e){i.mode=e};si.getDocumentMode=function(i){return i.mode};si.detachNode=function(i){if(i.parentNode){let e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}};si.insertText=function(i,e){if(i.childNodes.length){let t=i.childNodes[i.childNodes.length-1];if(t.nodeName==="#text"){t.value+=e;return}}DU(i,MU(e))};si.insertTextBefore=function(i,e,t){let n=i.childNodes[i.childNodes.indexOf(t)-1];n&&n.nodeName==="#text"?n.value+=e:Wle(i,MU(e),t)};si.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])};si.getFirstChild=function(i){return i.childNodes[0]};si.getChildNodes=function(i){return i.childNodes};si.getParentNode=function(i){return i.parentNode};si.getAttrList=function(i){return i.attrs};si.getTagName=function(i){return i.tagName};si.getNamespaceURI=function(i){return i.namespaceURI};si.getTextNodeContent=function(i){return i.value};si.getCommentNodeContent=function(i){return i.data};si.getDocumentTypeNodeName=function(i){return i.name};si.getDocumentTypeNodePublicId=function(i){return i.publicId};si.getDocumentTypeNodeSystemId=function(i){return i.systemId};si.isTextNode=function(i){return i.nodeName==="#text"};si.isCommentNode=function(i){return i.nodeName==="#comment"};si.isDocumentTypeNode=function(i){return i.nodeName==="#documentType"};si.isElementNode=function(i){return!!i.tagName};si.setNodeSourceCodeLocation=function(i,e){i.sourceCodeLocation=e};si.getNodeSourceCodeLocation=function(i){return i.sourceCodeLocation};si.updateNodeSourceCodeLocation=function(i,e){i.sourceCodeLocation=Object.assign(i.sourceCodeLocation,e)}});var OU=gt((O8e,RU)=>{"use strict";RU.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 UU=gt(A5=>{"use strict";var{DOCUMENT_MODE:Df}=bu(),HU="html",jle="about:legacy-compat",Vle="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",BU=["+//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//"],Kle=BU.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),qle=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],zU=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Gle=zU.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function PU(i){let e=i.indexOf('"')!==-1?"'":'"';return e+i+e}function FU(i,e){for(let t=0;t<e.length;t++)if(i.indexOf(e[t])===0)return!0;return!1}A5.isConforming=function(i){return i.name===HU&&i.publicId===null&&(i.systemId===null||i.systemId===jle)};A5.getDocumentMode=function(i){if(i.name!==HU)return Df.QUIRKS;let e=i.systemId;if(e&&e.toLowerCase()===Vle)return Df.QUIRKS;let t=i.publicId;if(t!==null){if(t=t.toLowerCase(),qle.indexOf(t)>-1)return Df.QUIRKS;let n=e===null?Kle:BU;if(FU(t,n))return Df.QUIRKS;if(n=e===null?zU:Gle,FU(t,n))return Df.LIMITED_QUIRKS}return Df.NO_QUIRKS};A5.serializeContent=function(i,e,t){let n="!DOCTYPE ";return i&&(n+=i),e?n+=" PUBLIC "+PU(e):t&&(n+=" SYSTEM"),t!==null&&(n+=" "+PU(t)),n}});var jU=gt(sd=>{"use strict";var Dx=N1(),Nx=bu(),pt=Nx.TAG_NAMES,Sr=Nx.NAMESPACES,L5=Nx.ATTRS,WU={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},$le="definitionurl",Yle="definitionURL",Xle={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"},Qle={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:Sr.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:Sr.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:Sr.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:Sr.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:Sr.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:Sr.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:Sr.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:Sr.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:Sr.XML},"xml:space":{prefix:"xml",name:"space",namespace:Sr.XML},xmlns:{prefix:"",name:"xmlns",namespace:Sr.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:Sr.XMLNS}},Jle=sd.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"},Zle={[pt.B]:!0,[pt.BIG]:!0,[pt.BLOCKQUOTE]:!0,[pt.BODY]:!0,[pt.BR]:!0,[pt.CENTER]:!0,[pt.CODE]:!0,[pt.DD]:!0,[pt.DIV]:!0,[pt.DL]:!0,[pt.DT]:!0,[pt.EM]:!0,[pt.EMBED]:!0,[pt.H1]:!0,[pt.H2]:!0,[pt.H3]:!0,[pt.H4]:!0,[pt.H5]:!0,[pt.H6]:!0,[pt.HEAD]:!0,[pt.HR]:!0,[pt.I]:!0,[pt.IMG]:!0,[pt.LI]:!0,[pt.LISTING]:!0,[pt.MENU]:!0,[pt.META]:!0,[pt.NOBR]:!0,[pt.OL]:!0,[pt.P]:!0,[pt.PRE]:!0,[pt.RUBY]:!0,[pt.S]:!0,[pt.SMALL]:!0,[pt.SPAN]:!0,[pt.STRONG]:!0,[pt.STRIKE]:!0,[pt.SUB]:!0,[pt.SUP]:!0,[pt.TABLE]:!0,[pt.TT]:!0,[pt.U]:!0,[pt.UL]:!0,[pt.VAR]:!0};sd.causesExit=function(i){let e=i.tagName;return e===pt.FONT&&(Dx.getTokenAttr(i,L5.COLOR)!==null||Dx.getTokenAttr(i,L5.SIZE)!==null||Dx.getTokenAttr(i,L5.FACE)!==null)?!0:Zle[e]};sd.adjustTokenMathMLAttrs=function(i){for(let e=0;e<i.attrs.length;e++)if(i.attrs[e].name===$le){i.attrs[e].name=Yle;break}};sd.adjustTokenSVGAttrs=function(i){for(let e=0;e<i.attrs.length;e++){let t=Xle[i.attrs[e].name];t&&(i.attrs[e].name=t)}};sd.adjustTokenXMLAttrs=function(i){for(let e=0;e<i.attrs.length;e++){let t=Qle[i.attrs[e].name];t&&(i.attrs[e].prefix=t.prefix,i.attrs[e].name=t.name,i.attrs[e].namespace=t.namespace)}};sd.adjustTokenSVGTagName=function(i){let e=Jle[i.tagName];e&&(i.tagName=e)};function ece(i,e){return e===Sr.MATHML&&(i===pt.MI||i===pt.MO||i===pt.MN||i===pt.MS||i===pt.MTEXT)}function tce(i,e,t){if(e===Sr.MATHML&&i===pt.ANNOTATION_XML){for(let n=0;n<t.length;n++)if(t[n].name===L5.ENCODING){let r=t[n].value.toLowerCase();return r===WU.TEXT_HTML||r===WU.APPLICATION_XML}}return e===Sr.SVG&&(i===pt.FOREIGN_OBJECT||i===pt.DESC||i===pt.TITLE)}sd.isIntegrationPoint=function(i,e,t,n){return!!((!n||n===Sr.HTML)&&tce(i,e,t)||(!n||n===Sr.MATHML)&&ece(i,e))}});var Wx=gt((H8e,fW)=>{"use strict";var q=N1(),ice=uU(),VU=fU(),nce=SU(),rce=LU(),KU=Ra(),oce=NU(),sce=OU(),qU=UU(),Oa=jU(),wr=f5(),ace=h5(),Cu=bu(),T=Cu.TAG_NAMES,tt=Cu.NAMESPACES,iW=Cu.ATTRS,lce={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:oce},nW="hidden",cce=8,dce=3,rW="INITIAL_MODE",Ox="BEFORE_HTML_MODE",H5="BEFORE_HEAD_MODE",Of="IN_HEAD_MODE",oW="IN_HEAD_NO_SCRIPT_MODE",B5="AFTER_HEAD_MODE",Pa="IN_BODY_MODE",R5="TEXT_MODE",Br="IN_TABLE_MODE",sW="IN_TABLE_TEXT_MODE",z5="IN_CAPTION_MODE",j1="IN_COLUMN_GROUP_MODE",ms="IN_TABLE_BODY_MODE",Vl="IN_ROW_MODE",U5="IN_CELL_MODE",Px="IN_SELECT_MODE",Fx="IN_SELECT_IN_TABLE_MODE",O5="IN_TEMPLATE_MODE",Hx="AFTER_BODY_MODE",W5="IN_FRAMESET_MODE",aW="AFTER_FRAMESET_MODE",lW="AFTER_AFTER_BODY_MODE",cW="AFTER_AFTER_FRAMESET_MODE",uce={[T.TR]:Vl,[T.TBODY]:ms,[T.THEAD]:ms,[T.TFOOT]:ms,[T.CAPTION]:z5,[T.COLGROUP]:j1,[T.TABLE]:Br,[T.BODY]:Pa,[T.FRAMESET]:W5},hce={[T.CAPTION]:Br,[T.COLGROUP]:Br,[T.TBODY]:Br,[T.TFOOT]:Br,[T.THEAD]:Br,[T.COL]:j1,[T.TR]:ms,[T.TD]:Vl,[T.TH]:Vl},GU={[rW]:{[q.CHARACTER_TOKEN]:P1,[q.NULL_CHARACTER_TOKEN]:P1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:yce,[q.START_TAG_TOKEN]:P1,[q.END_TAG_TOKEN]:P1,[q.EOF_TOKEN]:P1},[Ox]:{[q.CHARACTER_TOKEN]:H1,[q.NULL_CHARACTER_TOKEN]:H1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cce,[q.END_TAG_TOKEN]:Sce,[q.EOF_TOKEN]:H1},[H5]:{[q.CHARACTER_TOKEN]:B1,[q.NULL_CHARACTER_TOKEN]:B1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:wce,[q.END_TAG_TOKEN]:xce,[q.EOF_TOKEN]:B1},[Of]:{[q.CHARACTER_TOKEN]:z1,[q.NULL_CHARACTER_TOKEN]:z1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:cr,[q.END_TAG_TOKEN]:Su,[q.EOF_TOKEN]:z1},[oW]:{[q.CHARACTER_TOKEN]:U1,[q.NULL_CHARACTER_TOKEN]:U1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:Ece,[q.END_TAG_TOKEN]:Tce,[q.EOF_TOKEN]:U1},[B5]:{[q.CHARACTER_TOKEN]:W1,[q.NULL_CHARACTER_TOKEN]:W1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:kce,[q.END_TAG_TOKEN]:Ice,[q.EOF_TOKEN]:W1},[Pa]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:go,[q.END_TAG_TOKEN]:Bx,[q.EOF_TOKEN]:Wl},[R5]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:mo,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:ei,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:ei,[q.END_TAG_TOKEN]:ode,[q.EOF_TOKEN]:sde},[Br]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:zx,[q.END_TAG_TOKEN]:Ux,[q.EOF_TOKEN]:Wl},[sW]:{[q.CHARACTER_TOKEN]:gde,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mde,[q.COMMENT_TOKEN]:F1,[q.DOCTYPE_TOKEN]:F1,[q.START_TAG_TOKEN]:F1,[q.END_TAG_TOKEN]:F1,[q.EOF_TOKEN]:F1},[z5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:vde,[q.END_TAG_TOKEN]:_de,[q.EOF_TOKEN]:Wl},[j1]:{[q.CHARACTER_TOKEN]:P5,[q.NULL_CHARACTER_TOKEN]:P5,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:bde,[q.END_TAG_TOKEN]:yde,[q.EOF_TOKEN]:Wl},[ms]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cde,[q.END_TAG_TOKEN]:Sde,[q.EOF_TOKEN]:Wl},[Vl]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:wde,[q.END_TAG_TOKEN]:xde,[q.EOF_TOKEN]:Wl},[U5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ede,[q.END_TAG_TOKEN]:Tde,[q.EOF_TOKEN]:Wl},[Px]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:dW,[q.END_TAG_TOKEN]:uW,[q.EOF_TOKEN]:Wl},[Fx]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:kde,[q.END_TAG_TOKEN]:Ide,[q.EOF_TOKEN]:Wl},[O5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ade,[q.END_TAG_TOKEN]:Lde,[q.EOF_TOKEN]:hW},[Hx]:{[q.CHARACTER_TOKEN]:F5,[q.NULL_CHARACTER_TOKEN]:F5,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:bce,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Mde,[q.END_TAG_TOKEN]:Dde,[q.EOF_TOKEN]:O1},[W5]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Nde,[q.END_TAG_TOKEN]:Rde,[q.EOF_TOKEN]:O1},[aW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ode,[q.END_TAG_TOKEN]:Pde,[q.EOF_TOKEN]:O1},[lW]:{[q.CHARACTER_TOKEN]:N5,[q.NULL_CHARACTER_TOKEN]:N5,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$U,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Fde,[q.END_TAG_TOKEN]:N5,[q.EOF_TOKEN]:O1},[cW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$U,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Hde,[q.END_TAG_TOKEN]:ei,[q.EOF_TOKEN]:O1}},Rx=class{constructor(e){this.options=sce(lce,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&KU.install(this,nce),this.options.onParseError&&KU.install(this,rce,{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(T.TEMPLATE,tt.HTML,[]));let n=this.treeAdapter.createElement("documentmock",tt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===T.TEMPLATE&&this._pushTmplInsertionMode(O5),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 q(this.options),this.stopped=!1,this.insertionMode=rW,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new ice(this.document,this.treeAdapter),this.activeFormattingElements=new VU(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===q.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===q.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)!==tt.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,tt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=R5}switchToPlaintextParsing(){this.insertionMode=R5,this.originalInsertionMode=Pa,this.tokenizer.state=q.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)===T.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===tt.HTML){let e=this.treeAdapter.getTagName(this.fragmentContext);e===T.TITLE||e===T.TEXTAREA?this.tokenizer.state=q.MODE.RCDATA:e===T.STYLE||e===T.XMP||e===T.IFRAME||e===T.NOEMBED||e===T.NOFRAMES||e===T.NOSCRIPT?this.tokenizer.state=q.MODE.RAWTEXT:e===T.SCRIPT?this.tokenizer.state=q.MODE.SCRIPT_DATA:e===T.PLAINTEXT&&(this.tokenizer.state=q.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,tt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,tt.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(T.HTML,tt.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===tt.HTML||this.treeAdapter.getTagName(t)===T.ANNOTATION_XML&&n===tt.MATHML&&e.type===q.START_TAG_TOKEN&&e.tagName===T.SVG)return!1;let r=e.type===q.CHARACTER_TOKEN||e.type===q.NULL_CHARACTER_TOKEN||e.type===q.WHITESPACE_CHARACTER_TOKEN;return(e.type===q.START_TAG_TOKEN&&e.tagName!==T.MGLYPH&&e.tagName!==T.MALIGNMARK||r)&&this._isIntegrationPoint(t,tt.MATHML)||(e.type===q.START_TAG_TOKEN||r)&&this._isIntegrationPoint(t,tt.HTML)?!1:e.type!==q.EOF_TOKEN}_processToken(e){GU[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){GU[Pa][e.type](this,e)}_processTokenInForeignContent(e){e.type===q.CHARACTER_TOKEN?zde(this,e):e.type===q.NULL_CHARACTER_TOKEN?Bde(this,e):e.type===q.WHITESPACE_CHARACTER_TOKEN?mo(this,e):e.type===q.COMMENT_TOKEN?$n(this,e):e.type===q.START_TAG_TOKEN?Ude(this,e):e.type===q.END_TAG_TOKEN&&Wde(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===q.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(wr.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){let n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return Oa.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===VU.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=Vl}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(T.P),this.openElements.popUntilTagNamePopped(T.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=uce[r];if(o){this.insertionMode=o;break}else if(!t&&(r===T.TD||r===T.TH)){this.insertionMode=U5;break}else if(!t&&r===T.HEAD){this.insertionMode=Of;break}else if(r===T.SELECT){this._resetInsertionModeForSelect(e);break}else if(r===T.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(r===T.HTML){this.insertionMode=this.headElement?B5:H5;break}else if(t){this.insertionMode=Pa;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===T.TEMPLATE)break;if(r===T.TABLE){this.insertionMode=Fx;return}}this.insertionMode=Px}_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===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.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===T.TEMPLATE&&o===tt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}else if(r===T.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 Cu.SPECIAL_ELEMENTS[n][t]}};fW.exports=Rx;function fce(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):zs(i,e),t}function pce(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 mce(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>=dce;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=gce(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function gce(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 vce(i,e,t){if(i._isElementCausesFosterParenting(e))i._fosterParentElement(t);else{let n=i.treeAdapter.getTagName(e),r=i.treeAdapter.getNamespaceURI(e);n===T.TEMPLATE&&r===tt.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function _ce(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 ld(i,e){let t;for(let n=0;n<cce&&(t=fce(i,e,t),!!t);n++){let r=pce(i,t);if(!r)break;i.activeFormattingElements.bookmark=t;let o=mce(i,r,t.element),s=i.openElements.getCommonAncestor(t.element);i.treeAdapter.detachNode(o),vce(i,s,o),_ce(i,r,t)}}function ei(){}function M5(i){i._err(wr.misplacedDoctype)}function $n(i,e){i._appendCommentNode(e,i.openElements.currentTmplContent||i.openElements.current)}function bce(i,e){i._appendCommentNode(e,i.openElements.items[0])}function $U(i,e){i._appendCommentNode(e,i.document)}function mo(i,e){i._insertCharacters(e)}function O1(i){i.stopped=!0}function yce(i,e){i._setDocumentType(e);let t=e.forceQuirks?Cu.DOCUMENT_MODE.QUIRKS:qU.getDocumentMode(e);qU.isConforming(e)||i._err(wr.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=Ox}function P1(i,e){i._err(wr.missingDoctype,{beforeToken:!0}),i.treeAdapter.setDocumentMode(i.document,Cu.DOCUMENT_MODE.QUIRKS),i.insertionMode=Ox,i._processToken(e)}function Cce(i,e){e.tagName===T.HTML?(i._insertElement(e,tt.HTML),i.insertionMode=H5):H1(i,e)}function Sce(i,e){let t=e.tagName;(t===T.HTML||t===T.HEAD||t===T.BODY||t===T.BR)&&H1(i,e)}function H1(i,e){i._insertFakeRootElement(),i.insertionMode=H5,i._processToken(e)}function wce(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.HEAD?(i._insertElement(e,tt.HTML),i.headElement=i.openElements.current,i.insertionMode=Of):B1(i,e)}function xce(i,e){let t=e.tagName;t===T.HEAD||t===T.BODY||t===T.HTML||t===T.BR?B1(i,e):i._err(wr.endTagWithoutMatchingOpenElement)}function B1(i,e){i._insertFakeElement(T.HEAD),i.headElement=i.openElements.current,i.insertionMode=Of,i._processToken(e)}function cr(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.BASE||t===T.BASEFONT||t===T.BGSOUND||t===T.LINK||t===T.META?(i._appendElement(e,tt.HTML),e.ackSelfClosing=!0):t===T.TITLE?i._switchToTextParsing(e,q.MODE.RCDATA):t===T.NOSCRIPT?i.options.scriptingEnabled?i._switchToTextParsing(e,q.MODE.RAWTEXT):(i._insertElement(e,tt.HTML),i.insertionMode=oW):t===T.NOFRAMES||t===T.STYLE?i._switchToTextParsing(e,q.MODE.RAWTEXT):t===T.SCRIPT?i._switchToTextParsing(e,q.MODE.SCRIPT_DATA):t===T.TEMPLATE?(i._insertTemplate(e,tt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=O5,i._pushTmplInsertionMode(O5)):t===T.HEAD?i._err(wr.misplacedStartTagForHeadElement):z1(i,e)}function Su(i,e){let t=e.tagName;t===T.HEAD?(i.openElements.pop(),i.insertionMode=B5):t===T.BODY||t===T.BR||t===T.HTML?z1(i,e):t===T.TEMPLATE&&i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagName!==T.TEMPLATE&&i._err(wr.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode()):i._err(wr.endTagWithoutMatchingOpenElement)}function z1(i,e){i.openElements.pop(),i.insertionMode=B5,i._processToken(e)}function Ece(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.BASEFONT||t===T.BGSOUND||t===T.HEAD||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.STYLE?cr(i,e):t===T.NOSCRIPT?i._err(wr.nestedNoscriptInHead):U1(i,e)}function Tce(i,e){let t=e.tagName;t===T.NOSCRIPT?(i.openElements.pop(),i.insertionMode=Of):t===T.BR?U1(i,e):i._err(wr.endTagWithoutMatchingOpenElement)}function U1(i,e){let t=e.type===q.EOF_TOKEN?wr.openElementsLeftAfterEof:wr.disallowedContentInNoscriptInHead;i._err(t),i.openElements.pop(),i.insertionMode=Of,i._processToken(e)}function kce(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.BODY?(i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Pa):t===T.FRAMESET?(i._insertElement(e,tt.HTML),i.insertionMode=W5):t===T.BASE||t===T.BASEFONT||t===T.BGSOUND||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.SCRIPT||t===T.STYLE||t===T.TEMPLATE||t===T.TITLE?(i._err(wr.abandonedHeadElementChild),i.openElements.push(i.headElement),cr(i,e),i.openElements.remove(i.headElement)):t===T.HEAD?i._err(wr.misplacedStartTagForHeadElement):W1(i,e)}function Ice(i,e){let t=e.tagName;t===T.BODY||t===T.HTML||t===T.BR?W1(i,e):t===T.TEMPLATE?Su(i,e):i._err(wr.endTagWithoutMatchingOpenElement)}function W1(i,e){i._insertFakeElement(T.BODY),i.insertionMode=Pa,i._processToken(e)}function yu(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function D5(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function Ace(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Lce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Mce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,tt.HTML),i.insertionMode=W5)}function Ul(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Dce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement();let t=i.openElements.currentTagName;(t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6)&&i.openElements.pop(),i._insertElement(e,tt.HTML)}function YU(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Nce(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),t||(i.formElement=i.openElements.current))}function Rce(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===T.LI&&o===T.LI?s=T.LI:(t===T.DD||t===T.DT)&&(o===T.DD||o===T.DT)&&(s=o),s){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(o!==T.ADDRESS&&o!==T.DIV&&o!==T.P&&i._isSpecialElement(r))break}i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Oce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.tokenizer.state=q.MODE.PLAINTEXT}function Pce(i,e){i.openElements.hasInScope(T.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(T.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1}function Fce(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(T.A);t&&(ld(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Nf(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Hce(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(T.NOBR)&&(ld(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function XU(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function Bce(i,e){i.treeAdapter.getDocumentMode(i.document)!==Cu.DOCUMENT_MODE.QUIRKS&&i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Br}function Rf(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function zce(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML);let t=q.getTokenAttr(e,iW.TYPE);(!t||t.toLowerCase()!==nW)&&(i.framesetOk=!1),e.ackSelfClosing=!0}function QU(i,e){i._appendElement(e,tt.HTML),e.ackSelfClosing=!0}function Uce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function Wce(i,e){e.tagName=T.IMG,Rf(i,e)}function jce(i,e){i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.tokenizer.state=q.MODE.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=R5}function Vce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function Kce(i,e){i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function JU(i,e){i._switchToTextParsing(e,q.MODE.RAWTEXT)}function qce(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode===Br||i.insertionMode===z5||i.insertionMode===ms||i.insertionMode===Vl||i.insertionMode===U5?i.insertionMode=Fx:i.insertionMode=Px}function ZU(i,e){i.openElements.currentTagName===T.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function eW(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,tt.HTML)}function Gce(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(T.RTC),i._insertElement(e,tt.HTML)}function $ce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Yce(i,e){i._reconstructActiveFormattingElements(),Oa.adjustTokenMathMLAttrs(e),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.MATHML):i._insertElement(e,tt.MATHML),e.ackSelfClosing=!0}function Xce(i,e){i._reconstructActiveFormattingElements(),Oa.adjustTokenSVGAttrs(e),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.SVG):i._insertElement(e,tt.SVG),e.ackSelfClosing=!0}function fs(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function go(i,e){let t=e.tagName;switch(t.length){case 1:t===T.I||t===T.S||t===T.B||t===T.U?Nf(i,e):t===T.P?Ul(i,e):t===T.A?Fce(i,e):fs(i,e);break;case 2:t===T.DL||t===T.OL||t===T.UL?Ul(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?Dce(i,e):t===T.LI||t===T.DD||t===T.DT?Rce(i,e):t===T.EM||t===T.TT?Nf(i,e):t===T.BR?Rf(i,e):t===T.HR?Uce(i,e):t===T.RB?eW(i,e):t===T.RT||t===T.RP?Gce(i,e):t!==T.TH&&t!==T.TD&&t!==T.TR&&fs(i,e);break;case 3:t===T.DIV||t===T.DIR||t===T.NAV?Ul(i,e):t===T.PRE?YU(i,e):t===T.BIG?Nf(i,e):t===T.IMG||t===T.WBR?Rf(i,e):t===T.XMP?Vce(i,e):t===T.SVG?Xce(i,e):t===T.RTC?eW(i,e):t!==T.COL&&fs(i,e);break;case 4:t===T.HTML?Ace(i,e):t===T.BASE||t===T.LINK||t===T.META?cr(i,e):t===T.BODY?Lce(i,e):t===T.MAIN||t===T.MENU?Ul(i,e):t===T.FORM?Nce(i,e):t===T.CODE||t===T.FONT?Nf(i,e):t===T.NOBR?Hce(i,e):t===T.AREA?Rf(i,e):t===T.MATH?Yce(i,e):t===T.MENU?$ce(i,e):t!==T.HEAD&&fs(i,e);break;case 5:t===T.STYLE||t===T.TITLE?cr(i,e):t===T.ASIDE?Ul(i,e):t===T.SMALL?Nf(i,e):t===T.TABLE?Bce(i,e):t===T.EMBED?Rf(i,e):t===T.INPUT?zce(i,e):t===T.PARAM||t===T.TRACK?QU(i,e):t===T.IMAGE?Wce(i,e):t!==T.FRAME&&t!==T.TBODY&&t!==T.TFOOT&&t!==T.THEAD&&fs(i,e);break;case 6:t===T.SCRIPT?cr(i,e):t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?Ul(i,e):t===T.BUTTON?Pce(i,e):t===T.STRIKE||t===T.STRONG?Nf(i,e):t===T.APPLET||t===T.OBJECT?XU(i,e):t===T.KEYGEN?Rf(i,e):t===T.SOURCE?QU(i,e):t===T.IFRAME?Kce(i,e):t===T.SELECT?qce(i,e):t===T.OPTION?ZU(i,e):fs(i,e);break;case 7:t===T.BGSOUND?cr(i,e):t===T.DETAILS||t===T.ADDRESS||t===T.ARTICLE||t===T.SECTION||t===T.SUMMARY?Ul(i,e):t===T.LISTING?YU(i,e):t===T.MARQUEE?XU(i,e):t===T.NOEMBED?JU(i,e):t!==T.CAPTION&&fs(i,e);break;case 8:t===T.BASEFONT?cr(i,e):t===T.FRAMESET?Mce(i,e):t===T.FIELDSET?Ul(i,e):t===T.TEXTAREA?jce(i,e):t===T.TEMPLATE?cr(i,e):t===T.NOSCRIPT?i.options.scriptingEnabled?JU(i,e):fs(i,e):t===T.OPTGROUP?ZU(i,e):t!==T.COLGROUP&&fs(i,e);break;case 9:t===T.PLAINTEXT?Oce(i,e):fs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?Ul(i,e):fs(i,e);break;default:fs(i,e)}}function Qce(i){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=Hx)}function Jce(i,e){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=Hx,i._processToken(e))}function ad(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function Zce(i){let e=i.openElements.tmplCount>0,t=i.formElement;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(T.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(T.FORM):i.openElements.remove(t))}function ede(i){i.openElements.hasInButtonScope(T.P)||i._insertFakeElement(T.P),i._closePElement()}function tde(i){i.openElements.hasInListItemScope(T.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(T.LI),i.openElements.popUntilTagNamePopped(T.LI))}function ide(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function nde(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function tW(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function rde(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(T.BR),i.openElements.pop(),i.framesetOk=!1}function zs(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 Bx(i,e){let t=e.tagName;switch(t.length){case 1:t===T.A||t===T.B||t===T.I||t===T.S||t===T.U?ld(i,e):t===T.P?ede(i,e):zs(i,e);break;case 2:t===T.DL||t===T.UL||t===T.OL?ad(i,e):t===T.LI?tde(i,e):t===T.DD||t===T.DT?ide(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?nde(i,e):t===T.BR?rde(i,e):t===T.EM||t===T.TT?ld(i,e):zs(i,e);break;case 3:t===T.BIG?ld(i,e):t===T.DIR||t===T.DIV||t===T.NAV||t===T.PRE?ad(i,e):zs(i,e);break;case 4:t===T.BODY?Qce(i,e):t===T.HTML?Jce(i,e):t===T.FORM?Zce(i,e):t===T.CODE||t===T.FONT||t===T.NOBR?ld(i,e):t===T.MAIN||t===T.MENU?ad(i,e):zs(i,e);break;case 5:t===T.ASIDE?ad(i,e):t===T.SMALL?ld(i,e):zs(i,e);break;case 6:t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?ad(i,e):t===T.APPLET||t===T.OBJECT?tW(i,e):t===T.STRIKE||t===T.STRONG?ld(i,e):zs(i,e);break;case 7:t===T.ADDRESS||t===T.ARTICLE||t===T.DETAILS||t===T.SECTION||t===T.SUMMARY||t===T.LISTING?ad(i,e):t===T.MARQUEE?tW(i,e):zs(i,e);break;case 8:t===T.FIELDSET?ad(i,e):t===T.TEMPLATE?Su(i,e):zs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?ad(i,e):zs(i,e);break;default:zs(i,e)}}function Wl(i,e){i.tmplInsertionModeStackTop>-1?hW(i,e):i.stopped=!0}function ode(i,e){e.tagName===T.SCRIPT&&(i.pendingScript=i.openElements.current),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function sde(i,e){i._err(wr.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i._processToken(e)}function jl(i,e){let t=i.openElements.currentTagName;t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR?(i.pendingCharacterTokens=[],i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=sW,i._processToken(e)):ps(i,e)}function ade(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,tt.HTML),i.insertionMode=z5}function lde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=j1}function cde(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.COLGROUP),i.insertionMode=j1,i._processToken(e)}function dde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=ms}function ude(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.TBODY),i.insertionMode=ms,i._processToken(e)}function hde(i,e){i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode(),i._processToken(e))}function fde(i,e){let t=q.getTokenAttr(e,iW.TYPE);t&&t.toLowerCase()===nW?i._appendElement(e,tt.HTML):ps(i,e),e.ackSelfClosing=!0}function pde(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,tt.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function zx(i,e){let t=e.tagName;switch(t.length){case 2:t===T.TD||t===T.TH||t===T.TR?ude(i,e):ps(i,e);break;case 3:t===T.COL?cde(i,e):ps(i,e);break;case 4:t===T.FORM?pde(i,e):ps(i,e);break;case 5:t===T.TABLE?hde(i,e):t===T.STYLE?cr(i,e):t===T.TBODY||t===T.TFOOT||t===T.THEAD?dde(i,e):t===T.INPUT?fde(i,e):ps(i,e);break;case 6:t===T.SCRIPT?cr(i,e):ps(i,e);break;case 7:t===T.CAPTION?ade(i,e):ps(i,e);break;case 8:t===T.COLGROUP?lde(i,e):t===T.TEMPLATE?cr(i,e):ps(i,e);break;default:ps(i,e)}}function Ux(i,e){let t=e.tagName;t===T.TABLE?i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode()):t===T.TEMPLATE?Su(i,e):t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP&&t!==T.HTML&&t!==T.TBODY&&t!==T.TD&&t!==T.TFOOT&&t!==T.TH&&t!==T.THEAD&&t!==T.TR&&ps(i,e)}function ps(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,i._processTokenInBodyMode(e),i.fosterParentingEnabled=t}function mde(i,e){i.pendingCharacterTokens.push(e)}function gde(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function F1(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t<i.pendingCharacterTokens.length;t++)ps(i,i.pendingCharacterTokens[t]);else for(;t<i.pendingCharacterTokens.length;t++)i._insertCharacters(i.pendingCharacterTokens[t]);i.insertionMode=i.originalInsertionMode,i._processToken(e)}function vde(i,e){let t=e.tagName;t===T.CAPTION||t===T.COL||t===T.COLGROUP||t===T.TBODY||t===T.TD||t===T.TFOOT||t===T.TH||t===T.THEAD||t===T.TR?i.openElements.hasInTableScope(T.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(T.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=Br,i._processToken(e)):go(i,e)}function _de(i,e){let t=e.tagName;t===T.CAPTION||t===T.TABLE?i.openElements.hasInTableScope(T.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(T.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=Br,t===T.TABLE&&i._processToken(e)):t!==T.BODY&&t!==T.COL&&t!==T.COLGROUP&&t!==T.HTML&&t!==T.TBODY&&t!==T.TD&&t!==T.TFOOT&&t!==T.TH&&t!==T.THEAD&&t!==T.TR&&Bx(i,e)}function bde(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.COL?(i._appendElement(e,tt.HTML),e.ackSelfClosing=!0):t===T.TEMPLATE?cr(i,e):P5(i,e)}function yde(i,e){let t=e.tagName;t===T.COLGROUP?i.openElements.currentTagName===T.COLGROUP&&(i.openElements.pop(),i.insertionMode=Br):t===T.TEMPLATE?Su(i,e):t!==T.COL&&P5(i,e)}function P5(i,e){i.openElements.currentTagName===T.COLGROUP&&(i.openElements.pop(),i.insertionMode=Br,i._processToken(e))}function Cde(i,e){let t=e.tagName;t===T.TR?(i.openElements.clearBackToTableBodyContext(),i._insertElement(e,tt.HTML),i.insertionMode=Vl):t===T.TH||t===T.TD?(i.openElements.clearBackToTableBodyContext(),i._insertFakeElement(T.TR),i.insertionMode=Vl,i._processToken(e)):t===T.CAPTION||t===T.COL||t===T.COLGROUP||t===T.TBODY||t===T.TFOOT||t===T.THEAD?i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Br,i._processToken(e)):zx(i,e)}function Sde(i,e){let t=e.tagName;t===T.TBODY||t===T.TFOOT||t===T.THEAD?i.openElements.hasInTableScope(t)&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Br):t===T.TABLE?i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=Br,i._processToken(e)):(t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP||t!==T.HTML&&t!==T.TD&&t!==T.TH&&t!==T.TR)&&Ux(i,e)}function wde(i,e){let t=e.tagName;t===T.TH||t===T.TD?(i.openElements.clearBackToTableRowContext(),i._insertElement(e,tt.HTML),i.insertionMode=U5,i.activeFormattingElements.insertMarker()):t===T.CAPTION||t===T.COL||t===T.COLGROUP||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR?i.openElements.hasInTableScope(T.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=ms,i._processToken(e)):zx(i,e)}function xde(i,e){let t=e.tagName;t===T.TR?i.openElements.hasInTableScope(T.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=ms):t===T.TABLE?i.openElements.hasInTableScope(T.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=ms,i._processToken(e)):t===T.TBODY||t===T.TFOOT||t===T.THEAD?(i.openElements.hasInTableScope(t)||i.openElements.hasInTableScope(T.TR))&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=ms,i._processToken(e)):(t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP||t!==T.HTML&&t!==T.TD&&t!==T.TH)&&Ux(i,e)}function Ede(i,e){let t=e.tagName;t===T.CAPTION||t===T.COL||t===T.COLGROUP||t===T.TBODY||t===T.TD||t===T.TFOOT||t===T.TH||t===T.THEAD||t===T.TR?(i.openElements.hasInTableScope(T.TD)||i.openElements.hasInTableScope(T.TH))&&(i._closeTableCell(),i._processToken(e)):go(i,e)}function Tde(i,e){let t=e.tagName;t===T.TD||t===T.TH?i.openElements.hasInTableScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=Vl):t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR?i.openElements.hasInTableScope(t)&&(i._closeTableCell(),i._processToken(e)):t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP&&t!==T.HTML&&Bx(i,e)}function dW(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.OPTION?(i.openElements.currentTagName===T.OPTION&&i.openElements.pop(),i._insertElement(e,tt.HTML)):t===T.OPTGROUP?(i.openElements.currentTagName===T.OPTION&&i.openElements.pop(),i.openElements.currentTagName===T.OPTGROUP&&i.openElements.pop(),i._insertElement(e,tt.HTML)):t===T.INPUT||t===T.KEYGEN||t===T.TEXTAREA||t===T.SELECT?i.openElements.hasInSelectScope(T.SELECT)&&(i.openElements.popUntilTagNamePopped(T.SELECT),i._resetInsertionMode(),t!==T.SELECT&&i._processToken(e)):(t===T.SCRIPT||t===T.TEMPLATE)&&cr(i,e)}function uW(i,e){let t=e.tagName;if(t===T.OPTGROUP){let n=i.openElements.items[i.openElements.stackTop-1],r=n&&i.treeAdapter.getTagName(n);i.openElements.currentTagName===T.OPTION&&r===T.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagName===T.OPTGROUP&&i.openElements.pop()}else t===T.OPTION?i.openElements.currentTagName===T.OPTION&&i.openElements.pop():t===T.SELECT&&i.openElements.hasInSelectScope(T.SELECT)?(i.openElements.popUntilTagNamePopped(T.SELECT),i._resetInsertionMode()):t===T.TEMPLATE&&Su(i,e)}function kde(i,e){let t=e.tagName;t===T.CAPTION||t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR||t===T.TD||t===T.TH?(i.openElements.popUntilTagNamePopped(T.SELECT),i._resetInsertionMode(),i._processToken(e)):dW(i,e)}function Ide(i,e){let t=e.tagName;t===T.CAPTION||t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR||t===T.TD||t===T.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(T.SELECT),i._resetInsertionMode(),i._processToken(e)):uW(i,e)}function Ade(i,e){let t=e.tagName;if(t===T.BASE||t===T.BASEFONT||t===T.BGSOUND||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.SCRIPT||t===T.STYLE||t===T.TEMPLATE||t===T.TITLE)cr(i,e);else{let n=hce[t]||Pa;i._popTmplInsertionMode(),i._pushTmplInsertionMode(n),i.insertionMode=n,i._processToken(e)}}function Lde(i,e){e.tagName===T.TEMPLATE&&Su(i,e)}function hW(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode(),i._processToken(e)):i.stopped=!0}function Mde(i,e){e.tagName===T.HTML?go(i,e):F5(i,e)}function Dde(i,e){e.tagName===T.HTML?i.fragmentContext||(i.insertionMode=lW):F5(i,e)}function F5(i,e){i.insertionMode=Pa,i._processToken(e)}function Nde(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.FRAMESET?i._insertElement(e,tt.HTML):t===T.FRAME?(i._appendElement(e,tt.HTML),e.ackSelfClosing=!0):t===T.NOFRAMES&&cr(i,e)}function Rde(i,e){e.tagName===T.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagName!==T.FRAMESET&&(i.insertionMode=aW))}function Ode(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.NOFRAMES&&cr(i,e)}function Pde(i,e){e.tagName===T.HTML&&(i.insertionMode=cW)}function Fde(i,e){e.tagName===T.HTML?go(i,e):N5(i,e)}function N5(i,e){i.insertionMode=Pa,i._processToken(e)}function Hde(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.NOFRAMES&&cr(i,e)}function Bde(i,e){e.chars=ace.REPLACEMENT_CHARACTER,i._insertCharacters(e)}function zde(i,e){i._insertCharacters(e),i.framesetOk=!1}function Ude(i,e){if(Oa.causesExit(e)&&!i.fragmentContext){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==tt.HTML&&!i._isIntegrationPoint(i.openElements.current);)i.openElements.pop();i._processToken(e)}else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===tt.MATHML?Oa.adjustTokenMathMLAttrs(e):n===tt.SVG&&(Oa.adjustTokenSVGTagName(e),Oa.adjustTokenSVGAttrs(e)),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function Wde(i,e){for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===tt.HTML){i._processToken(e);break}if(i.treeAdapter.getTagName(n).toLowerCase()===e.tagName){i.openElements.popUntilElementPopped(n);break}}}});var DW=gt((cEe,MW)=>{var kW=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aue=/\n/g,lue=/^\s*/,cue=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,due=/^:\s*/,uue=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hue=/^[;\s]*/,fue=/^\s+|\s+$/g,pue=`
|
|
`,IW="/",AW="*",Eu="",mue="comment",gue="declaration";MW.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(g){var b=g.match(aue);b&&(t+=b.length);var S=g.lastIndexOf(pue);n=~S?g.length-S:n+g.length}function o(){var g={line:t,column:n};return function(b){return b.position=new s(g),d(),b}}function s(g){this.start=g,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(g){var b=new Error(e.source+":"+t+":"+n+": "+g);if(b.reason=g,b.filename=e.source,b.line=t,b.column=n,b.source=i,e.silent)a.push(b);else throw b}function c(g){var b=g.exec(i);if(b){var S=b[0];return r(S),i=i.slice(S.length),b}}function d(){c(lue)}function u(g){var b;for(g=g||[];b=h();)b!==!1&&g.push(b);return g}function h(){var g=o();if(!(IW!=i.charAt(0)||AW!=i.charAt(1))){for(var b=2;Eu!=i.charAt(b)&&(AW!=i.charAt(b)||IW!=i.charAt(b+1));)++b;if(b+=2,Eu===i.charAt(b-1))return l("End of comment missing");var S=i.slice(2,b-2);return n+=2,r(S),i=i.slice(b),n+=2,g({type:mue,comment:S})}}function p(){var g=o(),b=c(cue);if(b){if(h(),!c(due))return l("property missing ':'");var S=c(uue),k=g({type:gue,property:LW(b[0].replace(kW,Eu)),value:S?LW(S[0].replace(kW,Eu)):Eu});return c(hue),k}}function m(){var g=[];u(g);for(var b;b=p();)b!==!1&&(g.push(b),u(g));return g}return d(),m()};function LW(i){return i?i.replace(fue,Eu):Eu}});var RW=gt((dEe,NW)=>{var vue=DW();function _ue(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=vue(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}NW.exports=_ue});var eK=M(()=>{});var tK=M(()=>{eK()});var Gpe,$pe,D4,N4,ic,l6,c6,d6,u6,h6=M(()=>{Mo();Sl();gl();tK();Ze();Mn();jt();De();ft();Gpe=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},$pe=function(i,e){return function(t,n){e(t,n,i)}},D4=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N4=new nt("selectionAnchorSet",!1),ic=class iK{static get(e){return e.getContribution(iK.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=N4.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(je.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new sn().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Ni(v("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(je.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()}};ic.ID="editor.contrib.selectionAnchorController";ic=Gpe([$pe(1,Ke)],ic);l6=class extends se{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2080),weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.setSelectionAnchor()})}},c6=class extends se{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:N4})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},d6=class extends se{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:N4,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2089),weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},u6=class extends se{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:N4,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Ae(ic.ID,ic,4);X(l6);X(c6);X(d6);X(u6)});var nK=M(()=>{});var rK=M(()=>{nK()});var Ype,f6,p6,m6,g6,qa,v6=M(()=>{Dt();Ce();rK();Ze();ri();qe();Mn();jt();Kc();qn();De();Yi();_r();ar();Ype=Oe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),f6=class extends se{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=qa.get(t))===null||n===void 0||n.jumpToBracket()}},p6=class extends se{constructor(){super({id:"editor.action.selectToBracket",label:v("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=qa.get(t))===null||r===void 0||r.selectToBracket(o)}},m6=class extends se{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=qa.get(t))===null||n===void 0||n.removeBrackets(this.id)}},g6=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},qa=class i extends oe{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 ti(()=>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 je(s.lineNumber,s.column,s.lineNumber,s.column):new je(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(P.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let u=a;a=l,l=u}}a&&l&&n.push(new je(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 u=0,h=e.length;u<h;u++){let p=e[u];p.isEmpty()&&(o[s++]=p.getStartPosition())}o.length>1&&o.sort(Se.compare);let a=[],l=0,c=0,d=r.length;for(let u=0,h=o.length;u<h;u++){let p=o[u];for(;c<d&&r[c].position.isBefore(p);)c++;if(c<d&&r[c].position.equals(p))a[l++]=r[c];else{let m=t.bracketPairs.matchBracket(p,20),g=i._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(p,20),g=i._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new g6(p,m,g)}}this._lastBracketsData=a,this._lastVersionId=n}};qa.ID="editor.contrib.bracketMatchingController";qa._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=ct.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:vi(Ype),position:$r.Center}});qa._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=ct.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});Ae(qa.ID,qa,1);X(p6);X(f6);X(m6);rs.appendMenuItem(xe.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:v({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})});var R4,oK=M(()=>{qe();Mn();R4=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 P(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,o,n,o),a)}else{let s=new P(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new je(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new je(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var O4,_6,b6,y6=M(()=>{Ze();jt();oK();De();O4=class extends se{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 R4(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},_6=class extends O4{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:v("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:O.writable})}},b6=class extends O4{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:v("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:O.writable})}};X(_6);X(b6)});var C6,S6=M(()=>{Ze();x_();are();qe();jt();De();C6=class extends se{constructor(){super({id:"editor.action.transposeLetters",label:v("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:O.writable,kbOpts:{kbExpr:O.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():E_.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=E_.leftPosition(n,d),h=E_.leftPosition(n,u),p=n.getValueInRange(P.fromPositions(h,u)),m=n.getValueInRange(P.fromPositions(u,d)),g=P.fromPositions(h,d);r.push(new _l(g,m+p))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};X(C6)});function E6(i){return i.register(),i}function aK(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(Zt).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)))}var Xpe,Du,Qpe,sK,Jpe,Zpe,eme,w6,x6,T6=M(()=>{JS();nr();Are();Ze();Lr();jt();De();Yi();$m();ft();Xpe=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Du="9_cutcopypaste",Qpe=Rc||document.queryCommandSupported("cut"),sK=Rc||document.queryCommandSupported("copy"),Jpe=typeof navigator.clipboard=="undefined"||XN?document.queryCommandSupported("paste"):!0;Zpe=Qpe?E6(new S_({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Rc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1}]})):void 0,eme=sK?E6(new S_({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Rc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;rs.appendMenuItem(xe.MenubarEditMenu,{submenu:xe.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:Du,order:3});rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:ce.and(ce.notEquals("resourceScheme","output"),O.editorTextFocus)});rs.appendMenuItem(xe.EditorTitleContext,{submenu:xe.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});rs.appendMenuItem(xe.ExplorerContext,{submenu:xe.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});w6=Jpe?E6(new S_({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Rc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4}]})):void 0,x6=class extends se{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(kw.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),kw.forceCopyWithSyntaxHighlighting=!1)}};aK(Zpe,"cut");aK(eme,"copy");w6&&(w6.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(Zt),n=i.get(Ms),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&h_?(()=>Xpe(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=iP.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}),w6.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));sK&&X(x6)});function lK(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>dK(e,t,i.include))||!i.includeSourceActions&&Qe.Source.contains(e))}function cK(i,e){let t=e.kind?new Qe(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>dK(t,n,i.include))||!i.includeSourceActions&&t&&Qe.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function dK(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var tme,Qe,Xn,md,P4,gd=M(()=>{At();tme=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Qe=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)}};Qe.sep=".";Qe.None=new Qe("@@none@@");Qe.Empty=new Qe("");Qe.QuickFix=new Qe("quickfix");Qe.Refactor=new Qe("refactor");Qe.RefactorExtract=Qe.Refactor.append("extract");Qe.RefactorInline=Qe.Refactor.append("inline");Qe.RefactorMove=Qe.Refactor.append("move");Qe.RefactorRewrite=Qe.Refactor.append("rewrite");Qe.Source=new Qe("source");Qe.SourceOrganizeImports=Qe.Source.append("organizeImports");Qe.SourceFixAll=Qe.Source.append("fixAll");Qe.SurroundWith=Qe.Refactor.append("surround");(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"})(Xn||(Xn={}));md=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 Qe(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}},P4=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return tme(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){Ut(r)}n&&(this.action.edit=n.edit)}return this})}}});function l0(i,e,t,n,r,o){var s;return F4(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 oP(e,o),d=ime(i,e,a),u=new ne,h=d.map(m=>F4(this,void 0,void 0,function*(){try{r.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return uK;let b=((g==null?void 0:g.actions)||[]).filter(k=>k&&cK(a,k)),S=rme(m,b,a.include);return{actions:b.map(k=>new P4(k,m)),documentation:S}}catch(g){if(es(g))throw g;return Ut(g),uK}})),p=i.onDidChange(()=>{let m=i.all(e);ha(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(S=>S.actions).flat(),b=[...vr(m.map(S=>S.documentation)),...nme(i,e,n,g)];return new k6(g,b,u)}finally{p.dispose(),c.dispose()}})}function ime(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>lK(t,new Qe(r))):!0)}function*nme(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 rme(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Qe(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 Qe(r.kind)))return o.command}}function hK(i,e,t,n,r=et.None){var o;return F4(this,void 0,void 0,function*(){let s=i.get(qc),a=i.get(ui),l=i.get(Dr),c=i.get(Ei);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!==o0.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 u=ome(d);c.error(typeof u=="string"?u:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function ome(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var F4,H4,Gf,B4,z4,U4,s0,a0,k6,uK,o0,Nu=M(()=>{oi();gi();At();Ce();Sn();Qm();qe();Mn();xt();is();lu();De();zi();Oo();Gc();Bc();gd();F4=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},H4="editor.action.codeAction",Gf="editor.action.quickFix",B4="editor.action.autoFix",z4="editor.action.refactor",U4="editor.action.sourceAction",s0="editor.action.organizeImports",a0="editor.action.fixAll",k6=class i extends oe{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Wi(e.diagnostics)?Wi(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Wi(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&&Qe.QuickFix.contains(new Qe(e.kind))&&!!e.isPreferred)}},uK={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(o0||(o0={}));St.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return F4(this,void 0,void 0,function*(){if(!(e instanceof ht))throw Ao();let{codeActionProvider:o}=i.get(be),s=i.get(Si).getModel(e);if(!s)throw Ao();let a=je.isISelection(t)?je.liftSelection(t):P.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Ao();let l=typeof n=="string"?new Qe(n):void 0,c=yield l0(o,s,a,{type:1,triggerAction:Xn.Default,filter:{includeSourceActions:!0,include:l}},wa.None,et.None),d=[],u=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;h<u;h++)d.push(c.validActions[h].resolve(et.None));try{return yield Promise.all(d),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var sme,ame,c0,pK=M(()=>{nw();Nu();gd();Gn();sme=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},ame=function(i,e){return function(t,n){e(t,n,i)}},c0=class fK{constructor(e){this.keybindingService=e}getResolver(){let e=new Xh(()=>this.keybindingService.getKeybindings().filter(t=>fK.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===s0?n={kind:Qe.SourceOrganizeImports.value}:t.command===a0&&(n={kind:Qe.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},md.fromUser(n,{kind:Qe.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 Qe(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)}};c0.codeActionCommands=[z4,H4,U4,s0,a0];c0=sme([ame(0,Bt)],c0)});var mK=M(()=>{});var gK=M(()=>{mK()});var vK=M(()=>{});var _K=M(()=>{vK()});var d0=M(()=>{gK();_K()});var bK=M(()=>{});var yK=M(()=>{bK()});var wIe,xIe,EIe,TIe,kIe,IIe,AIe,LIe,MIe,DIe,NIe,RIe,OIe,PIe,FIe,HIe,BIe,zIe,UIe,WIe,jIe,VIe,KIe,qIe,GIe,$Ie,YIe,XIe,QIe,JIe,ZIe,eAe,tAe,W4=M(()=>{yK();De();_r();wIe=Oe("symbolIcon.arrayForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xIe=Oe("symbolIcon.booleanForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),EIe=Oe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),TIe=Oe("symbolIcon.colorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kIe=Oe("symbolIcon.constantForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IIe=Oe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),AIe=Oe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),LIe=Oe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),MIe=Oe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),DIe=Oe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),NIe=Oe("symbolIcon.fileForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),RIe=Oe("symbolIcon.folderForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),OIe=Oe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),PIe=Oe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),FIe=Oe("symbolIcon.keyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),HIe=Oe("symbolIcon.keywordForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),BIe=Oe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zIe=Oe("symbolIcon.moduleForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),UIe=Oe("symbolIcon.namespaceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),WIe=Oe("symbolIcon.nullForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jIe=Oe("symbolIcon.numberForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),VIe=Oe("symbolIcon.objectForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),KIe=Oe("symbolIcon.operatorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qIe=Oe("symbolIcon.packageForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),GIe=Oe("symbolIcon.propertyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$Ie=Oe("symbolIcon.referenceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),YIe=Oe("symbolIcon.snippetForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),XIe=Oe("symbolIcon.stringForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),QIe=Oe("symbolIcon.structForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),JIe=Oe("symbolIcon.textForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ZIe=Oe("symbolIcon.typeParameterForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eAe=Oe("symbolIcon.unitForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tAe=Oe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function SK(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:CK,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=lme.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Qe(o.action.kind):Qe.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}var CK,lme,wK=M(()=>{d0();or();gd();W4();De();CK=Object.freeze({kind:Qe.Empty,title:v("codeAction.widget.id.more","More Actions...")}),lme=Object.freeze([{kind:Qe.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Qe.RefactorExtract,title:v("codeAction.widget.id.extract","Extract..."),icon:lt.wrench},{kind:Qe.RefactorInline,title:v("codeAction.widget.id.inline","Inline..."),icon:lt.wrench},{kind:Qe.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite..."),icon:lt.wrench},{kind:Qe.RefactorMove,title:v("codeAction.widget.id.move","Move..."),icon:lt.wrench},{kind:Qe.SurroundWith,title:v("codeAction.widget.id.surround","Surround With..."),icon:lt.symbolSnippet},{kind:Qe.Source,title:v("codeAction.widget.id.source","Source Action..."),icon:lt.symbolFile},CK])});var xK=M(()=>{});var EK=M(()=>{xK()});var cme,dme,$f,rc,I6=M(()=>{Ht();lP();or();qt();Ce();qr();Mi();EK();KO();Nu();De();Gn();cme=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},dme=function(i,e){return function(t,n){e(t,n,i)}};(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})($f||($f={}));rc=class TK extends oe{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new $e),this.onClick=this._onClick.event,this._state=$f.Hidden,this._domNode=fe("div.lightBulbWidget"),this._register(J_.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(oR(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(Rt(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(li.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=Un((n=t.lookupKeybinding(B4))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Un((r=t.lookupKeybinding(Gf))===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),u=Km(d,l),h=c.spaceWidth*u>22,p=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!p(s-1))m-=1;else if(!p(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new $f.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:TK._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==$f.Hidden&&(this.state=$f.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(...mt.asClassNameArray(lt.lightBulb)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...mt.asClassNameArray(lt.lightbulbAutofix)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};rc.ID="editor.contrib.lightbulbWidget";rc._posPref=[0];rc=cme([dme(1,Bt)],rc)});var kK=M(()=>{});var IK=M(()=>{kK()});var ume,hme,Qn,fme,j4,u0=M(()=>{Mo();Dt();Ce();IK();Ze();qe();De();ft();ume=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},hme=function(i,e){return function(t,n){e(t,n,i)}},Qn=class A6{static get(e){return e.getContribution(A6.ID)}constructor(e,t){this._messageWidget=new Bi,this._messageListeners=new ne,this._editor=e,this._visible=A6.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ni(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new j4(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 as(()=>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 P(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(j4.fadeOut(this._messageWidget.value))}};Qn.ID="editor.contrib.messageController";Qn.MESSAGE_VISIBLE=new nt("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));Qn=ume([hme(1,Ke)],Qn);fme=xi.bindToContribution(Qn.get);Me(new fme({id:"leaveEditorMessage",precondition:Qn.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));j4=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)}};Ae(Qn.ID,Qn,4)});var AK=M(()=>{});var L6=M(()=>{AK()});function MK(i){return i.replace(/\r\n|\r|\n/g," ")}var LK,M6,O6,P6,D6,N6,R6,V4,K4,DK=M(()=>{Ht();_P();gP();or();Ce();nr();qr();L6();De();Tl();Gn();nb();_r();LK=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},M6=function(i,e){return function(t,n){e(t,n,i)}},O6="acceptSelectedCodeAction",P6="previewSelectedCodeAction",D6=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){}},N6=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 ib(e,f_);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=mt.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=ga(e.group.icon.color.id))):(n.icon.className=mt.asClassName(lt.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=MK(e.label),n.keybinding.set(e.keybinding),uR(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(O6))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(P6))===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=v({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=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};N6=LK([M6(1,Bt)],N6);R6=class extends UIEvent{constructor(){super("acceptSelectedAction")}},V4=class extends UIEvent{constructor(){super("previewSelectedAction")}},K4=class extends oe{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 tb(e,this.domNode,a,[new N6(t,this._keybindingService),new D6],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?MK(l==null?void 0:l.label):"";return l.disabled&&(c=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(yP),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 u=document.getElementById(this._list.getElementID(d));if(u){u.style.width="auto";let h=u.getBoundingClientRect().width;return u.style.width="",h}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 V4:new R6;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 V4):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([])}};K4=LK([M6(4,$c),M6(5,Bt)],K4)});var pme,F6,Ru,vd,Ou,h0,NK=M(()=>{Ht();gf();Ce();L6();De();DK();Yi();ft();Tl();bl();Et();pme=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},F6=function(i,e){return function(t,n){e(t,n,i)}},Ru={Visible:new nt("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},vd=rr("actionWidgetService"),Ou=class extends oe{get isVisible(){return Ru.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Bi)}show(e,t,n,r,o,s,a){let l=Ru.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(K4,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 ne,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Rt(l,on.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(Rt(d,on.POINTER_MOVE,()=>d.remove())),s.add(Rt(d,on.MOUSE_DOWN,()=>d.remove()));let u=0;if(n.length){let m=this._createActionBar(".action-widget-action-bar",n);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(r=this._list.value)===null||r===void 0?void 0:r.layout(u);o.style.width=`${h}px`;let p=s.add(Ts(e));return s.add(p.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=fe(e),r=new Po(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)}};Ou=pme([F6(0,$c),F6(1,Ke),F6(2,He)],Ou);sr(vd,Ou,1);h0=100+1e3;mi(class extends os{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Ru.Visible,keybinding:{weight:h0,primary:9,secondary:[1033]}})}run(i){i.get(vd).hide()}});mi(class extends os{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(vd);e instanceof Ou&&e.focusPrevious()}});mi(class extends os{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(vd);e instanceof Ou&&e.focusNext()}});mi(class extends os{constructor(){super({id:O6,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:3,secondary:[2137]}})}run(i){let e=i.get(vd);e instanceof Ou&&e.acceptSelected()}});mi(class extends os{constructor(){super({id:P6,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:2051}})}run(i){let e=i.get(vd);e instanceof Ou&&e.acceptSelected(!0)}})});var H6,mme,Yf,z6,B6,Pu,gme,q4,U6=M(()=>{Dt();At();qt();Ce();lo();ft();Gc();gd();Nu();H6=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)},mme=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},z6=new nt("supportedCodeAction",""),B6=class extends oe{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new as),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=>nf(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Xn.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}};(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(es(s))return gme;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Pu||(Pu={}));gme=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),q4=class extends oe{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new Bi),this._state=Pu.Empty,this._onDidChangeState=this._register(new $e),this.onDidChangeState=this._onDidChangeState.event,Yf.set(this,!1),this._supportedCodeActions=z6.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(){H6(this,Yf,"f")||(mme(this,Yf,!0,"f"),super.dispose(),this.setState(Pu.Empty,!0))}_update(){if(H6(this,Yf,"f"))return;this._codeActionOracle.value=void 0,this.setState(Pu.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 B6(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Pu.Empty);return}let o=Vt(s=>l0(this._registry,e,n.selection,n.trigger,wa.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Pu.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Xn.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&&!H6(this,Yf,"f")&&this._onDidChangeState.fire(e))}};Yf=new WeakMap});var vme,oc,G4,_me,bme,$4,Ga,Y4=M(()=>{Ht();At();nw();Ce();ri();xt();Nu();pK();wK();I6();u0();De();NK();zi();jn();ft();Et();rb();Gc();gd();U6();vme=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},oc=function(i,e){return function(t,n){e(t,n,i)}},G4=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},_me=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},bme=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)},Ga=class RK extends oe{static get(e){return e.getContribution(RK.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 Bi),this._showDisabled=!1,$4.set(this,!1),this._editor=e,this._model=this._register(new q4(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new Xh(()=>{let u=this._editor.getContribution(rc.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=r.createInstance(c0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){_me(this,$4,!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=Qn.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 G4(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(hK,e,o0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Xn.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return G4(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){at(d);return}if(!bme(this,$4,"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 u=this.tryGetValidActionToApply(e.trigger,c);if(u){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(u,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(h&&h.action.disabled){(s=Qn.get(this._editor))===null||s===void 0||s.showMessage(h.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=Qn.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 G4(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=Se.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>G4(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,SK(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:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};$4=new WeakMap;Ga.ID="editor.contrib.codeActionController";Ga=vme([oc(1,e1),oc(2,Ke),oc(3,He),oc(4,be),oc(5,El),oc(6,ui),oc(7,Mt),oc(8,vd),oc(9,He)],Ga)});function f0(i){return ce.regex(z6.keys()[0],new RegExp("(\\s|^)"+vl(i.value)+"\\b"))}function Fu(i,e,t,n,r=Xn.Default){if(i.hasModel()){let o=Ga.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var W6,X4,Q4,J4,Z4,ey,ty,iy,OK=M(()=>{wi();Ze();jt();Nu();De();ft();gd();Y4();U6();W6={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};X4=class extends se{constructor(){super({id:Gf,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:2137,weight:100}})}run(e,t){return Fu(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Xn.QuickFix)}},Q4=class extends xi{constructor(){super({id:H4,precondition:ce.and(O.writable,O.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:W6}]}})}runEditorCommand(e,t,n){let r=md.fromUser(n,{kind:Qe.Empty,apply:"ifSingle"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},J4=class extends se{constructor(){super({id:z4,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ce.and(O.writable,f0(Qe.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:W6}]}})}run(e,t,n){let r=md.fromUser(n,{kind:Qe.Refactor,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:Qe.Refactor.contains(r.kind)?r.kind:Qe.None,onlyIncludePreferredActions:r.preferred},r.apply,Xn.Refactor)}},Z4=class extends se{constructor(){super({id:U4,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ce.and(O.writable,f0(Qe.Source))},description:{description:"Source Action...",args:[{name:"args",schema:W6}]}})}run(e,t,n){let r=md.fromUser(n,{kind:Qe.Source,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:Qe.Source.contains(r.kind)?r.kind:Qe.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Xn.SourceAction)}},ey=class extends se{constructor(){super({id:s0,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ce.and(O.writable,f0(Qe.SourceOrganizeImports)),kbOpts:{kbExpr:O.textInputFocus,primary:1581,weight:100}})}run(e,t){return Fu(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:Qe.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Xn.OrganizeImports)}},ty=class extends se{constructor(){super({id:a0,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:ce.and(O.writable,f0(Qe.SourceFixAll))})}run(e,t){return Fu(t,v("fixAll.noneMessage","No fix all action available"),{include:Qe.SourceFixAll,includeSourceActions:!0},"ifSingle",Xn.FixAll)}},iy=class extends se{constructor(){super({id:B4,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ce.and(O.writable,f0(Qe.QuickFix)),kbOpts:{kbExpr:O.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Fu(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Qe.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Xn.AutoFix)}}});var j6=M(()=>{Ze();Lre();OK();Y4();I6();De();jR();Hc();Ae(Ga.ID,Ga,3);Ae(rc.ID,rc,4);X(X4);X(J4);X(Z4);X(ey);X(iy);X(ty);Me(new Q4);Mr.as(A_.Configuration).registerConfiguration(Object.assign(Object.assign({},rP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});var sc,V6=M(()=>{xa();ri();qe();Mn();sc=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,u=o.getLineContent(a),h=o.getLineContent(c),p=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(n,d-1-n.length);if(p!==-1&&m!==-1)if(a===c)u.substring(p+t.length,m).indexOf(n)>=0&&(p=-1,m=-1);else{let b=u.substring(p+t.length),S=h.substring(0,m);(b.indexOf(n)>=0||S.indexOf(n)>=0)&&(p=-1,m=-1)}let g;p!==-1&&m!==-1?(r&&p+t.length<u.length&&u.charCodeAt(p+t.length)===32&&(t=t+" "),r&&m>0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=i._createRemoveBlockCommentOperations(new P(a,p+t.length+1,c,m+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let b of g)s.addTrackedEditOperation(b.range,b.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return P.isEmpty(e)?r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Kt.delete(new P(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return P.isEmpty(e)?o.push(Kt.replace(new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(Kt.insert(new Se(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Kt.insert(new Se(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 je(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 je(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}});var ny,PK=M(()=>{wi();xa();ri();qe();Mn();V6();ny=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 u=0,h=r.length;u<h;u++){let p=r[u],m=o+u;if(m===o&&a){p.ignore=!0;continue}let g=n.getLineContent(m),b=Lm(g);if(b===-1){p.ignore=s,p.commentStrOffset=g.length;continue}if(c=!1,p.ignore=!1,p.commentStrOffset=b,d&&!sc._haystackHasNeedleAtOffset(g,p.commentStr,b)&&(e===0?d=!1:e===1||(p.ignore=!0)),d&&t){let S=b+p.commentStrLength;S<g.length&&g.charCodeAt(S)===32&&(p.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let u=0,h=r.length;u<h;u++)r[u].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 Se(r.positionLineNumber,r.positionColumn);for(let a=0,l=o.length;a<l;a++)t.addEditOperation(o[a].range,o[a].text),P.isEmpty(o[a].range)&&P.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?sc._createRemoveBlockCommentOperations(new P(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=Lm(c);d===-1&&(d=c.length),l=sc._createAddBlockCommentOperations(new P(n.startLineNumber,d+1,n.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=sc._createAddBlockCommentOperations(new P(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 P(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 je(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(Kt.delete(new P(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(Kt.insert(new Se(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),u=0;for(let h=0,p=t[l].commentStrOffset;u<o&&h<p;h++)u=i.nextVisibleColumn(u,r,d.charCodeAt(h)===9,1);u<o&&(o=u)}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),u=0;for(s=0,a=t[l].commentStrOffset;u<o&&s<a;s++)u=i.nextVisibleColumn(u,r,d.charCodeAt(s)===9,1);u>o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var p0,K6,q6,G6,$6,Y6=M(()=>{gl();Ze();qe();jt();Kn();V6();PK();De();Yi();p0=class extends se{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(Tt);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>P.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){let u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(let d of l)o.push(new ny(n,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},K6=class extends p0{constructor(){super(0,{id:"editor.action.commentLine",label:v("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"5_insert",title:v({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}},q6=class extends p0{constructor(){super(1,{id:"editor.action.addCommentLine",label:v("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2081),weight:100}})}},G6=class extends p0{constructor(){super(2,{id:"editor.action.removeCommentLine",label:v("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2099),weight:100}})}},$6=class extends se{constructor(){super({id:"editor.action.blockComment",label:v("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"5_insert",title:v({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){let n=e.get(Tt);if(!t.hasModel())return;let r=t.getOption(21),o=[],s=t.getSelections();for(let a of s)o.push(new sc(a,r.insertSpace,n));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}};X(K6);X(q6);X(G6);X($6)});var yme,Hu,Xf,X6,Q6=M(()=>{Ht();Hre();Pc();Ce();nr();Ze();jt();De();Yi();ft();Tl();Gn();jn();ob();yme=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)}},Xf=class FK{static get(e){return e.getContribution(FK.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 ne,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(),u=c.srcElement;u.shadowRoot&&cR(d)===u.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?xe.SimpleEditorContext:xe.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 Mm){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Am(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new ks)}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)&&!Tm;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 Lw(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});let a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new Lw(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()||EP(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 Am(`menu-action-${++n}`,c,d,void 0),s=(c,d,u,h,p)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let m=b=>()=>{this._configurationService.updateValue(u,b)},g=[];for(let b of p)g.push(r({label:b.label,checked:h===b.value,run:m(b.value)}));return o(c,g)},a=[];a.push(r({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ks),a.push(r({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:v("context.minimap.size.fill","Fill"),value:"fill"},{label:v("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(123)&&!Tm;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()}};Xf.ID="editor.contrib.contextmenu";Xf=yme([Hu(1,cs),Hu(2,$c),Hu(3,Ke),Hu(4,Bt),Hu(5,Is),Hu(6,Mt),Hu(7,kl)],Xf);X6=class extends se{constructor(){super({id:"editor.action.showContextMenu",label:v("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Xf.get(t))===null||n===void 0||n.showContextMenu()}};Ae(Xf.ID,Xf,2);X(X6)});var m0,g0,Bu,J6,Z6,eE=M(()=>{Ce();Ze();jt();De();m0=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}},g0=class{constructor(e,t,n){this.cursorState=e,this.scrollTop=t,this.scrollLeft=n}},Bu=class i extends oe{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 m0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new g0(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 g0(new m0(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 g0(new m0(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}};Bu.ID="editor.contrib.cursorUndoRedoController";J6=class extends se{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorUndo()}},Z6=class extends se{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorRedo()}};Ae(Bu.ID,Bu,0);X(J6);X(Z6)});var HK=M(()=>{});var BK=M(()=>{HK()});var ry,zK=M(()=>{qe();Mn();ry=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 P(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 je(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 je(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 je(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 je(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 je(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 Qf(i){return zn?i.altKey:i.ctrlKey}var zu,tE=M(()=>{Ce();nr();BK();Ze();ri();qe();Mn();qn();zK();zu=class i extends oe{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)||(Qf(e)&&(this._modifierPressed=!0),this._mouseDown&&Qf(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(Qf(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}Qf(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 Se(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 je(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new je(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Qf(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new ry(this._dragSelection,t,Qf(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 P(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()}};zu.ID="editor.contrib.dragAndDrop";zu.TRIGGER_KEY_VALUE=zn?6:5;zu._DECORATION_OPTIONS=ct.register({description:"dnd-target",className:"dnd-target"});Ae(zu.ID,zu,2)});var $a,UK=M(()=>{qe();Kc();qn();_r();ar();$a=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 P(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)),u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let p=1,m=e.length;p<m;p++){let g=e[p].range;h+d>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new P(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new P(u,1,h,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}};$a._CURRENT_FIND_MATCH_DECORATION=ct.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:vi(j_),position:$r.Center},minimap:{color:vi(Sw),position:pa.Inline}});$a._FIND_MATCH_DECORATION=ct.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:vi(j_),position:$r.Center},minimap:{color:vi(Sw),position:pa.Inline}});$a._FIND_MATCH_NO_OVERVIEW_DECORATION=ct.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});$a._FIND_MATCH_ONLY_OVERVIEW_DECORATION=ct.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:vi(j_),position:$r.Center}});$a._RANGE_HIGHLIGHT_DECORATION=ct.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});$a._FIND_SCOPE_DECORATION=ct.register({description:"find-scope",className:"findScope",isWholeLine:!0})});var oy,WK=M(()=>{qe();oy=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)=>P.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)}}});function iE(i,e){if(i&&i[0]!==""){let t=jK(i,e,"-"),n=jK(i,e,"_");return t&&!n?VK(i,e,"-"):!t&&n?VK(i,e,"_"):i[0].toUpperCase()===i[0]?e.toUpperCase():i[0].toLowerCase()===i[0]?e.toLowerCase():SR(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 jK(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function VK(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=iE([r[a]],s)+t}),o.slice(0,-1)}var KK=M(()=>{wi()});function qK(i){if(!i||i.length===0)return new Zf(null);let e=[],t=new rE(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()}var sy,nE,Zf,Jf,rE,GK=M(()=>{KK();sy=class{constructor(e){this.staticValue=e,this.kind=0}},nE=class{constructor(e){this.pieces=e,this.kind=1}},Zf=class i{static fromStaticValue(e){return new i([Jf.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new sy(""):e.length===1&&e[0].staticValue!==null?this._state=new sy(e[0].staticValue):this._state=new nE(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?iE(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 u=0,h=a.length;u<h;u++){if(d>=c){l.push(a.slice(u));break}switch(s.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}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}},Jf=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)}},rE=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++]=Jf.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Jf.caseOps(e,n),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Jf.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new Zf(this._result)}}});var Xa,LDe,ep,v0,_0,b0,y0,C0,S0,Gt,Ya,Cme,ay,w0=M(()=>{oi();Dt();Ce();x_();ri();qe();Mn();wre();UK();WK();GK();ft();Xa=new nt("findWidgetVisible",!1),LDe=Xa.toNegated(),ep=new nt("findInputFocussed",!1),v0=new nt("replaceInputFocussed",!1),_0={primary:545,mac:{primary:2593}},b0={primary:565,mac:{primary:2613}},y0={primary:560,mac:{primary:2608}},C0={primary:554,mac:{primary:2602}},S0={primary:558,mac:{primary:2606}},Gt={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"},Ya=19999,Cme=240,ay=class i{constructor(e,t){this._toDispose=new ne,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new as,this._decorations=new $a(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new ti(()=>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,Vi(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)},Cme)):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 P(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Ya);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=T_(r.map(l=>l.range),l=>P.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 Se(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()<Ya){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 Se(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 Se(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()<Ya){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 Se(a,l),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t);return n&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t)),u?!r&&!s.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,n,!0):u: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?qK(this._state.replaceString):Zf.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 _l(t,r);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new Se(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>=Ya?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new qO(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 u="mu";n.ignoreCase&&(u+="i"),n.global&&(u+="g"),n=new RegExp(n.source,u)}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 w_(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 oy(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 je(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}}}});var $K=M(()=>{});var YK=M(()=>{$K()});var x0,XK=M(()=>{Ht();YK();zre();Zm();Dt();w0();_r();x0=class i extends Ds{constructor(e,t,n){super(),this._hideSoon=this._register(new ti(()=>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:ga(z_),inputActiveOptionForeground:ga(W_),inputActiveOptionBackground:ga(U_)};this.caseSensitive=this._register(new kP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.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 IP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.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 AP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.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(Rt(this._domNode,on.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(Rt(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")}};x0.ID="editor.contrib.findOptionsWidget"});function ly(i,e){return i===1?!0:i===2?!1:e}var cy,QK=M(()=>{qt();Ce();qe();w0();cy=class extends oe{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ly(this._isRegexOverride,this._isRegex)}get wholeWord(){return ly(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ly(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ly(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 $e),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"&&(P.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(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(p=>!P.equalsRange(p,u))})||(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>=Ya}}});var JK=M(()=>{});var ZK=M(()=>{JK()});var Sme,wme,oE,dy,eq=M(()=>{Ht();TP();Ure();Zm();or();qt();Wre();De();Sme=v("defaultLabel","input"),wme=v("label.preserveCaseToggle","Preserve Case"),oE=class extends sb{constructor(e){super({icon:lt.preserveCase,title:wme+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},dy=class extends Ds{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new $e),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $e),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $e),this._onInput=this._register(new $e),this._onKeyUp=this._register(new $e),this._onPreserveCaseKeyDown=this._register(new $e),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||Sme;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 LP(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 oE(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let p=d.indexOf(document.activeElement);if(p>=0){let m=-1;h.equals(17)?m=(p+1)%d.length:h.equals(15)&&(p===0?m=d.length-1:m=p-1),h.equals(9)?(d[p].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),Jd.stop(h,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}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()}}});function oq(i,e){if(uy.includes(e))throw new Error("Cannot register the same widget multiple times");uy.push(e);let t=new ne,n=new nt(sE,!1).bindTo(i),r=new nt(nq,!0).bindTo(i),o=new nt(rq,!0).bindTo(i),s=()=>{n.set(!0),ac=e},a=()=>{n.set(!1),ac===e&&(ac=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Ft(()=>{uy.splice(uy.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var tq,iq,py,sE,nq,rq,ac,uy,hy,fy,aE=M(()=>{jre();eq();ft();lw();De();Ce();tq=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},iq=function(i,e){return function(t,n){e(t,n,i)}},py=new nt("suggestWidgetVisible",!1,v("suggestWidgetVisible","Whether suggestion are visible")),sE="historyNavigationWidgetFocus",nq="historyNavigationForwardsEnabled",rq="historyNavigationBackwardsEnabled",uy=[];hy=class extends MP{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(oq(o,this.inputBox))}};hy=tq([iq(3,Ke)],hy);fy=class extends dy{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(oq(s,this.inputBox))}};fy=tq([iq(3,Ke)],fy);No.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ce.and(ce.has(sE),ce.equals(rq,!0),py.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{ac==null||ac.showPreviousValue()}});No.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ce.and(ce.has(sE),ce.equals(nq,!0),py.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{ac==null||ac.showNextValue()}})});function lE(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"}var sq=M(()=>{});function hq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function fq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd<t.value.length){i.stopPropagation();return}}var xme,Eme,aq,lq,Tme,kme,Ime,Ame,Lme,Mme,Dme,Nme,Rme,Ome,Pme,Fme,Hme,Bme,zme,Ume,Wme,cq,Qa,jme,Vme,E0,Kme,dq,uq,T0,k0,_d,pq=M(()=>{Ht();Mo();TP();Fw();Zm();Dt();or();At();Ce();nr();wi();ZK();qe();w0();De();aE();sq();_r();Al();ar();qr();xw();Mi();nb();xme=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Eme=Ti("find-selection",lt.selection,v("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),aq=Ti("find-collapsed",lt.chevronRight,v("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),lq=Ti("find-expanded",lt.chevronDown,v("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Tme=Ti("find-replace",lt.replace,v("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),kme=Ti("find-replace-all",lt.replaceAll,v("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ime=Ti("find-previous-match",lt.arrowUp,v("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Ame=Ti("find-next-match",lt.arrowDown,v("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Lme=v("label.find","Find"),Mme=v("placeholder.find","Find"),Dme=v("label.previousMatchButton","Previous Match"),Nme=v("label.nextMatchButton","Next Match"),Rme=v("label.toggleSelectionFind","Find in Selection"),Ome=v("label.closeButton","Close"),Pme=v("label.replace","Replace"),Fme=v("placeholder.replace","Replace"),Hme=v("label.replaceButton","Replace"),Bme=v("label.replaceAllButton","Replace All"),zme=v("label.toggleReplaceButton","Toggle Replace"),Ume=v("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Ya),Wme=v("label.matchesLocation","{0} of {1}"),cq=v("label.noResults","No results"),Qa=419,jme=275,Vme=jme-54,E0=69,Kme=33,dq="ctrlEnterReplaceAll.windows.donotask",uq=zn?256:2048,T0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Kme,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};k0=class i extends Ds{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(dq,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ro(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 u=this._codeEditor.getOption(39).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(39).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new T0(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>xme(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=ep.bindTo(s),this._findFocusTracker=this._register(Ts(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=v0.bindTo(s),this._replaceFocusTracker=this._register(Ts(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 T0(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=la(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,at)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=E0+"px",this._state.matchesCount>=Ya?this._matchesCount.title=Ume: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>=Ya&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=Do(Wme,n,t)}else e=cq;this._matchesCount.appendChild(document.createTextNode(e)),Ni(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),E0=Math.max(E0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===cq)return n===""?v("ariaSearchNoResultEmpty","{0} found",e):v("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=v("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 v("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=aR(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 T0(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||!rR(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&&la(this._domNode)>Qa){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=la(this._findInput.domNode);return}if(Qa+28+r>=n&&(s=!0),Qa+28+r-E0>=n&&(a=!0),Qa+28+r-E0>=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=la(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&&!P.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(uq|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 hq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return fq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(uq|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Nc&&Rc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(v("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(dq,!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 hq(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return fq(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 hy(null,this._contextViewProvider,{width:Vme,label:Lme,placeholder:Mme,appendCaseSensitiveLabel:this._keybindingLabelFor(Gt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Gt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Gt.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:()=>lE(this._keybindingService),inputBoxStyles:Dw,toggleStyles:Mw},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()})),KN&&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 _d({label:Dme+this._keybindingLabelFor(Gt.PreviousMatchFindAction),icon:Ime,onTrigger:()=>{Oc(this._codeEditor.getAction(Gt.PreviousMatchFindAction)).run().then(void 0,at)}})),this._nextBtn=this._register(new _d({label:Nme+this._keybindingLabelFor(Gt.NextMatchFindAction),icon:Ame,onTrigger:()=>{Oc(this._codeEditor.getAction(Gt.NextMatchFindAction)).run().then(void 0,at)}}));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 sb({icon:Eme,title:Rme+this._keybindingLabelFor(Gt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:ga(U_),inputActiveOptionBorder:ga(z_),inputActiveOptionForeground:ga(W_)})),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 _d({label:Ome+this._keybindingLabelFor(Gt.CloseFindWidgetCommand),icon:ab,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 fy(null,void 0,{label:Pme,placeholder:Fme,appendPreserveCaseLabel:this._keybindingLabelFor(Gt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>lE(this._keybindingService),inputBoxStyles:Dw,toggleStyles:Mw},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 _d({label:Hme+this._keybindingLabelFor(Gt.ReplaceOneAction),icon:Tme,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new _d({label:Bme+this._keybindingLabelFor(Gt.ReplaceAllAction),icon:kme,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 _d({label:zme,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=la(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=`${Qa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(o),this._resizeSash=new Il(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Qa;this._register(this._resizeSash.onDidStart(()=>{a=la(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<Qa)return;let d=parseFloat(sR(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=la(this._domNode);if(l<Qa)return;let c=Qa;if(!this._resized||l===Qa){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=la(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){let e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};k0.ID="editor.contrib.findWidget";_d=class extends Ds{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+mt.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(...mt.asClassNameArray(aq)),this._domNode.classList.add(...mt.asClassNameArray(lq))):(this._domNode.classList.remove(...mt.asClassNameArray(lq)),this._domNode.classList.add(...mt.asClassNameArray(aq)))}};df((i,e)=>{let t=(g,b)=>{b&&e.addRule(`.monaco-editor ${g} { background-color: ${b}; }`)};t(".findMatch",i.getColor(LO)),t(".currentFindMatch",i.getColor(AO)),t(".findScope",i.getColor(MO));let n=i.getColor(xl);t(".find-widget",n);let r=i.getColor(H_);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(B_);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(NO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${au(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(DO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(RO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${au(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(ls);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(TO);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(gO);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(kO);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(su);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let p=i.getColor(jO);p&&e.addRule(`
|
|
.monaco-editor .find-widget .button:not(.disabled):hover,
|
|
.monaco-editor .find-widget .codicon-find-selection:hover {
|
|
background-color: ${p} !important;
|
|
}
|
|
`);let m=i.getColor(vO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function cE(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)<qme)return i.getModel().getValueInRange(n)}return null}var mq,Ja,Uu,qme,dr,dE,Gme,$me,uE,hE,my,fE,pE,mE,gy,gE,vE,Yme,qs,vy=M(()=>{Dt();Ce();wi();Ze();VO();jt();Kc();w0();XK();QK();pq();De();Yi();$m();ft();Tl();Gn();Oo();Ll();cu();ar();mq=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},Ja=function(i,e){return function(t,n){e(t,n,i)}},Uu=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qme=524288;dr=class gq extends oe{get editor(){return this._editor}static get(e){return e.getContribution(gq.ID)}constructor(e,t,n,r){super(),this._editor=e,this._findWidgetVisible=Xa.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._updateHistoryDelayer=new Ro(500),this._state=this._register(new cy),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!!ep.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=vl(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return Uu(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=cE(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=vl(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=cE(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 ay(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 Uu(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)}};dr.ID="editor.contrib.findController";dr=mq([Ja(1,Ke),Ja(2,Yr),Ja(3,Ms)],dr);dE=class extends dr{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 Uu(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 k0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new x0(this._editor,this._state,this._keybindingService))}};dE=mq([Ja(1,$c),Ja(2,Ke),Ja(3,Bt),Ja(4,pn),Ja(5,Ei),Ja(6,Yr),Ja(7,Ms)],dE);Gme=dw(new cw({id:Gt.StartFindAction,label:v("startFindAction","Find"),alias:"Find",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Gme.addImplementation(0,(i,e,t)=>{let n=dr.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});$me={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:v("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:v("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:v("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:v("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"}}}}]},uE=class extends se{constructor(){super({id:Gt.StartFindWithArgs,label:v("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:$me})}run(e,t,n){return Uu(this,void 0,void 0,function*(){let r=dr.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)}})}},hE=class extends se{constructor(){super({id:Gt.StartFindWithSelection,label:v("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 Uu(this,void 0,void 0,function*(){let n=dr.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))})}},my=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.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))})}},fE=class extends my{constructor(){super({id:Gt.NextMatchFindAction,label:v("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ce.and(O.focus,ep),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},pE=class extends my{constructor(){super({id:Gt.PreviousMatchFindAction,label:v("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ce.and(O.focus,ep),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},mE=class extends se{constructor(){super({id:Gt.GoToMatchFindAction,label:v("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Xa}),this._highlightDecorations=[]}run(e,t,n){let r=dr.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(Ei).notify({severity:pf.Warning,message:v("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(lr).createInputBox();a.placeholder=v("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let u=parseInt(d);if(isNaN(u))return;let h=r.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},c=d=>{let u=l(d);if(typeof u=="number"){a.validationMessage=void 0,r.goToMatch(u);let h=r.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=v("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=v("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:vi(K_),position:$r.Full}}}])})}},gy=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);if(!n)return;let r=cE(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))})}},gE=class extends gy{constructor(){super({id:Gt.NextSelectionMatchFindAction,label:v("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},vE=class extends gy{constructor(){super({id:Gt.PreviousSelectionMatchFindAction,label:v("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},Yme=dw(new cw({id:Gt.StartFindReplaceAction,label:v("startReplace","Replace"),alias:"Replace",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Yme.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=dr.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})});Ae(dr.ID,dE,0);X(uE);X(hE);X(fE);X(pE);X(mE);X(gE);X(vE);qs=xi.bindToContribution(dr.get);Me(new qs({id:Gt.CloseFindWidgetCommand,precondition:Xa,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:9,secondary:[1033]}}));Me(new qs({id:Gt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:_0.primary,mac:_0.mac,win:_0.win,linux:_0.linux}}));Me(new qs({id:Gt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:b0.primary,mac:b0.mac,win:b0.win,linux:b0.linux}}));Me(new qs({id:Gt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:y0.primary,mac:y0.mac,win:y0.win,linux:y0.linux}}));Me(new qs({id:Gt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:C0.primary,mac:C0.mac,win:C0.win,linux:C0.linux}}));Me(new qs({id:Gt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:S0.primary,mac:S0.mac,win:S0.win,linux:S0.linux}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Xa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:3094}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Xa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,v0),primary:3}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Xa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:2563}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Xa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,v0),primary:void 0,mac:{primary:2051}}}));Me(new qs({id:Gt.SelectAllMatchesAction,precondition:Xa,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:515}}))});var vq=M(()=>{});var _q=M(()=>{vq()});var Xme,bq,Wo,yq,I0,ur,_E,A0=M(()=>{Xme={0:" ",1:"u",2:"r"},bq=65535,Wo=16777215,yq=4278190080,I0=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)}},ur=class i{constructor(e,t,n){if(e.length!==t.length||e.length>bq)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new I0(e.length),this._userDefinedStates=new I0(e.length),this._recoveredStates=new I0(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>Wo||s>Wo)throw new Error("startLineNumber or endLineNumber must not exceed "+Wo);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]&Wo}getEndLineNumber(e){return this._endIndexes[e]&Wo}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 _E(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&yq)>>>24)+((this._endIndexes[e]&yq)>>>16);return t===bq?-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]=`[${Xme[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&Wo,endLineNumber:this._endIndexes[e]&Wo,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=(g,b)=>Array.isArray(g)?S=>S<b?g[S]:void 0:S=>S<b?g.toFoldRange(S):void 0,o=r(e,e.length),s=r(t,t.length),a=0,l=0,c=o(0),d=s(0),u=[],h,p=0,m=[];for(;c||d;){let g;if(d&&(!c||c.startLineNumber>=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?g=d:(g=c,g.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,g.source=0),c=o(++a)):(g=d,d.isCollapsed&&d.source===0&&(g.source=2)),d=s(++l);else{let b=l,S=d;for(;;){if(!S||S.startLineNumber>c.endLineNumber){g=c;break}if(S.source===1&&S.endLineNumber>c.endLineNumber)break;S=s(++b)}c=o(++a)}if(g){for(;h&&h.endLineNumber<g.startLineNumber;)h=u.pop();g.endLineNumber>g.startLineNumber&&g.startLineNumber>p&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),p=g.startLineNumber,h&&u.push(h),h=g)}}return m}},_E=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}}});function Cq(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 Wu(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 bE(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 Sq(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 wq(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 yE(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 by(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 yy(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 xq(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 Eq(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 Tq(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}var _y,kq=M(()=>{qt();A0();NP();_y=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new $e,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ur(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 u=this.regions.getSource(r)!==0;n.changeDecorationOptions(this._editorDecorationIds[r],this._decorationProvider.getDecorationOption(d,c<=s,u))}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 u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),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(ur.fromFoldRanges(t))}update(e,t=[]){let n=this._currentFoldedOrManualRanges(t),r=ur.sanitizeAndMerge(e,n,this._textModel.getLineCount());this.updatePost(ur.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=ur.sanitizeAndMerge(this._regions,r,o);this.updatePost(ur.fromFoldRanges(s))}_getLinesChecksum(e,t){return db(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 Qme(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function Iq(i,e){let t=T_(i,n=>e<n.startLineNumber)-1;return t>=0&&i[t].endLineNumber>=e?i[t]:null}var Cy,Aq=M(()=>{oi();qt();qe();gre();Cy=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new $e,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||dO(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 P(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 Iq(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!Qme(s,r))&&(r=Iq(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 t1e(i,e,t,n=e1e){let r=i.getOptions().tabSize,o=new CE(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),u=Km(d,r),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let p;if(s&&(p=d.match(s)))if(p[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,h=a[m],o.insertFirst(c,h.line,u),h.line=c,h.indent=u,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);let m=h.endAbove-1;m-c>=1&&o.insertFirst(c,m,u)}h.indent===u?h.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return o.toIndentRanges(i)}var Jme,Zme,ju,CE,e1e,SE=M(()=>{KO();A0();Jme=5e3,Zme="indent",ju=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Zme}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(t1e(this.editorModel,n,r,this.foldingRangesLimit))}},CE=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Wo||t>Wo)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 ur(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],u=e.getLineContent(d),h=Km(u,o);(h<r||h===r&&n++<t)&&(s[c]=d,a[c]=this._endIndexes[l],c++)}return new ur(s,a)}}},e1e={limit:Jme,update:()=>{}}});var i1e,wE,xE,Lq,Mq,EE,Ur,Dq=M(()=>{or();Kc();qn();De();_r();Al();ar();qr();i1e=Oe("editor.foldBackground",{light:Or(yw,.3),dark:Or(yw,.3),hcDark:null,hcLight:null},v("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editorGutter.foldingControlForeground",{dark:Fm,light:Fm,hcDark:Fm,hcLight:Fm},v("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));wE=Ti("folding-expanded",lt.chevronDown,v("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),xE=Ti("folding-collapsed",lt.chevronRight,v("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Lq=Ti("folding-manual-collapsed",xE,v("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),Mq=Ti("folding-manual-expanded",wE,v("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),EE={color:vi(i1e),position:pa.Inline},Ur=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)}};Ur.COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(xE)});Ur.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(xE)});Ur.MANUALLY_COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Lq)});Ur.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Lq)});Ur.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Ur.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0});Ur.EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(wE)});Ur.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(wE)});Ur.MANUALLY_EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(Mq)});Ur.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Mq)});Ur.NO_CONTROLS_EXPANDED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Ur.HIDDEN_RANGE_DECORATION=ct.register({description:"folding-hidden-range-decoration",stickiness:1})});function o1e(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,n1e,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})}},Ut));return Promise.all(r).then(o=>n)}function s1e(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 TE(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()}var n1e,r1e,Vu,TE,kE=M(()=>{At();Ce();A0();n1e={},r1e="syntax",Vu=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=r1e,this.disposables=new ne,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return o1e(this.providers,this.editorModel,e).then(t=>{var n,r;return t?s1e(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()}};TE=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>Wo||t>Wo)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 ur(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 ur(r,o,s)}}}});function Nq(i){if(!km(i)){if(!m_(i))return!1;let e=i;if(!km(e.levels)&&!ZS(e.levels)||!km(e.direction)&&!p_(e.direction)||!km(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(ZS)))return!1}return!0}var l1e,L0,c1e,Jn,Za,D0,Rn,IE,AE,LE,ME,DE,NE,RE,OE,PE,FE,HE,BE,Ku,zE,UE,WE,jE,VE,Sy=M(()=>{Dt();gi();At();gl();Ce();wi();Mi();_q();cb();Ze();jt();br();Kn();kq();Aq();SE();De();ft();Dq();A0();kE();Oo();Ns();ml();xt();qt();zi();Sn();is();jn();l1e=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},L0=function(i,e){return function(t,n){e(t,n,i)}},c1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jn=new nt("foldingEnabled",!1),Za=class M0 extends oe{static get(e){return e.getContribution(M0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=M0._foldingRangeSelector)===null||n===void 0?void 0:n.call(M0,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 ne),this.editor=e,this._foldingLimitReporter=new D0(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 Ur(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Jn.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 _y(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Cy(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ro(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new ti(()=>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 ju(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=M0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Vu(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 Ln(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Vt(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(uf.Imports.value,!0);d&&(s=Ea.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=>(at(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,at)}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=h=>!h.containedBy(s)&&!s.containedBy(h),u=t.getRegionsInside(null,d);for(let h of u)h.isCollapsed&&c.push(h);c.length===0&&(c=u)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let u of t.getRegionsInside(s))u.isCollapsed===a&&c.push(u);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Za.ID="editor.contrib.folding";Za=l1e([L0(1,Ke),L0(2,Tt),L0(3,Ei),L0(4,an),L0(5,be)],Za);D0=class{constructor(e){this.editor=e,this._onDidChange=new $e,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())}},Rn=class extends se{runEditorCommand(e,t,n){let r=e.get(Tt),o=Za.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){}};IE=class extends Rn{constructor(){super({id:"editor.unfold",label:v("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Jn,kbOpts:{kbExpr:O.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:Nq,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"?bE(t,!1,o,s):Wu(t,!1,o,s)}},AE=class extends Rn{constructor(){super({id:"editor.unfoldRecursively",label:v("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2142),weight:100}})}invoke(e,t,n,r){Wu(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},LE=class extends Rn{constructor(){super({id:"editor.fold",label:v("foldAction.label","Fold"),alias:"Fold",precondition:Jn,kbOpts:{kbExpr:O.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:Nq,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"?Sq(t,!0,o):a==="up"?bE(t,!0,s||1,o):Wu(t,!0,s||1,o)}},ME=class extends Rn{constructor(){super({id:"editor.toggleFold",label:v("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Cq(t,1,r)}},DE=class extends Rn{constructor(){super({id:"editor.foldRecursively",label:v("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Wu(t,!0,Number.MAX_VALUE,r)}},NE=class extends Rn{constructor(){super({id:"editor.foldAllBlockComments",label:v("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.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*"+vl(a.blockCommentStartToken));by(t,l,!0)}}}},RE=class extends Rn{constructor(){super({id:"editor.foldAllMarkerRegions",label:v("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.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);by(t,l,!0)}}}},OE=class extends Rn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:v("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.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);by(t,l,!1)}}}},PE=class extends Rn{constructor(){super({id:"editor.foldAllExcept",label:v("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);yE(t,!0,r)}},FE=class extends Rn{constructor(){super({id:"editor.unfoldAllExcept",label:v("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);yE(t,!1,r)}},HE=class extends Rn{constructor(){super({id:"editor.foldAll",label:v("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2069),weight:100}})}invoke(e,t,n){Wu(t,!0)}},BE=class extends Rn{constructor(){super({id:"editor.unfoldAll",label:v("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2088),weight:100}})}invoke(e,t,n){Wu(t,!1)}},Ku=class i extends Rn{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){wq(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};Ku.ID_PREFIX="editor.foldLevel";Ku.ID=i=>Ku.ID_PREFIX+i;zE=class extends Rn{constructor(){super({id:"editor.gotoParentFold",label:v("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=xq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},UE=class extends Rn{constructor(){super({id:"editor.gotoPreviousFold",label:v("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Eq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},WE=class extends Rn{constructor(){super({id:"editor.gotoNextFold",label:v("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Tq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},jE=class extends Rn{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:v("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(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=ur.sanitizeAndMerge(t.regions,o,(r=n.getModel())===null||r===void 0?void 0:r.getLineCount());t.updatePost(ur.fromFoldRanges(a))}}}},VE=class extends Rn{constructor(){super({id:"editor.removeManualFoldingRanges",label:v("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(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()}}};Ae(Za.ID,Za,0);X(IE);X(AE);X(LE);X(DE);X(HE);X(BE);X(NE);X(RE);X(OE);X(PE);X(FE);X(ME);X(zE);X(UE);X(WE);X(jE);X(VE);for(let i=1;i<=7;i++)kR(new Ku({id:Ku.ID(i),label:v("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2048|21+i),weight:100}}));St.registerCommand("_executeFoldingRangeProvider",function(i,...e){return c1e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof ht))throw Ao();let n=i.get(be),r=i.get(Si).getModel(t);if(!r)throw Ao();let o=i.get(Mt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Tt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(p,m)=>{}},c=new ju(r,s,l),d=c;if(a!=="indentation"){let p=Za.getFoldingRangeProviders(n,r);p.length&&(d=new Vu(r,p,()=>{},l,c))}let u=yield d.compute(et.None),h=[];try{if(u)for(let p=0;p<u.length;p++){let m=u.getType(p);h.push({start:u.getStartLineNumber(p),end:u.getEndLineNumber(p),kind:m?uf.fromValue(m):void 0})}return h}finally{d.dispose()}})})});var KE,qE,GE,$E=M(()=>{Ze();Vre();De();KE=class extends se{constructor(){super({id:"editor.action.fontZoomIn",label:v("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()+1)}},qE=class extends se{constructor(){super({id:"editor.action.fontZoomOut",label:v("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()-1)}},GE=class extends se{constructor(){super({id:"editor.action.fontZoomReset",label:v("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){vf.setZoomLevel(0)}};X(KE);X(qE);X(GE)});var JE=gt(qu=>{oi();gi();At();gl();Ce();Ze();Lr();hw();qe();jt();ub();xt();qre();Kre();De();zi();ft();Et();Gc();var Rq=qu&&qu.__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},wy=qu&&qu.__param||function(i,e){return function(t,n){e(t,n,i)}},QE=qu&&qu.__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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new ne,this._sessionDisposables=new ne,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 tu;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 Ri,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}});HP(this._workerService,this._languageFeaturesService,t,n,e,t.getFormattingOptions(),r.token).then(s=>{r.token.isCancellationRequested||Wi(s)&&(OP.execute(this._editor,s,!0),PP(s))}).finally(()=>{o.dispose()})}};N0.ID="editor.contrib.autoFormat";N0=Rq([wy(1,be),wy(2,Ml)],N0);var R0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new ne,this._callOnModel=new ne,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(zw,this.editor,e,2,wa.None,et.None).catch(at))}};R0.ID="editor.contrib.formatOnPaste";R0=Rq([wy(1,be),wy(2,He)],R0);var YE=class extends se{constructor(){super({id:"editor.action.formatDocument",label:v("formatDocument.label","Format Document"),alias:"Format Document",precondition:ce.and(O.notInCompositeEditor,O.writable,O.hasDocumentFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return QE(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(He);yield e.get(El).showWhile(n.invokeFunction(FP,t,1,wa.None,et.None),250)}})}},XE=class extends se{constructor(){super({id:"editor.action.formatSelection",label:v("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ce.and(O.writable,O.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2084),weight:100},contextMenuOpts:{when:O.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return QE(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(He),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new P(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(El).showWhile(n.invokeFunction(zw,t,o,1,wa.None,et.None),250)})}};Ae(N0.ID,N0,2);Ae(R0.ID,R0,2);X(YE);X(XE);St.registerCommand("editor.action.format",i=>QE(void 0,void 0,void 0,function*(){let e=i.get(Zt).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(ui);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var tp,bd,jo,lc=M(()=>{tp=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}},bd=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}},jo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});function Pq(i){Oq=i}function ys(){return Oq}function d1e(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 xy(i){return el(i,{color:"black"})}function O0(i){return el(p1e(`${i}: `,10),{color:"black",bold:!0})}function el(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 Ty(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)?u1e(i,e):h1e(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function u1e(i,e){let t="[ ",n=!0;for(let r of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${Ty(r,e-t.length)}`}return t+=" ]",t}function h1e(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}: ${Ty(o,e-t.length)}`}return t+=" }",t}function f1e(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function p1e(i,e){for(;i.length<e;)i+=" ";return i}var Oq,Ey,ip=M(()=>{Ey=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return d1e([xy(f1e("| ",this.indentation)),e])}formatInfo(e){return e.didChange?[xy(" "),el(Ty(e.oldValue,70),{color:"red",strikeThrough:!0}),xy(" "),el(Ty(e.newValue,60),{color:"green"})]:[xy(" (unchanged)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([O0("observable value changed"),el(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return el(" (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([O0("derived recomputed"),el(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n)])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([O0("observable from event triggered"),el(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([O0("autorun"),el(e.debugName,{color:"BlueViolet"}),this.formatChanges(t)])),t.clear()}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([O0("transaction"),el(t,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}}});function Hq(i){Fq=i}function dn(i,e){var t,n;let r=new ky(i,e);try{(t=ys())===null||t===void 0||t.handleBeginTransaction(r),i(r)}finally{r.finish(),(n=ys())===null||n===void 0||n.handleEndTransaction()}}function e7(i,e,t){i?e(i):dn(e,t)}function Ay(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 Gs(i,e){return new Iy(i,e)}function F0(i,e){return new ZE(i,e)}var Fq,P0,cc,ky,Iy,ZE,Gu=M(()=>{ip();P0=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return Fq(()=>{let t=Ay(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}},cc=class extends P0{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(){}};ky=class{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():Ay(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)}};Iy=class extends cc{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 ky(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(r=ys())===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}};ZE=class extends Iy{_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()}}});function xr(i,e){return new Ly(i,e,void 0,void 0)}function Bq(i,e,t){return new Ly(i,t,e.createEmptyChangeSummary,e.handleChange)}var Ly,t7=M(()=>{At();Gu();ip();Hq(xr);Ly=class extends cc{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=ys())===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=ys())===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 Qd}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)}}});function un(i,e){return new My(i,e,void 0,void 0)}function zq(i,e){return Uq(e,i)}function Uq(i,e){let t=new ne,n=un(e,r=>{t.clear(),i(r,t)});return Ft(()=>{n.dispose(),t.dispose()})}var My,i7=M(()=>{ER();Ce();ip();My=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=ys())===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=ys())===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--,xR(()=>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=My})(un||(un={}))});function Ny(i){return new n7(i)}function $s(i,e){return new Dy(i,e)}function Wq(i,e){return new r7(i,e)}function jq(i){return new o7(i)}function Vq(i,e){let t=new s7(e!=null?e:!1);return i.addObserver(t),e&&i.reportChanges(),Ft(()=>{i.removeObserver(t)})}var n7,Dy,r7,o7,s7,Kq=M(()=>{Ce();Gu();ip();n7=class extends P0{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};Dy=class extends cc{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=ys())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&dn(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 Ay(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=Dy})($s||($s={}));r7=class extends cc{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{dn(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(){}};o7=class extends cc{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){dn(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(){}};s7=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 m1e,Ys=M(()=>{Gu();t7();i7();Kq();ip();m1e=!1;m1e&&Pq(new Ey)});var Ry,Oy,Py,Fy=M(()=>{Ry="editor.action.inlineSuggest.commit",Oy="editor.action.inlineSuggest.showPrevious",Py="editor.action.inlineSuggest.showNext"});var In,Hy=M(()=>{Ys();wi();rre();ft();Ce();De();In=class i extends oe{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(un("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(un("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],u=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let p=Lm(d);p===-1&&(p=d.length-1),o=p>0;let m=r.textModel.getOptions().tabSize;s=IR.visibleColumnFromColumn(d,p+1,m)<m}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};In.inlineSuggestionVisible=new nt("inlineSuggestionVisible",!1,v("inlineSuggestionVisible","Whether an inline suggestion is visible"));In.inlineSuggestionHasIndentation=new nt("inlineSuggestionHasIndentation",!1,v("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));In.inlineSuggestionHasIndentationLessThanTabSize=new nt("inlineSuggestionHasIndentationLessThanTabSize",!0,v("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));In.suppressSuggestions=new nt("inlineSuggestionSuppressSuggestions",void 0,v("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))});var qq=M(()=>{});var Gq=M(()=>{qq()});function $q(i,e){let t=new a7(i),n=e.map(r=>{let o=P.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}function Yq(){return g1e}function Xq(i,e){let t=new ne,n=i.createDecorationsCollection();return t.add(un(`Apply decorations from ${e.debugName}`,r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function H0(i,e){return new Se(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function B0(i){let e=1,t=1;for(let n of i)n===`
|
|
`?(e++,t=1):t++;return new Se(e,t)}var a7,g1e,By,np=M(()=>{At();Ce();Ys();ri();qe();a7=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}},g1e=[];By=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new Qd(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new P(e,this.startColumn,e,this.endColumnExclusive)}}});var rp,op,zy,Uy=M(()=>{np();rp=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 $q(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)}},op=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}},zy=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new op(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)}}});function b1e(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),u=n.get(64),h=new I_(1e4);h.appendString('<div class="suggest-preview-text">');for(let g=0,b=t.length;g<b;g++){let S=t[g],k=S.content;h.appendString('<div class="view-line'),h.appendString('" style="top:'),h.appendString(String(g*u)),h.appendString('px;width:1000000px;">');let N=b_(k),A=CR(k),H=eP.createEmpty(k,r);mb(new pb(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,k,!1,N,A,0,H,S.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==nP.OFF,null),h),h.appendString("</div>")}h.appendString("</div>"),fb(i,d);let p=h.build(),m=Qq?Qq.createHTML(p):p;i.innerHTML=m}var v1e,_1e,Wy,l7,Qq,Jq=M(()=>{Uw();qt();Ce();Ys();wi();Gq();BP();Xm();ri();qe();WR();ss();Kc();Tre();zP();UP();Uy();np();v1e=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},_1e=function(i,e){return function(t,n){e(t,n,i)}},Wy=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Gs("isDisposed",!1),this.currentTextModel=$s(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=xr("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 zy?s.columnRange:void 0,l=[],c=[];function d(g,b){if(c.length>0){let S=c[c.length-1];b&&S.decorations.push(new t1(S.content.length+1,S.content.length+1+g[0].length,b,0)),S.content+=g[0],g=g.slice(1)}for(let S of g)c.push({content:S,decorations:b?[new t1(1,S.length+1,b,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,p=0;for(let g of s.parts){let b=g.lines;h===void 0?(l.push({column:g.column,text:b[0],preview:g.preview}),b=b.slice(1)):d([u.substring(p,g.column-1)],void 0),b.length>0&&(d(b,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),p=g.column-1}h!==void 0&&d([u.substring(p)],void 0);let m=h!==void 0?new By(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=xr("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:P.fromPositions(new Se(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:ou.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new l7(this.editor,this.languageService.languageIdCodec,xr("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(Xq(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};Wy=v1e([_1e(2,Xi)],Wy);l7=class extends oe{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=Wq("editorOptionChanged",li.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(un("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");b1e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};Qq=_f("editorGhostText",{createHTML:i=>i})});var Zq=M(()=>{});var eG=M(()=>{Zq()});var tG=M(()=>{});var iG=M(()=>{tG()});var y1e,jy,z0,nG=M(()=>{gf();Gre();Pc();or();qr();qt();Ce();Mi();iG();De();y1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jy=class extends oe{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $N),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new ne,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new z0(()=>{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 Po(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===z0.ID)return this.toggleMenuActionViewItem=new Ww(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:mt.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:lt.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 Am){let a=new Ww(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 Un(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},z0=class i extends ns{constructor(e,t){t=t||v("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return y1e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};z0.ID="toolbar.toggle.more"});var C1e,U0,Vy,rG=M(()=>{Ht();nG();Pc();oi();Ce();De();Yi();ft();Tl();Gn();Bc();C1e=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},U0=function(i,e){return function(t,n){e(t,n,i)}},Vy=class extends jy{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 ne),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,u=[],h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let p=0;p<a.length;p++){let m=a[p];!(m instanceof da)&&!(m instanceof Mm)||m.hideActions&&(c.push(m.hideActions.toggle),m.hideActions.toggle.checked&&d++,m.hideActions.isHidden&&(h=!0,a[p]=void 0,((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==0&&(u[p]=m)))}if(((s=this._options)===null||s===void 0?void 0:s.maxNumberOfItems)!==void 0){let p=0;for(let m=0;m<a.length;m++){let g=a[m];g&&++p>=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}pw(a),pw(u),super.setActions(a,ks.join(u,l)),c.length>0&&this._sessionDisposables.add(Rt(this.getElement(),"contextmenu",p=>{var m,g,b,S;let k=this.getItemAction(p.target);if(!k)return;p.preventDefault(),p.stopPropagation();let N=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){N=!0;for(let K=0;K<c.length;K++)if(c[K].checked){c[K]=Yh({id:k.id,label:k.label,checked:!0,enabled:!1,run(){}});break}}let A;if(!N&&(k instanceof da||k instanceof Mm)){if(!k.hideActions)return;A=k.hideActions.hide}else A=Yh({id:"label",label:v("hide","Hide"),enabled:!1,run(){}});let H=ks.join([A],c);!((g=this._options)===null||g===void 0)&&g.resetMenu&&!n&&(n=[this._options.resetMenu]),h&&n&&(H.push(new ks),H.push(Yh({id:"resetThisMenu",label:v("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>p,getActions:()=>H,menuId:(b=this._options)===null||b===void 0?void 0:b.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(S=this._options)===null||S===void 0?void 0:S.menuOptions),contextKeyService:this._contextKeyService})}))}};Vy=C1e([U0(2,Is),U0(3,Ke),U0(4,cs),U0(5,Bt),U0(6,Dr)],Vy)});var h7,Xs,Ky,S1e,w1e,Qs,d7,u7,qy=M(()=>{Ht();gf();_P();Pc();oi();Dt();or();Ce();Ys();i7();nr();qr();eG();ri();br();Fy();De();_b();rG();Yi();zi();ft();Tl();Et();Gn();Bc();Al();h7=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},Xs=function(i,e){return function(t,n){e(t,n,i)}},Ky=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=xr("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 Se(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(zq("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(Qs,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(un("request explicit",l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ya.Explicit&&s.triggerExplicitly()}))}))}};Ky=h7([Xs(2,He)],Ky);S1e=Ti("inline-suggestion-hints-next",lt.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),w1e=Ti("inline-suggestion-hints-previous",lt.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Qs=class c7 extends oe{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new ns(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=v({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,u){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=u,this.id=`InlineSuggestionHintsContentWidget${c7.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=$h("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[$h("div",{style:{display:"flex"}},[$h("div@actionBar",{className:"custom-actions"}),$h("div@toolBar")])]),this.previousAction=this.createCommandAction(Oy,v("previous","Previous"),mt.asClassName(w1e)),this.availableSuggestionCountAction=new ns("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(Py,v("next","Next"),mt.asClassName(S1e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(xe.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new ti(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new ti(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];let h=this._register(new Po(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(u7,this.nodes.toolBar,xe.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:p=>p.startsWith("primary")},actionViewItemProvider:(p,m)=>p instanceof da?l.createInstance(d7,p,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(p=>{c7._dropDownVisible=p})),this._register(un("update position",p=>{this._position.read(p),this.editor.layoutContentWidget(this)})),this._register(un("counts",p=>{let m=this._suggestionCount.read(p),g=this._currentSuggestionIdx.read(p);m!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${g+1}/${m}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),m!==void 0&&m>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(un("extra commands",p=>{let m=this._extraCommands.read(p);if(ha(this.lastCommands,m))return;this.lastCommands=m;let g=m.map(b=>({class:void 0,id:b.id,enabled:!0,tooltip:b.tooltip||"",label:b.title,run:S=>this._commandService.executeCommand(b.id)}));for(let[b,S]of this.inlineCompletionsActionsMenus.getActions())for(let k of S)k instanceof da&&g.push(k);g.length>0&&g.unshift(new ks),this.toolBar.setAdditionalSecondaryActions(g)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Qs._dropDownVisible=!1;Qs.id=0;Qs=h7([Xs(6,ui),Xs(7,He),Xs(8,Bt),Xs(9,Ke),Xs(10,Is)],Qs);d7=class extends vb{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=$h("div.keybinding").root;new ib(t,f_,Object.assign({disableTitle:!0},vP)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},u7=class extends Vy{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=[];gb(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){ha(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};u7=h7([Xs(3,Is),Xs(4,Ke),Xs(5,cs),Xs(6,Bt),Xs(7,Dr)],u7)});function x1e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function E1e(i,e){if((tl==null?void 0:tl.originalValue)===i&&(tl==null?void 0:tl.newValue)===e)return tl==null?void 0:tl.changes;{let t=sG(i,e,!0);if(t){let n=oG(t);if(n>0){let r=sG(i,e,!1);r&&oG(r)<n&&(t=r)}}return tl={originalValue:i,newValue:e,changes:t},t}}function oG(i){let e=0;for(let t of i)e+=t.originalLength;return e}function sG(i,e,t){if(i.length>5e3||e.length>5e3)return;function n(c){let d=0;for(let u=0,h=c.length;u<h;u++){let p=c.charCodeAt(u);p>d&&(d=p)}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,u=0,h=new Int32Array(c.length);for(let p=0,m=c.length;p<m;p++)if(t&&c[p]==="("){let g=u*100+d;h[p]=o(2*g),d++}else if(t&&c[p]===")"){d=Math.max(d-1,0);let g=u*100+d;h[p]=o(2*g+1),d===0&&u++}else h[p]=c.charCodeAt(p);return h}let a=s(i),l=s(e);return new jP({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var $u,tl,f7=M(()=>{$re();wi();qe();Uy();np();$u=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=Fc(r,this.text),s=H0(this.range.getStartPosition(),B0(r.substring(0,o))),a=this.text.substring(o),l=P.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&x1e(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=Ui(s).length;if(o.range.startColumn-1<=a){let m=Ui(o.text).length,g=s.substring(o.range.startColumn-1,a),b=P.fromPositions(o.range.getStartPosition().delta(0,g.length),o.range.getEndPosition()),S=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(b,S)}let c=e.getValueInRange(o.range),d=E1e(c,o.text);if(!d)return;let u=o.range.startLineNumber,h=new Array;if(t==="prefix"){let m=d.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}let p=o.text.length-r;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&g<n.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;let b=m.modifiedStart+m.modifiedLength,S=Math.max(m.modifiedStart,Math.min(b,p)),k=o.text.substring(m.modifiedStart,S),N=o.text.substring(S,Math.max(m.modifiedStart,b));if(k.length>0){let A=eu(k);h.push(new op(g,A,!1))}if(N.length>0){let A=eu(N);h.push(new op(g,A,!0))}}return new rp(u,h)}}});function aG(i,e){let t=new hO,n=new pO(t,c=>e.getLanguageConfiguration(c)),r=new fO(new p7([i]),n),o=mO(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=af(d,c.openingBracket.length),c.child&&(l(c.child,d),d=af(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=af(d,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,af(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=af(d,u.length)}}return l(o,uO),s}var p7,lG=M(()=>{Cre();vre();Sre();_re();yre();p7=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}}});function cG(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var Gy,yd,On,$y,So,Yu,m7,Js,W0,sp,Vo,Xu=M(()=>{Gy=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}}};Gy._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};yd=class{constructor(){this._children=[]}appendChild(e){return e instanceof On&&this._children[this._children.length-1]instanceof On?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 sp)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},On=class i extends yd{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},$y=class extends yd{},So=class i extends $y{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 Yu?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}},Yu=class i extends yd{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof On&&(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}},m7=class i extends yd{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 Js&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Js){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}},Js=class i extends yd{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)}},W0=class i extends $y{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 On(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}};sp=class i extends yd{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof So&&(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 cG([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof So&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof W0&&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){cG(this.children,e)}},Vo=class{constructor(){this._scanner=new Gy,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 sp;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 So&&(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 u=new So(l.index);u.transform=l.transform;for(let h of d){let p=h.clone();u.appendChild(p),p instanceof So&&r.has(p.index)&&!c.has(p.index)&&(c.add(p.index),s(p,c),c.delete(p.index))}t.replace(l,[u])},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 So(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 On(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 So(Number(t)):new W0(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 So(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new Yu;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 On(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 W0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+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 m7,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 On(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 Js(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Js(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 Js(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Js(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 Js(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new On(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function hG(i,e,t,n,r=et.None,o){return dG(this,void 0,void 0,function*(){let s=T1e(e,t),a=i.all(t),l=yield Promise.all(a.map(u=>dG(this,void 0,void 0,function*(){try{let h=yield u.provideInlineCompletions(t,e,n,r);return{provider:u,completions:h}}catch(h){Ut(h)}return{provider:u,completions:void 0}}))),c=new Map,d=[];for(let u of l){let h=u.completions;if(!h)continue;let p=new v7(h,u.provider);d.push(p);for(let m of h.items){let g=_7.from(m,p,s,t,o);c.set(g.hash(),g)}}return new g7(Array.from(c.values()),new Set(c.keys()),d)})}function T1e(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new P(i.lineNumber,t.startColumn,i.lineNumber,n):P.fromPositions(i,i.with(void 0,n))}function uG(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?aG(a,n):i}var dG,g7,v7,_7,fG=M(()=>{ER();gi();At();qe();lG();np();Xu();dG=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};g7=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()}},v7=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)}},_7=class i{static from(e,t,n,r,o){let s,a,l=e.range?P.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=uG(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new P(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=uG(e.insertText.snippet,l.getStartPosition(),r,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new P(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new Vo().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof On?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else wR(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||Yq(),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 A1e(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()}))})}function L1e(i,e,t){return!i||!e?i===e:t(i,e)}function mG(i){return i.startLineNumber===i.endLineNumber?new Se(1,1+i.endColumn-i.startColumn):new Se(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var k1e,pG,I1e,Yy,b7,y7,C7,Xy,gG=M(()=>{gi();Cl();Ce();Ys();Gu();ri();br();Kn();xt();f7();fG();k1e=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},pG=function(i,e){return function(t,n){e(t,n,i)}},I1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Yy=class extends oe{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 Bi),this.inlineCompletions=F0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=F0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new b7(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 Ri,d=(()=>I1e(this,void 0,void 0,function*(){if((l||t.triggerKind===ya.Automatic)&&(yield A1e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let p=new Date,m=yield hG(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let g=new Date;this._debounceValue.update(this.textModel,g.getTime()-p.getTime());let b=new C7(m,s,this.textModel,this.versionId);if(n){let S=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(S)&&b.prepend(n.inlineCompletion,S.range,!0)}return this._updateOperation.clear(),dn(S=>{a.set(b,S)}),!0}))(),u=new y7(s,c,d);return this._updateOperation.value=u,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()}};Yy=k1e([pG(3,be),pG(4,Tt)],Yy);b7=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&L1e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===ya.Automatic||this.context.triggerKind===ya.Explicit)&&this.versionId===e.versionId}};y7=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},C7=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=xr("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 Xy(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 Xy(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},Xy=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 $u(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),u=o.substring(a),h=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!YR(u,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 $u(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return mG(this._getUpdatedRange(e)).isBefore(mG(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 vG(){return ap}function V0(i,e,t,n=dc.default,r={triggerKind:0},o=et.None){return j0(this,void 0,void 0,function*(){let s=new Ln(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new P(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):P.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new ne,h=[],p=!1,m=(b,S,k)=>{var N,A,H;let K=!1;if(!S)return K;for(let W of S.suggestions)if(!n.kindFilter.has(W.kind)){if(!n.showDeprecated&&(!((N=W==null?void 0:W.tags)===null||N===void 0)&&N.includes(1)))continue;W.range||(W.range=c),W.sortText||(W.sortText=typeof W.label=="string"?W.label:W.label.label),!p&&W.insertTextRules&&W.insertTextRules&4&&(p=Vo.guessNeedsClipboard(W.insertText)),d.push(new S7(t,W,S,b)),K=!0}return d_(S)&&u.add(S),h.push({providerName:(A=b._debugDisplayName)!==null&&A!==void 0?A:"unknown_provider",elapsedProvider:(H=S.duration)!==null&&H!==void 0?H:-1,elapsedOverall:k.elapsed()}),K},g=(()=>j0(this,void 0,void 0,function*(){if(!ap||n.kindFilter.has(27))return;let b=n.providerItemsToReuse.get(ap);if(b){b.forEach(N=>d.push(N));return}if(n.providerFilter.size>0&&!n.providerFilter.has(ap))return;let S=new Ln(!0),k=yield ap.provideCompletionItems(e,t,r,o);m(ap,k,S)}))();for(let b of i.orderedGroups(e)){let S=!1;if(yield Promise.all(b.map(k=>j0(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(k)){let N=n.providerItemsToReuse.get(k);N.forEach(A=>d.push(A)),S=S||N.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(k)))try{let N=new Ln(!0),A=yield k.provideCompletionItems(e,t,r,o);S=m(k,A,N)||S}catch(N){Ut(N)}}))),S||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new l_)):new w7(d.sort(N1e(n.snippetSortOrder)),p,{entries:h,elapsed:s.elapsed()},u)})}function x7(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 M1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return x7(i,e)}function D1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return x7(i,e)}function N1e(i){return Qy.get(i)}function _G(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var j0,it,nl,S7,dc,ap,w7,Qy,il,Qu=M(()=>{gi();At();Cl();Ce();ml();Mi();Sn();ri();qe();ca();Xu();De();Yi();zi();ft();xt();aE();j0=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},it={Visible:py,HasFocusedSuggestion:new nt("suggestWidgetHasFocusedSuggestion",!1,v("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new nt("suggestWidgetDetailsVisible",!1,v("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new nt("suggestWidgetMultipleSuggestions",!1,v("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new nt("suggestionMakesTextEdit",!0,v("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new nt("acceptSuggestionOnEnter",!0,v("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new nt("suggestionHasInsertAndReplaceRange",!1,v("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new nt("suggestionInsertMode",void 0,{type:"string",description:v("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new nt("suggestionCanResolve",!1,v("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},nl=new xe("suggestWidgetStatusBar"),S7=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=yl.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,P.isIRange(t.range)?(this.editStart=new Se(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Se(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Se(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Se(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range.insert)||P.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 j0(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=>{es(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},dc=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}};dc.default=new dc;w7=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};Qy=new Map;Qy.set(0,M1e);Qy.set(2,D1e);Qy.set(1,x7);St.registerCommand("_executeCompletionItemProvider",(i,...e)=>j0(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r),Lt(typeof o=="number"||!o);let{completionProvider:s}=i.get(be),a=yield i.get(xn).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),u=yield V0(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(et.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}}));il=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}}}});var bG=M(()=>{});var yG=M(()=>{bG()});function E7(i,e=Nc){return eO(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var CG=M(()=>{mre();nr()});var Cd,K0=M(()=>{Cd=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}}()});var R1e,O1e,eBe,q0,G0,$0,Y0,X0,uc,Q0,J0,SG=M(()=>{CG();nR();lo();wi();K0();Kn();Xu();De();ob();R1e=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},O1e=function(i,e){return function(t,n){e(t,n,i)}},eBe=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}),q0=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}}},G0=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=Ui(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof On&&(a=Ui(eu(c.value).pop())),!0));let l=Fc(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}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)}}}},$0=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Gh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Gh(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return iR(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(rf(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})}}},Y0=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=>!pR(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},X0=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}}};X0=R1e([O1e(2,Tt)],X0);uc=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}}};uc.dayNames=[v("Sunday","Sunday"),v("Monday","Monday"),v("Tuesday","Tuesday"),v("Wednesday","Wednesday"),v("Thursday","Thursday"),v("Friday","Friday"),v("Saturday","Saturday")];uc.dayNamesShort=[v("SundayShort","Sun"),v("MondayShort","Mon"),v("TuesdayShort","Tue"),v("WednesdayShort","Wed"),v("ThursdayShort","Thu"),v("FridayShort","Fri"),v("SaturdayShort","Sat")];uc.monthNames=[v("January","January"),v("February","February"),v("March","March"),v("April","April"),v("May","May"),v("June","June"),v("July","July"),v("August","August"),v("September","September"),v("October","October"),v("November","November"),v("December","December")];uc.monthNamesShort=[v("JanuaryShort","Jan"),v("FebruaryShort","Feb"),v("MarchShort","Mar"),v("AprilShort","Apr"),v("MayShort","May"),v("JuneShort","Jun"),v("JulyShort","Jul"),v("AugustShort","Aug"),v("SeptemberShort","Sep"),v("OctoberShort","Oct"),v("NovemberShort","Nov"),v("DecemberShort","Dec")];Q0=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=xP(this._workspaceService.getWorkspace());if(!wP(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(Rw(e))return Gh(e.uri.path);let t=Gh(e.configPath.path);return t.endsWith(Ow)&&(t=t.substr(0,t.length-Ow.length-1)),t}_resoveWorkspacePath(e){if(Rw(e))return E7(e.uri.fsPath);let t=Gh(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?E7(n):"/"}},J0=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 Cd()}}});var P1e,F1e,Z0,wG,lp,T7=M(()=>{oi();Ce();wi();yG();xa();qe();Mn();Kn();qn();bb();ob();Xu();SG();P1e=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},F1e=function(i,e){return function(t,n){e(t,n,i)}},Z0=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=fw(t.placeholders,So.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=P.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(Kt.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 je(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 u=this._placeholderDecorations.get(d);r.changeDecorationOptions(u,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 So){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 Yu,!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),u=P.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=n.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=fw(this._snippet.placeholders,So.compareByIndex)})}};Z0._decor={active:ct.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:ct.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:ct.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:ct.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};wG={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},lp=class rl{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=Ui(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof On)||c.parent instanceof Yu||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let h=r.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let p=l.charCodeAt(h-1);(p===10||p===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let p=1;p<d.length;p++)d[p]=e.normalizeIndentation(a+d[p])}let u=d.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new On(u)]),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=je.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=[],u=[];if(!e.hasModel())return{edits:d,snippets:u};let h=e.getModel(),p=e.invokeWithinContext(A=>A.get(kl)),m=e.invokeWithinContext(A=>new $0(A.get(Dl),h)),g=()=>a,b=h.getValueInRange(rl.adjustSelection(h,e.getSelection(),n,0)),S=h.getValueInRange(rl.adjustSelection(h,e.getSelection(),0,r)),k=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),N=e.getSelections().map((A,H)=>({selection:A,idx:H})).sort((A,H)=>P.compareRangesUsingStarts(A.selection,H.selection));for(let{selection:A,idx:H}of N){let K=rl.adjustSelection(h,A,n,0),W=rl.adjustSelection(h,A,0,r);b!==h.getValueInRange(K)&&(K=A),S!==h.getValueInRange(W)&&(W=A);let re=A.setStartPosition(K.startLineNumber,K.startColumn).setEndPosition(W.endLineNumber,W.endColumn),ae=new Vo().parse(t,!0,o),Ne=re.getStartPosition(),he=rl.adjustWhitespace(h,Ne,s||H>0&&k!==h.getLineFirstNonWhitespaceColumn(A.positionLineNumber),ae);ae.resolveVariables(new q0([m,new Y0(g,H,N.length,e.getOption(76)==="spread"),new G0(h,A,H,l),new X0(h,A,c),new uc,new Q0(p),new J0])),d[H]=Kt.replace(re,ae.toString()),d[H].identifier={major:H,minor:0},d[H]._isTracked=!0,u[H]=new Z0(e,ae,he)}return{edits:d,snippets:u}}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 Vo,u=new sp,h=new q0([e.invokeWithinContext(m=>new $0(m.get(Dl),c)),new Y0(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new G0(c,e.getSelection(),0,s),new X0(c,e.getSelection(),a),new uc,new Q0(e.invokeWithinContext(m=>m.get(kl))),new J0]);t=t.sort((m,g)=>P.compareRangesUsingStarts(m.range,g.range));let p=0;for(let m=0;m<t.length;m++){let{range:g,template:b}=t[m];if(m>0){let H=t[m-1].range,K=P.fromPositions(H.getEndPosition(),g.getStartPosition()),W=new On(c.getValueInRange(K));u.appendChild(W),p+=W.value.length}let S=d.parseFragment(b,u);rl.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(S)),u.resolveVariables(h);let k=u.toString(),N=k.slice(p);p=k.length;let A=Kt.replace(g,N);A.identifier={major:m,minor:0},A._isTracked=!0,l.push(A)}return d.ensureFinalTabstop(u,n,!0),{edits:l,snippets:[new Z0(e,u,"")]}}constructor(e,t,n=wG,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){Vi(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"?rl.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):rl.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=>je.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=wG){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=rl.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=>je.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(P.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(P.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(P.compareRangesUsingStarts);for(let o=0;o<r.length;o++)if(!r[o].containsRange(e[o])){t.delete(n);continue}}return t.size>0}};lp=P1e([F1e(3,Tt)],lp)});var H1e,Jy,xG,Zi,Zy,cp=M(()=>{Ce();Mi();Ze();ri();jt();Kn();xt();Qu();De();ft();C_();T7();H1e=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},Jy=function(i,e){return function(t,n){e(t,n,i)}},xG={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Zi=class eg{static get(e){return e.getContribution(eg.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new ne,this._modelVersionId=-1,this._inSnippet=eg.InSnippetMode.bindTo(r),this._hasNextTabstop=eg.HasNextTabstop.bindTo(r),this._hasPrevTabstop=eg.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"?xG:Object.assign(Object.assign({},xG),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?(Lt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new lp(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()||!Se.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(u=>u.value===l),d=[];for(let u=0;u<a.choice.options.length;u++){let h=a.choice.options[u];d.push({kind:13,label:h.value,insertText:h.value,sortText:"a".repeat(u+1),range:a.range,filterText:c?`${l}_${h.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:v("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(()=>{_G(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()}};Zi.ID="snippetController2";Zi.InSnippetMode=new nt("inSnippetMode",!1,v("inSnippetMode","Whether the editor in current in snippet mode"));Zi.HasNextTabstop=new nt("hasNextTabstop",!1,v("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Zi.HasPrevTabstop=new nt("hasPrevTabstop",!1,v("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Zi=H1e([Jy(1,zc),Jy(2,be),Jy(3,Ke),Jy(4,Tt)],Zi);Ae(Zi.ID,Zi,4);Zy=xi.bindToContribution(Zi.get);Me(new Zy({id:"jumpToNextSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:2}}));Me(new Zy({id:"jumpToPrevSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:1026}}));Me(new Zy({id:"leaveSnippet",precondition:Zi.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:9,secondary:[1033]}}));Me(new Zy({id:"acceptSnippet",precondition:Zi.InSnippetMode,handler:i=>i.finish()}))});var B1e,k7,dp,wo,e2,EG=M(()=>{oi();At();Ce();Ys();Gu();t7();Mi();xa();ri();qe();br();Kn();Uy();gG();np();cp();zi();Et();B1e=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},k7=function(i,e){return function(t,n){e(t,n,i)}},dp=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(wo||(wo={}));e2=class extends oe{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,u,h){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=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(Yy,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Gs("isActive",!1),this._forceUpdate=jq("forceUpdate"),this._selectedInlineCompletionId=Gs("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([wo.Redo,wo.Undo,wo.AcceptWord]),this._fetchInlineCompletions=Bq("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ya.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);let S=this.selectedInlineCompletion.get(),k=g.preserveCurrentCompletion||S!=null&&S.forwardStable?S:void 0,N=this._source.suggestWidgetInlineCompletions.get(),A=this.selectedSuggestItem.read(m);if(N&&!A){let W=this._source.inlineCompletions.get();dn(re=>{W&&N.request.versionId>W.request.versionId&&this._source.inlineCompletions.set(N.clone(),re),this._source.clearSuggestWidgetInlineCompletions(re)})}let H=this.cursorPosition.read(m),K={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:A==null?void 0:A.toSelectedSuggestionInfo()};return this._source.fetch(H,K,k)}),this._filteredInlineCompletionItems=xr("filteredInlineCompletionItems",m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let b=this.cursorPosition.read(m);return g.inlineCompletions.filter(k=>k.isVisible(this.textModel,b,m))}),this.selectedInlineCompletionIndex=xr("selectedCachedCompletionIndex",m=>{let g=this._selectedInlineCompletionId.read(m),b=this._filteredInlineCompletionItems.read(m),S=this._selectedInlineCompletionId===void 0?-1:b.findIndex(k=>k.semanticId===g);return S===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):S}),this.selectedInlineCompletion=xr("selectedCachedCompletion",m=>{let g=this._filteredInlineCompletionItems.read(m),b=this.selectedInlineCompletionIndex.read(m);return g[b]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=xr("selectedInlineCompletionsCount",m=>{if(this.lastTriggerKind.read(m)===ya.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=xr("ghostTextAndCompletion",m=>{var g;let b=this.textModel,S=this.selectedSuggestItem.read(m);if(S){let k=this._source.suggestWidgetInlineCompletions.read(m),N=k?k.inlineCompletions:[this.selectedInlineCompletion.read(m)].filter(JN),A=S.toSingleTextEdit().removeCommonPrefix(b),H=FR(N,st=>{let rt=st.toSingleTextEdit(m);return rt=rt.removeCommonPrefix(b,P.fromPositions(rt.range.getStartPosition(),S.range.getEndPosition())),rt.augments(A)?{edit:rt,completion:st}:void 0});if(!this._suggestPreviewEnabled.read(m)&&!H)return;let W=(g=H==null?void 0:H.edit)!==null&&g!==void 0?g:A,re=H?H.edit.text.length-A.text.length:0,ae=this._suggestPreviewMode.read(m),Ne=this.cursorPosition.read(m),he=W.computeGhostText(b,ae,Ne,re);return{ghostText:he!=null?he:new rp(W.range.endLineNumber,[]),completion:H==null?void 0:H.completion,suggestItem:S}}else{if(!this._isActive.read(m))return;let k=this.selectedInlineCompletion.read(m);if(!k)return;let N=k.toSingleTextEdit(m),A=this._inlineSuggestMode.read(m),H=this.cursorPosition.read(m),K=N.computeGhostText(b,A,H);return K?{ghostText:K,completion:k,suggestItem:void 0}:void 0}}),this.ghostText=xr("ghostText",m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(Vq(this._fetchInlineCompletions,!0));let p;this._register(un("call handleItemDidShow",m=>{var g,b;let S=this.state.read(m),k=S==null?void 0:S.completion;if((k==null?void 0:k.semanticId)!==(p==null?void 0:p.semanticId)&&(p=k,k)){let N=k.inlineCompletion,A=N.source;(b=(g=A.provider).handleItemDidShow)===null||b===void 0||b.call(g,A.inlineCompletions,N.sourceInlineCompletion,N.insertText)}}))}trigger(e){return dp(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return dp(this,void 0,void 0,function*(){e7(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ya.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){e7(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return dp(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 dp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return dp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return dp(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Qd;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",[Kt.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=Zi.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Kt.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,Ut)),dn(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 Qd;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 Se(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",[Kt.replace(P.fromPositions(a),d)]);let u=B0(d);e.setPosition(H0(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=P.fromPositions(o.range.getStartPosition(),H0(a,B0(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}}};e2=B1e([k7(9,He),k7(10,ui),k7(11,Tt)],e2)});var z1e,TG,tg,i2,I7,A7,ig,up,L7=M(()=>{Dt();Ce();tf();Bre();br();jn();bl();Et();cu();z1e=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},TG=function(i,e){return function(t,n){e(t,n,i)}},tg=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}},i2=class extends tg{constructor(){super("first")}memorize(e,t,n){}toJSON(){}fromJSON(){}},I7=class extends tg{constructor(){super("recentlyUsed"),this._cache=new fa(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}`,u=this._cache.peek(d);if(u&&u.touch>l&&u.type===n[c].completion.kind&&u.insertText===n[c].completion.insertText&&(l=u.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:qm.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},A7=class extends tg{constructor(){super("recentlyUsedByPrefix"),this._trie=SP.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:qm.fromString(n.type),this._trie.set(t,n)}}},ig=class t2{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new ne,this._persistSoon=new ti(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===lb.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=t2._strategyCtors.get(r)||i2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${t2._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(`${t2._storagePrefix}/${this._strategy.name}`,n,t,1)}}};ig._strategyCtors=new Map([["recentlyUsedByPrefix",A7],["recentlyUsed",I7],["first",i2]]);ig._storagePrefix="suggest/memories";ig=z1e([TG(0,Yr),TG(1,Mt)],ig);up=rr("ISuggestMemories");sr(up,ig,1)});var U1e,W1e,hp,IG=M(()=>{ft();U1e=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},W1e=function(i,e){return function(t,n){e(t,n,i)}},hp=class kG{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=kG.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)}};hp.AtEnd=new nt("atEndOfWord",!1);hp=U1e([W1e(1,Ke)],hp)});var j1e,V1e,Sd,AG=M(()=>{ft();j1e=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},V1e=function(i,e){return function(t,n){e(t,n,i)}},Sd=class n2{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=n2.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(n2._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=n2._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Sd.OtherSuggestions=new nt("hasOtherSuggestions",!1);Sd=j1e([V1e(1,Ke)],Sd)});var r2,LG=M(()=>{oi();Ce();hw();r2=class{constructor(e,t,n,r){this._disposables=new ne,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||!Wi(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new tu;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()}}});var K1e,wd,M7=M(()=>{VN();ri();qe();K1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wd=class i{provideSelectionRanges(e,t){return K1e(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,u=s.has(d)?s.get(d):0;s.set(d,u+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,u=s.has(d)?s.get(d):0;if(u-=1,s.set(d,Math.max(0,u)),u<0){let h=o.get(d);h||(h=new u_,o.set(d,h)),h.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 u=c.bracketInfo.bracketText,h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){let p=o.get(u);if(p){let m=p.shift();p.size===0&&o.delete(u);let g=P.fromPositions(c.range.getEndPosition(),m.getStartPosition()),b=P.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:b}),i._addBracketLeading(n,b,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+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:P.fromPositions(new Se(r,o),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(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:P.fromPositions(new Se(s,a),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(s,1),t.getEndPosition())}))}}};wd._maxDuration=30;wd._maxRounds=2});var q1e,xd,D7=M(()=>{oi();qe();M7();q1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xd=class i{static create(e,t){return q1e(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 wd().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,u=s[d];if(RR(u))return 2<<20;let h=iu(u,P.fromPositions(l),P.compareRangesUsingStarts),p=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!P.containsRange(g.range,p))break;m-=1}return m}}})}};xd.None=new class extends xd{distance(){return 0}}});var ng,fp,N7=M(()=>{oi();Cl();wi();ng=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},fp=class i{constructor(e,t,n,r,o,s,a=R_.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?O_:JR;for(let c=0;c<s.length;c++){let d=s[c];if(d.isInvalid)continue;let u=this._itemsByProvider.get(d.provider);u?u.push(d):this._itemsByProvider.set(d.provider,[d]);let h=d.position.column-d.editStart.column,p=h+n-(d.position.column-this._column);if(r.length!==p&&(r=p===0?"":t.slice(-p),o=r.toLowerCase()),d.word=r,p===0)d.score=yl.Default;else{let m=0;for(;m<h;){let g=r.charCodeAt(m);if(g===32||g===9)m+=1;else break}if(m>=p)d.score=yl.Default;else if(typeof d.completion.filterText=="string"){let g=l(r,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;vR(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=QR(r,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(r,o,m,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;d.score=g}}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?NR(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)}}});function Y1e(i,e,t){if(!e.getContextKeyValue(In.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}function X1e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}var G1e,Ju,$1e,hc,o2,DG=M(()=>{Dt();gi();At();qt();Ce();wi();Mn();ub();D7();$m();jn();ft();C_();Bc();N7();Qu();xt();Cl();Mi();Hy();cp();G1e=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},Ju=function(i,e){return function(t,n){e(t,n,i)}},$1e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},hc=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}};o2=class MG{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 ne,this._triggerCharacterListener=new ne,this._triggerQuickSuggest=new as,this._triggerState=void 0,this._completionDisposables=new ne,this._onDidCancel=new $e,this._onDidTrigger=new $e,this._onDidSuggest=new $e,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new je(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(){Vi(this._triggerCharacterListener),Vi([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(vG()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!X1e(this._editor,this._contextKeyService,this._configurationService)||hc.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="";yR(n.charCodeAt(n.length-1))?bR(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;il.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((e=Zi.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!hc.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(!il.isAllOff(r)){if(!il.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(il.valueFor(r,s)!=="on")return}Y1e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){Lt(this._editor.hasModel()),Lt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new hc(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 hc(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 Ri;let u=this._editor.getOption(108),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:p,showDeprecated:m}=MG._createSuggestFilter(this._editor),g=new dc(h,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:p,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),b=xd.create(this._editorWorkerService,this._editor),S=V0(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([S,b]).then(([k,N])=>$1e(this,void 0,void 0,function*(){var A;if((A=this._requestToken)===null||A===void 0||A.dispose(),!this._editor.hasModel())return;let H=e==null?void 0:e.clipboardText;if(!H&&k.needsClipboard&&(H=yield this._clipboardService.readText()),this._triggerState===void 0)return;let K=this._editor.getModel(),W=new hc(K,this._editor.getPosition(),e),re=Object.assign(Object.assign({},R_.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new fp(k.items,this._context.column,{leadingLineContent:W.leadingLineContent,characterCountDelta:W.column-this._context.column},N,this._editor.getOption(114),this._editor.getOption(108),re,H),this._completionDisposables.add(k.disposable),this._onNewContext(W),this._reportDurationsTelemetry(k.durations)})).catch(at)}_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(Ui(e.leadingLineContent)!==Ui(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(hc.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=hc.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})}}}}};o2=G1e([Ju(1,Ml),Ju(2,Ms),Ju(3,Dr),Ju(4,zc),Ju(5,Ke),Ju(6,Mt),Ju(7,be)],o2)});var rg,NG=M(()=>{Ce();rg=class i{constructor(e,t){this._disposables=new ne,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()}};rg._maxSelectionLength=51200});var RG=M(()=>{});var OG=M(()=>{RG()});var Q1e,fc,Ko,pp=M(()=>{bw();Lr();$P();zi();ft();Et();Oo();ar();Vw();Kn();xt();Q1e=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},fc=function(i,e){return function(t,n){e(t,n,i)}},Ko=class extends GP{constructor(e,t,n,r,o,s,a,l,c,d,u,h,p){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),n,o,s,a,l,c,d,u,h,p),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){sf(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Ko=Q1e([fc(4,He),fc(5,Zt),fc(6,ui),fc(7,Ke),fc(8,pn),fc(9,Ei),fc(10,yb),fc(11,Tt),fc(12,be)],Ko)});var J1e,R7,O7,s2,FG=M(()=>{Ht();gf();Ce();De();_b();Yi();ft();Et();J1e=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},R7=function(i,e){return function(t,n){e(t,n,i)}},O7=class i extends vb{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=v({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")}},s2=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new ne,this.element=me(e,fe(".suggest-status-bar"));let s=a=>a instanceof da?n.createInstance(O7,a,void 0):void 0;this._leftActions=new Po(this.element,{actionViewItemProvider:s}),this._rightActions=new Po(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()}};s2=J1e([R7(2,He),R7(3,Is),R7(4,Ke)],s2)});var mp,P7=M(()=>{Ht();Fw();qt();Ce();mp=class{constructor(){this._onDidWillResize=new $e,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new $e,this.onDidResize=this._onDidResize.event,this._sashListener=new ne,this._size=new Di(0,0),this._minSize=new Di(0,0),this._maxSize=new Di(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Il(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Il(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Il(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Pw.North}),this._southSash=new Il(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Pw.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(li.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(li.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(li.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(li.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 Di(t,e);Di.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}}});var HG=M(()=>{});var BG=M(()=>{HG()});function e0e(i,e,t){return UG(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t0e(t)})}catch(n){return at(n),!1}})}function t0e(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var Z1e,zG,UG,io,Zu=M(()=>{Rre();Uw();At();qt();Ce();BG();BP();ss();gw();Qre();ds();Z1e=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},zG=function(i,e){return function(t,n){e(t,n,i)}},UG=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},io=class WG{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new $e,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new ne,o=r.add(fP(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)=>UG(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=Zh);let c=yield qP(this._languageService,r,l),d=document.createElement("span");if(d.innerHTML=(a=(s=WG._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(48);fb(d,u)}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=>e0e(this._openerService,n,e.isTrusted),disposables:t}}}};io._ttpTokenizer=_f("tokenizeToString",{createHTML(i){return i}});io=Z1e([zG(1,Xi),zG(2,Qi)],io)});function og(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var i0e,n0e,a2,l2,F7=M(()=>{Ht();eb();or();qr();qt();Sl();Ce();Zu();P7();De();Et();i0e=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},n0e=function(i,e){return function(t,n){e(t,n,i)}};a2=class{constructor(e,t){this._editor=e,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new $e,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new ne,this._renderDisposeable=new ne,this._borderWidth=1,this._size=new Di(330,0),this.domNode=fe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(io,{editor:e}),this._body=fe(".body"),this._scrollbar=new mf(this._body,{alwaysConsumeMouseWheel:!0}),me(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=me(this._body,fe(".header")),this._close=me(this._header,fe("span"+mt.asCSSSelector(lt.close))),this._close.title=v("details.close","Close"),this._type=me(this._header,fe("p.type")),this._docs=me(this._body,fe("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=v("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 sn().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!og(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,gr(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else mr(this._type),this._type.title="",Wn(this._type),this.domNode.classList.add("no-type");if(mr(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),mr(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 Di(e,t);Di.equals(n,this._size)||(this._size=n,lR(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}};a2=i0e([n0e(1,He)],a2);l2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ne,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new mp,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=__(document.body),s=this.widget.getLayoutInfo(),a=new Di(220,2*s.lineHeight),l=e.top,c=function(){let N=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),A=-s.borderWidth+e.left+e.width,H=new Di(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),d=function(){let N=e.left-s.borderWidth-s.horizontalPadding,A=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),H=new Di(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),u=function(){let N=e.left,A=-s.borderWidth+e.top+e.height,H=new Di(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:A,left:N,fit:H.height-t.height,maxSizeBottom:H,maxSizeTop:H,minSize:a.with(H.width)}}(),h=[c,d,u],p=(r=h.find(N=>N.fit>=0))!==null&&r!==void 0?r:h.sort((N,A)=>A.fit-N.fit)[0],m=e.top+e.height-s.borderHeight,g,b=t.height,S=Math.max(p.maxSizeTop.height,p.maxSizeBottom.height);b>S&&(b=S);let k;n?b<=p.maxSizeTop.height?(g=!0,k=p.maxSizeTop):(g=!1,k=p.maxSizeBottom):b<=p.maxSizeBottom.height?(g=!1,k=p.maxSizeBottom):(g=!0,k=p.maxSizeTop),this._applyTopLeft({left:p.left,top:g?p.top:m-b}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,p===c,g,p!==c),this._resizable.minSize=p.minSize,this._resizable.maxSize=k,this._resizable.layout(b,Math.min(k.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`}}});var Zs,H7=M(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Zs||(Zs={}))});function sg(i,e,t,n){let r=n===Zs.ROOT_FOLDER?["rootfolder-icon"]:n===Zs.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===Lo.data)o=Om.parseMetaData(t).get(Om.META_DATA_LABEL);else{let s=t.path.match(r0e);s?(o=c2(s[2].toLowerCase()),s[1]&&r.push(`${c2(s[1].toLowerCase())}-name-dir-icon`)):o=c2(t.authority.toLowerCase())}if(n===Zs.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=o0e(i,e,t);s&&r.push(`${c2(s)}-lang-file-icon`)}}return r}function o0e(i,e,t){if(!t)return null;let n=null;if(t.scheme===Lo.data){let o=Om.parseMetaData(t).get(Om.META_DATA_MIME);o&&(n=e.getLanguageIdByMimeType(o))}else{let r=i.getModel(t);r&&(n=r.getLanguageId())}return n&&n!==Zh?n:e.guessLanguageIdByFilepathOrFirstLine(t)}function c2(i){return i.replace(/[\11\12\14\15\40]/g,"/")}var r0e,jG=M(()=>{Im();lo();gw();H7();r0e=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function U7(i){return`suggest-aria-id:${i}`}function z7(i){return i.replace(/\r\n|\r|\n/g,"")}var s0e,B7,ag,a0e,l0e,u2,VG=M(()=>{Ht();XP();or();qr();qt();Cl();Ce();Sn();br();jG();is();ss();De();H7();Al();ar();F7();s0e=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},B7=function(i,e){return function(t,n){e(t,n,i)}};a0e=Ti("suggest-more-info",lt.chevronRight,v("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),l0e=new(ag=class d2{extract(e,t){if(e.textLabel.match(d2._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(d2._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let n=d2._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}},ag._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*\))/,ag._regexStrict=new RegExp(`^${ag._regexRelaxed.source}$`,"i"),ag),u2=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new $e,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new ne,n=e;n.classList.add("show-file-icons");let r=me(e,fe(".icon")),o=me(r,fe("span.colorspan")),s=me(e,fe(".contents")),a=me(s,fe(".main")),l=me(a,fe(".icon-label.codicon")),c=me(a,fe("span.left")),d=me(a,fe("span.right")),u=new Sb(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=me(c,fe("span.signature-label")),p=me(c,fe("span.qualifier-label")),m=me(d,fe("span.details-label")),g=me(d,fe("span.readMore"+mt.asCSSSelector(a0e)));g.title=v("readMore","Read More");let b=()=>{let S=this._editor.getOptions(),k=S.get(48),N=k.getMassagedFontFamily(),A=k.fontFeatureSettings,H=S.get(115)||k.fontSize,K=S.get(116)||k.lineHeight,W=k.fontWeight,re=k.letterSpacing,ae=`${H}px`,Ne=`${K}px`,he=`${re}px`;n.style.fontSize=ae,n.style.fontWeight=W,n.style.letterSpacing=he,a.style.fontFamily=N,a.style.fontFeatureSettings=A,a.style.lineHeight=Ne,r.style.height=Ne,r.style.width=Ne,g.style.height=Ne,g.style.width=Ne};return b(),t.add(this._editor.onDidChangeConfiguration(S=>{(S.hasChanged(48)||S.hasChanged(115)||S.hasChanged(116))&&b()})),{root:n,left:c,right:d,icon:r,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:p,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){let{completion:r}=e;n.root.id=U7(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:ru(e.score)},s=[];if(r.kind===19&&l0e.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=sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FILE),l=sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.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=[sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FOLDER),sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...mt.asClassNameArray(qm.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=z7(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=z7(r.label.detail||""),n.detailsLabel.textContent=z7(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(114).showInlineDetails?gr(n.detailsLabel):Wn(n.detailsLabel),og(e)?(n.right.classList.add("can-expand-details"),gr(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"),Wn(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};u2=s0e([B7(1,Si),B7(2,Xi),B7(3,pn)],u2)});var c0e,h2,d0e,f2,u0e,W7,gp,V7,KG=M(()=>{Ht();d0();gP();Dt();At();qt();Ce();Ore();wi();OG();pp();FG();W4();De();ft();Et();cu();_r();xw();ar();P7();Qu();F7();VG();nb();c0e=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},h2=function(i,e){return function(t,n){e(t,n,i)}},d0e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Oe("editorSuggestWidget.background",{dark:xl,light:xl,hcDark:xl,hcLight:xl},v("editorSuggestWidgetBackground","Background color of the suggest widget."));Oe("editorSuggestWidget.border",{dark:su,light:su,hcDark:su,hcLight:su},v("editorSuggestWidgetBorder","Border color of the suggest widget."));f2=Oe("editorSuggestWidget.foreground",{dark:_a,light:_a,hcDark:_a,hcLight:_a},v("editorSuggestWidgetForeground","Foreground color of the suggest widget."));Oe("editorSuggestWidget.selectedForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},v("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.selectedIconForeground",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},v("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));u0e=Oe("editorSuggestWidget.selectedBackground",{dark:jm,light:jm,hcDark:jm,hcLight:jm},v("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));Oe("editorSuggestWidget.focusHighlightForeground",{dark:zm,light:zm,hcDark:zm,hcLight:zm},v("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));Oe("editorSuggestWidgetStatus.foreground",{dark:Or(f2,.5),light:Or(f2,.5),hcDark:Or(f2,.5),hcLight:Or(f2,.5)},v("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));W7=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Ko}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let n=JSON.parse(t);if(Di.is(n))return Di.lift(n)}catch(n){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},gp=class j7{constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Bi,this._pendingShowDetails=new Bi,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new as,this._disposables=new ne,this._onDidSelect=new QS,this._onDidFocus=new QS,this._onDidHide=new $e,this._onDidShow=new $e,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new $e,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new mp,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new V7(this,e),this._persistedSize=new W7(t,e);class s{constructor(p,m,g=!1,b=!1){this.persistedSize=p,this.currentSize=m,this.persistHeight=g,this.persistWidth=b}}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(h=>{var p,m,g,b;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:S,defaultSize:k}=this.getLayoutInfo(),N=Math.round(S/2),{width:A,height:H}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-H)<=N)&&(H=(m=(p=a.persistedSize)===null||p===void 0?void 0:p.height)!==null&&m!==void 0?m:k.height),(!a.persistWidth||Math.abs(a.currentSize.width-A)<=N)&&(A=(b=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&b!==void 0?b:k.width),this._persistedSize.store(new Di(A,H))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=me(this.element.domNode,fe(".message")),this._listElement=me(this.element.domNode,fe(".tree"));let l=o.createInstance(a2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new l2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(114).showIcons);c();let d=o.createInstance(u2,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new tb("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let p=h.textLabel;if(typeof h.completion.label!="string"){let{detail:S,description:k}=h.completion.label;S&&k?p=v("label.full","{0}{1}, {2}",p,S,k):S?p=v("label.detail","{0}{1}",p,S):k&&(p=v("label.desc","{0}, {1}",p,k))}if(!h.isResolved||!this._isDetailsVisible())return p;let{documentation:m,detail:g}=h.completion,b=Do("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return v("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",p,b)}}}),this._list.style(CP({listInactiveFocusBackground:u0e,listInactiveFocusOutline:va})),this._status=o.createInstance(s2,this.element.domNode,nl);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(114).showStatusBar);u(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(114)&&(u(),c())})),this._ctxSuggestWidgetVisible=it.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=it.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=it.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=it.HasFocusedSuggestion.bindTo(n),this._disposables.add(ts(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}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=au(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=Vt(o=>d0e(this,void 0,void 0,function*(){let s=wl(()=>{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:U7(r)}))}).catch(at)),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:Wn(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=j7.LOADING_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=j7.NO_SUGGESTIONS_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 4:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 5:Wn(this._messageElement),gr(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=wl(()=>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=tw(()=>{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")):(og(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=tw(()=>{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=__(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 Di(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,u=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,p=wn(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=p.top+m.top+m.height,b=Math.min(o.height-g-s.verticalPadding,u),S=p.top+m.top-s.verticalPadding,k=Math.min(S,u),N=Math.min(Math.max(k,b)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<h&&(a=h),a>N&&(a=N);let A=150;a>b||this._forceRenderingAbove&&S>A?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),N=k):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),N=b),this.element.preferredSize=new Di(d,s.defaultSize.height),this.element.maxSize=new Di(c,N),this.element.minSize=new Di(220,h),this._cappedHeight=a===u?{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=pP(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 Di(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}};gp.LOADING_MESSAGE=v("suggestWidget.loading","Loading...");gp.NO_SUGGESTIONS_MESSAGE=v("suggestWidget.noSuggestions","No suggestions.");gp=c0e([h2(1,Yr),h2(2,Ke),h2(3,pn),h2(4,He)],gp);V7=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 Di(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}}});var h0e,vp,f0e,K7,qo,q7,lg,xo,Er,p2=M(()=>{Mo();oi();Dt();gi();At();qt();ire();Ce();nr();ml();Mi();cb();Ze();xa();ri();qe();jt();cp();Xu();L7();IG();De();zi();ft();Et();C_();Qu();AG();LG();DG();NG();KG();Bc();lo();NP();h0e=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},vp=function(i,e){return function(t,n){e(t,n,i)}},f0e=!1,K7=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:P.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}},qo=class qG{static get(e){return e.getContribution(qG.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 Bi,this._toDispose=new ne,this._selectors=new q7(u=>u.priority),this._telemetryGate=0,this.editor=e,this.model=o.createInstance(o2,this.editor),this._selectors.register({priority:0,select:(u,h,p)=>this._memoryService.select(u,h,p)});let l=it.InsertMode.bindTo(r);l.set(e.getOption(114).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(114).insertMode)),this.widget=this._toDispose.add(new F_(()=>{let u=this._instantiationService.createInstance(gp,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(b=>this._insertSuggestion(b,0),this));let h=new r2(this.editor,u,this.model,b=>this._insertSuggestion(b,2));this._toDispose.add(h);let p=it.MakesTextEdit.bindTo(this._contextKeyService),m=it.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=it.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Ft(()=>{p.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:b})=>{let S=this.editor.getPosition(),k=b.editStart.column,N=S.column,A=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!b.completion.additionalTextEdits&&!(b.completion.insertTextRules&4)&&N-k===b.completion.insertText.length&&(A=this.editor.getModel().getValueInRange({startLineNumber:S.lineNumber,startColumn:k,endLineNumber:S.lineNumber,endColumn:N})!==b.completion.insertText),p.set(A),m.set(!Se.equals(b.editInsertEnd,b.editReplaceEnd)),g.set(!!b.provider.resolveCompletionItem||!!b.completion.documentation||b.completion.detail!==b.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(b=>{if(b.toKeyCodeChord().equals(new ew(!0,!1,!1,!1,33))||zn&&b.toKeyCodeChord().equals(new ew(!1,!1,!1,!0,33))){b.stopPropagation();return}b.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new F_(()=>this._toDispose.add(new rg(this.editor,this.model)))),this._alternatives=this._toDispose.add(new F_(()=>this._toDispose.add(new Sd(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(hp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new K7(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(let m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let p=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(114);m.selectionMode==="never"||m.selectionMode==="always"?p=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?p=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(p=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,p)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{f0e||(this.model.cancel(),this.model.clear())}));let c=it.AcceptSuggestionsOnEnter.bindTo(r),d=()=>{let u=this.editor.getOption(1);c.set(u==="on"||u==="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=Zi.get(this.editor);if(!n)return;let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new Ri;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 u=Ea.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(h=>Kt.replaceMove(P.lift(h.range),h.text))),u.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){let u=new Ln(!0),h,p=r.onDidChangeContent(S=>{if(S.isFlush){l.cancel(),p.dispose();return}for(let k of S.changes){let N=P.getEndPosition(k.range);(!h||Se.isBefore(N,h))&&(h=N)}}),m=t;t|=2;let g=!1,b=this.editor.onWillType(()=>{b.dispose(),g=!0,m&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested||h&&s.completion.additionalTextEdits.some(k=>Se.isBefore(h,P.getStartPosition(k.range))))return!1;g&&this.editor.pushUndoStop();let S=Ea.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(k=>Kt.replaceMove(P.lift(k.range),k.text))),S.restoreRelativeVerticalPositionOfCursor(this.editor),(g||!(m&2))&&this.editor.pushUndoStop(),!0}).then(S=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",u.elapsed(),S),p.dispose(),b.dispose()}))}let{insertText:d}=s.completion;s.completion.insertTextRules&4||(d=Vo.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===lg.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(u=>{s.completion.extensionId?Ut(u):at(u)}))),t&4&&this._alternatives.value.set(e,u=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(u,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:db(Nr(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:nO(t.uri)})}getOverwriteInfo(e,t){Lt(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(Wi(e.completion.additionalTextEdits)){let t=v("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Ni(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};li.once(this.model.onDidTrigger)(o=>{let s=[];li.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Vi(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Vi(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)}};qo.ID="editor.contrib.suggestController";qo=h0e([vp(1,up),vp(2,ui),vp(3,Ke),vp(4,He),vp(5,zc),vp(6,Dr)],qo);q7=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}},lg=class i extends se{constructor(){super({id:i.id,label:v("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ce.and(O.writable,O.hasCompletionItemProvider,it.Visible.toNegated()),kbOpts:{kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=qo.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};lg.id="editor.action.triggerSuggest";Ae(qo.ID,qo,2);X(lg);xo=100+90,Er=xi.bindToContribution(qo.get);Me(new Er({id:"acceptSelectedSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ce.and(it.Visible,O.textInputFocus),weight:xo},{primary:3,kbExpr:ce.and(it.Visible,O.textInputFocus,it.AcceptSuggestionsOnEnter,it.MakesTextEdit),weight:xo}],menuOpts:[{menuId:nl,title:v("accept.insert","Insert"),group:"left",order:1,when:it.HasInsertAndReplaceRange.toNegated()},{menuId:nl,title:v("accept.insert","Insert"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert"))},{menuId:nl,title:v("accept.replace","Replace"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace"))}]}));Me(new Er({id:"acceptAlternativeSelectedSuggestion",precondition:ce.and(it.Visible,O.textInputFocus,it.HasFocusedSuggestion),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:nl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert")),title:v("accept.replace","Replace")},{menuId:nl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace")),title:v("accept.insert","Insert")}]}));St.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Me(new Er({id:"hideSuggestWidget",precondition:it.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:9,secondary:[1033]}}));Me(new Er({id:"selectNextSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Me(new Er({id:"selectNextPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:12,secondary:[2060]}}));Me(new Er({id:"selectLastSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Me(new Er({id:"selectPrevSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Me(new Er({id:"selectPrevPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:11,secondary:[2059]}}));Me(new Er({id:"selectFirstSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Me(new Er({id:"focusSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Me(new Er({id:"focusAndAcceptSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Me(new Er({id:"toggleSuggestionDetails",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:nl,group:"right",order:1,when:ce.and(it.DetailsVisible,it.CanResolve),title:v("detail.more","show less")},{menuId:nl,group:"right",order:1,when:ce.and(it.DetailsVisible.toNegated(),it.CanResolve),title:v("detail.less","show more")}]}));Me(new Er({id:"toggleExplainMode",precondition:it.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Me(new Er({id:"toggleSuggestionFocus",precondition:it.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2570,mac:{primary:778}}}));Me(new Er({id:"insertBestCompletion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),hp.AtEnd,it.Visible.toNegated(),Sd.OtherSuggestions.toNegated(),Zi.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(m_(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:xo,primary:2}}));Me(new Er({id:"insertNextSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),Sd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2}}));Me(new Er({id:"insertPrevSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),Sd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:1026}}));X(class extends se{constructor(){super({id:"editor.action.resetSuggestSize",label:v("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=qo.get(e))===null||t===void 0||t.resetWidgetSize()}})});function p0e(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var m2,g2,GG=M(()=>{qt();Ce();ri();qe();br();Xu();T7();p2();Ys();f7();oi();m2=class extends oe{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=Gs("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=qo.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{var d;dn(b=>this.checkModelVersion(b));let u=this.editor.getModel();if(!u)return-1;let h=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(u);if(!h)return-1;let p=Se.lift(l),m=c.map((b,S)=>{let N=g2.fromSuggestion(r,u,p,b,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(u),A=h.augments(N);return{index:S,valid:A,prefixLength:N.text.length,suggestItem:b}}).filter(b=>b&&b.valid&&b.prefixLength>0),g=zR(m,HR(b=>b.prefixLength,BR));return g?g.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(li.once(r.model.onDidTrigger)(a=>{s()}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!p0e(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,dn(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){let e=qo.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 g2.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=qo.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=qo.get(this.editor);e==null||e.forceRenderingAbove()}},g2=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new Vo().parse(s);c.children.length<100&&lp.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(P.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 GO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new $u(this.range,this.insertText)}}});var m0e,eh,Tr,v2=M(()=>{Mo();qt();Ce();Ys();Gu();N_();ri();Ns();xt();Fy();Jq();Hy();qy();EG();GG();eoe();zi();jn();ft();Et();m0e=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)}},Tr=class $G extends oe{static get(e){return e.getContribution($G.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=F0("inlineCompletionModel",void 0),this.textModelVersionId=Gs("textModelVersionId",-1),this.cursorPosition=Gs("cursorPosition",new Se(1,1)),this.suggestWidgetAdaptor=this._register(new m2(this.editor,()=>{var u,h;return(h=(u=this.model.get())===null||u===void 0?void 0:u.selectedInlineCompletion.get())===null||h===void 0?void 0:h.toSingleTextEdit(void 0)},u=>this.updateObservables(u,wo.Other))),this._enabled=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(Wy,this.editor,{ghostText:this.model.map((u,h)=>u==null?void 0:u.ghostText.read(h)),minReservedLineCount:Ny(0),targetTextModel:this.model.map(u=>u==null?void 0:u.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new In(this.contextKeyService,this.model)),this._register(li.runAndSubscribe(e.onDidChangeModel,()=>dn(u=>{this.model.set(void 0,u),this.updateObservables(u,wo.Other);let h=e.getModel();if(h){let p=t.createInstance(e2,h,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,$s(e.onDidChangeConfiguration,()=>e.getOption(114).preview),$s(e.onDidChangeConfiguration,()=>e.getOption(114).previewMode),$s(e.onDidChangeConfiguration,()=>e.getOption(60).mode),this._enabled);this.model.set(p,u)}})));let c=u=>{var h;return u.isUndoing?wo.Undo:u.isRedoing?wo.Redo:!((h=this.model.get())===null||h===void 0)&&h.isAcceptingPartially?wo.AcceptWord:wo.Other};this._register(e.onDidChangeModelContent(u=>dn(h=>this.updateObservables(h,c(u))))),this._register(e.onDidChangeCursorPosition(u=>dn(h=>{var p;this.updateObservables(h,wo.Other),u.reason===3&&((p=this.model.get())===null||p===void 0||p.stop(h))}))),this._register(e.onDidType(()=>dn(u=>{var h;this.updateObservables(u,wo.Other),this._enabled.get()&&((h=this.model.get())===null||h===void 0||h.trigger(u))}))),this._register(this.commandService.onDidExecuteCommand(u=>{new Set([ef.Tab.id,ef.DeleteLeft.id,ef.DeleteRight.id,Ry,"acceptSelectedSuggestion"]).has(u.commandId)&&e.hasTextFocus()&&this._enabled.get()&&dn(p=>{var m;(m=this.model.get())===null||m===void 0||m.trigger(p)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(60).keepOnBlur||Qs.dropDownVisible||dn(u=>{var h;(h=this.model.get())===null||h===void 0||h.stop(u)})})),this._register(un("forceRenderingAbove",u=>{var h;let p=(h=this.model.read(u))===null||h===void 0?void 0:h.state.read(u);p!=null&&p.suggestItem?p.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(Ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(un("play audio cue & read suggestion",u=>{let h=this.model.read(u),p=h==null?void 0:h.state.read(u);if(!h||!p||!p.completion){d=void 0;return}if(p.completion.semanticId!==d){if(d=p.completion.semanticId,h.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(JP.inlineSuggestion).then(()=>{if(this.editor.getOption(6)){let m=h.textModel.getLineContent(p.ghostText.lineNumber);Ni(p.ghostText.renderForScreenReader(m))}})}})),this._register(new Ky(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 Se(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 Se(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};Tr.ID="editor.contrib.inlineCompletionsController";Tr=m0e([eh(1,He),eh(2,Ke),eh(3,Mt),eh(4,ui),eh(5,an),eh(6,be),eh(7,QP)],Tr)});var Ed,cg,dg,_2,b2,y2,C2,ug,hg,YG=M(()=>{Ys();Ze();jt();Fy();Hy();v2();De();Yi();jn();ft();Ed=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},cg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.next()})}};cg.ID=Py;dg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.previous()})}};dg.ID=Oy;_2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:O.writable})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.triggerExplicitly()})}},b2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextWord(r.editor)})}},y2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextLine(r.editor)})}},C2=class extends se{constructor(){super({id:Ry,label:v("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:In.inlineSuggestionVisible,menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ce.and(In.inlineSuggestionVisible,O.tabMovesFocus.toNegated(),In.inlineSuggestionHasIndentationLessThanTabSize)}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);r&&((n=r.model.get())===null||n===void 0||n.accept(r.editor),r.editor.focus())})}},ug=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:In.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Ed(this,void 0,void 0,function*(){let n=Tr.get(t);dn(r=>{var o;(o=n==null?void 0:n.model.get())===null||o===void 0||o.stop(r)})})}};ug.ID="editor.action.inlineSuggest.hide";hg=class i extends os{constructor(){super({id:i.ID,title:v("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:xe.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ce.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Ed(this,void 0,void 0,function*(){let n=e.get(Mt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)})}};hg.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var g0e,fg,G7,S2,XG=M(()=>{Ht();Sl();Ce();Ys();qe();ss();lc();v2();qy();Zu();De();Vw();Et();ds();Bc();g0e=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},fg=function(i,e){return function(t,n){e(t,n,i)}},G7=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}},S2=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=Tr.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 bd(1e3,this,P.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 bd(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new bd(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=Tr.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new G7(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new ne,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(Qs,this._editor,!1,Ny(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=fe,o=r("div.hover-row.markdown-hover"),s=me(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new io({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=v("inlineSuggestionFollows","Suggestion:"),u=n.add(a.render(new sn().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};n.add(un("update hover",c=>{var d;let u=(d=t.controller.model.read(c))===null||d===void 0?void 0:d.ghostText.read(c);if(u){let h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else Zd(s)})),e.fragment.appendChild(o)}};S2=g0e([fg(1,Xi),fg(2,Qi),fg(3,yb),fg(4,He),fg(5,Dr)],S2)});var $7=M(()=>{Ze();lc();YG();XG();v2();Yi();Ae(Tr.ID,Tr,3);X(_2);X(cg);X(dg);X(b2);X(y2);X(C2);X(ug);mi(hg);jo.register(S2)});var QG=M(()=>{});var JG=M(()=>{QG()});var v0e,_0e,b0e,y0e,w2,_p,pg=M(()=>{Ht();Dt();or();Ce();wi();qr();JG();qe();qn();Et();v0e=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},_0e=function(i,e){return function(t,n){e(t,n,i)}},b0e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},y0e=ct.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:y_,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),w2=class i extends oe{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=fe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=fe("span.icon");this.domNode.append(t),t.classList.add(...mt.asClassNameArray(lt.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(Rt(this.domNode,on.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)}};w2.baseId="editor.widget.inlineProgressWidget";_p=class extends oe{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Bi),this._currentWidget=new Bi,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return b0e(this,void 0,void 0,function*(){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=wl(()=>{let o=P.fromPositions(e);this._currentDecorations.set([{range:o,options:y0e}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(w2,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()}};_p=v0e([_0e(2,He)],_p)});var ZG=M(()=>{});var e$=M(()=>{ZG()});var t$=M(()=>{});var i$=M(()=>{t$()});var n$,C0e,S0e,Y7,X7,x2,E2,r$=M(()=>{Ht();Fw();ma();hP();Ce();bw();i$();qe();qn();n$=new dt(new As(0,122,204)),C0e={showArrow:!0,showFrame:!0,className:"",frameColor:n$,arrowColor:n$,keepEditorSelection:!1},S0e="vs.editor.contrib.zoneWidget",Y7=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)}},X7=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},x2=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(),iw(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(){iw(this._ruleName),dR(`.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:P.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};x2._IdGenerator=new dP(".arrow-decoration-");E2=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new ne,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=cO(t),sf(this.options,C0e,!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 x2(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=P.isIRange(e)?P.lift(e):P.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:ct.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 h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}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(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Y7(s,n.lineNumber,n.column,t,p=>this._onViewZoneTop(p),p=>this._onViewZoneHeight(p),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new X7(S0e+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"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 u=this.editor.getModel();if(u){let h=u.validateRange(new P(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.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 Il(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}}});function a$(i){let e=i.get(Zt).getFocusedCodeEditor();return e instanceof Ko?e.getParentEditor():e}var o$,s$,Q7,Pn,mg,w0e,bp,l$,T2,k2,c$,d$,AKe,LKe,MKe,DKe,Td,NKe,RKe,OKe,PKe,FKe,th=M(()=>{Ht();gf();Pc();or();qr();ma();qt();bw();e$();Ze();Lr();pp();r$();De();_b();ft();bl();Et();_r();o$=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},s$=function(i,e){return function(t,n){e(t,n,i)}},Q7=rr("IPeekViewService");sr(Q7,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);(function(i){i.inPeekEditor=new nt("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Pn||(Pn={}));mg=class{constructor(e,t){e instanceof Ko&&Pn.inPeekEditor.bindTo(t)}dispose(){}};mg.ID="editor.contrib.referenceController";mg=o$([s$(1,Ke)],mg);Ae(mg.ID,mg,0);w0e={headerBackgroundColor:dt.white,primaryHeadingColor:dt.fromHex("#333333"),secondaryHeadingColor:dt.fromHex("#6c6c6cb3")},bp=class extends E2{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,sf(this.options,w0e,!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=fe(".head"),this._bodyElement=fe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=fe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ts(this._titleElement,"click",o=>this._onTitleClick(o))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=fe("span.filename"),this._secondaryHeading=fe("span.dirname"),this._metaHeading=fe("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=fe(".peekview-actions");me(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new Po(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ns("peekview.close",v("label.close","Close"),mt.asClassName(lt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:WP.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:mr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,gr(this._metaHeading)):Wn(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`)}};bp=o$([s$(2,He)],bp);l$=Oe("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewTitleBackground","Background color of the peek view title area.")),T2=Oe("peekViewTitleLabel.foreground",{dark:dt.white,light:dt.black,hcDark:dt.white,hcLight:_a},v("peekViewTitleForeground","Color of the peek view title.")),k2=Oe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),c$=Oe("peekView.border",{dark:Hm,light:Hm,hcDark:ls,hcLight:ls},v("peekViewBorder","Color of the peek view borders and arrow.")),d$=Oe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewResultsBackground","Background color of the peek view result list.")),AKe=Oe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:dt.white,hcLight:_a},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),LKe=Oe("peekViewResult.fileForeground",{dark:dt.white,light:"#1E1E1E",hcDark:dt.white,hcLight:_a},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),MKe=Oe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),DKe=Oe("peekViewResult.selectionForeground",{dark:dt.white,light:"#6C6C6C",hcDark:dt.white,hcLight:_a},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Td=Oe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:dt.black,hcLight:dt.white},v("peekViewEditorBackground","Background color of the peek view editor.")),NKe=Oe("peekViewEditorGutter.background",{dark:Td,light:Td,hcDark:Td,hcLight:Td},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),RKe=Oe("peekViewEditorStickyScroll.background",{dark:Td,light:Td,hcDark:Td,hcLight:Td},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),OKe=Oe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),PKe=Oe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),FKe=Oe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:va,hcLight:va},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var E0e,Go,J7,pc,Wr,yp=M(()=>{At();qt();hP();Ce();tf();lo();wi();qe();De();E0e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Go=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=uP.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?v({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,Nr(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",Nr(this.uri),this.range.startLineNumber,this.range.startColumn)}},J7=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 P(r,l.startColumn,r,o),d=new P(s,a,s,1073741824),u=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),p=n.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+p,highlight:{start:u.length,end:u.length+h.length}}}},pc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new KR}dispose(){Vi(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",Nr(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Nr(this.uri),this.uri.fsPath)}resolve(e){return E0e(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 J7(n))}catch(n){at(n)}return this})}},Wr=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new $e,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||!_w.isEqual(r.uri,o.uri,!0))&&(r=new pc(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new Go(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){Vi(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?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("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:Fc(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()&&P.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 _w.compare(e.uri,t.uri)||P.compareRangesUsingStarts(e.range,t.range)}}});var u$=M(()=>{});var h$=M(()=>{u$()});var N2,R2,I2,A2,L2,M2,Z7,Cp,eT,Sp,D2,p$=M(()=>{Ht();noe();Zre();XP();Cl();Ce();lo();ca();De();Et();Gn();bb();nb();yp();N2=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},R2=function(i,e){return function(t,n){e(t,n,i)}},I2=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Wr||e instanceof pc}getChildren(e){if(e instanceof Wr)return e.groups;if(e instanceof pc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};I2=N2([R2(0,xn)],I2);A2=class{getHeight(){return 23}getTemplateId(e){return e instanceof pc?Cp.id:Sp.id}},L2=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Go){let n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Nr(e.uri)}};L2=N2([R2(0,Bt)],L2);M2=class{getId(e){return e instanceof Go?e.id:e.uri}},Z7=class extends oe{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new Sb(n,{supportHighlights:!0})),this.badge=new iF(me(n,fe(".count")),{},bP),e.appendChild(n)}set(e,t){let n=rf(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(v("referencesCount","{0} references",r)):this.badge.setTitleFormat(v("referenceCount","{0} reference",r))}};Z7=N2([R2(1,Dl)],Z7);Cp=class f${constructor(e){this._instantiationService=e,this.templateId=f$.id}renderTemplate(e){return this._instantiationService.createInstance(Z7,e)}renderElement(e,t,n){n.set(e.element,ru(e.filterData))}disposeTemplate(e){e.dispose()}};Cp.id="FileReferencesRenderer";Cp=N2([R2(0,He)],Cp);eT=class{constructor(e){this.label=new YP(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(`${Nr(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=r;t&&!yl.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,ru(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},Sp=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new eT(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}};Sp.id="OneReferenceRenderer";D2=class{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var T0e,mc,m$,O2,P2,tT,F2,g$=M(()=>{Ht();toe();ma();qt();Ce();Im();lo();h$();pp();qe();qn();Kn();gw();ss();ca();p$();th();De();Et();Gn();bb();tF();ar();kre();yp();T0e=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},mc=function(i,e){return function(t,n){e(t,n,i)}},m$=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},O2=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new ne,this._callOnModelChange=new ne,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(!P.equalsRange(o,r.range)){if(P.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()}};O2.DecorationOptions=ct.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});P2=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}}},tT=class extends eF{},F2=class extends bp{constructor(e,t,n,r,o,s,a,l,c,d,u,h){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=u,this._languageConfigurationService=h,this._disposeOnNewModel=new ne,this._callOnDispose=new ne,this._onDidSelectReference=new $e,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Di(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(),Vi(this._preview),Vi(this._previewNotAvailableMessage),Vi(this._tree),Vi(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){let t=e.getColor(c$)||dt.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(l$)||dt.transparent,primaryHeadingColor:e.getColor(T2),secondaryHeadingColor:e.getColor(k2)})}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=me(e,fe("div.messages")),Wn(this._messageContainer),this._splitView=new ZP(e,{orientation:1}),this._previewContainer=me(e,fe("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(Ko,this._previewContainer,t,{},this.editor),Wn(this._previewContainer),this._previewNotAvailableMessage=new Tw(v("missingPreviewMessage","no preview available"),Zh,Tw.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=me(e,fe("div.ref-tree.inline"));let n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new D2,keyboardNavigationLabelProvider:this._instantiationService.createInstance(L2),identityProvider:new M2,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:d$}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(ts(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(tT,"ReferencesWidget",this._treeContainer,new A2,[this._instantiationService.createInstance(Cp),this._instantiationService.createInstance(Sp)],this._instantiationService.createInstance(I2),n),this._splitView.addView({onDidChange:li.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},$w.Distribute),this._splitView.addView({onDidChange:li.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)}},$w.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 Go&&(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")}),Wn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Di(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=v("noResults","No results"),gr(this._messageContainer),Promise.resolve(void 0)):(Wn(this._messageContainer),this._decorationsManager=new O2(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"),gr(this._treeContainer),gr(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 Go)return e;if(e instanceof pc&&e.children.length>0)return e.children[0]}revealReference(e){return m$(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return m$(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Lo.inMemory?this.setTitle(iO(e.uri),this._uriLabel.getUriLabel(rf(e.uri))):this.setTitle(v("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}Vi(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=P.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()})}};F2=T0e([mc(3,pn),mc(4,xn),mc(5,He),mc(6,Q7),mc(7,Dl),mc(8,tP),mc(9,Bt),mc(10,Xi),mc(11,Tt)],F2)});function nh(i,e){let t=a$(i);if(!t)return;let n=ol.get(t);n&&e(n)}var k0e,wp,v$,ih,ol,nT=M(()=>{Dt();At();gl();Ce();Lr();ri();qe();th();De();zi();jn();ft();Et();lw();tF();Oo();cu();yp();g$();k0e=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},wp=function(i,e){return function(t,n){e(t,n,i)}},v$=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ih=new nt("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),ol=class iT{static get(e){return e.getContribution(iT.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 ne,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=ih.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=P2.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(F2,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(v("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(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Se(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).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 v$(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 v$(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=P.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=iT.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,Vt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,at(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)}};ol.ID="editor.contrib.referencesController";ol=k0e([wp(2,Ke),wp(3,Zt),wp(4,Ei),wp(5,He),wp(6,Yr),wp(7,Mt)],ol);No.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:di(2089,60),when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});No.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!0)})}});No.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!1)})}});St.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");St.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");St.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");St.registerCommand("closeReferenceSearch",i=>nh(i,e=>e.closeWidget()));No.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ce.and(Pn.inPeekEditor,ce.not("config.editor.stablePeek"))});No.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ce.and(ih,ce.not("config.editor.stablePeek"))});No.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ce.and(ih,Yw,Xw.negate(),Qw.negate()),handler(i){var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.revealReference(n[0]))}});No.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ce.and(ih,Yw,Xw.negate(),Qw.negate()),handler(i){var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.openReference(n[0],!0,!0))}});St.registerCommand("openReference",i=>{var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.openReference(n[0],!1,!0))})});var _$,gg,sT,vg,rT,oT,b$=M(()=>{qt();Ce();lo();Ze();Lr();qe();De();ft();bl();Et();Gn();lw();Oo();_$=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},gg=function(i,e){return function(t,n){e(t,n,i)}},sT=new nt("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),vg=rr("ISymbolNavigationService"),rT=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=sT.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 oT(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 u of t.references)if(nf(u.uri,a.uri))c=!0,d=d||P.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=XS(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:P.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?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};rT=_$([gg(0,Ke),gg(1,Zt),gg(2,Ei),gg(3,Bt)],rT);sr(vg,rT,1);Me(new class extends xi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:sT,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(vg).revealNext(e)}});No.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:sT,primary:9,handler(i){i.get(vg).reset()}});oT=class{constructor(e){this._listener=new Map,this._disposables=new ne,this._onDidChange=new $e,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(),Vi(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,XS(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)}};oT=_$([gg(0,Zt)],oT)});function _g(i,e,t,n){return aT(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(n(a,i,e)).then(void 0,l=>{Ut(l)})),s=yield Promise.all(o);return vr(s.flat())})}function rh(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideDefinition(o,s,n))}function lT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideDeclaration(o,s,n))}function cT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideImplementation(o,s,n))}function dT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideTypeDefinition(o,s,n))}function bg(i,e,t,n,r){return _g(e,t,i,(o,s,a)=>aT(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 yg(i){return aT(this,void 0,void 0,function*(){let e=yield i(),t=new Wr(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}var aT,H2=M(()=>{oi();gi();At();Ze();xt();yp();aT=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Gr("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=rh(n.definitionProvider,e,t,et.None);return yg(()=>r)});Gr("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=dT(n.typeDefinitionProvider,e,t,et.None);return yg(()=>r)});Gr("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(be),r=lT(n.declarationProvider,e,t,et.None);return yg(()=>r)});Gr("_executeReferenceProvider",(i,e,t)=>{let n=i.get(be),r=bg(n.referenceProvider,e,t,!1,et.None);return yg(()=>r)});Gr("_executeImplementationProvider",(i,e,t)=>{let n=i.get(be),r=cT(n.implementationProvider,e,t,et.None);return yg(()=>r)})});var Cs,uT,hT,fT,pT,mT,gT,vT,_T,oh,Ss,gc,y$,B2,z2,U2,W2,ST,Cg=M(()=>{JS();Mo();Dt();gl();nr();Mi();Sn();lu();Bw();Ze();Lr();pp();ri();qe();jt();br();nT();yp();b$();u0();th();De();Yi();zi();ft();Et();Oo();Gc();H2();xt();Em();Cs=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});oh=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Se.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},Ss=class i extends ua{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 ao.wrap(t.menu))(n.id===xe.EditorContext||n.id===xe.EditorContextPeek)&&(n.when=ce.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(Ei),s=e.get(Zt),a=e.get(El),l=e.get(vg),c=e.get(be),d=e.get(He),u=t.getModel(),h=t.getPosition(),p=oh.is(n)?n:new oh(u,h),m=new Sa(t,5),g=Vc(this._getLocationModel(c,p.model,p.position,m.token),m.token).then(b=>Cs(this,void 0,void 0,function*(){var S;if(!b||m.token.isCancellationRequested)return;Ni(b.ariaMessage);let k;if(b.referenceAt(u.uri,h)){let A=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(A)&&i._allSymbolNavigationCommands.has(A)&&(k=i._allSymbolNavigationCommands.get(A))}let N=b.references.length;if(N===0){if(!this.configuration.muteMessage){let A=u.getWordAtPosition(h);(S=Qn.get(t))===null||S===void 0||S.showMessage(this._getNoResultFoundMessage(A),h)}}else if(N===1&&k)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(A=>k.runEditorCommand(A,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,b,r)}),b=>{o.error(b)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,n,r,o){return Cs(this,void 0,void 0,function*(){let s=this._getGoToPreference(n);if(!(n instanceof Ko)&&(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 Cs(this,void 0,void 0,function*(){let s;if($O(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=yield t.openCodeEditor({resource:n.uri,options:{selection:P.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=ol.get(e);r&&e.hasModel()?r.toggleWidget(n!=null?n:e.getSelection(),Vt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};Ss._allSymbolNavigationCommands=new Map;Ss._activeAlternativeCommands=new Set;gc=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield rh(e.definitionProvider,t,n,r),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}},y$=h_&&!QN()?2118:70;mi((uT=class bT extends gc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bT.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:y$,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.1},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),St.registerCommandAlias("editor.action.goToDeclaration",bT.id)}},uT.id="editor.action.revealDefinition",uT));mi((hT=class yT extends gc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:yT.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:di(2089,y$),weight:100}}),St.registerCommandAlias("editor.action.openDeclarationToTheSide",yT.id)}},hT.id="editor.action.revealDefinitionAside",hT));mi((fT=class CT extends gc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:CT.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ce.and(O.hasDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:2}}),St.registerCommandAlias("editor.action.previewDeclaration",CT.id)}},fT.id="editor.action.peekDefinition",fT));B2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield lT(e.declarationProvider,t,n,r),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}};mi((pT=class C$ extends B2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:C$.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ce.and(O.hasDeclarationProvider,O.isInWalkThroughSnippet.toNegated()),menu:[{id:xe.EditorContext,group:"navigation",order:1.3},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},pT.id="editor.action.revealDeclaration",pT));mi(class extends B2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ce.and(O.hasDeclarationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:3}})}});z2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield dT(e.typeDefinitionProvider,t,n,r),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}};mi((mT=class S$ extends z2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:S$.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:ce.and(O.hasTypeDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:0,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.4},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},mT.ID="editor.action.goToTypeDefinition",mT));mi((gT=class w$ extends z2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:w$.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ce.and(O.hasTypeDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:4}})}},gT.ID="editor.action.peekTypeDefinition",gT));U2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield cT(e.implementationProvider,t,n,r),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}};mi((vT=class x$ extends U2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:x$.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:ce.and(O.hasImplementationProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:2118,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},vT.ID="editor.action.goToImplementation",vT));mi((_T=class E$ extends U2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:E$.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ce.and(O.hasImplementationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:3142,weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:5}})}},_T.ID="editor.action.peekImplementation",_T));W2=class extends Ss{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}};mi(class extends W2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:1094,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield bg(e.referenceProvider,t,n,!0,r),v("ref.title","References"))})}});mi(class extends W2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield bg(e.referenceProvider,t,n,!1,r),v("ref.title","References"))})}});ST=class extends Ss{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ce.and(Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("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""}};St.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:ht},{name:"position",description:"The position at which to start",constraint:Se.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)=>Cs(void 0,void 0,void 0,function*(){Lt(ht.isUri(e)),Lt(Se.isIPosition(t)),Lt(Array.isArray(n)),Lt(typeof r=="undefined"||typeof r=="string"),Lt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(Zt),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Hw(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends ST{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(He).invokeFunction(d.run.bind(d),l)})})});St.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:ht},{name:"position",description:"The position at which to start",constraint:Se.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)=>Cs(void 0,void 0,void 0,function*(){i.get(ui).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})});St.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{Lt(ht.isUri(e)),Lt(Se.isIPosition(t));let n=i.get(be),r=i.get(Zt);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!Hw(o)||!o.hasModel())return;let s=ol.get(o);if(!s)return;let a=Vt(c=>bg(n.referenceProvider,o.getModel(),Se.lift(t),!1,c).then(d=>new Wr(d,v("ref.title","References")))),l=new P(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});St.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var T$=M(()=>{});var k$=M(()=>{T$()});function wT(i,e){return!!i[e]}function I$(i){return i==="altKey"?zn?new xp(57,"metaKey",6,"altKey"):new xp(5,"ctrlKey",6,"altKey"):zn?new xp(6,"altKey",57,"metaKey"):new xp(6,"altKey",5,"ctrlKey")}var Sg,j2,xp,sl,wg=M(()=>{qt();Ce();nr();Sg=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=wT(e.event,t.triggerModifier),this.hasSideBySideModifier=wT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},j2=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=wT(e,t.triggerModifier)}},xp=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}};sl=class extends oe{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new $e),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new $e),this.onExecute=this._onExecute.event,this._onCancel=this._register(new $e),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=I$(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=I$(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 Sg(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Sg(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Sg(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new j2(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new j2(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()}}});var I0e,xT,A$,kd,K2=M(()=>{Dt();At();Sl();Ce();Mi();k$();lu();Ze();qe();ss();ca();wg();th();De();ft();Cg();H2();xt();qn();I0e=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},xT=function(i,e){return function(t,n){e(t,n,i)}},A$=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kd=class V2{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new ne,this.toUnhookForKeyboard=new ne,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new sl(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,Un(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{at(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(V2.ID)}startFindDefinitionFromCursor(e){return A$(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 A$(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 Q_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Vt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){at(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?P.lift(o[0].originSelectionRange):new P(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=P.plusRange(a,l));this.addDecoration(a,new sn().appendText(v("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 u=this.getPreviewValue(c,d,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,u?new sn().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=V2.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+V2.MAX_SOURCE_PREVIEW_LINES),o=t+1;for(;o<r;o++){let s=e.getLineFirstNonWhitespaceColumn(o);if(n===s)break}return new P(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 ff)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let n=this.editor.getModel();return n?rh(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 gc({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(Ke);return Pn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};kd.ID="editor.contrib.gotodefinitionatposition";kd.MAX_SOURCE_PREVIEW_LINES=8;kd=I0e([xT(1,xn),xT(2,Xi),xT(3,be)],kd);Ae(kd.ID,kd,2)});var L$,q2,G2,ET,kT,TT,M$=M(()=>{oi();qt();Ce();VN();wi();Sn();qe();bl();Et();rb();jn();L$=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},q2=function(i,e){return function(t,n){e(t,n,i)}},G2=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},ET=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._dispoables=new ne,this._markers=[],this._nextIdx=-1,ht.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=rw(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=P.compareRangesUsingStarts(a,l)||Dn.compare(a.severity,l.severity):c=Dn.compare(a.severity,l.severity)||P.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:ht.isUri(e)?e:void 0,severities:Dn.Error|Dn.Warning|Dn.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 G2(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=iu(this._markers,{resource:e.uri},(s,a)=>rw(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=P.lift(this._markers[s]);if(a.isEmpty()){let l=e.getWordAtPosition(a.getStartPosition());l&&(a=new P(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(P.containsPosition(this._markers[n],t))return new G2(this._markers[n],n+1,this._markers.length)}}};ET=L$([q2(1,e1),q2(2,Mt)],ET);kT=rr("IMarkerNavigationService"),TT=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new u_}getMarkerList(e){for(let t of this._provider){let n=t.getMarkerList(e);if(n)return n}return new ET(e,this._markerService,this._configService)}};TT=L$([q2(0,e1),q2(1,Mt)],TT);sr(kT,TT,1)});var D$=M(()=>{});var N$=M(()=>{D$()});var R$=M(()=>{});var O$=M(()=>{R$()});var $2,P$=M(()=>{O$();or();qr();Mre();(function(i){function e(t){switch(t){case Jm.Ignore:return"severity-ignore "+mt.asClassName(lt.info);case Jm.Info:return mt.asClassName(lt.info);case Jm.Warning:return mt.asClassName(lt.warning);case Jm.Error:return mt.asClassName(lt.error);default:return""}}i.className=e})($2||($2={}))});var A0e,Ep,IT,sh,F$,H$,B$,AT,L0e,Y2,M0e,LT,D0e,N0e,U$=M(()=>{Ht();eb();oi();ma();qt();Ce();lo();wi();N$();qe();th();De();_b();Yi();ft();Et();bb();rb();ds();P$();_r();ar();A0e=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},Ep=function(i,e){return function(t,n){e(t,n,i)}},IT=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 ne,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(ts(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new mP(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(){Vi(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=eu(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);mr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let p=document.createElement("span");p.innerText=t,p.classList.add("source"),h.appendChild(p)}if(o)if(typeof o=="string"){let p=document.createElement("span");p.innerText=`(${o})`,p.classList.add("code"),h.appendChild(p)}else{this._codeLink=fe("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};let p=me(this._codeLink,fe("span"));p.innerText=o.value,h.appendChild(this._codeLink)}}if(mr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Wi(r)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(let p of r){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(p.resource)}(${p.startLineNumber}, ${p.startColumn}): `,g.title=this._labelService.getUriLabel(p.resource),this._relatedDiagnostics.set(g,p);let b=document.createElement("span");b.innerText=p.message,m.appendChild(g),m.appendChild(b),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(48),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}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 Dn.Error:t=v("Error","Error");break;case Dn.Warning:t=v("Warning","Warning");break;case Dn.Info:t=v("Info","Info");break;case Dn.Hint:t=v("Hint","Hint");break}let n=v("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}},sh=class z$ extends bp{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 ne,this._onDidSelectRelatedInformation=new $e,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Dn.Warning,this._backgroundColor=dt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(N0e);let t=AT,n=L0e;this._severity===Dn.Warning?(t=Y2,n=M0e):this._severity===Dn.Info&&(t=LT,n=D0e);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(T2),secondaryHeadingColor:e.getColor(k2)})}_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(z$.TitleMenu,this._contextKeyService);gb(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,fe(""))}_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 IT(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=P.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?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(Nr(a.uri),l)}this._icon.className=`codicon ${$2.className(Dn.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()}};sh.TitleMenu=new xe("gotoErrorTitleMenu");sh=A0e([Ep(1,pn),Ep(2,Qi),Ep(3,Is),Ep(4,He),Ep(5,Ke),Ep(6,Dl)],sh);F$=V_(CO,SO),H$=V_(wO,xO),B$=V_(Hm,EO),AT=Oe("editorMarkerNavigationError.background",{dark:F$,light:F$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),L0e=Oe("editorMarkerNavigationError.headerBackground",{dark:Or(AT,.1),light:Or(AT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Y2=Oe("editorMarkerNavigationWarning.background",{dark:H$,light:H$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),M0e=Oe("editorMarkerNavigationWarning.headerBackground",{dark:Or(Y2,.1),light:Or(Y2,.1),hcDark:"#0C141F",hcLight:Or(Y2,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),LT=Oe("editorMarkerNavigationInfo.background",{dark:B$,light:B$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),D0e=Oe("editorMarkerNavigationInfo.headerBackground",{dark:Or(LT,.1),light:Or(LT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),N0e=Oe("editorMarkerNavigation.background",{dark:Bm,light:Bm,hcDark:Bm,hcLight:Bm},v("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var R0e,X2,W$,vc,Tp,ah,xg,MT,DT,j$,O0e,J2=M(()=>{or();Ce();Ze();Lr();ri();qe();jt();M$();De();Yi();ft();Et();Al();U$();R0e=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},X2=function(i,e){return function(t,n){e(t,n,i)}},W$=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vc=class Q2{static get(e){return e.getContribution(Q2.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new ne,this._editor=e,this._widgetVisible=j$.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(sh,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)||!P.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:P.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 Se(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 W$(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=Q2.get(s))===null||n===void 0||n.close(),(r=Q2.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};vc.ID="editor.contrib.markerController";vc=R0e([X2(1,kT),X2(2,Ke),X2(3,Zt),X2(4,He)],vc);Tp=class extends se{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return W$(this,void 0,void 0,function*(){t.hasModel()&&((n=vc.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}},ah=class i extends Tp{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:578,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ti("marker-navigation-next",lt.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};ah.ID="editor.action.marker.next";ah.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");xg=class i extends Tp{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:1602,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ti("marker-navigation-previous",lt.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};xg.ID="editor.action.marker.prev";xg.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");MT=class extends Tp{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("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:O.focus,primary:66,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},DT=class extends Tp{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("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:O.focus,primary:1090,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ae(vc.ID,vc,4);X(ah);X(xg);X(MT);X(DT);j$=new nt("markersNavigationVisible",!1),O0e=xi.bindToContribution(vc.get);Me(new O0e({id:"closeMarkersNavigation",precondition:j$,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var V$=M(()=>{});var K$=M(()=>{V$()});var Z2,kp,eC,NT=M(()=>{Ht();eR();eb();Ce();K$();Z2=fe,kp=class extends oe{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 mf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},eC=class i extends oe{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,Z2("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,Z2("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,Z2(`span.icon.${t.iconClass}`));let r=me(this.action,Z2("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(Rt(this.actionContainer,on.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Rt(this.actionContainer,on.KEY_DOWN,o=>{let s=new g_(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"))}}});var P0e,F0e,RT,Ip,OT=M(()=>{Dt();At();qt();Ce();P0e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},F0e=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)}},RT=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},Ip=class extends oe{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ti(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new ti(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new ti(()=>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=lO(e=>this._computer.computeAsync(e)),P0e(this,void 0,void 0,function*(){var e,t,n,r;try{try{for(var o=!0,s=F0e(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){at(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 RT(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)}}});function G$(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)}var zT,tC,q$,Eg,iC,FT,HT,Id,Tg,BT,UT=M(()=>{Ht();NT();oi();Ce();ri();qe();qn();br();OT();lc();ft();Et();Gn();Qu();Dt();jt();zT=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},tC=function(i,e){return function(t,n){e(t,n,i)}},q$=fe,Eg=class PT extends oe{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(Id,this._editor)),this._currentResult=null,this._participants=[];for(let r of jo.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new BT(this._editor,this._participants),this._hoverOperation=this._register(new Ip(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 iC(this._computer.anchor,o,r.isComplete))})),this._register(ts(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(hf.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 tp(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 tp(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 tp(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}=PT.computeHoverRanges(this._editor,e.range,t),s=new ne,a=s.add(new Tg(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(let h of this._participants){let p=t.filter(m=>m.owner===h);p.length>0&&s.add(h.renderHoverParts(d,p))}let u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){let h=this._editor.createDecorationsCollection();h.set([{range:o,options:PT._DECORATION_OPTIONS}]),s.add(Ft(()=>{h.clear()}))}this._widget.showAt(l,new HT(c,n,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,u,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,u=d.convertModelRangeToViewRange(t),h=new Se(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));r=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=n[0].range,l=null;for(let c of n)a=P.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 Se(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Se(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()}};Eg._DECORATION_OPTIONS=ct.register({description:"content-hover-highlight",className:"hoverHighlight"});Eg=zT([tC(1,He),tC(2,Bt)],Eg);iC=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 FT(this,this.anchor,t,this.isComplete)}},FT=class extends iC{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},HT=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}},Id=class $$ extends oe{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=O.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=O.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new kp),this._focusTracker=this._register(Ts(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 $$.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(it.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=G$(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));let r=G$(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()}};Id.ID="editor.contrib.contentHoverWidget";Id=zT([tC(1,Ke)],Id);Tg=class extends oe{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=q$("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,q$("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(eC.render(this.actionsElement,e,n))}append(e){let t=me(this.actionsElement,e);return this._hasContent=!0,t}};Tg=zT([tC(0,Bt)],Tg);BT=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 Rr.EMPTY;let n=i._getLineDecorations(this._editor,t);return Rr.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):Rr.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 vr(t)}}});var Y$,lh,WT,X$=M(()=>{Ht();oi();Sl();Ce();Zu();OT();NT();Y$=fe,lh=class i extends oe{constructor(e,t,n){super(),this._renderDisposeables=this._register(new ne),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new kp),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new io({editor:this._editor},t,n)),this._computer=new WT(this._editor),this._hoverOperation=this._register(new Ip(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=Y$("div.hover-row.markdown-hover"),s=me(o,Y$("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`}};lh.ID="editor.contrib.modesGlyphHoverWidget";WT=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||jc(o)||n.push(...k_(o).map(e))}return n}}});function B0e(i,e,t,n,r){return H0e(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,n,r));if(o&&U0e(o))return new jT(i,o,e)}catch(o){Ut(o)}})}function kg(i,e,t,n){let o=i.ordered(e).map((s,a)=>B0e(s,a,e,t,n));return Rr.fromPromises(o).coalesce()}function z0e(i,e,t,n){return kg(i,e,t,n).map(r=>r.hover).toPromise()}function U0e(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var H0e,jT,VT=M(()=>{Dt();gi();At();Ze();xt();H0e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jT=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};Gr("_executeHoverProvider",(i,e,t)=>{let n=i.get(be);return z0e(n.hoverProvider,e,t,et.None)})});function KT(i,e,t,n,r){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new ne;for(let s of e)for(let a of s.contents){if(jc(a))continue;let l=Q$("div.hover-row.markdown-hover"),c=me(l,Q$("div.hover-contents")),d=o.add(new io({editor:t},n,r));o.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",i.onContentsChanged()}));let u=o.add(d.render(a));c.appendChild(u.element),i.fragment.appendChild(l)}return o}var W0e,nC,Q$,no,Ap,rC=M(()=>{Ht();oi();Dt();Sl();Ce();Zu();ri();qe();ss();VT();De();jn();ds();xt();W0e=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)}},Q$=fe,no=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}},Ap=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 no(this,e.range,[new sn().appendText(v("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),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new no(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&s.push(new no(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let p=!1;for(let m of t){let g=m.range.startLineNumber===r?m.range.startColumn:1,b=m.range.endLineNumber===r?m.range.endColumn:o,S=m.options.hoverMessage;if(!S||jc(S))continue;m.options.beforeContentClassName&&(p=!0);let k=new P(e.range.startLineNumber,g,e.range.startLineNumber,b);s.push(new no(this,k,k_(S),p,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Rr.EMPTY;let r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Rr.EMPTY;let o=new Se(e.range.startLineNumber,e.range.startColumn);return kg(this._languageFeaturesService.hoverProvider,r,o,n).filter(s=>!jc(s.hover.contents)).map(s=>{let a=s.hover.range?P.lift(s.hover.range):e.range;return new no(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return KT(e,t,this._editor,this._languageService,this._openerService)}};Ap=W0e([nC(1,Xi),nC(2,Qi),nC(3,Mt),nC(4,be)],Ap)});var j0e,qT,ws,GT,J$,oC,Z$=M(()=>{Ht();oi();Dt();At();Ce();lo();qe();xt();Yre();Nu();Y4();gd();J2();De();rb();ds();Gc();j0e=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},qT=function(i,e){return function(t,n){e(t,n,i)}},ws=fe,GT=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}},J$={type:1,filter:{include:Qe.QuickFix},triggerAction:Xn.QuickFixHover},oC=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 u=new P(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new GT(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return oe.None;let n=new ne;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));let r=t.length===1?t[0]:t.sort((o,s)=>Dn.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),n}renderMarkerHover(e,t){let n=ws("div.hover-row"),r=me(n,ws("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=me(r,ws("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ws("span");if(o){let m=me(d,ws("span"));m.innerText=o}let u=me(d,ws("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(Rt(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=me(u,ws("span"));h.innerText=a.value;let p=me(r,d);p.style.opacity="0.6",p.style.paddingLeft="6px"}else{let d=me(r,ws("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Wi(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:p}of l){let m=me(r,ws("div"));m.style.marginTop="8px";let g=me(m,ws("a"));g.innerText=`${Nr(u)}(${h}, ${p}): `,g.style.cursor="pointer",t.add(Rt(g,"click",S=>{S.stopPropagation(),S.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:p}}}).catch(at)}));let b=me(m,ws("span"));b.innerText=d,this._editor.applyFontInfo(b)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Dn.Error||t.marker.severity===Dn.Warning||t.marker.severity===Dn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:ah.ID,run:()=>{var r;e.hide(),(r=vc.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){let r=e.statusBar.append(ws("div"));this.recentMarkerCodeActionsInfo&&(Nw.makeKey(this.recentMarkerCodeActionsInfo.marker)===Nw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?oe.None:n.add(wl(()=>r.textContent=v("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=v("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(Ft(()=>{l||a.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Gf,run:c=>{l=!0;let d=Ga.get(this._editor),u=wn(c);e.hide(),d==null||d.showCodeActions(J$,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},at)}}getCodeActions(e){return Vt(t=>l0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),J$,wa.None,t))}};oC=j0e([qT(1,VP),qT(2,Qi),qT(3,be)],oC)});var eY=M(()=>{});var tY=M(()=>{eY()});var V0e,sC,hr,$T,YT,XT,QT,JT,ZT,ek,tk,ik,nk,rk,aC=M(()=>{gl();Ce();Ze();qe();jt();ss();K2();UT();X$();De();Et();ds();_r();ar();lc();rC();Z$();qy();Gn();tY();V0e=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},sC=function(i,e){return function(t,n){e(t,n,i)}},hr=class iY{static get(e){return e.getContribution(iY.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 ne,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===Id.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===lh.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===Id.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===Id.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible())||this._isHoverSticky&&d.type===12&&d.detail===lh.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 lh(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())||Qs.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(Eg,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()}};hr.ID="editor.contrib.hover";hr=V0e([sC(1,He),sC(2,Qi),sC(3,Xi),sC(4,Bt)],hr);$T=class extends se{constructor(){super({id:"editor.action.showHover",label:v({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:O.editorTextFocus,primary:di(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=hr.get(t);if(!r)return;let o=t.getPosition(),s=new P(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)}},YT=class extends se{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({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=hr.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new P(r.lineNumber,r.column,r.lineNumber,r.column),s=kd.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},XT=class extends se{constructor(){super({id:"editor.action.scrollUpHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:16,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollUp()}},QT=class extends se{constructor(){super({id:"editor.action.scrollDownHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:18,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollDown()}},JT=class extends se{constructor(){super({id:"editor.action.scrollLeftHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:15,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollLeft()}},ZT=class extends se{constructor(){super({id:"editor.action.scrollRightHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:17,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollRight()}},ek=class extends se{constructor(){super({id:"editor.action.pageUpHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageUp()}},tk=class extends se{constructor(){super({id:"editor.action.pageDownHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageDown()}},ik=class extends se{constructor(){super({id:"editor.action.goToTopHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToTop()}},nk=class extends se{constructor(){super({id:"editor.action.goToBottomHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToBottom()}},rk=class extends se{constructor(){super({id:"editor.action.escapeFocusHover",label:v({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:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:9,weight:100}})}run(e,t){let n=hr.get(t);n&&n.escape()}};Ae(hr.ID,hr,2);X($T);X(YT);X(XT);X(QT);X(JT);X(ZT);X(ek);X(tk);X(ik);X(nk);X(rk);jo.register(Ap);jo.register(oC);df((i,e)=>{let t=i.getColor(OO);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)}; }`))})});function kr(i,e){let t=0;for(let n=0;n<i.length;n++)i.charAt(n)===" "?t+=e:t++;return t}function ch(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}var ok=M(()=>{});function rY(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 b=i.getLineContent(t);if(!o.unIndentedLinePattern.test(b))break;t++}if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(b,S)=>(S=S||1,Wc.shiftIndent(b,b.length+S,s,a,l)),d=(b,S)=>(S=S||1,Wc.unshiftIndent(b,b.length+S,s,a,l)),u=[],h,p=i.getLineContent(t),m=p;if(r!=null){h=r;let b=Ui(p);m=h+p.substring(b.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+p.substring(b.length)),p!==m&&u.push(Kt.replaceMove(new je(t,1,t,b.length+1),uw(h,a,l)))}else h=Ui(p);let g=h;o.increaseIndentPattern&&o.increaseIndentPattern.test(m)?(g=c(g),h=c(h)):o.indentNextLinePattern&&o.indentNextLinePattern.test(m)&&(g=c(g)),t++;for(let b=t;b<=n;b++){let S=i.getLineContent(b),k=Ui(S),N=g+S.substring(k.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(N)&&(g=d(g),h=d(h)),k!==g&&u.push(Kt.replaceMove(new je(b,1,b,k.length+1),uw(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(S))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(N)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(N)?g=c(g):g=h)}return u}function oY(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 P(s,1,s,l),d=i.getValueInRange(c),u=n?d.replace(/\t/ig,r):d.replace(o," ");e.addEditOperation(c,u)}}var K0e,q0e,lC,cC,Ig,dC,uC,hC,fC,sk,ak,lk,Ag,ck,dk,uk=M(()=>{Ce();wi();Ze();vw();xa();qe();Mn();jt();Kn();is();ok();De();Ll();ore();VR();K0e=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},q0e=function(i,e){return function(t,n){e(t,n,i)}};lC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new ck(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};lC.ID="editor.action.indentationToSpaces";cC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new dk(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};cC.ID="editor.action.indentationToTabs";Ig=class extends se{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(lr),r=e.get(Si),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?v("configuredTabSize","Configured Tab Size"):d===s.tabSize?v("defaultTabSize","Default Tab Size"):d===a.tabSize?v("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:v({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 u=parseInt(d.label,10);this.displaySizeOnly?o.updateOptions({tabSize:u}):o.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}},dC=class i extends Ig{constructor(){super(!1,!1,{id:i.ID,label:v("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};dC.ID="editor.action.indentUsingTabs";uC=class i extends Ig{constructor(){super(!0,!1,{id:i.ID,label:v("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};uC.ID="editor.action.indentUsingSpaces";hC=class i extends Ig{constructor(){super(!0,!0,{id:i.ID,label:v("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};hC.ID="editor.action.changeTabDisplaySize";fC=class i extends se{constructor(){super({id:i.ID,label:v("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let n=e.get(Si),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};fC.ID="editor.action.detectIndentation";sk=class extends se{constructor(){super({id:"editor.action.reindentlines",label:v("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),r=t.getModel();if(!r)return;let o=rY(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},ak=class extends se{constructor(){super({id:"editor.action.reindentselectedlines",label:v("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),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=rY(r,n,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},lk=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(P.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)}},Ag=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new ne,this.callOnModel=new ne,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:p=>Wc.shiftIndent(p,p.length+1,o,s,a),unshiftIndent:p=>Wc.unshiftIndent(p,p.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 u=n.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let p=nu(r,n,n.getLanguageId(),d,c,this._languageConfigurationService);if(p!==null){let m=Ui(u),g=kr(p,o),b=kr(m,o);if(g!==b){let S=ch(g,o,a);l.push({range:new P(d,1,d,m.length+1),text:S}),u=S+u.substr(m.length)}else{let S=M_(n,d,this._languageConfigurationService);if(S===0||S===8)return}}}let h=d;for(;d<e.endLineNumber;){if(!/\S/.test(n.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let m=nu(r,{tokenization:{getLineTokens:g=>n.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,b)=>n.getLanguageIdAtPosition(g,b)},getLineContent:g=>g===h?u:n.getLineContent(g)},n.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=kr(m,o),b=kr(Ui(n.getLineContent(d+1)),o);if(g!==b){let S=g-b;for(let k=d+1;k<=e.endLineNumber;k++){let N=n.getLineContent(k),A=Ui(N),K=kr(A,o)+S,W=ch(K,o,a);W!==A&&l.push({range:new P(k,1,k,A.length+1),text:W})}}}}if(l.length>0){this.editor.pushUndoStop();let p=new lk(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",p),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()}};Ag.ID="editor.contrib.autoIndentOnPaste";Ag=K0e([q0e(1,Tt)],Ag);ck=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),oY(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},dk=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),oY(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Ae(Ag.ID,Ag,2);X(lC);X(cC);X(dC);X(uC);X(hC);X(fC);X(sk);X(ak)});function sY(i){return ht.from({scheme:Lo.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var pC,Lg,hk,Mg,fk=M(()=>{At();Ce();ri();qe();Im();Sn();pC=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Lg=class{constructor(e,t){this.range=e,this.direction=t}},hk=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 pC(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 pC(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){Ut(r),this._isResolved=!1}})}},Mg=class i{static create(e,t,n,r){return pC(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>n.map(l=>pC(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){Ut(c)}})));if(yield Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new l_;return new i(n,o,t)})}constructor(e,t,n){this._disposables=new ne,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),u;d.getStartPosition().isBefore(l)?(u=P.fromPositions(d.getStartPosition(),l),c="after"):(u=P.fromPositions(l,d.getEndPosition()),c="before"),r.push(new hk(a,new Lg(u,c),s))}}this.items=r.sort((o,s)=>Se.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 P(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 P(n,l+1,n,c+1)}}});function aY(i,e,t,n){var r;return Dg(this,void 0,void 0,function*(){let o=i.get(xn),s=i.get(cs),a=i.get(ui),l=i.get(He),c=i.get(Ei);if(yield n.item.resolve(et.None),!n.part.location)return;let d=n.part.location,u=[],h=new Set(rs.getMenuItems(xe.EditorContext).map(m=>TR(m)?m.command.id:Cd()));for(let m of Ss.all())h.has(m.desc.id)&&u.push(new ns(m.desc.id,da.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>Dg(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let b=new oh(g.object.textEditorModel,P.getStartPosition(d.range)),S=n.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,b,S)}finally{g.dispose()}})));if(n.part.command){let{command:m}=n.part;u.push(new ks),u.push(new ns(m.id,m.title,void 0,!0,()=>Dg(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(b){c.notify({severity:pf.Error,source:n.item.provider.displayName,message:b})}})))}let p=e.getOption(123);s.showContextMenu({domForShadowRoot:p&&(r=e.getDomNode())!==null&&r!==void 0?r:void 0,getAnchor:()=>{let m=wn(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function mC(i,e,t,n){return Dg(this,void 0,void 0,function*(){let o=yield i.get(xn).createModelReference(n.uri);yield t.invokeWithinContext(s=>Dg(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(Ke),c=Pn.inPeekEditor.getValue(l),d=!a&&t.getOption(85)&&!c;return new gc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new oh(o.object.textEditorModel,P.getStartPosition(n.range)),P.lift(n.range))})),o.dispose()})}var Dg,pk=M(()=>{Ht();Pc();gi();K0();qe();ca();Cg();th();Yi();zi();ft();Tl();Et();Oo();Dg=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}});function $0e(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var G0e,Lp,Mp,mk,lY,Dp,gk,_c,bk=M(()=>{Ht();oi();Dt();gi();At();Ce();tf();Mi();Sn();KP();cb();Xm();xa();qe();br();Kc();qn();Ns();xt();ca();wg();fk();pk();zi();bl();Et();Oo();_r();ar();G0e=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},Lp=function(i,e){return function(t,n){e(t,n,i)}},Mp=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},mk=class i{constructor(){this._entries=new fa(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()}`}},lY=rr("IInlayHintsCache");sr(lY,mk,1);Dp=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]}},gk=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},_c=class vk{static get(e){var t;return(t=e.getContribution(vk.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 ne,this._sessionDisposables=new ne,this._decorationsMetadata=new Map,this._ruleFactory=new Cb(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 ti(()=>Mp(this,void 0,void 0,function*(){let a=Date.now();r==null||r.dispose(!0),r=new Ri;let l=t.onWillDispose(()=>r==null?void 0:r.cancel());try{let c=r.token,d=yield Mg.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 u of d.provider)typeof u.onDidChangeInlayHints=="function"&&!o.has(u)&&(o.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){at(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(hR.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 u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),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 ne,t=e.add(new sl(this._editor)),n=new ne;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 Ri;n.add(Ft(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new gk(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new P(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),n.add(Ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(r=>Mp(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(mC,r,this._editor,s.location):XO.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=>Mp(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(et.None),Wi(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>Kt.replace(P.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>Mp(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(aY,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 ff&&(n==null?void 0:n.attachedData)instanceof Dp)return n.attachedData}_invokeCommand(e,t){var n;return Mp(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:pf.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 Lg(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(P.compareRangesUsingStarts)){let s=t.validateRange(new P(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!P.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=P.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){var n,r;let o=[],s=(g,b,S,k,N)=>{let A={content:S,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:b.className,cursorStops:k,attachedData:N};o.push({item:g,classNameRef:b,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?A:void 0}}})},a=(g,b)=>{let S=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,S,"\u200A",b?ou.Right:ou.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,c);for(let g of t){g.hint.paddingLeft&&a(g,!1);let b=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let S=0;S<b.length;S++){let k=b[S],N=S===0,A=S===b.length-1,H={fontSize:`${l}px`,fontFamily:`var(${h}), ${Y_.fontFamily}`,verticalAlign:u?"baseline":"middle",unicodeBidi:"isolate"};Wi(g.hint.textEdits)&&(H.cursor="default"),this._fillInColors(H,g.hint),(k.command||k.location)&&((n=this._activeInlayHintPart)===null||n===void 0?void 0:n.part.item)===g&&this._activeInlayHintPart.part.index===S&&(H.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(H.color=vi(PO),H.cursor="pointer")),d&&(N&&A?(H.padding=`1px ${Math.max(1,l/4)|0}px`,H.borderRadius=`${l/4|0}px`):N?(H.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,H.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):A?(H.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,H.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):H.padding="1px 0 1px 0"),s(g,this._ruleFactory.createClassNameRef(H),$0e(k.label),A&&!g.hint.paddingRight?ou.Right:ou.None,new Dp(g,S))}if(g.hint.paddingRight&&a(g,!0),o.length>vk._MAX_DECORATORS)break}let p=[];for(let g of e)for(let{id:b}of(r=this._editor.getDecorationsInRange(g))!==null&&r!==void 0?r:[]){let S=this._decorationsMetadata.get(b);S&&(p.push(b),S.classNameRef.dispose(),this._decorationsMetadata.delete(b))}let m=Ea.capture(this._editor);this._editor.changeDecorations(g=>{let b=g.deltaDecorations(p,o.map(S=>S.decoration));for(let S=0;S<b.length;S++){let k=o[S];this._decorationsMetadata.set(b[S],k)}}),m.restore(this._editor)}_fillInColors(e,t){t.kind===Ew.Parameter?(e.backgroundColor=vi(WO),e.color=vi(UO)):t.kind===Ew.Type?(e.backgroundColor=vi(zO),e.color=vi(BO)):(e.backgroundColor=vi(HO),e.color=vi(FO))}_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()}};_c.ID="editor.contrib.InlayHints";_c._MAX_DECORATORS=1500;_c=G0e([Lp(1,be),Lp(2,an),Lp(3,lY),Lp(4,ui),Lp(5,Ei),Lp(6,He)],_c);St.registerCommand("_executeInlayHintProvider",(i,...e)=>Mp(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t)),Lt(P.isIRange(n));let{inlayHintsProvider:r}=i.get(be),o=yield i.get(xn).createModelReference(t);try{let s=yield Mg.create(r,o.object.textEditorModel,[P.lift(n)],et.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Y0e,Ng,cY,X0e,gC,vC,dY=M(()=>{Dt();Sl();ri();qn();lc();ss();ca();VT();rC();bk();jn();ds();xt();De();nr();fk();oi();Y0e=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},Ng=function(i,e){return function(t,n){e(t,n,i)}},cY=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},X0e=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)}},gC=class extends bd{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},vC=class extends Ap{constructor(e,t,n,r,o,s){super(e,t,n,r,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!_c.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 ff&&r.attachedData instanceof Dp?new gC(r.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof gC?new Rr(r=>cY(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 sn().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&r.emitOne(new no(this,e.range,[d],!1,0)),Wi(c.item.hint.textEdits)&&r.emitOne(new no(this,e.range,[new sn().appendText(v("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new sn().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&r.emitOne(new no(this,e.range,[u],!1,1)),c.part.location||c.part.command){let b,k=this._editor.getOption(75)==="altKey"?zn?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):zn?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?b=new sn().appendText(v("hint.defAndCommand","Go to Definition ({0}), right click for more",k)):c.part.location?b=new sn().appendText(v("hint.def","Go to Definition ({0})",k)):c.part.command&&(b=new sn(`[${v("hint.cmd","Execute Command")}](${sY(c.part.command)} "${c.part.command.title}") (${k})`,{isTrusted:!0})),b&&r.emitOne(new no(this,e.range,[b],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,n);try{for(var p=!0,m=X0e(h),g;g=yield m.next(),o=g.done,!o;p=!0){l=g.value,p=!1;let b=l;r.emitOne(b)}}catch(b){s={error:b}}finally{try{!p&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Rr.EMPTY}_resolveInlayHintLabelPartHover(e,t){return cY(this,void 0,void 0,function*(){if(!e.part.location)return Rr.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)?kg(this._languageFeaturesService.hoverProvider,s,new Se(r.startLineNumber,r.startColumn),t).filter(a=>!jc(a.hover.contents)).map(a=>new no(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Rr.EMPTY}finally{o.dispose()}})}};vC=Y0e([Ng(1,Xi),Ng(2,Qi),Ng(3,Mt),Ng(4,xn),Ng(5,be)],vC)});var yk=M(()=>{Ze();lc();bk();dY();Ae(_c.ID,_c,1);jo.register(vC)});var _C,uY=M(()=>{Mn();_C=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 je(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new je(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var hY=M(()=>{});var fY=M(()=>{hY()});var xk=gt(Rg=>{Dt();At();lu();Ze();qe();Mn();jt();qn();ub();De();uY();fY();var Q0e=Rg&&Rg.__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},J0e=Rg&&Rg.__param||function(i,e){return function(t,n){e(t,n,i)}},Ad=class Ck{static get(e){return e.getContribution(Ck.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 Q_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Vt(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 u=P.lift(c.range),h=c.range,p=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},p>1&&(s=new je(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+p-1));let m=new _C(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:Ck.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=of(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(at)}).catch(at)):Promise.resolve(void 0)}};Ad.ID="editor.contrib.inPlaceReplaceController";Ad.DECORATION=ct.register({description:"in-place-replace",className:"valueSetReplacement"});Ad=Q0e([J0e(1,Ml)],Ad);var Sk=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Ad.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},wk=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Ad.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Ae(Ad.ID,Ad,4);X(Sk);X(wk)});var Ek,Tk=M(()=>{Ze();DR();jt();De();Ek=class extends se{constructor(){super({id:"expandLineSelection",label:v("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:O.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,Nm.expandLineSelection(r,r.getCursorStates())),r.revealPrimaryCursor(n.source,!0)}};X(Ek)});function Z0e(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 u=Qh(l),h=0;if(u===-1)h=1;else if(u!==l.length-1)h=u+2;else continue;h=Math.max(d,h),t[n++]=Kt.delete(new P(s,h,s,c))}return t}var bC,pY=M(()=>{wi();xa();qe();bC=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=Z0e(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)}}});var Og,mY=M(()=>{qe();Mn();Og=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 P(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber+1,1),n.endLineNumber===e.getLineCount()?"":`
|
|
`):this._isCopyingDown?t.addEditOperation(new P(n.startLineNumber,1,n.startLineNumber,1),o+`
|
|
`):t.addEditOperation(new P(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=je.createWithDirection(r,o,s,a,this._selectionDirection)}return n}}});var ege,tge,yC,gY=M(()=>{wi();vw();qe();Mn();cre();Kn();ok();VR();ure();ege=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},tge=function(i,e){return function(t,n){e(t,n,i)}},yC=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,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){let d=r.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new P(1,1,1,1),null):(t.addEditOperation(new P(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new P(u,1,u,e.getLineMaxColumn(u)),null)),r=new je(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=r.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new P(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,r)){let p=this.matchEnterRule(e,l,o,d,r.startLineNumber-1);if(p!==null){let g=Ui(e.getLineContent(d)),b=p+kr(g,o);h=ch(b,o,a)+this.trimLeft(u)}else{c.getLineContent=b=>b===r.startLineNumber?e.getLineContent(d):e.getLineContent(b);let g=nu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber,l,this._languageConfigurationService);if(g!==null){let b=Ui(e.getLineContent(d)),S=kr(g,o),k=kr(b,o);S!==k&&(h=ch(S,o,a)+this.trimLeft(u))}}t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+`
|
|
`);let m=this.matchEnterRuleMovingDown(e,l,o,r.startLineNumber,d,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,m);else{c.getLineContent=b=>b===r.startLineNumber?h:b>=r.startLineNumber+1&&b<=r.endLineNumber+1?e.getLineContent(b-1):e.getLineContent(b);let g=nu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber+1,l,this._languageConfigurationService);if(g!==null){let b=Ui(e.getLineContent(r.startLineNumber)),S=kr(g,o),k=kr(b,o);if(S!==k){let N=S-k;this.getIndentEditsOfMovingBlock(e,t,r,o,a,N)}}}}else t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+`
|
|
`)}else if(d=r.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new P(d,1,d+1,1),null),t.addEditOperation(new P(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),`
|
|
`+u),this.shouldAutoIndent(e,r)){c.getLineContent=p=>p===d?e.getLineContent(r.startLineNumber):e.getLineContent(p);let h=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,h);else{let p=nu(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),d,l,this._languageConfigurationService);if(p!==null){let m=Ui(e.getLineContent(r.startLineNumber)),g=kr(p,o),b=kr(m,o);if(g!==b){let S=g-b;this.getIndentEditsOfMovingBlock(e,t,r,o,a,S)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,n){return{shiftIndent:r=>Wc.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>Wc.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===Rm.None||o.indentAction===Rm.Indent?s=o.indentation+o.appendText:o.indentAction===Rm.IndentOutdent?s=o.indentation:o.indentAction===Rm.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimLeft(a).indexOf(this.trimLeft(s))>=0){let l=Ui(e.getLineContent(r)),c=Ui(s),d=M_(e,r,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=kr(c,n),h=kr(l,n);return u-h}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(Qh(s)>=0){let a=e.getLineMaxColumn(o),l=L_(this._autoIndent,e,new P(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(Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=L_(this._autoIndent,e,new P(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),Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=L_(this._autoIndent,e,new P(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=Ui(l),u=kr(c,r)+s,h=ch(u,r,o);h!==c&&(t.addEditOperation(new P(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(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}};yC=ege([tge(3,Tt)],yC)});function vY(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(dh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function ige(i,e,t){let n=vY(i,e,t);return n?Kt.replace(new P(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(`
|
|
`)):null}var dh,_Y=M(()=>{xa();qe();dh=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=ige(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=vY(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}};dh._COLLATOR=null});var CC,kk,Ik,Ak,SC,Lk,Mk,wC,Dk,Nk,Rk,xC,Ok,Pk,Fk,Hk,Bk,EC,zk,Uk,Wk,jk,Ld,Vk,Kk,bc,Pg,uh,Fg,hh,qk=M(()=>{gl();N_();Ze();x_();pY();fre();xa();ri();qe();Mn();jt();mY();gY();_Y();De();Yi();Kn();CC=class extends se{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)=>P.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 Og(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},kk=class extends CC{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:v("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:v({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}},Ik=class extends CC{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:v("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:v({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}},Ak=class extends se{constructor(){super({id:"editor.action.duplicateSelection",label:v("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:O.writable,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:v({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 Og(a,!0));else{let l=new je(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);r.push(new LR(l,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},SC=class extends se{constructor(e,t){super(t),this.down=e}run(e,t){let n=e.get(Tt),r=[],o=t.getSelections()||[],s=t.getOption(10);for(let a of o)r.push(new yC(a,this.down,s,n));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},Lk=class extends SC{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:v("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:v({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}},Mk=class extends SC{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:v("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:v({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}},wC=class extends se{constructor(e,t){super(t),this.descending=e}run(e,t){let n=t.getSelections()||[];for(let o of n)if(!dh.canRun(t.getModel(),o,this.descending))return;let r=[];for(let o=0,s=n.length;o<s;o++)r[o]=new dh(n[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},Dk=class extends wC{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:v("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:O.writable})}},Nk=class extends wC{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:v("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:O.writable})}},Rk=class extends se{constructor(){super({id:"editor.action.removeDuplicateLines",label:v("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:O.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 p=a.startLineNumber;p<=a.endLineNumber;p++){let m=n.getLineContent(p);l.has(m)||(c.push(m),l.add(m))}let d=new je(a.startLineNumber,1,a.endLineNumber,n.getLineMaxColumn(a.endLineNumber)),u=a.startLineNumber-s,h=new je(u,1,u+c.length-1,c[c.length-1].length);r.push(Kt.replace(d,c.join(`
|
|
`))),o.push(h),s+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}},xC=class i extends se{constructor(){super({id:i.ID,label:v("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2102),weight:100}})}run(e,t,n){let r=[];n.reason==="auto-save"&&(r=(t.getSelections()||[]).map(a=>new Se(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new bC(o,r);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};xC.ID="editor.action.trimTrailingWhitespace";Ok=class extends se{constructor(){super({id:"editor.action.deleteLines",label:v("lines.delete","Delete Line"),alias:"Delete Line",precondition:O.writable,kbOpts:{kbExpr:O.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],u=d.startLineNumber,h=d.endLineNumber,p=1,m=r.getLineMaxColumn(h);h<r.getLineCount()?(h+=1,m=1):u>1&&(u-=1,p=r.getLineMaxColumn(u)),s.push(Kt.replace(new je(u,p,h,m),"")),a.push(new je(u-o,d.positionColumn,u-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}},Pk=class extends se{constructor(){super({id:"editor.action.indentLines",label:v("lines.indent","Indent Line"),alias:"Indent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},Fk=class extends se{constructor(){super({id:"editor.action.outdentLines",label:v("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2140,weight:100}})}run(e,t){ef.Outdent.runEditorCommand(e,t,null)}},Hk=class extends se{constructor(){super({id:"editor.action.insertLineBefore",label:v("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},Bk=class extends se{constructor(){super({id:"editor.action.insertLineAfter",label:v("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},EC=class extends se{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],u=r[l+1];P.intersectRanges(d,u)===null?o.push(d):r[l+1]=P.plusRange(d,u)}o.push(r[r.length-1]);let s=this._getEndCursorState(n,o),a=o.map(l=>Kt.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},zk=class extends EC{constructor(){super({id:"deleteAllLeft",label:v("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:O.writable,kbOpts:{kbExpr:O.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 je(l,s.startColumn,l,s.startColumn)}else a=new je(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(P.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 P(s,a,o.startLineNumber,1)}else return new P(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new P(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},Uk=class extends EC{constructor(){super({id:"deleteAllRight",label:v("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:O.writable,kbOpts:{kbExpr:O.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 je(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 P(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new P(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(P.compareRangesUsingStarts),r}},Wk=class extends se{constructor(){super({id:"editor.action.joinLines",label:v("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:O.writable,kbOpts:{kbExpr:O.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(P.compareRangesUsingStarts);let o=[],s=n.reduce((h,p)=>h.isEmpty()?h.endLineNumber===p.startLineNumber?(r.equalsSelection(h)&&(r=p),p):p.startLineNumber>h.endLineNumber+1?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn):p.startLineNumber>h.endLineNumber?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=r,u=0;for(let h=0,p=o.length;h<p;h++){let m=o[h],g=m.startLineNumber,b=1,S=0,k,N,A=a.getLineContent(m.endLineNumber).length-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){let W=m.getStartPosition();W.lineNumber<a.getLineCount()?(k=g+1,N=a.getLineMaxColumn(k)):(k=W.lineNumber,N=a.getLineMaxColumn(W.lineNumber))}else k=m.endLineNumber,N=a.getLineMaxColumn(k);let H=a.getLineContent(g);for(let W=g+1;W<=k;W++){let re=a.getLineContent(W),ae=a.getLineFirstNonWhitespaceColumn(W);if(ae>=1){let Ne=!0;H===""&&(Ne=!1),Ne&&(H.charAt(H.length-1)===" "||H.charAt(H.length-1)===" ")&&(Ne=!1,H=H.replace(/[\s\uFEFF\xA0]+$/g," "));let he=re.substr(ae-1);H+=(Ne?" ":"")+he,Ne?S=he.length+1:S=he.length}else S=0}let K=new P(g,b,k,N);if(!K.isEmpty()){let W;m.isEmpty()?(l.push(Kt.replace(K,H)),W=new je(K.startLineNumber-u,H.length-S+1,g-u,H.length-S+1)):m.startLineNumber===m.endLineNumber?(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,H.length-A)),P.intersectRanges(K,r)!==null?d=W:c.push(W)}u+=K.endLineNumber-K.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},jk=class extends se{constructor(){super({id:"editor.action.transpose",label:v("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:O.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 u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new _l(new je(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new w_(u,h,new je(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Ld=class extends se{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 P(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=r.getValueInRange(d);s.push(Kt.replace(d,this._modifyText(u,o)))}else{let l=r.getValueInRange(a);s.push(Kt.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},Vk=class extends Ld{constructor(){super({id:"editor.action.transformToUppercase",label:v("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},Kk=class extends Ld{constructor(){super({id:"editor.action.transformToLowercase",label:v("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},bc=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}},Pg=class i extends Ld{constructor(){super({id:"editor.action.transformToTitlecase",label:v("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:O.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}};Pg.titleBoundary=new bc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");uh=class i extends Ld{constructor(){super({id:"editor.action.transformToSnakecase",label:v("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:O.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()}};uh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");uh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");Fg=class i extends Ld{constructor(){super({id:"editor.action.transformToCamelcase",label:v("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:O.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("")}};Fg.wordBoundary=new bc("[_\\s-]","gm");hh=class i extends Ld{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:v("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:O.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()}};hh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");hh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");hh.underscoreBoundary=new bc("(\\S)(_)(\\S)","gm");X(kk);X(Ik);X(Ak);X(Lk);X(Mk);X(Dk);X(Nk);X(Rk);X(xC);X(Ok);X(Pk);X(Fk);X(Hk);X(Bk);X(zk);X(Uk);X(Wk);X(jk);X(Vk);X(Kk);uh.caseBoundary.isSupported()&&uh.singleLetters.isSupported()&&X(uh);Fg.wordBoundary.isSupported()&&X(Fg);Pg.titleBoundary.isSupported()&&X(Pg);hh.isSupported()&&X(hh)});var bY=M(()=>{});var yY=M(()=>{bY()});function SY(i,e,t,n){let r=i.ordered(e);return P_(r.map(o=>()=>Gk(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,n)}catch(s){Ut(s);return}})),o=>!!o&&Wi(o==null?void 0:o.ranges))}var nge,TC,Gk,CY,rge,Md,Yk,oge,Net,Qk=M(()=>{oi();Dt();gi();ma();At();qt();Ce();wi();Sn();Ze();Lr();ri();qe();jt();qn();Kn();De();ft();xt();_r();Ns();ml();yY();nge=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},TC=function(i,e){return function(t,n){e(t,n,i)}},Gk=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},CY=new nt("LinkedEditingInputVisible",!1),rge="linked-editing-decoration",Md=class $k extends oe{static get(e){return e.getContribution($k.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new ne),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=CY.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 ne),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(li.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new Ro(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 Ro(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,u=l.startColumn,h=l.endColumn,p=Fc(c,d);u+=p,c=c.substr(p),d=d.substr(p);let m=_R(c,d);h-=m,c=c.substr(0,c.length-m),d=d.substr(0,d.length-m),(u!==h||d.length!==0)&&o.push({range:new P(l.startLineNumber,u,l.endLineNumber,h),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 Gk(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=Vt(s=>Gk(this,void 0,void 0,function*(){try{let a=new Ln(!1),l=yield SY(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 h=0,p=c.length;h<p;h++)if(P.containsPosition(c[h],t)){if(d=!0,h!==0){let m=c[h];c.splice(h,1),c.unshift(m)}break}if(!d){this.clearRanges();return}let u=c.map(h=>({range:h,options:$k.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){es(a)||at(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Md.ID="editor.contrib.linkedEditing";Md.DECORATION=ct.register({description:"linked-editing",stickiness:0,className:rge});Md=nge([TC(1,Ke),TC(2,be),TC(3,Tt),TC(4,an)],Md);Yk=class extends se{constructor(){super({id:"editor.action.linkedEditing",label:v("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.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))))},at):super.runCommand(e,t)}run(e,t){let n=Md.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},oge=xi.bindToContribution(Md.get);Me(new oge({id:"cancelLinkedEditingInput",precondition:CY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:O.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));Net=Oe("editor.linkedEditingBackground",{dark:dt.fromHex("#f00").transparent(.3),light:dt.fromHex("#f00").transparent(.3),hcDark:dt.fromHex("#f00").transparent(.3),hcLight:dt.white},v("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Gr("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(be);return SY(n,e,t,et.None)});Ae(Md.ID,Md,1);X(Yk)});var wY=M(()=>{});var xY=M(()=>{wY()});function Zk(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])},Ut));return Promise.all(r).then(()=>{let o=new kC(vr(n));return t.isCancellationRequested?(o.dispose(),new kC([])):o})}var EY,Jk,kC,TY=M(()=>{oi();gi();At();Ce();Mi();Sn();qe();is();zi();xt();EY=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jk=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 EY(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"))})}},kC=class i{constructor(e){this._disposables=new ne;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new Jk(s,r));t=i._union(t,o),d_(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(P.areIntersectingOrTouching(l.range,c.range)){r++;continue}P.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}};St.registerCommand("_executeLinkProvider",(i,...e)=>EY(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(be),o=i.get(Si).getModel(t);if(!o)return[];let s=yield Zk(r,o,et.None);if(!s)return[];for(let l=0;l<Math.min(n,s.links.length);l++)yield s.links[l].resolve(et.None);let a=s.links.slice(0);return s.dispose(),a}))});function lge(i,e){let t=i.url&&/^command:/i.test(i.url.toString()),n=i.tooltip?i.tooltip:t?v("links.navigate.executeCmd","Execute command"):v("links.navigate.follow","Follow link"),r=e?zn?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):zn?v("links.navigate.kb.alt.mac","option + click"):v("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=v("tooltip.explanation","Execute command {0}",l)}}return new sn("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),n,o).appendMarkdown(` (${r})`)}else return new sn().appendText(`${n} (${r})`)}var sge,IC,age,Np,kY,AC,eI,tI=M(()=>{Dt();gi();At();Sl();Ce();Im();nr();lo();ml();Sn();xY();Ze();qn();Ns();xt();wg();TY();De();Oo();ds();sge=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},IC=function(i,e){return function(t,n){e(t,n,i)}},age=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Np=class IY extends oe{static get(e){return e.getContribution(IY.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 ti(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new sl(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 age(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=Vt(t=>Zk(this.providers,e,t));try{let t=new Ln(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){at(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(AC.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 AC(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(et.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===Lo.file&&o.startsWith(`${Lo.file}:`)){let a=ht.parse(o);if(a.scheme===Lo.file){let l=tO(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=rO(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(v("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(v("missing.url","Failed to open this link because its target is missing.")):at(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()}};Np.ID="editor.linkDetector";Np=sge([IC(1,Qi),IC(2,Ei),IC(3,be),IC(4,an)],Np);kY={general:ct.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:ct.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},AC=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?kY.active:kY.general);return r.hoverMessage=lge(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))}};eI=class extends se{constructor(){super({id:"editor.action.openLink",label:v("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=Np.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)}}};Ae(Np.ID,Np,1);X(eI)});var Hg,iI=M(()=>{Ce();Ze();Hg=class extends oe{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})}))}};Hg.ID="editor.contrib.longLinesHelper";Ae(Hg.ID,Hg,2)});var AY=M(()=>{});var LY=M(()=>{AY()});function MY(i){return i===Gm.Write?hge:i===Gm.Text?fge:gge}function DY(i){return i?mge:pge}var LC,MC,cge,dge,uge,hge,fge,pge,mge,gge,nI=M(()=>{LY();Kc();qn();br();De();_r();ar();LC=Oe("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v("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);Oe("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v("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);Oe("editor.wordHighlightTextBackground",{light:LC,dark:LC,hcDark:LC,hcLight:LC},v("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);MC=Oe("editor.wordHighlightBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));Oe("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));Oe("editor.wordHighlightTextBorder",{light:MC,dark:MC,hcDark:MC,hcLight:MC},v("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));cge=Oe("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),dge=Oe("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),uge=Oe("editorOverviewRuler.wordHighlightTextForeground",{dark:cf,light:cf,hcDark:cf,hcLight:cf},v("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),hge=ct.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:vi(dge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),fge=ct.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:vi(uge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),pge=ct.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:vi(cf),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),mge=ct.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),gge=ct.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:vi(cge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}});df((i,e)=>{let t=i.getColor(IO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Nd(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?v("cursorAdded","Cursor added: {0}",n):v("cursorsAdded","Cursors added: {0}",n);fR(r)}}function OY(i,e,t){let n=NY(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=NY(i,s,!t);if(n!==a)return!1}return!0}function NY(i,e,t){let n=i.getValueInRange(e);return t?n.toLowerCase():n}var vge,_ge,rI,oI,sI,aI,lI,Rp,DC,fh,Dd,cI,dI,uI,hI,fI,pI,mI,Bg,gI,vI,_I=M(()=>{Mo();Dt();gl();Ce();Ze();DR();qe();Mn();jt();vy();De();Yi();ft();xt();nI();Et();vge=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},_ge=function(i,e){return function(t,n){e(t,n,i)}};rI=class extends se{constructor(){super({id:"editor.action.insertCursorAbove",label:v("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({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,Nm.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),Nd(s,o.getCursorStates())}},oI=class extends se{constructor(){super({id:"editor.action.insertCursorBelow",label:v("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({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,Nm.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),Nd(s,o.getCursorStates())}},sI=class extends se{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({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 je(r,o,r,o))}e.endColumn>1&&n.push(new je(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),Nd(s,o.getCursorStates())}},aI=class extends se{constructor(){super({id:"editor.action.addCursorsToBottom",label:v("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 je(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Nd(a,s.getCursorStates())}},lI=class extends se{constructor(){super({id:"editor.action.addCursorsToTop",label:v("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 je(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),Nd(s,o.getCursorStates())}},Rp=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},DC=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 u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,d=new je(l.startLineNumber,u.startColumn,l.startLineNumber,u.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 Rp(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 Rp(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 je(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 Rp(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 Rp(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 je(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)}},fh=class i extends oe{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new ne),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=DC.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 je(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(!OY(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 je(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};fh.ID="editor.contrib.multiCursorController";Dd=class extends se{run(e,t){let n=fh.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=dr.get(t);if(s)this._run(n,s);else{let a=e.get(He).createInstance(dr,t);this._run(n,a),a.dispose()}Nd(o,r.getCursorStates())}}},cI=class extends Dd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2082,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},dI=class extends Dd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},uI=class extends Dd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:di(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},hI=class extends Dd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v("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)}},fI=class extends Dd{constructor(){super({id:"editor.action.selectHighlights",label:v("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3114,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},pI=class extends Dd{constructor(){super({id:"editor.action.changeAll",label:v("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ce.and(O.writable,O.editorTextFocus),kbOpts:{kbExpr:O.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},mI=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(P.compareRangesUsingStarts)),this._cachedFindMatches}},Bg=class RY extends oe{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(104),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new ti(()=>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=dr.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(RY._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=fh.get(n);if(!o)return null;let s=dr.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let d=n.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!OY(n.getModel(),d,h))return null}a=DC.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 u=a.searchText;if(c||(u=u.toLowerCase()),d===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new mI(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(P.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,u=r.length;l<d;){let h=n[l];if(c>=u)o.push(h),l++;else{let p=P.compareRangesUsingStarts(h,r[c]);p<0?((r[c].isEmpty()||!P.areIntersecting(h,r[c]))&&o.push(h),l++):(p>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(78),a=o.map(l=>({range:l,options:DY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};Bg.ID="editor.contrib.selectionHighlighter";Bg=vge([_ge(1,be)],Bg);gI=class extends se{constructor(){super({id:"editor.action.focusNextCursor",label:v("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:v("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),Nd(o,r.getCursorStates()))}},vI=class extends se{constructor(){super({id:"editor.action.focusPreviousCursor",label:v("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:v("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),Nd(o,r.getCursorStates()))}};Ae(fh.ID,fh,4);Ae(Bg.ID,Bg,1);X(rI);X(oI);X(sI);X(cI);X(dI);X(uI);X(hI);X(fI);X(pI);X(aI);X(lI);X(gI);X(vI)});function bI(i,e,t,n,r){return PY(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){Ut(a)}})}var PY,yc,NC=M(()=>{gi();At();Mi();Sn();ri();br();xt();ca();zi();ft();PY=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yc={Visible:new nt("parameterHintsVisible",!1),MultipleSignatures:new nt("parameterHintsMultipleSignatures",!1)};St.registerCommand("_executeSignatureHelpProvider",(i,...e)=>PY(void 0,void 0,void 0,function*(){let[t,n,r]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r);let o=i.get(be),s=yield i.get(xn).createModelReference(t);try{let a=yield bI(o.signatureHelpProvider,s.object.textEditorModel,Se.lift(n),{triggerKind:Ls.Invoke,isRetrigger:!1,triggerCharacter:r},et.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function yge(i,e){switch(e.triggerKind){case Ls.Invoke:return e;case Ls.ContentChange:return i;case Ls.TriggerCharacter:default:return e}}var bge,Rd,zg,FY=M(()=>{Dt();At();qt();Ce();hw();br();NC();bge=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(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})(Rd||(Rd={}));zg=class i extends oe{constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new $e),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Rd.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Bi),this.triggerChars=new tu,this.retriggerChars=new tu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Ro(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=Rd.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(at)}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 Rd.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return bge(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(yge);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 Rd.Pending(Vt(l=>bI(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 Rd.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Rd.Default),at(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:Ls.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(83).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};zg.DEFAULT_DELAY=120});var HY=M(()=>{});var BY=M(()=>{HY()});var Cge,yI,Eo,Sge,wge,Ug,UY=M(()=>{Ht();Mo();eb();or();qt();Ce();wi();Mi();BY();ss();Zu();NC();De();ft();ds();_r();Al();qr();Cge=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},yI=function(i,e){return function(t,n){e(t,n,i)}},Eo=fe,Sge=Ti("parameter-hints-next",lt.chevronDown,v("parameterHintsNextIcon","Icon for show next parameter hint.")),wge=Ti("parameter-hints-previous",lt.chevronUp,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ug=class zY extends oe{constructor(e,t,n,r,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new ne),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new io({editor:e},o,r)),this.keyVisible=yc.Visible.bindTo(n),this.keyMultipleSignatures=yc.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=Eo(".editor-widget.parameter-hints-widget"),t=me(e,Eo(".phwrapper"));t.tabIndex=-1;let n=me(t,Eo(".controls")),r=me(n,Eo(".button"+mt.asCSSSelector(wge))),o=me(n,Eo(".overloads")),s=me(n,Eo(".button"+mt.asCSSSelector(Sge)));this._register(Rt(r,"click",h=>{Jd.stop(h),this.previous()})),this._register(Rt(s,"click",h=>{Jd.stop(h),this.next()}));let a=Eo(".body"),l=new mf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=me(a,Eo(".signature")),d=me(a,Eo(".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(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let u=()=>{if(!this.domNodes)return;let h=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(li.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(h=>h.hasChanged(48)).on(u,null)),this._register(this.editor.onDidLayoutChange(h=>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=me(this.domNodes.signature,Eo(".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 u=me(o,Eo("span"));u.textContent=r.label}let c=r.parameters[l];if(c!=null&&c.documentation){let u=Eo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}me(this.domNodes.docs,Eo("p",{},u))}if(r.documentation!==void 0)if(typeof r.documentation=="string")me(this.domNodes.docs,Eo("p",{},r.documentation));else{let u=this.renderMarkdownDocs(r.documentation);me(this.domNodes.docs,u.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 u="",h=r.parameters[l];Array.isArray(h.label)?u=r.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),r.documentation&&(u+=typeof r.documentation=="string"?`, ${r.documentation}`:`, ${r.documentation.value}`),this.announcedLabel!==u&&(Ni(v("hint","{0}, hint",u)),this.announcedLabel=u)}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"&&Oc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Oc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Oc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Oc(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),me(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|^)${vl(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 zY.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)}};Ug.ID="editor.widget.parameterHintsWidget";Ug=Cge([yI(2,Ke),yI(3,Qi),yI(4,Xi)],Ug);Oe("editorHoverWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var xge,WY,ph,CI,SI,wI,xI=M(()=>{nw();Ce();Ze();jt();br();xt();FY();NC();De();ft();Et();UY();xge=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},WY=function(i,e){return function(t,n){e(t,n,i)}},ph=class jY extends oe{static get(e){return e.getContribution(jY.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new zg(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 Xh(()=>this._register(t.createInstance(Ug,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)}};ph.ID="editor.controller.parameterHints";ph=xge([WY(1,He),WY(2,be)],ph);CI=class extends se{constructor(){super({id:"editor.action.triggerParameterHints",label:v("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:O.hasSignatureHelpProvider,kbOpts:{kbExpr:O.editorTextFocus,primary:3082,weight:100}})}run(e,t){let n=ph.get(t);n==null||n.trigger({triggerKind:Ls.Invoke})}};Ae(ph.ID,ph,2);X(CI);SI=100+75,wI=xi.bindToContribution(ph.get);Me(new wI({id:"closeParameterHints",precondition:yc.Visible,handler:i=>i.cancel(),kbOpts:{weight:SI,kbExpr:O.focus,primary:9,secondary:[1033]}}));Me(new wI({id:"showPrevParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:SI,kbExpr:O.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Me(new wI({id:"showNextParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:SI,kbExpr:O.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var VY=M(()=>{});var KY=M(()=>{VY()});var Ege,EI,Wg,RC,qY=M(()=>{Ce();KY();ri();De();ft();Gn();_r();ar();Ege=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},EI=function(i,e){return function(t,n){e(t,n,i)}},Wg=new nt("renameInputVisible",!1,v("renameInputVisible","Whether the rename input widget is visible")),RC=class{constructor(e,t,n,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._disposables=new ne,this.allowEditorOverflow=!0,this._visibleContextKey=Wg.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",v("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(H_),a=e.getColor(B_);this._domNode.style.backgroundColor=String((t=e.getColor(xl))!==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(bO))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((r=e.getColor(_O))!==null&&r!==void 0?r:"");let l=e.getColor(yO);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=v({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 Se(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 ne;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)}};RC=Ege([EI(2,pn),EI(3,Bt),EI(4,Ke)],RC)});function kge(i,e,t,n){return gh(this,void 0,void 0,function*(){let r=new jg(e,t,i),o=yield r.resolveRenameLocation(et.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,et.None)})}var Tge,mh,gh,jg,vh,TI,kI,II=M(()=>{Mo();Dt();gi();At();Ce();Mi();Sn();lu();Ze();Qm();Lr();ri();qe();jt();roe();u0();De();jR();ft();Et();C_();Oo();Gc();Hc();qY();xt();Tge=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},mh=function(i,e){return function(t,n){e(t,n,i)}},gh=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jg=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 gh(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 P(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word,rejectReason:t.length>0?t.join(`
|
|
`):void 0}:{range:P.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
|
`):void 0}})}provideRenameEdits(e,t){return gh(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,n,r){return gh(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(v("no result","No result.")),r);return s})}};vh=class GY{static get(e){return e.getContribution(GY.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 ne,this._cts=new Ri,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(RC,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return gh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Ri,!this.editor.hasModel())return;let n=this.editor.getPosition(),r=new jg(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;let o=new Sa(this.editor,5,void 0,this._cts.token),s;try{let m=r.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Qn.get(this.editor))===null||e===void 0||e.showMessage(m||v("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Qn.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(o.token.isCancellationRequested)return;let a=new Sa(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!P.isEmpty(l)&&!P.spansMultipleLines(l)&&P.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 u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(s.range,s.text,c,d,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();let p=Vc(r.provideRenameEdits(h.newName,a.token),a.token).then(m=>gh(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(P.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:v("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:v("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&Ni(v("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(v("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(v("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(p,250),p})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};vh.ID="editor.contrib.renameController";vh=Tge([mh(1,He),mh(2,Ei),mh(3,qc),mh(4,El),mh(5,zc),mh(6,nF),mh(7,be)],vh);TI=class extends se{constructor(){super({id:"editor.action.rename",label:v("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.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))))},at):super.runCommand(e,t)}run(e,t){let n=vh.get(t);return n?n.run():Promise.resolve()}};Ae(vh.ID,vh,4);X(TI);kI=xi.bindToContribution(vh.get);Me(new kI({id:"acceptRenameInput",precondition:Wg,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:3}}));Me(new kI({id:"acceptRenameInputWithPreview",precondition:ce.and(Wg,ce.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:1024+3}}));Me(new kI({id:"cancelRenameInput",precondition:Wg,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:O.focus,primary:9,secondary:[1033]}}));Gr("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;Lt(typeof r=="string");let{renameProvider:o}=i.get(be);return kge(o,e,t,r)});Gr("_executePrepareRename",function(i,e,t){return gh(this,void 0,void 0,function*(){let{renameProvider:n}=i.get(be),o=yield new jg(e,t,n).resolveRenameLocation(et.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});Mr.as(A_.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function Ige(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 Age(i){let e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return GN()||Ige(e),UR.wrap(e)}function AI(i){let e=new Uint32Array(Lge(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 Age(e)}function Lge(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}var $Y=M(()=>{dre();nr()});function Vg(i){return i&&!!i.data}function DI(i){return i&&Array.isArray(i.edits)}function NI(i,e){return i.has(e)}function Mge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function RI(i,e,t,n,r){return Od(this,void 0,void 0,function*(){let o=Mge(i,e),s=yield Promise.all(o.map(a=>Od(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||!Vg(l)&&!DI(l))&&(l=null),new LI(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 Dge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function YY(i,e){return i.has(e)}function XY(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function OC(i,e,t,n){return Od(this,void 0,void 0,function*(){let r=XY(i,e),o=yield Promise.all(r.map(s=>Od(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Ut(l),a=null}return(!a||!Vg(a))&&(a=null),new MI(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var Od,LI,MI,OI=M(()=>{gi();At();Sn();is();zi();Mi();$Y();qe();xt();Od=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};LI=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};MI=class{constructor(e,t){this.provider=e,this.tokens=t}};St.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Si).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be),o=Dge(r,n);return o?o[0].getLegend():i.get(ui).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));St.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Si).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be);if(!NI(r,n))return i.get(ui).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=yield RI(r,n,null,null,et.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!Vg(a))return;let l=AI({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));St.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht);let r=i.get(Si).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=XY(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!P.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 OC(o,r,P.lift(n),et.None);if(a)return a.provider.getLegend()}));St.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),Lt(P.isIRange(n));let r=i.get(Si).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=yield OC(o,r,P.lift(n),et.None);if(!(!s||!s.tokens))return AI({id:0,type:"full",data:s.tokens.data})}))});function qg(i,e,t){var n;let r=(n=t.getValue(Kg,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}var Kg,PI=M(()=>{Kg="editor.semanticHighlighting"});var QY,al,FI,Gg,HI,BI=M(()=>{Ce();At();is();jn();Dt();gi();ar();rF();OI();Ns();ml();xt();oF();Eb();PI();QY=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},al=function(i,e){return function(t,n){e(t,n,i)}},FI=class extends oe{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new Gg(d,e,n,o,s)},l=(d,u)=>{u.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let u=this._watchers[d.uri.toString()];qg(d,n,r)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{qg(d,n,r)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(r.onDidChangeConfiguration(d=>{d.affectsConfiguration(Kg)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};FI=QY([al(0,r1),al(1,Si),al(2,pn),al(3,Mt),al(4,an),al(5,be)],FI);Gg=class _h extends oe{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:_h.REQUEST_MIN_DELAY,max:_h.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new ti(()=>this._fetchDocumentSemanticTokensNow(),_h.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=()=>{Vi(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(!NI(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Ri,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=RI(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 Ln(!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,u=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,u,o)}},l=>{l&&(es(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||at(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(DI(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 h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){let p=t.edits[h];if(p.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,h,p.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(p.start+p.deleteCount);m>0&&(_h._copy(l,d-m,c,u-m,m),u-=m),p.data&&(_h._copy(p.data,0,c,u-p.data.length,p.data.length),u-=p.data.length),d=p.start}d>0&&_h._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(Vg(t)){this._currentDocumentResponse=new HI(e,t.resultId,t.data);let a=xb(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()}};Gg.REQUEST_MIN_DELAY=300;Gg.REQUEST_MAX_DELAY=2e3;Gg=QY([al(1,r1),al(2,pn),al(3,an),al(4,be)],Gg);HI=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Yc(FI)});var Nge,$g,Yg,zI=M(()=>{Dt();Ce();Ze();OI();PI();rF();jn();ar();Ns();ml();xt();oF();Nge=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},$g=function(i,e){return function(t,n){e(t,n,i)}},Yg=class extends oe{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 ti(()=>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(Kg)&&(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(!qg(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!YY(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=Vt(s=>Promise.resolve(OC(this._provider,e,t,s))),o=new Ln(!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,xb(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Yg.ID="editor.contrib.viewportSemanticTokens";Yg=Nge([$g(1,r1),$g(2,pn),$g(3,Mt),$g(4,an),$g(5,be)],Yg);Ae(Yg.ID,Yg,1)});var PC,JY=M(()=>{wi();qe();PC=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 u=o.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(ow(u)&&sw(d))break;d=u}for(l+=1;c<o.length;c++){let u=o.charCodeAt(c);if(sw(u)&&ow(d))break;if(u===95||u===45)break;d=u}l<c&&e.push({range:new P(n.lineNumber,s+l,n.lineNumber,s+c)})}_addWordRanges(e,t,n){let r=t.getWordAtPosition(n);r&&e.push({range:new P(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 P(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});function eX(i,e,t,n,r){return HC(this,void 0,void 0,function*(){let o=i.all(e).concat(new PC);o.length===1&&o.unshift(new wd);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Wi(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(let u of c[d])P.isIRange(u.range)&&P.containsPosition(u.range,t[d])&&a[d].push(P.lift(u.range))}},Ut));return yield Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((h,p)=>Se.isBefore(h.getStartPosition(),p.getStartPosition())?1:Se.isBefore(p.getStartPosition(),h.getStartPosition())||Se.isBefore(h.getEndPosition(),p.getEndPosition())?-1:Se.isBefore(p.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||P.containsRange(h,d)&&!P.equalsRange(h,d))&&(c.push(h),d=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h<c.length;h++){let p=c[h-1],m=c[h];if(m.startLineNumber!==p.startLineNumber||m.endLineNumber!==p.endLineNumber){let g=new P(p.startLineNumber,e.getLineFirstNonWhitespaceColumn(p.startLineNumber),p.endLineNumber,e.getLineLastNonWhitespaceColumn(p.endLineNumber));g.containsRange(p)&&!g.equalsRange(p)&&m.containsRange(g)&&!m.equalsRange(g)&&u.push(g);let b=new P(p.startLineNumber,1,p.endLineNumber,e.getLineMaxColumn(p.endLineNumber));b.containsRange(p)&&!b.equalsRange(g)&&m.containsRange(b)&&!m.equalsRange(b)&&u.push(b)}u.push(m)}return u})})}var Rge,Oge,HC,UI,Op,FC,WI,jI,VI=M(()=>{oi();gi();At();Ze();ri();qe();Mn();jt();M7();JY();De();Yi();zi();xt();ca();Mi();Sn();Rge=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},Oge=function(i,e){return function(t,n){e(t,n,i)}},HC=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},UI=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}},Op=class ZY{static get(e){return e.getContribution(ZY.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 HC(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield eX(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(109),et.None).then(o=>{var s;if(!(!Wi(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!ha(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 UI(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=>je.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}})}};Op.ID="editor.contrib.smartSelectController";Op=Rge([Oge(1,be)],Op);FC=class extends se{constructor(e,t){super(t),this._forward=e}run(e,t){return HC(this,void 0,void 0,function*(){let n=Op.get(t);n&&(yield n.run(this._forward))})}},WI=class extends FC{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:v("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};St.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");jI=class extends FC{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:v("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ae(Op.ID,Op,4);X(WI);X(jI);St.registerCommand("_executeSelectionRangeProvider",function(i,...e){return HC(this,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t));let r=i.get(be).selectionRangeProvider,o=yield i.get(xn).createModelReference(t);try{return eX(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0},et.None)}finally{o.dispose()}})})});var tX,iX=M(()=>{De();tX=Object.freeze({View:{value:v("view","View"),original:"View"},Help:{value:v("help","Help"),original:"Help"},Test:{value:v("test","Test"),original:"Test"},File:{value:v("file","File"),original:"File"},Preferences:{value:v("preferences","Preferences"),original:"Preferences"},Developer:{value:v({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var nX=M(()=>{});var rX=M(()=>{nX()});var Xg,oX,BC,sX=M(()=>{Ht();nre();Uw();Ce();rX();pp();ri();WR();zP();UP();Xg=class{constructor(e,t){this.lineNumbers=e,this.lastLineRelativePosition=t}},oX=_f("stickyScrollViewLayer",{createHTML:i=>i}),BC=class extends oe{constructor(e){super(),this._editor=e,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new ne),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 Ko),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){mr(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 Se(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),u=this._editor.getOption(65),h;try{h=t1.filter(s.inlineDecorations,o,s.minColumn,s.maxColumn)}catch(N){h=[]}let p=new pb(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,h,s.tabSize,s.startVisibleColumn,1,1,1,500,"none",!0,!0,null),m=new I_(2e3);mb(p,m);let g;oX?g=oX.createHTML(m.build()):g=m.build();let b=document.createElement("span");b.className="sticky-line",b.classList.add(`stickyLine${t}`),b.style.lineHeight=`${d}px`,b.innerHTML=g;let S=document.createElement("span");S.className="sticky-line",S.style.lineHeight=`${d}px`,c==="left"?S.style.width=`${a.contentLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(S.style.width=`${a.contentLeft}px`);let k=document.createElement("span");return u.renderType===1||u.renderType===3&&t%10===0?k.innerText=t.toString():u.renderType===2&&(k.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),k.className="sticky-line-number",k.style.lineHeight=`${d}px`,k.style.width=`${a.lineNumbersWidth}px`,c==="left"?k.style.paddingLeft=`${a.lineNumbersLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(k.style.paddingLeft=`${a.lineNumbersLeft}px`),S.appendChild(k),this._editor.applyFontInfo(b),this._editor.applyFontInfo(k),n.appendChild(S),n.appendChild(b),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(Rt(n,"mouseover",N=>{if(this._editor.hasModel()){let H=new tR(N).target.innerText;this._hoverOnLine=t,this._hoverOnColumn=this._editor.getModel().getLineContent(t).indexOf(H)+1||-1}})),n}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}}});var Pge,KI,Fge,Pd,Pp,Qg,Jg,bh,qI,Zg=M(()=>{oi();gi();At();Em();tf();ri();qe();Ns();Et();bl();is();Ce();xt();Pge=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},KI=function(i,e){return function(t,n){e(t,n,i)}},Fge=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Pd=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}},Pp=class extends Pd{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},Qg=class extends Pd{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},Jg=class i extends Pd{static create(e,t,n){let r=new Ri(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=Pd.findId(`provider_${d}`,o),p=new Qg(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,p);return p},m=>(Ut(m),p)).then(m=>{Pd.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);ha(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=Pd.findId(e,t),r=new Pp(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=ao.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 Pp?e.push(t.symbol):e.push(...ao.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>P.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>Se.compare(P.getStartPosition(n.range),P.getStartPosition(r.range))||Se.compare(P.getEndPosition(r.range),P.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)}},bh=rr("IOutlineModelService"),qI=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new ne,this._cache=new fa(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 Fge(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()||!ha(o.provider,r)){let a=new Ri;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:Jg.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()}})}};qI=Pge([KI(0,be),KI(1,an),KI(2,Si)],qI);sr(bh,qI,1)});var Cc,yh,Ch,zC=M(()=>{Cc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},yh=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},Ch=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}}});var VC,tv,aX,ev,Fd,UC,WC,GI,jC,$I,YI,lX=M(()=>{Ce();xt();Zg();Dt();Sy();kE();SE();Kn();At();zC();Em();VC=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},tv=function(i,e){return function(t,n){e(t,n,i)}},aX=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(ev||(ev={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Fd||(Fd={}));UC=class{constructor(e,t,n,r){this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new Ro(300);let o=new GI(n),s=new YI(this._editor,n),a=new $I(this._editor,t);switch(r){case ev.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case ev.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case ev.INDENTATION_MODEL:this._modelProviders.push(a);break}this._store=new ne}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return aX(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(()=>aX(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 Fd.CANCELED:return this._store.clear(),null;case Fd.VALID:return r.stickyModel}}return null}))})}};UC=VC([tv(1,Tt),tv(2,be)],UC);WC=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Fd.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let r=Vt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:r.then(o=>this.isModelValid(o)?n.isCancellationRequested?Fd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,o),Fd.VALID):this._invalid()).then(void 0,o=>(at(o),Fd.CANCELED)),modelPromise:r}}isModelValid(e){return!0}isProviderValid(e){return!0}},GI=class extends WC{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return Jg.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 Ch(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(ao.first(e.children.values())instanceof Qg){let a=ao.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let p=this._findSumOfRangesOfGroup(h);p>c&&(d=h,c=p,l=h.id)}t=l,n=d.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new Cc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new Cc(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 yh(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 Cc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new yh(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 Pp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};GI=VC([tv(0,be)],GI);jC=class extends WC{constructor(e){super(),this._foldingLimitReporter=new D0(e)}createStickyModel(e,t,n,r){let o=this._fromFoldingRegions(r);return new Ch(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new yh(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 yh(new Cc(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),n.push(l)}return r}},$I=class extends jC{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,n){return new ju(e,this._languageConfigurationService,this._foldingLimitReporter).compute(n)}};$I=VC([tv(1,Tt)],$I);YI=class extends jC{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return Za.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,n){let r=Za.getFoldingRangeProviders(this._languageFeaturesService,e);return new Vu(e,r,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};YI=VC([tv(1,be)],YI)});var Hge,cX,dX,XI,KC,uX=M(()=>{Ce();xt();gi();Dt();oi();lo();qt();Kn();lX();zC();Hge=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)}},dX=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},XI=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},KC=class extends oe{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._store.add(new $e),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=new ne,this._updateSoon=this._register(new ti(()=>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 UC(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 dX(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Ri,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return dX(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;let t=this._editor.getModel(),n=t.getVersionId(),o=(this._model?!nf(this._model.uri,t.uri):!1)?setTimeout(()=>{e.isCancellationRequested||(this._model=new Ch(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 u=t.children[d];u.range&&a.push(u.range.startLineNumber)}let l=this.updateIndex(iu(a,e.startLineNumber,(d,u)=>d-u)),c=this.updateIndex(iu(a,e.startLineNumber+r,(d,u)=>d-u));for(let d=l;d<=c;d++){let u=t.children[d];if(!u)return;if(u.range){let h=u.range.startLineNumber,p=u.range.endLineNumber;e.startLineNumber<=p+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new XI(h,p-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,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}};KC=Hge([cX(1,be),cX(2,Tt)],KC)});var Bge,Fp,hX,xs,QI=M(()=>{Ce();xt();sX();uX();Et();Tl();Yi();ft();jt();wg();qe();H2();pk();ri();gi();Kn();Ns();Ht();zC();Bge=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},Fp=function(i,e){return function(t,n){e(t,n,i)}},hX=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xs=class fX extends oe{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 ne,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 BC(this._editor),this._stickyLineCandidateProvider=new KC(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new Xg([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(111)&&this._readConfiguration()})),this._register(Rt(this._stickyScrollWidget.getDomNode(),on.CONTEXT_MENU,c=>hX(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=O.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=O.stickyScrollVisible.bindTo(this._contextKeyService);let l=this._register(Ts(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(Rt(this._stickyScrollWidget.getDomNode(),on.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(fX.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 ne,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(P.fromPositions(e)),this._editor.focus()}_createClickLinkGesture(){let e=new ne,t=new ne;e.add(t);let n=new sl(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 P(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 u=new Ri;t.add(Ft(()=>u.dispose(!0)));let h;rh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Se(l,c+1),u.token).then(p=>{if(!u.token.isCancellationRequested)if(p.length!==0){this._candidateDefinitionsLength=p.length;let m=s.element;h!==m?(t.clear(),h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"}))):h||(h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"})))}else t.clear()})}else t.clear()})),e.add(n.onCancel(()=>{t.clear()})),e.add(n.onExecute(r=>hX(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(mC,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:xe.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 Cc(s[0].startLineNumber,s[s.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(let c of l){let d=c.startLineNumber,u=c.endLineNumber,h=c.nestingDepth;if(u-d>0){let p=(h-1)*e,m=h*e,g=this._editor.getBottomForLineNumber(d)-n,b=this._editor.getTopForLineNumber(u)-n,S=this._editor.getBottomForLineNumber(u)-n;if(p>b&&p<=S){o.push(d),r=S-m;break}else m>g&&m<=S&&o.push(d);if(o.length===t)break}}}return new Xg(o,r)}dispose(){super.dispose(),this._sessionStore.dispose()}};xs.ID="store.contrib.stickyScrollController";xs=Bge([Fp(1,cs),Fp(2,be),Fp(3,He),Fp(4,Tt),Fp(5,an),Fp(6,Ke)],xs)});var zge,qC,JC,GC,$C,YC,XC,QC,pX=M(()=>{Ze();De();iX();Yi();jn();ft();jt();QI();zge=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qC=class extends os{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:v("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:v({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:tX.View,toggled:{condition:ce.equals("config.editor.stickyScroll.enabled",!0),title:v("stickyScroll","Sticky Scroll"),mnemonicTitle:v({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:xe.CommandPalette},{id:xe.MenubarViewMenu,group:"5_editor",order:2},{id:xe.StickyScrollContext}]})}run(e){return zge(this,void 0,void 0,function*(){let t=e.get(Mt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}},JC=100,GC=class extends ua{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:v("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:v({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ce.and(ce.has("config.editor.stickyScroll.enabled"),O.stickyScrollVisible),menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focus()}},$C=class extends ua{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:v("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:18}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusNext()}},YC=class extends ua{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:v("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:16}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusPrevious()}},XC=class extends ua{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:v("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:3}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.goToFocused()}},QC=class extends ua{constructor(){super({id:"editor.action.selectEditor",title:{value:v("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:9}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.selectEditor()}}});var JI=M(()=>{Ze();pX();QI();Yi();Ae(xs.ID,xs,1);mi(qC);mi(GC);mi(YC);mi($C);mi(XC);mi(QC)});var iA,Sh,Uge,ZI,eA,tA,ZC,nA=M(()=>{gi();Cl();Em();Ce();Ze();Lr();qe();xt();N7();Qu();L7();D7();$m();Et();iA=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},Sh=function(i,e){return function(t,n){e(t,n,i)}},Uge=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ZI=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}},eA=class extends jN{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=ao.slice(n,r),s=ao.slice(n,0,r),a=5;for(let l of ao.concat(o,s)){if(l.score===yl.Default)continue;let c=new P(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 ZI(c,d,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(et.None)}return t}};eA=iA([Sh(5,up)],eA);tA=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 Uge(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;let s=this._getEditorOption(86,e);if(il.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(il.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 u,h=e.getValueInRange(new P(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let p=new ng(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=p,this._lastResult.acquire(),u=this._lastResult}else{let p=yield V0(this._languageFeatureService.completionProvider,e,t,new dc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},r),m;p.needsClipboard&&(m=yield this._clipboardService.readText());let g=new fp(p.items,t.column,new ng(h,0),xd.None,this._getEditorOption(114,e),this._getEditorOption(108,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new eA(e,t.lineNumber,c,g,p,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(et.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let r=e.getValueInRange(P.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}}};tA=iA([Sh(1,be),Sh(2,Ms),Sh(3,up)],tA);ZC=class Hp{constructor(e,t,n,r){if(++Hp._counter===1){let o=r.createInstance(tA,(s,a)=>{var l;return((l=n.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Hp._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Hp._counter===0&&((e=Hp._disposable)===null||e===void 0||e.dispose(),Hp._disposable=void 0)}};ZC._counter=0;ZC=iA([Sh(1,be),Sh(2,Zt),Sh(3,He)],ZC);Ae("suggest.inlineCompletionsProvider",ZC,0)});var mX=M(()=>{});var gX=M(()=>{mX()});var vX=M(()=>{});var _X=M(()=>{vX()});var bX=M(()=>{});var yX=M(()=>{bX()});var Wge,jge,e9,CX=M(()=>{Ht();Ire();eR();lP();qt();Ce();ds();yX();Wge=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},jge=function(i,e){return function(t,n){e(t,n,i)}},e9=class extends oe{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=me(e,fe("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 G_(this.el,"click")),a=this._register(new G_(this.el,"keypress")),l=li.chain(a.event).map(u=>new g_(u)).filter(u=>u.keyCode===3).event,c=this._register(new G_(this.el,aP.Tap)).event;this._register(J_.addTarget(this.el));let d=li.any(s.event,l,c);this._register(d(u=>{this.enabled&&(Jd.stop(u,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e9=Wge([jge(3,Qi)],e9)});var SX,wX,Vge,t9,rA,xX=M(()=>{_X();Ht();gf();Pc();Ce();Zu();Et();CX();Al();qr();SX=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},wX=function(i,e){return function(t,n){e(t,n,i)}},Vge=26,t9=class extends oe{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(rA))}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,Vge)}};t9=SX([wX(1,He)],t9);rA=class extends oe{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(io,{}),this.element=fe("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=fe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){mr(this.element)}show(e){mr(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=me(this.element,fe("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(fe(`div${mt.asCSSSelector(e.icon)}`));let r=me(this.element,fe("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=me(this.element,fe("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(e9,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=me(this.element,fe("div.action-container"));this.actionBar=this._register(new Po(o)),this.actionBar.push(this._register(new ns("banner.close","Close Banner",mt.asClassName(ab),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};rA=SX([wX(0,He)],rA)});function qge(i,e){return{nonBasicASCII:e.nonBasicASCII===$_?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===$_?!i:e.includeComments,includeStrings:e.includeStrings===$_?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function cA(i){return`U+${i.toString(16).padStart(4,"0")}`}function oA(i){let e=`\`${cA(i)}\``;return aw.isInvisibleCharacter(i)||(e+=` "${`${Gge(i)}`}"`),e}function Gge(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function EX(i,e){return Jw.computeUnicodeHighlightReason(i,e)}function $ge(i,e){return Zn(this,void 0,void 0,function*(){let t=i.getValue(Ca.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;yield i.updateValue(Ca.allowedCharacters,n,2)})}function Yge(i,e){var t;return Zn(this,void 0,void 0,function*(){let n=(t=i.inspect(Ca.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(Ca.allowedLocales,r,2)})}function Xge(i){throw new Error(`Unexpected value: ${i}`)}var hA,Bp,Zn,Kge,zp,sA,aA,lA,Up,dA,uA,Hd,Wp,jp,iv,fA=M(()=>{Dt();or();Sl();Ce();nr();wi();gX();Ze();Xm();qn();ooe();ub();ss();Jre();lc();rC();xX();De();jn();Et();ds();Ll();Al();soe();hA=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},Bp=function(i,e){return function(t,n){e(t,n,i)}},Zn=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kge=Ti("extensions-warning-message",lt.warning,v("warningIcon","Icon shown with a warning message in the extensions editor.")),zp=class extends oe{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:v("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new jp};else if(o.ambiguousCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Hd};else if(o.invisibleCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Wp};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Kge,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(t9,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=qge(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"?qN:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new sA(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new aA(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};zp.ID="editor.contrib.unicodeHighlighter";zp=hA([Bp(1,Ml),Bp(2,sF),Bp(3,He)],zp);sA=class extends oe{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 ti(()=>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:Up.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!Kw(t,e))return null;let n=t.getValueInRange(e.range);return{reason:EX(n,this._options),inComment:qw(t,e),inString:Gw(t,e)}}};sA=hA([Bp(3,Ml)],sA);aA=class extends oe{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 ti(()=>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=Jw.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:Up.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 Kw(t,e)?{reason:EX(n,this._options),inComment:qw(t,e),inString:Gw(t,e)}:null}},lA=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(zp.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),u=oA(d),h;switch(l.reason.kind){case 0:{b_(l.reason.confusableWith)?h=v("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,oA(l.reason.confusableWith.codePointAt(0))):h=v("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",u,oA(l.reason.confusableWith.codePointAt(0)));break}case 1:h=v("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",u);break;case 2:h=v("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",u);break}let p={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},m=v("unicodeHighlight.adjustSettings","Adjust settings"),g=`command:${iv.ID}?${encodeURIComponent(JSON.stringify(p))}`,b=new sn("",!0).appendMarkdown(h).appendText(" ").appendLink(g,m);o.push(new no(this,a.range,[b],!1,s++))}return o}renderHoverParts(e,t){return KT(e,t,this._editor,this._languageService,this._openerService)}};lA=hA([Bp(1,Xi),Bp(2,Qi)],lA);Up=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=ct.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}};Up.instance=new Up;dA=class extends se{constructor(){super({id:Hd.ID,label:v("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeComments,!1,2)})}},uA=class extends se{constructor(){super({id:Hd.ID,label:v("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeStrings,!1,2)})}},Hd=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.ambiguousCharacters,!1,2)})}};Hd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";Wp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.invisibleCharacters,!1,2)})}};Wp.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";jp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.nonBasicASCII,!1,2)})}};jp.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";iv=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return Zn(this,void 0,void 0,function*(){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(lr),d=e.get(Mt);function u(m){return aw.isInvisibleCharacter(m)?v("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",cA(m)):v("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${cA(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:v("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Zn(this,void 0,void 0,function*(){Yge(d,[m])})});if(h.push({label:u(r),run:()=>$ge(d,[r])}),a){let m=new dA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new uA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Hd;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new Wp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new jp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else Xge(o);let p=yield c.pick(h,{title:v("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});p&&(yield p.run())})}};iv.ID="editor.action.unicodeHighlight.showExcludeOptions";X(Hd);X(Wp);X(jp);X(iv);Ae(zp.ID,zp,1);jo.register(lA)});function Zge(i,e,t){i.setModelProperty(e.uri,kX,t)}function eve(i,e){return i.getModelProperty(e.uri,kX)}var Qge,TX,Jge,kX,nv,pA=M(()=>{Ce();lo();Ze();Lr();De();Zw();Qge=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},TX=function(i,e){return function(t,n){e(t,n,i)}},Jge=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kX="ignoreUnusualLineTerminators";nv=class extends oe{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 Jge(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||eve(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:v("unusualLineTerminators.title","Unusual Line Terminators"),message:v("unusualLineTerminators.message","Detected unusual line terminators"),detail:v("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`.",Nr(e.uri)),primaryButton:v({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:v("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){Zge(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};nv.ID="editor.contrib.unusualLineTerminatorsDetector";nv=Qge([TX(1,bf),TX(2,Zt)],nv);Ae(nv.ID,nv,1)});function AX(i,e,t,n){let r=i.ordered(e);return P_(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,Ut)),Wi)}function ive(i,e,t,n){return i.has(e)?new mA(e,t,n,i):new gA(e,t,n)}var tve,IX,r9,i9,mA,gA,vA,wh,n9,_A,bA,yA,CA=M(()=>{Mo();oi();Dt();gi();At();Ce();Ze();qe();jt();br();De();ft();xt();nI();tve=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},IX=function(i,e){return function(t,n){e(t,n,i)}},r9=new nt("hasWordHighlights",!1);i9=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=Vt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new P(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 u=n.getRange(c);u&&u.startLineNumber===r&&u.startColumn<=o&&u.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}},mA=class extends i9{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return AX(this._providers,e,t.getPosition(),r).then(o=>o||[])}},gA=class extends i9{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,r){return of(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:Gm.Text}))})}isValid(e,t,n){let r=t.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,t,n)}};Gr("_executeDocumentHighlights",(i,e,t)=>{let n=i.get(be);return AX(n.documentHighlightProvider,e,t,et.None)});vA=class{constructor(e,t,n){this.toUnhook=new ne,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=r9.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(P.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);Ni(`${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);Ni(`${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=ive(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())},at)}}_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:MY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}},wh=class LX extends oe{static get(e){return e.getContribution(LX.ID)}constructor(e,t,n){super(),this.wordHighlighter=null;let r=()=>{e.hasModel()&&(this.wordHighlighter=new vA(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()}};wh.ID="editor.contrib.wordHighlighter";wh=tve([IX(1,Ke),IX(2,be)],wh);n9=class extends se{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=wh.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},_A=class extends n9{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:r9,kbOpts:{kbExpr:O.editorTextFocus,primary:65,weight:100}})}},bA=class extends n9{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:r9,kbOpts:{kbExpr:O.editorTextFocus,primary:1089,weight:100}})}},yA=class extends se{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:r9.toNegated(),kbOpts:{kbExpr:O.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=wh.get(t);r&&r.restoreViewState(!0)}};Ae(wh.ID,wh,0);X(_A);X(bA);X(yA)});var xh,ll,cl,SA,wA,xA,EA,TA,kA,IA,AA,LA,MA,DA,NA,RA,OA,PA,FA,Eh,rv,ov,HA,BA,zA,UA,WA,jA,VA,o9=M(()=>{Ze();x_();Xm();sre();MR();lre();ri();qe();Mn();jt();Kn();De();Vw();ft();ioe();xh=class extends xi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Se(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=>AR.fromModelSelection(l))),a.length===1){let l=new Se(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new je(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new je(t.lineNumber,t.column,t.lineNumber,t.column)}},ll=class extends xh{_move(e,t,n,r){return Jh.moveWordLeft(e,t,n,r)}},cl=class extends xh{_move(e,t,n,r){return Jh.moveWordRight(e,t,n,r)}},SA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},wA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},xA=class extends ll{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},EA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},TA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},kA=class extends ll{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},IA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},AA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},LA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},MA=class extends cl{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},DA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},NA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},RA=class extends cl{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},OA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},PA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},FA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},Eh=class extends xi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(Tt);if(!t.hasModel())return;let o=Uc(t.getOption(126)),s=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(9),d=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(p=>{let m=this._delete({wordSeparators:o,model:s,selection:p,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(7),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new _l(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},rv=class extends Eh{_delete(e,t){let n=Jh.deleteWordLeft(e,t);return n||new P(1,1,1,1)}},ov=class extends Eh{_delete(e,t){let n=Jh.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},HA=class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:O.writable})}},BA=class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:O.writable})}},zA=class extends rv{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},UA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:O.writable})}},WA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:O.writable})}},jA=class extends ov{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},VA=class extends se{constructor(){super({id:"deleteInsideWord",precondition:O.writable,label:v("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=Jh.deleteInsideWord(r,o,l);return new _l(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};Me(new SA);Me(new wA);Me(new xA);Me(new EA);Me(new TA);Me(new kA);Me(new LA);Me(new MA);Me(new DA);Me(new NA);Me(new RA);Me(new OA);Me(new IA);Me(new AA);Me(new PA);Me(new FA);Me(new HA);Me(new BA);Me(new zA);Me(new UA);Me(new WA);Me(new jA);X(VA)});var KA,qA,s9,GA,$A,a9,YA,XA,QA=M(()=>{Ze();MR();qe();jt();o9();zi();KA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=Dm.deleteWordPartLeft(e);return n||new P(1,1,1,1)}},qA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=Dm.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},s9=class extends xh{_move(e,t,n,r){return Dm.moveWordPartLeft(e,t,n)}},GA=class extends s9{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");$A=class extends s9{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");a9=class extends xh{_move(e,t,n,r){return Dm.moveWordPartRight(e,t,n)}},YA=class extends a9{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},XA=class extends a9{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};Me(new KA);Me(new qA);Me(new GA);Me(new $A);Me(new YA);Me(new XA)});var sv,JA=M(()=>{Ce();Ze();u0();De();sv=class extends oe{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Qn.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(v("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(v("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}};sv.ID="editor.contrib.readOnlyMessageController";Ae(sv.ID,sv,2)});var MX=M(()=>{});var DX=M(()=>{MX()});var Th,ZA=M(()=>{Mo();Xre();De();Yi();ft();Th=class i extends os{constructor(){super({id:i.ID,title:{value:v({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(Ke).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!jw.getTabFocusMode(t);jw.setTabFocusMode(r,t),r?Ni(v("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Ni(v("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Th.ID="editor.action.toggleTabFocusMode";mi(Th)});var tL=gt(av=>{DX();Ht();Pre();Mo();Zm();Ce();nr();wi();Sn();Ze();jt();ZA();ft();Et();Gn();ds();Xc();var NX=av&&av.__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},l9=av&&av.__param||function(i,e){return function(t,n){e(t,n,i)}},RX=new nt("accessibilityHelpWidgetVisible",!1),kh=class OX extends oe{static get(e){return e.getContribution(OX.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Vp,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};kh.ID="editor.contrib.accessibilityHelpController";kh=NX([l9(1,He)],kh);function nve(i,e){return!i||i.length===0?Ki.noSelection:i.length===1?e?Do(Ki.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):Do(Ki.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?Do(Ki.multiSelectionRange,i.length,e):i.length>0?Do(Ki.multiSelection,i.length):""}var Vp=class c9 extends Ds{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=RX.bindTo(this._contextKeyService),this._domNode=Iw(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=me(this._domNode.domNode,fe("h1",void 0,Ki.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=Iw(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(ts(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Ni(Ki.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),mr(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Ni(Ki.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(ht.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 c9.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?Do(t,r.getAriaLabel()):Do(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)})}me(e,fe("p",void 0,nve(n,r)));let o=me(e,fe("p"));t.get(59)?t.get(88)?o.textContent=Ki.readonlyDiffEditor:o.textContent=Ki.editableDiffEditor:t.get(88)?o.textContent=Ki.readonlyEditor:o.textContent=Ki.editableEditor;let s=me(e,fe("ul")),a=zn?Ki.changeConfigToOnMac:Ki.changeConfigToOnWinLinux;switch(t.get(2)){case 0:me(s,fe("li",void 0,a));break;case 2:me(s,fe("li",void 0,Ki.auto_on));break;case 1:me(s,fe("li",void 0,Ki.auto_off,a));break}t.get(139)?me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOnMsg,Ki.tabFocusModeOnMsgNoKb))):me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOffMsg,Ki.tabFocusModeOffMsgNoKb)));let l=zn?Ki.openDocMac:Ki.openDocWinLinux;me(s,fe("li",void 0,l)),me(e,fe("p",void 0,Ki.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,mr(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(c9.WIDTH,e.width-40)),n=Math.max(5,Math.min(c9.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)}};Vp.ID="editor.contrib.accessibilityHelpWidget";Vp.WIDTH=500;Vp.HEIGHT=300;Vp=NX([l9(1,Ke),l9(2,Bt),l9(3,Qi)],Vp);var eL=class extends se{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Ki.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=kh.get(t);n==null||n.show()}};Ae(kh.ID,kh,4);X(eL);var rve=xi.bindToContribution(kh.get);Me(new rve({id:"closeAccessibilityHelp",precondition:RX,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var PX=M(()=>{});var FX=M(()=>{PX()});var nL=gt(lv=>{FX();Ht();ma();Ce();Ze();br();bre();Ere();ss();dF();Xc();var ove=lv&&lv.__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},HX=lv&&lv.__param||function(i,e){return function(t,n){e(t,n,i)}},Kp=class BX extends oe{static get(e){return e.getContribution(BX.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(hf.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 d9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Kp.ID="editor.contrib.inspectTokens";Kp=ove([HX(1,kb),HX(2,Xi)],Kp);var iL=class extends se{constructor(){super({id:"editor.action.inspectTokens",label:aF.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Kp.get(t);n==null||n.launch()}};function sve(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 ave(i,e){let t=hf.get(e);if(t)return t;let n=i.encodeLanguageId(e);return{getInitialState:()=>QO,tokenize:(r,o,s)=>JO(e,s),tokenizeEncoded:(r,o,s)=>ZO(n,s)}}var d9=class i extends oe{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=ave(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)}Zd(this._domNode,fe("h2.tm-token",void 0,sve(s),fe("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),me(this._domNode,fe("hr.tokens-inspect-separator",{style:"clear:both"}));let a=(r<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(r<<1)+1]):null;me(this._domNode,fe("table.tm-metadata-table",void 0,fe("tbody",void 0,fe("tr",void 0,fe("td.tm-metadata-key",void 0,"language"),fe("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),fe("tr",void 0,fe("td.tm-metadata-key",void 0,"token type"),fe("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),fe("tr",void 0,fe("td.tm-metadata-key",void 0,"font style"),fe("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),fe("tr",void 0,fe("td.tm-metadata-key",void 0,"foreground"),fe("td.tm-metadata-value",void 0,`${a?dt.Format.CSS.formatHex(a.foreground):"-?-"}`)),fe("tr",void 0,fe("td.tm-metadata-key",void 0,"background"),fe("td.tm-metadata-value",void 0,`${a?dt.Format.CSS.formatHex(a.background):"-?-"}`))))),me(this._domNode,fe("hr.tokens-inspect-separator")),n<t.tokens1.length&&me(this._domNode,fe("span.tm-token-type",void 0,t.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=hf.getColorMap(),n=lf.getLanguageId(e),r=lf.getTokenType(e),o=lf.getFontStyle(e),s=lf.getForeground(e),a=lf.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]}}};d9._ID="editor.contrib.inspectTokensWidget";Ae(Kp.ID,Kp,4);X(iL)});var lve,zX,cv,UX=M(()=>{De();Hc();Ce();Gn();o1();Ll();lve=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},zX=function(i,e){return function(t,n){e(t,n,i)}},cv=class u9{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Mr.as(Ta.Quickaccess)}provide(e){let t=new ne;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(u9.PREFIX.length));r&&r.prefix&&r.prefix!==u9.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==u9.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:v("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};cv.PREFIX="?";cv=lve([zX(0,lr),zX(1,Bt)],cv)});var rL=M(()=>{Hc();o1();Xc();UX();Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:cv,prefix:"",helpEntries:[{description:lF.helpQuickAccessActionLabel}]})});var qp,oL=M(()=>{WN();Ce();Mi();Bw();Kc();VO();ar();Mo();qp=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let r=new ne;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 Bi);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 ne,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let o={editor:r},s=hb(r);if(s){let a=Un(r.saveViewState());n.add(s.onDidChangeCursorPosition(()=>{a=Un(r.saveViewState())})),o.restoreViewState=()=>{a&&r===this.activeTextEditorControl&&r.restoreViewState(a)},n.add(c_(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&&Ni(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return RP(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:vi(K_),position:$r.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)}}});var dv,WX=M(()=>{Ce();Bw();oL();De();dv=class i extends qp{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=v("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,oe.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new ne;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=hb(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)?v("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):v("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?v("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):v("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}};dv.PREFIX=":"});var cve,dve,uv,hv,sL=M(()=>{WX();Hc();o1();Lr();Mi();Xc();qt();Ze();jt();Ll();cve=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},dve=function(i,e){return function(t,n){e(t,n,i)}},uv=class extends dv{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};uv=cve([dve(0,Zt)],uv);hv=class i extends se{constructor(){super({id:i.ID,label:e3.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(lr).quickAccess.show(uv.PREFIX)}};hv.ID="editor.action.gotoLine";X(hv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:uv,prefix:uv.PREFIX,helpEntries:[{description:e3.gotoLineActionLabel,commandId:hv.ID}]})});function f9(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?uve(i,r.values,t,n):qX(i,e,t,n)}function uve(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=qX(i,s,t,n);if(typeof a!="number")return KX;r+=a,o.push(...l)}return[r,hve(o)]}function qX(i,e,t,n){let r=O_(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],ru(r)]:KX}function hve(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!fve(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 fve(i,e){return!(i.end<e.start||e.end<i.start)}function jX(i){return i.startsWith('"')&&i.endsWith('"')}function h9(i){typeof i!="string"&&(i="");let e=i.toLowerCase(),{pathNormalized:t,normalized:n,normalizedLowercase:r}=VX(i),o=t.indexOf(v_)>=0,s=jX(i),a,l=i.split(GX);if(l.length>1)for(let c of l){let d=jX(c),{pathNormalized:u,normalized:h,normalizedLowercase:p}=VX(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:p,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function VX(i){let e;Nc?e=i.replace(/\//g,v_):e=i.replace(/\\/g,v_);let t=gR(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function aL(i){return Array.isArray(i)?h9(i.map(e=>e.original).join(GX)):h9(i.original)}var KX,Jct,GX,$X=M(()=>{Cl();nR();nr();wi();KX=[void 0,[]];Jct=Object.freeze({score:0});GX=" "});var pve,YX,fv,$o,lL,cL,XX=M(()=>{Dt();gi();or();qr();$X();Ce();wi();qe();br();Zg();oL();De();xt();oi();pve=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},YX=function(i,e){return function(t,n){e(t,n,i)}},fv=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$o=class dL extends qp{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,v("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),oe.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):oe.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new ne;return this.provideLabelPick(n,v("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),fv(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 fv(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new aO,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 ne;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,d=u=>fv(this,void 0,void 0,function*(){c==null||c.dispose(!0),n.busy=!1,c=new Ri(r),n.busy=!0;try{let h=h9(n.value.substr(dL.PREFIX.length).trim()),p=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(r.isCancellationRequested)return;if(p.length>0){if(n.items=p,u&&h.original.length===0){let m=PR(p,g=>!!(g.type!=="separator"&&g.range&&P.containsPosition(g.range.decoration,u)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,v("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,v("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[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,n,r){var o,s;return fv(this,void 0,void 0,function*(){let a=yield e;if(r.isCancellationRequested)return[];let l=t.original.indexOf(dL.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=aL(t.values[0]),u=aL(t.values.slice(1))):d=t;let h,p=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);p&&(h=[{iconClass:p==="right"?mt.asClassName(lt.splitHorizontal):mt.asClassName(lt.splitVertical),tooltip:p==="right"?v("openToSide","Open to the Side"):v("openToBottom","Open to the Bottom")}]);let m=[];for(let S=0;S<a.length;S++){let k=a[S],N=mR(k.name),A=`$(${YO.toIcon(k.kind).id}) ${N}`,H=A.length-N.length,K=k.containerName;n!=null&&n.extraContainerLabel&&(K?K=`${n.extraContainerLabel} \u2022 ${K}`:K=n.extraContainerLabel);let W,re,ae,Ne;if(t.original.length>c){let Xe=!1;if(d!==t&&([W,re]=f9(A,Object.assign(Object.assign({},t),{values:void 0}),c,H),typeof W=="number"&&(Xe=!0)),typeof W!="number"&&([W,re]=f9(A,d,c,H),typeof W!="number"))continue;if(!Xe&&u){if(K&&u.original.length>0&&([ae,Ne]=f9(K,u)),typeof ae!="number")continue;typeof W=="number"&&(W+=ae)}}let he=k.tags&&k.tags.indexOf(1)>=0;m.push({index:S,kind:k.kind,score:W,label:A,ariaLabel:N,description:K,highlights:he?void 0:{label:re,description:Ne},range:{selection:P.collapseToStart(k.selectionRange),decoration:k.range},strikethrough:he,buttons:h})}let g=m.sort((S,k)=>l?this.compareByKindAndScore(S,k):this.compareByScore(S,k)),b=[];if(l){let A=function(){k&&typeof S=="number"&&N>0&&(k.label=Do(cL[S]||lL,N))},S,k,N=0;for(let H of g)S!==H.kind?(A(),S=H.kind,N=1,k={type:"separator"},b.push(k)):N++,b.push(H);A()}else g.length>0&&(b=[{label:v("symbols","symbols ({0})",m.length),type:"separator"},...g]);return b})}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=cL[e.kind]||lL,r=cL[t.kind]||lL,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return fv(this,void 0,void 0,function*(){let n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};$o.PREFIX="@";$o.SCOPE_PREFIX=":";$o.PREFIX_BY_CATEGORY=`${$o.PREFIX}${$o.SCOPE_PREFIX}`;$o=pve([YX(0,be),YX(1,bh)],$o);lL=v("property","properties ({0})"),cL={5:v("method","methods ({0})"),11:v("function","functions ({0})"),8:v("_constructor","constructors ({0})"),12:v("variable","variables ({0})"),4:v("class","classes ({0})"),22:v("struct","structs ({0})"),23:v("event","events ({0})"),24:v("operator","operators ({0})"),10:v("interface","interfaces ({0})"),2:v("namespace","namespaces ({0})"),3:v("package","packages ({0})"),25:v("typeParameter","type parameters ({0})"),1:v("modules","modules ({0})"),6:v("property","properties ({0})"),9:v("enum","enumerations ({0})"),21:v("enumMember","enumeration members ({0})"),14:v("string","strings ({0})"),0:v("file","files ({0})"),17:v("array","arrays ({0})"),15:v("number","numbers ({0})"),16:v("boolean","booleans ({0})"),18:v("object","objects ({0})"),19:v("key","keys ({0})"),7:v("field","fields ({0})"),13:v("constant","constants ({0})")}});var mve,uL,hL,pv,fL=M(()=>{d0();W4();XX();Hc();o1();Lr();Mi();Xc();qt();Ze();jt();Ll();Zg();xt();mve=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},uL=function(i,e){return function(t,n){e(t,n,i)}},hL=class extends $o{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};hL=mve([uL(0,Zt),uL(1,be),uL(2,bh)],hL);pv=class i extends se{constructor(){super({id:i.ID,label:Tb.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:O.hasDocumentSymbolProvider,kbOpts:{kbExpr:O.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(lr).quickAccess.show($o.PREFIX,{itemActivation:DP.NONE})}};pv.ID="editor.action.quickOutline";X(pv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:hL,prefix:$o.PREFIX,helpEntries:[{description:Tb.quickOutlineActionLabel,prefix:$o.PREFIX,commandId:pv.ID},{description:Tb.quickOutlineByCategoryActionLabel,prefix:$o.PREFIX_BY_CATEGORY}]})});function pL(i,e){return e&&(i.stack||i.stacktrace)?v("stackTrace.format","{0}: {1}",JX(i),QX(i.stack)||QX(i.stacktrace)):JX(i)}function QX(i){return Array.isArray(i)?i.join(`
|
|
`):i}function JX(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"?v("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function mL(i=null,e=!1){if(!i)return v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=vr(i),n=mL(t[0],e);return t.length>1?v("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(p_(i))return i;if(i.detail){let t=i.detail;if(t.error)return pL(t.error,e);if(t.exception)return pL(t.exception,e)}return i.stack?pL(i,e):i.message?i.message:v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var ZX=M(()=>{oi();Mi();De()});function gL(i){let e=i;return Array.isArray(e.items)}function eQ(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var mv,Gp,p9,tQ=M(()=>{Dt();gi();Ce();Mi();mv=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(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"})(Gp||(Gp={}));p9=class extends oe{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var r;let o=new ne;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 Bi),l=()=>mv(this,void 0,void 0,function*(){let c=a.value=new ne;s==null||s.dispose(!0),e.busy=!1,s=new Ri(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,n),p=(g,b)=>{var S;let k,N;if(gL(g)?(k=g.items,N=g.active):k=g,k.length===0){if(b)return!1;(u.length>0||e.hideInput)&&(!((S=this.options)===null||S===void 0)&&S.noResultsPick)&&(ZN(this.options.noResultsPick)?k=[this.options.noResultsPick(u)]:k=[this.options.noResultsPick])}return e.items=k,N&&(e.activeItems=[N]),!0},m=g=>mv(this,void 0,void 0,function*(){let b=!1,S=!1;yield Promise.all([(()=>mv(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield of(g.mergeDelay),d.isCancellationRequested)||S||(b=p(g.picks,!0))}))(),(()=>mv(this,void 0,void 0,function*(){e.busy=!0;try{let k=yield g.additionalPicks;if(d.isCancellationRequested)return;let N,A;gL(g.picks)?(N=g.picks.items,A=g.picks.active):N=g.picks;let H,K;if(gL(k)?(H=k.items,K=k.active):H=k,H.length>0||!b){let W;if(!A&&!K){let re=e.activeItems[0];re&&N.indexOf(re)!==-1&&(W=re)}p({items:[...N,...H],active:A||K||W})}}finally{d.isCancellationRequested||(e.busy=!1),S=!0}}))()])});if(h!==null)if(eQ(h))yield m(h);else if(!(h instanceof Promise))p(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;eQ(g)?yield m(g):p(g)}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})=>mv(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let p=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(p>=0){let m=d.trigger(p,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case Gp.NO_ACTION:break;case Gp.CLOSE_PICKER:e.hide();break;case Gp.REFRESH_PICKER:l();break;case Gp.REMOVE_ITEM:{let b=e.items.indexOf(d);if(b!==-1){let S=e.items.slice(),k=S.splice(b,1),N=e.activeItems.filter(H=>H!==k[0]),A=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=S,N&&(e.activeItems=N),e.keepScrollPosition=A}break}}}}}))),o}}});var iQ,Ih,vL,$p,Ah,nQ=M(()=>{ZX();At();Cl();Ce();tf();Mi();De();zi();jn();Zw();Et();Gn();tQ();cu();Bc();iQ=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},Ih=function(i,e){return function(t,n){e(t,n,i)}},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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$p=class m9 extends p9{constructor(e,t,n,r,o,s){super(m9.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Ah)),this.options=e}_getPicks(e,t,n,r){var o,s;return vL(this,void 0,void 0,function*(){let a=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];let l=[];for(let p of a){let m=Un(m9.WORD_FILTER(e,p.label)),g=p.commandAlias?Un(m9.WORD_FILTER(e,p.commandAlias)):void 0;m||g?(p.highlights={label:m,detail:this.options.showAlias?g:void 0},l.push(p)):e===p.commandId&&l.push(p)}let c=new Map;for(let p of l){let m=c.get(p.label);m?(p.description=p.commandId,m.description=m.commandId):c.set(p.label,p)}l.sort((p,m)=>{let g=this.commandsHistory.peek(p.commandId),b=this.commandsHistory.peek(m.commandId);if(g&&b)return g>b?-1:1;if(g)return-1;if(b)return 1;if(this.options.suggestedCommandIds){let S=this.options.suggestedCommandIds.has(p.commandId),k=this.options.suggestedCommandIds.has(m.commandId);if(S&&k)return 0;if(S)return-1;if(k)return 1}return p.label.localeCompare(m.label)});let d=[],u=!1,h=!!this.options.suggestedCommandIds;for(let p=0;p<l.length;p++){let m=l[p];p===0&&this.commandsHistory.peek(m.commandId)&&(d.push({type:"separator",label:v("recentlyUsed","recently used")}),u=!0),h&&!this.commandsHistory.peek(m.commandId)&&(!((o=this.options.suggestedCommandIds)===null||o===void 0)&&o.has(m.commandId))&&(d.push({type:"separator",label:v("commonlyUsed","commonly used")}),u=!0,h=!1),u&&!this.commandsHistory.peek(m.commandId)&&!(!((s=this.options.suggestedCommandIds)===null||s===void 0)&&s.has(m.commandId))&&(d.push({type:"separator",label:v("morecCommands","other commands")}),u=!1),d.push(this.toCommandPick(m,r))}return this.hasAdditionalCommandPicks(e,n)?{picks:d,additionalPicks:(()=>vL(this,void 0,void 0,function*(){let p=yield this.getAdditionalCommandPicks(a,l,e,n);return n.isCancellationRequested?[]:p.map(m=>this.toCommandPick(m,r))}))()}:d})}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?v("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:()=>vL(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){es(s)||this.dialogService.error(v("canNotRun","Command '{0}' resulted in an error",e.label),mL(s))}})})}};$p.PREFIX=">";$p.WORD_FILTER=qR(GR,XR,$R);$p=iQ([Ih(1,He),Ih(2,Bt),Ih(3,ui),Ih(4,Dr),Ih(5,bf)],$p);Ah=class _n extends oe{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=_n.getConfiguredCommandHistoryLength(this.configurationService),_n.cache&&_n.cache.limit!==this.configuredCommandsHistoryLength&&(_n.cache.limit=this.configuredCommandsHistoryLength,_n.saveState(this.storageService)))}load(){let e=this.storageService.get(_n.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){}let n=_n.cache=new fa(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))}_n.counter=this.storageService.getNumber(_n.PREF_KEY_COUNTER,0,_n.counter)}push(e){_n.cache&&(_n.cache.set(e,_n.counter++),_n.saveState(this.storageService))}peek(e){var t;return(t=_n.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!_n.cache)return;let t={usesLRU:!0,entries:[]};_n.cache.forEach((n,r)=>t.entries.push({key:r,value:n})),e.store(_n.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(_n.PREF_KEY_COUNTER,_n.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:_n.DEFAULT_COMMANDS_HISTORY_LENGTH}};Ah.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Ah.PREF_KEY_CACHE="commandPalette.mru.cache";Ah.PREF_KEY_COUNTER="commandPalette.mru.counter";Ah.counter=1;Ah=iQ([Ih(0,Yr),Ih(1,Mt)],Ah)});var g9,rQ=M(()=>{pre();nQ();g9=class extends $p{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:ZR(n.label)||n.id});return t}}});var gve,Yp,oQ,gv,vv,_L=M(()=>{Hc();o1();Xc();Lr();rQ();Mi();Et();Gn();zi();Bc();Zw();Ze();jt();Ll();gve=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},Yp=function(i,e){return function(t,n){e(t,n,i)}},oQ=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},gv=class extends g9{get activeTextEditorControl(){return Un(this.codeEditorService.getFocusedCodeEditor())}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}getCommandPicks(){return oQ(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return oQ(this,void 0,void 0,function*(){return[]})}};gv=gve([Yp(0,He),Yp(1,Zt),Yp(2,Bt),Yp(3,ui),Yp(4,Dr),Yp(5,bf)],gv);vv=class i extends se{constructor(){super({id:i.ID,label:t3.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(lr).quickAccess.show(gv.PREFIX)}};vv.ID="editor.action.quickCommand";X(vv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:gv,prefix:gv.PREFIX,helpEntries:[{description:t3.quickCommandHelp,commandId:vv.ID}]})});var vve,Xp,bL,yL=M(()=>{Ze();Lr();nT();jn();ft();Et();Oo();cu();vve=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},Xp=function(i,e){return function(t,n){e(t,n,i)}},bL=class extends ol{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};bL=vve([Xp(1,Ke),Xp(2,Zt),Xp(3,Ei),Xp(4,He),Xp(5,Yr),Xp(6,Mt)],bL);Ae(ol.ID,bL,4)});function Tve(){return import("./jsonMode-GEC4TCVR.js")}var _ve,bve,yve,Cve,sQ,Sve,_v,wve,xve,Eve,aQ,CL=M(()=>{Os();Os();_ve=Object.defineProperty,bve=Object.getOwnPropertyDescriptor,yve=Object.getOwnPropertyNames,Cve=Object.prototype.hasOwnProperty,sQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yve(e))!Cve.call(i,r)&&r!==t&&_ve(i,r,{get:()=>e[r],enumerable:!(n=bve(e,r))||n.enumerable});return i},Sve=(i,e,t)=>(sQ(i,e,"default"),t&&sQ(t,e,"default")),_v={};Sve(_v,Rs);wve=class{constructor(i,e,t){Cn(this,"_onDidChange",new _v.Emitter);Cn(this,"_diagnosticsOptions");Cn(this,"_modeConfiguration");Cn(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)}},xve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Eve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},aQ=new wve("json",xve,Eve);_v.languages.json={jsonDefaults:aQ};_v.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});_v.languages.onLanguage("json",()=>{Tve().then(i=>i.setupMode(aQ))})});function J(i){let e=i.id;cQ[e]=i,bv.languages.register(i);let t=dQ.getOrCreate(e);bv.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),bv.languages.onLanguageEncountered(e,async()=>{let n=await t.load();bv.languages.setLanguageConfiguration(e,n.conf)})}var kve,Ive,Ave,Lve,lQ,Mve,bv,cQ,SL,dQ,We=M(()=>{Os();kve=Object.defineProperty,Ive=Object.getOwnPropertyDescriptor,Ave=Object.getOwnPropertyNames,Lve=Object.prototype.hasOwnProperty,lQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ave(e))!Lve.call(i,r)&&r!==t&&kve(i,r,{get:()=>e[r],enumerable:!(n=Ive(e,r))||n.enumerable});return i},Mve=(i,e,t)=>(lQ(i,e,"default"),t&&lQ(t,e,"default")),bv={};Mve(bv,Rs);cQ={},SL={},dQ=class{constructor(i){Cn(this,"_languageId");Cn(this,"_loadingTriggered");Cn(this,"_lazyLoadPromise");Cn(this,"_lazyLoadPromiseResolve");Cn(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return SL[i]||(SL[i]=new dQ(i)),SL[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,cQ[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var wL=M(()=>{We();J({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-JBWZGNRS.js")})});var xL=M(()=>{We();J({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-VWG2RHDG.js")})});var EL=M(()=>{We();J({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6XN522EU.js")})});var TL=M(()=>{We();J({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-6HLO5RC2.js")})});var kL=M(()=>{We();J({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-F6V6XVLU.js")})});var IL=M(()=>{We();J({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-CVACNE45.js")})});var AL=M(()=>{We();J({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-ISFE4NDY.js")})});var LL=M(()=>{We();J({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-WFOPSGAE.js")})});var CQ=gt(()=>{});var _9=gt((v9,SQ)=>{(function(i,e){typeof v9=="object"?SQ.exports=v9=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(v9,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 Yd=="function")try{n=CQ()}catch(S){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function S(){}return function(k){var N;return S.prototype=k,N=new S,S.prototype=null,N}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(S){var k=o(this);return S&&k.mixIn(S),(!k.hasOwnProperty("init")||this.init===k.init)&&(k.init=function(){k.$super.init.apply(this,arguments)}),k.init.prototype=k,k.$super=this,k},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var k in S)S.hasOwnProperty(k)&&(this[k]=S[k]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(S,k){S=this.words=S||[],k!=t?this.sigBytes=k:this.sigBytes=S.length*4},toString:function(S){return(S||u).stringify(this)},concat:function(S){var k=this.words,N=S.words,A=this.sigBytes,H=S.sigBytes;if(this.clamp(),A%4)for(var K=0;K<H;K++){var W=N[K>>>2]>>>24-K%4*8&255;k[A+K>>>2]|=W<<24-(A+K)%4*8}else for(var re=0;re<H;re+=4)k[A+re>>>2]=N[re>>>2];return this.sigBytes+=H,this},clamp:function(){var S=this.words,k=this.sigBytes;S[k>>>2]&=4294967295<<32-k%4*8,S.length=e.ceil(k/4)},clone:function(){var S=l.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var k=[],N=0;N<S;N+=4)k.push(r());return new c.init(k,S)}}),d=s.enc={},u=d.Hex={stringify:function(S){for(var k=S.words,N=S.sigBytes,A=[],H=0;H<N;H++){var K=k[H>>>2]>>>24-H%4*8&255;A.push((K>>>4).toString(16)),A.push((K&15).toString(16))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A<k;A+=2)N[A>>>3]|=parseInt(S.substr(A,2),16)<<24-A%8*4;return new c.init(N,k/2)}},h=d.Latin1={stringify:function(S){for(var k=S.words,N=S.sigBytes,A=[],H=0;H<N;H++){var K=k[H>>>2]>>>24-H%4*8&255;A.push(String.fromCharCode(K))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A<k;A++)N[A>>>2]|=(S.charCodeAt(A)&255)<<24-A%4*8;return new c.init(N,k)}},p=d.Utf8={stringify:function(S){try{return decodeURIComponent(escape(h.stringify(S)))}catch(k){throw new Error("Malformed UTF-8 data")}},parse:function(S){return h.parse(unescape(encodeURIComponent(S)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=p.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var k,N=this._data,A=N.words,H=N.sigBytes,K=this.blockSize,W=K*4,re=H/W;S?re=e.ceil(re):re=e.max((re|0)-this._minBufferSize,0);var ae=re*K,Ne=e.min(ae*4,H);if(ae){for(var he=0;he<ae;he+=K)this._doProcessBlock(A,he);k=A.splice(0,ae),N.sigBytes-=Ne}return new c.init(k,Ne)},clone:function(){var S=l.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0}),g=a.Hasher=m.extend({cfg:l.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var k=this._doFinalize();return k},blockSize:512/32,_createHelper:function(S){return function(k,N){return new S.init(N).finalize(k)}},_createHmacHelper:function(S){return function(k,N){return new b.HMAC.init(S,N).finalize(k)}}}),b=s.algo={};return s}(Math);return i})});var xQ=gt((b9,wQ)=>{(function(i,e){typeof b9=="object"?wQ.exports=b9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(b9,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,m){for(var g=0;g<16;g++){var b=m+g,S=p[b];p[b]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}var k=this._hash.words,N=p[m+0],A=p[m+1],H=p[m+2],K=p[m+3],W=p[m+4],re=p[m+5],ae=p[m+6],Ne=p[m+7],he=p[m+8],Xe=p[m+9],st=p[m+10],rt=p[m+11],Nt=p[m+12],Z=p[m+13],ye=p[m+14],ge=p[m+15],$=k[0],Q=k[1],ie=k[2],de=k[3];$=c($,Q,ie,de,N,7,a[0]),de=c(de,$,Q,ie,A,12,a[1]),ie=c(ie,de,$,Q,H,17,a[2]),Q=c(Q,ie,de,$,K,22,a[3]),$=c($,Q,ie,de,W,7,a[4]),de=c(de,$,Q,ie,re,12,a[5]),ie=c(ie,de,$,Q,ae,17,a[6]),Q=c(Q,ie,de,$,Ne,22,a[7]),$=c($,Q,ie,de,he,7,a[8]),de=c(de,$,Q,ie,Xe,12,a[9]),ie=c(ie,de,$,Q,st,17,a[10]),Q=c(Q,ie,de,$,rt,22,a[11]),$=c($,Q,ie,de,Nt,7,a[12]),de=c(de,$,Q,ie,Z,12,a[13]),ie=c(ie,de,$,Q,ye,17,a[14]),Q=c(Q,ie,de,$,ge,22,a[15]),$=d($,Q,ie,de,A,5,a[16]),de=d(de,$,Q,ie,ae,9,a[17]),ie=d(ie,de,$,Q,rt,14,a[18]),Q=d(Q,ie,de,$,N,20,a[19]),$=d($,Q,ie,de,re,5,a[20]),de=d(de,$,Q,ie,st,9,a[21]),ie=d(ie,de,$,Q,ge,14,a[22]),Q=d(Q,ie,de,$,W,20,a[23]),$=d($,Q,ie,de,Xe,5,a[24]),de=d(de,$,Q,ie,ye,9,a[25]),ie=d(ie,de,$,Q,K,14,a[26]),Q=d(Q,ie,de,$,he,20,a[27]),$=d($,Q,ie,de,Z,5,a[28]),de=d(de,$,Q,ie,H,9,a[29]),ie=d(ie,de,$,Q,Ne,14,a[30]),Q=d(Q,ie,de,$,Nt,20,a[31]),$=u($,Q,ie,de,re,4,a[32]),de=u(de,$,Q,ie,he,11,a[33]),ie=u(ie,de,$,Q,rt,16,a[34]),Q=u(Q,ie,de,$,ye,23,a[35]),$=u($,Q,ie,de,A,4,a[36]),de=u(de,$,Q,ie,W,11,a[37]),ie=u(ie,de,$,Q,Ne,16,a[38]),Q=u(Q,ie,de,$,st,23,a[39]),$=u($,Q,ie,de,Z,4,a[40]),de=u(de,$,Q,ie,N,11,a[41]),ie=u(ie,de,$,Q,K,16,a[42]),Q=u(Q,ie,de,$,ae,23,a[43]),$=u($,Q,ie,de,Xe,4,a[44]),de=u(de,$,Q,ie,Nt,11,a[45]),ie=u(ie,de,$,Q,ge,16,a[46]),Q=u(Q,ie,de,$,H,23,a[47]),$=h($,Q,ie,de,N,6,a[48]),de=h(de,$,Q,ie,Ne,10,a[49]),ie=h(ie,de,$,Q,ye,15,a[50]),Q=h(Q,ie,de,$,re,21,a[51]),$=h($,Q,ie,de,Nt,6,a[52]),de=h(de,$,Q,ie,K,10,a[53]),ie=h(ie,de,$,Q,st,15,a[54]),Q=h(Q,ie,de,$,A,21,a[55]),$=h($,Q,ie,de,he,6,a[56]),de=h(de,$,Q,ie,ge,10,a[57]),ie=h(ie,de,$,Q,ae,15,a[58]),Q=h(Q,ie,de,$,Z,21,a[59]),$=h($,Q,ie,de,W,6,a[60]),de=h(de,$,Q,ie,rt,10,a[61]),ie=h(ie,de,$,Q,H,15,a[62]),Q=h(Q,ie,de,$,Xe,21,a[63]),k[0]=k[0]+$|0,k[1]=k[1]+Q|0,k[2]=k[2]+ie|0,k[3]=k[3]+de|0},_doFinalize:function(){var p=this._data,m=p.words,g=this._nDataBytes*8,b=p.sigBytes*8;m[b>>>5]|=128<<24-b%32;var S=e.floor(g/4294967296),k=g;m[(b+64>>>9<<4)+15]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,p.sigBytes=(m.length+1)*4,this._process();for(var N=this._hash,A=N.words,H=0;H<4;H++){var K=A[H];A[H]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360}return N},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,m,g,b,S,k,N){var A=p+(m&g|~m&b)+S+N;return(A<<k|A>>>32-k)+m}function d(p,m,g,b,S,k,N){var A=p+(m&b|g&~b)+S+N;return(A<<k|A>>>32-k)+m}function u(p,m,g,b,S,k,N){var A=p+(m^g^b)+S+N;return(A<<k|A>>>32-k)+m}function h(p,m,g,b,S,k,N){var A=p+(g^(m|~b))+S+N;return(A<<k|A>>>32-k)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var TQ=gt((y9,EQ)=>{(function(i,e){typeof y9=="object"?EQ.exports=y9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(y9,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var b=e.sqrt(g),S=2;S<=b;S++)if(!(g%S))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var p=2,m=0;m<64;)u(p)&&(m<8&&(a[m]=h(e.pow(p,1/2))),l[m]=h(e.pow(p,1/3)),m++),p++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(u,h){for(var p=this._hash.words,m=p[0],g=p[1],b=p[2],S=p[3],k=p[4],N=p[5],A=p[6],H=p[7],K=0;K<64;K++){if(K<16)c[K]=u[h+K]|0;else{var W=c[K-15],re=(W<<25|W>>>7)^(W<<14|W>>>18)^W>>>3,ae=c[K-2],Ne=(ae<<15|ae>>>17)^(ae<<13|ae>>>19)^ae>>>10;c[K]=re+c[K-7]+Ne+c[K-16]}var he=k&N^~k&A,Xe=m&g^m&b^g&b,st=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),rt=(k<<26|k>>>6)^(k<<21|k>>>11)^(k<<7|k>>>25),Nt=H+rt+he+l[K]+c[K],Z=st+Xe;H=A,A=N,N=k,k=S+Nt|0,S=b,b=g,g=m,m=Nt+Z|0}p[0]=p[0]+m|0,p[1]=p[1]+g|0,p[2]=p[2]+b|0,p[3]=p[3]+S|0,p[4]=p[4]+k|0,p[5]=p[5]+N|0,p[6]=p[6]+A|0,p[7]=p[7]+H|0},_doFinalize:function(){var u=this._data,h=u.words,p=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(p/4294967296),h[(m+64>>>9<<4)+15]=p,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var IQ=gt((C9,kQ)=>{(function(i,e){typeof C9=="object"?kQ.exports=C9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(C9,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 u=[],h=0;h<c;h+=3)for(var p=l[h>>>2]>>>24-h%4*8&255,m=l[h+1>>>2]>>>24-(h+1)%4*8&255,g=l[h+2>>>2]>>>24-(h+2)%4*8&255,b=p<<16|m<<8|g,S=0;S<4&&h+S*.75<c;S++)u.push(d.charAt(b>>>6*(3-S)&63));var k=d.charAt(64);if(k)for(;u.length%4;)u.push(k);return u.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var u=0;u<c.length;u++)d[c.charCodeAt(u)]=u}var h=c.charAt(64);if(h){var p=a.indexOf(h);p!==-1&&(l=p)}return s(a,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(a,l,c){for(var d=[],u=0,h=0;h<l;h++)if(h%4){var p=c[a.charCodeAt(h-1)]<<h%4*2,m=c[a.charCodeAt(h)]>>>6-h%4*2,g=p|m;d[u>>>2]|=g<<24-u%4*8,u++}return n.create(d,u)}}(),i.enc.Base64})});var aJ=gt(R9=>{"use strict";Object.defineProperty(R9,"__esModule",{value:!0});R9.default=void 0;var Li=(Os(),Kh(Rs)),c_e=(vw(),Kh(hre));function d_e(i,e){return p_e(i)||f_e(i,e)||h_e(i,e)||u_e()}function u_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h_e(i,e){if(i){if(typeof i=="string")return ZQ(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ZQ(i,e)}}function ZQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=i[t];return n}function f_e(i,e){var t=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n=[],r=!0,o=!1,s,a;try{for(t=t.call(i);!(r=(s=t.next()).done)&&(n.push(s.value),!(e&&n.length===e));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&t.return!=null&&t.return()}finally{if(o)throw a}}return n}}function p_e(i){if(Array.isArray(i))return i}function $L(i){"@babel/helpers - typeof";return $L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$L(i)}function nJ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function eJ(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function rJ(i,e,t){return e&&eJ(i.prototype,e),t&&eJ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var m_e={Bottom:4},g_e={readOnly:65,cursorWidth:20,fontInfo:32},v_e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function __e(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||v_e.test(i))}function N9(i,e){if(!(this instanceof N9))return new N9(i,e);this.line=i,this.ch=e}function b_e(i,e,t){i.dispatch(e,t)}function Av(i){return function(){}}var tJ,iJ;String.prototype.normalize?(tJ=function(e){return e.normalize("NFD").toLowerCase()},iJ=function(e){return e.normalize("NFD")}):(tJ=function(e){return e.toLowerCase()},iJ=function(e){return e});var oJ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};oJ.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};function Es(i){return new N9(i.lineNumber-1,i.column-1)}function er(i){return new Li.Position(i.line+1,i.ch+1)}var y_e=function(){function i(e,t,n,r){nJ(this,i),this.cm=e,this.id=t,this.lineNumber=n+1,this.column=r+1,e.marks[this.id]=this}return rJ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return Es(this)}}]),i}();function sJ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,n=Li.KeyCode[i.keyCode];i.key&&(n=i.key,t=!1);var r=n,o=e;switch(i.keyCode){case Li.KeyCode.Shift:case Li.KeyCode.Meta:case Li.KeyCode.Alt:case Li.KeyCode.Ctrl:return r;case Li.KeyCode.Escape:o=!0,r="Esc";break;case Li.KeyCode.Space:o=!0;break}return n.startsWith("Key")||n.startsWith("KEY_")?r=n[n.length-1].toLowerCase():n.startsWith("Digit")?r=n.slice(5,6):n.startsWith("Numpad")?r=n.slice(6,7):n.endsWith("Arrow")?(o=!0,r=n.substring(0,n.length-5)):(n.startsWith("US_")||n.startsWith("Bracket")||!r)&&(r=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?r=i.key||i.browserEvent.key:(i.altKey&&(r="Alt-".concat(r)),i.ctrlKey&&(r="Ctrl-".concat(r)),i.metaKey&&(r="Meta-".concat(r)),i.shiftKey&&(r="Shift-".concat(r))),r.length===1&&t&&(r="'".concat(r,"'")),r}var tn=function(){function i(e){nJ(this,i),C_e.call(this),this.editor=e,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return rJ(i,[{key:"attach",value:function(){i.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(t,n){var r=!1,o=t,s=this.editor.getPosition(),a=new Li.Range(s.lineNumber,s.column,s.lineNumber,s.column+1),l=!0;if(t.startsWith("'"))o=t[1];else if(o==="Enter")o=`
|
|
`;else if(o==="Backspace"){var c=this.replaceStack.pop();if(!c)return;r=!0,o=c,a=new Li.Range(s.lineNumber,s.column,s.lineNumber,s.column-1)}else return;n.preventDefault(),n.stopPropagation(),this.replaceStack||(this.replaceStack=[]),r||this.replaceStack.push(this.editor.getModel().getValueInRange(a)),this.editor.executeEdits("vim",[{text:o,range:a,forceMoveMarkers:l}]),r&&this.editor.setPosition(a.getStartPosition())}},{key:"setOption",value:function(t,n){this.state[t]=n,t==="theme"&&Li.editor.setTheme(n)}},{key:"getConfiguration",value:function(){var t=this.editor,n=g_e;return typeof t.getConfiguration=="function"?t.getConfiguration():("EditorOption"in Li.editor&&(n=Li.editor.EditorOption),{readOnly:t.getOption(n.readOnly),viewInfo:{cursorWidth:t.getOption(n.cursorWidth)},fontInfo:t.getOption(n.fontInfo)})}},{key:"getOption",value:function(t){return t==="readOnly"?this.getConfiguration().readOnly:t==="firstLineNumber"?this.firstLine()+1:t==="indentWithTabs"?!this.editor.getModel().getOptions().insertSpaces:typeof this.editor.getConfiguration=="function"?this.editor.getRawConfiguration()[t]:this.editor.getRawOptions()[t]}},{key:"dispatch",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=this.listeners[t];s&&s.forEach(function(a){return a.apply(void 0,r)})}},{key:"on",value:function(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}},{key:"off",value:function(t,n){var r=this.listeners[t];r&&(this.listeners[t]=r.filter(function(o){return o!==n}))}},{key:"firstLine",value:function(){return 0}},{key:"lastLine",value:function(){return this.lineCount()-1}},{key:"lineCount",value:function(){return this.editor.getModel().getLineCount()}},{key:"defaultTextHeight",value:function(){return 1}},{key:"getLine",value:function(t){if(t<0)return"";var n=this.editor.getModel(),r=n.getLineCount();return t+1>r&&(t=r-1),this.editor.getModel().getLineContent(t+1)}},{key:"getAnchorForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Li.SelectionDirection.LTR?t.getStartPosition():t.getEndPosition()}},{key:"getHeadForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Li.SelectionDirection.LTR?t.getEndPosition():t.getStartPosition()}},{key:"getCursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!t)return Es(this.editor.getPosition());var n=this.editor.getSelection(),r;return n.isEmpty()?r=n.getPosition():t==="anchor"?r=this.getAnchorForSelection(n):r=this.getHeadForSelection(n),Es(r)}},{key:"getRange",value:function(t,n){var r=er(t),o=er(n);return this.editor.getModel().getValueInRange(Li.Range.fromPositions(r,o))}},{key:"getSelection",value:function(){var t=[],n=this.editor;return n.getSelections().map(function(r){t.push(n.getModel().getValueInRange(r))}),t.join(`
|
|
`)}},{key:"replaceRange",value:function(t,n,r){var o=er(n),s=r?er(r):o;this.editor.executeEdits("vim",[{text:t,range:Li.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,n){var r=t;$L(t)!=="object"&&(r={},r.line=t,r.ch=n);var o=this.editor.getModel().validatePosition(er(r));this.editor.setPosition(er(r)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,n){return t()}},{key:"listSelections",value:function(){var t=this,n=this.editor.getSelections();return!n.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:n.map(function(r){var o=r.getPosition(),s=r.getStartPosition(),a=r.getEndPosition();return{anchor:t.clipPos(Es(t.getAnchorForSelection(r))),head:t.clipPos(Es(t.getHeadForSelection(r)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,n){var r=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return r?Li.Selection.fromPositions(er(d),er(u)):Li.Selection.fromPositions(er(u),er(d))});if(n&&o[n]&&o.push(o.splice(n,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Li.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,n){var r=Li.Range.fromPositions(er(t),er(n));this.editor.setSelection(r)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(n){return t.getModel().getValueInRange(n)})}},{key:"replaceSelections",value:function(t){var n=this.editor;n.getSelections().forEach(function(r,o){n.executeEdits("vim",[{range:r,text:t[o],forceMoveMarkers:!1}])})}},{key:"toggleOverwrite",value:function(t){t?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(t,n){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,n){}},{key:"clipPos",value:function(t){var n=this.editor.getModel().validatePosition(er(t));return Es(n)}},{key:"setBookmark",value:function(t,n){var r=new y_e(this,this.$uid++,t.line,t.ch);return(!n||!n.insertLeft)&&(r.$insertRight=!0),this.marks[r.id]=r,r}},{key:"getScrollInfo",value:function(){var t=this.editor,n=t.getVisibleRanges(),r=d_e(n,1),o=r[0];return{left:0,top:o.startLineNumber-1,height:t.getModel().getLineCount(),clientHeight:o.endLineNumber-o.startLineNumber+1}}},{key:"triggerEditorAction",value:function(t){this.editor.trigger("vim",t)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),i.keyMap.vim&&i.keyMap.vim.detach(this),this.disposables.forEach(function(t){return t.dispose()})}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.ctxInsert.set(!1);var n=this.getConfiguration();this.initialCursorWidth=n.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:n.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var t=this.editor.getVisibleRanges();if(!t.length)return{top:0,bottom:0};var n={top:1/0,bottom:0};return t.reduce(function(r,o){return o.startLineNumber<r.top&&(r.top=o.startLineNumber),o.endLineNumber>r.bottom&&(r.bottom=o.endLineNumber),r},n),n.top-=1,n.bottom-=1,n}},{key:"findPosV",value:function(t,n,r){var o=this.editor,s=n,a=r,l=er(t);if(r==="page"){var c=o.getLayoutInfo().height,d=this.getConfiguration().fontInfo.lineHeight;s=s*Math.floor(c/d),a="line"}return a==="line"&&(l.lineNumber+=s),Es(l)}},{key:"findMatchingBracket",value:function(t){var n=er(t),r=this.editor.getModel(),o;if(r.bracketPairs)o=r.bracketPairs.matchBracket(n);else{var s;o=(s=r.matchBracket)===null||s===void 0?void 0:s.call(r,n)}return!o||o.length!==2?{to:null}:{to:Es(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,n){!t&&!n||t||(n<0&&(n=this.editor.getPosition().lineNumber-n),this.editor.setScrollTop(this.editor.getTopForLineNumber(n+1)))}},{key:"moveCurrentLineTo",value:function(t){var n,r=this.editor,o=r.getPosition(),s=Li.Range.fromPositions(o,o);switch(t){case"top":r.revealRangeAtTop(s);return;case"center":r.revealRangeInCenter(s);return;case"bottom":(n=r._revealRange)===null||n===void 0||n.call(r,s,m_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,n){var r=!1,o=!1;t instanceof RegExp&&!t.global&&(r=!t.ignoreCase,t=t.source,o=!0),n.ch==null&&(n.ch=Number.MAX_VALUE);var s=er(n),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,r)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(p){if(!u||!u.length)return!1;var m=u[p];return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(g){return g.range}).filter(function(g){return!g.equalsRange(c)})),c},find:function(p){if(!u||!u.length)return!1;var m;if(p){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,r),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var b=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,b,o,r),!m||!b.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(S){return S.range}).filter(function(S){return!S.equalsRange(c)})),c},from:function(){return c&&Es(c.getStartPosition())},to:function(){return c&&Es(c.getEndPosition())},replace:function(p){c&&(l.executeEdits("vim",[{range:c,text:p,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",r="decoration".concat(n);return this[r]=this.editor.deltaDecorations(this[r]||[],t.map(function(o){return{range:o,options:{stickiness:Li.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:n,showIfCollapsed:!0}}})),this[r]}},{key:"addOverlay",value:function(t,n,r){var o=t.query,s=!1,a=!1;o&&o instanceof RegExp&&!o.global&&(a=!0,s=!o.ignoreCase,o=o.source);var l=this.editor.getModel().findNextMatch(o,this.editor.getPosition(),a,s);!l||!l.range||this.highlightRanges([l.range])}},{key:"removeOverlay",value:function(){var t=this;["currentFindMatch","findMatch"].forEach(function(n){t.editor.deltaDecorations(t["decoration".concat(n)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition(er(t))}},{key:"moveH",value:function(t,n){if(n==="char"){var r=this.editor.getPosition();this.editor.setPosition(new Li.Position(r.lineNumber,r.column+t))}}},{key:"scanForBracket",value:function(t,n,r,o){for(var s=o.bracketRegex,a=er(t),l=this.editor.getModel(),c=(n===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),p=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[p];if(m&&m.charAt(1)===">"==n>0)d.push(p);else if(d.length===0){var g=h.range.getStartPosition();return{pos:Es(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+n),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt(er(t))}},{key:"posFromIndex",value:function(t){return Es(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.editor,o;r._getViewModel?o=r._getViewModel().cursorConfig:o=r._getCursors().context.config;var s=new Li.Position(t+1,1),a=Li.Selection.fromPositions(s,s);r.executeCommand("vim",new c_e.ShiftCommand(a,{isUnshift:!n,tabSize:o.tabSize,indentSize:o.indentSize,insertSpaces:o.insertSpaces,useTabStops:o.useTabStops,autoIndent:o.autoIndent}))}},{key:"setStatusBar",value:function(t){this.statusBar=t}},{key:"openDialog",value:function(t,n,r){if(this.statusBar)return this.statusBar.setSec(t,n,r)}},{key:"openNotification",value:function(t){this.statusBar&&this.statusBar.showNotification(t)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(t){var n=this.editor.getPosition();t==="start"?n.column=1:t==="end"&&(n.column=this.editor.getModel().getLineMaxColumn(n.lineNumber)),this.editor.setPosition(n)}},{key:"execCommand",value:function(t){switch(t){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent();break}}}]),i}();tn.Pos=N9;tn.signal=b_e;tn.on=Av("on");tn.off=Av("off");tn.addClass=Av("addClass");tn.rmClass=Av("rmClass");tn.defineOption=Av("defineOption");tn.keyMap={default:function(e){return function(t){return!0}}};tn.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};tn.isWordChar=__e;tn.keyName=sJ;tn.StringStream=oJ;tn.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,tn.e_preventDefault(i),!1};tn.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};tn.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};tn.lookupKey=function i(e,t,n){typeof t=="string"&&(t=tn.keyMap[t]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,n);for(var o=0;o<t.fallthrough.length;o++){var s=i(e,t.fallthrough[o],n);if(s)return s}}};tn.defineExtension=function(i,e){tn.prototype[i]=e};var C_e=function(){var e=this;this.handleKeyDown=function(t){if(!(t.browserEvent.defaultPrevented&t.keyCode!==Li.KeyCode.Escape)&&e.attached){var n=sJ(t);if(e.replaceMode&&e.handleReplaceMode(n,t),!!n){var r=e.state.keyMap;if(tn.keyMap[r]&&tn.keyMap[r].call){var o=tn.keyMap[r].call(n,e);if(o){t.preventDefault(),t.stopPropagation();try{o()}catch(s){console.error(s)}}}}}},this.handleCursorChange=function(t){var n=t.position,r=t.source,o=e.editor,s=o.getSelection();if(!e.ctxInsert.get()&&t.source==="mouse"&&s.isEmpty()){var a=o.getModel().getLineMaxColumn(n.lineNumber);if(t.position.column===a){o.setPosition(new Li.Position(t.position.lineNumber,a-1));return}}e.dispatch("cursorActivity",e,t)},this.handleChange=function(t){var n=t.changes,r={text:n.reduce(function(s,a){return s.push(a.text),s},[]),origin:"+input"},o=e.curOp=e.curOp||{};o.changeHandlers||(o.changeHandlers=e.listeners.change&&e.listeners.change.slice()),!e.virtualSelectionMode()&&(o.lastChange?o.lastChange.next=o.lastChange=r:o.lastChange=o.change=r,e.dispatch("change",e,r))}},S_e=tn;R9.default=S_e});var uJ=gt(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.default=tm.Vim=void 0;var ot=w_e(aJ());function w_e(i){return i&&i.__esModule?i:{default:i}}function O9(i){"@babel/helpers - typeof";return O9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O9(i)}var Fe=ot.default.Pos;function x_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var n=t.sel.head;if(!n)return e.head;if(!(t.visualBlock&&e.head.line!=n.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==n.line&&e.head.ch!=n.ch?new Fe(e.head.line,e.head.ch-1):e.head}var Ir=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],lJ=Ir.length,cJ=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],dJ=function(){function e(w){w.setOption("disableInput",!0),w.setOption("showCursorWhenSelecting",!1),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),w.on("cursorActivity",LN),ge(w),w.enterVimMode()}function t(w){w.setOption("disableInput",!1),w.off("cursorActivity",LN),w.state.vim=null,s_&&clearTimeout(s_),w.leaveVimMode()}function n(w,f){w.attached=!1,this==ot.default.keyMap.vim&&(w.options.$customCursor=null),(!f||f.attach!=r)&&t(w)}function r(w,f){this==ot.default.keyMap.vim&&(w.attached=!0,w.curOp&&(w.curOp.selectionChanged=!0),w.options.$customCursor=x_e),(!f||f.attach!=r)&&e(w)}ot.default.defineOption("vimMode",!1,function(w,f,_){f&&w.getOption("keyMap")!="vim"?w.setOption("keyMap","vim"):!f&&_!=ot.default.Init&&/^vim/.test(w.getOption("keyMap"))&&w.setOption("keyMap","default")});function o(w,f){if(f){if(this[w])return this[w];var _=l(w);if(!_)return!1;var C=de.findKey(f,_);return typeof C=="function"&&ot.default.signal(f,"vim-keypress",_),C}}var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},a={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function l(w){if(w.charAt(0)=="'")return w.charAt(1);if(w==="AltGraph")return!1;var f=w.split(/-(?!$)/),_=f[f.length-1];if(f.length==1&&f[0].length==1)return!1;if(f.length==2&&f[0]=="Shift"&&_.length==1)return!1;for(var C=!1,x=0;x<f.length;x++){var I=f[x];I in s?f[x]=s[I]:C=!0,I in a&&(f[x]=a[I])}return C?(W(_)&&(f[f.length-1]=_.toLowerCase()),"<"+f.join("-")+">"):!1}var c=/[\d]/,d=[ot.default.isWordChar,function(w){return w&&!ot.default.isWordChar(w)&&!/\s/.test(w)}],u=[function(w){return/\S/.test(w)}];function h(w,f){for(var _=[],C=w;C<w+f;C++)_.push(String.fromCharCode(C));return _}var p=h(65,26),m=h(97,26),g=h(48,10),b=[].concat(p,m,g,["<",">"]),S=[].concat(p,m,g,["-",'"',".",":","_","/"]),k;try{k=new RegExp("^[\\p{Lu}]$","u")}catch(w){k=/^[A-Z]$/}function N(w,f){return f>=w.firstLine()&&f<=w.lastLine()}function A(w){return/^[a-z]$/.test(w)}function H(w){return"()[]{}".indexOf(w)!=-1}function K(w){return c.test(w)}function W(w){return k.test(w)}function re(w){return/^\s*$/.test(w)}function ae(w){return".?!".indexOf(w)!=-1}function Ne(w,f){for(var _=0;_<f.length;_++)if(f[_]==w)return!0;return!1}var he={};function Xe(w,f,_,C,x){if(f===void 0&&!x)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),he[w]={type:_,defaultValue:f,callback:x},C)for(var I=0;I<C.length;I++)he[C[I]]=he[w];f&&st(w,f)}function st(w,f,_,C){var x=he[w];C=C||{};var I=C.scope;if(!x)return new Error("Unknown option: "+w);if(x.type=="boolean"){if(f&&f!==!0)return new Error("Invalid argument: "+w+"="+f);f!==!1&&(f=!0)}x.callback?(I!=="local"&&x.callback(f,void 0),I!=="global"&&_&&x.callback(f,_)):(I!=="local"&&(x.value=x.type=="boolean"?!!f:f),I!=="global"&&_&&(_.state.vim.options[w]={value:f}))}function rt(w,f,_){var C=he[w];_=_||{};var x=_.scope;if(!C)return new Error("Unknown option: "+w);if(C.callback){var I=f&&C.callback(void 0,f);return x!=="global"&&I!==void 0?I:x!=="local"?C.callback():void 0}else{var I=x!=="global"&&f&&f.state.vim.options[w];return(I||x!=="local"&&C||{}).value}}Xe("filetype",void 0,"string",["ft"],function(w,f){if(f!==void 0)if(w===void 0){var _=f.getOption("mode");return _=="null"?"":_}else{var _=w==""?"null":w;f.setOption("mode",_)}});var Nt=function(){var f=100,_=-1,C=0,x=0,I=new Array(f);function D(z,G,ee){var ve=_%f,pe=I[ve];function ue(Ge){var Ue=++_%f,It=I[Ue];It&&It.clear(),I[Ue]=z.setBookmark(Ge)}if(pe){var Ve=pe.find();Ve&&!Qo(Ve,G)&&ue(G)}else ue(G);ue(ee),C=_,x=_-f+1,x<0&&(x=0)}function F(z,G){_+=G,_>C?_=C:_<x&&(_=x);var ee=I[(f+_)%f];if(ee&&!ee.find()){var ve=G>0?1:-1,pe,ue=z.getCursor();do if(_+=ve,ee=I[(f+_)%f],ee&&(pe=ee.find())&&!Qo(ue,pe))break;while(_<C&&_>x)}return ee}function B(z,G){var ee=_,ve=F(z,G);return _=ee,ve&&ve.find()}return{cachedCursor:void 0,add:D,find:B,move:F}},Z=function(f){return f?{changes:f.changes,expectCursorActivityForChange:f.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function ye(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Z()}ye.prototype={exitMacroRecordMode:function(){var f=$.macroModeState;f.onRecordingDone&&f.onRecordingDone(),f.onRecordingDone=void 0,f.isRecording=!1},enterMacroRecordMode:function(f,_){var C=$.registerController.getRegister(_);C&&(C.clear(),this.latestRegister=_,f.openDialog&&(this.onRecordingDone=f.openDialog(document.createTextNode("(recording)["+_+"]"),null,{bottom:!0})),this.isRecording=!0)}};function ge(w){return w.state.vim||(w.state.vim={inputState:new $t,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),w.state.vim}var $;function Q(){$={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Nt(),macroModeState:new ye,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Gi({}),searchHistoryController:new ai,exCommandHistoryController:new ai};for(var w in he){var f=he[w];f.value=f.defaultValue}}var ie,de={buildKeyMap:function(){},getRegisterController:function(){return $.registerController},resetVimGlobalState_:Q,getVimGlobalState_:function(){return $},maybeInitVimState_:ge,suppressErrorLogging:!1,InsertModeKey:qS,map:function(f,_,C){sa.map(f,_,C)},unmap:function(f,_){return sa.unmap(f,_)},noremap:function(f,_,C){function x(pe){return pe?[pe]:["normal","insert","visual"]}for(var I=x(C),D=Ir.length,F=lJ,B=D-F;B<D&&I.length;B++){var z=Ir[B];if(z.keys==_&&(!C||!z.context||z.context===C)&&z.type.substr(0,2)!=="ex"&&z.type.substr(0,3)!=="key"){var G={};for(var ee in z)G[ee]=z[ee];G.keys=f,C&&!G.context&&(G.context=C),this._mapCommand(G);var ve=x(z.context);I=I.filter(function(pe){return ve.indexOf(pe)===-1})}}},mapclear:function(f){var _=Ir.length,C=lJ,x=Ir.slice(0,_-C);if(Ir=Ir.slice(_-C),f)for(var I=x.length-1;I>=0;I--){var D=x[I];if(f!==D.context)if(D.context)this._mapCommand(D);else{var F=["normal","insert","visual"];for(var B in F)if(F[B]!==f){var z={};for(var G in D)z[G]=D[G];z.context=F[B],this._mapCommand(z)}}}},setOption:st,getOption:rt,defineOption:Xe,defineEx:function(f,_,C){if(!_)_=f;else if(f.indexOf(_)!==0)throw new Error('(Vim.defineEx) "'+_+'" is not a prefix of "'+f+'", command not registered');kN[f]=C,sa.commandMap_[_]={name:f,shortName:_,type:"api"}},handleKey:function(f,_,C){var x=this.findKey(f,_,C);if(typeof x=="function")return x()},findKey:function(f,_,C){var x=ge(f);function I(){var ee=$.macroModeState;if(ee.isRecording){if(_=="q")return ee.exitMacroRecordMode(),Xt(f),!0;C!="mapping"&&Jne(ee,_)}}function D(){if(_=="<Esc>"){if(x.visualMode)na(f);else if(x.insertMode)ym(f);else return;return Xt(f),!0}}function F(ee){for(var ve;ee;)ve=/<\w+-.+?>|<\w+>|./.exec(ee),_=ve[0],ee=ee.substring(ve.index+_.length),de.handleKey(f,_,"mapping")}function B(){if(D())return!0;for(var ee=x.inputState.keyBuffer=x.inputState.keyBuffer+_,ve=_.length==1,pe=$i.matchCommand(ee,Ir,x.inputState,"insert");ee.length>1&&pe.type!="full";){var ee=x.inputState.keyBuffer=ee.slice(1),ue=$i.matchCommand(ee,Ir,x.inputState,"insert");ue.type!="none"&&(pe=ue)}if(pe.type=="none")return Xt(f),!1;if(pe.type=="partial")return ie&&window.clearTimeout(ie),ie=window.setTimeout(function(){x.insertMode&&x.inputState.keyBuffer&&Xt(f)},rt("insertModeEscKeysTimeout")),!ve;if(ie&&window.clearTimeout(ie),ve){for(var Ve=f.listSelections(),Ge=0;Ge<Ve.length;Ge++){var Ue=Ve[Ge].head;f.replaceRange("",Hn(Ue,0,-(ee.length-1)),Ue,"+input")}$.macroModeState.lastInsertModeChanges.changes.pop()}return Xt(f),pe.command}function z(){if(I()||D())return!0;var ee=x.inputState.keyBuffer=x.inputState.keyBuffer+_;if(/^[1-9]\d*$/.test(ee))return!0;var Ve=/^(\d*)(.*)$/.exec(ee);if(!Ve)return Xt(f),!1;var ve=x.visualMode?"visual":"normal",pe=Ve[2]||Ve[1];x.inputState.operatorShortcut&&x.inputState.operatorShortcut.slice(-1)==pe&&(pe=x.inputState.operatorShortcut);var ue=$i.matchCommand(pe,Ir,x.inputState,ve);if(ue.type=="none")return Xt(f),!1;if(ue.type=="partial")return!0;x.inputState.keyBuffer="";var Ve=/^(\d*)(.*)$/.exec(ee);return Ve[1]&&Ve[1]!="0"&&x.inputState.pushRepeatDigit(Ve[1]),ue.command}var G;return x.insertMode?G=B():G=z(),G===!1?!x.insertMode&&_.length===1?function(){return!0}:void 0:G===!0?function(){return!0}:function(){return f.operation(function(){f.curOp.isVimOp=!0;try{G.type=="keyToKey"?F(G.toKeys):$i.processCommand(f,x,G)}catch(ee){throw f.state.vim=void 0,ge(f),de.suppressErrorLogging||console.log(ee),ee}return!0})}},handleEx:function(f,_){sa.processCommand(f,_)},defineMotion:Wh,defineAction:n_,defineOperator:_m,mapCommand:Xne,_mapCommand:IN,defineRegister:pi,exitVisualMode:na,exitInsertMode:ym};function $t(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}$t.prototype.pushRepeatDigit=function(w){this.operator?this.motionRepeat=this.motionRepeat.concat(w):this.prefixRepeat=this.prefixRepeat.concat(w)},$t.prototype.getRepeat=function(){var w=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(w=1,this.prefixRepeat.length>0&&(w*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(w*=parseInt(this.motionRepeat.join(""),10))),w};function Xt(w,f){w.state.vim.inputState=new $t,ot.default.signal(w,"vim-command-done",f)}function Qt(w,f,_){this.clear(),this.keyBuffer=[w||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!f,this.blockwise=!!_}Qt.prototype={setText:function(f,_,C){this.keyBuffer=[f||""],this.linewise=!!_,this.blockwise=!!C},pushText:function(f,_){_&&(this.linewise||this.keyBuffer.push(`
|
|
`),this.linewise=!0),this.keyBuffer.push(f)},pushInsertModeChanges:function(f){this.insertModeChanges.push(Z(f))},pushSearchQuery:function(f){this.searchQueries.push(f)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};function pi(w,f){var _=$.registerController.registers;if(!w||w.length!=1)throw Error("Register name must be 1 character");if(_[w])throw Error("Register already defined "+w);_[w]=f,S.push(w)}function Gi(w){this.registers=w,this.unnamedRegister=w['"']=new Qt,w["."]=new Qt,w[":"]=new Qt,w["/"]=new Qt}Gi.prototype={pushText:function(f,_,C,x,I){if(f!=="_"){x&&C.charAt(C.length-1)!==`
|
|
`&&(C+=`
|
|
`);var D=this.isValidRegister(f)?this.getRegister(f):null;if(!D){switch(_){case"yank":this.registers[0]=new Qt(C,x,I);break;case"delete":case"change":C.indexOf(`
|
|
`)==-1?this.registers["-"]=new Qt(C,x):(this.shiftNumericRegisters_(),this.registers[1]=new Qt(C,x));break}this.unnamedRegister.setText(C,x,I);return}var F=W(f);F?D.pushText(C,x):D.setText(C,x,I),this.unnamedRegister.setText(D.toString(),x)}},getRegister:function(f){return this.isValidRegister(f)?(f=f.toLowerCase(),this.registers[f]||(this.registers[f]=new Qt),this.registers[f]):this.unnamedRegister},isValidRegister:function(f){return f&&Ne(f,S)},shiftNumericRegisters_:function(){for(var f=9;f>=2;f--)this.registers[f]=this.getRegister(""+(f-1))}};function ai(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}ai.prototype={nextMatch:function(f,_){var C=this.historyBuffer,x=_?-1:1;this.initialPrefix===null&&(this.initialPrefix=f);for(var I=this.iterator+x;_?I>=0:I<C.length;I+=x)for(var D=C[I],F=0;F<=D.length;F++)if(this.initialPrefix==D.substring(0,F))return this.iterator=I,D;if(I>=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return f},pushInput:function(f){var _=this.historyBuffer.indexOf(f);_>-1&&this.historyBuffer.splice(_,1),f.length&&this.historyBuffer.push(f)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var $i={matchCommand:function(f,_,C,x){var I=vne(f,_,x,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var D,F=0;F<I.full.length;F++){var B=I.full[F];D||(D=B)}if(D.keys.slice(-11)=="<character>"){var z=bne(f);if(!z)return{type:"none"};C.selectedCharacter=z}return{type:"full",command:D}},processCommand:function(f,_,C){switch(_.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(f,_,C);break;case"operator":this.processOperator(f,_,C);break;case"operatorMotion":this.processOperatorMotion(f,_,C);break;case"action":this.processAction(f,_,C);break;case"search":this.processSearch(f,_,C);break;case"ex":case"keyToEx":this.processEx(f,_,C);break;default:break}},processMotion:function(f,_,C){_.inputState.motion=C.motion,_.inputState.motionArgs=fl(C.motionArgs),this.evalInput(f,_)},processOperator:function(f,_,C){var x=_.inputState;if(x.operator)if(x.operator==C.operator){x.motion="expandToLine",x.motionArgs={linewise:!0},this.evalInput(f,_);return}else Xt(f);x.operator=C.operator,x.operatorArgs=fl(C.operatorArgs),C.keys.length>1&&(x.operatorShortcut=C.keys),C.exitVisualBlock&&(_.visualBlock=!1,Vh(f)),_.visualMode&&this.evalInput(f,_)},processOperatorMotion:function(f,_,C){var x=_.visualMode,I=fl(C.operatorMotionArgs);I&&x&&I.visualLine&&(_.visualLine=!0),this.processOperator(f,_,C),x||this.processMotion(f,_,C)},processAction:function(f,_,C){var x=_.inputState,I=x.getRepeat(),D=!!I,F=fl(C.actionArgs)||{};x.selectedCharacter&&(F.selectedCharacter=x.selectedCharacter),C.operator&&this.processOperator(f,_,C),C.motion&&this.processMotion(f,_,C),(C.motion||C.operator)&&this.evalInput(f,_),F.repeat=I||1,F.repeatIsExplicit=D,F.registerName=x.registerName,Xt(f),_.lastMotion=null,C.isEdit&&this.recordLastEdit(_,x,C),jh[C.action](f,F,_)},processSearch:function(f,_,C){if(!f.getSearchCursor)return;var x=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;oa(f).setReversed(!x);var D=x?"/":"?",F=oa(f).getQuery(),B=f.getScrollInfo();function z(Ue,It,yt){$.searchHistoryController.pushInput(Ue),$.searchHistoryController.reset();try{bm(f,Ue,It,yt)}catch(Ct){Pi(f,"Invalid regex: "+Ue),Xt(f);return}$i.processMotion(f,_,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function G(Ue){f.scrollTo(B.left,B.top),z(Ue,!0,!0);var It=$.macroModeState;It.isRecording&&ere(It,Ue)}function ee(Ue,It,yt){var Ct=ot.default.keyName(Ue),Fi,ro;Ct=="Up"||Ct=="Down"?(Fi=Ct=="Up",ro=Ue.target?Ue.target.selectionEnd:0,It=$.searchHistoryController.nextMatch(It,Fi)||"",yt(It),ro&&Ue.target&&(Ue.target.selectionEnd=Ue.target.selectionStart=Math.min(ro,Ue.target.value.length))):Ct!="Left"&&Ct!="Right"&&Ct!="Ctrl"&&Ct!="Alt"&&Ct!="Shift"&&$.searchHistoryController.reset();var hn;try{hn=bm(f,It,!0,!0)}catch(Vr){}hn?f.scrollIntoView(wN(f,!x,hn),30):(VS(f),f.scrollTo(B.left,B.top))}function ve(Ue,It,yt){var Ct=ot.default.keyName(Ue);Ct=="Esc"||Ct=="Ctrl-C"||Ct=="Ctrl-["||Ct=="Backspace"&&It==""?($.searchHistoryController.pushInput(It),$.searchHistoryController.reset(),bm(f,F),VS(f),f.scrollTo(B.left,B.top),ot.default.e_stop(Ue),Xt(f),yt(),f.focus()):Ct=="Up"||Ct=="Down"?ot.default.e_stop(Ue):Ct=="Ctrl-U"&&(ot.default.e_stop(Ue),yt(""))}switch(C.searchArgs.querySrc){case"prompt":var pe=$.macroModeState;if(pe.isPlaying){var Ge=pe.replaySearchQueries.shift();z(Ge,!0,!1)}else o_(f,{onClose:G,prefix:D,desc:"(JavaScript regexp)",onKeyUp:ee,onKeyDown:ve});break;case"wordUnderCursor":var ue=r_(f,!1,!0,!1,!0),Ve=!0;if(ue||(ue=r_(f,!1,!0,!1,!1),Ve=!1),!ue)return;var Ge=f.getLine(ue.start.line).substring(ue.start.ch,ue.end.ch);Ve&&I?Ge="\\b"+Ge+"\\b":Ge=yne(Ge),$.jumpList.cachedCursor=f.getCursor(),f.setCursor(ue.start),z(Ge,!0,!1);break}},processEx:function(f,_,C){function x(D){$.exCommandHistoryController.pushInput(D),$.exCommandHistoryController.reset(),sa.processCommand(f,D)}function I(D,F,B){var z=ot.default.keyName(D),G,ee;(z=="Esc"||z=="Ctrl-C"||z=="Ctrl-["||z=="Backspace"&&F=="")&&($.exCommandHistoryController.pushInput(F),$.exCommandHistoryController.reset(),ot.default.e_stop(D),Xt(f),B(),f.focus()),z=="Up"||z=="Down"?(ot.default.e_stop(D),G=z=="Up",ee=D.target?D.target.selectionEnd:0,F=$.exCommandHistoryController.nextMatch(F,G)||"",B(F),ee&&D.target&&(D.target.selectionEnd=D.target.selectionStart=Math.min(ee,D.target.value.length))):z=="Ctrl-U"?(ot.default.e_stop(D),B("")):z!="Left"&&z!="Right"&&z!="Ctrl"&&z!="Alt"&&z!="Shift"&&$.exCommandHistoryController.reset()}C.type=="keyToEx"?sa.processCommand(f,C.exArgs.input):_.visualMode?o_(f,{onClose:x,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):o_(f,{onClose:x,prefix:":",onKeyDown:I})},evalInput:function(f,_){var C=_.inputState,x=C.motion,I=C.motionArgs||{},D=C.operator,F=C.operatorArgs||{},B=C.registerName,z=_.sel,G=rn(_.visualMode?fr(f,z.head):f.getCursor("head")),ee=rn(_.visualMode?fr(f,z.anchor):f.getCursor("anchor")),ve=rn(G),pe=rn(ee),ue,Ve,Ge;if(D&&this.recordLastEdit(_,C),C.repeatOverride!==void 0?Ge=C.repeatOverride:Ge=C.getRepeat(),Ge>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&Ge===0)&&(Ge=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=F.selectedCharacter=C.selectedCharacter),I.repeat=Ge,Xt(f),x){var Ue=nn[x](f,G,I,_,C);if(_.lastMotion=nn[x],!Ue)return;if(I.toJumplist){var It=$.jumpList,yt=It.cachedCursor;yt?(hN(f,yt,Ue),delete It.cachedCursor):hN(f,G,Ue)}Ue instanceof Array?(Ve=Ue[0],ue=Ue[1]):ue=Ue,ue||(ue=rn(G)),_.visualMode?(_.visualBlock&&ue.ch===1/0||(ue=fr(f,ue)),Ve&&(Ve=fr(f,Ve)),Ve=Ve||pe,z.anchor=Ve,z.head=ue,Vh(f),pl(f,_,"<",An(Ve,ue)?Ve:ue),pl(f,_,">",An(Ve,ue)?ue:Ve)):D||(ue=fr(f,ue),f.setCursor(ue.line,ue.ch))}if(D){if(F.lastSel){Ve=pe;var Ct=F.lastSel,Fi=Math.abs(Ct.head.line-Ct.anchor.line),ro=Math.abs(Ct.head.ch-Ct.anchor.ch);Ct.visualLine?ue=new Fe(pe.line+Fi,pe.ch):Ct.visualBlock?ue=new Fe(pe.line+Fi,pe.ch+ro):Ct.head.line==Ct.anchor.line?ue=new Fe(pe.line,pe.ch+ro):ue=new Fe(pe.line+Fi,pe.ch),_.visualMode=!0,_.visualLine=Ct.visualLine,_.visualBlock=Ct.visualBlock,z=_.sel={anchor:Ve,head:ue},Vh(f)}else _.visualMode&&(F.lastSel={anchor:rn(z.anchor),head:rn(z.head),visualBlock:_.visualBlock,visualLine:_.visualLine});var hn,Vr,Ci,Jt,pr;if(_.visualMode){if(hn=Jo(z.head,z.anchor),Vr=Gd(z.head,z.anchor),Ci=_.visualLine||F.linewise,Jt=_.visualBlock?"block":Ci?"line":"char",pr=WS(f,{anchor:hn,head:Vr},Jt),Ci){var oo=pr.ranges;if(Jt=="block")for(var Kr=0;Kr<oo.length;Kr++)oo[Kr].head.ch=Bn(f,oo[Kr].head.line);else Jt=="line"&&(oo[0].head=new Fe(oo[0].head.line+1,0))}}else{if(hn=rn(Ve||pe),Vr=rn(ue||ve),An(Vr,hn)){var Mc=hn;hn=Vr,Vr=Mc}Ci=I.linewise||F.linewise,Ci?kne(f,hn,Vr):I.forward&&Tne(f,hn,Vr),Jt="char";var Cm=!I.inclusive||Ci;pr=WS(f,{anchor:hn,head:Vr},Jt,Cm)}f.setSelections(pr.ranges,pr.primary),_.lastMotion=null,F.repeat=Ge,F.registerName=B,F.linewise=Ci;var Sm=i_[D](f,F,pr.ranges,pe,ue);_.visualMode&&na(f,Sm!=null),Sm&&f.setCursor(Sm)}},recordLastEdit:function(f,_,C){var x=$.macroModeState;x.isPlaying||(f.lastEditInputState=_,f.lastEditActionCommand=C,x.lastInsertModeChanges.changes=[],x.lastInsertModeChanges.expectCursorActivityForChange=!1,x.lastInsertModeChanges.visualBlock=f.visualBlock?f.sel.head.line-f.sel.anchor.line:0)}},nn={moveToTopLine:function(f,_,C){var x=KS(f).top+C.repeat-1;return new Fe(x,ra(f.getLine(x)))},moveToMiddleLine:function(f){var _=KS(f),C=Math.floor((_.top+_.bottom)*.5);return new Fe(C,ra(f.getLine(C)))},moveToBottomLine:function(f,_,C){var x=KS(f).bottom-C.repeat+1;return new Fe(x,ra(f.getLine(x)))},expandToLine:function(f,_,C){var x=_;return new Fe(x.line+C.repeat-1,1/0)},findNext:function(f,_,C){var x=oa(f),I=x.getQuery();if(I){var D=!C.forward;return D=x.isReversed()?!D:D,SN(f,I),wN(f,D,I,C.repeat)}},findAndSelectNextInclusive:function(f,_,C,x,I){var D=oa(f),F=D.getQuery();if(F){var B=!C.forward;B=D.isReversed()?!B:B;var z=Gne(f,B,F,C.repeat,x);if(z){if(I.operator)return z;var G=z[0],ee=new Fe(z[1].line,z[1].ch-1);if(x.visualMode){(x.visualLine||x.visualBlock)&&(x.visualLine=!1,x.visualBlock=!1,ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:""}));var ve=x.sel.anchor;if(ve)return D.isReversed()?C.forward?[ve,G]:[ve,ee]:C.forward?[ve,ee]:[ve,G]}else x.visualMode=!0,x.visualLine=!1,x.visualBlock=!1,ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:""});return B?[ee,G]:[G,ee]}}},goToMark:function(f,_,C,x){var I=xN(f,x,C.selectedCharacter);return I?C.linewise?{line:I.line,ch:ra(f.getLine(I.line))}:I:null},moveToOtherHighlightedEnd:function(f,_,C,x){if(x.visualBlock&&C.sameLine){var I=x.sel;return[fr(f,new Fe(I.anchor.line,I.head.ch)),fr(f,new Fe(I.head.line,I.anchor.ch))]}else return[x.sel.head,x.sel.anchor]},jumpToMark:function(f,_,C,x){for(var I=_,D=0;D<C.repeat;D++){var F=I;for(var B in x.marks)if(A(B)){var z=x.marks[B].find(),G=C.forward?An(z,F):An(F,z);if(!G&&!(C.linewise&&z.line==F.line)){var ee=Qo(F,I),ve=C.forward?lN(F,z,I):lN(I,z,F);(ee||ve)&&(I=z)}}}return C.linewise&&(I=new Fe(I.line,ra(f.getLine(I.line)))),I},moveByCharacters:function(f,_,C){var x=_,I=C.repeat,D=C.forward?x.ch+I:x.ch-I;return new Fe(x.line,D)},moveByLines:function(f,_,C,x){var I=_,D=I.ch;switch(x.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:D=x.lastHPos;break;default:x.lastHPos=D}var F=C.repeat+(C.repeatOffset||0),B=C.forward?I.line+F:I.line-F,z=f.firstLine(),G=f.lastLine(),ee=f.findPosV(I,C.forward?F:-F,"line",x.lastHSPos),ve=C.forward?ee.line>B:ee.line<B;return ve&&(B=ee.line,D=ee.ch),B<z&&I.line==z?this.moveToStartOfLine(f,_,C,x):B>G&&I.line==G?mN(f,_,C,x,!0):(C.toFirstChar&&(D=ra(f.getLine(B)),x.lastHPos=D),x.lastHSPos=f.charCoords(new Fe(B,D),"div").left,new Fe(B,D))},moveByDisplayLines:function(f,_,C,x){var I=_;switch(x.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:x.lastHSPos=f.charCoords(I,"div").left}var D=C.repeat,F=f.findPosV(I,C.forward?D:-D,"line",x.lastHSPos);if(F.hitSide)if(C.forward)var B=f.charCoords(F,"div"),z={top:B.top+8,left:x.lastHSPos},F=f.coordsChar(z,"div");else{var G=f.charCoords(new Fe(f.firstLine(),0),"div");G.left=x.lastHSPos,F=f.coordsChar(G,"div")}return x.lastHPos=F.ch,F},moveByPage:function(f,_,C){var x=_,I=C.repeat;return f.findPosV(x,C.forward?I:-I,"page")},moveByParagraph:function(f,_,C){var x=C.forward?1:-1;return gN(f,_,C.repeat,x)},moveBySentence:function(f,_,C){var x=C.forward?1:-1;return One(f,_,C.repeat,x)},moveByScroll:function(f,_,C,x){var I=f.getScrollInfo(),B=null,D=C.repeat;D||(D=I.clientHeight/(2*f.defaultTextHeight()));var F=f.charCoords(_,"local");C.repeat=D;var B=nn.moveByDisplayLines(f,_,C,x);if(!B)return null;var z=f.charCoords(B,"local");return f.scrollTo(null,I.top+z.top-F.top),B},moveByWords:function(f,_,C){return Dne(f,_,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(f,_,C){var x=C.repeat,I=jS(f,x,C.forward,C.selectedCharacter),D=C.forward?-1:1;return fN(D,C),I?(I.ch+=D,I):null},moveToCharacter:function(f,_,C){var x=C.repeat;return fN(0,C),jS(f,x,C.forward,C.selectedCharacter)||_},moveToSymbol:function(f,_,C){var x=C.repeat;return Lne(f,x,C.forward,C.selectedCharacter)||_},moveToColumn:function(f,_,C,x){var I=C.repeat;return x.lastHPos=I-1,x.lastHSPos=f.charCoords(_,"div").left,Nne(f,I)},moveToEol:function(f,_,C,x){return mN(f,_,C,x,!1)},moveToFirstNonWhiteSpaceCharacter:function(f,_){var C=_;return new Fe(C.line,ra(f.getLine(C.line)))},moveToMatchedSymbol:function(f,_){var C=_,x=C.line,I=C.ch,D=f.getLine(x);if(I<D.length){var F=I==="<"||I===">"?/[(){}[\]<>]/:/[(){}[\]]/,B=f.findMatchingBracket(new Fe(x,I),{bracketRegex:F});return B.to}else return C},moveToStartOfLine:function(f,_){return new Fe(_.line,0)},moveToLineOrEdgeOfDocument:function(f,_,C){var x=C.forward?f.lastLine():f.firstLine();return C.repeatIsExplicit&&(x=C.repeat-f.getOption("firstLineNumber")),new Fe(x,ra(f.getLine(x)))},moveToStartOfDisplayLine:function(f){return f.execCommand("goLineLeft"),f.getCursor()},moveToEndOfDisplayLine:function(f){f.execCommand("goLineRight");var _=f.getCursor();return _.sticky=="before"&&_.ch--,_},textObjectManipulation:function(f,_,C,x){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},D={"'":!0,'"':!0,"`":!0},F=C.selectedCharacter;F=="b"?F="(":F=="B"&&(F="{");var B=!C.textObjectInner,z;if(I[F])z=Pne(f,_,F,B);else if(D[F])z=Fne(f,_,F,B);else if(F==="W")z=r_(f,B,!0,!0);else if(F==="w")z=r_(f,B,!0,!1);else if(F==="p")if(z=gN(f,_,C.repeat,0,B),C.linewise=!0,x.visualMode)x.visualLine||(x.visualLine=!0);else{var G=x.inputState.operatorArgs;G&&(G.linewise=!0),z.end.line--}else if(F==="t")z=Ine(f,_,B);else return null;return f.state.vim.visualMode?xne(f,z.start,z.end):[z.start,z.end]},repeatLastCharacterSearch:function(f,_,C){var x=$.lastCharacterSearch,I=C.repeat,D=C.forward===x.forward,F=(x.increment?1:0)*(D?-1:1);f.moveH(-F,"char"),C.inclusive=!!D;var B=jS(f,I,D,x.selectedCharacter);return B?(B.ch+=F,B):(f.moveH(F,"char"),_)}};function Wh(w,f){nn[w]=f}function qd(w,f){for(var _=[],C=0;C<f;C++)_.push(w);return _}var i_={change:function(f,_,C){var x,I,D=f.state.vim,F=C[0].anchor,B=C[0].head;if(D.visualMode)if(_.fullLine)B.ch=Number.MAX_VALUE,B.line--,f.setSelection(F,B),I=f.getSelection(),f.replaceSelections(""),x=F;else{I=f.getSelection();var pe=qd("",C.length);f.replaceSelections(pe),x=Jo(C[0].head,C[0].anchor)}else{I=f.getRange(F,B);var z=D.lastEditInputState||{};if(z.motion=="moveByWords"&&!re(I)){var G=/\s+$/.exec(I);G&&z.motionArgs&&z.motionArgs.forward&&(B=Hn(B,0,-G[0].length),I=I.slice(0,-G[0].length))}var ee=new Fe(F.line-1,Number.MAX_VALUE),ve=f.firstLine()==f.lastLine();B.line>f.lastLine()&&_.linewise&&!ve?f.replaceRange("",ee,B):f.replaceRange("",F,B),_.linewise&&(ve||(f.setCursor(ee),ot.default.commands.newlineAndIndent(f)),F.ch=Number.MAX_VALUE),x=F}$.registerController.pushText(_.registerName,"change",I,_.linewise,C.length>1),jh.enterInsertMode(f,{head:x},f.state.vim)},delete:function(f,_,C){f.pushUndoStop();var x,I,D=f.state.vim;if(D.visualBlock){I=f.getSelection();var z=qd("",C.length);f.replaceSelections(z),x=Jo(C[0].head,C[0].anchor)}else{var F=C[0].anchor,B=C[0].head;_.linewise&&B.line!=f.firstLine()&&F.line==f.lastLine()&&F.line==B.line-1&&(F.line==f.firstLine()?F.ch=0:F=new Fe(F.line-1,Bn(f,F.line-1))),I=f.getRange(F,B),f.replaceRange("",F,B),x=F,_.linewise&&(x=nn.moveToFirstNonWhiteSpaceCharacter(f,F))}return $.registerController.pushText(_.registerName,"delete",I,_.linewise,D.visualBlock),fr(f,x)},indent:function(f,_,C){var x=f.state.vim,I=C[0].anchor.line,D=x.visualBlock?C[C.length-1].anchor.line:C[0].head.line,F=x.visualMode?_.repeat:1;_.linewise&&D--,f.pushUndoStop();for(var B=I;B<=D;B++)for(var z=0;z<F;z++)f.indentLine(B,_.indentRight);return f.pushUndoStop(),nn.moveToFirstNonWhiteSpaceCharacter(f,C[0].anchor)},indentAuto:function(f,_,C){return f.execCommand("indentAuto"),nn.moveToFirstNonWhiteSpaceCharacter(f,C[0].anchor)},changeCase:function(f,_,C,x,I){for(var D=f.getSelections(),F=[],B=_.toLower,z=0;z<D.length;z++){var G=D[z],ee="";if(B===!0)ee=G.toLowerCase();else if(B===!1)ee=G.toUpperCase();else for(var ve=0;ve<G.length;ve++){var pe=G.charAt(ve);ee+=W(pe)?pe.toLowerCase():pe.toUpperCase()}F.push(ee)}return f.replaceSelections(F),_.shouldMoveCursor?I:!f.state.vim.visualMode&&_.linewise&&C[0].anchor.line+1==C[0].head.line?nn.moveToFirstNonWhiteSpaceCharacter(f,x):_.linewise?x:Jo(C[0].anchor,C[0].head)},yank:function(f,_,C,x){var I=f.state.vim,D=f.getSelection(),F=I.visualMode?Jo(I.sel.anchor,I.sel.head,C[0].head,C[0].anchor):x;return $.registerController.pushText(_.registerName,"yank",D,_.linewise,I.visualBlock),F}};function _m(w,f){i_[w]=f}var jh={jumpListWalk:function(f,_,C){if(!C.visualMode){var x=_.repeat,I=_.forward,D=$.jumpList,F=D.move(f,I?x:-x),B=F?F.find():void 0;B=B||f.getCursor(),f.setCursor(B)}},scroll:function(f,_,C){if(!C.visualMode){var x=_.repeat||1,I=f.defaultTextHeight(),D=f.getScrollInfo().top,F=I*x,B=_.forward?D+F:D-F,z=rn(f.getCursor()),G=f.charCoords(z,"local");if(_.forward)B>G.top?(z.line+=(B-G.top)/I,z.line=Math.ceil(z.line),f.setCursor(z),G=f.charCoords(z,"local"),f.scrollTo(null,G.top)):f.scrollTo(null,B);else{var ee=B+f.getScrollInfo().clientHeight;ee<G.bottom?(z.line-=(G.bottom-ee)/I,z.line=Math.floor(z.line),f.setCursor(z),G=f.charCoords(z,"local"),f.scrollTo(null,G.bottom-f.getScrollInfo().clientHeight)):f.scrollTo(null,B)}}},scrollToCursor:function(f,_){var C=f.getCursor().line,x=f.charCoords(new Fe(C,0),"local"),I=f.getScrollInfo().clientHeight,D=x.top,F=x.bottom-D;switch(_.position){case"center":D=D-I/2+F;break;case"bottom":D=D-I+F;break}f.moveCurrentLineTo(D)},replayMacro:function(f,_,C){var x=_.selectedCharacter,I=_.repeat,D=$.macroModeState;for(x=="@"?x=D.latestRegister:D.latestRegister=x;I--;)Qne(f,C,D,x)},enterMacroRecordMode:function(f,_){var C=$.macroModeState,x=_.selectedCharacter;$.registerController.isValidRegister(x)&&C.enterMacroRecordMode(f,x)},toggleOverwrite:function(f){f.state.overwrite?(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),ot.default.signal(f,"vim-mode-change",{mode:"insert"})):(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),ot.default.signal(f,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(f,_,C){if(!f.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=_&&_.repeat||1;var x=_?_.insertAt:null,I=C.sel,D=_.head||f.getCursor("head"),F=f.listSelections().length;if(x=="eol")D=new Fe(D.line,Bn(f,D.line));else if(x=="bol")D=new Fe(D.line,0);else if(x=="charAfter")D=Hn(D,0,1);else if(x=="firstNonBlank")D=nn.moveToFirstNonWhiteSpaceCharacter(f,D);else if(x=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(D=new Fe(Math.min(I.head.line,I.anchor.line),Math.min(I.head.ch,I.anchor.ch)),F=Math.abs(I.head.line-I.anchor.line)+1):I.head.line<I.anchor.line?D=I.head:D=new Fe(I.anchor.line,0)}else if(x=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(D=new Fe(Math.min(I.head.line,I.anchor.line),Math.max(I.head.ch,I.anchor.ch)+1),F=Math.abs(I.head.line-I.anchor.line)+1):I.head.line>=I.anchor.line?D=Hn(I.head,0,1):D=new Fe(I.anchor.line,0)}else if(x=="inplace"){if(C.visualMode)return}else x=="lastEdit"&&(D=EN(f)||D);f.setOption("disableInput",!1),_&&_.replace?(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),ot.default.signal(f,"vim-mode-change",{mode:"replace"})):(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),ot.default.signal(f,"vim-mode-change",{mode:"insert"})),$.macroModeState.isPlaying||(f.on("change",AN),ot.default.on(f.getInputField(),"keydown",MN)),C.visualMode&&na(f),dN(f,D,F)}},toggleVisualMode:function(f,_,C){var x=_.repeat,I=f.getCursor(),D;C.visualMode?C.visualLine^_.linewise||C.visualBlock^_.blockwise?(C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f)):na(f):(C.visualMode=!0,C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,D=fr(f,new Fe(I.line,I.ch+x-1)),C.sel={anchor:I,head:D},ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f),pl(f,C,"<",Jo(I,D)),pl(f,C,">",Gd(I,D)))},reselectLastSelection:function(f,_,C){var x=C.lastSelection;if(C.visualMode&&uN(f,C),x){var I=x.anchorMark.find(),D=x.headMark.find();if(!I||!D)return;C.sel={anchor:I,head:D},C.visualMode=!0,C.visualLine=x.visualLine,C.visualBlock=x.visualBlock,Vh(f),pl(f,C,"<",Jo(I,D)),pl(f,C,">",Gd(I,D)),ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(f,_,C){var x,I;if(C.visualMode){if(x=f.getCursor("anchor"),I=f.getCursor("head"),An(I,x)){var D=I;I=x,x=D}I.ch=Bn(f,I.line)-1}else{var F=Math.max(_.repeat,2);x=f.getCursor(),I=fr(f,new Fe(x.line+F-1,1/0))}for(var B=0,z=x.line;z<I.line;z++){B=Bn(f,x.line);var D=new Fe(x.line+1,Bn(f,x.line+1)),G=f.getRange(x,D);G=_.keepSpaces?G.replace(/\n\r?/g,""):G.replace(/\n\s*/g," "),f.replaceRange(G,x,D)}var ee=new Fe(x.line,B);C.visualMode&&na(f,!1),f.setCursor(ee)},newLineAndEnterInsertMode:function(f,_,C){if(!f.getOption("readOnly")){C.insertMode=!0;var x=rn(f.getCursor());if(x.line===f.firstLine()&&!_.after)f.replaceRange(`
|
|
`,new Fe(f.firstLine(),0)),f.setCursor(f.firstLine(),0);else{x.line=_.after?x.line:x.line-1,x.ch=Bn(f,x.line),f.setCursor(x);var I=ot.default.commands.newlineAndIndentContinueComment||ot.default.commands.newlineAndIndent;I(f)}this.enterInsertMode(f,{repeat:_.repeat},C)}},paste:function(f,_,C){var x=rn(f.getCursor()),I=$.registerController.getRegister(_.registerName),D=I.toString();if(D){if(_.matchIndent){var F=f.getOption("tabSize"),B=function(Mc){var Cm=Mc.split(" ").length-1,Sm=Mc.split(" ").length-1;return Cm*F+Sm*1},z=f.getLine(f.getCursor().line),G=B(z.match(/^\s*/)[0]),ee=D.replace(/\n$/,""),ve=D!==ee,pe=B(D.match(/^\s*/)[0]),D=ee.replace(/^\s*/gm,function(Kr){var Mc=G+(B(Kr)-pe);if(Mc<0)return"";if(f.getOption("indentWithTabs")){var Cm=Math.floor(Mc/F);return Array(Cm+1).join(" ")}else return Array(Mc+1).join(" ")});D+=ve?`
|
|
`:""}if(_.repeat>1)var D=Array(_.repeat+1).join(D);var ue=I.linewise,Ve=I.blockwise;if(Ve){D=D.split(`
|
|
`),ue&&D.pop();for(var Ge=0;Ge<D.length;Ge++)D[Ge]=D[Ge]==""?" ":D[Ge];x.ch+=_.after?1:0,x.ch=Math.min(Bn(f,x.line),x.ch)}else ue?C.visualMode?D=C.visualLine?D.slice(0,-1):`
|
|
`+D.slice(0,D.length-1)+`
|
|
`:_.after?(D=`
|
|
`+D.slice(0,D.length-1),x.ch=Bn(f,x.line)):x.ch=0:x.ch+=_.after?1:0;var Ue,It;if(C.visualMode){C.lastPastedText=D;var yt,Ct=wne(f,C),Fi=Ct[0],ro=Ct[1],hn=f.getSelection(),Vr=f.listSelections(),Ci=new Array(Vr.length).join("1").split("1");C.lastSelection&&(yt=C.lastSelection.headMark.find()),$.registerController.unnamedRegister.setText(hn),Ve?(f.replaceSelections(Ci),ro=new Fe(Fi.line+D.length-1,Fi.ch),f.setCursor(Fi),cN(f,ro),f.replaceSelections(D),Ue=Fi):C.visualBlock?(f.replaceSelections(Ci),f.setCursor(Fi),f.replaceRange(D,Fi,Fi),Ue=Fi):(f.replaceRange(D,Fi,ro),Ue=f.posFromIndex(f.indexFromPos(Fi)+D.length-1)),yt&&(C.lastSelection.headMark=f.setBookmark(yt)),ue&&(Ue.ch=0)}else if(Ve){f.setCursor(x);for(var Ge=0;Ge<D.length;Ge++){var Jt=x.line+Ge;Jt>f.lastLine()&&f.replaceRange(`
|
|
`,new Fe(Jt,0));var pr=Bn(f,Jt);pr<x.ch&&Cne(f,Jt,x.ch)}f.setCursor(x),cN(f,new Fe(x.line+D.length-1,x.ch)),f.replaceSelections(D),Ue=x}else f.replaceRange(D,x),ue&&_.after?Ue=new Fe(x.line+1,ra(f.getLine(x.line+1))):ue&&!_.after?Ue=new Fe(x.line,ra(f.getLine(x.line))):!ue&&_.after?(It=f.indexFromPos(x),Ue=f.posFromIndex(It+D.length-1)):(It=f.indexFromPos(x),Ue=f.posFromIndex(It+D.length));C.visualMode&&na(f,!1),f.setCursor(Ue)}},undo:function(f,_){f.operation(function(){aN(f,ot.default.commands.undo,_.repeat)(),f.setCursor(f.getCursor("anchor"))})},redo:function(f,_){aN(f,ot.default.commands.redo,_.repeat)()},setRegister:function(f,_,C){C.inputState.registerName=_.selectedCharacter},setMark:function(f,_,C){var x=_.selectedCharacter;pl(f,C,x,f.getCursor())},replace:function(f,_,C){var x=_.selectedCharacter,I=f.getCursor(),D,F,B=f.listSelections();if(C.visualMode)I=f.getCursor("start"),F=f.getCursor("end");else{var z=f.getLine(I.line);D=I.ch+_.repeat,D>z.length&&(D=z.length),F=new Fe(I.line,D)}if(x==`
|
|
`)C.visualMode||f.replaceRange("",I,F),(ot.default.commands.newlineAndIndentContinueComment||ot.default.commands.newlineAndIndent)(f);else{var G=f.getRange(I,F);if(G=G.replace(/[^\n]/g,x),C.visualBlock){var ee=new Array(f.getOption("tabSize")+1).join(" ");G=f.getSelection(),G=G.replace(/\t/g,ee).replace(/[^\n]/g,x).split(`
|
|
`),f.replaceSelections(G)}else f.replaceRange(G,I,F);C.visualMode?(I=An(B[0].anchor,B[0].head)?B[0].anchor:B[0].head,f.setCursor(I),na(f,!1)):f.setCursor(Hn(F,0,-1))}},incrementNumberToken:function(f,_){for(var C=f.getCursor(),x=f.getLine(C.line),I=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,D,F,B,z;(D=I.exec(x))!==null&&(F=D.index,B=F+D[0].length,!(C.ch<B)););if(!(!_.backtrack&&B<=C.ch)){if(D){var G=D[2]||D[4],ee=D[3]||D[5],ve=_.increase?1:-1,pe={"0b":2,0:8,"":10,"0x":16}[G.toLowerCase()],ue=parseInt(D[1]+ee,pe)+ve*_.repeat;z=ue.toString(pe);var Ve=G?new Array(ee.length-z.length+1+D[1].length).join("0"):"";z.charAt(0)==="-"?z="-"+G+Ve+z.substr(1):z=G+Ve+z;var Ge=new Fe(C.line,F),Ue=new Fe(C.line,B);f.replaceRange(z,Ge,Ue)}else return;f.setCursor(new Fe(C.line,F+z.length-1))}},repeatLastEdit:function(f,_,C){var x=C.lastEditInputState;if(x){var I=_.repeat;I&&_.repeatIsExplicit?C.lastEditInputState.repeatOverride=I:I=C.lastEditInputState.repeatOverride||I,DN(f,C,I,!1)}},indent:function(f,_){f.indentLine(f.getCursor().line,_.indentRight)},exitInsertMode:ym};function n_(w,f){jh[w]=f}function fr(w,f){var _=w.state.vim,C=_.insertMode||_.visualMode,x=Math.min(Math.max(w.firstLine(),f.line),w.lastLine()),I=Bn(w,x)-1+!!C,D=Math.min(Math.max(0,f.ch),I);return new Fe(x,D)}function fl(w){var f={};for(var _ in w)w.hasOwnProperty(_)&&(f[_]=w[_]);return f}function Hn(w,f,_){return O9(f)==="object"&&(_=f.ch,f=f.line),new Fe(w.line+f,w.ch+_)}function vne(w,f,_,C){for(var x,I=[],D=[],F=0;F<f.length;F++){var B=f[F];_=="insert"&&B.context!="insert"||B.context&&B.context!=_||C.operator&&B.type=="action"||!(x=_ne(w,B.keys))||(x=="partial"&&I.push(B),x=="full"&&D.push(B))}return{partial:I.length&&I,full:D.length&&D}}function _ne(w,f){if(f.slice(-11)=="<character>"){var _=f.length-11,C=w.slice(0,_),x=f.slice(0,_);return C==x&&w.length>_?"full":x.indexOf(C)==0?"partial":!1}else return w==f?"full":f.indexOf(w)==0?"partial":!1}function bne(w){var f=/^.*(<[^>]+>)$/.exec(w),_=f?f[1]:w.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
|
|
`;break;case"<Space>":_=" ";break;default:_="";break}return _}function aN(w,f,_){return function(){for(var C=0;C<_;C++)f(w)}}function rn(w){return new Fe(w.line,w.ch)}function Qo(w,f){return w.ch==f.ch&&w.line==f.line}function An(w,f){return w.line<f.line||w.line==f.line&&w.ch<f.ch}function Jo(w,f){return arguments.length>2&&(f=Jo.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?w:f}function Gd(w,f){return arguments.length>2&&(f=Gd.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?f:w}function lN(w,f,_){var C=An(w,f),x=An(f,_);return C&&x}function Bn(w,f){return w.getLine(f).length}function US(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}function yne(w){return w.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Cne(w,f,_){var C=Bn(w,f),x=new Array(_-C+1).join(" ");w.setCursor(new Fe(f,C)),w.replaceRange(x,w.getCursor())}function cN(w,f){var _=[],C=w.listSelections(),x=rn(w.clipPos(f)),I=!Qo(f,x),D=w.getCursor("head"),F=Sne(C,D),B=Qo(C[F].head,C[F].anchor),z=C.length-1,G=z-F>F?z:0,ee=C[G].anchor,ve=Math.min(ee.line,x.line),pe=Math.max(ee.line,x.line),ue=ee.ch,Ve=x.ch,Ge=C[G].head.ch-ue,Ue=Ve-ue;Ge>0&&Ue<=0?(ue++,I||Ve--):Ge<0&&Ue>=0?(ue--,B||Ve++):Ge<0&&Ue==-1&&(ue--,Ve++);for(var It=ve;It<=pe;It++){var yt={anchor:new Fe(It,ue),head:new Fe(It,Ve)};_.push(yt)}return w.setSelections(_),f.ch=Ve,ee.ch=ue,ee}function dN(w,f,_){for(var C=[],x=0;x<_;x++){var I=Hn(f,x,0);C.push({anchor:I,head:I})}w.setSelections(C,0)}function Sne(w,f,_){for(var C=0;C<w.length;C++){var x=_!="head"&&Qo(w[C].anchor,f),I=_!="anchor"&&Qo(w[C].head,f);if(x||I)return C}return-1}function wne(w,f){var _=f.lastSelection,C=function(){var D=w.listSelections(),F=D[0],B=D[D.length-1],z=An(F.anchor,F.head)?F.anchor:F.head,G=An(B.anchor,B.head)?B.head:B.anchor;return[z,G]},x=function(){var D=w.getCursor(),F=w.getCursor(),B=_.visualBlock;if(B){var z=B.width,G=B.height;F=new Fe(D.line+G,D.ch+z);for(var ee=[],ve=D.line;ve<F.line;ve++){var pe=new Fe(ve,D.ch),ue=new Fe(ve,F.ch),Ve={anchor:pe,head:ue};ee.push(Ve)}w.setSelections(ee)}else{var Ge=_.anchorMark.find(),Ue=_.headMark.find(),It=Ue.line-Ge.line,yt=Ue.ch-Ge.ch;F={line:F.line+It,ch:It?F.ch:yt+F.ch},_.visualLine&&(D=new Fe(D.line,0),F=new Fe(F.line,Bn(w,F.line))),w.setSelection(D,F)}return[D,F]};return f.visualMode?C():x()}function uN(w,f){var _=f.sel.anchor,C=f.sel.head;f.lastPastedText&&(C=w.posFromIndex(w.indexFromPos(_)+f.lastPastedText.length),f.lastPastedText=null),f.lastSelection={anchorMark:w.setBookmark(_),headMark:w.setBookmark(C),anchor:rn(_),head:rn(C),visualMode:f.visualMode,visualLine:f.visualLine,visualBlock:f.visualBlock}}function xne(w,f,_){var C=w.state.vim.sel,x=C.head,I=C.anchor,D;return An(_,f)&&(D=_,_=f,f=D),An(x,I)?(x=Jo(f,x),I=Gd(I,_)):(I=Jo(f,I),x=Gd(x,_),x=Hn(x,0,-1),x.ch==-1&&x.line!=w.firstLine()&&(x=new Fe(x.line-1,Bn(w,x.line-1)))),[I,x]}function Vh(w,f,x){var C=w.state.vim;f=f||C.sel;var x=x||C.visualLine?"line":C.visualBlock?"block":"char",I=WS(w,f,x);w.setSelections(I.ranges,I.primary)}function WS(w,f,_,C){var x=rn(f.head),I=rn(f.anchor);if(_=="char"){var D=!C&&!An(f.head,f.anchor)?1:0,F=An(f.head,f.anchor)?1:0;return x=Hn(f.head,0,D),I=Hn(f.anchor,0,F),{ranges:[{anchor:I,head:x}],primary:0}}else if(_=="line"){if(An(f.head,f.anchor))x.ch=0,I.ch=Bn(w,I.line);else{I.ch=0;var B=w.lastLine();x.line>B&&(x.line=B),x.ch=Bn(w,x.line)}return{ranges:[{anchor:I,head:x}],primary:0}}else if(_=="block"){var z=Math.min(I.line,x.line),G=I.ch,ee=Math.max(I.line,x.line),ve=x.ch;G<ve?ve+=1:G+=1;for(var pe=ee-z+1,ue=x.line==z?0:pe-1,Ve=[],Ge=0;Ge<pe;Ge++)Ve.push({anchor:new Fe(z+Ge,G),head:new Fe(z+Ge,ve)});return{ranges:Ve,primary:ue}}}function Ene(w){var f=w.getCursor("head");return w.getSelection().length==1&&(f=Jo(f,w.getCursor("anchor"))),f}function na(w,f){var _=w.state.vim;f!==!1&&w.setCursor(fr(w,_.sel.head)),uN(w,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||ot.default.signal(w,"vim-mode-change",{mode:"normal"})}function Tne(w,f,_){var C=w.getRange(f,_);if(/\n\s*$/.test(C)){var x=C.split(`
|
|
`);x.pop();for(var I,I=x.pop();x.length>0&&I&&re(I);I=x.pop())_.line--,_.ch=0;I?(_.line--,_.ch=Bn(w,_.line)):_.ch=0}}function kne(w,f,_){f.ch=0,_.ch=0,_.line++}function ra(w){if(!w)return 0;var f=w.search(/\S/);return f==-1?w.length:f}function r_(w,f,_,C,x){for(var I=Ene(w),D=w.getLine(I.line),F=I.ch,B=x?d[0]:u[0];!B(D.charAt(F));)if(F++,F>=D.length)return null;C?B=u[0]:(B=d[0],B(D.charAt(F))||(B=d[1]));for(var z=F,G=F;B(D.charAt(z))&&z<D.length;)z++;for(;B(D.charAt(G))&&G>=0;)G--;if(G++,f){for(var ee=z;/\s/.test(D.charAt(z))&&z<D.length;)z++;if(ee==z){for(var ve=G;/\s/.test(D.charAt(G-1))&&G>0;)G--;G||(G=ve)}}return{start:new Fe(I.line,G),end:new Fe(I.line,z)}}function Ine(w,f,_){var C=f;if(!ot.default.findMatchingTag||!ot.default.findEnclosingTag)return{start:C,end:C};var x=ot.default.findMatchingTag(w,f)||ot.default.findEnclosingTag(w,f);return!x||!x.open||!x.close?{start:C,end:C}:_?{start:x.open.from,end:x.close.to}:{start:x.open.to,end:x.close.from}}function hN(w,f,_){Qo(f,_)||$.jumpList.add(w,f,_)}function fN(w,f){$.lastCharacterSearch.increment=w,$.lastCharacterSearch.forward=f.forward,$.lastCharacterSearch.selectedCharacter=f.selectedCharacter}var Ane={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},pN={bracket:{isComplete:function(f){if(f.nextCh===f.symb){if(f.depth++,f.depth>=1)return!0}else f.nextCh===f.reverseSymb&&f.depth--;return!1}},section:{init:function(f){f.curMoveThrough=!0,f.symb=(f.forward?"]":"[")===f.symb?"{":"}"},isComplete:function(f){return f.index===0&&f.nextCh===f.symb}},comment:{isComplete:function(f){var _=f.lastCh==="*"&&f.nextCh==="/";return f.lastCh=f.nextCh,_}},method:{init:function(f){f.symb=f.symb==="m"?"{":"}",f.reverseSymb=f.symb==="{"?"}":"{"},isComplete:function(f){return f.nextCh===f.symb}},preprocess:{init:function(f){f.index=0},isComplete:function(f){if(f.nextCh==="#"){var _=f.lineText.match(/^#(\w+)/)[1];if(_==="endif"){if(f.forward&&f.depth===0)return!0;f.depth++}else if(_==="if"){if(!f.forward&&f.depth===0)return!0;f.depth--}if(_==="else"&&f.depth===0)return!0}return!1}}};function Lne(w,f,_,C){var x=rn(w.getCursor()),I=_?1:-1,D=_?w.lineCount():-1,F=x.ch,B=x.line,z=w.getLine(B),G={lineText:z,nextCh:z.charAt(F),lastCh:null,index:F,symb:C,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:_,depth:0,curMoveThrough:!1},ee=Ane[C];if(!ee)return x;var ve=pN[ee].init,pe=pN[ee].isComplete;for(ve&&ve(G);B!==D&&f;){if(G.index+=I,G.nextCh=G.lineText.charAt(G.index),!G.nextCh){if(B+=I,G.lineText=w.getLine(B)||"",I>0)G.index=0;else{var ue=G.lineText.length;G.index=ue>0?ue-1:0}G.nextCh=G.lineText.charAt(G.index)}pe(G)&&(x.line=B,x.ch=G.index,f--)}return G.nextCh||G.curMoveThrough?new Fe(B,G.index):x}function Mne(w,f,_,C,x){var I=f.line,D=f.ch,F=w.getLine(I),B=_?1:-1,z=C?u:d;if(x&&F==""){if(I+=B,F=w.getLine(I),!N(w,I))return null;D=_?0:F.length}for(;;){if(x&&F=="")return{from:0,to:0,line:I};for(var G=B>0?F.length:-1,ee=G,ve=G;D!=G;){for(var pe=!1,ue=0;ue<z.length&&!pe;++ue)if(z[ue](F.charAt(D))){for(ee=D;D!=G&&z[ue](F.charAt(D));)D+=B;if(ve=D,pe=ee!=ve,ee==f.ch&&I==f.line&&ve==ee+B)continue;return{from:Math.min(ee,ve+1),to:Math.max(ee,ve),line:I}}pe||(D+=B)}if(I+=B,!N(w,I))return null;F=w.getLine(I),D=B>0?0:F.length}}function Dne(w,f,_,C,x,I){var D=rn(f),F=[];(C&&!x||!C&&x)&&_++;for(var B=!(C&&x),z=0;z<_;z++){var G=Mne(w,f,C,I,B);if(!G){var ee=Bn(w,w.lastLine());F.push(C?{line:w.lastLine(),from:ee,to:ee}:{line:0,from:0,to:0});break}F.push(G),f=new Fe(G.line,C?G.to-1:G.from)}var ve=F.length!=_,pe=F[0],ue=F.pop();return C&&!x?(!ve&&(pe.from!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.from)):C&&x?new Fe(ue.line,ue.to-1):!C&&x?(!ve&&(pe.to!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.to)):new Fe(ue.line,ue.from)}function mN(w,f,_,C,x){var I=f,D=new Fe(I.line+_.repeat-1,1/0),F=w.clipPos(D);return F.ch--,x||(C.lastHPos=1/0,C.lastHSPos=w.charCoords(F,"div").left),D}function jS(w,f,_,C){for(var x=w.getCursor(),I=x.ch,D,F=0;F<f;F++){var B=w.getLine(x.line);if(D=Rne(I,B,C,_,!0),D==-1)return null;I=D}return new Fe(w.getCursor().line,D)}function Nne(w,f){var _=w.getCursor().line;return fr(w,new Fe(_,f-1))}function pl(w,f,_,C){Ne(_,b)&&(f.marks[_]&&f.marks[_].clear(),f.marks[_]=w.setBookmark(C))}function Rne(w,f,_,C,x){var I;return C?(I=f.indexOf(_,w+1),I!=-1&&!x&&(I-=1)):(I=f.lastIndexOf(_,w-1),I!=-1&&!x&&(I+=1)),I}function gN(w,f,_,C,x){var I=f.line,D=w.firstLine(),F=w.lastLine(),B,z,G=I;function ee(Ge){return!w.getLine(Ge)}function ve(Ge,Ue,It){return It?ee(Ge)!=ee(Ge+Ue):!ee(Ge)&&ee(Ge+Ue)}if(C){for(;D<=G&&G<=F&&_>0;)ve(G,C)&&_--,G+=C;return new Fe(G,0)}var pe=w.state.vim;if(pe.visualLine&&ve(I,1,!0)){var ue=pe.sel.anchor;ve(ue.line,-1,!0)&&(!x||ue.line!=I)&&(I+=1)}var Ve=ee(I);for(G=I;G<=F&&_;G++)ve(G,1,!0)&&(!x||ee(G)!=Ve)&&_--;for(z=new Fe(G,0),G>F&&!Ve?Ve=!0:x=!1,G=I;G>D&&!((!x||ee(G)==Ve||G==I)&&ve(G,-1,!0));G--);return B=new Fe(G,0),{start:B,end:z}}function One(w,f,_,C){function x(B,z){if(z.pos+z.dir<0||z.pos+z.dir>=z.line.length){if(z.ln+=z.dir,!N(B,z.ln)){z.line=null,z.ln=null,z.pos=null;return}z.line=B.getLine(z.ln),z.pos=z.dir>0?0:z.line.length-1}else z.pos+=z.dir}function I(B,z,G,ee){var Ge=B.getLine(z),ve=Ge==="",pe={line:Ge,ln:z,pos:G,dir:ee},ue={ln:pe.ln,pos:pe.pos},Ve=pe.line==="";for(x(B,pe);pe.line!==null;){if(ue.ln=pe.ln,ue.pos=pe.pos,pe.line===""&&!Ve)return{ln:pe.ln,pos:pe.pos};if(ve&&pe.line!==""&&!re(pe.line[pe.pos]))return{ln:pe.ln,pos:pe.pos};ae(pe.line[pe.pos])&&!ve&&(pe.pos===pe.line.length-1||re(pe.line[pe.pos+1]))&&(ve=!0),x(B,pe)}var Ge=B.getLine(ue.ln);ue.pos=0;for(var Ue=Ge.length-1;Ue>=0;--Ue)if(!re(Ge[Ue])){ue.pos=Ue;break}return ue}function D(B,z,G,ee){var Ve=B.getLine(z),ve={line:Ve,ln:z,pos:G,dir:ee},pe={ln:ve.ln,pos:null},ue=ve.line==="";for(x(B,ve);ve.line!==null;){if(ve.line===""&&!ue)return pe.pos!==null?pe:{ln:ve.ln,pos:ve.pos};if(ae(ve.line[ve.pos])&&pe.pos!==null&&!(ve.ln===pe.ln&&ve.pos+1===pe.pos))return pe;ve.line!==""&&!re(ve.line[ve.pos])&&(ue=!1,pe={ln:ve.ln,pos:ve.pos}),x(B,ve)}var Ve=B.getLine(pe.ln);pe.pos=0;for(var Ge=0;Ge<Ve.length;++Ge)if(!re(Ve[Ge])){pe.pos=Ge;break}return pe}for(var F={ln:f.line,pos:f.ch};_>0;)C<0?F=D(w,F.ln,F.pos,C):F=I(w,F.ln,F.pos,C),_--;return new Fe(F.ln,F.pos)}function Pne(w,f,_,C){var x=f,I,D,F={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],B={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],z=w.getLine(x.line).charAt(x.ch),G=z===B?1:0;if(I=w.scanForBracket(new Fe(x.line,x.ch+G),-1,void 0,{bracketRegex:F}),D=w.scanForBracket(new Fe(x.line,x.ch+G),1,void 0,{bracketRegex:F}),!I||!D)return{start:x,end:x};if(I=I.pos,D=D.pos,I.line==D.line&&I.ch>D.ch||I.line>D.line){var ee=I;I=D,D=ee}return C?D.ch+=1:I.ch+=1,{start:I,end:D}}function Fne(w,f,_,C){var x=rn(f),I=w.getLine(x.line),D=I.split(""),F,B,z,G,ee=D.indexOf(_);if(x.ch<ee?x.ch=ee:ee<x.ch&&D[x.ch]==_&&(B=x.ch,--x.ch),D[x.ch]==_&&!B)F=x.ch+1;else for(z=x.ch;z>-1&&!F;z--)D[z]==_&&(F=z+1);if(F&&!B)for(z=F,G=D.length;z<G&&!B;z++)D[z]==_&&(B=z);return!F||!B?{start:x,end:x}:(C&&(--F,++B),{start:new Fe(x.line,F),end:new Fe(x.line,B)})}Xe("pcre",!0,"boolean");function vN(){}vN.prototype={getQuery:function(){return $.query},setQuery:function(f){$.query=f},getOverlay:function(){return this.searchOverlay},setOverlay:function(f){this.searchOverlay=f},isReversed:function(){return $.isReversed},setReversed:function(f){$.isReversed=f},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(f){this.annotate=f}};function oa(w){var f=w.state.vim;return f.searchState_||(f.searchState_=new vN)}function Hne(w){return _N(w,"/")}function Bne(w){return bN(w,"/")}function _N(w,f){var _=bN(w,f)||[];if(!_.length)return[];var C=[];if(_[0]===0){for(var x=0;x<_.length;x++)typeof _[x]=="number"&&C.push(w.substring(_[x]+1,_[x+1]));return C}}function bN(w,f){f||(f="/");for(var _=!1,C=[],x=0;x<w.length;x++){var I=w.charAt(x);!_&&I==f&&C.push(x),_=!_&&I=="\\"}return C}function zne(w){for(var f="|(){",_="}",C=!1,x=[],I=-1;I<w.length;I++){var D=w.charAt(I)||"",F=w.charAt(I+1)||"",B=F&&f.indexOf(F)!=-1;C?((D!=="\\"||!B)&&x.push(D),C=!1):D==="\\"?(C=!0,F&&_.indexOf(F)!=-1&&(B=!0),(!B||F==="\\")&&x.push(D)):(x.push(D),B&&F!=="\\"&&x.push("\\"))}return x.join("")}var yN={"\\n":`
|
|
`,"\\r":"\r","\\t":" "};function Une(w){for(var f=!1,_=[],C=-1;C<w.length;C++){var x=w.charAt(C)||"",I=w.charAt(C+1)||"";yN[x+I]?(_.push(yN[x+I]),C++):f?(_.push(x),f=!1):x==="\\"?(f=!0,K(I)||I==="$"?_.push("$"):I!=="/"&&I!=="\\"&&_.push("\\")):(x==="$"&&_.push("$"),_.push(x),I==="/"&&_.push("\\"))}return _.join("")}var CN={"\\/":"/","\\\\":"\\","\\n":`
|
|
`,"\\r":"\r","\\t":" ","\\&":"&"};function Wne(w){for(var f=new ot.default.StringStream(w),_=[];!f.eol();){for(;f.peek()&&f.peek()!="\\";)_.push(f.next());var C=!1;for(var x in CN)if(f.match(x,!0)){C=!0,_.push(CN[x]);break}C||_.push(f.next())}return _.join("")}function jne(w,f,_){var C=$.registerController.getRegister("/");if(C.setText(w),w instanceof RegExp)return w;var x=Bne(w),I,D;if(!x.length)I=w;else{I=w.substring(0,x[0]);var F=w.substring(x[0]);D=F.indexOf("i")!=-1}if(!I)return null;rt("pcre")||(I=zne(I)),_&&(f=/^[^A-Z]*$/.test(I));var B=new RegExp(I,f||D?"im":"m");return B}function $d(w){typeof w=="string"&&(w=document.createElement(w));for(var f,_=1;_<arguments.length;_++)if(f=arguments[_])if(O9(f)!=="object"&&(f=document.createTextNode(f)),f.nodeType)w.appendChild(f);else for(var C in f)Object.prototype.hasOwnProperty.call(f,C)&&(C[0]==="$"?w.style[C.slice(1)]=f[C]:w.setAttribute(C,f[C]));return w}function Pi(w,f){var _=$d("pre",{$color:"red",class:"cm-vim-message"},f);w.openNotification?w.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function Vne(w,f){return $d(document.createDocumentFragment(),$d("span",{$fontFamily:"monospace",$whiteSpace:"pre"},w,$d("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),f&&$d("span",{$color:"#888"},f))}function o_(w,f){var _=Vne(f.prefix,f.desc);if(w.openDialog)w.openDialog(_,f.onClose,{onKeyDown:f.onKeyDown,onKeyUp:f.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:f.value});else{var C="";typeof f.prefix!="string"&&f.prefix&&(C+=f.prefix.textContent),f.desc&&(C+=" "+f.desc),f.onClose(prompt(C,""))}}function Kne(w,f){if(w instanceof RegExp&&f instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],C=0;C<_.length;C++){var x=_[C];if(w[x]!==f[x])return!1}return!0}return!1}function bm(w,f,_,C){if(f){var x=oa(w),I=jne(f,!!_,!!C);if(I)return SN(w,I),Kne(I,x.getQuery())||x.setQuery(I),I}}function qne(w){if(w.source.charAt(0)=="^")var f=!0;return{token:function(C){if(f&&!C.sol()){C.skipToEnd();return}var x=C.match(w,!1);if(x)return x[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!w.exec(C.next()+x[0]))?(C.next(),null):(C.match(w),"searching");for(;!C.eol()&&(C.next(),!C.match(w,!1)););},query:w}}var s_=0;function SN(w,f){clearTimeout(s_),s_=setTimeout(function(){if(w.state.vim){var _=oa(w),C=_.getOverlay();(!C||f!=C.query)&&(C&&w.removeOverlay(C),C=qne(f),w.addOverlay(C),w.showMatchesOnScrollbar&&(_.getScrollbarAnnotate()&&_.getScrollbarAnnotate().clear(),_.setScrollbarAnnotate(w.showMatchesOnScrollbar(f))),_.setOverlay(C))}},50)}function wN(w,f,_,C){return C===void 0&&(C=1),w.operation(function(){for(var x=w.getCursor(),I=w.getSearchCursor(_,x),D=0;D<C;D++){var F=I.find(f);if(D==0&&F&&Qo(I.from(),x)){var B=f?I.from():I.to();F=I.find(f),F&&!F[0]&&Qo(I.from(),B)&&w.getLine(B.line).length==B.ch&&(F=I.find(f))}if(!F&&(I=w.getSearchCursor(_,f?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!I.find(f)))return}return I.from()})}function Gne(w,f,_,C,x){return C===void 0&&(C=1),w.operation(function(){var I=w.getCursor(),D=w.getSearchCursor(_,I),F=D.find(!f);!x.visualMode&&F&&Qo(D.from(),I)&&D.find(!f);for(var B=0;B<C;B++)if(F=D.find(f),!F&&(D=w.getSearchCursor(_,f?new Fe(w.lastLine()):new Fe(w.firstLine(),0)),!D.find(f)))return;return[D.from(),D.to()]})}function VS(w){var f=oa(w);w.removeOverlay(oa(w).getOverlay()),f.setOverlay(null),f.getScrollbarAnnotate()&&(f.getScrollbarAnnotate().clear(),f.setScrollbarAnnotate(null))}function $ne(w,f,_){return typeof w!="number"&&(w=w.line),f instanceof Array?Ne(w,f):typeof _=="number"?w>=f&&w<=_:w==f}function KS(w){var f=w.getScrollInfo(),_=6,C=10,x=w.coordsChar({left:0,top:_+f.top},"local"),I=f.clientHeight-C+f.top,D=w.coordsChar({left:0,top:I},"local");return{top:x.line,bottom:D.line}}function xN(w,f,_){if(_=="'"||_=="`")return $.jumpList.find(w,-1)||new Fe(0,0);if(_==".")return EN(w);var C=f.marks[_];return C&&C.find()}function EN(w){for(var f=w.doc.history.done,_=f.length;_--;)if(f[_].changes)return rn(f[_].changes[0].to)}var TN=function(){this.buildCommandMap_()};TN.prototype={processCommand:function(f,_,C){var x=this;f.operation(function(){f.curOp.isVimOp=!0,x._processCommand(f,_,C)})},_processCommand:function(f,_,C){var x=f.state.vim,I=$.registerController.getRegister(":"),D=I.toString();x.visualMode&&na(f);var F=new ot.default.StringStream(_);I.setText(_);var B=C||{};B.input=_;try{this.parseInput_(f,F,B)}catch(ve){throw Pi(f,ve.toString()),ve}var z,G;if(!B.commandName)B.line!==void 0&&(G="move");else if(z=this.matchCommand_(B.commandName),z){if(G=z.name,z.excludeFromCommandHistory&&I.setText(D),this.parseCommandArgs_(F,B,z),z.type=="exToKey"){for(var ee=0;ee<z.toKeys.length;ee++)de.handleKey(f,z.toKeys[ee],"mapping");return}else if(z.type=="exToEx"){this.processCommand(f,z.toInput);return}}if(!G){Pi(f,'Not an editor command ":'+_+'"');return}try{kN[G](f,B),(!z||!z.possiblyAsync)&&B.callback&&B.callback()}catch(ve){throw Pi(f,ve.toString()),ve}},parseInput_:function(f,_,C){_.eatWhile(":"),_.eat("%")?(C.line=f.firstLine(),C.lineEnd=f.lastLine()):(C.line=this.parseLineSpec_(f,_),C.line!==void 0&&_.eat(",")&&(C.lineEnd=this.parseLineSpec_(f,_)));var x=_.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return x?C.commandName=x[1]:C.commandName=_.match(/.*/)[0],C},parseLineSpec_:function(f,_){var C=_.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(_.next()){case".":return this.parseLineSpecOffset_(_,f.getCursor().line);case"$":return this.parseLineSpecOffset_(_,f.lastLine());case"'":var x=_.next(),I=xN(f,f.state.vim,x);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(_,I.line);case"-":case"+":return _.backUp(1),this.parseLineSpecOffset_(_,f.getCursor().line);default:_.backUp(1);return}},parseLineSpecOffset_:function(f,_){var C=f.match(/^([+-])?(\d+)/);if(C){var x=parseInt(C[2],10);C[1]=="-"?_-=x:_+=x}return _},parseCommandArgs_:function(f,_,C){if(!f.eol()){_.argString=f.match(/.*/)[0];var x=C.argDelimiter||/\s+/,I=US(_.argString).split(x);I.length&&I[0]&&(_.args=I)}},matchCommand_:function(f){for(var _=f.length;_>0;_--){var C=f.substring(0,_);if(this.commandMap_[C]){var x=this.commandMap_[C];if(x.name.indexOf(f)===0)return x}}return null},buildCommandMap_:function(){this.commandMap_={};for(var f=0;f<cJ.length;f++){var _=cJ[f],C=_.shortName||_.name;this.commandMap_[C]=_}},map:function(f,_,C){if(f!=":"&&f.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var x=f.substring(1);_!=":"&&_.charAt(0)==":"?this.commandMap_[x]={name:x,type:"exToEx",toInput:_.substring(1),user:!0}:this.commandMap_[x]={name:x,type:"exToKey",toKeys:_,user:!0}}else if(_!=":"&&_.charAt(0)==":"){var I={keys:f,type:"keyToEx",exArgs:{input:_.substring(1)}};C&&(I.context=C),Ir.unshift(I)}else{var I={keys:f,type:"keyToKey",toKeys:_};C&&(I.context=C),Ir.unshift(I)}},unmap:function(f,_){if(f!=":"&&f.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var C=f.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var x=f,I=0;I<Ir.length;I++)if(x==Ir[I].keys&&Ir[I].context===_)return Ir.splice(I,1),!0}};var kN={colorscheme:function(f,_){if(!_.args||_.args.length<1){Pi(f,f.getOption("theme"));return}f.setOption("theme",_.args[0])},map:function(f,_,C){var x=_.args;if(!x||x.length<2){f&&Pi(f,"Invalid mapping: "+_.input);return}sa.map(x[0],x[1],C)},imap:function(f,_){this.map(f,_,"insert")},nmap:function(f,_){this.map(f,_,"normal")},vmap:function(f,_){this.map(f,_,"visual")},unmap:function(f,_,C){var x=_.args;(!x||x.length<1||!sa.unmap(x[0],C))&&f&&Pi(f,"No such mapping: "+_.input)},move:function(f,_){$i.processCommand(f,f.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:_.line+1})},set:function(f,_){var C=_.args,x=_.setCfg||{};if(!C||C.length<1){f&&Pi(f,"Invalid mapping: "+_.input);return}var I=C[0].split("="),D=I[0],F=I[1],B=!1;if(D.charAt(D.length-1)=="?"){if(F)throw Error("Trailing characters: "+_.argString);D=D.substring(0,D.length-1),B=!0}F===void 0&&D.substring(0,2)=="no"&&(D=D.substring(2),F=!1);var z=he[D]&&he[D].type=="boolean";if(z&&F==null&&(F=!0),!z&&F===void 0||B){var G=rt(D,f,x);G instanceof Error?Pi(f,G.message):G===!0||G===!1?Pi(f," "+(G?"":"no")+D):Pi(f," "+D+"="+G)}else{var ee=st(D,F,f,x);ee instanceof Error&&Pi(f,ee.message)}},setlocal:function(f,_){_.setCfg={scope:"local"},this.set(f,_)},setglobal:function(f,_){_.setCfg={scope:"global"},this.set(f,_)},registers:function(f,_){var C=_.args,x=$.registerController.registers,I=`----------Registers----------
|
|
|
|
`;if(C){var D;C=C.join("");for(var B=0;B<C.length;B++)if(D=C.charAt(B),!!$.registerController.isValidRegister(D)){var z=x[D]||new Qt;I+='"'+D+" "+z.toString()+`
|
|
`}}else for(var D in x){var F=x[D].toString();F.length&&(I+='"'+D+" "+F+`
|
|
`)}Pi(f,I)},sort:function(f,_){var C,x,I,D,F;function B(){if(_.argString){var Ci=new ot.default.StringStream(_.argString);if(Ci.eat("!")&&(C=!0),Ci.eol())return;if(!Ci.eatSpace())return"Invalid arguments";var Jt=Ci.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Jt&&!Ci.eol())return"Invalid arguments";if(Jt[1]){x=Jt[1].indexOf("i")!=-1,I=Jt[1].indexOf("u")!=-1;var pr=Jt[1].indexOf("d")!=-1||Jt[1].indexOf("n")!=-1&&1,oo=Jt[1].indexOf("x")!=-1&&1,Kr=Jt[1].indexOf("o")!=-1&&1;if(pr+oo+Kr>1)return"Invalid arguments";D=pr&&"decimal"||oo&&"hex"||Kr&&"octal"}Jt[2]&&(F=new RegExp(Jt[2].substr(1,Jt[2].length-2),x?"i":""))}}var z=B();if(z){Pi(f,z+": "+_.argString);return}var G=_.line||f.firstLine(),ee=_.lineEnd||_.line||f.lastLine();if(G==ee)return;var ve=new Fe(G,0),pe=new Fe(ee,Bn(f,ee)),ue=f.getRange(ve,pe).split(`
|
|
`),Ve=F||(D=="decimal"?/(-?)([\d]+)/:D=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:D=="octal"?/([0-7]+)/:null),Ge=D=="decimal"?10:D=="hex"?16:D=="octal"?8:null,Ue=[],It=[];if(D||F)for(var yt=0;yt<ue.length;yt++){var Ct=F?ue[yt].match(F):null;Ct&&Ct[0]!=""?Ue.push(Ct):!F&&Ve.exec(ue[yt])?Ue.push(ue[yt]):It.push(ue[yt])}else It=ue;function Fi(Ci,Jt){if(C){var pr;pr=Ci,Ci=Jt,Jt=pr}x&&(Ci=Ci.toLowerCase(),Jt=Jt.toLowerCase());var oo=D&&Ve.exec(Ci),Kr=D&&Ve.exec(Jt);return oo?(oo=parseInt((oo[1]+oo[2]).toLowerCase(),Ge),Kr=parseInt((Kr[1]+Kr[2]).toLowerCase(),Ge),oo-Kr):Ci<Jt?-1:1}function ro(Ci,Jt){if(C){var pr;pr=Ci,Ci=Jt,Jt=pr}return x&&(Ci[0]=Ci[0].toLowerCase(),Jt[0]=Jt[0].toLowerCase()),Ci[0]<Jt[0]?-1:1}if(Ue.sort(F?ro:Fi),F)for(var yt=0;yt<Ue.length;yt++)Ue[yt]=Ue[yt].input;else D||It.sort(Fi);if(ue=C?Ue.concat(It):It.concat(Ue),I){var hn=ue,Vr;ue=[];for(var yt=0;yt<hn.length;yt++)hn[yt]!=Vr&&ue.push(hn[yt]),Vr=hn[yt]}f.replaceRange(ue.join(`
|
|
`),ve,pe)},vglobal:function(f,_){this.global(f,_)},global:function(f,_){var C=_.argString;if(!C){Pi(f,"Regular Expression missing from global");return}var x=_.commandName[0]==="v",I=_.line!==void 0?_.line:f.firstLine(),D=_.lineEnd||_.line||f.lastLine(),F=Hne(C),B=C,z;if(F.length&&(B=F[0],z=F.slice(1,F.length).join("/")),B)try{bm(f,B,!0,!0)}catch(Ue){Pi(f,"Invalid regex: "+B);return}for(var G=oa(f).getQuery(),ee=[],ve=I;ve<=D;ve++){var pe=f.getLineHandle(ve),ue=G.test(pe.text);ue!==x&&ee.push(z?pe:pe.text)}if(!z){Pi(f,ee.join(`
|
|
`));return}var Ve=0,Ge=function Ue(){if(Ve<ee.length){var It=ee[Ve++],yt=f.getLineNumber(It);if(yt==null){Ue();return}var Ct=yt+1+z;sa.processCommand(f,Ct,{callback:Ue})}};Ge()},substitute:function(f,_){if(!f.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=_.argString,x=C?_N(C,C[0]):[],I,D="",F,B,z,G=!1,ee=!1;if(x.length)I=x[0],rt("pcre")&&I!==""&&(I=new RegExp(I).source),D=x[1],D!==void 0&&(rt("pcre")?D=Wne(D.replace(/([^\\])&/g,"$1$$&")):D=Une(D),$.lastSubstituteReplacePart=D),F=x[2]?x[2].split(" "):[];else if(C&&C.length){Pi(f,"Substitutions should be of the form :s/pattern/replace/");return}if(F&&(B=F[0],z=parseInt(F[1]),B&&(B.indexOf("c")!=-1&&(G=!0),B.indexOf("g")!=-1&&(ee=!0),rt("pcre")?I=I+"/"+B:I=I.replace(/\//g,"\\/")+"/"+B)),I)try{bm(f,I,!0,!0)}catch(It){Pi(f,"Invalid regex: "+I);return}if(D=D||$.lastSubstituteReplacePart,D===void 0){Pi(f,"No previous substitute regular expression");return}var ve=oa(f),pe=ve.getQuery(),ue=_.line!==void 0?_.line:f.getCursor().line,Ve=_.lineEnd||ue;ue==f.firstLine()&&Ve==f.lastLine()&&(Ve=1/0),z&&(ue=Ve,Ve=ue+z-1);var Ge=fr(f,new Fe(ue,0)),Ue=f.getSearchCursor(pe,Ge);f.pushUndoStop(),Yne(f,G,ee,ue,Ve,Ue,pe,D,_.callback)},redo:ot.default.commands.redo,undo:ot.default.commands.undo,write:function(f){ot.default.commands.save?ot.default.commands.save(f):f.save&&f.save()},nohlsearch:function(f){VS(f)},yank:function(f){var _=rn(f.getCursor()),C=_.line,x=f.getLine(C);$.registerController.pushText("0","yank",x,!0,!0)},delmarks:function(f,_){if(!_.argString||!US(_.argString)){Pi(f,"Argument required");return}for(var C=f.state.vim,x=new ot.default.StringStream(US(_.argString));!x.eol();){x.eatSpace();var I=x.pos;if(!x.match(/[a-zA-Z]/,!1)){Pi(f,"Invalid argument: "+_.argString.substring(I));return}var D=x.next();if(x.match("-",!0)){if(!x.match(/[a-zA-Z]/,!1)){Pi(f,"Invalid argument: "+_.argString.substring(I));return}var F=D,B=x.next();if(A(F)&&A(B)||W(F)&&W(B)){var z=F.charCodeAt(0),G=B.charCodeAt(0);if(z>=G){Pi(f,"Invalid argument: "+_.argString.substring(I));return}for(var ee=0;ee<=G-z;ee++){var ve=String.fromCharCode(z+ee);delete C.marks[ve]}}else{Pi(f,"Invalid argument: "+F+"-");return}}else delete C.marks[D]}}},sa=new TN;function Yne(w,f,_,C,x,I,D,F,B){w.state.vim.exMode=!0;var z=!1,G,ee,ve;function pe(){w.operation(function(){for(;!z;)ue(),Ge();Ue()})}function ue(){var yt=w.getRange(I.from(),I.to()),Ct=yt.replace(D,F),Fi=I.to().line;I.replace(Ct),ee=I.to().line,x+=ee-Fi,ve=ee<Fi}function Ve(){var yt=G&&rn(I.to()),Ct=I.findNext();return Ct&&!Ct[0]&&yt&&Qo(I.from(),yt)&&(Ct=I.findNext()),Ct}function Ge(){for(;Ve()&&$ne(I.from(),C,x);)if(!(!_&&I.from().line==ee&&!ve)){w.scrollIntoView(I.from(),30),w.setSelection(I.from(),I.to()),G=I.from(),z=!1;return}z=!0}function Ue(yt){if(yt&&yt(),w.focus(),G){w.setCursor(G);var Ct=w.state.vim;Ct.exMode=!1,Ct.lastHPos=Ct.lastHSPos=G.ch}B&&B()}function It(yt,Ct,Fi){ot.default.e_stop(yt);var ro=ot.default.keyName(yt);switch(ro){case"Y":ue(),Ge();break;case"N":Ge();break;case"A":var hn=B;B=void 0,w.operation(pe),B=hn;break;case"L":ue();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":Ue(Fi);break}return z&&Ue(Fi),!0}if(Ge(),z){Pi(w,"No matches for "+D.source);return}if(!f){pe(),B&&B();return}o_(w,{prefix:$d("span","replace with ",$d("strong",F)," (y/n/a/q/l)"),onKeyDown:It})}ot.default.keyMap.vim={attach:r,detach:n,call:o};function ym(w){var f=w.state.vim,_=$.macroModeState,C=$.registerController.getRegister("."),x=_.isPlaying,I=_.lastInsertModeChanges;x||(w.off("change",AN),ot.default.off(w.getInputField(),"keydown",MN)),!x&&f.insertModeRepeat>1&&(DN(w,f,f.insertModeRepeat-1,!0),f.lastEditInputState.repeatOverride=f.insertModeRepeat),delete f.insertModeRepeat,f.insertMode=!1,w.setCursor(w.getCursor().line,w.getCursor().ch-1),w.setOption("keyMap","vim"),w.setOption("disableInput",!0),w.toggleOverwrite(!1),C.setText(I.changes.join("")),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),_.isRecording&&Zne(_),w.enterVimMode()}function IN(w){Ir.unshift(w)}function Xne(w,f,_,C,x){var I={keys:w,type:f};I[f]=_,I[f+"Args"]=C;for(var D in x)I[D]=x[D];IN(I)}Xe("insertModeEscKeysTimeout",200,"number"),ot.default.keyMap["vim-insert"]={fallthrough:["default"],attach:r,detach:n,call:o},ot.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:r,detach:n,call:o};function Qne(w,f,_,C){var x=$.registerController.getRegister(C);if(C==":"){x.keyBuffer[0]&&sa.processCommand(w,x.keyBuffer[0]),_.isPlaying=!1;return}var I=x.keyBuffer,D=0;_.isPlaying=!0,_.replaySearchQueries=x.searchQueries.slice(0);for(var F=0;F<I.length;F++)for(var B=I[F],z,G;B;)if(z=/<\w+-.+?>|<\w+>|./.exec(B),G=z[0],B=B.substring(z.index+G.length),de.handleKey(w,G,"macro"),f.insertMode){var ee=x.insertModeChanges[D++].changes;$.macroModeState.lastInsertModeChanges.changes=ee,NN(w,ee,1),ym(w)}_.isPlaying=!1}function Jne(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushText(f)}}function Zne(w){if(!w.isPlaying){var f=w.latestRegister,_=$.registerController.getRegister(f);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(w.lastInsertModeChanges)}}function ere(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushSearchQuery&&C.pushSearchQuery(f)}}function AN(w,f){var _=$.macroModeState,C=_.lastInsertModeChanges;if(!_.isPlaying)for(;f;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(f.origin=="+input"||f.origin=="paste"||f.origin===void 0){var x=w.listSelections().length;x>1&&(C.ignoreCount=x);var I=f.text.join(`
|
|
`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(w.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}f=f.next}}function LN(w){var f=w.state.vim;if(f.insertMode){var _=$.macroModeState;if(_.isPlaying)return;var C=_.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else w.curOp.isVimOp||tre(w,f)}function tre(w,f){var _=w.getCursor("anchor"),C=w.getCursor("head");if(f.visualMode&&!w.somethingSelected()?na(w,!1):!f.visualMode&&!f.insertMode&&w.somethingSelected()&&(f.visualMode=!0,f.visualLine=!1,ot.default.signal(w,"vim-mode-change",{mode:"visual"})),f.visualMode){var x=An(C,_)?0:-1,I=An(C,_)?-1:0;C=Hn(C,0,x),_=Hn(_,0,I),f.sel={anchor:_,head:C},pl(w,f,"<",Jo(C,_)),pl(w,f,">",Gd(C,_))}else f.insertMode||(f.lastHPos=w.getCursor().ch)}function qS(w){this.keyName=w}function MN(w){var f=$.macroModeState,_=f.lastInsertModeChanges,C=ot.default.keyName(w);if(!C)return;function x(){return _.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new qS(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ot.default.lookupKey(C,"vim-insert",x)}function DN(w,f,_,C){var x=$.macroModeState;x.isPlaying=!0;var I=!!f.lastEditActionCommand,D=f.inputState;function F(){I?$i.processAction(w,f,f.lastEditActionCommand):$i.evalInput(w,f)}function B(G){if(x.lastInsertModeChanges.changes.length>0){G=f.lastEditActionCommand?G:1;var ee=x.lastInsertModeChanges;NN(w,ee.changes,G)}}if(f.inputState=f.lastEditInputState,I&&f.lastEditActionCommand.interlaceInsertRepeat)for(var z=0;z<_;z++)F(),B(1);else C||F(),B(_);f.inputState=D,f.insertMode&&!C&&ym(w),x.isPlaying=!1}function NN(w,f,_){function C(ee){return typeof ee=="string"?ot.default.commands[ee](w):ee(w),!0}var x=w.getCursor("head"),I=$.macroModeState.lastInsertModeChanges.visualBlock;I&&(dN(w,x,I+1),_=w.listSelections().length,w.setCursor(x));for(var D=0;D<_;D++){I&&w.setCursor(Hn(x,D,0));for(var F=0;F<f.length;F++){var B=f[F];if(B instanceof qS)ot.default.lookupKey(B.keyName,"vim-insert",C);else if(typeof B=="string")window.cm=w,w.replaceSelections(B);else{var z=w.getCursor(),G=Hn(z,0,B[0].length);w.replaceRange(B[0],z,G),w.setCursor(G)}}}I&&w.setCursor(Hn(x,0,1))}return Q(),de};tm.Vim=dJ;ot.default.Vim=dJ();var E_e=ot.default;tm.default=E_e});var fJ=gt(P9=>{"use strict";Object.defineProperty(P9,"__esModule",{value:!0});P9.default=void 0;function T_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function hJ(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function k_e(i,e,t){return e&&hJ(i.prototype,e),t&&hJ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var I_e=function(){function i(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;T_e(this,i),this.closeInput=function(){n.removeInputListeners(),n.input=null,n.setSec(""),n.editor&&n.editor.focus()},this.clear=function(){n.setInnerHtml_(n.node,"")},this.inputKeyUp=function(o){var s=n.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputKeyInput=function(o){var s=n.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputBlur=function(){var o=n.input.options;o.closeOnBlur&&n.closeInput()},this.inputKeyDown=function(o){var s=n.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,n.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(n.input.node.blur(),o.stopPropagation(),n.closeInput()),o.keyCode===13&&l&&(o.stopPropagation(),o.preventDefault(),l(o.target.value)))},this.node=e,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=t,this.sanitizer=r}return k_e(i,[{key:"setMode",value:function(t){if(t.mode==="visual"){t.subMode==="linewise"?this.setText("--VISUAL LINE--"):t.subMode==="blockwise"?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--");return}this.setText("--".concat(t.mode.toUpperCase(),"--"))}},{key:"setKeyBuffer",value:function(t){this.keyInfoNode.textContent=t}},{key:"setSec",value:function(t,n,r){if(this.notifNode.textContent="",t===void 0)return this.closeInput;this.setInnerHtml_(this.secInfoNode,t);var o=this.secInfoNode.querySelector("input");return o&&(o.focus(),this.input={callback:n,options:r,node:o},r&&(r.selectValueOnOpen&&o.select(),r.value&&(o.value=r.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(t){this.modeInfoNode.textContent=t}},{key:"toggleVisibility",value:function(t){t?this.node.style.display="block":this.node.style.display="none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var t=this.input.node;t.addEventListener("keyup",this.inputKeyUp),t.addEventListener("keydown",this.inputKeyDown),t.addEventListener("input",this.inputKeyInput),t.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(!(!this.input||!this.input.node)){var t=this.input.node;t.removeEventListener("keyup",this.inputKeyUp),t.removeEventListener("keydown",this.inputKeyDown),t.removeEventListener("input",this.inputKeyInput),t.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(t){var n=this,r=document.createElement("span");this.setInnerHtml_(r,t),this.notifNode.textContent=r.textContent,this.notifTimeout=setTimeout(function(){n.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,n){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);n&&(this.sanitizer?t.appendChild(this.sanitizer(n)):t.appendChild(n))}}]),i}();P9.default=I_e});var vJ=gt(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});Object.defineProperty(Lv,"StatusBar",{enumerable:!0,get:function(){return mJ.default}});Object.defineProperty(Lv,"VimMode",{enumerable:!0,get:function(){return pJ.default}});Lv.initVimMode=A_e;var pJ=gJ(uJ()),mJ=gJ(fJ());function gJ(i){return i&&i.__esModule?i:{default:i}}function A_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mJ.default,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=new pJ.default(i);if(!e)return r.attach(),r;var o=new t(e,i,n),s="";return r.on("vim-mode-change",function(a){o.setMode(a)}),r.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),r.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),r.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),r.setStatusBar(o),r.attach(),r}});var _J=M(()=>{We();J({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VYBXOYTR.js")})});var bJ=M(()=>{We();J({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-TX7MH4KD.js")})});var yJ=M(()=>{We();J({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-4VJUQQIN.js")})});var CJ=M(()=>{We();J({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-GGHBGELM.js")})});var SJ=M(()=>{We();J({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-VJO6NXPN.js")})});var wJ=M(()=>{We();J({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-UR3AUYFW.js")})});var xJ=M(()=>{We();J({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-HKNOPZTO.js")})});var EJ=M(()=>{We();J({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-D22KHGF2.js")})});var TJ=M(()=>{We();J({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-4OJPINLR.js")});J({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-4OJPINLR.js")})});var kJ=M(()=>{We();J({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-CO24EJBG.js")})});var IJ=M(()=>{We();J({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-IIWFJS55.js")})});var AJ=M(()=>{We();J({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-MRKLWMJ6.js")})});var LJ=M(()=>{We();J({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-54INGSZP.js")})});var MJ=M(()=>{We();J({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-NCOHKGIC.js")})});var DJ=M(()=>{We();J({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-GEURGHNI.js")})});var NJ=M(()=>{We();J({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-4XUTEIEV.js")})});var RJ=M(()=>{We();J({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationDollar)});J({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationBracket)});J({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationBracket)});J({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationBracket)})});var OJ=M(()=>{We();J({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-7PU7V5QM.js")})});var PJ=M(()=>{We();J({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-3VYTYJI7.js")})});var FJ=M(()=>{We();J({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-I7OT4MKQ.js")})});var HJ=M(()=>{We();J({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-3IH2WNWU.js")})});var BJ=M(()=>{We();J({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-SAC6XGQK.js")})});var zJ=M(()=>{We();J({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-762AWQ7Q.js")})});var UJ=M(()=>{We();J({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-KMBRGMB6.js")})});var WJ=M(()=>{We();J({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-Y26LRM5H.js")})});var jJ=M(()=>{We();J({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-BQYAE3BL.js")})});var VJ=M(()=>{We();J({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VICO4FWU.js")})});var KJ=M(()=>{We();J({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-6ATHF4JU.js")})});var qJ=M(()=>{We();J({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-UKLXN46U.js")})});var GJ=M(()=>{We();J({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-DNAEBIGJ.js")})});var $J=M(()=>{We();J({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-IPQV376U.js")})});var YJ=M(()=>{We();J({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-HKSHOV4H.js")})});var XJ=M(()=>{We();J({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-XLCHJKYF.js")})});var QJ=M(()=>{We();J({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-I4JUFUGM.js")})});var JJ=M(()=>{We();J({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-E5LHFI46.js")})});var ZJ=M(()=>{We();J({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-LPFC4UYC.js")})});var eZ=M(()=>{We();J({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-G7VYOET6.js")})});var tZ=M(()=>{We();J({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-N5O4YY4C.js")})});var iZ=M(()=>{We();J({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-WZLUZOLP.js")})});var nZ=M(()=>{We();J({id:"pla",extensions:[".pla"],loader:()=>import("./pla-H5HBSQU6.js")})});var rZ=M(()=>{We();J({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-DW5JOKUY.js")})});var oZ=M(()=>{We();J({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-U2SJQ4GY.js")})});var sZ=M(()=>{We();J({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-2I7YAJDI.js")})});var aZ=M(()=>{We();J({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-VHYMBWLK.js")})});var lZ=M(()=>{We();J({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-4DWSGGAY.js")})});var cZ=M(()=>{We();J({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-WBHPPKA6.js")})});var dZ=M(()=>{We();J({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-ZSWEFMQ3.js")})});var uZ=M(()=>{We();J({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-VB2OINAG.js")})});var hZ=M(()=>{We();J({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-NKQUIAEM.js")})});var fZ=M(()=>{We();J({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-ZN6WMKI6.js")})});var pZ=M(()=>{We();J({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-XCPPMXUQ.js")})});var mZ=M(()=>{We();J({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-ER4MI2XR.js")})});var gZ=M(()=>{We();J({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-CSSRCZFH.js")})});var vZ=M(()=>{We();J({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-5BMB6PXP.js")})});var _Z=M(()=>{We();J({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-CO5DRU6K.js")})});var bZ=M(()=>{We();J({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>import("./scala-2A54SA4F.js")})});var yZ=M(()=>{We();J({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-E7EIA2LY.js")})});var CZ=M(()=>{We();J({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-I2L7ETRM.js")})});var SZ=M(()=>{We();J({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-HJPXH727.js")})});var wZ=M(()=>{We();J({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-HQYKJ4L6.js")})});var xZ=M(()=>{We();J({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-XI5N2KCD.js")})});var EZ=M(()=>{We();J({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-2SIMXPG5.js")})});var TZ=M(()=>{We();J({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-FYPD7SP3.js")})});var kZ=M(()=>{We();J({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-J3SBMK25.js")})});var IZ=M(()=>{We();J({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-LCVLURC4.js")});J({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-LCVLURC4.js")})});var AZ=M(()=>{We();J({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-MVCXVVYJ.js")})});var LZ=M(()=>{We();J({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-7LCZB2JP.js")})});var MZ=M(()=>{We();J({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-ZY5TS6P4.js")})});var DZ=M(()=>{We();J({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-LTQDQXEO.js")})});var NZ=M(()=>{We();J({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-FJRYFANV.js")})});var RZ=M(()=>{We();J({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-GBPQMMHS.js")})});var OZ=M(()=>{Os();_J();bJ();yJ();CJ();SJ();wJ();xJ();EJ();TJ();kJ();IJ();kL();AJ();LJ();LL();MJ();wL();DJ();NJ();RJ();OJ();PJ();FJ();HJ();IL();BJ();zJ();EL();UJ();WJ();jJ();VJ();KJ();qJ();GJ();xL();$J();YJ();XJ();QJ();JJ();ZJ();eZ();tZ();iZ();nZ();rZ();oZ();sZ();aZ();lZ();cZ();dZ();uZ();hZ();fZ();pZ();mZ();gZ();vZ();_Z();bZ();yZ();CZ();SZ();wZ();xZ();EZ();TL();TZ();kZ();IZ();AZ();LZ();MZ();DZ();NZ();AL();RZ();});function JL(){return import("./cssMode-OAEHF6O6.js")}var L_e,M_e,D_e,N_e,PZ,R_e,im,YL,XL,QL,FZ,HZ,BZ,zZ=M(()=>{Os();Os();L_e=Object.defineProperty,M_e=Object.getOwnPropertyDescriptor,D_e=Object.getOwnPropertyNames,N_e=Object.prototype.hasOwnProperty,PZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D_e(e))!N_e.call(i,r)&&r!==t&&L_e(i,r,{get:()=>e[r],enumerable:!(n=M_e(e,r))||n.enumerable});return i},R_e=(i,e,t)=>(PZ(i,e,"default"),t&&PZ(t,e,"default")),im={};R_e(im,Rs);YL=class{constructor(i,e,t){Cn(this,"_onDidChange",new im.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(i){this.setOptions(i)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},XL={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},QL={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},FZ=new YL("css",XL,QL),HZ=new YL("scss",XL,QL),BZ=new YL("less",XL,QL);im.languages.css={cssDefaults:FZ,lessDefaults:BZ,scssDefaults:HZ};im.languages.onLanguage("less",()=>{JL().then(i=>i.setupMode(BZ))});im.languages.onLanguage("scss",()=>{JL().then(i=>i.setupMode(HZ))});im.languages.onLanguage("css",()=>{JL().then(i=>i.setupMode(FZ))})});function B9(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===Mv,documentFormattingEdits:i===Mv,documentRangeFormattingEdits:i===Mv}}function K_e(){return import("./htmlMode-BWGWQOXA.js")}function z9(i,e=H9,t=B9(i)){let n=new z_e(i,e,t),r,o=F9.languages.onLanguage(i,async()=>{r=(await K_e()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}var O_e,P_e,F_e,H_e,UZ,B_e,F9,z_e,U_e,H9,Mv,WZ,jZ,VZ,W_e,KZ,j_e,qZ,V_e,GZ=M(()=>{Os();Os();O_e=Object.defineProperty,P_e=Object.getOwnPropertyDescriptor,F_e=Object.getOwnPropertyNames,H_e=Object.prototype.hasOwnProperty,UZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of F_e(e))!H_e.call(i,r)&&r!==t&&O_e(i,r,{get:()=>e[r],enumerable:!(n=P_e(e,r))||n.enumerable});return i},B_e=(i,e,t)=>(UZ(i,e,"default"),t&&UZ(t,e,"default")),F9={};B_e(F9,Rs);z_e=class{constructor(i,e,t){Cn(this,"_onDidChange",new F9.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},U_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},H9={format:U_e,suggest:{},data:{useDefaultDataProvider:!0}};Mv="html",WZ="handlebars",jZ="razor",VZ=z9(Mv,H9,B9(Mv)),W_e=VZ.defaults,KZ=z9(WZ,H9,B9(WZ)),j_e=KZ.defaults,qZ=z9(jZ,H9,B9(jZ)),V_e=qZ.defaults;F9.languages.html={htmlDefaults:W_e,razorDefaults:V_e,handlebarDefaults:j_e,htmlLanguageService:VZ,handlebarLanguageService:KZ,razorLanguageService:qZ,registerHTMLLanguageService:z9}});function ZL(i,e,t){return $Z(this,void 0,void 0,function*(){let n=i.ordered(e),r=new Map,o=new nm,s=n.map((a,l)=>$Z(this,void 0,void 0,function*(){r.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Ut(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:r.get(a.provider)<r.get(l.provider)?-1:r.get(a.provider)>r.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o})}var $Z,nm,eM=M(()=>{gi();At();Ce();Mi();Sn();is();zi();xt();$Z=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},nm=class{constructor(){this.lenses=[],this._disposables=new ne}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};St.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;Lt(ht.isUri(t)),Lt(typeof n=="number"||!n);let{codeLensProvider:r}=i.get(be),o=i.get(Si).getModel(t);if(!o)throw Ao();let s=[],a=new ne;return ZL(r,o,et.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)n==null||d.symbol.command?s.push(d.symbol):n-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,et.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var q_e,G_e,iM,U9,tM,YZ=M(()=>{Dt();WN();tf();qe();eM();bl();Et();cu();q_e=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},G_e=function(i,e){return function(t,n){e(t,n,i)}},iM=rr("ICodeLensCache"),U9=class{constructor(e,t){this.lineCount=e,this.data=t}},tM=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new fa(20,.75);let t="codelens/cache";sO(()=>e.remove(t,1));let n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r),c_(e.onWillSaveState)(o=>{o.reason===lb.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new nm;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);let o=new U9(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){let t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let o of n.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let r=t[n],o=[];for(let a of r.lines)o.push({range:new P(a,1,a,11)});let s=new nm;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new U9(r.lineCount,s))}}catch(t){}}};tM=q_e([G_e(0,Yr)],tM);sr(iM,tM,1)});var XZ=M(()=>{});var QZ=M(()=>{XZ()});var nM,W9,rm,JZ,Dv,ZZ=M(()=>{Ht();Nre();QZ();qe();qn();nM=class{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}},W9=class i{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(s&&(r=!0,s.command)){let a=cP(s.command.title.trim());s.command.id?(n.push(fe("a",{id:String(o),title:s.command.tooltip,role:"button"},...a)),this._commands.set(String(o),s.command)):n.push(fe("span",{title:s.command.tooltip},...a)),o+1<e.length&&n.push(fe("span",void 0,"\xA0|\xA0"))}}r?(Zd(this._domNode,...n),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):Zd(this._domNode,fe("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){let t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}};W9._idPool=0;rm=class{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let n=0,r=t.length;n<r;n++)this._addDecorationsCallbacks[n](t[n])}},JZ=ct.register({collapseOnReplaceEdit:!0,description:"codelens"}),Dv=class{constructor(e,t,n,r,o,s){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a,l=[];this._data.forEach((c,d)=>{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:JZ},u=>this._decorationIds[d]=u),a?a=P.plusRange(a,c.symbol.range):a=P.lift(c.symbol.range)}),this._viewZone=new nM(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new W9(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&P.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:JZ},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){let n=e.getDecorationRange(this._decorationIds[t]);n&&(this._data[t].symbol.range=n)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){let n=e[t];if(n){let{symbol:r}=this._data[t];r.command=n.command||r.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){let e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){let t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}});var $_e,Nv,Y_e,om,eee=M(()=>{Dt();At();Ce();cb();Ze();Xm();jt();eM();YZ();ZZ();De();zi();Oo();Ll();Ns();xt();$_e=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},Nv=function(i,e){return function(t,n){e(t,n,i)}},Y_e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},om=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new ne,this._localToDispose=new ne,this._lenses=[],this._oldCodeLensModels=new ne,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ti(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(48)||a.hasChanged(17)||a.hasChanged(16))&&this._updateLensStyle(),a.hasChanged(15)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50)),t=this._editor.getOption(17);return(!t||t<5)&&(t=this._editor.getOption(50)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(16),r=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Y_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(wl(()=>{let r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let o=r.onDidChange(()=>n.schedule());this._localToDispose.add(o)}let n=new ti(()=>{var r;let o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=Vt(s=>ZL(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);let a=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},at)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{let a=[],l=-1;this._lenses.forEach(d=>{!d.isValid()||l===d.getLineNumber()?a.push(d):(d.update(s),l=d.getLineNumber())});let c=new rm;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ft(()=>{if(this._editor.getModel()){let r=Ea.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(let s of this._lenses){let a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new rm;for(let r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}if(!n.length&&!this._lenses.length)return;let o=Ea.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new rm,d=0,u=0;for(;u<n.length&&d<this._lenses.length;){let h=n[u][0].symbol.range.startLineNumber,p=this._lenses[d].getLineNumber();p<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):p===h?(this._lenses[d].updateCodeLensSymbols(n[u],c),u++,d++):(this._lenses.splice(d,0,new Dv(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<n.length;)this._lenses.push(new Dv(n[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;let t=this._editor.getModel();if(!t)return;let n=[],r=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(n.push(l),r.push(a))}),n.length===0)return;let o=Date.now(),s=Vt(a=>{let l=n.map((c,d)=>{let u=new Array(c.length),h=c.map((p,m)=>!p.symbol.command&&typeof p.provider.resolveCodeLens=="function"?Promise.resolve(p.provider.resolveCodeLens(t,p.symbol,a)).then(g=>{u[m]=g},Ut):(u[m]=p.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[d].isDisposed()&&r[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{let a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{at(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};om.ID="css.editor.codeLens";om=$_e([Nv(1,be),Nv(2,an),Nv(3,ui),Nv(4,Ei),Nv(5,iM)],om);Ae(om.ID,om,1);X(class extends se{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:O.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return Y_e(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(lr),r=e.get(ui),o=e.get(Ei),s=t.getSelection().positionLineNumber,a=t.getContribution(om.ID);if(!a)return;let l=a.getModel();if(!l)return;let c=[];for(let u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===s&&c.push({label:u.symbol.command.title,command:u.symbol.command});if(c.length===0)return;let d=yield n.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var X_e,rM,Q_e,Dh,oM,sM=M(()=>{ma();loe();is();Kn();Ce();xt();Eb();X_e=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},rM=function(i,e){return function(t,n){e(t,n,i)}},Q_e=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Dh=class{constructor(e,t){this._editorWorkerClient=new uF(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return Q_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){let r=t.range,o=t.color,s=o.alpha,a=new dt(new As(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?dt.Format.CSS.formatRGB(a):dt.Format.CSS.formatRGBA(a),c=s?dt.Format.CSS.formatHSL(a):dt.Format.CSS.formatHSLA(a),d=s?dt.Format.CSS.formatHex(a):dt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:r,text:l}}),u.push({label:c,textEdit:{range:r,text:c}}),u.push({label:d,textEdit:{range:r,text:d}}),u}},oM=class extends oe{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new Dh(e,t)))}};oM=X_e([rM(0,Si),rM(1,Tt),rM(2,be)],oM);Yc(oM)});function j9(i,e,t,n=!0){return Rv(this,void 0,void 0,function*(){return uM(new aM,i,e,t,n)})}function dM(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}function uM(i,e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let d=l[c];if(d instanceof Dh)s=d;else try{(yield i.compute(d,t,n,a))&&(o=!0)}catch(u){Ut(u)}}return o?a:s&&r?(yield i.compute(s,t,n,a),a):[]})}function tee(i,e){let{colorProvider:t}=i.get(be),n=i.get(Si).getModel(e);if(!n)throw Ao();let r=i.get(Mt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}var Rv,aM,lM,cM,hM=M(()=>{gi();At();Sn();qe();is();zi();xt();sM();jn();Rv=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};aM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}},lM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},cM=class{constructor(e){this.colorInfo=e}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,et.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}};St.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof ht))throw Ao();let{model:n,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=tee(i,t);return uM(new lM,r,n,et.None,o)});St.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:r,range:o}=n;if(!(r instanceof ht)||!Array.isArray(t)||t.length!==4||!P.isIRange(o))throw Ao();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=tee(i,r),[c,d,u,h]=t;return uM(new cM({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,et.None,l)})});var J_e,fM,iee,mM,wc,pM,gM=M(()=>{Dt();ma();At();qt();Ce();ml();wi();KP();Ze();qe();qn();Ns();xt();hM();jn();J_e=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},fM=function(i,e){return function(t,n){e(t,n,i)}},iee=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},mM=Object.create({}),wc=class nee extends oe{constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new ne),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Cb(this._editor),this._decoratorLimitReporter=new pM,this._colorDecorationClassRefs=this._register(new ne),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:nee.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(19),l=o.hasChanged(142);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new as,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return iee(this,void 0,void 0,function*(){this._computePromise=Vt(e=>iee(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let n=new Ln(!1),r=yield j9(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),r}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){at(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:ct.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(19);for(let o=0;o<e.length&&t.length<n;o++){let{red:s,green:a,blue:l,alpha:c}=e[o].colorInfo.color,d=new As(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),u=`rgba(${d.r}, ${d.g}, ${d.b}, ${d.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:u}));t.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:y_,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:mM}}})}let r=n<e.length?n:!1;this._decoratorLimitReporter.update(e.length,r),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){let t=this._editor.getModel();if(!t)return null;let n=t.getDecorationsInRange(P.fromPositions(e,e)).filter(r=>this._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};wc.ID="editor.contrib.colorDetector";wc.RECOMPUTE_TIME=1e3;wc=J_e([fM(1,Mt),fM(2,be),fM(3,an)],wc);pM=class{constructor(){this._onDidChange=new $e,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ae(wc.ID,wc,1)});var V9,ree=M(()=>{qt();V9=class{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new $e,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new $e,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let r=0;r<this.colorPresentations.length;r++)if(t.toLowerCase()===this.colorPresentations[r].label){n=r;break}if(n===-1){let r=t.split("(")[0].toLowerCase();for(let o=0;o<this.colorPresentations.length;o++)if(this.colorPresentations[o].label.toLowerCase().startsWith(r)){n=o;break}}n!==-1&&n!==this.presentationIndex&&(this.presentationIndex=n,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}});var oee=M(()=>{});var K9=M(()=>{oee()});var Io,vM,_M,bM,yM,q9,CM,SM,wM,G9,see=M(()=>{JS();Ht();Fre();Zm();or();ma();qt();Ce();qr();K9();De();_r();Al();Io=fe,vM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=Io(".colorpicker-header"),me(e,this._domNode),this._pickedColorNode=me(this._domNode,Io(".picked-color"));let o=v("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=me(this._domNode,Io(".original-color")),this._originalColorNode.style.backgroundColor=dt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(Cw)||dt.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(Cw)||dt.white})),this._register(Rt(this._pickedColorNode,on.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Rt(this._originalColorNode,on.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new _M(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this._pickedColorNode.prepend(Io(".codicon.codicon-color-mode"))}},_M=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Io(".button"+mt.asCSSSelector(Ti("color-picker-close",lt.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},bM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Io(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new yM(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new CM(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new SM(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new wM(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new dt(new Pm(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new dt(new Pm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new dt(new Pm(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}},yM=class extends oe{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Io(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Io(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(Rt(this._domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new Aw);let t=wn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);let n=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new dt(new Pm(e.h,1,1,1)),n=this._canvas.getContext("2d"),r=n.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");let o=n.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=dt.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}},q9=class extends oe{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Io(".standalone-strip")),this.overlay=me(this.domNode,Io(".standalone-overlay"))):(this.domNode=me(e,Io(".strip")),this.overlay=me(this.domNode,Io(".overlay"))),this.slider=me(this.domNode,Io(".slider")),this.slider.style.top="0px",this._register(Rt(this.domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new Aw),n=wn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);let r=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}},CM=class extends q9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){let{r:t,g:n,b:r}=e.rgba,o=new dt(new As(t,n,r,1)),s=new dt(new As(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},SM=class extends q9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},wM=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}},G9=class extends Ds{constructor(e,t,n,r,o=!1){super(),this.model=t,this.pixelRatio=n,this._register(YN.onDidChange(()=>this.layout()));let s=Io(".colorpicker-widget");e.appendChild(s),this.header=this._register(new vM(s,this.model,r,o)),this.body=this._register(new bM(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function cee(i,e,t,n){return sm(this,void 0,void 0,function*(){let r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new As(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new dt(c),u=yield dM(e,t,n,et.None),h=new V9(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,r),i instanceof Ov?new xM(i,P.lift(t.range),h,n):new EM(i,P.lift(t.range),h,n)})}function dee(i,e,t,n,r){if(n.length===0||!e.hasModel())return oe.None;let o=new ne,s=n[0],a=e.getModel(),l=s.model,c=o.add(new G9(r.fragment,l,e.getOption(138),t,i instanceof am));r.setColorPicker(c);let d=new P(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof am){let u=n[0].model.color;i.color=u,$9(a,l,u,d,s),o.add(l.onColorFlushed(h=>{i.color=h}))}else o.add(l.onColorFlushed(u=>sm(this,void 0,void 0,function*(){yield $9(a,l,u,d,s),d=uee(e,d,l,r)})));return o.add(l.onDidChangeColor(u=>{$9(a,l,u,d,s)})),o}function uee(i,e,t,n){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new P(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);let s=i.getModel()._setTrackedRange(null,o,3);i.pushUndoStop(),i.executeEdits("colorpicker",r),o=i.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",r),n&&n.hide()),i.pushUndoStop(),o}function $9(i,e,t,n,r){return sm(this,void 0,void 0,function*(){let o=yield dM(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,et.None);e.colorPresentations=o||[]})}var aee,lee,sm,xM,Ov,EM,am,TM=M(()=>{Dt();gi();ma();Ce();qe();hM();gM();ree();see();ar();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)}},sm=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Ov=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Rr.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let r=wc.get(this._editor);if(!r)return[];for(let o of t){if(!r.isColorDecoration(o))continue;let s=r.getColorData(o.range.getStartPosition());if(s)return[yield cee(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return dee(this,this._editor,this._themeService,t,e)}};Ov=aee([lee(1,pn)],Ov);EM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r}},am=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!wc.get(this._editor))return null;let o=yield j9(n,this._editor.getModel(),et.None),s=null,a=null;for(let u of o){let h=u.colorInfo;P.containsRange(h.range,e.range)&&(s=h,a=u.provider)}let l=s!=null?s:e,c=a!=null?a:t,d=!!s;return{colorHover:yield cee(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,n=new P(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield $9(this._editor.getModel(),t,this._color,n,e),n=uee(this._editor,n,t))})}renderHoverParts(e,t){return dee(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};am=aee([lee(1,pn)],am)});var Pv,hee=M(()=>{Ce();Ze();qe();gM();TM();aC();lc();Pv=class extends oe{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==mM||!t.range)return;let n=this._editor.getContribution(hr.ID);if(n&&!n.isColorPickerVisible()){let r=new P(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);n.showContentHover(r,1,0,!1)}}};Pv.ID="editor.contrib.colorContribution";Ae(Pv.ID,Pv,2);jo.register(Ov)});var mee,ta,fee,xc,pee,Z_e,Y9,kM,_ee=M(()=>{Ce();TM();Et();UT();Gn();qt();xt();Ze();jt();ft();is();Kn();sM();Ht();K9();mee=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},ta=function(i,e){return function(t,n){e(t,n,i)}},fee=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xc=class gee extends oe{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._modelService=n,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=O.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=O.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Y9(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(gee.ID)}};xc.ID="editor.contrib.standaloneColorPickerController";xc=mee([ta(1,Ke),ta(2,Si),ta(3,Bt),ta(4,He),ta(5,be),ta(6,Tt)],xc);Ae(xc.ID,xc,1);pee=8,Z_e=22,Y9=class vee extends oe{constructor(e,t,n,r,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(am,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().viewState.position;let d=this._editor.getSelection(),u=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Ts(this.body));this._register(h.onDidBlur(p=>{this.hide()})),this._register(h.onDidFocus(p=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(p=>{var m;let g=(m=p.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(p=>{this._render(p.value,p.foundInEditor)})),this._start(u),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return vee.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(e){return fee(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new kM(t.result,t.foundInEditor))})}_computeAsync(e){return fee(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new Dh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){let n=document.createDocumentFragment(),r=this._register(new Tg(this._keybindingService)),o,s={fragment:n,statusBar:r,setColorPicker:g=>o=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(n),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-Z_e-pee,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+pee+"px";let p=u.originalColorNode;p.style.width=c+"px";let m=o.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Y9.ID="editor.contrib.standaloneColorPickerWidget";Y9=mee([ta(3,He),ta(4,Si),ta(5,Bt),ta(6,be),ta(7,Tt)],Y9);kM=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var IM,AM,LM,bee=M(()=>{Ze();De();_ee();jt();Yi();K9();IM=class extends ua{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=xc.get(t))===null||n===void 0||n.showOrFocus()}},AM=class extends se{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:O.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=xc.get(t))===null||n===void 0||n.hide()}},LM=class extends se{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:O.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=xc.get(t))===null||n===void 0||n.insertColor()}};X(AM);X(LM);mi(IM)});function Fv(i){return{asString:()=>yee(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function Cee(i,e,t){let n={id:Cd(),name:i,uri:e,data:t};return{asString:()=>yee(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}function X9(i){return i.toLowerCase()}function See(i,e){return wee(X9(i),e.map(X9))}function wee(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}var yee,lm,Nh,Hv=M(()=>{oi();Em();K0();yee=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};lm=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return ao.some(this,([n,r])=>r.asFile())&&t.push("files"),wee(X9(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){let n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return X9(e)}};Nh=Object.freeze({create:i=>OR(i.map(e=>e.toString())).join(`\r
|
|
`),split:i=>i.split(`\r
|
|
`),parse:i=>Nh.split(i).filter(e=>!e.startsWith("#"))})});var DM,MM,ebe,cm,NM=M(()=>{Hc();DM={EDITORS:"CodeEditors",FILES:"CodeFiles"},MM=class{},ebe={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Mr.add(ebe.DragAndDropContribution,new MM);cm=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};cm.INSTANCE=new cm});function RM(i){let e=new lm;for(let t of i.items){let n=t.type;if(t.kind==="string"){let r=new Promise(o=>t.getAsString(o));e.append(n,Fv(r))}else if(t.kind==="file"){let r=t.getAsFile();r&&e.append(n,ibe(r))}}return e}function ibe(i){let e=i.path?ht.parse(i.path):void 0;return Cee(i.name,e,()=>tbe(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function Q9(i,e=!1){let t=RM(i),n=t.get(Z_.INTERNAL_URI_LIST);if(n)t.replace(Vn.uriList,n);else if(e||!t.has(Vn.uriList)){let r=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?r.push(ht.file(a).toString()):r.push(ht.parse(s.name,!0).toString())}catch(l){}}}r.length&&t.replace(Vn.uriList,Fv(Nh.create(r)))}for(let r of nbe)t.delete(r);return t}var tbe,nbe,OM=M(()=>{Dre();Hv();mw();Sn();NM();tbe=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};nbe=Object.freeze([DM.EDITORS,DM.FILES,Z_.RESOURCES,Z_.INTERNAL_URI_LIST])});function xee(i,e,t){var n,r;return{edits:[...e.map(o=>new X_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(r=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&r!==void 0?r:[]]}}var Eee=M(()=>{Qm()});var Tee=M(()=>{});var kee=M(()=>{Tee()});var Aee,Bv,Iee,J9,dm,PM=M(()=>{Ht();doe();Pc();qt();Ce();kee();Qm();ft();Tl();Et();Gn();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},Bv=function(i,e){return function(t,n){e(t,n,i)}},Iee=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},J9=class Lee extends oe{constructor(e,t,n,r,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(Ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{o.containsPosition(u.position)||this.dispose()})),this._register(li.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;let t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=fe(".post-edit-widget"),this.button=this._register(new hF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Rt(this.domNode,on.CLICK,()=>this.showSelector()))}getId(){return Lee.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=wn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Yh({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};J9.baseId="editor.widget.postEditWidget";J9=Aee([Bv(7,cs),Bv(8,Ke),Bv(9,Bt)],J9);dm=class extends oe{constructor(e,t,n,r,o,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new Bi),this._register(li.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,r){var o,s;return Iee(this,void 0,void 0,function*(){let a=this._editor.getModel();if(!a||!e.length)return;let l=t.allEdits[t.activeEditIndex];if(!l)return;let c={edits:[...e.map(m=>new X_(a.uri,typeof l.insertText=="string"?{range:m,text:l.insertText,insertAsSnippet:!1}:{range:m,text:l.insertText.snippet,insertAsSnippet:!0})),...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},d=e[0],u=a.deltaDecorations([],[{range:d,options:{description:"paste-line-suffix",stickiness:0}}]),h,p;try{h=yield this._bulkEditService.apply(c,{editor:this._editor,token:r}),p=a.getDecorationRange(u[0])}finally{a.deltaDecorations(u,[])}n&&h.isApplied&&t.allEdits.length>1&&this.show(p!=null?p:d,t,m=>Iee(this,void 0,void 0,function*(){let g=this._editor.getModel();g&&(yield g.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:m,allEdits:t.allEdits},n,r))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(J9,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};dm=Aee([Bv(4,He),Bv(5,qc)],dm)});function Mee(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var rbe,um,Ud,HM,BM,FM,Wd,Nee=M(()=>{Ht();oi();Dt();Hv();Ce();mw();nr();K0();OM();Qm();qe();xt();Eee();lu();pg();De();$m();ft();Et();Gc();Ll();PM();rbe=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},um=function(i,e){return function(t,n){e(t,n,i)}},Ud=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},HM="editor.changePasteType",BM=new nt("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),FM="application/vnd.code.copyMetadata",Wd=class Dee extends oe{static get(e){return e.getContribution(Dee.ID)}constructor(e,t,n,r,o,s,a){super(),this._bulkEditService=n,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(Rt(l,"copy",c=>this.handleCopy(c))),this._register(Rt(l,"cut",c=>this.handleCopy(c))),this._register(Rt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new _p("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(dm,"pasteIntoEditor",e,BM,{id:HM,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(82).enabled&&!this._editor.getOption(88)}handleCopy(e){var t,n;if(!e.clipboardData||!this._editor.hasTextFocus()||!this.isPasteAsEnabled())return;let r=this._editor.getModel(),o=this._editor.getSelections();if(!r||!(o!=null&&o.length))return;let s=this._editor.getOption(35),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new P(a[0].startLineNumber,1,a[0].startLineNumber,1+r.getLineLength(a[0].startLineNumber))]}let c=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(o,s,Nc),u={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(S=>!!S.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let p=RM(e.clipboardData),m=h.flatMap(S=>{var k;return(k=S.copyMimeTypes)!==null&&k!==void 0?k:[]}),g=Cd();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let b=Vt(S=>Ud(this,void 0,void 0,function*(){let k=vr(yield Promise.all(h.map(N=>Ud(this,void 0,void 0,function*(){try{return yield N.prepareDocumentPaste(r,a,p,S)}catch(A){console.error(A);return}}))));k.reverse();for(let N of k)for(let[A,H]of N)p.replace(A,H);return p}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:b}}handlePaste(e){var t,n;return Ud(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;let r=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!r||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e.clipboardData),a=Q9(e.clipboardData);a.delete(FM);let l=[...e.clipboardData.types,...(n=s==null?void 0:s.providerCopyMimeTypes)!==null&&n!==void 0?n:[],Vn.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>See(h,l))});c.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,c,o,a,s):this.doPasteInline(c,o,a,s))})}doPasteInline(e,t,n,r){let o=Vt(s=>Ud(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new Sa(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(n,r,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>Mee(h,n));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(n,r,c.token);return}let u=yield this.getPasteEdits(d,n,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length){let h=a.getOption(82).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(n,r,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,n,r,o){let s=Vt(a=>Ud(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new Sa(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>Mee(g,r)),h=yield this.getPasteEdits(u,r,c,n,d.token);if(d.token.isCancellationRequested||!h.length)return;let p;if(typeof e=="string")p=h.find(g=>g.id===e);else{let g=yield this._quickInputService.pick(h.map(b=>({label:b.label,description:b.id,detail:b.detail,edit:b})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});p=g==null?void 0:g.edit}if(!p)return;let m=xee(c.uri,n,p);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(FM,JSON.stringify(t))}fetchCopyMetadata(e){let t=e.getData(FM);if(t)try{return JSON.parse(t)}catch(n){return}}mergeInDataFromCopy(e,t,n){var r;return Ud(this,void 0,void 0,function*(){if(t!=null&&t.id&&((r=this._currentCopyOperation)===null||r===void 0?void 0:r.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(Vn.uriList)){let o=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;o.length&&e.append(Vn.uriList,Fv(Nh.create(o)))}})}getPasteEdits(e,t,n,r,o){return Ud(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(a=>{var l;try{return(l=a.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(a,n,r,t,o)}catch(c){console.error(c);return}})).then(vr),o);return s==null||s.sort((a,l)=>l.priority-a.priority),s!=null?s:[]})}applyDefaultPasteHandler(e,t,n){var r,o,s;return Ud(this,void 0,void 0,function*(){let a=(r=e.get(Vn.text))!==null&&r!==void 0?r:e.get("text");if(!a)return;let l=yield a.asString();if(n.isCancellationRequested)return;let c={text:l,pasteOnNewLine:(o=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&o!==void 0?o:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",c)})}};Wd.ID="editor.contrib.copyPasteActionController";Wd=rbe([um(1,He),um(2,qc),um(3,Ms),um(4,be),um(5,lr),um(6,sP)],Wd)});function Ree(i){return hm(this,void 0,void 0,function*(){let e=i.get(Vn.uriList);if(!e)return[];let t=yield e.asString(),n=[];for(let r of Nh.parse(t))try{n.push({uri:ht.parse(r),originalText:r})}catch(o){}return n})}var zM,zv,hm,UM,Uv,Z9,eS,tS,iS,nS,WM=M(()=>{oi();Hv();Ce();mw();Im();lo();Sn();xt();De();ob();zM=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},zv=function(i,e){return function(t,n){e(t,n,i)}},hm=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},UM=v("builtIn","Built-in"),Uv=class{provideDocumentPasteEdits(e,t,n,r){return hm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,detail:o.detail,priority:o.priority}:void 0})}provideDocumentOnDropEdits(e,t,n,r){return hm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,priority:o.priority}:void 0})}},Z9=class extends Uv{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[Vn.text],this.pasteMimeTypes=[Vn.text]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=e.get(Vn.text);if(!n||e.has(Vn.uriList))return;let r=yield n.asString();return{id:this.id,priority:0,label:v("text.label","Insert Plain Text"),detail:UM,insertText:r}})}},eS=class extends Uv{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=yield Ree(e);if(!n.length||t.isCancellationRequested)return;let r=0,o=n.map(({uri:a,originalText:l})=>a.scheme===Lo.file?a.fsPath:(r++,l)).join(" "),s;return r>0?s=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{id:this.id,priority:0,insertText:o,label:s,detail:UM}})}},tS=class extends Uv{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=yield Ree(e);if(!n.length||t.isCancellationRequested)return;let r=vr(n.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?oO(s.uri,o):void 0}));if(r.length)return{id:this.id,priority:0,insertText:r.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:UM}})}};tS=zM([zv(0,kl)],tS);iS=class extends oe{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Z9)),this._register(e.documentOnDropEditProvider.register("*",new eS)),this._register(e.documentOnDropEditProvider.register("*",new tS(t)))}};iS=zM([zv(0,be),zv(1,kl)],iS);nS=class extends oe{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Z9)),this._register(e.documentPasteEditProvider.register("*",new eS)),this._register(e.documentPasteEditProvider.register("*",new tS(t)))}};nS=zM([zv(0,be),zv(1,kl)],nS)});var Oee=M(()=>{Ze();Eb();Nee();WM();De();Ae(Wd.ID,Wd,0);Yc(nS);Me(new class extends xi{constructor(){super({id:HM,precondition:BM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;return(n=Wd.get(e))===null||n===void 0?void 0:n.changePasteType()}});X(class extends se{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(i,e,t){var n;let r=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=Wd.get(e))===null||n===void 0?void 0:n.pasteAs(r)}})});var rS,Wv,jM=M(()=>{rS=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},Wv=class{constructor(e){this.identifier=e}}});var VM,Pee=M(()=>{bl();Et();jM();VM=rr("treeViewsDndService");sr(VM,rS,1)});var obe,KM,oS,qM,GM,Rh,Hee=M(()=>{oi();Dt();Hv();Ce();OM();qe();xt();jM();Pee();lu();pg();De();ft();NM();Et();PM();obe=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)}},oS=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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qM="editor.changeDropType",GM=new nt("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing")),Rh=class Fee extends oe{static get(e){return e.getContribution(Fee.ID)}constructor(e,t,n,r){super(),this._languageFeaturesService=n,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=cm.getInstance(),this._dropProgressManager=this._register(t.createInstance(_p,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(dm,"dropIntoEditor",e,GM,{id:qM,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(o=>this.onDropIntoEditor(e,o.position,o.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var r;return oS(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(r=this._currentOperation)===null||r===void 0||r.cancel(),e.focus(),e.setPosition(t);let o=Vt(s=>oS(this,void 0,void 0,function*(){let a=new Sa(e,1,void 0,s);try{let l=yield this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let d=this._languageFeaturesService.documentOnDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(p=>l.matches(p)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=e.getOption(34).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([P.fromPositions(t)],{activeEditIndex:0,allEdits:u},h,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,n,r,o){return oS(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(l=>l.provideDocumentOnDropEdits(t,n,r,o.token))),o.token),a=vr(s!=null?s:[]);return a.sort((l,c)=>c.priority-l.priority),a})}extractDataTransferData(e){return oS(this,void 0,void 0,function*(){if(!e.dataTransfer)return new lm;let t=Q9(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wv.prototype)){let n=this.treeItemsTransfer.getData(Wv.prototype);if(Array.isArray(n))for(let r of n){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};Rh.ID="editor.contrib.dropIntoEditorController";Rh=obe([KM(1,He),KM(2,be),KM(3,VM)],Rh)});var Bee=M(()=>{Ze();Eb();WM();Hee();Ae(Rh.ID,Rh,2);Me(new class extends xi{constructor(){super({id:qM,precondition:GM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;(n=Rh.get(e))===null||n===void 0||n.changeDropType()}});Yc(iS)});var zee=gt($M=>{gi();Mi();Sn();ca();Zg();zi();var sbe=$M&&$M.__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(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};St.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return sbe(this,void 0,void 0,function*(){let[t]=e;Lt(ht.isUri(t));let n=i.get(bh),o=yield i.get(xn).createModelReference(t);try{return(yield n.getOrCreate(o.object.textEditorModel,et.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var YM,Uee=M(()=>{ml();Ze();De();YM=class extends se{constructor(){super({id:"editor.action.forceRetokenize",label:v("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let r=new Ln(!0);n.tokenization.forceTokenization(n.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}};X(YM)});var g5t,v5t,T5t,Wee=M(()=>{N_();$P();coe();aoe();h6();v6();y6();S6();T6();j6();eee();hee();bee();Y6();Q6();eE();tE();Oee();Bee();vy();Sy();$E();g5t=Hi(JE()),v5t=Hi(zee());$7();pg();Cg();K2();J2();aC();uk();yk();T5t=Hi(xk());Tk();qk();Qk();tI();iI();_I();xI();II();BI();zI();VI();cp();JI();p2();nA();Uee();ZA();fA();pA();CA();o9();QA();JA();Xc();d0()});var jee=M(()=>{});var Vee=M(()=>{jee()});var jv,sS,Kee=M(()=>{Vee();Ht();Ce();Ze();nr();jv=class extends oe{constructor(e){super(),this.editor=e,this.widget=null,Tm&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(88);!this.widget&&e?this.widget=new sS(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};jv.ID="editor.contrib.iPadShowKeyboard";sS=class i extends oe{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Rt(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Rt(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};sS.ID="editor.contrib.ShowKeyboardWidget";Ae(jv.ID,jv,3)});var XM,qee=M(()=>{Ze();dF();Xc();xw();uoe();XM=class extends se{constructor(){super({id:"editor.action.toggleHighContrast",label:cF.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(kb),r=n.getColorTheme();au(r.type)?(n.setTheme(this._originalThemeName||(ww(r.type)?pF:fF)),this._originalThemeName=null):(n.setTheme(ww(r.type)?mF:gF),this._originalThemeName=r.themeName)}};X(XM)});var h4t,p4t,Gee=M(()=>{Wee();h4t=Hi(tL());Kee();p4t=Hi(nL());rL();sL();fL();_L();yL();qee();Os()});var Vv={};RN(Vv,{CancellationTokenSource:()=>hoe,Emitter:()=>foe,KeyCode:()=>poe,KeyMod:()=>moe,MarkerSeverity:()=>yoe,MarkerTag:()=>Coe,Position:()=>goe,Range:()=>voe,Selection:()=>_oe,SelectionDirection:()=>boe,Token:()=>woe,Uri:()=>Soe,editor:()=>du,languages:()=>ka});var Kv=M(()=>{OZ();zZ();GZ();CL();xoe();Gee()});var Jee=gt((A4t,Qee)=>{var Xee="Expected a function",$ee=NaN,abe="[object Symbol]",lbe=/^\s+|\s+$/g,cbe=/^[-+]0x[0-9a-f]+$/i,dbe=/^0b[01]+$/i,ube=/^0o[0-7]+$/i,hbe=parseInt,fbe=typeof global=="object"&&global&&global.Object===Object&&global,pbe=typeof self=="object"&&self&&self.Object===Object&&self,mbe=fbe||pbe||Function("return this")(),gbe=Object.prototype,vbe=gbe.toString,_be=Math.max,bbe=Math.min,QM=function(){return mbe.Date.now()};function ybe(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(Xee);e=Yee(e)||0,aS(t)&&(d=!!t.leading,u="maxWait"in t,o=u?_be(Yee(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function p(K){var W=n,re=r;return n=r=void 0,c=K,s=i.apply(re,W),s}function m(K){return c=K,a=setTimeout(S,e),d?p(K):s}function g(K){var W=K-l,re=K-c,ae=e-W;return u?bbe(ae,o-re):ae}function b(K){var W=K-l,re=K-c;return l===void 0||W>=e||W<0||u&&re>=o}function S(){var K=QM();if(b(K))return k(K);a=setTimeout(S,g(K))}function k(K){return a=void 0,h&&n?p(K):(n=r=void 0,s)}function N(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function A(){return a===void 0?s:k(QM())}function H(){var K=QM(),W=b(K);if(n=arguments,r=this,l=K,W){if(a===void 0)return m(l);if(u)return a=setTimeout(S,e),p(l)}return a===void 0&&(a=setTimeout(S,e)),s}return H.cancel=N,H.flush=A,H}function Cbe(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError(Xee);return aS(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),ybe(i,e,{leading:n,maxWait:e,trailing:r})}function aS(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Sbe(i){return!!i&&typeof i=="object"}function wbe(i){return typeof i=="symbol"||Sbe(i)&&vbe.call(i)==abe}function Yee(i){if(typeof i=="number")return i;if(wbe(i))return $ee;if(aS(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=aS(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(lbe,"");var t=dbe.test(i);return t||ube.test(i)?hbe(i.slice(2),t?2:8):cbe.test(i)?$ee:+i}Qee.exports=Cbe});var Cte=gt((L4t,yte)=>{var xbe=1/0,Ebe="[object Symbol]",Tbe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kbe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ste="\\ud800-\\udfff",Ibe="\\u0300-\\u036f\\ufe20-\\ufe23",Abe="\\u20d0-\\u20f0",ate="\\u2700-\\u27bf",lte="a-z\\xdf-\\xf6\\xf8-\\xff",Lbe="\\xac\\xb1\\xd7\\xf7",Mbe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dbe="\\u2000-\\u206f",Nbe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cte="A-Z\\xc0-\\xd6\\xd8-\\xde",Rbe="\\ufe0e\\ufe0f",dte=Lbe+Mbe+Dbe+Nbe,JM="['\u2019]",Zee="["+dte+"]",ute="["+Ibe+Abe+"]",hte="\\d+",Obe="["+ate+"]",fte="["+lte+"]",pte="[^"+ste+dte+hte+ate+lte+cte+"]",Pbe="\\ud83c[\\udffb-\\udfff]",Fbe="(?:"+ute+"|"+Pbe+")",Hbe="[^"+ste+"]",mte="(?:\\ud83c[\\udde6-\\uddff]){2}",gte="[\\ud800-\\udbff][\\udc00-\\udfff]",fm="["+cte+"]",Bbe="\\u200d",ete="(?:"+fte+"|"+pte+")",zbe="(?:"+fm+"|"+pte+")",tte="(?:"+JM+"(?:d|ll|m|re|s|t|ve))?",ite="(?:"+JM+"(?:D|LL|M|RE|S|T|VE))?",vte=Fbe+"?",_te="["+Rbe+"]?",Ube="(?:"+Bbe+"(?:"+[Hbe,mte,gte].join("|")+")"+_te+vte+")*",Wbe=_te+vte+Ube,jbe="(?:"+[Obe,mte,gte].join("|")+")"+Wbe,Vbe=RegExp(JM,"g"),Kbe=RegExp(ute,"g"),qbe=RegExp([fm+"?"+fte+"+"+tte+"(?="+[Zee,fm,"$"].join("|")+")",zbe+"+"+ite+"(?="+[Zee,fm+ete,"$"].join("|")+")",fm+"?"+ete+"+"+tte,fm+"+"+ite,hte,jbe].join("|"),"g"),Gbe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$be={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Ybe=typeof global=="object"&&global&&global.Object===Object&&global,Xbe=typeof self=="object"&&self&&self.Object===Object&&self,Qbe=Ybe||Xbe||Function("return this")();function Jbe(i,e,t,n){var r=-1,o=i?i.length:0;for(n&&o&&(t=i[++r]);++r<o;)t=e(t,i[r],r,i);return t}function Zbe(i){return i.match(Tbe)||[]}function e5e(i){return function(e){return i==null?void 0:i[e]}}var t5e=e5e($be);function i5e(i){return Gbe.test(i)}function n5e(i){return i.match(qbe)||[]}var r5e=Object.prototype,o5e=r5e.toString,nte=Qbe.Symbol,rte=nte?nte.prototype:void 0,ote=rte?rte.toString:void 0;function s5e(i){if(typeof i=="string")return i;if(c5e(i))return ote?ote.call(i):"";var e=i+"";return e=="0"&&1/i==-xbe?"-0":e}function a5e(i){return function(e){return Jbe(h5e(d5e(e).replace(Vbe,"")),i,"")}}function l5e(i){return!!i&&typeof i=="object"}function c5e(i){return typeof i=="symbol"||l5e(i)&&o5e.call(i)==Ebe}function bte(i){return i==null?"":s5e(i)}function d5e(i){return i=bte(i),i&&i.replace(kbe,t5e).replace(Kbe,"")}var u5e=a5e(function(i,e,t){return i+(t?"-":"")+e.toLowerCase()});function h5e(i,e,t){return i=bte(i),e=t?void 0:e,e===void 0?i5e(i)?n5e(i):Zbe(i):i.match(e)||[]}yte.exports=u5e});var ZM=gt(Be=>{"use strict";var ni=Be&&Be.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Be,"__esModule",{value:!0});Be.DeleteLines=Be.SearchReplace=Be.Search=Be.InvertSelection=Be.GotoLine=Be.RotateCursorOnScreen=Be.InsertTabs=Be.RevealToBottomAction=Be.RevealToCenterAction=Be.RevealToTopAction=Be.RevealEditorAction=Be.YankRotate=Be.YankSelectionToRing=Be.Yank=Be.RedoAction=Be.UndoAction=Be.KeyBoardQuit=Be.MoveCursorTop=Be.MoveCursorBottom=Be.MoveCursorWordLeft=Be.MoveCursorWordRight=Be.MoveCursorToLineStart=Be.MoveCursorToLineEnd=Be.MoveCursorRight=Be.MoveCursorLeft=Be.MoveCursorDown=Be.MoveCursorUp=Be.SetMark=Be.InsertLineAfter=Be.InsertLineBelow=Be.KillLines=Be.KillSelection=Be.BaseAction=Be.SOURCE=void 0;var yn=(Kv(),Kh(Vv));Be.SOURCE="extension.emacs";function f5e(i,e,t,n,r){r===void 0&&(r=1);for(var o="cursor".concat(n==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;s<r;s++)i.trigger(Be.SOURCE,o,null)}var tr=function(){function i(){this.description=""}return i}();Be.BaseAction=tr;var Ste=function(i){ni(e,i);function e(t){var n=i.call(this)||this;return n.trigger=t,n}return e.prototype.run=function(t){t.trigger(Be.SOURCE,this.trigger,{})},e}(tr),p5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelections();s.length&&s.forEach(function(a){var l=t.getModel().getValueInRange(a);n.state.addToRing(l),t.executeEdits(Be.SOURCE,[{range:a,text:""}])})},e}(tr);Be.KillSelection=p5e;var m5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;var s=t.getModel(),a=n.getCursorAnchor(),l;if(r===1){var c=s.getLineLength(a.lineNumber),d=a.column===c+1;if(!c||d){o?n.state.growRingTop(s.getEOL()):n.state.addToRing(s.getEOL()),t.trigger(Be.SOURCE,"deleteAllRight",null);return}else l=new yn.Position(a.lineNumber,s.getLineLength(a.lineNumber)+1)}else{var u=s.getLineCount(),h=a.lineNumber+r>u?u:a.lineNumber+r;l=new yn.Position(h,s.getLineLength(h)+1)}var p=yn.Range.fromPositions(a,l);o?n.state.growRingTop(s.getValueInRange(p)):n.state.addToRing(s.getValueInRange(p)),t.executeEdits(Be.SOURCE,[{range:p,text:""}]),t.setSelection(yn.Selection.fromPositions(a,a))},e}(tr);Be.KillLines=m5e;var g5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getPosition();t.trigger(Be.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(tr);Be.InsertLineBelow=g5e;var v5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s="",a=0;a<r;a++)s+=t.getModel().getEOL();n.selectionMode=!1;var l=n.getCursorAnchor();t.executeEdits(Be.SOURCE,[{range:yn.Range.fromPositions(l),text:s,forceMoveMarkers:!0}])},e}(tr);Be.InsertLineAfter=v5e;var _5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.selectionMode,a=t.getSelection(),l=a.isEmpty();if(!l){var c=a.getDirection();c===yn.SelectionDirection.LTR?t.setSelection(yn.Selection.fromPositions(a.getEndPosition(),a.getEndPosition())):t.setSelection(yn.Selection.fromPositions(a.getStartPosition(),a.getStartPosition()))}l&&n.selectionMode?n.selectionMode=!1:n.selectionMode=!0},e}(tr);Be.SetMark=_5e;var jd=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="char",t}return e.prototype.run=function(t,n,r,o){f5e(t,n.selectionMode,this.direction,this.unit,r)},e}(tr),b5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Up",t}return e}(jd);Be.MoveCursorUp=b5e;var y5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Down",t}return e}(jd);Be.MoveCursorDown=y5e;var wte=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Left",t}return e}(jd);Be.MoveCursorLeft=wte;var xte=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Right",t}return e}(jd);Be.MoveCursorRight=xte;var C5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="End",t}return e}(jd);Be.MoveCursorToLineEnd=C5e;var S5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Home",t}return e}(jd);Be.MoveCursorToLineStart=S5e;var w5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(xte);Be.MoveCursorWordRight=w5e;var x5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(wte);Be.MoveCursorWordLeft=x5e;var E5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Bottom",t}return e}(jd);Be.MoveCursorBottom=E5e;var T5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Top",t}return e}(jd);Be.MoveCursorTop=T5e;var k5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1,n.clearState(),t.setPosition(t.getPosition())},e}(tr);Be.KeyBoardQuit=k5e;var Ete=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s=0;s<r;s++)t.trigger(Be.SOURCE,this.action,null)},e}(tr),I5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="undo",t}return e}(Ete);Be.UndoAction=I5e;var A5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="redo",t}return e}(Ete);Be.RedoAction=A5e;var L5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.state.getFromRing(r);if(s){var a=t.getPosition();t.executeEdits(Be.SOURCE,[{range:yn.Range.fromPositions(a,a),text:s,forceMoveMarkers:!0}])}},e}(tr);Be.Yank=L5e;var M5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){n.state.addToRing(t.getModel().getValueInRange(s)),n.selectionMode=!1;var a=n.getCursorAnchor();t.setSelection(yn.Selection.fromPositions(a,a))}},e}(tr);Be.YankSelectionToRing=M5e;var D5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=n.state.popFromRing();if(s){var a=n.getCursorAnchor();t.executeEdits(Be.SOURCE,[{range:yn.Range.fromPositions(a),text:s,forceMoveMarkers:!0}])}},e}(tr);Be.YankRotate=D5e;var lS=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();this.revealFunction==="up"?t.trigger(Be.SOURCE,"scrollPageUp",null):t[this.revealFunction](s)},e}(tr);Be.RevealEditorAction=lS;var N5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeAtTop",t}return e}(lS);Be.RevealToTopAction=N5e;var R5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeInCenter",t}return e}(lS);Be.RevealToCenterAction=R5e;var O5e=function(i){ni(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="up",t}return e}(lS);Be.RevealToBottomAction=O5e;var P5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s=t.getModel(),a=s.getOptions(),l=a.tabSize,c=a.insertSpaces,d="",u=0;u<r;u++){for(var h="",p=0;p<l;p++)h+=" ";d+=c?h:" "}t.executeEdits(Be.SOURCE,[{range:t.getSelection(),text:d,forceMoveMarkers:!0}])},e}(tr);Be.InsertTabs=P5e;var F5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getVisibleRanges();if(s.length){for(var a=[],l=1,c=0;c<s.length;c++)for(var d=s[c],u=d.startLineNumber;u<=d.endLineNumber;u++)a.push(u);var h=t.getPosition(),p=Math.ceil(a.length/2),m;h.lineNumber===a[p]?m=new yn.Position(a[0],1):h.lineNumber===a[0]?m=new yn.Position(a[a.length-1],1):m=new yn.Position(a[p],1),t.setPosition(m)}},e}(tr);Be.RotateCursorOnScreen=F5e;var H5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.getBasicInput("Goto Line: ").then(function(s){var a=parseInt(s)||0,l=t.getModel(),c=l.getLineCount();t.focus(),a?a>c&&(a=c):a=1;var d=new yn.Position(a,1),u;if(!n.selectionMode)u=yn.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===yn.SelectionDirection.LTR?u=yn.Selection.fromPositions(h.getStartPosition(),d):u=yn.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(tr);Be.GotoLine=H5e;var B5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===yn.SelectionDirection.LTR?a=yn.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=yn.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(tr);Be.InvertSelection=B5e;var z5e=function(i){ni(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Ste);Be.Search=z5e;var U5e=function(i){ni(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Ste);Be.SearchReplace=U5e;var W5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;for(var s=0;s<r;s++)t.trigger(Be.SOURCE,"editor.action.deleteLines",null)},e}(tr);Be.DeleteLines=W5e});var dS=gt(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getAllMappings=ir.unregisterKey=ir.registerGlobalCommand=ir.executeCommand=ir.COMMANDS=ir.prefixPreservingKeys=void 0;var fi=ZM();ir.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Tte=new fi.SetMark,cS=new fi.UndoAction,j5e=new fi.MoveCursorDown,V5e=new fi.MoveCursorUp,K5e=new fi.MoveCursorRight,q5e=new fi.MoveCursorLeft;ir.COMMANDS={"M-/":{description:"",action:"editor.action.triggerSuggest"},"C-'":{description:"",action:"editor.action.triggerSuggest"},"M-;":{description:"",action:"editor.action.commentLine"},"C-t":{description:"",action:"editor.action.transposeLetters"},"C-x C-p":{description:"",action:"editor.action.selectAll"},Tab:{description:"",action:"editor.action.formatDocument"},"C-Backspace":{description:"",action:"deleteWordLeft"},"C-d":{description:"",action:"deleteRight"},"M-Backspace":{description:"",action:"deleteWordLeft"},"M-Delete":{description:"",action:"deleteWordLeft"},"C-x C-u":{description:"",action:"editor.action.transformToUppercase"},"C-x C-l":{description:"",action:"editor.action.transformToLowercase"},"C-v":{description:"",action:"cursorPageDown"},PageDown:{description:"",action:"cursorPageDown"},"M-v":{description:"",action:"cursorPageUp"},PageUp:{description:"",action:"cursorPageUp"},"M-g n":{description:"",action:"editor.action.marker.next"},"M-g p":{description:"",action:"editor.action.marker.prev"},"M-C-n":{description:"",action:"editor.action.addSelectionToNextFindMatch"},"C-h":{description:"",action:"deleteLeft"},"M-d":{description:"",action:"deleteWordRight"},"S-C-":{description:"",action:"editor.action.triggerParameterHints"},"C-SPC":Tte,"S-C-2":Tte,"C-/":cS,"S-C--":cS,"C-z":cS,"C-x u":cS,"C-n":j5e,"C-p":V5e,"C-f":K5e,"C-b":q5e,"S-C-Backspace":new fi.DeleteLines,"M-f":new fi.MoveCursorWordRight,"M-b":new fi.MoveCursorWordLeft,"C-k":new fi.KillLines,"C-m":new fi.InsertLineAfter,"C-w":new fi.KillSelection,"C-o":new fi.InsertLineBelow,"C-g":new fi.KeyBoardQuit,"C-e":new fi.MoveCursorToLineEnd,"C-a":new fi.MoveCursorToLineStart,"C-y":new fi.Yank,"M-w":new fi.YankSelectionToRing,"M-y":new fi.YankRotate,"C-l":new fi.RevealToCenterAction,"C-q Tab":new fi.InsertTabs,"M-r":new fi.RotateCursorOnScreen,"M-g g":new fi.GotoLine,"M-g M-g":new fi.GotoLine,"C-x C-x":new fi.InvertSelection,"S-M-.":new fi.MoveCursorBottom,"S-M-,":new fi.MoveCursorTop,"C-s":new fi.Search,"C-r":new fi.Search,"S-M-5":new fi.SearchReplace};function G5e(i,e,t,n){var r=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(r,i,o,n);return}if(typeof e.action=="string")for(var s=0;s<o;s++)r.trigger(fi.SOURCE,e.action,null);else if(Array.isArray(e.action))for(var s=0;s<o;s++)e.action.forEach(function(l){r.trigger(fi.SOURCE,l,null)})}ir.executeCommand=G5e;function $5e(i,e){ir.COMMANDS[i]=e}ir.registerGlobalCommand=$5e;function Y5e(i){ir.COMMANDS[i]&&delete ir.COMMANDS[i]}ir.unregisterKey=Y5e;function X5e(){var i={};return Object.keys(ir.COMMANDS).forEach(function(e){i[e]=ir.COMMANDS[e].description}),i}ir.getAllMappings=X5e});var Ate=gt(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.Emitter=jr.Event=jr.monacoToEmacsKey=jr.modifierKeys=void 0;var Q5e=(Kv(),Kh(Vv));jr.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var kte={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},J5e=["Key","Numpad"],Ite="Arrow";function Z5e(i){var e=Q5e.KeyCode[i.keyCode];if(jr.modifierKeys[e])return"";var t=J5e.some(function(n){return e.startsWith(n)})?e[e.length-1]:e;return e.endsWith(Ite)?t=e.substring(0,e.length-Ite.length):kte[e]&&(t=kte[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(jr.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(jr.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(jr.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(jr.modifierKeys.Shift,"-").concat(t)),t}jr.monacoToEmacsKey=Z5e;var e4e;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(e4e=jr.Event||(jr.Event={}));var t4e=function(){function i(){this._listeners=[]}return Object.defineProperty(i.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){e._listeners.push(t);var n={dispose:function(){if(!e._disposed){var r=e._listeners.indexOf(t);r<0||e._listeners.splice(r,1)}}};return n}),this._event},enumerable:!1,configurable:!0}),i.prototype.fire=function(e){this._listeners.length&&this._listeners.forEach(function(t){return t(e)})},i.prototype.dispose=function(){this._disposed||(this._listeners=void 0,this._disposed=!0)},i}();jr.Emitter=t4e});var Lte=gt(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.BasicInputWidget=void 0;var i4e=(Kv(),Kh(Vv)),Yo="ext-emacs-basic-input";function n4e(){return`
|
|
.`.concat(Yo,` {
|
|
color: #d4d4d4;
|
|
transition: top 200ms linear;
|
|
visibility: hidden;
|
|
width: 200px;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 5px;
|
|
}
|
|
|
|
.`).concat(Yo,".").concat(Yo,`-visible {
|
|
visibility: visible;
|
|
}
|
|
|
|
.`).concat(Yo,` input {
|
|
color: rgb(97, 97, 97);
|
|
background-color: transparent;
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
height: 100%;
|
|
line-height: inherit;
|
|
border: none;
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
resize: none;
|
|
padding-top: 2px;
|
|
padding-bottom: 2px;
|
|
margin-left: 5px;
|
|
max-width: 50px;
|
|
}
|
|
|
|
.`).concat(Yo,` input:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.vs .`).concat(Yo,` {
|
|
color: rgb(97, 97, 97);
|
|
background-color: #efeff2;
|
|
box-shadow: 0 2px 8px #a8a8a8;
|
|
}
|
|
|
|
.vs-dark .`).concat(Yo,` {
|
|
background-color: #2d2d30;
|
|
box-shadow: 0 2px 8px #000000;
|
|
}
|
|
|
|
.vs-dark .`).concat(Yo,` input {
|
|
color: rgb(204, 204, 204);
|
|
}
|
|
|
|
.hc-black .`).concat(Yo,` {
|
|
border: 2px solid #6fc3df;
|
|
background-color: #0c141f;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.hc-black .`).concat(Yo,` input {
|
|
color: #ffffff;
|
|
}
|
|
`)}var r4e=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(n){(n.altKey||n.ctrlKey||n.metaKey)&&(n.preventDefault(),n.stopPropagation()),n.which===13?e._pendingPromise&&(n.preventDefault(),e._pendingPromise.resolve(n.target.value),e._pendingPromise=null):n.which===27&&e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this.onBlur=function(){e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this._dom=document.createElement("div"),this._messageDom=document.createElement("div");var t=document.createElement("div");this._dom.setAttribute("class",Yo),this._dom.setAttribute("aria-hidden","true"),this._input=document.createElement("input"),this._dom.appendChild(this._messageDom),t.appendChild(this._input),this._dom.appendChild(t),this.addListeners(),this._style=document.createElement("style"),this._style.type="text/css",this._style.textContent=n4e(),(document.head||document.body).appendChild(this._style)}return i.prototype.getDomNode=function(){return this._dom},i.prototype.getId=function(){return"extension.emacs.basicinput"},i.prototype.getPosition=function(){return{preference:i4e.editor.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},i.prototype.addListeners=function(){this._input.addEventListener("keydown",this.onKeyDown),this._input.addEventListener("blur",this.onBlur)},i.prototype.showWidgetAndFocus=function(e){this._dom.classList.add("".concat(Yo,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat(Yo,"-visible")),this._dom.setAttribute("aria-hidden","true"),this._messageDom.textContent="",this._input.placeholder="",this._input.value=""},i.prototype.getInput=function(e){var t=this;return this._pendingPromise&&(this._pendingPromise.reject(),this._pendingPromise=null),new Promise(function(n,r){t._pendingPromise={resolve:function(o){n(o),t.cleanup()},reject:function(){r(),t.cleanup()}},t.showWidgetAndFocus(e)})},i.prototype.dispose=function(){this.cleanup(),this._input.removeEventListener("keydown",this.onKeyDown),this._input.removeEventListener("blur",this.onBlur),(document.head||document.body).removeChild(this._style)},i}();uS.BasicInputWidget=r4e});var Dte=gt(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.State=Ec.EAT_UP_KEY=void 0;var Mte=dS();Ec.EAT_UP_KEY="==-==";var o4e=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),Ec.EAT_UP_KEY):this.updateCuMode(e)?Ec.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):Mte.prefixPreservingKeys[e]?(this._prefixKey=e,Ec.EAT_UP_KEY):e},i.prototype.setLastCommandKey=function(e){this._lastCommandKey=e},i.prototype.isLastCommandKey=function(e){return this._lastCommandKey==e},i.prototype.resetState=function(e){e===void 0&&(e=!1),this._inargumentMode=e,this._prefixKey=null,e?this._lastInputBuffer=this._inputBuffer:this._lastInputBuffer=null,this._inputBuffer=null},i.prototype.updateCuMode=function(e){if(this._inargumentMode){if(typeof e=="string"&&/^\d$/.test(e))return this._inputBuffer=(this._inputBuffer||"")+e,!0;if(Mte.prefixPreservingKeys[e])return this.resetState(!0),!1}else if(!this._prefixKey&&e==="C-u")return this._inargumentMode=!0,this._inputBuffer=null,this._lastInputBuffer=null,!0},i.prototype.updateStateOnExecution=function(e){e===void 0&&(e=!1),this.resetState(e)},i.prototype.getInputBuffer=function(){return this._lastInputBuffer||this._inputBuffer},i.prototype.addToRing=function(e){this._killRing.push(e),this._killRing.length>50&&this._killRing.shift()},i.prototype.growRingTop=function(e){this._killRing.length||this.addToRing(e),this._killRing[this._killRing.length-1]+=e},i.prototype.getFromRing=function(e){return this._killRing[this._killRing.length-(e?Math.min(e,1):1)]||""},i.prototype.popFromRing=function(){return this._killRing.length>1?this._killRing.pop():this.getFromRing()},i.prototype.getReadableState=function(){var e="";return this._inargumentMode&&(e+="C-u",this._inputBuffer?e+=" ".concat(this._inputBuffer):this._lastInputBuffer&&(e+=" ".concat(this._lastInputBuffer))),this._prefixKey&&(e+=" ".concat(this._prefixKey)),e},i}();Ec.State=o4e});var Fte=gt(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.getConfiguration=pm.EmacsExtension=void 0;var Oh=(Kv(),Kh(Vv)),s4e=Jee(),hS=Cte(),Nte=dS(),eD=Ate(),a4e=Lte(),Rte=Dte(),Ote=Oh.editor,tD=Ote.TextEditorCursorBlinkingStyle,iD=Ote.TextEditorCursorStyle,l4e=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new Rte.State,this._onDidMarkChange=new eD.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new eD.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=Pte(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new a4e.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:hS(iD[iD.Block]),cursorBlinking:hS(tD[tD.Blink])}),this._editor.addOverlayWidget(this._basicInputWidget))},Object.defineProperty(i.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),i.prototype.getEditor=function(){return this._editor},i.prototype.addListeners=function(){this._disposables.push(this._editor.onKeyDown(this.onKeyDown.bind(this))),this._throttledScroll=s4e(this.onEditorScroll.bind(this),500),this._disposables.push(this._editor.onDidScrollChange(this._throttledScroll))},i.prototype.cancelKey=function(e){e.preventDefault(),e.stopPropagation()},i.prototype.onKeyDown=function(e){if(!e.browserEvent.defaultPrevented){var t=(0,eD.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===Rte.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var n=Nte.COMMANDS[t];if(!n){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var r=this._state.isLastCommandKey(t);(0,Nte.executeCommand)(this,n,this._state.getInputBuffer(),r),this._state.setLastCommandKey(t),this._state.updateStateOnExecution()}}},i.prototype.onEditorScroll=function(){var e=this._editor.getLayoutInfo().height,t=this._editor.getScrolledVisiblePosition(this._editor.getPosition());if(!(t.top>=0&&t.top<=e)){var n=this._editor.getVisibleRanges();if(n.length){var r,o=this._editor.getSelection();t.top<0?r=new Oh.Position(n[0].getStartPosition().lineNumber,1):t.top>e&&(r=new Oh.Position(n[n.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(Oh.Selection.fromPositions(o.getStartPosition(),r)):this._editor.setPosition(r)}}},i.prototype.onContentChange=function(){this.selectionMode=!1},i.prototype.clearState=function(){this._state.updateStateOnExecution()},Object.defineProperty(i.prototype,"selectionMode",{get:function(){return this._inSelectionMode},set:function(e){e!==this._inSelectionMode&&(this._inSelectionMode=e,e?this._changeDisposable=this._editor.onDidChangeModelContent(this.onContentChange.bind(this)):this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._onDidMarkChange.fire(e))},enumerable:!1,configurable:!0}),i.prototype.getCursorAnchor=function(){var e=this._editor.getSelection(),t=e.getDirection();return t===Oh.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()},i.prototype.getBasicInput=function(e){return this._basicInputWidget.getInput(e)},i.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables=void 0,this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._editor.updateOptions({cursorStyle:this._intialCursorType,cursorBlinking:this._intialCursorBlinking}),this._editor.removeOverlayWidget(this._basicInputWidget),this._basicInputWidget.dispose(),this._throttledScroll.cancel(),this._state=null},i}();pm.EmacsExtension=l4e;function Pte(i){var e=i.getOption(Oh.editor.EditorOption.cursorStyle),t=i.getOption(Oh.editor.EditorOption.cursorBlinking);return{cursorStyle:hS(iD[e]),cursorBlinking:hS(tD[t])}}pm.getConfiguration=Pte});var Bte=gt(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Actions=Xo.EmacsExtension=Xo.unregisterKey=Xo.getAllMappings=Xo.registerGlobalCommand=void 0;var Hte=Fte();Object.defineProperty(Xo,"EmacsExtension",{enumerable:!0,get:function(){return Hte.EmacsExtension}});var nD=dS();Object.defineProperty(Xo,"registerGlobalCommand",{enumerable:!0,get:function(){return nD.registerGlobalCommand}});Object.defineProperty(Xo,"getAllMappings",{enumerable:!0,get:function(){return nD.getAllMappings}});Object.defineProperty(Xo,"unregisterKey",{enumerable:!0,get:function(){return nD.unregisterKey}});var c4e=ZM();Xo.Actions=c4e;Xo.default=Hte.EmacsExtension});var rne=gt((nne,oN)=>{(function(i){if(typeof nne=="object"&&typeof oN!="undefined")oN.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,u){if(!o[d]){if(!r[d]){var h=typeof Yd=="function"&&Yd;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=o[d]={exports:{}};r[d][0].call(m.exports,function(g){var b=r[d][1][g];return a(b||g)},m,m.exports,n,r,o,s)}return o[d].exports}for(var l=typeof Yd=="function"&&Yd,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 p(m,g){for(var b=0;b<g.length;b++){var S=g[b];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(m,S.key,S)}}return function(m,g,b){return g&&p(m.prototype,g),b&&p(m,b),m}}();function a(p,m,g){return m in p?Object.defineProperty(p,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[m]=g,p}function l(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}var c={width:"100%",height:"100%"},d=function(m){return Number(m)===Number(m)},u="classList"in document.documentElement?function(p,m){p.classList.add(m)}:function(p,m){var g=p.getAttribute("class")||"";p.setAttribute("class",g+" "+m)},h=function(){s(p,null,[{key:"create",value:function(g,b){return new p(g,b)}},{key:"mergeStyle",value:function(g,b){for(var S in b)g.style[S]!==b[S]&&(g.style[S]=b[S])}},{key:"getMaxBrowserHeight",value:function(){var g=document.createElement("div"),b=document.createElement("div");p.mergeStyle(g,{position:"absolute",height:"1px",opacity:0}),p.mergeStyle(b,{height:"1e7px"}),g.appendChild(b),document.body.appendChild(g);var S=b.offsetHeight;return document.body.removeChild(g),S}}]);function p(m,g){var b=this;l(this,p),this._config={},this._lastRepaint=null,this._maxElementHeight=p.getMaxBrowserHeight(),this.refresh(m,g);var S=this._config,k=function N(){var A=b._getScrollPosition(),H=b._lastRepaint;if(b._renderAnimationFrame=window.requestAnimationFrame(N),A!==H){var K=H?A-H:0;if(!H||K<0||K>b._averageHeight){var W=b._renderChunk();b._lastRepaint=A,W!==!1&&typeof S.afterRender=="function"&&S.afterRender()}}};k()}return s(p,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,b){var S;if(Object.assign(this._config,c,b),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var k=this._config,N=this._scroller||k.scroller||document.createElement(k.scrollerTagName||"tr");if(typeof k.useFragment!="boolean"&&(this._config.useFragment=!0),!k.generate)throw new Error("Missing required `generate` function");if(!d(k.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(k.itemHeight)&&!d(k.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(k.itemHeight)?this._itemHeights=Array(k.total).fill(k.itemHeight):this._itemHeights=k.itemHeight,Object.keys(c).filter(function(Z){return Z in k}).forEach(function(Z){var ye=k[Z],ge=d(ye);if(ye&&typeof ye!="string"&&typeof ye!="number"){var $="Invalid optional `"+Z+"`, expected string or number";throw new Error($)}else ge&&(k[Z]=ye+"px")});var A=!!k.horizontal,H=k[A?"width":"height"];if(H){var K=d(H),W=K?!1:H.slice(-1)==="%",re=K?H:parseInt(H.replace(/px|%/,""),10),ae=window[A?"innerWidth":"innerHeight"];W?this._containerSize=ae*re/100:this._containerSize=d(H)?H:re}var Ne=k.scrollContainer,he=k.itemHeight*k.total,Xe=this._maxElementHeight;he>Xe&&console.warn(["HyperList: The maximum element height",Xe+"px has","been exceeded; please reduce your item height."].join(" "));var st={width:""+k.width,height:Ne?he+"px":""+k.height,overflow:Ne?"none":"auto",position:"relative"};p.mergeStyle(g,st),Ne&&p.mergeStyle(k.scrollContainer,{overflow:"auto"});var rt=(S={opacity:"0",position:"absolute"},a(S,A?"height":"width","1px"),a(S,A?"width":"height",he+"px"),S);p.mergeStyle(N,rt),this._scroller||g.appendChild(N);var Nt=this._computeScrollPadding();this._scrollPaddingBottom=Nt.bottom,this._scrollPaddingTop=Nt.top,this._scroller=N,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(k.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof k.afterRender=="function"&&k.afterRender()}},{key:"_getRow",value:function(g){var b=this._config,S=b.generate(g),k=S.height;if(k!==void 0&&d(k)?(S=S.element,k!==this._itemHeights[g]&&(this._itemHeights[g]=k,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):k=this._itemHeights[g],!S||S.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(S,b.rowClassName||"vrow");var N=this._itemPositions[g]+this._scrollPaddingTop;return p.mergeStyle(S,a({position:"absolute"},b.horizontal?"left":"top",N+"px")),S}},{key:"_getScrollPosition",value:function(){var g=this._config;return typeof g.overrideScrollPosition=="function"?g.overrideScrollPosition():this._element[g.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(g){var b=this._config,S=this._element,k=this._getScrollPosition(),N=b.total,A=b.reverse?this._getReverseFrom(k):this._getFrom(k)-1;if((A<0||A-this._screenItemsLen<0)&&(A=0),!g&&this._lastFrom===A)return!1;this._lastFrom=A;var H=A+this._cachedItemsLen;(H>N||H+this._cachedItemsLen>N)&&(H=N);var K=b.useFragment?document.createDocumentFragment():[],W=this._scroller;K[b.useFragment?"appendChild":"push"](W);for(var re=A;re<H;re++){var ae=this._getRow(re);K[b.useFragment?"appendChild":"push"](ae)}if(b.applyPatch)return b.applyPatch(S,K);S.innerHTML="",S.appendChild(K)}},{key:"_computePositions",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,b=this._config,S=b.total,k=b.reverse;g<1&&!k&&(g=1);for(var N=g;N<S;N++)k?N===0?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[N]=this._itemPositions[N-1]-this._itemHeights[N]:this._itemPositions[N]=this._itemHeights[N-1]+this._itemPositions[N-1]}},{key:"_computeScrollHeight",value:function(){var g,b=this,S=this._config,k=!!S.horizontal,N=S.total,A=this._itemHeights.reduce(function(he,Xe){return he+Xe},0)+this._scrollPaddingBottom+this._scrollPaddingTop;p.mergeStyle(this._scroller,(g={opacity:0,position:"absolute",top:"0px"},a(g,k?"height":"width","1px"),a(g,k?"width":"height",A+"px"),g));var H=this._itemHeights.slice(0).sort(function(he,Xe){return he-Xe}),K=Math.floor(N/2),W=N%2===0?(H[K]+H[K-1])/2:H[K],re=k?"clientWidth":"clientHeight",ae=S.scrollContainer?S.scrollContainer:this._element,Ne=ae[re]?ae[re]:this._containerSize;return this._screenItemsLen=Math.ceil(Ne/W),this._containerSize=Ne,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,this._screenItemsLen*3),this._averageHeight=W,S.reverse&&window.requestAnimationFrame(function(){k?b._element.scrollLeft=A:b._element.scrollTop=A}),A}},{key:"_computeScrollPadding",value:function(){var g=this._config,b=!!g.horizontal,S=g.reverse,k=window.getComputedStyle(this._element),N=function(H){var K=k.getPropertyValue("padding-"+H);return parseInt(K,10)||0};return b&&S?{bottom:N("left"),top:N("right")}:b?{bottom:N("right"),top:N("left")}:S?{bottom:N("top"),top:N("bottom")}:{bottom:N("bottom"),top:N("top")}}},{key:"_getFrom",value:function(g){for(var b=0;this._itemPositions[b]<g;)b++;return b}},{key:"_getReverseFrom",value:function(g){for(var b=this._config.total-1;b>0&&this._itemPositions[b]<g+this._containerSize;)b--;return b}}]),p}();o.default=h,r.exports=o.default},{}]},{},[1])(1)})});var une=gt((dne,BS)=>{(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var u=n.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,p=u.createLinearGradient(0,0,n.width,0);for(h in c.barColors)p.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(r*n.width),c.barThickness/2),u.strokeStyle=p,u.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(u){for(var h in u)c.hasOwnProperty(h)&&(c[h]=u[h])},show:function(u){var h,p;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((p=(n=e.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),h="resize",u=t,(p=i).addEventListener?p.addEventListener(h,u,!1):p.attachEvent?p.attachEvent("on"+h,u):p["on"+h]=u),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?r:0)+parseFloat(u)),r=1<u?1:u,t()),r},hide:function(){clearTimeout(l),l=null,o&&(o=!1,s!=null&&(i.cancelAnimationFrame(s),s=null),function u(){return 1<=d.progress("+.1")&&(n.style.opacity-=.05,n.style.opacity<=.05)?(n.style.display="none",void(a=null)):void(a=i.requestAnimationFrame(u))}())}};typeof BS=="object"&&typeof BS.exports=="object"?BS.exports=d:typeof define=="function"&&define.amd?define(function(){return d}):this.topbar=d}).call(dne,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"),u=r.getAttribute("target");c.method=r.getAttribute("data-method")==="get"?"get":"post",c.action=s,c.style.display="none",u?c.target=u: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 a1=i=>typeof i=="function"?i:function(){return i},Eoe=typeof self!="undefined"?self:null,s1=typeof window!="undefined"?window:null,l1=Eoe||s1||l1,Toe="2.0.0",Ia={connecting:0,open:1,closing:2,closed:3},koe=1e4,Ioe=1e3,Fo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Nl={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},n3={longpoll:"longpoll",websocket:"websocket"},Aoe={complete:4},Ib=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})}},vF=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))}},Loe=class{constructor(i,e,t){this.state=Fo.closed,this.topic=i,this.params=a1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ib(this,Nl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new vF(()=>{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=Fo.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Fo.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=Fo.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=Fo.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 Ib(this,Nl.leave,a1({}),this.timeout).send(),this.state=Fo.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Nl.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(Nl.close,i)}onError(i){return this.on(Nl.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 Ib(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=Fo.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Nl.close,"leave")},t=new Ib(this,Nl.leave,a1({}),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=Fo.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===Fo.closed}isErrored(){return this.state===Fo.errored}isJoined(){return this.state===Fo.joined}isJoining(){return this.state===Fo.joining}isLeaving(){return this.state===Fo.leaving}},Lb=class{static request(i,e,t,n,r,o,s){if(l1.XDomainRequest){let a=new l1.XDomainRequest;return this.xdomainRequest(a,i,e,n,r,o,s)}else{let a=new l1.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===Aoe.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)}`}},Moe=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)},i3=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=Ia.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+n3.websocket),"$1/"+n3.longpoll)}endpointURL(){return Lb.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=Ia.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Ia.open||this.readyState===Ia.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=Ia.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){typeof i!="string"&&(i=Moe(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=Ia.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=Lb.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var Ab={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,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.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 u=t.decode(i.slice(a,a+s));a=a+s;let h=i.slice(a,i.byteLength),p={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:Nl.reply,payload:p}},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}}},Mb=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||koe,this.transport=e.transport||l1.WebSocket||i3,this.establishedConnections=0,this.defaultEncoder=Ab.encode.bind(Ab),this.defaultDecoder=Ab.decode.bind(Ab),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==i3?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;s1&&s1.addEventListener&&(s1.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),s1.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=a1(e.params||{}),this.endPoint=`${i}/${n3.websocket}`,this.vsn=e.vsn||Toe,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new vF(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return i3}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=Lb.appendParams(Lb.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=a1(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(),Ioe,"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===Ia.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(Nl.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ia.connecting:return"connecting";case Ia.open:return"open";case Ia.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 Loe(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 UF="consecutive-reloads",Doe=10,Noe=5e3,Roe=1e4,Ooe=3e4,WF=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Bo="data-phx-component",r3="data-phx-link",Poe="track-static",Foe="data-phx-link-state",hs="data-phx-ref",uu="data-phx-ref-src",jF="track-uploads",Zc="data-phx-upload-ref",_3="data-phx-preflighted-refs",Hoe="data-phx-done-refs",_F="drop-target",p3="data-phx-active-refs",jb="phx:live-file:updated",m3="data-phx-skip",bF="data-phx-prune",yF="page-loading",CF="phx-connected",c1="phx-loading",o3="phx-no-feedback",Db="phx-error",SF="phx-client-error",s3="phx-server-error",yf="data-phx-parent-id",b3="data-phx-main",_1="data-phx-root-id",VF="viewport-top",KF="viewport-bottom",Boe="trigger-action",Kb="feedback-for",g3="phx-has-focused",zoe=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],qF=["checkbox","radio"],qb="phx-has-submitted",ed="data-phx-session",Sf=`[${ed}]`,wF="data-phx-sticky",g1="data-phx-static",a3="data-phx-readonly",Nb="data-phx-disabled",v3="disable-with",Rb="data-phx-disable-with-restore",d1="hook",Uoe="debounce",Woe="throttle",Gb="update",l3="stream",u1="data-phx-stream",joe="key",Aa="phxPrivate",xF="auto-recover",Ob="phx:live-socket:debug",c3="phx:live-socket:profiling",d3="phx:live-socket:latency-sim",Voe="progress",EF="mounted",Koe=1,qoe=200,Goe="phx-",$oe=3e4,h1="debounce-trigger",Pb="throttled",TF="debounce-prev-key",Yoe={debounce:300,throttle:300},Fb="d",La="s",Ho="c",kF="e",IF="r",AF="t",Xoe="p",LF="stream",Qoe=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 Pr("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))}},Pr=(i,e)=>console.error&&console.error(i,e),Rl=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Joe(){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 Zoe=(i,e,t,n)=>{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},u3=i=>typeof i=="function"?i:function(){return i},Vb=i=>JSON.parse(JSON.stringify(i)),v1=(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(Sf)));return null},f1=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),ese=(i,e)=>JSON.stringify(i)===JSON.stringify(e),MF=i=>{for(let e in i)return!1;return!0},Jc=(i,e)=>i&&e(i),tse=function(i,e,t,n){i.forEach(r=>{new Qoe(r,t.config.chunk_size,n).upload()})},GF={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&&GF.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}"]`)}},Ma=GF,us={byId(i){return document.getElementById(i)||Pr(`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(Zc)!==null},isAutoUpload(i){return i.hasAttribute("data-phx-auto-upload")},findUploadInputs(i){return this.all(i,`input[type="file"][${Zc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Bo}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&us.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.target&&i.target.getAttribute("method")==="dialog"||i.submitter&&i.submitter.getAttribute("formmethod")==="dialog"?!1:!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:")||i.target.isContentEditable)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(ed,""),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,`[${wF}]`)},findPhxChildren(i,e){return this.all(i,`${Sf}[${yf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Bo}="${o}"] [${Bo}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Bo))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(Sf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(ed)!==null)return!1}},private(i,e){return i[Aa]&&i[Aa][e]},deletePrivate(i,e){i[Aa]&&delete i[Aa][e]},putPrivate(i,e,t){i[Aa]||(i[Aa]={}),i[Aa][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[Aa]&&(i[Aa]=e[Aa])},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 u=parseInt(d),h=()=>c?this.deletePrivate(i,Pb):a(),p=this.incCycle(i,h1,h);if(isNaN(u))return Pr(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let b=this.private(i,TF);this.putPrivate(i,TF,e.key),g=b!==e.key}if(!g&&this.private(i,Pb))return!1;a(),this.putPrivate(i,Pb,!0),setTimeout(()=>{s()&&this.triggerCycle(i,h1)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,h1,p)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let b=m.querySelector(`[name="${g}"]`);this.incCycle(b,h1),this.deletePrivate(b,Pb)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,h1))}},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,g3)||this.private(e,qb))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");us.all(i,r,o=>o.classList.add(o3))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"],
|
|
[${e}="${t.name}"],
|
|
[${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,g3),this.deletePrivate(t,qb),this.all(document,n,r=>{r.classList.add(o3)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,o3)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(yf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(wF)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${yf}]`)[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||us.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(!us.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&&qF.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return zoe.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(hs);if(n===null)return!0;let r=i.getAttribute(uu);return us.isFormInput(i)||i.getAttribute(t)!==null?(us.isUploadInput(i)&&us.mergeAttrs(i,e,{isIgnored:!0}),us.putPrivate(i,hs,e),!1):(WF.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(hs,n),e.setAttribute(uu,r),!0)},cleanChildNodes(i,e){if(us.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Pr(`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",ed,g1,b3,_1]);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=(us.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=us.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},le=us,h3=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(p3).split(",").indexOf(yr.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(_3).split(",").indexOf(yr.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=yr.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(jb,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,()=>{yr.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(jb,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),le.isAutoUpload(this.fileEl)||yr.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(jb,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(p3).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,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Pr(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:tse}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Pr(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},ise=0,yr=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(ise++).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 le.findUploadInputs(i).forEach(t=>{t.getAttribute(_3)!==t.getAttribute(Hoe)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(Zc);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,typeof n.meta=="function"&&(r.meta=n.meta()),t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(Zc),le.putPrivate(i,"files",[])}static untrackFile(i,e){le.putPrivate(i,"files",le.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)));le.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),le.putPrivate(i,"files",e)}static activeFileInputs(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(le.private(i,"files")||[]).filter(e=>h3.isActive(i,e))}static inputsAwaitingPreflight(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!h3.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(yr.filesAwaitingPreflight(i)||[]).map(n=>new h3(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)=>{if(!o.meta)return r;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)}}},nse={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}}},Cf=nse,$F={LiveFileUpload:{activeRefs(){return this.el.getAttribute(p3)},preflightedRefs(){return this.el.getAttribute(_3)},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(jb))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Zc)),yr.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",()=>Cf.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Cf.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Cf.focusFirst(this.el)}}},DF=()=>document.documentElement.scrollTop||document.body.scrollTop,y3=()=>window.innerHeight||document.documentElement.clientHeight,rse=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=y3()},ose=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=y3()},NF=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=y3()};$F.InfiniteScroll={mounted(){let i=DF(),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,NF(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,NF(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=DF();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),u=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),h=this.el.lastElementChild,p=this.el.firstElementChild,m=l<i,g=l>i;m&&d&&!e&&c.top>=0?(e=!0,r(d,p)):g&&e&&c.top<=0&&(e=!1),d&&m&&rse(p)?o(d,p):u&&g&&ose(h)&&s(u,h),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 sse=$F,ase=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=le.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Jc(document.getElementById(e.previousElementId),t=>{Jc(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):Jc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Jc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},RF=11;function lse(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===RF||i.nodeType===RF)){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 Hb,cse="http://www.w3.org/1999/xhtml",co=typeof document=="undefined"?void 0:document,dse=!!co&&"content"in co.createElement("template"),use=!!co&&co.createRange&&"createContextualFragment"in co.createRange();function hse(i){var e=co.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function fse(i){Hb||(Hb=co.createRange(),Hb.selectNode(co.body));var e=Hb.createContextualFragment(i);return e.childNodes[0]}function pse(i){var e=co.createElement("body");return e.innerHTML=i,e.childNodes[0]}function mse(i){return i=i.trim(),dse?hse(i):use?fse(i):pse(i)}function Bb(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 gse(i,e){return!e||e===cse?co.createElement(i):co.createElementNS(e,i)}function vse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function f3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var OF={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)}f3(i,e,"selected")},INPUT:function(i,e){f3(i,e,"checked"),f3(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}}},p1=1,PF=11,FF=3,HF=8;function Qc(){}function _se(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function bse(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=co.createElement("html"),n.innerHTML=o}else n=mse(n);else n.nodeType===PF&&(n=n.firstElementChild);var s=r.getNodeKey||_se,a=r.onBeforeNodeAdded||Qc,l=r.onNodeAdded||Qc,c=r.onBeforeElUpdated||Qc,d=r.onElUpdated||Qc,u=r.onBeforeNodeDiscarded||Qc,h=r.onNodeDiscarded||Qc,p=r.onBeforeElChildrenUpdated||Qc,m=r.skipFromChildren||Qc,g=r.addChild||function(ye,ge){return ye.appendChild(ge)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,ge){if(ye.nodeType===p1)for(var $=ye.firstChild;$;){var Q=void 0;ge&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,ge)),$=$.nextSibling}}function H(ye,ge,$){u(ye)!==!1&&(ge&&ge.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===p1||ye.nodeType===PF)for(var ge=ye.firstChild;ge;){var $=s(ge);$&&(S[$]=ge),K(ge),ge=ge.nextSibling}}K(t);function W(ye){l(ye);for(var ge=ye.firstChild;ge;){var $=ge.nextSibling,Q=s(ge);if(Q){var ie=S[Q];ie&&Bb(ge,ie)?(ge.parentNode.replaceChild(ie,ge),ae(ie,ge)):W(ge)}else W(ge);ge=$}}function re(ye,ge,$){for(;ge;){var Q=ge.nextSibling;($=s(ge))?N($):H(ge,ye,!0),ge=Q}}function ae(ye,ge,$){var Q=s(ge);Q&&delete S[Q],!(!$&&(c(ye,ge)===!1||(i(ye,ge),d(ye),p(ye,ge)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,ge):OF.TEXTAREA(ye,ge))}function Ne(ye,ge){var $=m(ye,ge),Q=ge.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===p1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&Bb(ie,Q),ai&&ae(ie,Q)):(Gi===FF||Gi==HF)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&Bb(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||co)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=OF[ye.nodeName];nn&&nn(ye,ge)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===p1)st===p1?Bb(t,n)||(h(t),he=vse(t,gse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===FF||Xe===HF){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rt<Nt;rt++){var Z=S[k[rt]];Z&&H(Z,Z.parentNode,!1)}}return!b&&he!==t&&t.parentNode&&(he.actualize&&(he=he.actualize(t.ownerDocument||co)),t.parentNode.replaceChild(he,t)),he}}var yse=bse(lse),BF=yse,zb=class{static patchEl(i,e,t){BF(i,e,{childrenOnly:!1,onBeforeElUpdated:(n,r)=>{if(t&&t.isSameNode(n)&&le.isFormInput(n))return le.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=Rl(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(Gb);le.all(this.container,`[${i}=${l3}]`,e=>e.innerHTML=""),le.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(bF,"")})}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&&le.hasSelectionRange(o)?o:{},l=e.binding(Gb),c=e.binding(Kb),d=e.binding(v3),u=e.binding(VF),h=e.binding(KF),p=e.binding(Boe),m=[],g=[],b=[],S=[],k=null,N=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(([A,H,K,W])=>{Object.entries(H).forEach(([re,[ae,Ne]])=>{this.streamInserts[re]={ref:A,streamAt:ae,limit:Ne}}),W!==void 0&&le.all(t,`[${u1}="${A}"]`,re=>{H[re.id]||this.removeStreamChildElement(re)}),K.forEach(re=>{let ae=t.querySelector(`[id="${re}"]`);ae&&this.removeStreamChildElement(ae)})}),BF(r,N,{childrenOnly:r.getAttribute(Bo)===null,getNodeKey:A=>le.isPhxDestroyed(A)?null:A.id,skipFromChildren:A=>A.getAttribute(l)===l3,addChild:(A,H)=>{let{ref:K,streamAt:W,limit:re}=this.getStreamInsert(H);if(K===void 0)return A.appendChild(H);if(le.putSticky(H,u1,he=>he.setAttribute(u1,K)),W===0)A.insertAdjacentElement("afterbegin",H);else if(W===-1)A.appendChild(H);else if(W>0){let he=Array.from(A.children)[W];A.insertBefore(H,he)}let ae=re!==null&&Array.from(A.children),Ne=[];re&&re<0&&ae.length>re*-1?Ne=ae.slice(0,ae.length+re):re&&re>=0&&ae.length>re&&(Ne=ae.slice(re)),Ne.forEach(he=>{this.streamInserts[he.id]||this.removeStreamChildElement(he)})},onBeforeNodeAdded:A=>(le.maybeAddPrivateHooks(A,u,h),this.trackBefore("added",A),A),onNodeAdded:A=>{A.getAttribute&&this.maybeReOrderStream(A),A instanceof HTMLImageElement&&A.srcset?A.srcset=A.srcset:A instanceof HTMLVideoElement&&A.autoplay&&A.play(),le.isNowTriggerFormExternal(A,p)&&(k=A),A.getAttribute&&A.getAttribute("name")&&le.isFormInput(A)&&g.push(A),(le.isPhxChild(A)&&i.ownsElement(A)||le.isPhxSticky(A)&&i.ownsElement(A.parentNode))&&this.trackAfter("phxChildAdded",A),m.push(A)},onNodeDiscarded:A=>this.onNodeDiscarded(A),onBeforeNodeDiscarded:A=>A.getAttribute&&A.getAttribute(bF)!==null?!0:!(A.parentElement!==null&&A.id&&le.isPhxUpdate(A.parentElement,l,[l3,"append","prepend"])||this.maybePendingRemove(A)||this.skipCIDSibling(A)),onElUpdated:A=>{le.isNowTriggerFormExternal(A,p)&&(k=A),b.push(A),this.maybeReOrderStream(A)},onBeforeElUpdated:(A,H)=>{if(le.maybeAddPrivateHooks(H,u,h),le.cleanChildNodes(H,l),this.skipCIDSibling(H)||le.isPhxSticky(A))return!1;if(le.isIgnored(A,l)||A.form&&A.form.isSameNode(k))return this.trackBefore("updated",A,H),le.mergeAttrs(A,H,{isIgnored:!0}),b.push(A),le.applyStickyOperations(A),!1;if(A.type==="number"&&A.validity&&A.validity.badInput)return!1;if(!le.syncPendingRef(A,H,d))return le.isUploadInput(A)&&(this.trackBefore("updated",A,H),b.push(A)),le.applyStickyOperations(A),!1;if(le.isPhxChild(H)){let W=A.getAttribute(ed);return le.mergeAttrs(A,H,{exclude:[g1]}),W!==""&&A.setAttribute(ed,W),A.setAttribute(_1,this.rootID),le.applyStickyOperations(A),!1}return le.copyPrivates(H,A),o&&A.isSameNode(o)&&le.isFormInput(A)&&A.type!=="hidden"?(this.trackBefore("updated",A,H),le.mergeFocusedInput(A,H),le.syncAttrsToProps(A),b.push(A),le.applyStickyOperations(A),g.push(A),!1):(le.isPhxUpdate(H,l,["append","prepend"])&&S.push(new ase(A,H,H.getAttribute(l))),le.syncAttrsToProps(H),le.applyStickyOperations(H),H.getAttribute("name")&&le.isFormInput(H)&&g.push(H),this.trackBefore("updated",A,H),!0)}})}),e.isDebugEnabled()&&Joe(),S.length>0&&e.time("post-morph append/prepend restoration",()=>{S.forEach(A=>A.perform())}),g.forEach(A=>{le.maybeHideFeedback(r,A,c)}),e.silenceEvents(()=>le.restoreFocus(o,s,a)),le.dispatchEvent(document,"phx:update"),m.forEach(A=>this.trackAfter("added",A)),b.forEach(A=>this.trackAfter("updated",A)),this.transitionPendingRemoves(),k&&(e.unload(),Object.getPrototypeOf(k).submit.call(k)),!0}onNodeDiscarded(i){(le.isPhxChild(i)||le.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(le.putSticky(i,u1,r=>r.setAttribute(u1,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=le.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(m3)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=le.findComponentNodeList(this.container,this.targetCID);return t.length===0&&le.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Bo)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=le.cloneNode(n);let[l,...c]=le.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(Bo)!==this.targetCID.toString()&&(d.setAttribute(m3,""),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)}},zF=class{static extract(i){let{[IF]:e,[kF]:t,[AF]:n}=i;return delete i[IF],delete i[kF],delete i[AF],{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[Ho],i);return[e,t]}recursiveToString(i,e=i[Ho],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[Ho]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Ho]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Ho][e]}mergeDiff(i){let e=i[Ho],t={};if(delete i[Ho],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Ho]=this.rendered[Ho]||{},e){let n=this.rendered[Ho];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[Ho]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[La];if(Rl(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[La],o=this.cloneMerge(l,e),o[La]=s}else o=e[La]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[La]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];f1(n)&&n[La]===void 0&&f1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=Re(Re({},i),e);for(let n in t){let r=e[n],o=i[n];f1(r)&&r[La]===void 0&&f1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Ho],i,null,!1);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Ho][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[La]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[Fb])return this.comprehensionToBuffer(i,e,t);let{[La]: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{[Fb]:n,[La]:r,[LF]:o}=i,[s,a,l,c]=o||[null,{},[],null];r=this.templateStatic(r,e);let d=e||i[Xoe];for(let u=0;u<n.length;u++){let h=n[u];t.buffer+=r[0];for(let p=1;p<r.length;p++)this.dynamicToBuffer(h[p-1],d,t),t.buffer+=r[p]}o!==void 0&&(i[Fb].length>0||l.length>0||c)&&(delete i[LF],i[Fb]=[],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 f1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t,n=!0){let r=i[e]||Pr(`no component for CID ${e}`,i),o=document.createElement("template"),[s,a]=this.recursiveToString(r,i,t);o.innerHTML=s;let l=o.content,c=t&&!t.has(e),[d,u]=Array.from(l.childNodes).reduce(([h,p],m,g)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Bo)?[h,!0]:(m.setAttribute(Bo,e),m.id||(m.id=`${this.parentViewId()}-${e}-${g}`),c&&(m.setAttribute(m3,""),m.innerHTML=""),[!0,p]):m.nodeType===Node.COMMENT_NODE?(n||m.remove(),[h,p]):m.nodeValue.trim()!==""?(Pr(`only HTML element tags are allowed at the root of components.
|
|
|
|
got: "${m.nodeValue.trim()}"
|
|
|
|
within:
|
|
`,o.innerHTML.trim()),m.replaceWith(this.createSpan(m.nodeValue,e)),[!0,p]):(m.remove(),[h,p]),[!1,!1]);return!d&&!u?(Pr(`expected at least one HTML element tag inside a component, but the component is empty:
|
|
`,o.innerHTML.trim()),[this.createSpan("",e).outerHTML,a]):!d&&u?(Pr("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.",o.innerHTML.trim()),[o.innerHTML,a]):[o.innerHTML,a]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Bo,e),t}},Cse=1,m1=class{static makeID(){return Cse++}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(null,i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,(n,r)=>{n.dispatchUploads(r,e,t)})}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Ub=null,Sse={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?le.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,le.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:u,dispatcher:h,callback:p}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:n,b=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(b,(S,k)=>{if(i==="change"){let{newCid:N,_target:A}=o;A=A||(le.isFormInput(n)?n.name:void 0),A&&(m._target=A),S.pushInput(n,k,N,s||e,m,p)}else if(i==="submit"){let{submitter:N}=o;S.submitForm(n,k,s||e,N,m,p)}else S.pushEvent(i,n,k,s||e,a,m,p)})},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(()=>Cf.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>Cf.focusFirstInteractive(r)||Cf.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Ub=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Ub&&Ub.focus(),Ub=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,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let p=()=>{this.addOrRemoveClasses(t,u,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,h,u))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),le.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let p=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=n||this.defaultDisplay(t);le.putSticky(t,"toggle",g=>g.style.display=m),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,p,()=>{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")),le.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let p=n||this.defaultDisplay(t);le.putSticky(t,"toggle",m=>m.style.display=p),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).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,l,a))})},d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=le.getSticky(i,"classes",[[],[]]),u=e.filter(g=>c.indexOf(g)<0&&!i.classList.contains(g)),h=t.filter(g=>d.indexOf(g)<0&&i.classList.contains(g)),p=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);le.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...p),[p,m]))})},setOrRemoveAttrs(i,e,t){let[n,r]=le.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);le.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?le.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ps=Sse,Wb=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=aa(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,u)=>{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()},YF=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}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||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(b3)}connectParams(i){let e=this.liveSocket.params(this.el),t=le.all(document,`[${this.binding(Poe)}]`).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(ed)}getStatic(){let i=this.el.getAttribute(g1);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])};le.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(CF,c1,Db,SF,s3),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(c1)}}execAll(i){le.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(CF),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(Rl(i))le.findComponentNodeList(this.el,i).length===0?Pr(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Pr(`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,()=>["",Vb(e)]);let{diff:n,reply:r,events:o,title:s}=zF.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>le.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=le.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,Ma.dropLocal(this.liveSocket.localStorage,window.location.pathname,UF),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new zF(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],u)=>{this.pushFormRecovery(l,d,h=>{u===a.length-1&&this.onJoinComplete(h,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){le.all(document,`[${uu}="${this.id}"][${hs}]`,i=>{i.removeAttribute(hs),i.removeAttribute(uu)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);le.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(g1);return a&&o.setAttribute(g1,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=le.byId(this.id),this.el.setAttribute(_1,this.root.id)}execNewMounted(){let i=this.binding(VF),e=this.binding(KF);le.all(this.el,`[${i}], [${e}]`,t=>{le.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(d1)}], [data-phx-${d1}]`,t=>{this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(EF)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new zb(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&&le.isIgnored(i,this.binding(Gb));if(t&&!i.isEqualNode(e)&&!(n&&ese(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(EF)),t=e&&le.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),le.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=>{le.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=le.all(n,`[${Bo}]`),o=le.all(n,`[${this.binding(d1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);Rl(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(){le.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(yf)][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 YF(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",()=>{le.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):MF(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new zb(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(MF(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new zb(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[m1.elementID(i)]}addHook(i){if(m1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${d1}`)||i.getAttribute(this.binding(d1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Pr(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new m1(this,i,t);return this.viewHooks[m1.elementID(n.el)]=n,n}else e!==null&&Pr(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[m1.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"){this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.isMain()&&this.onRedirect({to:this.href});return}else if(i.reason==="unauthorized"||i.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.isMain()&&this.onRedirect({to:this.href});return}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([c1,Db,s3]),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(qoe)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([c1,Db,s3]):this.displayError([c1,Db,SF]))}displayError(i){this.isMain()&&le.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(yF))!==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,$oe).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:u,events:h})=>{r!==null&&this.undoRefs(r),this.update(d,h),c(u)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&le.all(document,`[${uu}="${this.id}"][${hs}="${i}"]`,e=>{let t=e.getAttribute(Nb);e.removeAttribute(hs),e.removeAttribute(uu),e.getAttribute(a3)!==null&&(e.readOnly=!1,e.removeAttribute(a3)),t!==null&&(e.disabled=t==="true",e.removeAttribute(Nb)),WF.forEach(o=>le.removeClass(e,o));let n=e.getAttribute(Rb);n!==null&&(e.innerText=n,e.removeAttribute(Rb));let r=le.private(e,hs);if(r){let o=this.triggerBeforeUpdateHook(e,r);zb.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),le.deletePrivate(e,hs)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(v3);return t.loading&&(i=i.concat(le.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(hs,n),o.setAttribute(uu,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(Rb)||o.setAttribute(Rb,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Bo);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Rl(e))return e;let n=i.getAttribute(this.binding("target"));return Rl(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Rl(i)?i:i?Jc(i.closest(`[${Bo}]`),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"&&qF.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(Voe)),ref:i.getAttribute(Zc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=Rl(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=Wb(i.form,Re({_target:r._target},d),[i.name]):c=Wb(i.form,Re({_target:r._target},d)),le.isUploadInput(i)&&i.files&&i.files.length>0&&yr.trackFiles(i,Array.from(i.files)),s=yr.serializeUploads(i);let u={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(le.showError(i,this.liveSocket.binding(Kb)),le.isUploadInput(i)&&le.isAutoUpload(i)){if(yr.filesAwaitingPreflight(i).length>0){let[p,m]=l();this.uploadFiles(i.form,e,p,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}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=>!(v1(d,`${this.binding(Gb)}=ignore`,d.form)||v1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(v3)),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(Nb,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(a3,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(Nb,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(yF),""),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(yr.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(yr.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),p=Wb(i,Re({submitter:n},h));this.pushWithReply(d,"event",{type:"form",event:t,value:p,cid:a},o)})}else if(!(i.hasAttribute(hs)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Wb(i,Re({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=yr.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new yr(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(Zc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",u]),this.pushWithReply(null,"allow_upload",u,h=>{if(this.log("upload",()=>["got preflight response",h]),h.error){this.undoRefs(t);let[p,m]=h.error;this.log("upload",()=>[`error for entry ${p}`,m])}else{let p=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,p,this.liveSocket)}})})}dispatchUploads(i,e,t){let n=this.targetCtxElement(i)||this.el,r=le.findUploadInputs(n).filter(o=>o.name===e);r.length===0?Pr(`no live file inputs found matching the name "${e}"`):r.length>1?Pr(`duplicate live file inputs found matching the name "${e}"`):le.dispatchEvent(r[0],jF,{detail:{files:t}})}targetCtxElement(i){if(Rl(i)){let[e]=le.findComponentNodeList(this.el,i);return e}else return i||null}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>le.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;s.forEach(c=>c.hasAttribute(Zc)&&yr.clearFiles(c));let a=s.find(c=>c.type!=="hidden")||s[0],l=i.getAttribute(this.binding(xF))||i.getAttribute(this.binding("change"));Ps.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=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i,a=this.pushWithReply(r,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});a?a.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,le.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(xF))!=="ignore").map(n=>{let r=n.getAttribute(e).replaceAll(/([\[\]"])/g,"\\$1"),o=t.content.querySelector(`form[id="${n.id}"][${e}="${r}"]`);return o?[n,o,this.targetComponentID(o)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>le.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=>le.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(Sf);return i.getAttribute(yf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){le.putPrivate(i,qb,!0);let o=this.liveSocket.binding(Kb),s=Array.from(i.elements);s.forEach(a=>le.putPrivate(a,qb,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>le.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},XF=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||Goe,this.opts=t,this.params=u3(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(Vb(Yoe),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=Vb(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Koe,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||Doe,this.reloadJitterMin=t.reloadJitterMin||Noe,this.reloadJitterMax=t.reloadJitterMax||Roe,this.failsafeJitter=t.failsafeJitter||Ooe,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:u3(),onBeforeElUpdated:u3()},t.dom||{}),this.transitions=new wse,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(c3)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Ob)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Ob)==="false"}enableDebug(){this.sessionStorage.setItem(Ob,"true")}enableProfiling(){this.sessionStorage.setItem(c3,"true")}disableDebug(){this.sessionStorage.setItem(Ob,"false")}disableProfiling(){this.sessionStorage.removeItem(c3)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(d3,i)}disableLatencySim(){this.sessionStorage.removeItem(d3)}getLatencySim(){let i=this.sessionStorage.getItem(d3);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=>Ps.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{Ps.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();Zoe(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=Ma.updateLocal(this.localStorage,window.location.pathname,UF,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.")?sse[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 le.all(document,`${Sf}:not([${yf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(b3)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),Ma.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=le.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(()=>{le.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(n)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||le.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(ed)!==null}newRootView(i,e,t){let n=new YF(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=Jc(i.closest(Sf),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(_1);return Jc(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(_1));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(joe)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=Re({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=Re({key:e.key},this.eventMeta(t,e,r));Ps.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);Ps.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Jc(v1(e.target,this.binding(_F)),o=>o.getAttribute(this.binding(_F))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(yr.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(jF,e=>{let t=e.target;if(!le.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);yr.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)})}):le.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=v1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&le.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(hs)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{Ps.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");le.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);Ps.isVisible(n)&&Ps.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!Ma.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{Ma.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;le.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),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=v1(e.target,r3),n=t&&t.getAttribute(r3);if(!n||!this.isConnected()||!this.main||le.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(Foe);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 ${r3} 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={}){le.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){le.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>le.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return Ma.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)&&(Ma.pushState(e,{type:"patch",id:this.main.id},i),le.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return Ma.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,o=>{o===this.linkRef&&(Ma.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),le.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),r()})})}replaceRootHistory(){Ma.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=Vb(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(()=>{le.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){le.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{Ps.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:u,type:h}=le.private(o,"prev-iteration")||{};u===d-1&&t==="change"&&h==="input"||(le.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,p=>{le.putPrivate(o,g3,!0),le.isTextualInput(o)||this.setActiveElement(o),Ps.exec("change",l,p,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;le.resetForm(n,this.binding(Kb));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(Uoe),o=this.binding(Woe),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);le.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)})}},wse=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 QF="livebook:";function hu(i){try{let e=localStorage.getItem(QF+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function wf(i,e){try{let t=JSON.stringify(e);localStorage.setItem(QF+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var JF="app_auth_token:";function ZF(i,e){wf(JF+i,e)}function eH(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=hu(JF+e);if(t)return t}return null}var xse={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{ZF(i,e),this.pushEvent("app_auth_persisted")})}},tH=xse;function vt(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 _i(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function Ol(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 uo(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}function iH(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,u=0;function h(S){o.setUint32(u,S,!1),u+=4}function p(S){o.setUint32(u,S,!0),u+=4}function m(S){o.setUint16(u,S,!0),u+=2}function g(S){o.setFloat32(u,S,!0),u+=4}h(1380533830),p(36+d),h(1463899717),h(1718449184),p(16),m(3),m(e),p(t),p(c),m(l),m(a*8),h(1684108385),p(d);let b=new Float32Array(i);for(let S=0;S<b.length;S++)g(b[S]);return r}var b1=4;function nH(i,e){let n=new TextEncoder().encode(JSON.stringify(i)),r=new ArrayBuffer(b1+n.byteLength+e.byteLength);return new DataView(r).setUint32(0,n.byteLength),new Uint8Array(r,b1,n.byteLength).set(n),new Uint8Array(r,b1+n.byteLength).set(new Uint8Array(e)),r}function rH(i){let t=new DataView(i).getUint32(0),n=new Uint8Array(i,b1,t),r=i.slice(b1+t),o=new TextDecoder;return[JSON.parse(o.decode(n)),r]}var C3=["bg-yellow-100","border-yellow-300"],Ese={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.audioEl.src=this.props.audioUrl,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(...C3)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...C3)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...C3)}),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(),this.audioEl.src=this.props.audioUrl},getProps(){return{id:vt(this.el,"data-id"),phxTarget:vt(this.el,"data-phx-target",uo),samplingRate:vt(this.el,"data-sampling-rate",uo),endianness:vt(this.el,"data-endianness"),format:vt(this.el,"data-format"),audioUrl:_i(this.el,"data-audio-url",null)}},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){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=Tse(t);this.pushAudio(n)})},pushAudio(i){let e={num_channels:i.numChannels,sampling_rate:i.samplingRate},t=this.encodeAudio(i),n=new Blob([t]);n.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[n])},encodeAudio(i){if(this.props.format==="pcm_f32")return kse(i.data,this.props.endianness);if(this.props.format==="wav")return iH(i.data,i.numChannels,i.samplingRate)}};function Tse(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 kse(i,e){if(Ise()===e)return i;for(let t=0;t<i.byteLength/4;t++){let n=i[t],r=i[t+1],o=i[t+2],s=i[t+3];i[t]=s,i[t+1]=o,i[t+2]=r,i[t+3]=n}return i}function Ise(){let i=new ArrayBuffer(2),e=new Uint16Array(i),t=new Uint8Array(i);return e[0]=1,t[0]===1?"little":"big"}var oH=Ese;var sH=11;function Ase(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===sH||i.nodeType===sH)){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 $b,Lse="http://www.w3.org/1999/xhtml",ho=typeof document=="undefined"?void 0:document,Mse=!!ho&&"content"in ho.createElement("template"),Dse=!!ho&&ho.createRange&&"createContextualFragment"in ho.createRange();function Nse(i){var e=ho.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Rse(i){$b||($b=ho.createRange(),$b.selectNode(ho.body));var e=$b.createContextualFragment(i);return e.childNodes[0]}function Ose(i){var e=ho.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Pse(i){return i=i.trim(),Mse?Nse(i):Dse?Rse(i):Ose(i)}function Yb(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 Fse(i,e){return!e||e===Lse?ho.createElement(i):ho.createElementNS(e,i)}function Hse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function S3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var aH={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)}S3(i,e,"selected")},INPUT:function(i,e){S3(i,e,"checked"),S3(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}}},y1=1,lH=11,cH=3,dH=8;function td(){}function Bse(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function zse(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=ho.createElement("html"),n.innerHTML=o}else n=Pse(n);else n.nodeType===lH&&(n=n.firstElementChild);var s=r.getNodeKey||Bse,a=r.onBeforeNodeAdded||td,l=r.onNodeAdded||td,c=r.onBeforeElUpdated||td,d=r.onElUpdated||td,u=r.onBeforeNodeDiscarded||td,h=r.onNodeDiscarded||td,p=r.onBeforeElChildrenUpdated||td,m=r.skipFromChildren||td,g=r.addChild||function(ye,ge){return ye.appendChild(ge)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,ge){if(ye.nodeType===y1)for(var $=ye.firstChild;$;){var Q=void 0;ge&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,ge)),$=$.nextSibling}}function H(ye,ge,$){u(ye)!==!1&&(ge&&ge.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===y1||ye.nodeType===lH)for(var ge=ye.firstChild;ge;){var $=s(ge);$&&(S[$]=ge),K(ge),ge=ge.nextSibling}}K(t);function W(ye){l(ye);for(var ge=ye.firstChild;ge;){var $=ge.nextSibling,Q=s(ge);if(Q){var ie=S[Q];ie&&Yb(ge,ie)?(ge.parentNode.replaceChild(ie,ge),ae(ie,ge)):W(ge)}else W(ge);ge=$}}function re(ye,ge,$){for(;ge;){var Q=ge.nextSibling;($=s(ge))?N($):H(ge,ye,!0),ge=Q}}function ae(ye,ge,$){var Q=s(ge);Q&&delete S[Q],!(!$&&(c(ye,ge)===!1||(i(ye,ge),d(ye),p(ye,ge)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,ge):aH.TEXTAREA(ye,ge))}function Ne(ye,ge){var $=m(ye),Q=ge.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===y1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&Yb(ie,Q),ai&&ae(ie,Q)):(Gi===cH||Gi==dH)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&Yb(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||ho)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=aH[ye.nodeName];nn&&nn(ye,ge)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===y1)st===y1?Yb(t,n)||(h(t),he=Hse(t,Fse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===cH||Xe===dH){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rt<Nt;rt++){var Z=S[k[rt]];Z&&H(Z,Z.parentNode,!1)}}return!b&&he!==t&&t.parentNode&&(he.actualize&&(he=he.actualize(t.ownerDocument||ho)),t.parentNode.replaceChild(he,t)),he}}var Use=zse(Ase),uH=Use;function w3(i){if(i)throw i}var LH=Hi(x3(),1),M3=Hi(CH(),1);function C1(i){if(Object.prototype.toString.call(i)!=="[object Object]")return!1;let e=Object.getPrototypeOf(i);return e===null||e===Object.prototype}function SH(){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],u=-1;if(l){s(l);return}for(;++u<r.length;)(c[u]===null||c[u]===void 0)&&(c[u]=r[u]);r=c,d?Wse(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 Wse(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 TH=Hi(x3(),1);var Xr=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=ON(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}};Xr.prototype.file="";Xr.prototype.name="";Xr.prototype.reason="";Xr.prototype.message="";Xr.prototype.stack="";Xr.prototype.fatal=null;Xr.prototype.column=null;Xr.prototype.line=null;Xr.prototype.source=null;Xr.prototype.ruleId=null;Xr.prototype.position=null;var Fs={basename:jse,dirname:Vse,extname:Kse,join:qse,sep:"/"};function jse(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');S1(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 Vse(i){if(S1(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 Kse(i){S1(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 qse(...i){let e=-1,t;for(;++e<i.length;)S1(i[e]),i[e]&&(t=t===void 0?i[e]:t+"/"+i[e]);return t===void 0?".":Gse(t)}function Gse(i){S1(i);let e=i.charCodeAt(0)===47,t=$se(i,!e);return t.length===0&&!e&&(t="."),t.length>0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function $se(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 S1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var wH={cwd:Yse};function Yse(){return"/"}function xf(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function xH(i){if(typeof i=="string")i=new URL(i);else if(!xf(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 Xse(i)}function Xse(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 E3=["history","path","basename","stem","extname","dirname"],w1=class{constructor(e){let t;e?typeof e=="string"||(0,TH.default)(e)?t={value:e}:xf(e)?t={path:e}:t=e:t={},this.data={},this.messages=[],this.history=[],this.cwd=wH.cwd(),this.value,this.stored,this.result,this.map;let n=-1;for(;++n<E3.length;){let o=E3[n];o in t&&t[o]!==void 0&&(this[o]=o==="history"?[...t[o]]:t[o])}let r;for(r in t)E3.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){xf(e)&&(e=xH(e)),k3(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return typeof this.path=="string"?Fs.dirname(this.path):void 0}set dirname(e){EH(this.basename,"dirname"),this.path=Fs.join(e||"",this.basename)}get basename(){return typeof this.path=="string"?Fs.basename(this.path):void 0}set basename(e){k3(e,"basename"),T3(e,"basename"),this.path=Fs.join(this.dirname||"",e)}get extname(){return typeof this.path=="string"?Fs.extname(this.path):void 0}set extname(e){if(T3(e,"extname"),EH(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=Fs.join(this.dirname,this.stem+(e||""))}get stem(){return typeof this.path=="string"?Fs.basename(this.path,this.extname):void 0}set stem(e){k3(e,"stem"),T3(e,"stem"),this.path=Fs.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,n){let r=new Xr(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 T3(i,e){if(i&&i.includes(Fs.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Fs.sep+"`")}function k3(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function EH(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}var Qb=DH().freeze(),MH={}.hasOwnProperty;function DH(){let i=SH(),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=u,o.runSync=h,o.process=p,o.processSync=m,o;function o(){let g=DH(),b=-1;for(;++b<e.length;)g.use(...e[b]);return g.data((0,M3.default)(!0,{},t)),g}function s(g,b){return typeof g=="string"?arguments.length===2?(L3("data",n),t[g]=b,o):MH.call(t,g)&&t[g]||null:g?(L3("data",n),t=g,o):t}function a(){if(n)return o;for(;++r<e.length;){let[g,...b]=e[r];if(b[0]===!1)continue;b[0]===!0&&(b[0]=void 0);let S=g.call(o,...b);typeof S=="function"&&i.use(S)}return n=!0,r=Number.POSITIVE_INFINITY,o}function l(g,...b){let S;if(L3("use",n),g!=null)if(typeof g=="function")H(g,...b);else if(typeof g=="object")Array.isArray(g)?A(g):N(g);else throw new TypeError("Expected usable value, not `"+g+"`");return S&&(t.settings=Object.assign(t.settings||{},S)),o;function k(K){if(typeof K=="function")H(K);else if(typeof K=="object")if(Array.isArray(K)){let[W,...re]=K;H(W,...re)}else N(K);else throw new TypeError("Expected usable value, not `"+K+"`")}function N(K){A(K.plugins),K.settings&&(S=Object.assign(S||{},K.settings))}function A(K){let W=-1;if(K!=null)if(Array.isArray(K))for(;++W<K.length;){let re=K[W];k(re)}else throw new TypeError("Expected a list of plugins, not `"+K+"`")}function H(K,W){let re=-1,ae;for(;++re<e.length;)if(e[re][0]===K){ae=e[re];break}ae?(C1(ae[1])&&C1(W)&&(W=(0,M3.default)(!0,ae[1],W)),ae[1]=W):e.push([...arguments])}}function c(g){o.freeze();let b=x1(g),S=o.Parser;return I3("parse",S),kH(S,"parse")?new S(String(b),b).parse():S(String(b),b)}function d(g,b){o.freeze();let S=x1(b),k=o.Compiler;return A3("stringify",k),IH(g),kH(k,"compile")?new k(g,S).compile():k(g,S)}function u(g,b,S){if(IH(g),o.freeze(),!S&&typeof b=="function"&&(S=b,b=void 0),!S)return new Promise(k);k(null,S);function k(N,A){i.run(g,x1(b),H);function H(K,W,re){W=W||g,K?A(K):N?N(W):S(null,W,re)}}}function h(g,b){let S,k;return o.run(g,b,N),AH("runSync","run",k),S;function N(A,H){w3(A),S=H,k=!0}}function p(g,b){if(o.freeze(),I3("process",o.Parser),A3("process",o.Compiler),!b)return new Promise(S);S(null,b);function S(k,N){let A=x1(g);o.run(o.parse(A),A,(K,W,re)=>{if(K||!W||!re)H(K);else{let ae=o.stringify(W,re);ae==null||(Zse(ae)?re.value=ae:re.result=ae),H(K,re)}});function H(K,W){K||!W?N(K):k?k(W):b(null,W)}}}function m(g){let b;o.freeze(),I3("processSync",o.Parser),A3("processSync",o.Compiler);let S=x1(g);return o.process(S,k),AH("processSync","process",b),S;function k(N){b=!0,w3(N)}}}function kH(i,e){return typeof i=="function"&&i.prototype&&(Qse(i.prototype)||e in i.prototype)}function Qse(i){let e;for(e in i)if(MH.call(i,e))return!0;return!1}function I3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function A3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function L3(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 IH(i){if(!C1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function AH(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function x1(i){return Jse(i)?i:new w1(i)}function Jse(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function Zse(i){return typeof i=="string"||(0,LH.default)(i)}function Jb(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return UN(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var eae={tokenize:rae,partial:!0},RH={tokenize:oae,partial:!0},OH={tokenize:sae,partial:!0},Ef={tokenize:lae,partial:!0},PH={tokenize:aae,partial:!0},FH={tokenize:iae,previous:zH},HH={tokenize:nae,previous:R3},Pl={tokenize:tae,previous:UH},Da={},D3={text:Da},fu=48;for(;fu<123;)Da[fu]=Pl,fu++,fu===58?fu=65:fu===91&&(fu=97);Da[43]=Pl;Da[45]=Pl;Da[46]=Pl;Da[95]=Pl;Da[72]=[Pl,HH];Da[104]=[Pl,HH];Da[87]=[Pl,FH];Da[119]=[Pl,FH];function tae(i,e,t){let n=this,r,o;return s;function s(p){return!NH(p)||!UH(n.previous)||O3(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(p))}function a(p){return NH(p)?(i.consume(p),a):p===64?(i.consume(p),l):t(p)}function l(p){return p===46?i.check(Ef,h,c)(p):p===45||p===95?i.check(Ef,t,d)(p):qh(p)?(!o&&FN(p)&&(o=!0),i.consume(p),l):h(p)}function c(p){return i.consume(p),r=!0,o=void 0,l}function d(p){return i.consume(p),u}function u(p){return p===46?i.check(Ef,t,c)(p):l(p)}function h(p){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(p)):t(p)}}function iae(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!zH(n.previous)||O3(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(eae,i.attempt(RH,i.attempt(OH,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function nae(i,e,t){let n=this;return r;function r(m){return m!==72&&m!==104||!R3(n.previous)||O3(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(m),o)}function o(m){return m===84||m===116?(i.consume(m),s):t(m)}function s(m){return m===84||m===116?(i.consume(m),a):t(m)}function a(m){return m===80||m===112?(i.consume(m),l):t(m)}function l(m){return m===83||m===115?(i.consume(m),c):c(m)}function c(m){return m===58?(i.consume(m),d):t(m)}function d(m){return m===47?(i.consume(m),u):t(m)}function u(m){return m===47?(i.consume(m),h):t(m)}function h(m){return m===null||$S(m)||wm(m)||xm(m)?t(m):i.attempt(RH,i.attempt(OH,p),t)(m)}function p(m){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(m)}}function rae(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||fn(l)?t(l):e(l)}}function oae(i,e,t){let n,r;return o;function o(l){return l===38?i.check(PH,a,s)(l):l===46||l===95?i.check(Ef,a,s)(l):l===null||$S(l)||wm(l)||l!==45&&xm(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 sae(i,e){let t=0;return n;function n(s){return s===38?i.check(PH,e,r)(s):(s===40&&t++,s===41?i.check(Ef,o,r)(s):N3(s)?e(s):BH(s)?i.check(Ef,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 aae(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return GS(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return N3(s)?e(s):t(s)}}function lae(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return BH(o)?(i.consume(o),r):N3(o)?e(o):t(o)}}function BH(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 N3(i){return i===null||i===60||Zo(i)}function NH(i){return i===43||i===45||i===46||i===95||qh(i)}function zH(i){return i===null||i===40||i===42||i===95||i===126||Zo(i)}function R3(i){return i===null||!GS(i)}function UH(i){return i!==47&&R3(i)}function O3(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 cae={'"':"quot","&":"amp","<":"lt",">":"gt"};function WH(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+cae[t]+";"}}function Zb(i,e){let t=WH(dae(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 dae(i){let e=[],t=-1,n=0,r=0;for(;++t<i.length;){let o=i.charCodeAt(t),s="";if(o===37&&qh(i.charCodeAt(t+1))&&qh(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 uae={tokenize:_ae,partial:!0};function P3(){return{document:{91:{tokenize:mae,continuation:{tokenize:gae},exit:vae}},text:{91:{tokenize:pae},93:{add:"after",tokenize:hae,resolveTo:fae}}}}function hae(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=Xd(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 fae(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 pae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(h){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?t(h):(i.enter("gfmFootnoteCallMarker"),i.consume(h),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(h){let p;return h===null||h===91||o++>999?t(h):h===93?s?(i.exit("chunkString"),p=i.exit("gfmFootnoteCallString"),r.includes(Xd(n.sliceSerialize(p)))?u(h):t(h)):t(h):(i.consume(h),Zo(h)||(s=!0),h===92?d:c)}function d(h){return h===91||h===92||h===93?(i.consume(h),o++,c):c(h)}function u(h){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function mae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(g){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(g)}function d(g){let b;return g===null||g===91||s>999?t(g):g===93?a?(b=i.exit("gfmFootnoteDefinitionLabelString"),o=Xd(n.sliceSerialize(b)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),p):t(g):fn(g)?(i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",u(g))}function u(g){return g===null||fn(g)||g===91||g===93||s>999?(i.exit("chunkString"),d(g)):(Zo(g)||(a=!0),s++,i.consume(g),g===92?h:u)}function h(g){return g===91||g===92||g===93?(i.consume(g),s++,u):u(g)}function p(g){return g===58?(i.enter("definitionMarker"),i.consume(g),i.exit("definitionMarker"),so(i,m,"gfmFootnoteDefinitionWhitespace")):t(g)}function m(g){return r.includes(o)||r.push(o),e(g)}}function gae(i,e,t){return i.check(BN,e,i.attempt(uae,e,t))}function vae(i){i.exit("gfmFootnoteDefinition")}function _ae(i,e,t){let n=this;return so(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 F3(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)},u=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",d,s]];a_(u,u.length,0,HN(s.parser.constructs.insideSpan.null,o.slice(l+1,a),s)),a_(u,u.length,0,[["exit",d,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",c,s]]),a_(o,l-1,a-l+3,u),a=l+u.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 u;function u(p){return l===126&&c[c.length-1][1].type!=="characterEscape"?a(p):(o.enter("strikethroughSequenceTemporary"),h(p))}function h(p){let m=YS(l);if(p===126)return d>1?a(p):(o.consume(p),d++,h);if(d<2&&!e)return a(p);let g=o.exit("strikethroughSequenceTemporary"),b=YS(p);return g._open=!b||b===2&&!!m,g._close=!m||m===2&&!!b,s(p)}}}var H3={flow:{null:{tokenize:yae,resolve:bae}}},jH={tokenize:Cae,partial:!0};function bae(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 u={type:"tableContent",start:i[s][1].start,end:i[a][1].end},h={type:"chunkText",start:u.start,end:u.end,contentType:"text"};i.splice(s,a-s+1,["enter",u,e],["enter",h,e],["exit",h,e],["exit",u,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 u={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",u,e]),i.splice(l,0,["enter",u,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 yae(i,e,t){let n=this,r=[],o=0,s,a;return l;function l(Z){return i.enter("table")._align=r,i.enter("tableHead"),i.enter("tableRow"),Z===124?c(Z):(o++,i.enter("temporaryTableCellContent"),h(Z))}function c(Z){return i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),s=!0,d}function d(Z){return Z===null||fn(Z)?m(Z):Dc(Z)?(i.enter("whitespace"),i.consume(Z),u):(s&&(s=void 0,o++),Z===124?c(Z):(i.enter("temporaryTableCellContent"),h(Z)))}function u(Z){return Dc(Z)?(i.consume(Z),u):(i.exit("whitespace"),d(Z))}function h(Z){return Z===null||Z===124||Zo(Z)?(i.exit("temporaryTableCellContent"),d(Z)):(i.consume(Z),Z===92?p:h)}function p(Z){return Z===92||Z===124?(i.consume(Z),h):h(Z)}function m(Z){if(Z===null)return t(Z);i.exit("tableRow"),i.exit("tableHead");let ye=n.interrupt;return n.interrupt=!0,i.attempt({tokenize:Nt,partial:!0},function(ge){return n.interrupt=ye,i.enter("tableDelimiterRow"),g(ge)},function(ge){return n.interrupt=ye,t(ge)})(Z)}function g(Z){return Z===null||fn(Z)?A(Z):Dc(Z)?(i.enter("whitespace"),i.consume(Z),b):Z===45?(i.enter("tableDelimiterFiller"),i.consume(Z),a=!0,r.push("none"),S):Z===58?(i.enter("tableDelimiterAlignment"),i.consume(Z),i.exit("tableDelimiterAlignment"),r.push("left"),k):Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),g):t(Z)}function b(Z){return Dc(Z)?(i.consume(Z),b):(i.exit("whitespace"),g(Z))}function S(Z){return Z===45?(i.consume(Z),S):(i.exit("tableDelimiterFiller"),Z===58?(i.enter("tableDelimiterAlignment"),i.consume(Z),i.exit("tableDelimiterAlignment"),r[r.length-1]=r[r.length-1]==="left"?"center":"right",N):g(Z))}function k(Z){return Z===45?(i.enter("tableDelimiterFiller"),i.consume(Z),a=!0,S):t(Z)}function N(Z){return Z===null||fn(Z)?A(Z):Dc(Z)?(i.enter("whitespace"),i.consume(Z),b):Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),g):t(Z)}function A(Z){return i.exit("tableDelimiterRow"),!a||o!==r.length?t(Z):Z===null?H(Z):i.check(jH,H,i.attempt({tokenize:Nt,partial:!0},so(i,K,"linePrefix",4),H))(Z)}function H(Z){return i.exit("table"),e(Z)}function K(Z){return i.enter("tableBody"),W(Z)}function W(Z){return i.enter("tableRow"),Z===124?re(Z):(i.enter("temporaryTableCellContent"),he(Z))}function re(Z){return i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),ae}function ae(Z){return Z===null||fn(Z)?st(Z):Dc(Z)?(i.enter("whitespace"),i.consume(Z),Ne):Z===124?re(Z):(i.enter("temporaryTableCellContent"),he(Z))}function Ne(Z){return Dc(Z)?(i.consume(Z),Ne):(i.exit("whitespace"),ae(Z))}function he(Z){return Z===null||Z===124||Zo(Z)?(i.exit("temporaryTableCellContent"),ae(Z)):(i.consume(Z),Z===92?Xe:he)}function Xe(Z){return Z===92||Z===124?(i.consume(Z),he):he(Z)}function st(Z){return i.exit("tableRow"),Z===null?rt(Z):i.check(jH,rt,i.attempt({tokenize:Nt,partial:!0},so(i,W,"linePrefix",4),rt))(Z)}function rt(Z){return i.exit("tableBody"),H(Z)}function Nt(Z,ye,ge){return $;function $(ie){return Z.enter("lineEnding"),Z.consume(ie),Z.exit("lineEnding"),so(Z,Q,"linePrefix")}function Q(ie){if(n.parser.lazy[n.now().line]||ie===null||fn(ie))return ge(ie);let de=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&de&&de[1].type==="linePrefix"&&de[2].sliceSerialize(de[1],!0).length>=4?ge(ie):(n._gfmTableDynamicInterruptHack=!0,Z.check(n.parser.constructs.flow,function($t){return n._gfmTableDynamicInterruptHack=!1,ge($t)},function($t){return n._gfmTableDynamicInterruptHack=!1,ye($t)})(ie))}}}function Cae(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||Zo(s)?e(s):t(s)}}var Sae={tokenize:wae},B3={text:{91:Sae}};function wae(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 Zo(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:xae},e,t)):t(a)}}function xae(i,e,t){let n=this;return so(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||fn(o))&&o!==null?e(o):t(o)}}function VH(i){return PN([D3,P3(),F3(i),H3,B3])}function Tf(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 z3(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Cr=function(i){if(i==null)return Iae;if(typeof i=="string")return kae(i);if(typeof i=="object")return Array.isArray(i)?Eae(i):Tae(i);if(typeof i=="function")return e5(i);throw new Error("Expected function, string, or object as test")};function Eae(i){let e=[],t=-1;for(;++t<i.length;)e[t]=Cr(i[t]);return e5(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].call(this,...r))return!0;return!1}}function Tae(i){return e5(e);function e(t){let n;for(n in i)if(t[n]!==i[n])return!1;return!0}}function kae(i){return e5(e);function e(t){return t&&t.type===i}}function e5(i){return e;function e(...t){return!!i.call(this,...t)}}function Iae(){return!0}var KH=!0,qH="skip",U3=!1,t5=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null);var r=Cr(e),o=n?-1:1;s(i,null,[])();function s(a,l,c){var d=typeof a=="object"&&a!==null?a:{},u;return typeof d.type=="string"&&(u=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(d.type+(u?"<"+u+">":""))+")"})),h;function h(){var p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=Aae(t(a,c)),p[0]===U3))return p;if(a.children&&p[0]!==qH)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g<a.children.length;){if(m=s(a.children[g],g,b)(),m[0]===U3)return m;g=typeof m[1]=="number"?m[1]:g+o}return p}}};function Aae(i){return Array.isArray(i)?i:typeof i=="number"?[KH,i]:[i]}var Lae={}.hasOwnProperty,YH=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=Cr(r.ignore||[]),a=Mae(o),l=-1;for(;++l<a.length;)t5(i,"text",c);return i;function c(u,h){let p=-1,m;for(;++p<h.length;){let g=h[p];if(s(g,m?m.children.indexOf(g):void 0,m))return;m=g}if(m)return d(u,m)}function d(u,h){let p=a[l][0],m=a[l][1],g=0,b=h.children.indexOf(u),S=[],k;p.lastIndex=0;let N=p.exec(u.value);for(;N;){k=N.index;let A=m(...N,{index:N.index,input:N.input});if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A!==!1&&(g!==k&&S.push({type:"text",value:u.value.slice(g,k)}),Array.isArray(A)?S.push(...A):A&&S.push(A),g=k+N[0].length),!p.global)break;N=p.exec(u.value)}return k===void 0?(S=[u],b--):(g<u.value.length&&S.push({type:"text",value:u.value.slice(g)}),h.children.splice(b,1,...S)),b+S.length+1}};function Mae(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([GH(i[t][0]),$H(i[t][1])])}else{let t;for(t in i)Lae.call(i,t)&&e.push([GH(t),$H(i[t])])}return e}function GH(i){return typeof i=="string"?new RegExp(z3(i),"g"):i}function $H(i){return typeof i=="function"?i:()=>i}var W3="phrasing",j3=["autolink","link","image","label"],XH={transforms:[Fae],enter:{literalAutolink:Dae,literalAutolinkEmail:V3,literalAutolinkHttp:V3,literalAutolinkWww:V3},exit:{literalAutolink:Pae,literalAutolinkEmail:Oae,literalAutolinkHttp:Nae,literalAutolinkWww:Rae}},QH={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:W3,notInConstruct:j3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:W3,notInConstruct:j3},{character:":",before:"[ps]",after:"\\/",inConstruct:W3,notInConstruct:j3}]};function Dae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function V3(i){this.config.enter.autolinkProtocol.call(this,i)}function Nae(i){this.config.exit.autolinkProtocol.call(this,i)}function Rae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function Oae(i){this.config.exit.autolinkEmail.call(this,i)}function Pae(i){this.exit(i)}function Fae(i){YH(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Hae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Bae]],{ignore:["link","linkReference"]})}function Hae(i,e,t,n,r){let o="";if(!JH(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!zae(t)))return!1;let s=Uae(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 Bae(i,e,t,n){return!JH(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function zae(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 Uae(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=Tf(i,"("),r=Tf(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function JH(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||wm(t)||xm(t))&&(!e||t!==47)}function K3(i){return i.label||!i.identifier?i.label||"":zN(i.identifier)}function Fr(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),u=d[d.length-1];return r+=d.length-1,o=d.length===1?o+u.length:1+u.length+n,c}}function i5(i,e,t){let n=e.indexStack,r=i.children||[],o=Fr(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,Re({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 u=e.join.length;for(;u--;){let h=e.join[u](c,d,i,e);if(h===!0||h===1)break;if(typeof h=="number")return`
|
|
`.repeat(1+h);if(h===!1)return`
|
|
|
|
<!---->
|
|
|
|
`}return`
|
|
|
|
`}}var Wae=/\r?\n|\r/g;function n5(i,e){let t=[],n=0,r=0,o;for(;o=Wae.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 r5(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 eB(i,e){return ZH(i,e.inConstruct,!0)&&!ZH(i,e.notInConstruct,!1)}function ZH(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 E1(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(!eB(i.stack,d))continue;let u=r5(d),h;for(;h=u.exec(n);){let p="before"in d||!!d.atBreak,m="after"in d,g=h.index+(p?h[1].length:0);r.includes(g)?(s[g].before&&!p&&(s[g].before=!1),s[g].after&&!m&&(s[g].after=!1)):(r.push(g),s[g]={before:p,after:m})}}r.sort(jae);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(tB(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(tB(n.slice(l,c),t.after)),o.join("")}function jae(i,e){return i-e}function tB(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 iB(){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=Xd(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=Xd(this.sliceSerialize(l)).toLowerCase()}function a(l){this.exit(l)}}function nB(){return i.peek=e,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:t,footnoteReference:i}};function i(n,r,o,s){let a=Fr(s),l=a.move("[^"),c=o.enter("footnoteReference"),d=o.enter("reference");return l+=a.move(E1(o,K3(n),Pt(Re({},a.current()),{before:l,after:"]"}))),d(),c(),l+=a.move("]"),l}function e(){return"["}function t(n,r,o,s){let a=Fr(s),l=a.move("[^"),c=o.enter("footnoteDefinition"),d=o.enter("label");return l+=a.move(E1(o,K3(n),Pt(Re({},a.current()),{before:l,after:"]"}))),d(),l+=a.move("]:"+(n.children&&n.children.length>0?" ":"")),a.shift(4),l+=a.move(n5(i5(n,o,a.current()),u)),c(),l;function u(h,p,m){return p?(m?"":" ")+h:h}}}function o5(i,e,t){let n=e.indexStack,r=i.children||[],o=[],s=-1,a=t.before;n.push(-1);let l=Fr(t);for(;++s<r.length;){let c=r[s],d;if(n[n.length-1]=s,s+1<r.length){let u=e.handle.handlers[r[s+1].type];u&&u.peek&&(u=u.peek),d=u?u(r[s+1],i,e,Re({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=Fr(t),l.move(o.join(""))),o.push(l.move(e.handle(c,i,e,Pt(Re({},l.current()),{before:a,after:d})))),a=o[o.length-1].slice(-1)}return n.pop(),o.join("")}var rB={canContainEols:["delete"],enter:{strikethrough:Vae},exit:{strikethrough:Kae}},oB={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:sB}};sB.peek=qae;function Vae(i){this.enter({type:"delete",children:[]},i)}function Kae(i){this.exit(i)}function sB(i,e,t,n){let r=Fr(n),o=t.enter("emphasis"),s=r.move("~~");return s+=o5(i,t,Pt(Re({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function qae(){return"~"}q3.peek=Gae;function q3(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=r5(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 Gae(){return"`"}function lB(i,e={}){let t=(e.align||[]).concat(),n=e.stringLength||Yae,r=[],o=[],s=[],a=[],l=0,c=-1;for(;++c<i.length;){let m=[],g=[],b=-1;for(i[c].length>l&&(l=i[c].length);++b<i[c].length;){let S=$ae(i[c][b]);if(e.alignDelimiters!==!1){let k=n(S);g[b]=k,(a[b]===void 0||k>a[b])&&(a[b]=k)}m.push(S)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<l;)r[d]=aB(t[d]);else{let m=aB(t);for(;++d<l;)r[d]=m}d=-1;let u=[],h=[];for(;++d<l;){let m=r[d],g="",b="";m===99?(g=":",b=":"):m===108?g=":":m===114&&(b=":");let S=e.alignDelimiters===!1?1:Math.max(1,a[d]-g.length-b.length),k=g+"-".repeat(S)+b;e.alignDelimiters!==!1&&(S=g.length+S+b.length,S>a[d]&&(a[d]=S),h[d]=S),u[d]=k}o.splice(1,0,u),s.splice(1,0,h),c=-1;let p=[];for(;++c<o.length;){let m=o[c],g=s[c];d=-1;let b=[];for(;++d<l;){let S=m[d]||"",k="",N="";if(e.alignDelimiters!==!1){let A=a[d]-(g[d]||0),H=r[d];H===114?k=" ".repeat(A):H===99?A%2?(k=" ".repeat(A/2+.5),N=" ".repeat(A/2-.5)):(k=" ".repeat(A/2),N=k):N=" ".repeat(A)}e.delimiterStart!==!1&&!d&&b.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&S==="")&&(e.delimiterStart!==!1||d)&&b.push(" "),e.alignDelimiters!==!1&&b.push(k),b.push(S),e.alignDelimiters!==!1&&b.push(N),e.padding!==!1&&b.push(" "),(e.delimiterEnd!==!1||d!==l-1)&&b.push("|")}p.push(e.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return p.join(`
|
|
`)}function $ae(i){return i==null?"":String(i)}function Yae(i){return i.length}function aB(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 $3={enter:{table:Xae,tableData:cB,tableHeader:cB,tableRow:Jae},exit:{codeText:Zae,table:Qae,tableData:G3,tableHeader:G3,tableRow:G3}};function Xae(i){let e=i._align;this.enter({type:"table",align:e.map(t=>t==="none"?null:t),children:[]},i),this.setData("inTable",!0)}function Qae(i){this.exit(i),this.setData("inTable")}function Jae(i){this.enter({type:"tableRow",children:[]},i)}function G3(i){this.exit(i)}function cB(i){this.enter({type:"tableCell",children:[]},i)}function Zae(i){let e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,ele));let t=this.stack[this.stack.length-1];t.value=e,this.exit(i)}function ele(i,e){return e==="|"?e:i}function Y3(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:h}};function s(p,m,g,b){return c(d(p,g,b),p.align)}function a(p,m,g,b){let S=u(p,g,b),k=c([S]);return k.slice(0,k.indexOf(`
|
|
`))}function l(p,m,g,b){let S=g.enter("tableCell"),k=g.enter("phrasing"),N=o5(p,g,Pt(Re({},b),{before:o,after:o}));return k(),S(),N}function c(p,m){return lB(p,{align:m,alignDelimiters:n,padding:t,stringLength:r})}function d(p,m,g){let b=p.children,S=-1,k=[],N=m.enter("table");for(;++S<b.length;)k[S]=u(b[S],m,g);return N(),k}function u(p,m,g){let b=p.children,S=-1,k=[],N=m.enter("tableRow");for(;++S<b.length;)k[S]=l(b[S],p,m,g);return N(),k}function h(p,m,g){let b=q3(p,m,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function dB(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 uB(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 hB(i,e,t,n){let r=uB(t),o=t.bulletCurrent||dB(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=Fr(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=n5(i5(i,t,a.current()),d);return l(),c;function d(u,h,p){return h?(p?"":" ".repeat(s))+u:(p?o:o+" ".repeat(s-o.length))+u}}var pB={exit:{taskListCheckValueChecked:fB,taskListCheckValueUnchecked:fB,paragraph:tle}},mB={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ile}};function fB(i){let e=this.stack[this.stack.length-2];e.checked=i.type==="taskListCheckValueChecked"}function tle(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 ile(i,e,t,n){let r=i.children[0],o=typeof i.checked=="boolean"&&r&&r.type==="paragraph",s="["+(i.checked?"x":" ")+"] ",a=Fr(n);o&&a.move(s);let l=hB(i,e,t,Re(Re({},n),a.current()));return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function X3(){return[XH,iB(),rB,$3,pB]}function Q3(i){return{extensions:[QH,nB(),oB,Y3(i),mB]}}function J3(i={}){let e=this.data();t("micromarkExtensions",VH(i)),t("fromMarkdownExtensions",X3()),t("toMarkdownExtensions",Q3(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var gB={tokenize:rle,concrete:!0},nle={tokenize:ole,partial:!0};function rle(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(b){return i.enter("mathFlow"),i.enter("mathFlowFence"),i.enter("mathFlowFenceSequence"),l(b)}function l(b){return b===36?(i.consume(b),s++,l):(i.exit("mathFlowFenceSequence"),s<2?t(b):so(i,c,"whitespace")(b))}function c(b){return b===null||fn(b)?u(b):(i.enter("mathFlowFenceMeta"),i.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||fn(b)?(i.exit("chunkString"),i.exit("mathFlowFenceMeta"),u(b)):b===36?t(b):(i.consume(b),d)}function u(b){return i.exit("mathFlowFence"),n.interrupt?e(b):h(b)}function h(b){return b===null?m(b):fn(b)?i.attempt(nle,i.attempt({tokenize:g,partial:!0},m,o?so(i,h,"linePrefix",o+1):h),m)(b):(i.enter("mathFlowValue"),p(b))}function p(b){return b===null||fn(b)?(i.exit("mathFlowValue"),h(b)):(i.consume(b),p)}function m(b){return i.exit("mathFlow"),e(b)}function g(b,S,k){let N=0;return so(b,A,"linePrefix",4);function A(W){return b.enter("mathFlowFence"),b.enter("mathFlowFenceSequence"),H(W)}function H(W){return W===36?(b.consume(W),N++,H):N<s?k(W):(b.exit("mathFlowFenceSequence"),so(b,K,"whitespace")(W))}function K(W){return W===null||fn(W)?(b.exit("mathFlowFence"),S(W)):k(W)}}}function ole(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 vB(i={}){let e=i.singleDollarTextMath;return e==null&&(e=!0),{tokenize:t,resolve:sle,previous:ale};function t(n,r,o){let s=this,a=0,l,c;return d;function d(g){return n.enter("mathText"),n.enter("mathTextSequence"),u(g)}function u(g){return g===36?(n.consume(g),a++,u):a<2&&!e?o(g):(n.exit("mathTextSequence"),h(g))}function h(g){return g===null?o(g):g===36?(c=n.enter("mathTextSequence"),l=0,m(g)):g===32?(n.enter("space"),n.consume(g),n.exit("space"),h):fn(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),h):(n.enter("mathTextData"),p(g))}function p(g){return g===null||g===32||g===36||fn(g)?(n.exit("mathTextData"),h(g)):(n.consume(g),p)}function m(g){return g===36?(n.consume(g),l++,m):l===a?(n.exit("mathTextSequence"),n.exit("mathText"),r(g)):(c.type="mathTextData",p(g))}}}function sle(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 ale(i){return i!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Z3(i){return{flow:{36:gB},text:{36:vB(i)}}}function _B(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 bB(){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 yB(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(_B(c,"$")+1,2)),u=a.enter("mathFlow"),h=Fr(l),p=h.move(d);if(o.meta){let m=a.enter("mathFlowMeta");p+=h.move(E1(a,o.meta,Pt(Re({},h.current()),{before:p,after:" ",encode:["$"]}))),m()}return p+=h.move(`
|
|
`),c&&(p+=h.move(c+`
|
|
`)),p+=h.move(d),u(),p}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 ex(i={}){let e=this.data();t("micromarkExtensions",Z3(i)),t("fromMarkdownExtensions",bB()),t("toMarkdownExtensions",yB(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var hi=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 s5={}.hasOwnProperty;function lle(i,e){let t=e.data||{};return"value"in e&&!(s5.call(t,"hName")||s5.call(t,"hProperties")||s5.call(t,"hChildren"))?i.augment(e,hi("text",e.value)):i(e,"div",bi(i,e))}function tx(i,e,t){let n=e&&e.type,r;if(!n)throw new Error("Expected node, got `"+e+"`");return s5.call(i.handlers,n)?r=i.handlers[n]:i.passThrough&&i.passThrough.includes(n)?r=cle:r=i.unknownHandler,(typeof r=="function"?r:lle)(i,e,t)}function cle(i,e){return"children"in e?Pt(Re({},e),{children:bi(i,e)}):e}function bi(i,e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let o=tx(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 CB=!0,SB="skip",ix=!1,wB=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null);let r=Cr(e),o=n?-1:1;s(i,null,[])();function s(a,l,c){let d=typeof a=="object"&&a!==null?a:{},u;return typeof d.type=="string"&&(u=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(d.type+(u?"<"+u+">":""))+")"})),h;function h(){let p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=dle(t(a,c)),p[0]===ix))return p;if(a.children&&p[0]!==SB)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g<a.children.length;){if(m=s(a.children[g],g,b)(),m[0]===ix)return m;g=typeof m[1]=="number"?m[1]:g+o}return p}}};function dle(i){return Array.isArray(i)?i:typeof i=="number"?[CB,i]:[i]}var Hr=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),wB(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 pu=xB("start"),kf=xB("end");function xB(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 EB(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 TB=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),t5(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 kB={}.hasOwnProperty;function AB(i){let e=Object.create(null);if(!i||!i.type)throw new Error("mdast-util-definitions expected node");return TB(i,"definition",t),n;function t(r){let o=IB(r.identifier);o&&!kB.call(e,o)&&(e[o]=r)}function n(r){let o=IB(r);return o&&kB.call(e,o)?e[o]:null}}function IB(i){return String(i||"").toUpperCase()}function fo(i,e){let t=[],n=-1;for(e&&t.push(hi("text",`
|
|
`));++n<i.length;)n&&t.push(hi("text",`
|
|
`)),t.push(i[n]);return e&&i.length>0&&t.push(hi("text",`
|
|
`)),t}function LB(i){let e=-1,t=[];for(;++e<i.footnoteOrder.length;){let n=i.footnoteById[i.footnoteOrder[e].toUpperCase()];if(!n)continue;let r=bi(i,n),o=String(n.identifier),s=Zb(o.toLowerCase()),a=0,l=[];for(;++a<=i.footnoteCounts[o];){let u={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&&u.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(u)}let c=r[r.length-1];if(c&&c.type==="element"&&c.tagName==="p"){let u=c.children[c.children.length-1];u&&u.type==="text"?u.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:fo(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:[hi("text",i.footnoteLabel)]},{type:"text",value:`
|
|
`},{type:"element",tagName:"ol",properties:{},children:fo(t,!0)},{type:"text",value:`
|
|
`}]}}function MB(i,e){return i(e,"blockquote",fo(bi(i,e),!0))}function DB(i,e){return[i(e,"br"),hi("text",`
|
|
`)]}function NB(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,[hi("text",t)]);return e.meta&&(o.data={meta:e.meta}),i(e.position,"pre",[o])}function RB(i,e){return i(e,"del",bi(i,e))}function OB(i,e){return i(e,"em",bi(i,e))}function a5(i,e){let t=String(e.identifier),n=Zb(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"},[hi("text",String(o))])])}function PB(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},a5(i,{type:"footnoteReference",identifier:r,position:e.position})}function FB(i,e){return i(e,"h"+e.depth,bi(i,e))}function HB(i,e){return i.dangerous?i.augment(e,hi("raw",e.value)):null}var UB=Hi(T1(),1);function c5(i,e){let t=e.referenceType,n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return hi("text","!["+e.alt+n);let r=bi(i,e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift(hi("text","["));let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push(hi("text",n)),r}function WB(i,e){let t=i.definition(e.identifier);if(!t)return c5(i,e);let n={src:(0,UB.default)(t.url||""),alt:e.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"img",n)}var jB=Hi(T1(),1);function VB(i,e){let t={src:(0,jB.default)(e.url),alt:e.alt};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"img",t)}function KB(i,e){return i(e,"code",[hi("text",e.value.replace(/\r?\n|\r/g," "))])}var qB=Hi(T1(),1);function GB(i,e){let t=i.definition(e.identifier);if(!t)return c5(i,e);let n={href:(0,qB.default)(t.url||"")};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"a",n,bi(i,e))}var $B=Hi(T1(),1);function YB(i,e){let t={href:(0,$B.default)(e.url)};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"a",t,bi(i,e))}function XB(i,e,t){let n=bi(i,e),r=t?hle(t):QB(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(hi("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(hi("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(hi("text",`
|
|
`)),i(e,"li",o,s)}function hle(i){let e=i.spread,t=i.children,n=-1;for(;!e&&++n<t.length;)e=QB(t[n]);return!!e}function QB(i){let e=i.spread;return e==null?i.children.length>1:e}function JB(i,e){let t={},n=e.ordered?"ol":"ul",r=bi(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,fo(r,!0))}function ZB(i,e){return i(e,"p",bi(i,e))}function ez(i,e){return i.augment(e,hi("root",fo(bi(i,e))))}function tz(i,e){return i(e,"strong",bi(i,e))}function iz(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 u=s[c];l.push(i(u,a,{align:r[c]},u?bi(i,u):[]))}o[n]=i(t[n],"tr",fo(l,!0))}return i(e,"table",fo([i(o[0].position,"thead",fo([o[0]],!0))].concat(o[1]?i({start:pu(o[1]),end:kf(o[o.length-1])},"tbody",fo(o.slice(1),!0)):[]),!0))}function nz(i,e){return i.augment(e,hi("text",String(e.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}function rz(i,e){return i(e,"hr")}var nx={blockquote:MB,break:DB,code:NB,delete:RB,emphasis:OB,footnoteReference:a5,footnote:PB,heading:FB,html:HB,imageReference:WB,image:VB,inlineCode:KB,linkReference:GB,link:YB,listItem:XB,list:JB,paragraph:ZB,root:ez,strong:tz,table:iz,text:nz,thematicBreak:rz,toml:d5,yaml:d5,definition:d5,footnoteDefinition:d5};function d5(){return null}var fle={}.hasOwnProperty;function ple(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=AB(i),s.footnoteById=r,s.footnoteOrder=[],s.footnoteCounts={},s.augment=o,s.handlers=Re(Re({},nx),t.handlers),s.unknownHandler=t.unknownHandler,s.passThrough=t.passThrough,Hr(i,"footnoteDefinition",a=>{let l=String(a.identifier).toUpperCase();fle.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=Re(Re({},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};EB(c)||(l.position={start:pu(c),end:kf(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 u5(i,e){let t=ple(i,e),n=tx(t,i,null),r=LB(t);return r&&n.children.push(hi("text",`
|
|
`),r),Array.isArray(n)?{type:"root",children:n}:n}var mle=function(i,e){return i&&"run"in i?gle(i,e):vle(i||e)},rx=mle;function gle(i,e){return(t,n,r)=>{i.run(u5(t,e),n,o=>{r(o)})}}function vle(i){return e=>u5(e,i)}var zW=Hi(Wx(),1);var Kl=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};Kl.prototype.property={};Kl.prototype.normal={};Kl.prototype.space=null;function jx(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 Kl(t,n,e)}function ql(i){return i.toLowerCase()}var zr=class{constructor(e,t){this.property=e,this.attribute=t}};zr.prototype.space=null;zr.prototype.boolean=!1;zr.prototype.booleanish=!1;zr.prototype.overloadedBoolean=!1;zr.prototype.number=!1;zr.prototype.commaSeparated=!1;zr.prototype.spaceSeparated=!1;zr.prototype.commaOrSpaceSeparated=!1;zr.prototype.mustUseProperty=!1;zr.prototype.defined=!1;var V1={};RN(V1,{boolean:()=>zt,booleanish:()=>gn,commaOrSpaceSeparated:()=>vo,commaSeparated:()=>cd,number:()=>Te,overloadedBoolean:()=>Vx,spaceSeparated:()=>Ai});var jde=0,zt=wu(),gn=wu(),Vx=wu(),Te=wu(),Ai=wu(),cd=wu(),vo=wu();function wu(){return 2**++jde}var Kx=Object.keys(V1),xu=class extends zr{constructor(e,t,n,r){let o=-1;if(super(e,t),pW(this,"space",r),typeof n=="number")for(;++o<Kx.length;){let s=Kx[o];pW(this,Kx[o],(n&V1[s])===V1[s])}}};xu.prototype.defined=!0;function pW(i,e,t){t&&(i[e]=t)}var Vde={}.hasOwnProperty;function gs(i){let e={},t={},n;for(n in i.properties)if(Vde.call(i.properties,n)){let r=i.properties[n],o=new xu(n,i.transform(i.attributes||{},n),r,i.space);i.mustUseProperty&&i.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[ql(n)]=n,t[ql(o.attribute)]=n}return new Kl(e,t,i.space)}var qx=gs({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 Gx=gs({space:"xml",transform(i,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function j5(i,e){return e in i?i[e]:e}function V5(i,e){return j5(i,e.toLowerCase())}var $x=gs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:V5,properties:{xmlns:null,xmlnsXLink:null}});var Yx=gs({transform(i,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:gn,ariaAutoComplete:null,ariaBusy:gn,ariaChecked:gn,ariaColCount:Te,ariaColIndex:Te,ariaColSpan:Te,ariaControls:Ai,ariaCurrent:null,ariaDescribedBy:Ai,ariaDetails:null,ariaDisabled:gn,ariaDropEffect:Ai,ariaErrorMessage:null,ariaExpanded:gn,ariaFlowTo:Ai,ariaGrabbed:gn,ariaHasPopup:null,ariaHidden:gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ai,ariaLevel:Te,ariaLive:null,ariaModal:gn,ariaMultiLine:gn,ariaMultiSelectable:gn,ariaOrientation:null,ariaOwns:Ai,ariaPlaceholder:null,ariaPosInSet:Te,ariaPressed:gn,ariaReadOnly:gn,ariaRelevant:null,ariaRequired:gn,ariaRoleDescription:Ai,ariaRowCount:Te,ariaRowIndex:Te,ariaRowSpan:Te,ariaSelected:gn,ariaSetSize:Te,ariaSort:null,ariaValueMax:Te,ariaValueMin:Te,ariaValueNow:Te,ariaValueText:null,role:null}});var mW=gs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:V5,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cd,acceptCharset:Ai,accessKey:Ai,action:null,allow:null,allowFullScreen:zt,allowPaymentRequest:zt,allowUserMedia:zt,alt:null,as:null,async:zt,autoCapitalize:null,autoComplete:Ai,autoFocus:zt,autoPlay:zt,capture:zt,charSet:null,checked:zt,cite:null,className:Ai,cols:Te,colSpan:null,content:null,contentEditable:gn,controls:zt,controlsList:Ai,coords:Te|cd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:zt,defer:zt,dir:null,dirName:null,disabled:zt,download:Vx,draggable:gn,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:zt,formTarget:null,headers:Ai,height:Te,hidden:zt,high:Te,href:null,hrefLang:null,htmlFor:Ai,httpEquiv:Ai,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:zt,itemId:null,itemProp:Ai,itemRef:Ai,itemScope:zt,itemType:Ai,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:zt,low:Te,manifest:null,max:null,maxLength:Te,media:null,method:null,min:null,minLength:Te,multiple:zt,muted:zt,name:null,nonce:null,noModule:zt,noValidate:zt,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:zt,optimum:Te,pattern:null,ping:Ai,placeholder:null,playsInline:zt,poster:null,preload:null,readOnly:zt,referrerPolicy:null,rel:Ai,required:zt,reversed:zt,rows:Te,rowSpan:Te,sandbox:Ai,scope:null,scoped:zt,seamless:zt,selected:zt,shape:null,size:Te,sizes:null,slot:null,span:Te,spellCheck:gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Te,step:null,style:null,tabIndex:Te,target:null,title:null,translate:null,type:null,typeMustMatch:zt,useMap:null,value:gn,width:Te,wrap:null,align:null,aLink:null,archive:Ai,axis:null,background:null,bgColor:null,border:Te,borderColor:null,bottomMargin:Te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:zt,declare:zt,event:null,face:null,frame:null,frameBorder:null,hSpace:Te,leftMargin:Te,link:null,longDesc:null,lowSrc:null,marginHeight:Te,marginWidth:Te,noResize:zt,noHref:zt,noShade:zt,noWrap:zt,object:null,profile:null,prompt:null,rev:null,rightMargin:Te,rules:null,scheme:null,scrolling:gn,standby:null,summary:null,text:null,topMargin:Te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Te,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:zt,disableRemotePlayback:zt,prefix:null,property:null,results:Te,security:null,unselectable:null}});var gW=gs({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:j5,properties:{about:vo,accentHeight:Te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Te,amplitude:Te,arabicForm:null,ascent:Te,attributeName:null,attributeType:null,azimuth:Te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Te,by:null,calcMode:null,capHeight:Te,className:Ai,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:Te,diffuseConstant:Te,direction:null,display:null,dur:null,divisor:Te,dominantBaseline:null,download:zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Te,enableBackground:null,end:null,event:null,exponent:Te,externalResourcesRequired:null,fill:null,fillOpacity:Te,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:cd,g2:cd,glyphName:cd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Te,horizOriginX:Te,horizOriginY:Te,id:null,ideographic:Te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Te,k:Te,k1:Te,k2:Te,k3:Te,k4:Te,kernelMatrix:vo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Te,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:Te,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:Te,overlineThickness:Te,paintOrder:null,panose1:null,path:null,pathLength:Te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ai,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Te,pointsAtY:Te,pointsAtZ:Te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vo,rev:vo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vo,requiredFeatures:vo,requiredFonts:vo,requiredFormats:vo,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:Te,specularExponent:Te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Te,strikethroughThickness:Te,string:null,stroke:null,strokeDashArray:vo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Te,strokeOpacity:Te,strokeWidth:null,style:null,surfaceScale:Te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vo,tabIndex:Te,tableValues:null,target:null,targetX:Te,targetY:Te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vo,to:null,transform:null,u1:null,u2:null,underlinePosition:Te,underlineThickness:Te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Te,values:null,vAlphabetic:Te,vMathematical:Te,vectorEffect:null,vHanging:Te,vIdeographic:Te,version:null,vertAdvY:Te,vertOriginX:Te,vertOriginY:Te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var Kde=/^data[-\w.:]+$/i,vW=/-[a-z]/g,qde=/[A-Z]/g;function Us(i,e){let t=ql(e),n=e,r=zr;if(t in i.normal)return i.property[i.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Kde.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(vW,$de);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!vW.test(o)){let s=o.replace(qde,Gde);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=xu}return new r(n,e)}function Gde(i){return"-"+i.toLowerCase()}function $de(i){return i.charAt(1).toUpperCase()}var Xx={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 Ws=jx([Gx,qx,$x,Yx,mW],"html"),Qr=jx([Gx,qx,$x,Yx,gW],"svg");var _W=/[#.]/g,bW=function(i,e="div"){for(var t=i||"",n={},r=0,o,s,a;r<t.length;)_W.lastIndex=r,a=_W.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 Qx(i){let e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function K5(i){return i.join(" ").trim()}function Jx(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 q5(i,e){var t=e||{};return i[i.length-1]===""&&(i=i.concat("")),i.join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var Yde=new Set(["menu","submit","reset","button"]),Zx={}.hasOwnProperty;function G5(i,e,t){let n=t&&Zde(t);return function(o,s,...a){let l=-1,c;if(o==null)c={type:"root",children:[]},a.unshift(s);else if(c=bW(o,e),c.tagName=c.tagName.toLowerCase(),n&&Zx.call(n,c.tagName)&&(c.tagName=n[c.tagName]),Xde(s,c.tagName)){let d;for(d in s)Zx.call(s,d)&&Qde(i,c.properties,d,s[d])}else a.unshift(s);for(;++l<a.length;)e8(c.children,a[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}}function Xde(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"?Yde.has(i.type.toLowerCase()):!("value"in i)}function Qde(i,e,t,n){let r=Us(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=Qx(n):r.commaSeparated?s=Jx(n):r.commaOrSpaceSeparated?s=Qx(Jx(n).join(" ")):s=yW(r,r.property,n):Array.isArray(n)?s=n.concat():s=r.property==="style"?Jde(n):String(n);if(Array.isArray(s)){let a=[];for(;++o<s.length;)a[o]=yW(r,r.property,s[o]);s=a}r.property==="className"&&Array.isArray(e.className)&&(s=e.className.concat(s)),e[r.property]=s}}function e8(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;)e8(i,e[t]);else if(typeof e=="object"&&"type"in e)e.type==="root"?e8(i,e.children):i.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function yW(i,e,t){if(typeof t=="string"){if(i.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((i.boolean||i.overloadedBoolean)&&(t===""||ql(t)===ql(e)))return!0}return t}function Jde(i){let e=[],t;for(t in i)Zx.call(i,t)&&e.push([t,i[t]].join(": "));return e.join("; ")}function Zde(i){let e={},t=-1;for(;++t<i.length;)e[i[t].toLowerCase()]=i[t];return e}var Pf=G5(Ws,"div");var CW=["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 Ff=G5(Qr,"g",CW);function SW(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 Jr={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 TW={}.hasOwnProperty,wW={"#document":xW,"#document-fragment":xW,"#text":iue,"#comment":nue,"#documentType":tue};function K1(i,e={}){let t,n;return sue(e)?(n=e,t={}):(n=e.file,t=e),t8({schema:t.space==="svg"?Qr:Ws,file:n,verbose:t.verbose,location:!1},i)}function t8(i,e){let t=i.schema,n=TW.call(wW,e.nodeName)?wW[e.nodeName]:rue,r;"tagName"in e&&(i.schema=e.namespaceURI===Jr.svg?Qr:Ws),"childNodes"in e&&(r=eue(i,e.childNodes));let o=n(i,e,r);if("sourceCodeLocation"in e&&e.sourceCodeLocation&&i.file){let s=oue(i,o,e.sourceCodeLocation);s&&(i.location=!0,o.position=s)}return i.schema=t,o}function eue(i,e){let t=-1,n=[];for(;++t<e.length;)n[t]=t8(i,e[t]);return n}function xW(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=SW(r);n.position={start:o.toPoint(0),end:o.toPoint(r.length)}}return n}function tue(){return{type:"doctype"}}function iue(i,e){return{type:"text",value:e.value}}function nue(i,e){return{type:"comment",value:e.data}}function rue(i,e,t){let n=i.schema.space==="svg"?Ff:Pf,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&&Hf(a.startTag),c=a&&a.endTag&&Hf(a.endTag),d=t8(i,e.content);l&&c&&i.file&&(d.position={start:l.end,end:c.start}),s.content=d}return s}function oue(i,e,t){let n=Hf(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)TW.call(t.attrs,s)&&(o[Us(i.schema,s).property]=Hf(t.attrs[s]));e.data={position:{opening:Hf(t.startTag),closing:t.endTag?Hf(t.endTag):null,properties:o}}}}return n}function Hf(i){let e=EW({line:i.startLine,column:i.startCol,offset:i.startOffset}),t=EW({line:i.endLine,column:i.endCol,offset:i.endOffset});return e||t?{start:e,end:t}:null}function EW(i){return i.line&&i.column?i:null}function sue(i){return"messages"in i}var OW=Hi(RW(),1);var bue=Jr,yue=Xx,Cue={}.hasOwnProperty,Sue=Cr("root"),i8=Cr("element"),wue=Cr("text");function PW(i,e,t){if(typeof i!="function")throw new TypeError("h is not a function");let n=Eue(i),r=Iue(i),o=kue(i),s,a;if(typeof t=="string"||typeof t=="boolean"?(s=t,t={}):(t||(t={}),s=t.prefix),Sue(e))a=e.children.length===1&&i8(e.children[0])?e.children[0]:{type:"element",tagName:"div",properties:{},children:e.children};else if(i8(e))a=e;else throw new Error("Expected root or element, not `"+(e&&e.type||e)+"`");return FW(i,a,{schema:t.space==="svg"?Qr:Ws,prefix:s==null?n||r||o?"h-":null:typeof s=="string"?s:s?"h-":null,key:0,react:n,vue:r,vdom:o,hyperscript:Tue(i)})}function FW(i,e,t){let n=t.schema,r=n,o=e.tagName,s={},a=[],l=-1,c;n.space==="html"&&o.toLowerCase()==="svg"&&(r=Qr,t.schema=r);for(c in e.properties)e.properties&&Cue.call(e.properties,c)&&xue(s,c,e.properties[c],t,o);if(t.vdom&&(r.space==="html"?o=o.toUpperCase():r.space&&(s.namespace=bue[r.space])),t.prefix&&(t.key++,s.key=t.prefix+t.key),e.children)for(;++l<e.children.length;){let d=e.children[l];i8(d)?a.push(FW(i,d,t)):wue(d)&&a.push(d.value)}return t.schema=n,a.length>0?i.call(e,o,s,a):i.call(e,o,s)}function xue(i,e,t,n,r){let o=Us(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?q5(t):K5(t)),o.boolean&&n.hyperscript&&(t=""),o.property==="style"&&typeof t=="string"&&(n.react||n.vue||n.vdom)&&(t=Aue(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[yue[o.property]||o.property]=t:i[o.attribute]=t)}function Eue(i){let e=i("div",{});return!!(e&&("_owner"in e||"_store"in e)&&(e.key===void 0||e.key===null))}function Tue(i){return"context"in i&&"cleanup"in i}function kue(i){return i("div",{}).type==="VirtualNode"}function Iue(i){let e=i("div",{});return!!(e&&e.context&&e.context._isVue)}function Aue(i,e){let t={};try{(0,OW.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 HW={}.hasOwnProperty;function $5(i,e){var t=e||{};function n(r){var o=n.invalid,s=n.handlers;if(r&&HW.call(r,i)&&(o=HW.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 Lue={}.hasOwnProperty,BW=$5("type",{handlers:{root:Mue,element:Pue,text:Rue,comment:Oue,doctype:Nue}});function n8(i,e){return BW(i,e==="svg"?Qr:Ws)}function Mue(i,e){var t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=r8(i.children,t,e),Bf(i,t)}function Due(i,e){var t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=r8(i.children,t,e),Bf(i,t)}function Nue(i){return Bf(i,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}function Rue(i){return Bf(i,{nodeName:"#text",value:i.value,parentNode:void 0})}function Oue(i){return Bf(i,{nodeName:"#comment",data:i.value,parentNode:void 0})}function Pue(i,e){var t=e.space;return PW(n,Object.assign({},i,{children:[]}),{space:t});function n(r,o){var s=[],a,l,c,d,u;for(c in o)!Lue.call(o,c)||o[c]===!1||(a=Us(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=Jr[a.space]),s.push(l)));return e.space==="html"&&i.tagName==="svg"&&(e=Qr),u=Bf(i,{nodeName:r,tagName:r,attrs:s,namespaceURI:Jr[e.space],childNodes:[],parentNode:void 0}),u.childNodes=r8(i.children,u,e),r==="template"&&(u.content=Due(i.content,e)),u}}function r8(i,e,t){var n=-1,r=[],o;if(i)for(;++n<i.length;)o=BW(i[n],t),o.parentNode=e,r.push(o);return r}function Bf(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 Y5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];var Fue="IN_TEMPLATE_MODE",Hue="DATA_STATE",Bue="CHARACTER_TOKEN",zue="START_TAG_TOKEN",Uue="END_TAG_TOKEN",Wue="COMMENT_TOKEN",jue="DOCTYPE_TOKEN",Vue={sourceCodeLocationInfo:!0,scriptingEnabled:!1},X5=function(i,e,t){let n=-1,r=new zW.default(Vue),o=$5("type",{handlers:{root:g,element:b,text:S,comment:N,doctype:k,raw:A},unknown:$ue}),s,a,l,c,d;if(Xue(e)&&(t=e,e=void 0),t&&t.passThrough)for(;++n<t.passThrough.length;)o.handlers[t.passThrough[n]]=H;let u=K1(Yue(i)?p():h(),e);if(s&&Hr(u,"comment",(W,re,ae)=>{let Ne=W;if(Ne.value.stitch&&ae!==null&&re!==null)return ae.children[re]=Ne.value.stitch,re}),i.type!=="root"&&u.type==="root"&&u.children.length===1)return u.children[0];return u;function h(){let W={nodeName:"template",tagName:"template",attrs:[],namespaceURI:Jr.html,childNodes:[]},re={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:Jr.html,childNodes:[]},ae={nodeName:"#document-fragment",childNodes:[]};if(r._bootstrap(re,W),r._pushTmplInsertionMode(Fue),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(re.childNodes[0],ae),ae}function p(){let W=r.treeAdapter.createDocument();if(r._bootstrap(W,void 0),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),W}function m(W){let re=-1;if(W)for(;++re<W.length;)o(W[re])}function g(W){m(W.children)}function b(W){K(),r._processToken(Kue(W),Jr.html),m(W.children),Y5.includes(W.tagName)||(K(),r._processToken(Gue(W)))}function S(W){K(),r._processToken({type:Bue,chars:W.value,location:zf(W)})}function k(W){K(),r._processToken({type:jue,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:zf(W)})}function N(W){K(),r._processToken({type:Wue,data:W.value,location:zf(W)})}function A(W){let re=pu(W),ae=re.line||1,Ne=re.column||1,he=re.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=-Ne+1,c.droppedBufferSize=he,c.offset=0,c.col=1,c.line=ae,d.currentAttrLocation=void 0,d.ctLoc=zf(W),a.write(W.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 Xe=a.currentCharacterToken;Xe&&(Xe.location.endLine=c.line,Xe.location.endCol=c.col+1,Xe.location.endOffset=c.offset+1,r._processToken(Xe))}function H(W){s=!0;let re;"children"in W?re=Pt(Re({},W),{children:X5({type:"root",children:W.children},e,t).children}):re=Re({},W),N({type:"comment",value:{stitch:re}})}function K(){if(!a)throw new Error("Expected `tokenizer`");a.tokenQueue=[],a.state=Hue,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 Kue(i){let e=Object.assign(zf(i));return e.startTag=Object.assign({},e),{type:zue,tagName:i.tagName,selfClosing:!1,attrs:que(i),location:e}}function que(i){return n8({tagName:i.tagName,type:"element",properties:i.properties,children:[]}).attrs}function Gue(i){let e=Object.assign(zf(i));return e.startTag=Object.assign({},e),{type:Uue,tagName:i.tagName,attrs:[],location:e}}function $ue(i){throw new Error("Cannot compile `"+i.type+"` node")}function Yue(i){let e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName==="html"))}function zf(i){let e=pu(i),t=kf(i);return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function Xue(i){return!!(i&&!("message"in i&&"messages"in i))}function o8(i={}){return(e,t)=>X5(e,t,i)}var zo=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}},za=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,zo.range(this,e))}},Ie=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 u=new Error(n);return u.name="ParseError",u.__proto__=i.prototype,u.position=r,u}};Ie.prototype.__proto__=Error.prototype;var Que=function(e,t){return e.indexOf(t)!==-1},Jue=function(e,t){return e===void 0?t:e},Zue=/([A-Z])/g,ehe=function(e){return e.replace(Zue,"-$1").toLowerCase()},the={"&":"&",">":">","<":"<",'"':""","'":"'"},ihe=/[&><"']/g;function nhe(i){return String(i).replace(ihe,e=>the[e])}var _j=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},rhe=function(e){var t=_j(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ohe=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},she=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},wt={contains:Que,deflt:Jue,escape:nhe,hyphenate:ehe,getBaseElem:_j,isCharacterBox:rhe,protocolFromUrl:she},l4={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 ahe(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 X1=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 l4)if(l4.hasOwnProperty(t)){var n=l4[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:ahe(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 Ie("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=wt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Fa=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 Ha[lhe[this.id]]}sub(){return Ha[che[this.id]]}fracNum(){return Ha[dhe[this.id]]}fracDen(){return Ha[uhe[this.id]]}cramp(){return Ha[hhe[this.id]]}text(){return Ha[fhe[this.id]]}isTight(){return this.size>=2}},L8=0,d4=1,Wf=2,Yl=3,Q1=4,vs=5,jf=6,eo=7,Ha=[new Fa(L8,0,!1),new Fa(d4,0,!0),new Fa(Wf,1,!1),new Fa(Yl,1,!0),new Fa(Q1,2,!1),new Fa(vs,2,!0),new Fa(jf,3,!1),new Fa(eo,3,!0)],lhe=[Q1,vs,Q1,vs,jf,eo,jf,eo],che=[vs,vs,vs,vs,eo,eo,eo,eo],dhe=[Wf,Yl,Q1,vs,jf,eo,jf,eo],uhe=[Yl,Yl,vs,vs,eo,eo,eo,eo],hhe=[d4,d4,Yl,Yl,vs,vs,eo,eo],fhe=[L8,d4,Wf,Yl,Wf,Yl,Wf,Yl],_t={DISPLAY:Ha[L8],TEXT:Ha[Wf],SCRIPT:Ha[Q1],SCRIPTSCRIPT:Ha[jf]},_8=[{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 phe(i){for(var e=0;e<_8.length;e++)for(var t=_8[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 c4=[];_8.forEach(i=>i.blocks.forEach(e=>c4.push(...e)));function bj(i){for(var e=0;e<c4.length;e+=2)if(i>=c4[e]&&i<=c4[e+1])return!0;return!1}var Uf=80,mhe=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"},ghe=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"},vhe=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"},_he=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"},bhe=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"},yhe=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Che=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"},She=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=mhe(t,Uf);break;case"sqrtSize1":r=ghe(t,Uf);break;case"sqrtSize2":r=vhe(t,Uf);break;case"sqrtSize3":r=_he(t,Uf);break;case"sqrtSize4":r=bhe(t,Uf);break;case"sqrtTall":r=Che(t,Uf,n)}return r},whe=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""}},UW={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`},xhe=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.")}},Iu=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 wt.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("")}},Ba={"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]}},Q5={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]},WW={\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 Ehe(i,e){Ba[i]=e}function M8(i,e,t){if(!Ba[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=Ba[e][n];if(!r&&i[0]in WW&&(n=WW[i[0]].charCodeAt(0),r=Ba[e][n]),!r&&t==="text"&&bj(n)&&(r=Ba[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var s8={};function The(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!s8[e]){var t=s8[e]={cssEmPerMu:Q5.quad[e]/18};for(var n in Q5)Q5.hasOwnProperty(n)&&(t[n]=Q5[n][e])}return s8[e]}var khe=[[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]],jW=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],VW=function(e,t){return t.size<2?e:khe[e-1][t.size-1]},u4=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=jW[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:VW(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:jW[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=VW(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=The(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};u4.BASESIZE=6;var b8={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},Ihe={ex:!0,em:!0,mu:!0},yj=function(e){return typeof e!="string"&&(e=e.unit),e in b8||e in Ihe||e==="ex"},cn=function(e,t){var n;if(e.unit in b8)n=b8[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 Ie("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ze=function(e){return+e.toFixed(4)+"em"},hd=function(e){return e.filter(t=>t).join(" ")},Cj=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)}},Sj=function(e){var t=document.createElement(e);t.className=hd(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},wj=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+wt.escape(hd(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(t+=' style="'+wt.escape(n)+'"');for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+wt.escape(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t},Au=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,Cj.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Sj.call(this,"span")}toMarkup(){return wj.call(this,"span")}},J1=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,Cj.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Sj.call(this,"a")}toMarkup(){return wj.call(this,"a")}},y8=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 wt.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+=wt.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+wt.escape(t)+'"'),e+="'/>",e}},Ahe={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},yo=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=phe(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ahe[this.text])}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=ze(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=hd(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+=wt.escape(hd(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+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+wt.escape(n)+'"');var o=wt.escape(this.text);return e?(t+=">",t+=o,t+="</span>",t):o}},Vs=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}},Ua=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",UW[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+UW[this.pathName]+"'/>"}},Z1=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 KW(i){if(i instanceof yo)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function Lhe(i){if(i instanceof Au)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var Mhe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Dhe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ji={math:{},text:{}};function y(i,e,t,n,r,o){ji[i][r]={font:e,group:t,replace:n},o&&n&&(ji[i][n]=ji[i][r])}var E="math",we="text",L="main",U="ams",Ji="accent-token",Je="bin",to="close",Vf="inner",bt="mathord",Nn="op-token",Uo="open",_4="punct",j="rel",Zl="spacing",Y="textord";y(E,L,j,"\u2261","\\equiv",!0);y(E,L,j,"\u227A","\\prec",!0);y(E,L,j,"\u227B","\\succ",!0);y(E,L,j,"\u223C","\\sim",!0);y(E,L,j,"\u22A5","\\perp");y(E,L,j,"\u2AAF","\\preceq",!0);y(E,L,j,"\u2AB0","\\succeq",!0);y(E,L,j,"\u2243","\\simeq",!0);y(E,L,j,"\u2223","\\mid",!0);y(E,L,j,"\u226A","\\ll",!0);y(E,L,j,"\u226B","\\gg",!0);y(E,L,j,"\u224D","\\asymp",!0);y(E,L,j,"\u2225","\\parallel");y(E,L,j,"\u22C8","\\bowtie",!0);y(E,L,j,"\u2323","\\smile",!0);y(E,L,j,"\u2291","\\sqsubseteq",!0);y(E,L,j,"\u2292","\\sqsupseteq",!0);y(E,L,j,"\u2250","\\doteq",!0);y(E,L,j,"\u2322","\\frown",!0);y(E,L,j,"\u220B","\\ni",!0);y(E,L,j,"\u221D","\\propto",!0);y(E,L,j,"\u22A2","\\vdash",!0);y(E,L,j,"\u22A3","\\dashv",!0);y(E,L,j,"\u220B","\\owns");y(E,L,_4,".","\\ldotp");y(E,L,_4,"\u22C5","\\cdotp");y(E,L,Y,"#","\\#");y(we,L,Y,"#","\\#");y(E,L,Y,"&","\\&");y(we,L,Y,"&","\\&");y(E,L,Y,"\u2135","\\aleph",!0);y(E,L,Y,"\u2200","\\forall",!0);y(E,L,Y,"\u210F","\\hbar",!0);y(E,L,Y,"\u2203","\\exists",!0);y(E,L,Y,"\u2207","\\nabla",!0);y(E,L,Y,"\u266D","\\flat",!0);y(E,L,Y,"\u2113","\\ell",!0);y(E,L,Y,"\u266E","\\natural",!0);y(E,L,Y,"\u2663","\\clubsuit",!0);y(E,L,Y,"\u2118","\\wp",!0);y(E,L,Y,"\u266F","\\sharp",!0);y(E,L,Y,"\u2662","\\diamondsuit",!0);y(E,L,Y,"\u211C","\\Re",!0);y(E,L,Y,"\u2661","\\heartsuit",!0);y(E,L,Y,"\u2111","\\Im",!0);y(E,L,Y,"\u2660","\\spadesuit",!0);y(E,L,Y,"\xA7","\\S",!0);y(we,L,Y,"\xA7","\\S");y(E,L,Y,"\xB6","\\P",!0);y(we,L,Y,"\xB6","\\P");y(E,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\textdagger");y(E,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\textdaggerdbl");y(E,L,to,"\u23B1","\\rmoustache",!0);y(E,L,Uo,"\u23B0","\\lmoustache",!0);y(E,L,to,"\u27EF","\\rgroup",!0);y(E,L,Uo,"\u27EE","\\lgroup",!0);y(E,L,Je,"\u2213","\\mp",!0);y(E,L,Je,"\u2296","\\ominus",!0);y(E,L,Je,"\u228E","\\uplus",!0);y(E,L,Je,"\u2293","\\sqcap",!0);y(E,L,Je,"\u2217","\\ast");y(E,L,Je,"\u2294","\\sqcup",!0);y(E,L,Je,"\u25EF","\\bigcirc",!0);y(E,L,Je,"\u2219","\\bullet",!0);y(E,L,Je,"\u2021","\\ddagger");y(E,L,Je,"\u2240","\\wr",!0);y(E,L,Je,"\u2A3F","\\amalg");y(E,L,Je,"&","\\And");y(E,L,j,"\u27F5","\\longleftarrow",!0);y(E,L,j,"\u21D0","\\Leftarrow",!0);y(E,L,j,"\u27F8","\\Longleftarrow",!0);y(E,L,j,"\u27F6","\\longrightarrow",!0);y(E,L,j,"\u21D2","\\Rightarrow",!0);y(E,L,j,"\u27F9","\\Longrightarrow",!0);y(E,L,j,"\u2194","\\leftrightarrow",!0);y(E,L,j,"\u27F7","\\longleftrightarrow",!0);y(E,L,j,"\u21D4","\\Leftrightarrow",!0);y(E,L,j,"\u27FA","\\Longleftrightarrow",!0);y(E,L,j,"\u21A6","\\mapsto",!0);y(E,L,j,"\u27FC","\\longmapsto",!0);y(E,L,j,"\u2197","\\nearrow",!0);y(E,L,j,"\u21A9","\\hookleftarrow",!0);y(E,L,j,"\u21AA","\\hookrightarrow",!0);y(E,L,j,"\u2198","\\searrow",!0);y(E,L,j,"\u21BC","\\leftharpoonup",!0);y(E,L,j,"\u21C0","\\rightharpoonup",!0);y(E,L,j,"\u2199","\\swarrow",!0);y(E,L,j,"\u21BD","\\leftharpoondown",!0);y(E,L,j,"\u21C1","\\rightharpoondown",!0);y(E,L,j,"\u2196","\\nwarrow",!0);y(E,L,j,"\u21CC","\\rightleftharpoons",!0);y(E,U,j,"\u226E","\\nless",!0);y(E,U,j,"\uE010","\\@nleqslant");y(E,U,j,"\uE011","\\@nleqq");y(E,U,j,"\u2A87","\\lneq",!0);y(E,U,j,"\u2268","\\lneqq",!0);y(E,U,j,"\uE00C","\\@lvertneqq");y(E,U,j,"\u22E6","\\lnsim",!0);y(E,U,j,"\u2A89","\\lnapprox",!0);y(E,U,j,"\u2280","\\nprec",!0);y(E,U,j,"\u22E0","\\npreceq",!0);y(E,U,j,"\u22E8","\\precnsim",!0);y(E,U,j,"\u2AB9","\\precnapprox",!0);y(E,U,j,"\u2241","\\nsim",!0);y(E,U,j,"\uE006","\\@nshortmid");y(E,U,j,"\u2224","\\nmid",!0);y(E,U,j,"\u22AC","\\nvdash",!0);y(E,U,j,"\u22AD","\\nvDash",!0);y(E,U,j,"\u22EA","\\ntriangleleft");y(E,U,j,"\u22EC","\\ntrianglelefteq",!0);y(E,U,j,"\u228A","\\subsetneq",!0);y(E,U,j,"\uE01A","\\@varsubsetneq");y(E,U,j,"\u2ACB","\\subsetneqq",!0);y(E,U,j,"\uE017","\\@varsubsetneqq");y(E,U,j,"\u226F","\\ngtr",!0);y(E,U,j,"\uE00F","\\@ngeqslant");y(E,U,j,"\uE00E","\\@ngeqq");y(E,U,j,"\u2A88","\\gneq",!0);y(E,U,j,"\u2269","\\gneqq",!0);y(E,U,j,"\uE00D","\\@gvertneqq");y(E,U,j,"\u22E7","\\gnsim",!0);y(E,U,j,"\u2A8A","\\gnapprox",!0);y(E,U,j,"\u2281","\\nsucc",!0);y(E,U,j,"\u22E1","\\nsucceq",!0);y(E,U,j,"\u22E9","\\succnsim",!0);y(E,U,j,"\u2ABA","\\succnapprox",!0);y(E,U,j,"\u2246","\\ncong",!0);y(E,U,j,"\uE007","\\@nshortparallel");y(E,U,j,"\u2226","\\nparallel",!0);y(E,U,j,"\u22AF","\\nVDash",!0);y(E,U,j,"\u22EB","\\ntriangleright");y(E,U,j,"\u22ED","\\ntrianglerighteq",!0);y(E,U,j,"\uE018","\\@nsupseteqq");y(E,U,j,"\u228B","\\supsetneq",!0);y(E,U,j,"\uE01B","\\@varsupsetneq");y(E,U,j,"\u2ACC","\\supsetneqq",!0);y(E,U,j,"\uE019","\\@varsupsetneqq");y(E,U,j,"\u22AE","\\nVdash",!0);y(E,U,j,"\u2AB5","\\precneqq",!0);y(E,U,j,"\u2AB6","\\succneqq",!0);y(E,U,j,"\uE016","\\@nsubseteqq");y(E,U,Je,"\u22B4","\\unlhd");y(E,U,Je,"\u22B5","\\unrhd");y(E,U,j,"\u219A","\\nleftarrow",!0);y(E,U,j,"\u219B","\\nrightarrow",!0);y(E,U,j,"\u21CD","\\nLeftarrow",!0);y(E,U,j,"\u21CF","\\nRightarrow",!0);y(E,U,j,"\u21AE","\\nleftrightarrow",!0);y(E,U,j,"\u21CE","\\nLeftrightarrow",!0);y(E,U,j,"\u25B3","\\vartriangle");y(E,U,Y,"\u210F","\\hslash");y(E,U,Y,"\u25BD","\\triangledown");y(E,U,Y,"\u25CA","\\lozenge");y(E,U,Y,"\u24C8","\\circledS");y(E,U,Y,"\xAE","\\circledR");y(we,U,Y,"\xAE","\\circledR");y(E,U,Y,"\u2221","\\measuredangle",!0);y(E,U,Y,"\u2204","\\nexists");y(E,U,Y,"\u2127","\\mho");y(E,U,Y,"\u2132","\\Finv",!0);y(E,U,Y,"\u2141","\\Game",!0);y(E,U,Y,"\u2035","\\backprime");y(E,U,Y,"\u25B2","\\blacktriangle");y(E,U,Y,"\u25BC","\\blacktriangledown");y(E,U,Y,"\u25A0","\\blacksquare");y(E,U,Y,"\u29EB","\\blacklozenge");y(E,U,Y,"\u2605","\\bigstar");y(E,U,Y,"\u2222","\\sphericalangle",!0);y(E,U,Y,"\u2201","\\complement",!0);y(E,U,Y,"\xF0","\\eth",!0);y(we,L,Y,"\xF0","\xF0");y(E,U,Y,"\u2571","\\diagup");y(E,U,Y,"\u2572","\\diagdown");y(E,U,Y,"\u25A1","\\square");y(E,U,Y,"\u25A1","\\Box");y(E,U,Y,"\u25CA","\\Diamond");y(E,U,Y,"\xA5","\\yen",!0);y(we,U,Y,"\xA5","\\yen",!0);y(E,U,Y,"\u2713","\\checkmark",!0);y(we,U,Y,"\u2713","\\checkmark");y(E,U,Y,"\u2136","\\beth",!0);y(E,U,Y,"\u2138","\\daleth",!0);y(E,U,Y,"\u2137","\\gimel",!0);y(E,U,Y,"\u03DD","\\digamma",!0);y(E,U,Y,"\u03F0","\\varkappa");y(E,U,Uo,"\u250C","\\@ulcorner",!0);y(E,U,to,"\u2510","\\@urcorner",!0);y(E,U,Uo,"\u2514","\\@llcorner",!0);y(E,U,to,"\u2518","\\@lrcorner",!0);y(E,U,j,"\u2266","\\leqq",!0);y(E,U,j,"\u2A7D","\\leqslant",!0);y(E,U,j,"\u2A95","\\eqslantless",!0);y(E,U,j,"\u2272","\\lesssim",!0);y(E,U,j,"\u2A85","\\lessapprox",!0);y(E,U,j,"\u224A","\\approxeq",!0);y(E,U,Je,"\u22D6","\\lessdot");y(E,U,j,"\u22D8","\\lll",!0);y(E,U,j,"\u2276","\\lessgtr",!0);y(E,U,j,"\u22DA","\\lesseqgtr",!0);y(E,U,j,"\u2A8B","\\lesseqqgtr",!0);y(E,U,j,"\u2251","\\doteqdot");y(E,U,j,"\u2253","\\risingdotseq",!0);y(E,U,j,"\u2252","\\fallingdotseq",!0);y(E,U,j,"\u223D","\\backsim",!0);y(E,U,j,"\u22CD","\\backsimeq",!0);y(E,U,j,"\u2AC5","\\subseteqq",!0);y(E,U,j,"\u22D0","\\Subset",!0);y(E,U,j,"\u228F","\\sqsubset",!0);y(E,U,j,"\u227C","\\preccurlyeq",!0);y(E,U,j,"\u22DE","\\curlyeqprec",!0);y(E,U,j,"\u227E","\\precsim",!0);y(E,U,j,"\u2AB7","\\precapprox",!0);y(E,U,j,"\u22B2","\\vartriangleleft");y(E,U,j,"\u22B4","\\trianglelefteq");y(E,U,j,"\u22A8","\\vDash",!0);y(E,U,j,"\u22AA","\\Vvdash",!0);y(E,U,j,"\u2323","\\smallsmile");y(E,U,j,"\u2322","\\smallfrown");y(E,U,j,"\u224F","\\bumpeq",!0);y(E,U,j,"\u224E","\\Bumpeq",!0);y(E,U,j,"\u2267","\\geqq",!0);y(E,U,j,"\u2A7E","\\geqslant",!0);y(E,U,j,"\u2A96","\\eqslantgtr",!0);y(E,U,j,"\u2273","\\gtrsim",!0);y(E,U,j,"\u2A86","\\gtrapprox",!0);y(E,U,Je,"\u22D7","\\gtrdot");y(E,U,j,"\u22D9","\\ggg",!0);y(E,U,j,"\u2277","\\gtrless",!0);y(E,U,j,"\u22DB","\\gtreqless",!0);y(E,U,j,"\u2A8C","\\gtreqqless",!0);y(E,U,j,"\u2256","\\eqcirc",!0);y(E,U,j,"\u2257","\\circeq",!0);y(E,U,j,"\u225C","\\triangleq",!0);y(E,U,j,"\u223C","\\thicksim");y(E,U,j,"\u2248","\\thickapprox");y(E,U,j,"\u2AC6","\\supseteqq",!0);y(E,U,j,"\u22D1","\\Supset",!0);y(E,U,j,"\u2290","\\sqsupset",!0);y(E,U,j,"\u227D","\\succcurlyeq",!0);y(E,U,j,"\u22DF","\\curlyeqsucc",!0);y(E,U,j,"\u227F","\\succsim",!0);y(E,U,j,"\u2AB8","\\succapprox",!0);y(E,U,j,"\u22B3","\\vartriangleright");y(E,U,j,"\u22B5","\\trianglerighteq");y(E,U,j,"\u22A9","\\Vdash",!0);y(E,U,j,"\u2223","\\shortmid");y(E,U,j,"\u2225","\\shortparallel");y(E,U,j,"\u226C","\\between",!0);y(E,U,j,"\u22D4","\\pitchfork",!0);y(E,U,j,"\u221D","\\varpropto");y(E,U,j,"\u25C0","\\blacktriangleleft");y(E,U,j,"\u2234","\\therefore",!0);y(E,U,j,"\u220D","\\backepsilon");y(E,U,j,"\u25B6","\\blacktriangleright");y(E,U,j,"\u2235","\\because",!0);y(E,U,j,"\u22D8","\\llless");y(E,U,j,"\u22D9","\\gggtr");y(E,U,Je,"\u22B2","\\lhd");y(E,U,Je,"\u22B3","\\rhd");y(E,U,j,"\u2242","\\eqsim",!0);y(E,L,j,"\u22C8","\\Join");y(E,U,j,"\u2251","\\Doteq",!0);y(E,U,Je,"\u2214","\\dotplus",!0);y(E,U,Je,"\u2216","\\smallsetminus");y(E,U,Je,"\u22D2","\\Cap",!0);y(E,U,Je,"\u22D3","\\Cup",!0);y(E,U,Je,"\u2A5E","\\doublebarwedge",!0);y(E,U,Je,"\u229F","\\boxminus",!0);y(E,U,Je,"\u229E","\\boxplus",!0);y(E,U,Je,"\u22C7","\\divideontimes",!0);y(E,U,Je,"\u22C9","\\ltimes",!0);y(E,U,Je,"\u22CA","\\rtimes",!0);y(E,U,Je,"\u22CB","\\leftthreetimes",!0);y(E,U,Je,"\u22CC","\\rightthreetimes",!0);y(E,U,Je,"\u22CF","\\curlywedge",!0);y(E,U,Je,"\u22CE","\\curlyvee",!0);y(E,U,Je,"\u229D","\\circleddash",!0);y(E,U,Je,"\u229B","\\circledast",!0);y(E,U,Je,"\u22C5","\\centerdot");y(E,U,Je,"\u22BA","\\intercal",!0);y(E,U,Je,"\u22D2","\\doublecap");y(E,U,Je,"\u22D3","\\doublecup");y(E,U,Je,"\u22A0","\\boxtimes",!0);y(E,U,j,"\u21E2","\\dashrightarrow",!0);y(E,U,j,"\u21E0","\\dashleftarrow",!0);y(E,U,j,"\u21C7","\\leftleftarrows",!0);y(E,U,j,"\u21C6","\\leftrightarrows",!0);y(E,U,j,"\u21DA","\\Lleftarrow",!0);y(E,U,j,"\u219E","\\twoheadleftarrow",!0);y(E,U,j,"\u21A2","\\leftarrowtail",!0);y(E,U,j,"\u21AB","\\looparrowleft",!0);y(E,U,j,"\u21CB","\\leftrightharpoons",!0);y(E,U,j,"\u21B6","\\curvearrowleft",!0);y(E,U,j,"\u21BA","\\circlearrowleft",!0);y(E,U,j,"\u21B0","\\Lsh",!0);y(E,U,j,"\u21C8","\\upuparrows",!0);y(E,U,j,"\u21BF","\\upharpoonleft",!0);y(E,U,j,"\u21C3","\\downharpoonleft",!0);y(E,L,j,"\u22B6","\\origof",!0);y(E,L,j,"\u22B7","\\imageof",!0);y(E,U,j,"\u22B8","\\multimap",!0);y(E,U,j,"\u21AD","\\leftrightsquigarrow",!0);y(E,U,j,"\u21C9","\\rightrightarrows",!0);y(E,U,j,"\u21C4","\\rightleftarrows",!0);y(E,U,j,"\u21A0","\\twoheadrightarrow",!0);y(E,U,j,"\u21A3","\\rightarrowtail",!0);y(E,U,j,"\u21AC","\\looparrowright",!0);y(E,U,j,"\u21B7","\\curvearrowright",!0);y(E,U,j,"\u21BB","\\circlearrowright",!0);y(E,U,j,"\u21B1","\\Rsh",!0);y(E,U,j,"\u21CA","\\downdownarrows",!0);y(E,U,j,"\u21BE","\\upharpoonright",!0);y(E,U,j,"\u21C2","\\downharpoonright",!0);y(E,U,j,"\u21DD","\\rightsquigarrow",!0);y(E,U,j,"\u21DD","\\leadsto");y(E,U,j,"\u21DB","\\Rrightarrow",!0);y(E,U,j,"\u21BE","\\restriction");y(E,L,Y,"\u2018","`");y(E,L,Y,"$","\\$");y(we,L,Y,"$","\\$");y(we,L,Y,"$","\\textdollar");y(E,L,Y,"%","\\%");y(we,L,Y,"%","\\%");y(E,L,Y,"_","\\_");y(we,L,Y,"_","\\_");y(we,L,Y,"_","\\textunderscore");y(E,L,Y,"\u2220","\\angle",!0);y(E,L,Y,"\u221E","\\infty",!0);y(E,L,Y,"\u2032","\\prime");y(E,L,Y,"\u25B3","\\triangle");y(E,L,Y,"\u0393","\\Gamma",!0);y(E,L,Y,"\u0394","\\Delta",!0);y(E,L,Y,"\u0398","\\Theta",!0);y(E,L,Y,"\u039B","\\Lambda",!0);y(E,L,Y,"\u039E","\\Xi",!0);y(E,L,Y,"\u03A0","\\Pi",!0);y(E,L,Y,"\u03A3","\\Sigma",!0);y(E,L,Y,"\u03A5","\\Upsilon",!0);y(E,L,Y,"\u03A6","\\Phi",!0);y(E,L,Y,"\u03A8","\\Psi",!0);y(E,L,Y,"\u03A9","\\Omega",!0);y(E,L,Y,"A","\u0391");y(E,L,Y,"B","\u0392");y(E,L,Y,"E","\u0395");y(E,L,Y,"Z","\u0396");y(E,L,Y,"H","\u0397");y(E,L,Y,"I","\u0399");y(E,L,Y,"K","\u039A");y(E,L,Y,"M","\u039C");y(E,L,Y,"N","\u039D");y(E,L,Y,"O","\u039F");y(E,L,Y,"P","\u03A1");y(E,L,Y,"T","\u03A4");y(E,L,Y,"X","\u03A7");y(E,L,Y,"\xAC","\\neg",!0);y(E,L,Y,"\xAC","\\lnot");y(E,L,Y,"\u22A4","\\top");y(E,L,Y,"\u22A5","\\bot");y(E,L,Y,"\u2205","\\emptyset");y(E,U,Y,"\u2205","\\varnothing");y(E,L,bt,"\u03B1","\\alpha",!0);y(E,L,bt,"\u03B2","\\beta",!0);y(E,L,bt,"\u03B3","\\gamma",!0);y(E,L,bt,"\u03B4","\\delta",!0);y(E,L,bt,"\u03F5","\\epsilon",!0);y(E,L,bt,"\u03B6","\\zeta",!0);y(E,L,bt,"\u03B7","\\eta",!0);y(E,L,bt,"\u03B8","\\theta",!0);y(E,L,bt,"\u03B9","\\iota",!0);y(E,L,bt,"\u03BA","\\kappa",!0);y(E,L,bt,"\u03BB","\\lambda",!0);y(E,L,bt,"\u03BC","\\mu",!0);y(E,L,bt,"\u03BD","\\nu",!0);y(E,L,bt,"\u03BE","\\xi",!0);y(E,L,bt,"\u03BF","\\omicron",!0);y(E,L,bt,"\u03C0","\\pi",!0);y(E,L,bt,"\u03C1","\\rho",!0);y(E,L,bt,"\u03C3","\\sigma",!0);y(E,L,bt,"\u03C4","\\tau",!0);y(E,L,bt,"\u03C5","\\upsilon",!0);y(E,L,bt,"\u03D5","\\phi",!0);y(E,L,bt,"\u03C7","\\chi",!0);y(E,L,bt,"\u03C8","\\psi",!0);y(E,L,bt,"\u03C9","\\omega",!0);y(E,L,bt,"\u03B5","\\varepsilon",!0);y(E,L,bt,"\u03D1","\\vartheta",!0);y(E,L,bt,"\u03D6","\\varpi",!0);y(E,L,bt,"\u03F1","\\varrho",!0);y(E,L,bt,"\u03C2","\\varsigma",!0);y(E,L,bt,"\u03C6","\\varphi",!0);y(E,L,Je,"\u2217","*",!0);y(E,L,Je,"+","+");y(E,L,Je,"\u2212","-",!0);y(E,L,Je,"\u22C5","\\cdot",!0);y(E,L,Je,"\u2218","\\circ",!0);y(E,L,Je,"\xF7","\\div",!0);y(E,L,Je,"\xB1","\\pm",!0);y(E,L,Je,"\xD7","\\times",!0);y(E,L,Je,"\u2229","\\cap",!0);y(E,L,Je,"\u222A","\\cup",!0);y(E,L,Je,"\u2216","\\setminus",!0);y(E,L,Je,"\u2227","\\land");y(E,L,Je,"\u2228","\\lor");y(E,L,Je,"\u2227","\\wedge",!0);y(E,L,Je,"\u2228","\\vee",!0);y(E,L,Y,"\u221A","\\surd");y(E,L,Uo,"\u27E8","\\langle",!0);y(E,L,Uo,"\u2223","\\lvert");y(E,L,Uo,"\u2225","\\lVert");y(E,L,to,"?","?");y(E,L,to,"!","!");y(E,L,to,"\u27E9","\\rangle",!0);y(E,L,to,"\u2223","\\rvert");y(E,L,to,"\u2225","\\rVert");y(E,L,j,"=","=");y(E,L,j,":",":");y(E,L,j,"\u2248","\\approx",!0);y(E,L,j,"\u2245","\\cong",!0);y(E,L,j,"\u2265","\\ge");y(E,L,j,"\u2265","\\geq",!0);y(E,L,j,"\u2190","\\gets");y(E,L,j,">","\\gt",!0);y(E,L,j,"\u2208","\\in",!0);y(E,L,j,"\uE020","\\@not");y(E,L,j,"\u2282","\\subset",!0);y(E,L,j,"\u2283","\\supset",!0);y(E,L,j,"\u2286","\\subseteq",!0);y(E,L,j,"\u2287","\\supseteq",!0);y(E,U,j,"\u2288","\\nsubseteq",!0);y(E,U,j,"\u2289","\\nsupseteq",!0);y(E,L,j,"\u22A8","\\models");y(E,L,j,"\u2190","\\leftarrow",!0);y(E,L,j,"\u2264","\\le");y(E,L,j,"\u2264","\\leq",!0);y(E,L,j,"<","\\lt",!0);y(E,L,j,"\u2192","\\rightarrow",!0);y(E,L,j,"\u2192","\\to");y(E,U,j,"\u2271","\\ngeq",!0);y(E,U,j,"\u2270","\\nleq",!0);y(E,L,Zl,"\xA0","\\ ");y(E,L,Zl,"\xA0","\\space");y(E,L,Zl,"\xA0","\\nobreakspace");y(we,L,Zl,"\xA0","\\ ");y(we,L,Zl,"\xA0"," ");y(we,L,Zl,"\xA0","\\space");y(we,L,Zl,"\xA0","\\nobreakspace");y(E,L,Zl,null,"\\nobreak");y(E,L,Zl,null,"\\allowbreak");y(E,L,_4,",",",");y(E,L,_4,";",";");y(E,U,Je,"\u22BC","\\barwedge",!0);y(E,U,Je,"\u22BB","\\veebar",!0);y(E,L,Je,"\u2299","\\odot",!0);y(E,L,Je,"\u2295","\\oplus",!0);y(E,L,Je,"\u2297","\\otimes",!0);y(E,L,Y,"\u2202","\\partial",!0);y(E,L,Je,"\u2298","\\oslash",!0);y(E,U,Je,"\u229A","\\circledcirc",!0);y(E,U,Je,"\u22A1","\\boxdot",!0);y(E,L,Je,"\u25B3","\\bigtriangleup");y(E,L,Je,"\u25BD","\\bigtriangledown");y(E,L,Je,"\u2020","\\dagger");y(E,L,Je,"\u22C4","\\diamond");y(E,L,Je,"\u22C6","\\star");y(E,L,Je,"\u25C3","\\triangleleft");y(E,L,Je,"\u25B9","\\triangleright");y(E,L,Uo,"{","\\{");y(we,L,Y,"{","\\{");y(we,L,Y,"{","\\textbraceleft");y(E,L,to,"}","\\}");y(we,L,Y,"}","\\}");y(we,L,Y,"}","\\textbraceright");y(E,L,Uo,"{","\\lbrace");y(E,L,to,"}","\\rbrace");y(E,L,Uo,"[","\\lbrack",!0);y(we,L,Y,"[","\\lbrack",!0);y(E,L,to,"]","\\rbrack",!0);y(we,L,Y,"]","\\rbrack",!0);y(E,L,Uo,"(","\\lparen",!0);y(E,L,to,")","\\rparen",!0);y(we,L,Y,"<","\\textless",!0);y(we,L,Y,">","\\textgreater",!0);y(E,L,Uo,"\u230A","\\lfloor",!0);y(E,L,to,"\u230B","\\rfloor",!0);y(E,L,Uo,"\u2308","\\lceil",!0);y(E,L,to,"\u2309","\\rceil",!0);y(E,L,Y,"\\","\\backslash");y(E,L,Y,"\u2223","|");y(E,L,Y,"\u2223","\\vert");y(we,L,Y,"|","\\textbar",!0);y(E,L,Y,"\u2225","\\|");y(E,L,Y,"\u2225","\\Vert");y(we,L,Y,"\u2225","\\textbardbl");y(we,L,Y,"~","\\textasciitilde");y(we,L,Y,"\\","\\textbackslash");y(we,L,Y,"^","\\textasciicircum");y(E,L,j,"\u2191","\\uparrow",!0);y(E,L,j,"\u21D1","\\Uparrow",!0);y(E,L,j,"\u2193","\\downarrow",!0);y(E,L,j,"\u21D3","\\Downarrow",!0);y(E,L,j,"\u2195","\\updownarrow",!0);y(E,L,j,"\u21D5","\\Updownarrow",!0);y(E,L,Nn,"\u2210","\\coprod");y(E,L,Nn,"\u22C1","\\bigvee");y(E,L,Nn,"\u22C0","\\bigwedge");y(E,L,Nn,"\u2A04","\\biguplus");y(E,L,Nn,"\u22C2","\\bigcap");y(E,L,Nn,"\u22C3","\\bigcup");y(E,L,Nn,"\u222B","\\int");y(E,L,Nn,"\u222B","\\intop");y(E,L,Nn,"\u222C","\\iint");y(E,L,Nn,"\u222D","\\iiint");y(E,L,Nn,"\u220F","\\prod");y(E,L,Nn,"\u2211","\\sum");y(E,L,Nn,"\u2A02","\\bigotimes");y(E,L,Nn,"\u2A01","\\bigoplus");y(E,L,Nn,"\u2A00","\\bigodot");y(E,L,Nn,"\u222E","\\oint");y(E,L,Nn,"\u222F","\\oiint");y(E,L,Nn,"\u2230","\\oiiint");y(E,L,Nn,"\u2A06","\\bigsqcup");y(E,L,Nn,"\u222B","\\smallint");y(we,L,Vf,"\u2026","\\textellipsis");y(E,L,Vf,"\u2026","\\mathellipsis");y(we,L,Vf,"\u2026","\\ldots",!0);y(E,L,Vf,"\u2026","\\ldots",!0);y(E,L,Vf,"\u22EF","\\@cdots",!0);y(E,L,Vf,"\u22F1","\\ddots",!0);y(E,L,Y,"\u22EE","\\varvdots");y(E,L,Ji,"\u02CA","\\acute");y(E,L,Ji,"\u02CB","\\grave");y(E,L,Ji,"\xA8","\\ddot");y(E,L,Ji,"~","\\tilde");y(E,L,Ji,"\u02C9","\\bar");y(E,L,Ji,"\u02D8","\\breve");y(E,L,Ji,"\u02C7","\\check");y(E,L,Ji,"^","\\hat");y(E,L,Ji,"\u20D7","\\vec");y(E,L,Ji,"\u02D9","\\dot");y(E,L,Ji,"\u02DA","\\mathring");y(E,L,bt,"\uE131","\\@imath");y(E,L,bt,"\uE237","\\@jmath");y(E,L,Y,"\u0131","\u0131");y(E,L,Y,"\u0237","\u0237");y(we,L,Y,"\u0131","\\i",!0);y(we,L,Y,"\u0237","\\j",!0);y(we,L,Y,"\xDF","\\ss",!0);y(we,L,Y,"\xE6","\\ae",!0);y(we,L,Y,"\u0153","\\oe",!0);y(we,L,Y,"\xF8","\\o",!0);y(we,L,Y,"\xC6","\\AE",!0);y(we,L,Y,"\u0152","\\OE",!0);y(we,L,Y,"\xD8","\\O",!0);y(we,L,Ji,"\u02CA","\\'");y(we,L,Ji,"\u02CB","\\`");y(we,L,Ji,"\u02C6","\\^");y(we,L,Ji,"\u02DC","\\~");y(we,L,Ji,"\u02C9","\\=");y(we,L,Ji,"\u02D8","\\u");y(we,L,Ji,"\u02D9","\\.");y(we,L,Ji,"\xB8","\\c");y(we,L,Ji,"\u02DA","\\r");y(we,L,Ji,"\u02C7","\\v");y(we,L,Ji,"\xA8",'\\"');y(we,L,Ji,"\u02DD","\\H");y(we,L,Ji,"\u25EF","\\textcircled");var xj={"--":!0,"---":!0,"``":!0,"''":!0};y(we,L,Y,"\u2013","--",!0);y(we,L,Y,"\u2013","\\textendash");y(we,L,Y,"\u2014","---",!0);y(we,L,Y,"\u2014","\\textemdash");y(we,L,Y,"\u2018","`",!0);y(we,L,Y,"\u2018","\\textquoteleft");y(we,L,Y,"\u2019","'",!0);y(we,L,Y,"\u2019","\\textquoteright");y(we,L,Y,"\u201C","``",!0);y(we,L,Y,"\u201C","\\textquotedblleft");y(we,L,Y,"\u201D","''",!0);y(we,L,Y,"\u201D","\\textquotedblright");y(E,L,Y,"\xB0","\\degree",!0);y(we,L,Y,"\xB0","\\degree");y(we,L,Y,"\xB0","\\textdegree",!0);y(E,L,Y,"\xA3","\\pounds");y(E,L,Y,"\xA3","\\mathsterling",!0);y(we,L,Y,"\xA3","\\pounds");y(we,L,Y,"\xA3","\\textsterling",!0);y(E,U,Y,"\u2720","\\maltese");y(we,U,Y,"\u2720","\\maltese");var qW='0123456789/@."';for(J5=0;J5<qW.length;J5++)a8=qW.charAt(J5),y(E,L,Y,a8,a8);var a8,J5,GW='0123456789!@*()-=+";:?/.,';for(Z5=0;Z5<GW.length;Z5++)l8=GW.charAt(Z5),y(we,L,Y,l8,l8);var l8,Z5,h4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(e4=0;e4<h4.length;e4++)q1=h4.charAt(e4),y(E,L,bt,q1,q1),y(we,L,Y,q1,q1);var q1,e4;y(E,U,Y,"C","\u2102");y(we,U,Y,"C","\u2102");y(E,U,Y,"H","\u210D");y(we,U,Y,"H","\u210D");y(E,U,Y,"N","\u2115");y(we,U,Y,"N","\u2115");y(E,U,Y,"P","\u2119");y(we,U,Y,"P","\u2119");y(E,U,Y,"Q","\u211A");y(we,U,Y,"Q","\u211A");y(E,U,Y,"R","\u211D");y(we,U,Y,"R","\u211D");y(E,U,Y,"Z","\u2124");y(we,U,Y,"Z","\u2124");y(E,L,bt,"h","\u210E");y(we,L,bt,"h","\u210E");var kt="";for(Zr=0;Zr<h4.length;Zr++)En=h4.charAt(Zr),kt=String.fromCharCode(55349,56320+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56372+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56424+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56580+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56736+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56788+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56840+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56944+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),Zr<26&&(kt=String.fromCharCode(55349,56632+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt),kt=String.fromCharCode(55349,56476+Zr),y(E,L,bt,En,kt),y(we,L,Y,En,kt));var En,Zr;kt=String.fromCharCode(55349,56668);y(E,L,bt,"k",kt);y(we,L,Y,"k",kt);for(dd=0;dd<10;dd++)Gl=dd.toString(),kt=String.fromCharCode(55349,57294+dd),y(E,L,bt,Gl,kt),y(we,L,Y,Gl,kt),kt=String.fromCharCode(55349,57314+dd),y(E,L,bt,Gl,kt),y(we,L,Y,Gl,kt),kt=String.fromCharCode(55349,57324+dd),y(E,L,bt,Gl,kt),y(we,L,Y,Gl,kt),kt=String.fromCharCode(55349,57334+dd),y(E,L,bt,Gl,kt),y(we,L,Y,Gl,kt);var Gl,dd,C8="\xD0\xDE\xFE";for(t4=0;t4<C8.length;t4++)G1=C8.charAt(t4),y(E,L,bt,G1,G1),y(we,L,Y,G1,G1);var G1,t4,i4=[["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"]],$W=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Nhe=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[i4[a][2],i4[a][s]]}else if(120782<=o&&o<=120831){var l=Math.floor((o-120782)/10);return[$W[l][2],$W[l][s]]}else{if(o===120485||o===120486)return[i4[0][2],i4[0][s]];if(120486<o&&o<120782)return["",""];throw new Ie("Unsupported character: "+e)}},b4=function(e,t,n){return ji[n][e]&&ji[n][e].replace&&(e=ji[n][e].replace),{value:e,metrics:M8(e,t,n)}},js=function(e,t,n,r,o){var s=b4(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 yo(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 yo(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},Rhe=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&b4(e,"Main-Bold",t).metrics?js(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||ji[t][e].font==="main"?js(e,"Main-Regular",t,n,r):js(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},Ohe=function(e,t,n,r,o){return o!=="textord"&&b4(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Phe=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]=Nhe(o,r);return js(o,c,r,t,s.concat(d))}else if(l){var u,h;if(l==="boldsymbol"){var p=Ohe(o,r,t,s,n);u=p.fontName,h=[p.fontClass]}else a?(u=kj[l].fontName,h=[l]):(u=n4(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if(b4(o,u,r).metrics)return js(o,u,r,t,s.concat(h));if(xj.hasOwnProperty(o)&&u.slice(0,10)==="Typewriter"){for(var m=[],g=0;g<o.length;g++)m.push(js(o[g],u,r,t,s.concat(h)));return Tj(m)}}if(n==="mathord")return js(o,"Math-Italic",r,t,s.concat(["mathnormal"]));if(n==="textord"){var b=ji[r][o]&&ji[r][o].font;if(b==="ams"){var S=n4("amsrm",t.fontWeight,t.fontShape);return js(o,S,r,t,s.concat("amsrm",t.fontWeight,t.fontShape))}else if(b==="main"||!b){var k=n4("textrm",t.fontWeight,t.fontShape);return js(o,k,r,t,s.concat(t.fontWeight,t.fontShape))}else{var N=n4(b,t.fontWeight,t.fontShape);return js(o,N,r,t,s.concat(N,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Fhe=(i,e)=>{if(hd(i.classes)!==hd(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},Hhe=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof yo&&n instanceof yo&&Fhe(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},D8=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},_o=function(e,t,n,r){var o=new Au(e,t,n,r);return D8(o),o},Ej=(i,e,t,n)=>new Au(i,e,t,n),Bhe=function(e,t,n){var r=_o([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ze(r.height),r.maxFontSize=1,r},zhe=function(e,t,n,r){var o=new J1(e,t,n,r);return D8(o),o},Tj=function(e){var t=new Iu(e);return D8(t),t},Uhe=function(e,t){return e instanceof Iu?_o([],[e],t):e},Whe=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,u=0;u<e.children.length;u++){var h=e.children[u];d-=h.type==="kern"?h.size:h.elem.height+h.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var p=e.children[0];if(p.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-p.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-p.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},jhe=function(e,t){for(var{children:n,depth:r}=Whe(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=_o(["pstrut"],[]);c.style.height=ze(o);for(var d=[],u=r,h=r,p=r,m=0;m<n.length;m++){var g=n[m];if(g.type==="kern")p+=g.size;else{var b=g.elem,S=g.wrapperClasses||[],k=g.wrapperStyle||{},N=_o(S,[c,b],void 0,k);N.style.top=ze(-o-p-b.depth),g.marginLeft&&(N.style.marginLeft=g.marginLeft),g.marginRight&&(N.style.marginRight=g.marginRight),d.push(N),p+=b.height+b.depth}u=Math.min(u,p),h=Math.max(h,p)}var A=_o(["vlist"],d);A.style.height=ze(h);var H;if(u<0){var K=_o([],[]),W=_o(["vlist"],[K]);W.style.height=ze(-u);var re=_o(["vlist-s"],[new yo("\u200B")]);H=[_o(["vlist-r"],[A,re]),_o(["vlist-r"],[W])]}else H=[_o(["vlist-r"],[A])];var ae=_o(["vlist-t"],H);return H.length===2&&ae.classes.push("vlist-t2"),ae.height=h,ae.depth=-u,ae},Vhe=(i,e)=>{var t=_o(["mspace"],[],e),n=cn(i,e);return t.style.marginRight=ze(n),t},n4=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},kj={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"}},Ij={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Khe=function(e,t){var[n,r,o]=Ij[e],s=new Ua(n),a=new Vs([s],{width:ze(r),height:ze(o),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=Ej(["overlay"],[a],t);return l.height=o,l.style.height=ze(o),l.style.width=ze(r),l},te={fontMap:kj,makeSymbol:js,mathsym:Rhe,makeSpan:_o,makeSvgSpan:Ej,makeLineSpan:Bhe,makeAnchor:zhe,makeFragment:Tj,wrapFragment:Uhe,makeVList:jhe,makeOrd:Phe,makeGlue:Vhe,staticSvg:Khe,svgData:Ij,tryCombineChars:Hhe},ln={number:3,unit:"mu"},Tu={number:4,unit:"mu"},$l={number:5,unit:"mu"},qhe={mord:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mop:{mord:ln,mop:ln,mrel:$l,minner:ln},mbin:{mord:Tu,mop:Tu,mopen:Tu,minner:Tu},mrel:{mord:$l,mop:$l,mopen:$l,minner:$l},mopen:{},mclose:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mpunct:{mord:ln,mop:ln,mrel:$l,mopen:ln,mclose:ln,mpunct:ln,minner:ln},minner:{mord:ln,mop:ln,mbin:Tu,mrel:$l,mopen:ln,mpunct:ln,minner:ln}},Ghe={mord:{mop:ln},mop:{mord:ln,mop:ln},mbin:{},mrel:{},mopen:{},mclose:{mop:ln},mpunct:{},minner:{mop:ln}},Aj={},f4={},p4={};function Ye(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)Aj[t[l]]=a;e&&(o&&(f4[e]=o),s&&(p4[e]=s))}function Lu(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;Ye({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var m4=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Tn=function(e){return e.type==="ordgroup"?e.body:[e]},Ql=te.makeSpan,$he=["leftmost","mbin","mopen","mrel","mop","mpunct"],Yhe=["rightmost","mrel","mclose","mpunct"],Xhe={display:_t.DISPLAY,text:_t.TEXT,script:_t.SCRIPT,scriptscript:_t.SCRIPTSCRIPT},Qhe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Yn=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var o=[],s=0;s<e.length;s++){var a=ci(e[s],t);if(a instanceof Iu){var l=a.children;o.push(...l)}else o.push(a)}if(te.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(Xhe[d.style]))}var u=Ql([r[0]||"leftmost"],[],t),h=Ql([r[1]||"rightmost"],[],t),p=n==="root";return YW(o,(m,g)=>{var b=g.classes[0],S=m.classes[0];b==="mbin"&&wt.contains(Yhe,S)?g.classes[0]="mord":S==="mbin"&&wt.contains($he,b)&&(m.classes[0]="mord")},{node:u},h,p),YW(o,(m,g)=>{var b=S8(g),S=S8(m),k=b&&S?m.hasClass("mtight")?Ghe[b][S]:qhe[b][S]:null;if(k)return te.makeGlue(k,c)},{node:u},h,p),o},YW=function i(e,t,n,r,o){r&&e.push(r);for(var s=0;s<e.length;s++){var a=e[s],l=Lj(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=Ql(["leftmost"])),n.insertAfter=(u=>h=>{e.splice(u+1,0,h),s++})(s)}r&&e.pop()},Lj=function(e){return e instanceof Iu||e instanceof J1||e instanceof Au&&e.hasClass("enclosing")?e:null},Jhe=function i(e,t){var n=Lj(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},S8=function(e,t){return e?(t&&(e=Jhe(e,t)),Qhe[e.classes[0]]||null):null},e0=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Ql(t.concat(n))},ci=function(e,t,n){if(!e)return Ql();if(f4[e.type]){var r=f4[e.type](e,t);if(n&&t.size!==n.size){r=Ql(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function r4(i,e){var t=Ql(["base"],i,e),n=Ql(["strut"]);return n.style.height=ze(t.height+t.depth),t.depth&&(n.style.verticalAlign=ze(-t.depth)),t.children.unshift(n),t}function w8(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Yn(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(r4(s,e)),s=[])}else n[a].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(r4(s,e)),s=[]),o.push(n[a]));s.length>0&&o.push(r4(s,e));var c;t?(c=r4(Yn(t,e,!0)),c.classes=["tag"],o.push(c)):r&&o.push(r);var d=Ql(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=ze(d.height+d.depth),d.depth&&(u.style.verticalAlign=ze(-d.depth))}return d}function Mj(i){return new Iu(i)}var bo=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=hd(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+=wt.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+wt.escape(hd(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("")}},ku=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return wt.escape(this.toText())}toText(){return this.text}},x8=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",ze(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ze(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ee={MathNode:bo,TextNode:ku,SpaceNode:x8,newDocumentFragment:Mj},_s=function(e,t,n){return ji[t][e]&&ji[t][e].replace&&e.charCodeAt(0)!==55349&&!(xj.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=ji[t][e].replace),new Ee.TextNode(e)},N8=function(e){return e.length===1?e[0]:new Ee.MathNode("mrow",e)},R8=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(wt.contains(["\\imath","\\jmath"],o))return null;ji[r][o]&&ji[r][o].replace&&(o=ji[r][o].replace);var s=te.fontMap[n].fontName;return M8(o,s,r)?te.fontMap[n].variant:null},Co=function(e,t,n){if(e.length===1){var r=Oi(e[0],t);return n&&r instanceof bo&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],s,a=0;a<e.length;a++){var l=Oi(e[a],t);if(l instanceof bo&&s instanceof bo){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 ku&&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 ku&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var u=l.children[0];u instanceof ku&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},fd=function(e,t,n){return N8(Co(e,t,n))},Oi=function(e,t){if(!e)return new Ee.MathNode("mrow");if(p4[e.type]){var n=p4[e.type](e,t);return n}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function XW(i,e,t,n,r){var o=Co(i,t),s;o.length===1&&o[0]instanceof bo&&wt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ee.MathNode("mrow",o);var a=new Ee.MathNode("annotation",[new Ee.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ee.MathNode("semantics",[s,a]),c=new Ee.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 te.makeSpan([d],[c])}var Dj=function(e){return new u4({style:e.displayMode?_t.DISPLAY:_t.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Nj=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=te.makeSpan(n,[e])}return e},Zhe=function(e,t,n){var r=Dj(n),o;if(n.output==="mathml")return XW(e,t,r,n.displayMode,!0);if(n.output==="html"){var s=w8(e,r);o=te.makeSpan(["katex"],[s])}else{var a=XW(e,t,r,n.displayMode,!1),l=w8(e,r);o=te.makeSpan(["katex"],[a,l])}return Nj(o,n)},efe=function(e,t,n){var r=Dj(n),o=w8(e,r),s=te.makeSpan(["katex"],[o]);return Nj(s,n)},tfe={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":"="},ife=function(e){var t=new Ee.MathNode("mo",[new Ee.TextNode(tfe[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},nfe={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]},rfe=function(e){return e.type==="ordgroup"?e.body.length:1},ofe=function(e,t){function n(){var a=4e5,l=e.label.slice(1);if(wt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=rfe(c.base),u,h,p;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,p=.42,h=l+"4"):(u=312,a=2340,p=.34,h="tilde4");else{var m=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][m],u=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Ua(h),b=new Vs([g],{width:"100%",height:ze(p),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:te.makeSvgSpan([],[b],t),minWidth:0,height:p}}else{var S=[],k=nfe[l],[N,A,H]=k,K=H/1e3,W=N.length,re,ae;if(W===1){var Ne=k[3];re=["hide-tail"],ae=[Ne]}else if(W===2)re=["halfarrow-left","halfarrow-right"],ae=["xMinYMin","xMaxYMin"];else if(W===3)re=["brace-left","brace-center","brace-right"],ae=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+W+" children.");for(var he=0;he<W;he++){var Xe=new Ua(N[he]),st=new Vs([Xe],{width:"400em",height:ze(K),viewBox:"0 0 "+a+" "+H,preserveAspectRatio:ae[he]+" slice"}),rt=te.makeSvgSpan([re[he]],[st],t);if(W===1)return{span:rt,minWidth:A,height:K};rt.style.height=ze(K),S.push(rt)}return{span:te.makeSpan(["stretchy"],S,t),minWidth:A,height:K}}}var{span:r,minWidth:o,height:s}=n();return r.height=s,r.style.height=ze(s),o>0&&(r.style.minWidth=ze(o)),r},sfe=function(e,t,n,r,o){var s,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(s=te.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 Z1({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new Z1({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Vs(c,{width:"100%",height:ze(a)});s=te.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=ze(a),s},Jl={encloseSpan:sfe,mathMLnode:ife,svgSpan:ofe};function Wt(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 O8(i){var e=y4(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 y4(i){return i&&(i.type==="atom"||Dhe.hasOwnProperty(i.type))?i:null}var P8=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Wt(i.base,"accent"),t=n.base,i.base=t,r=Lhe(ci(i,e)),i.base=n):(n=Wt(i,"accent"),t=n.base);var o=ci(t,e.havingCrampedStyle()),s=n.isShifty&&wt.isCharacterBox(t),a=0;if(s){var l=wt.getBaseElem(t),c=ci(l,e.havingCrampedStyle());a=KW(c).skew}var d=n.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=Jl.svgSpan(n,e),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ze(2*a)+")",marginLeft:ze(2*a)}:void 0}]},e);else{var p,m;n.label==="\\vec"?(p=te.staticSvg("vec",e),m=te.svgData.vec[1]):(p=te.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=KW(p),p.italic=0,m=p.width,d&&(u+=p.depth)),h=te.makeSpan(["accent-body"],[p]);var g=n.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var b=a;g||(b-=m/2),h.style.left=ze(b),n.label==="\\textcircled"&&(h.style.top=".2em"),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var S=te.makeSpan(["mord","accent"],[h],e);return r?(r.children[0]=S,r.height=Math.max(S.height,r.height),r.classes[0]="mord",r):S},Rj=(i,e)=>{var t=i.isStretchy?Jl.mathMLnode(i.label):new Ee.MathNode("mo",[_s(i.label,i.mode)]),n=new Ee.MathNode("mover",[Oi(i.base,e),t]);return n.setAttribute("accent","true"),n},afe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));Ye({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=m4(e[0]),n=!afe.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:P8,mathmlBuilder:Rj});Ye({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:P8,mathmlBuilder:Rj});Ye({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=ci(i.base,e),n=Jl.svgSpan(i,e),r=i.label==="\\utilde"?.12:0,o=te.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]},e);return te.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=Jl.mathMLnode(i.label),n=new Ee.MathNode("munder",[Oi(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var o4=i=>{var e=new Ee.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ye({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=te.wrapFragment(ci(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=te.wrapFragment(ci(i.below,n,e),e),s.classes.push(o+"-arrow-pad"));var a=Jl.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 u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=te.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"),te.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=Jl.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=o4(Oi(i.body,e));if(i.below){var o=o4(Oi(i.below,e));n=new Ee.MathNode("munderover",[t,o,r])}else n=new Ee.MathNode("mover",[t,r])}else if(i.below){var s=o4(Oi(i.below,e));n=new Ee.MathNode("munder",[t,s])}else n=o4(),n=new Ee.MathNode("mover",[t,n]);return n}});var lfe=te.makeSpan;function Oj(i,e){var t=Yn(i.body,e,!0);return lfe([i.mclass],t,e)}function Pj(i,e){var t,n=Co(i.body,e);return i.mclass==="minner"?t=new Ee.MathNode("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Ee.MathNode("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Ee.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}Ye({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:Tn(r),isCharacterBox:wt.isCharacterBox(r)}},htmlBuilder:Oj,mathmlBuilder:Pj});var C4=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"};Ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:C4(e[0]),body:Tn(e[1]),isCharacterBox:wt.isCharacterBox(e[1])}}});Ye({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=C4(r):s="mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Tn(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:wt.isCharacterBox(l)}},htmlBuilder:Oj,mathmlBuilder:Pj});Ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:C4(e[0]),body:Tn(e[0])}},htmlBuilder(i,e){var t=Yn(i.body,e,!0),n=te.makeSpan([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=Co(i.body,e),n=new Ee.MathNode("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var cfe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},QW=()=>({type:"styling",body:[],mode:"math",style:"display"}),JW=i=>i.type==="textord"&&i.text==="@",dfe=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function ufe(i,e,t){var n=cfe[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 hfe(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 Ie("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],o=0;o<e.length;o++){for(var s=e[o],a=QW(),l=0;l<s.length;l++)if(!JW(s[l]))a.body.push(s[l]);else{n.push(a),l+=1;var c=O8(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 u=0;u<2;u++){for(var h=!0,p=l+1;p<s.length;p++){if(dfe(s[p],c)){h=!1,l=p;break}if(JW(s[p]))throw new Ie("Missing a "+c+" character to complete a CD arrow.",s[p]);d[u].body.push(s[p])}if(h)throw new Ie("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new Ie('Expected one of "<>AV=|." after @',s[l]);var m=ufe(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};n.push(g),a=QW()}o%2===0?n.push(a):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}Ye({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=te.wrapFragment(ci(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ze(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Ee.MathNode("mrow",[Oi(i.label,e)]);return t=new Ee.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ee.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});Ye({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=te.wrapFragment(ci(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ee.MathNode("mrow",[Oi(i.fragment,e)])}});Ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Wt(e[0],"ordgroup"),r=n.body,o="",s=0;s<r.length;s++){var a=Wt(r[s],"textord");o+=a.text}var l=parseInt(o),c;if(isNaN(l))throw new Ie("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new Ie("\\@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 Fj=(i,e)=>{var t=Yn(i.body,e.withColor(i.color),!1);return te.makeFragment(t)},Hj=(i,e)=>{var t=Co(i.body,e.withColor(i.color)),n=new Ee.MathNode("mstyle",t);return n.setAttribute("mathcolor",i.color),n};Ye({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Wt(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:Tn(r)}},htmlBuilder:Fj,mathmlBuilder:Hj});Ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Wt(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:Fj,mathmlBuilder:Hj});Ye({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&&Wt(r,"size").value}},htmlBuilder(i,e){var t=te.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ze(cn(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ee.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ze(cn(i.size,e)))),t}});var E8={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Bj=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Ie("Expected a control sequence",i);return e},ffe=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},zj=(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)};Ye({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(E8[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E8[n.text]),Wt(e.parseFunction(),"internal");throw new Ie("Invalid token after macro prefix",n)}});Ye({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 Ie("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 Ie('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new Ie('Argument number "'+n.text+'" out of order');o++,a.push([])}else{if(n.text==="EOF")throw new Ie("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===E8[t]),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=Bj(e.gullet.popToken());e.gullet.consumeSpaces();var r=ffe(e);return zj(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=Bj(e.gullet.popToken()),r=e.gullet.popToken(),o=e.gullet.popToken();return zj(e,n,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var $1=function(e,t,n){var r=ji.math[e]&&ji.math[e].replace,o=M8(r||e,t,n);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},F8=function(e,t,n,r){var o=n.havingBaseStyle(t),s=te.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},Uj=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=ze(o),e.height-=o,e.depth+=o},pfe=function(e,t,n,r,o,s){var a=te.makeSymbol(e,"Main-Regular",o,r),l=F8(a,t,r,s);return n&&Uj(l,r,t),l},mfe=function(e,t,n,r){return te.makeSymbol(e,"Size"+t+"-Regular",n,r)},Wj=function(e,t,n,r,o,s){var a=mfe(e,t,o,r),l=F8(te.makeSpan(["delimsizing","size"+t],[a],r),_t.TEXT,r,s);return n&&Uj(l,r,_t.TEXT),l},c8=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=te.makeSpan(["delimsizinginner",r],[te.makeSpan([],[te.makeSymbol(e,t,n)])]);return{type:"elem",elem:o}},d8=function(e,t,n){var r=Ba["Size4-Regular"][e.charCodeAt(0)]?Ba["Size4-Regular"][e.charCodeAt(0)][4]:Ba["Size1-Regular"][e.charCodeAt(0)][4],o=new Ua("inner",whe(e,Math.round(1e3*t))),s=new Vs([o],{width:ze(r),height:ze(t),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=te.makeSvgSpan([],[s],n);return a.height=t,a.style.height=ze(t),a.style.width=ze(r),{type:"elem",elem:a}},T8=.008,s4={type:"kern",size:-1*T8},gfe=["|","\\lvert","\\rvert","\\vert"],vfe=["\\|","\\lVert","\\rVert","\\Vert"],jj=function(e,t,n,r,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var p="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"):wt.contains(gfe,e)?(c="\u2223",u="vert",h=333):wt.contains(vfe,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",p="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",p="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",p="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",p="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",p="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",p="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",p="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",p="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",p="Size4-Regular");var m=$1(a,p,o),g=m.height+m.depth,b=$1(c,p,o),S=b.height+b.depth,k=$1(d,p,o),N=k.height+k.depth,A=0,H=1;if(l!==null){var K=$1(l,p,o);A=K.height+K.depth,H=2}var W=g+N+A,re=Math.max(0,Math.ceil((t-W)/(H*S))),ae=W+re*H*S,Ne=r.fontMetrics().axisHeight;n&&(Ne*=r.sizeMultiplier);var he=ae/2-Ne,Xe=[];if(u.length>0){var st=ae-g-N,rt=Math.round(ae*1e3),Nt=xhe(u,Math.round(st*1e3)),Z=new Ua(u,Nt),ye=(h/1e3).toFixed(3)+"em",ge=(rt/1e3).toFixed(3)+"em",$=new Vs([Z],{width:ye,height:ge,viewBox:"0 0 "+h+" "+rt}),Q=te.makeSvgSpan([],[$],r);Q.height=rt/1e3,Q.style.width=ye,Q.style.height=ge,Xe.push({type:"elem",elem:Q})}else{if(Xe.push(c8(d,p,o)),Xe.push(s4),l===null){var ie=ae-g-N+2*T8;Xe.push(d8(c,ie,r))}else{var de=(ae-g-N-A)/2+2*T8;Xe.push(d8(c,de,r)),Xe.push(s4),Xe.push(c8(l,p,o)),Xe.push(s4),Xe.push(d8(c,de,r))}Xe.push(s4),Xe.push(c8(a,p,o))}var $t=r.havingBaseStyle(_t.TEXT),Xt=te.makeVList({positionType:"bottom",positionData:he,children:Xe},$t);return F8(te.makeSpan(["delimsizing","mult"],[Xt],$t),_t.TEXT,r,s)},u8=80,h8=.08,f8=function(e,t,n,r,o){var s=She(e,r,n),a=new Ua(e,s),l=new Vs([a],{width:"400em",height:ze(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return te.makeSvgSpan(["hide-tail"],[l],o)},_fe=function(e,t){var n=t.havingBaseSizing(),r=Gj("\\surd",e*n.sizeMultiplier,qj,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return r.type==="small"?(d=1e3+1e3*s+u8,e<1?o=1:e<1.4&&(o=.7),l=(1+s+h8)/o,c=(1+s)/o,a=f8("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):r.type==="large"?(d=(1e3+u8)*Y1[r.size],c=(Y1[r.size]+s)/o,l=(Y1[r.size]+s+h8)/o,a=f8("sqrtSize"+r.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+h8,c=e+s,d=Math.floor(1e3*e+s)+u8,a=f8("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=ze(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},Vj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],bfe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Kj=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Y1=[0,1.2,1.8,2.4,3],yfe=function(e,t,n,r,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),wt.contains(Vj,e)||wt.contains(Kj,e))return Wj(e,t,!1,n,r,o);if(wt.contains(bfe,e))return jj(e,Y1[t],!1,n,r,o);throw new Ie("Illegal delimiter: '"+e+"'")},Cfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Sfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"stack"}],qj=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],wfe=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.")},Gj=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=$1(e,wfe(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]},$j=function(e,t,n,r,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;wt.contains(Kj,e)?a=Cfe:wt.contains(Vj,e)?a=qj:a=Sfe;var l=Gj(e,t,a,r);return l.type==="small"?pfe(e,l.style,n,r,o,s):l.type==="large"?Wj(e,l.size,n,r,o,s):jj(e,t,n,r,o,s)},xfe=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),u=Math.max(d/500*l,2*d-c);return $j(e,u,!0,r,o,s)},Xl={sqrtImage:_fe,sizedDelim:yfe,sizeToMaxHeight:Y1,customSizedDelim:$j,leftRightDelim:xfe},ZW={"\\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}},Efe=["(","\\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 S4(i,e){var t=y4(i);if(t&&wt.contains(Efe,t.text))return t;throw t?new Ie("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Ie("Invalid delimiter type '"+i.type+"'",i)}Ye({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=S4(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:ZW[i.funcName].size,mclass:ZW[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?te.makeSpan([i.mclass]):Xl.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(_s(i.delim,i.mode));var t=new Ee.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ze(Xl.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function ej(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ye({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 Ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:S4(e[0],i).text,color:t}}});Ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=S4(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=Wt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{ej(i);for(var t=Yn(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=e0(e,["mopen"]):a=Xl.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]=Xl.leftRightDelim(d.delim,n,r,d.options,i.mode,[]))}var u;if(i.right===".")u=e0(e,["mclose"]);else{var h=i.rightColor?e.withColor(i.rightColor):e;u=Xl.leftRightDelim(i.right,n,r,h,i.mode,["mclose"])}return t.push(u),te.makeSpan(["minner"],t,e)},mathmlBuilder:(i,e)=>{ej(i);var t=Co(i.body,e);if(i.left!=="."){var n=new Ee.MathNode("mo",[_s(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Ee.MathNode("mo",[_s(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return N8(t)}});Ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=S4(e[0],i);if(!i.parser.leftrightDepth)throw new Ie("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=e0(e,[]);else{t=Xl.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==="|"?_s("|","text"):_s(i.delim,i.mode),n=new Ee.MathNode("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var H8=(i,e)=>{var t=te.wrapFragment(ci(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,o,s=0,a=wt.isCharacterBox(i.body);if(n==="sout")o=te.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/r,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=cn({number:.6,unit:"pt"},e),c=cn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=ze(u/2+l);var h=Math.floor(1e3*u*r),p=yhe(h),m=new Vs([new Ua("phase",p)],{width:"400em",height:ze(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=te.makeSvgSpan(["hide-tail"],[m],e),o.style.height=ze(u),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 g=0,b=0,S=0;/box/.test(n)?(S=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:S),b=g):n==="angl"?(S=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*S,b=Math.max(0,.25-t.depth)):(g=a?.2:0,b=g),o=Jl.encloseSpan(t,n,g,b,e),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ze(S)):n==="angl"&&S!==.049&&(o.style.borderTopWidth=ze(S),o.style.borderRightWidth=ze(S)),s=t.depth+b,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var k;if(i.backgroundColor)k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var N=/cancel|phase/.test(n)?["svg-align"]:[];k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:N}]},e)}return/cancel/.test(n)&&(k.height=t.height,k.depth=t.depth),/cancel/.test(n)&&!a?te.makeSpan(["mord","cancel-lap"],[k],e):te.makeSpan(["mord"],[k],e)},B8=(i,e)=>{var t=0,n=new Ee.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Oi(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};Ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:o,body:s}},htmlBuilder:H8,mathmlBuilder:B8});Ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=Wt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:H8,mathmlBuilder:B8});Ye({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]}}});Ye({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:H8,mathmlBuilder:B8});Ye({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 Yj={};function Wa(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)Yj[t[l]]=a;o&&(f4[e]=o),s&&(p4[e]=s)}var Xj={};function R(i,e){Xj[i]=e}function tj(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 w4=i=>{var e=i.parser.settings;if(!e.displayMode)throw new Ie("{"+i.envName+"} can be used only in display mode.")};function z8(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function pd(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:o,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=e;if(i.gullet.beginGroup(),c||i.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=i.gullet.expandMacroAsText("\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new Ie("Invalid \\arraystretch: "+p)}i.gullet.beginGroup();var m=[],g=[m],b=[],S=[],k=l!=null?[]:void 0;function N(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function A(){k&&(i.gullet.macros.get("\\df@tag")?(k.push(i.subparse([new za("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):k.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(N(),S.push(tj(i));;){var H=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),H={type:"ordgroup",mode:i.mode,body:H},t&&(H={type:"styling",mode:i.mode,style:t,body:[H]}),m.push(H);var K=i.fetch().text;if(K==="&"){if(u&&m.length===u){if(c||a)throw new Ie("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(K==="\\end"){A(),m.length===1&&H.type==="styling"&&H.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),S.length<g.length+1&&S.push([]);break}else if(K==="\\\\"){i.consume();var W=void 0;i.gullet.future().text!==" "&&(W=i.parseSizeGroup(!0)),b.push(W?W.value:null),A(),S.push(tj(i)),m=[],g.push(m),N()}else throw new Ie("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:g,cols:o,rowGaps:b,hskipBeforeAndAfter:n,hLinesBeforeRow:S,colSeparationType:a,tags:k,leqno:h}}function U8(i){return i.slice(0,1)==="d"?"display":"text"}var ja=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),u=1/t.fontMetrics().ptPerEm,h=5*u;if(e.colSeparationType&&e.colSeparationType==="small"){var p=t.havingStyle(_t.SCRIPT).sizeMultiplier;h=.2778*(p/t.sizeMultiplier)}var m=e.colSeparationType==="CD"?cn({number:3,unit:"ex"},t):12*u,g=3*u,b=e.arraystretch*m,S=.7*b,k=.3*b,N=0;function A(fl){for(var Hn=0;Hn<fl.length;++Hn)Hn>0&&(N+=.25),c.push({pos:N,isDashed:fl[Hn]})}for(A(s[0]),n=0;n<e.body.length;++n){var H=e.body[n],K=S,W=k;a<H.length&&(a=H.length);var re=new Array(H.length);for(r=0;r<H.length;++r){var ae=ci(H[r],t);W<ae.depth&&(W=ae.depth),K<ae.height&&(K=ae.height),re[r]=ae}var Ne=e.rowGaps[n],he=0;Ne&&(he=cn(Ne,t),he>0&&(he+=k,W<he&&(W=he),he=0)),e.addJot&&(W+=g),re.height=K,re.depth=W,N+=K,re.pos=N,N+=W+he,l[n]=re,A(s[n+1])}var Xe=N/2+t.fontMetrics().axisHeight,st=e.cols||[],rt=[],Nt,Z,ye=[];if(e.tags&&e.tags.some(fl=>fl))for(n=0;n<o;++n){var ge=l[n],$=ge.pos-Xe,Q=e.tags[n],ie=void 0;Q===!0?ie=te.makeSpan(["eqn-num"],[],t):Q===!1?ie=te.makeSpan([],[],t):ie=te.makeSpan([],Yn(Q,t,!0),t),ie.depth=ge.depth,ie.height=ge.height,ye.push({type:"elem",elem:ie,shift:$})}for(r=0,Z=0;r<a||Z<st.length;++r,++Z){for(var de=st[Z]||{},$t=!0;de.type==="separator";){if($t||(Nt=te.makeSpan(["arraycolsep"],[]),Nt.style.width=ze(t.fontMetrics().doubleRuleSep),rt.push(Nt)),de.separator==="|"||de.separator===":"){var Xt=de.separator==="|"?"solid":"dashed",Qt=te.makeSpan(["vertical-separator"],[],t);Qt.style.height=ze(N),Qt.style.borderRightWidth=ze(d),Qt.style.borderRightStyle=Xt,Qt.style.margin="0 "+ze(-d/2);var pi=N-Xe;pi&&(Qt.style.verticalAlign=ze(-pi)),rt.push(Qt)}else throw new Ie("Invalid separator type: "+de.separator);Z++,de=st[Z]||{},$t=!1}if(!(r>=a)){var Gi=void 0;(r>0||e.hskipBeforeAndAfter)&&(Gi=wt.deflt(de.pregap,h),Gi!==0&&(Nt=te.makeSpan(["arraycolsep"],[]),Nt.style.width=ze(Gi),rt.push(Nt)));var ai=[];for(n=0;n<o;++n){var $i=l[n],nn=$i[r];if(nn){var Wh=$i.pos-Xe;nn.depth=$i.depth,nn.height=$i.height,ai.push({type:"elem",elem:nn,shift:Wh})}}ai=te.makeVList({positionType:"individualShift",children:ai},t),ai=te.makeSpan(["col-align-"+(de.align||"c")],[ai]),rt.push(ai),(r<a-1||e.hskipBeforeAndAfter)&&(Gi=wt.deflt(de.postgap,h),Gi!==0&&(Nt=te.makeSpan(["arraycolsep"],[]),Nt.style.width=ze(Gi),rt.push(Nt)))}}if(l=te.makeSpan(["mtable"],rt),c.length>0){for(var qd=te.makeLineSpan("hline",t,d),i_=te.makeLineSpan("hdashline",t,d),_m=[{type:"elem",elem:l,shift:0}];c.length>0;){var jh=c.pop(),n_=jh.pos-Xe;jh.isDashed?_m.push({type:"elem",elem:i_,shift:n_}):_m.push({type:"elem",elem:qd,shift:n_})}l=te.makeVList({positionType:"individualShift",children:_m},t)}if(ye.length===0)return te.makeSpan(["mord"],[l],t);var fr=te.makeVList({positionType:"individualShift",children:ye},t);return fr=te.makeSpan(["tag"],[fr],t),te.makeFragment([l,fr])},Tfe={c:"center ",l:"left ",r:"right "},Va=function(e,t){for(var n=[],r=new Ee.MathNode("mtd",[],["mtr-glue"]),o=new Ee.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 Ee.MathNode("mtd",[Oi(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 Ee.MathNode("mtr",l))}var d=new Ee.MathNode("mtable",n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",ze(u));var h="",p="";if(e.cols&&e.cols.length>0){var m=e.cols,g="",b=!1,S=0,k=m.length;m[0].type==="separator"&&(h+="top ",S=1),m[m.length-1].type==="separator"&&(h+="bottom ",k-=1);for(var N=S;N<k;N++)m[N].type==="align"?(p+=Tfe[m[N].align],b&&(g+="none "),b=!0):m[N].type==="separator"&&b&&(g+=m[N].separator==="|"?"solid ":"dashed ",b=!1);d.setAttribute("columnalign",p.trim()),/[sd]/.test(g)&&d.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var A=e.cols||[],H="",K=1;K<A.length;K++)H+=K%2?"0em ":"1em ";d.setAttribute("columnspacing",H.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 W="",re=e.hLinesBeforeRow;h+=re[0].length>0?"left ":"",h+=re[re.length-1].length>0?"right ":"";for(var ae=1;ae<re.length-1;ae++)W+=re[ae].length===0?"none ":re[ae][0]?"dashed ":"solid ";return/[sd]/.test(W)&&d.setAttribute("rowlines",W.trim()),h!==""&&(d=new Ee.MathNode("menclose",[d]),d.setAttribute("notation",h.trim())),e.arraystretch&&e.arraystretch<1&&(d=new Ee.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},Qj=function(e,t){e.envName.indexOf("ed")===-1&&w4(e);var n=[],r=e.envName.indexOf("at")>-1?"alignat":"align",o=e.envName==="split",s=pd(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:z8(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="",u=0;u<t[0].body.length;u++){var h=Wt(t[0].body[u],"textord");d+=h.text}a=Number(d),l=a*2}var p=!l;s.body.forEach(function(S){for(var k=1;k<S.length;k+=2){var N=Wt(S[k],"styling"),A=Wt(N.body[0],"ordgroup");A.body.unshift(c)}if(p)l<S.length&&(l=S.length);else{var H=S.length/2;if(a<H)throw new Ie("Too many math in a row: "+("expected "+a+", but got "+H),S[0])}});for(var m=0;m<l;++m){var g="r",b=0;m%2===1?g="l":m>0&&p&&(b=1),n[m]={type:"align",align:g,pregap:b,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Wa({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=y4(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=O8(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 Ie("Unknown column alignment: "+l,s)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return pd(i.parser,o,U8(i.envName))},htmlBuilder:ja,mathmlBuilder:Va});Wa({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 Ie("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var o=pd(i.parser,n,U8(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:ja,mathmlBuilder:Va});Wa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=pd(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=y4(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=O8(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ie("Unknown column alignment: "+l,s)});if(r.length>1)throw new Ie("{subarray} can contain only one column");var o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=pd(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Ie("{subarray} can contain only one column");return o},htmlBuilder:ja,mathmlBuilder:Va});Wa({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=pd(i.parser,e,U8(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:ja,mathmlBuilder:Va});Wa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Qj,htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){wt.contains(["gather","gather*"],i.envName)&&w4(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:z8(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return pd(i.parser,e,"display")},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Qj,htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){w4(i);var e={autoTag:z8(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return pd(i.parser,e,"display")},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["CD"],props:{numArgs:0},handler(i){return w4(i),hfe(i.parser)},htmlBuilder:ja,mathmlBuilder:Va});R("\\nonumber","\\gdef\\@eqnsw{0}");R("\\notag","\\nonumber");Ye({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Ie(i.funcName+" valid only within array environment")}});var ij=Yj;Ye({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 Ie("Invalid environment name",r);for(var o="",s=0;s<r.body.length;++s)o+=Wt(r.body[s],"textord").text;if(n==="\\begin"){if(!ij.hasOwnProperty(o))throw new Ie("No such environment: "+o,r);var a=ij[o],{args:l,optArgs:c}=t.parseArguments("\\begin{"+o+"}",a),d={mode:t.mode,envName:o,parser:t},u=a.handler(d,l,c);t.expect("\\end",!1);var h=t.nextToken,p=Wt(t.parseFunction(),"environment");if(p.name!==o)throw new Ie("Mismatch: \\begin{"+o+"} matched by \\end{"+p.name+"}",h);return u}return{type:"environment",mode:t.mode,name:o,nameGroup:r}}});var Jj=(i,e)=>{var t=i.font,n=e.withFont(t);return ci(i.body,n)},Zj=(i,e)=>{var t=i.font,n=e.withFont(t);return Oi(i.body,n)},nj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ye({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=m4(e[0]),o=n;return o in nj&&(o=nj[o]),{type:"font",mode:t.mode,font:o.slice(1),body:r}},htmlBuilder:Jj,mathmlBuilder:Zj});Ye({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0],r=wt.isCharacterBox(n);return{type:"mclass",mode:t.mode,mclass:C4(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:r}}});Ye({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:Jj,mathmlBuilder:Zj});var eV=(i,e)=>{var t=e;return i==="display"?t=t.id>=_t.SCRIPT.id?t.text():_t.DISPLAY:i==="text"&&t.size===_t.DISPLAY.size?t=_t.TEXT:i==="script"?t=_t.SCRIPT:i==="scriptscript"&&(t=_t.SCRIPTSCRIPT),t},W8=(i,e)=>{var t=eV(i.size,e.style),n=t.fracNum(),r=t.fracDen(),o;o=e.havingStyle(n);var s=ci(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=ci(i.denom,o,e),d,u,h;i.hasBarLine?(i.barSize?(u=cn(i.barSize,e),d=te.makeLineSpan("frac-line",e,u)):d=te.makeLineSpan("frac-line",e),u=d.height,h=d.height):(d=null,u=0,h=e.fontMetrics().defaultRuleThickness);var p,m,g;t.size===_t.DISPLAY.size||i.size==="display"?(p=e.fontMetrics().num1,u>0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(p=e.fontMetrics().num2,m=h):(p=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var b;if(d){var k=e.fontMetrics().axisHeight;p-s.depth-(k+.5*u)<m&&(p+=m-(p-s.depth-(k+.5*u))),k-.5*u-(c.height-g)<m&&(g+=m-(k-.5*u-(c.height-g)));var N=-(k-.5*u);b=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:d,shift:N},{type:"elem",elem:s,shift:-p}]},e)}else{var S=p-s.depth-(c.height-g);S<m&&(p+=.5*(m-S),g+=.5*(m-S)),b=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:s,shift:-p}]},e)}o=e.havingStyle(t),b.height*=o.sizeMultiplier/e.sizeMultiplier,b.depth*=o.sizeMultiplier/e.sizeMultiplier;var A;t.size===_t.DISPLAY.size?A=e.fontMetrics().delim1:t.size===_t.SCRIPTSCRIPT.size?A=e.havingStyle(_t.SCRIPT).fontMetrics().delim2:A=e.fontMetrics().delim2;var H,K;return i.leftDelim==null?H=e0(e,["mopen"]):H=Xl.customSizedDelim(i.leftDelim,A,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?K=te.makeSpan([]):i.rightDelim==null?K=e0(e,["mclose"]):K=Xl.customSizedDelim(i.rightDelim,A,!0,e.havingStyle(t),i.mode,["mclose"]),te.makeSpan(["mord"].concat(o.sizingClasses(e)),[H,te.makeSpan(["mfrac"],[b]),K],e)},j8=(i,e)=>{var t=new Ee.MathNode("mfrac",[Oi(i.numer,e),Oi(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=cn(i.barSize,e);t.setAttribute("linethickness",ze(n))}var r=eV(i.size,e.style);if(r.size!==e.style.size){t=new Ee.MathNode("mstyle",[t]);var o=r.size===_t.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 Ee.MathNode("mo",[new Ee.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ee.MathNode("mo",[new Ee.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return N8(s)}return t};Ye({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:W8,mathmlBuilder:j8});Ye({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}}});Ye({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 rj=["display","text","script","scriptscript"],oj=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};Ye({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=m4(e[0]),s=o.type==="atom"&&o.family==="open"?oj(o.text):null,a=m4(e[1]),l=a.type==="atom"&&a.family==="close"?oj(a.text):null,c=Wt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=Wt(p.body[0],"textord");h=rj[Number(m.text)]}}else p=Wt(p,"textord"),h=rj[Number(p.text)];return{type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:W8,mathmlBuilder:j8});Ye({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:Wt(e[0],"size").value,token:r}}});Ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=ohe(Wt(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:W8,mathmlBuilder:j8});var tV=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?ci(i.sup,e.havingStyle(t.sup()),e):ci(i.sub,e.havingStyle(t.sub()),e),r=Wt(i.base,"horizBrace")):r=Wt(i,"horizBrace");var o=ci(r.base,e.havingBaseStyle(_t.DISPLAY)),s=Jl.svgSpan(r,e),a;if(r.isOver?(a=te.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=te.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=te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);r.isOver?a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=te.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 te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)},kfe=(i,e)=>{var t=Jl.mathMLnode(i.label);return new Ee.MathNode(i.isOver?"mover":"munder",[Oi(i.base,e),t])};Ye({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:tV,mathmlBuilder:kfe});Ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Wt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:Tn(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Yn(i.body,e,!1);return te.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=fd(i.body,e);return t instanceof bo||(t=new bo("mrow",[t])),t.setAttribute("href",i.href),t}});Ye({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Wt(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:Tn(a)}}});Ye({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:Tn(e[0])}},htmlBuilder(i,e){var t=Yn(i.body,e,!1);return te.makeFragment(t)},mathmlBuilder(i,e){return new Ee.MathNode("mrow",Co(i.body,e))}});Ye({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=Wt(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 u=c[d].split("=");if(u.length!==2)throw new Ie("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[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:Tn(s)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=Yn(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=te.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)=>fd(i.body,e)});Ye({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:Tn(e[0]),mathml:Tn(e[1])}},htmlBuilder:(i,e)=>{var t=Yn(i.html,e,!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>fd(i.mathml,e)});var p8=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 Ie("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!yj(n))throw new Ie("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ye({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=Wt(t[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(u.length===2){var h=u[1].trim();switch(u[0].trim()){case"alt":a=h;break;case"width":r=p8(h);break;case"height":o=p8(h);break;case"totalheight":s=p8(h);break;default:throw new Ie("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var p=Wt(e[0],"url").url;return a===""&&(a=p,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:n.mode,alt:a,width:r,height:o,totalheight:s,src:p}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=cn(i.height,e),n=0;i.totalheight.number>0&&(n=cn(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=cn(i.width,e));var o={height:ze(t+n)};r>0&&(o.width=ze(r)),n>0&&(o.verticalAlign=ze(-n));var s=new y8(i.src,i.alt,o);return s.height=t,s.depth=n,s},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var n=cn(i.height,e),r=0;if(i.totalheight.number>0&&(r=cn(i.totalheight,e)-n,t.setAttribute("valign",ze(-r))),t.setAttribute("height",ze(n+r)),i.width.number>0){var o=cn(i.width,e);t.setAttribute("width",ze(o))}return t.setAttribute("src",i.src),t}});Ye({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=Wt(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 te.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=cn(i.dimension,e);return new Ee.SpaceNode(t)}});Ye({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=te.makeSpan([],[ci(i.body,e)]),t=te.makeSpan(["inner"],[t],e)):t=te.makeSpan(["inner"],[ci(i.body,e)]);var n=te.makeSpan(["fix"],[]),r=te.makeSpan([i.alignment],[t,n],e),o=te.makeSpan(["strut"]);return o.style.height=ze(r.height+r.depth),r.depth&&(o.style.verticalAlign=ze(-r.depth)),r.children.unshift(o),r=te.makeSpan(["thinbox"],[r],e),te.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mpadded",[Oi(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}});Ye({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}}});Ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Ie("Mismatched "+i.funcName)}});var sj=(i,e)=>{switch(e.style.size){case _t.DISPLAY.size:return i.display;case _t.TEXT.size:return i.text;case _t.SCRIPT.size:return i.script;case _t.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};Ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:Tn(e[0]),text:Tn(e[1]),script:Tn(e[2]),scriptscript:Tn(e[3])}},htmlBuilder:(i,e)=>{var t=sj(i,e),n=Yn(t,e,!1);return te.makeFragment(n)},mathmlBuilder:(i,e)=>{var t=sj(i,e);return fd(t,e)}});var iV=(i,e,t,n,r,o,s)=>{i=te.makeSpan([],[i]);var a=t&&wt.isCharacterBox(t),l,c;if(e){var d=ci(e,n.havingStyle(r.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=ci(t,n.havingStyle(r.sub()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=te.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var m=i.height-s;h=te.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},n)}else if(c){var g=i.depth+s;h=te.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return i;var b=[h];if(l&&o!==0&&!a){var S=te.makeSpan(["mspace"],[],n);S.style.marginRight=ze(o),b.unshift(S)}return te.makeSpan(["mop","op-limits"],b,n)},nV=["\\smallint"],Kf=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"op"),r=!0):o=Wt(i,"op");var s=e.style,a=!1;s.size===_t.DISPLAY.size&&o.symbol&&!wt.contains(nV,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=te.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=te.staticSvg(d+"Size"+(a?"2":"1"),e);l=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:a?.08:0}]},e),o.name="\\"+d,l.classes.unshift("mop"),l.italic=u}}else if(o.body){var p=Yn(o.body,e,!0);p.length===1&&p[0]instanceof yo?(l=p[0],l.classes[0]="mop"):l=te.makeSpan(["mop"],p,e)}else{for(var m=[],g=1;g<o.name.length;g++)m.push(te.mathsym(o.name[g],o.mode,e));l=te.makeSpan(["mop"],m,e)}var b=0,S=0;return(l instanceof yo||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift&&(b=(l.height-l.depth)/2-e.fontMetrics().axisHeight,S=l.italic),r?iV(l,t,n,e,s,S,b):(b&&(l.style.position="relative",l.style.top=ze(b)),l)},t0=(i,e)=>{var t;if(i.symbol)t=new bo("mo",[_s(i.name,i.mode)]),wt.contains(nV,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new bo("mo",Co(i.body,e));else{t=new bo("mi",[new ku(i.name.slice(1))]);var n=new bo("mo",[_s("\u2061","text")]);i.parentIsSupSub?t=new bo("mrow",[t,n]):t=Mj([t,n])}return t},Ife={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ye({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=Ife[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Kf,mathmlBuilder:t0});Ye({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:Tn(n)}},htmlBuilder:Kf,mathmlBuilder:t0});var Afe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ye({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:Kf,mathmlBuilder:t0});Ye({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:Kf,mathmlBuilder:t0});Ye({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=Afe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Kf,mathmlBuilder:t0});var rV=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"operatorname"),r=!0):o=Wt(i,"operatorname");var s;if(o.body.length>0){for(var a=o.body.map(u=>{var h=u.text;return typeof h=="string"?{type:"textord",mode:u.mode,text:h}:u}),l=Yn(a,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof yo&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=te.makeSpan(["mop"],l,e)}else s=te.makeSpan(["mop"],[],e);return r?iV(s,t,n,e,e.style,0,0):s},Lfe=(i,e)=>{for(var t=Co(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var o=t[r];if(!(o instanceof Ee.SpaceNode))if(o instanceof Ee.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 Ee.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 Ee.TextNode(a)]}var l=new Ee.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ee.MathNode("mo",[_s("\u2061","text")]);return i.parentIsSupSub?new Ee.MathNode("mrow",[l,c]):Ee.newDocumentFragment([l,c])};Ye({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:Tn(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:rV,mathmlBuilder:Lfe});R("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Lu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?te.makeFragment(Yn(i.body,e,!1)):te.makeSpan(["mord"],Yn(i.body,e,!0),e)},mathmlBuilder(i,e){return fd(i.body,e,!0)}});Ye({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=ci(i.body,e.havingCrampedStyle()),n=te.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]},e);return te.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("mover",[Oi(i.body,e),t]);return n.setAttribute("accent","true"),n}});Ye({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:Tn(n)}},htmlBuilder:(i,e)=>{var t=Yn(i.body,e.withPhantom(),!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=Co(i.body,e);return new Ee.MathNode("mphantom",t)}});Ye({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=te.makeSpan([],[ci(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=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),te.makeSpan(["mord"],[t],e)},mathmlBuilder:(i,e)=>{var t=Co(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});Ye({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=te.makeSpan(["inner"],[ci(i.body,e.withPhantom())]),n=te.makeSpan(["fix"],[]);return te.makeSpan(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=Co(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("width","0px"),r}});Ye({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Wt(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=ci(i.body,e),n=cn(i.dy,e);return te.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mpadded",[Oi(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});Ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});Ye({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=Wt(e[0],"size"),s=Wt(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Wt(r,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=te.makeSpan(["mord","rule"],[],e),n=cn(i.width,e),r=cn(i.height,e),o=i.shift?cn(i.shift,e):0;return t.style.borderRightWidth=ze(n),t.style.borderTopWidth=ze(r),t.style.bottom=ze(o),t.width=n,t.height=r+o,t.depth=-o,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=cn(i.width,e),n=cn(i.height,e),r=i.shift?cn(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ee.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",ze(t)),s.setAttribute("height",ze(n));var a=new Ee.MathNode("mpadded",[s]);return r>=0?a.setAttribute("height",ze(r)):(a.setAttribute("height",ze(r)),a.setAttribute("depth",ze(-r))),a.setAttribute("voffset",ze(r)),a}});function oV(i,e,t){for(var n=Yn(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 te.makeFragment(n)}var aj=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Mfe=(i,e)=>{var t=e.havingSize(i.size);return oV(i.body,t,e)};Ye({type:"sizing",names:aj,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:aj.indexOf(n)+1,body:o}},htmlBuilder:Mfe,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=Co(i.body,t),r=new Ee.MathNode("mstyle",n);return r.setAttribute("mathsize",ze(t.sizeMultiplier)),r}});Ye({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]&&Wt(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=te.makeSpan([],[ci(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=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return te.makeSpan(["mord"],[o],e)},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mpadded",[Oi(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});Ye({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=ci(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=te.wrapFragment(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,o=r;e.style.id<_t.TEXT.id&&(o=e.fontMetrics().xHeight);var s=r+o/4,a=t.height+t.depth+s+r,{span:l,ruleWidth:c,advanceWidth:d}=Xl.sqrtImage(a,e),u=l.height-c;u>t.height+t.depth+s&&(s=(s+u-t.height-t.depth)/2);var h=l.height-t.height-s-c;t.style.paddingLeft=ze(d);var p=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+h)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(i.index){var m=e.havingStyle(_t.SCRIPTSCRIPT),g=ci(i.index,m,e),b=.6*(p.height-p.depth),S=te.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:g}]},e),k=te.makeSpan(["root"],[S]);return te.makeSpan(["mord","sqrt"],[k,p],e)}else return te.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Ee.MathNode("mroot",[Oi(t,e),Oi(n,e)]):new Ee.MathNode("msqrt",[Oi(t,e)])}});var lj={display:_t.DISPLAY,text:_t.TEXT,script:_t.SCRIPT,scriptscript:_t.SCRIPTSCRIPT};Ye({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=lj[i.style],n=e.havingStyle(t).withFont("");return oV(i.body,n,e)},mathmlBuilder(i,e){var t=lj[i.style],n=e.havingStyle(t),r=Co(i.body,n),o=new Ee.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 Dfe=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===_t.DISPLAY.size||n.alwaysHandleSupSub);return r?Kf:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===_t.DISPLAY.size||n.limits);return o?rV:null}else{if(n.type==="accent")return wt.isCharacterBox(n.base)?P8:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?tV:null}else return null}else return null};Lu({type:"supsub",htmlBuilder(i,e){var t=Dfe(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:o}=i,s=ci(n,e),a,l,c=e.fontMetrics(),d=0,u=0,h=n&&wt.isCharacterBox(n);if(r){var p=e.havingStyle(e.style.sup());a=ci(r,p,e),h||(d=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=ci(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===_t.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var b=e.sizeMultiplier,S=ze(.5/c.ptPerEm/b),k=null;if(l){var N=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof yo||N)&&(k=ze(-s.italic))}var A;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var H=c.defaultRuleThickness,K=4*H;if(d-a.depth-(l.height-u)<K){u=K-(d-a.depth)+l.height;var W=.8*c.xHeight-(d-a.depth);W>0&&(d+=W,u-=W)}var re=[{type:"elem",elem:l,shift:u,marginRight:S,marginLeft:k},{type:"elem",elem:a,shift:-d,marginRight:S}];A=te.makeVList({positionType:"individualShift",children:re},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var ae=[{type:"elem",elem:l,marginLeft:k,marginRight:S}];A=te.makeVList({positionType:"shift",positionData:u,children:ae},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),A=te.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:S}]},e);else throw new Error("supsub must have either sup or sub.");var Ne=S8(s,"right")||"mord";return te.makeSpan([Ne],[s,te.makeSpan(["msupsub"],[A])],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=[Oi(i.base,e)];i.sub&&o.push(Oi(i.sub,e)),i.sup&&o.push(Oi(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===_t.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===_t.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===_t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===_t.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===_t.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===_t.DISPLAY)?s="mover":s="msup"}return new Ee.MathNode(s,o)}});Lu({type:"atom",htmlBuilder(i,e){return te.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[_s(i.text,i.mode)]);if(i.family==="bin"){var n=R8(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 sV={mi:"italic",mn:"normal",mtext:"normal"};Lu({type:"mathord",htmlBuilder(i,e){return te.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ee.MathNode("mi",[_s(i.text,i.mode,e)]),n=R8(i,e)||"italic";return n!==sV[t.type]&&t.setAttribute("mathvariant",n),t}});Lu({type:"textord",htmlBuilder(i,e){return te.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=_s(i.text,i.mode,e),n=R8(i,e)||"normal",r;return i.mode==="text"?r=new Ee.MathNode("mtext",[t]):/[0-9]/.test(i.text)?r=new Ee.MathNode("mn",[t]):i.text==="\\prime"?r=new Ee.MathNode("mo",[t]):r=new Ee.MathNode("mi",[t]),n!==sV[r.type]&&r.setAttribute("mathvariant",n),r}});var m8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},g8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Lu({type:"spacing",htmlBuilder(i,e){if(g8.hasOwnProperty(i.text)){var t=g8[i.text].className||"";if(i.mode==="text"){var n=te.makeOrd(i,e,"textord");return n.classes.push(t),n}else return te.makeSpan(["mspace",t],[te.mathsym(i.text,i.mode,e)],e)}else{if(m8.hasOwnProperty(i.text))return te.makeSpan(["mspace",m8[i.text]],[],e);throw new Ie('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(g8.hasOwnProperty(i.text))t=new Ee.MathNode("mtext",[new Ee.TextNode("\xA0")]);else{if(m8.hasOwnProperty(i.text))return new Ee.MathNode("mspace");throw new Ie('Unknown type of space "'+i.text+'"')}return t}});var cj=()=>{var i=new Ee.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Lu({type:"tag",mathmlBuilder(i,e){var t=new Ee.MathNode("mtable",[new Ee.MathNode("mtr",[cj(),new Ee.MathNode("mtd",[fd(i.body,e)]),cj(),new Ee.MathNode("mtd",[fd(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var dj={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},uj={"\\textbf":"textbf","\\textmd":"textmd"},Nfe={"\\textit":"textit","\\textup":"textup"},hj=(i,e)=>{var t=i.font;return t?dj[t]?e.withTextFontFamily(dj[t]):uj[t]?e.withTextFontWeight(uj[t]):e.withTextFontShape(Nfe[t]):e};Ye({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:Tn(r),font:n}},htmlBuilder(i,e){var t=hj(i,e),n=Yn(i.body,t,!0);return te.makeSpan(["mord","text"],n,t)},mathmlBuilder(i,e){var t=hj(i,e);return fd(i.body,t)}});Ye({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=ci(i.body,e),n=te.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.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 te.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("munder",[Oi(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});Ye({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=ci(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return te.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ee.MathNode("mpadded",[Oi(i.body,e)],["vcenter"])}});Ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=fj(i),n=[],r=e.havingStyle(e.style.text()),o=0;o<t.length;o++){var s=t[o];s==="~"&&(s="\\textasciitilde"),n.push(te.makeSymbol(s,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return te.makeSpan(["mord","text"].concat(r.sizingClasses(e)),te.tryCombineChars(n),r)},mathmlBuilder(i,e){var t=new Ee.TextNode(fj(i)),n=new Ee.MathNode("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var fj=i=>i.body.replace(/ /g,i.star?"\u2423":"\xA0"),ud=Aj,aV=`[ \r
|
|
]`,Rfe="\\\\[a-zA-Z@]+",Ofe="\\\\[^\uD800-\uDFFF]",Pfe="("+Rfe+")"+aV+"*",Ffe=`\\\\(
|
|
|[ \r ]+
|
|
?)[ \r ]*`,k8="[\u0300-\u036F]",Hfe=new RegExp(k8+"+$"),Bfe="("+aV+"+)|"+(Ffe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(k8+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(k8+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Pfe)+("|"+Ofe+")"),g4=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(Bfe,"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 za("EOF",new zo(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new Ie("Unexpected character: '"+e[t]+"'",new za(e[t],new zo(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 za(r,new zo(this,t,this.tokenRegex.lastIndex))}},I8=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 Ie("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}},zfe=Xj;R("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});R("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});R("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});R("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});R("\\@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}});R("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");R("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var pj={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};R("\\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 Ie("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=pj[e.text],n==null||n>=t)throw new Ie("Invalid base-"+t+" digit "+e.text);for(var r;(r=pj[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var V8=(i,e,t)=>{var n=i.consumeArg().tokens;if(n.length!==1)throw new Ie("\\newcommand's first argument must be a macro name");var r=n[0].text,o=i.isDefined(r);if(o&&!e)throw new Ie("\\newcommand{"+r+"} attempting to redefine "+(r+"; use \\renewcommand"));if(!o&&!t)throw new Ie("\\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 Ie("Invalid number of arguments: "+a);s=parseInt(a),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:s}),""};R("\\newcommand",i=>V8(i,!1,!0));R("\\renewcommand",i=>V8(i,!0,!1));R("\\providecommand",i=>V8(i,!0,!0));R("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});R("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});R("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),ud[t],ji.math[t],ji.text[t]),""});R("\\bgroup","{");R("\\egroup","}");R("~","\\nobreakspace");R("\\lq","`");R("\\rq","'");R("\\aa","\\r a");R("\\AA","\\r A");R("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");R("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");R("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");R("\u212C","\\mathscr{B}");R("\u2130","\\mathscr{E}");R("\u2131","\\mathscr{F}");R("\u210B","\\mathscr{H}");R("\u2110","\\mathscr{I}");R("\u2112","\\mathscr{L}");R("\u2133","\\mathscr{M}");R("\u211B","\\mathscr{R}");R("\u212D","\\mathfrak{C}");R("\u210C","\\mathfrak{H}");R("\u2128","\\mathfrak{Z}");R("\\Bbbk","\\Bbb{k}");R("\xB7","\\cdotp");R("\\llap","\\mathllap{\\textrm{#1}}");R("\\rlap","\\mathrlap{\\textrm{#1}}");R("\\clap","\\mathclap{\\textrm{#1}}");R("\\mathstrut","\\vphantom{(}");R("\\underbar","\\underline{\\text{#1}}");R("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');R("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");R("\\ne","\\neq");R("\u2260","\\neq");R("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");R("\u2209","\\notin");R("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");R("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");R("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");R("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");R("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");R("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");R("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");R("\u27C2","\\perp");R("\u203C","\\mathclose{!\\mkern-0.8mu!}");R("\u220C","\\notni");R("\u231C","\\ulcorner");R("\u231D","\\urcorner");R("\u231E","\\llcorner");R("\u231F","\\lrcorner");R("\xA9","\\copyright");R("\xAE","\\textregistered");R("\uFE0F","\\textregistered");R("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');R("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');R("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');R("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');R("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");R("\u22EE","\\vdots");R("\\varGamma","\\mathit{\\Gamma}");R("\\varDelta","\\mathit{\\Delta}");R("\\varTheta","\\mathit{\\Theta}");R("\\varLambda","\\mathit{\\Lambda}");R("\\varXi","\\mathit{\\Xi}");R("\\varPi","\\mathit{\\Pi}");R("\\varSigma","\\mathit{\\Sigma}");R("\\varUpsilon","\\mathit{\\Upsilon}");R("\\varPhi","\\mathit{\\Phi}");R("\\varPsi","\\mathit{\\Psi}");R("\\varOmega","\\mathit{\\Omega}");R("\\substack","\\begin{subarray}{c}#1\\end{subarray}");R("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");R("\\boxed","\\fbox{$\\displaystyle{#1}$}");R("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");R("\\implies","\\DOTSB\\;\\Longrightarrow\\;");R("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var mj={",":"\\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"};R("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in mj?e=mj[t]:(t.slice(0,4)==="\\not"||t in ji.math&&wt.contains(["bin","rel"],ji.math[t].group))&&(e="\\dotsb"),e});var K8={")":!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};R("\\dotso",function(i){var e=i.future().text;return e in K8?"\\ldots\\,":"\\ldots"});R("\\dotsc",function(i){var e=i.future().text;return e in K8&&e!==","?"\\ldots\\,":"\\ldots"});R("\\cdots",function(i){var e=i.future().text;return e in K8?"\\@cdots\\,":"\\@cdots"});R("\\dotsb","\\cdots");R("\\dotsm","\\cdots");R("\\dotsi","\\!\\cdots");R("\\dotsx","\\ldots\\,");R("\\DOTSI","\\relax");R("\\DOTSB","\\relax");R("\\DOTSX","\\relax");R("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");R("\\,","\\tmspace+{3mu}{.1667em}");R("\\thinspace","\\,");R("\\>","\\mskip{4mu}");R("\\:","\\tmspace+{4mu}{.2222em}");R("\\medspace","\\:");R("\\;","\\tmspace+{5mu}{.2777em}");R("\\thickspace","\\;");R("\\!","\\tmspace-{3mu}{.1667em}");R("\\negthinspace","\\!");R("\\negmedspace","\\tmspace-{4mu}{.2222em}");R("\\negthickspace","\\tmspace-{5mu}{.277em}");R("\\enspace","\\kern.5em ");R("\\enskip","\\hskip.5em\\relax");R("\\quad","\\hskip1em\\relax");R("\\qquad","\\hskip2em\\relax");R("\\tag","\\@ifstar\\tag@literal\\tag@paren");R("\\tag@paren","\\tag@literal{({#1})}");R("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new Ie("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});R("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");R("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");R("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");R("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");R("\\newline","\\\\\\relax");R("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var lV=ze(Ba["Main-Regular"]["T".charCodeAt(0)][1]-.7*Ba["Main-Regular"]["A".charCodeAt(0)][1]);R("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+lV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");R("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+lV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");R("\\hspace","\\@ifstar\\@hspacer\\@hspace");R("\\@hspace","\\hskip #1\\relax");R("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");R("\\ordinarycolon",":");R("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");R("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');R("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');R("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');R("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');R("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');R("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');R("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');R("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');R("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');R("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');R("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');R("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');R("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');R("\u2237","\\dblcolon");R("\u2239","\\eqcolon");R("\u2254","\\coloneqq");R("\u2255","\\eqqcolon");R("\u2A74","\\Coloneqq");R("\\ratio","\\vcentcolon");R("\\coloncolon","\\dblcolon");R("\\colonequals","\\coloneqq");R("\\coloncolonequals","\\Coloneqq");R("\\equalscolon","\\eqqcolon");R("\\equalscoloncolon","\\Eqqcolon");R("\\colonminus","\\coloneq");R("\\coloncolonminus","\\Coloneq");R("\\minuscolon","\\eqcolon");R("\\minuscoloncolon","\\Eqcolon");R("\\coloncolonapprox","\\Colonapprox");R("\\coloncolonsim","\\Colonsim");R("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");R("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");R("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");R("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");R("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");R("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");R("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");R("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");R("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");R("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");R("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");R("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");R("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");R("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");R("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");R("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");R("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");R("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");R("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");R("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");R("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");R("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");R("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");R("\\imath","\\html@mathml{\\@imath}{\u0131}");R("\\jmath","\\html@mathml{\\@jmath}{\u0237}");R("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");R("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");R("\u27E6","\\llbracket");R("\u27E7","\\rrbracket");R("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");R("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");R("\u2983","\\lBrace");R("\u2984","\\rBrace");R("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");R("\u29B5","\\minuso");R("\\darr","\\downarrow");R("\\dArr","\\Downarrow");R("\\Darr","\\Downarrow");R("\\lang","\\langle");R("\\rang","\\rangle");R("\\uarr","\\uparrow");R("\\uArr","\\Uparrow");R("\\Uarr","\\Uparrow");R("\\N","\\mathbb{N}");R("\\R","\\mathbb{R}");R("\\Z","\\mathbb{Z}");R("\\alef","\\aleph");R("\\alefsym","\\aleph");R("\\Alpha","\\mathrm{A}");R("\\Beta","\\mathrm{B}");R("\\bull","\\bullet");R("\\Chi","\\mathrm{X}");R("\\clubs","\\clubsuit");R("\\cnums","\\mathbb{C}");R("\\Complex","\\mathbb{C}");R("\\Dagger","\\ddagger");R("\\diamonds","\\diamondsuit");R("\\empty","\\emptyset");R("\\Epsilon","\\mathrm{E}");R("\\Eta","\\mathrm{H}");R("\\exist","\\exists");R("\\harr","\\leftrightarrow");R("\\hArr","\\Leftrightarrow");R("\\Harr","\\Leftrightarrow");R("\\hearts","\\heartsuit");R("\\image","\\Im");R("\\infin","\\infty");R("\\Iota","\\mathrm{I}");R("\\isin","\\in");R("\\Kappa","\\mathrm{K}");R("\\larr","\\leftarrow");R("\\lArr","\\Leftarrow");R("\\Larr","\\Leftarrow");R("\\lrarr","\\leftrightarrow");R("\\lrArr","\\Leftrightarrow");R("\\Lrarr","\\Leftrightarrow");R("\\Mu","\\mathrm{M}");R("\\natnums","\\mathbb{N}");R("\\Nu","\\mathrm{N}");R("\\Omicron","\\mathrm{O}");R("\\plusmn","\\pm");R("\\rarr","\\rightarrow");R("\\rArr","\\Rightarrow");R("\\Rarr","\\Rightarrow");R("\\real","\\Re");R("\\reals","\\mathbb{R}");R("\\Reals","\\mathbb{R}");R("\\Rho","\\mathrm{P}");R("\\sdot","\\cdot");R("\\sect","\\S");R("\\spades","\\spadesuit");R("\\sub","\\subset");R("\\sube","\\subseteq");R("\\supe","\\supseteq");R("\\Tau","\\mathrm{T}");R("\\thetasym","\\vartheta");R("\\weierp","\\wp");R("\\Zeta","\\mathrm{Z}");R("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");R("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");R("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");R("\\bra","\\mathinner{\\langle{#1}|}");R("\\ket","\\mathinner{|{#1}\\rangle}");R("\\braket","\\mathinner{\\langle{#1}\\rangle}");R("\\Bra","\\left\\langle#1\\right|");R("\\Ket","\\left|#1\\right\\rangle");var cV=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=u=>h=>{i&&(h.macros.set("|",s),r.length&&h.macros.set("\\|",a));var p=u;if(!u&&r.length){var m=h.future();m.text==="|"&&(h.popToken(),p=!0)}return{tokens:p?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}};R("\\bra@ket",cV(!1));R("\\bra@set",cV(!0));R("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");R("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");R("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");R("\\angln","{\\angl n}");R("\\blue","\\textcolor{##6495ed}{#1}");R("\\orange","\\textcolor{##ffa500}{#1}");R("\\pink","\\textcolor{##ff00af}{#1}");R("\\red","\\textcolor{##df0030}{#1}");R("\\green","\\textcolor{##28ae7b}{#1}");R("\\gray","\\textcolor{gray}{#1}");R("\\purple","\\textcolor{##9d38bd}{#1}");R("\\blueA","\\textcolor{##ccfaff}{#1}");R("\\blueB","\\textcolor{##80f6ff}{#1}");R("\\blueC","\\textcolor{##63d9ea}{#1}");R("\\blueD","\\textcolor{##11accd}{#1}");R("\\blueE","\\textcolor{##0c7f99}{#1}");R("\\tealA","\\textcolor{##94fff5}{#1}");R("\\tealB","\\textcolor{##26edd5}{#1}");R("\\tealC","\\textcolor{##01d1c1}{#1}");R("\\tealD","\\textcolor{##01a995}{#1}");R("\\tealE","\\textcolor{##208170}{#1}");R("\\greenA","\\textcolor{##b6ffb0}{#1}");R("\\greenB","\\textcolor{##8af281}{#1}");R("\\greenC","\\textcolor{##74cf70}{#1}");R("\\greenD","\\textcolor{##1fab54}{#1}");R("\\greenE","\\textcolor{##0d923f}{#1}");R("\\goldA","\\textcolor{##ffd0a9}{#1}");R("\\goldB","\\textcolor{##ffbb71}{#1}");R("\\goldC","\\textcolor{##ff9c39}{#1}");R("\\goldD","\\textcolor{##e07d10}{#1}");R("\\goldE","\\textcolor{##a75a05}{#1}");R("\\redA","\\textcolor{##fca9a9}{#1}");R("\\redB","\\textcolor{##ff8482}{#1}");R("\\redC","\\textcolor{##f9685d}{#1}");R("\\redD","\\textcolor{##e84d39}{#1}");R("\\redE","\\textcolor{##bc2612}{#1}");R("\\maroonA","\\textcolor{##ffbde0}{#1}");R("\\maroonB","\\textcolor{##ff92c6}{#1}");R("\\maroonC","\\textcolor{##ed5fa6}{#1}");R("\\maroonD","\\textcolor{##ca337c}{#1}");R("\\maroonE","\\textcolor{##9e034e}{#1}");R("\\purpleA","\\textcolor{##ddd7ff}{#1}");R("\\purpleB","\\textcolor{##c6b9fc}{#1}");R("\\purpleC","\\textcolor{##aa87ff}{#1}");R("\\purpleD","\\textcolor{##7854ab}{#1}");R("\\purpleE","\\textcolor{##543b78}{#1}");R("\\mintA","\\textcolor{##f5f9e8}{#1}");R("\\mintB","\\textcolor{##edf2df}{#1}");R("\\mintC","\\textcolor{##e0e5cc}{#1}");R("\\grayA","\\textcolor{##f6f7f7}{#1}");R("\\grayB","\\textcolor{##f0f1f2}{#1}");R("\\grayC","\\textcolor{##e3e5e6}{#1}");R("\\grayD","\\textcolor{##d6d8da}{#1}");R("\\grayE","\\textcolor{##babec2}{#1}");R("\\grayF","\\textcolor{##888d93}{#1}");R("\\grayG","\\textcolor{##626569}{#1}");R("\\grayH","\\textcolor{##3b3e40}{#1}");R("\\grayI","\\textcolor{##21242c}{#1}");R("\\kaBlue","\\textcolor{##314453}{#1}");R("\\kaGreen","\\textcolor{##71B307}{#1}");var dV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},A8=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 I8(zfe,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new g4(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 za("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 Ie("Extra }",o)}else if(o.text==="EOF")throw new Ie("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 Ie("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 Ie("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 Ie("Undefined control sequence: "+n);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Ie("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 Ie("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 Ie("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 za(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 g4(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)||ud.hasOwnProperty(e)||ji.math.hasOwnProperty(e)||ji.text.hasOwnProperty(e)||dV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:ud.hasOwnProperty(e)&&!ud[e].primitive}},gj=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,a4=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"}),v8={"\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"}},vj={\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"},v4=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 A8(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 Ie("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 za("}")),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&&ud[r.text]&&ud[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 Ie("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 Ie("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 Ie("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(n)throw new Ie("Double superscript",o);n=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(r)throw new Ie("Double subscript",o);r=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(n)throw new Ie("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(a4[o.text]){var c=a4[o.text],d=gj.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!a4[u]||gj.test(u)!==d)break;this.consume(),c+=a4[u]}var h=new i(c,this.settings).parse();d?r={type:"ordgroup",mode:"math",body:h}:n={type:"ordgroup",mode:"math",body:h}}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=ud[r];if(!o)return null;if(this.consume(),t&&t!=="atom"&&!o.allowedInArgument)throw new Ie("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!o.allowedInText)throw new Ie("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&o.allowedInMath===!1)throw new Ie("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=ud[e];if(a&&a.handler)return a.handler(s,t,n);throw new Ie("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 Ie("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 Ie("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new Ie("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Ie("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 Ie("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 Ie("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 Ie("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!yj(o))throw new Ie("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:zo.range(n,l),body:a,semisimple:r==="\\begingroup"||void 0}}else if(o=this.parseFunction(t,e)||this.parseSymbol(),o==null&&r[0]==="\\"&&!dV.hasOwnProperty(r)){if(this.settings.throwOnError)throw new Ie("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:zo.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:zo.range(r,e[n+1]),text:"--"}),t-=1)),(o==="'"||o==="`")&&e[n+1].text===o&&(e.splice(n,2,{type:"textord",mode:"text",loc:zo.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 Ie(`\\verb assertion failed --
|
|
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}vj.hasOwnProperty(t[0])&&!ji[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=vj[t[0]]+t.slice(1));var o=Hfe.exec(t);o&&(t=t.substring(0,o.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var s;if(ji[this.mode][t]){this.settings.strict&&this.mode==="math"&&C8.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=ji[this.mode][t].group,l=zo.range(e),c;if(Mhe.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&&(bj(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:zo.range(e),text:t};else return null;if(this.consume(),o)for(var u=0;u<o[0].length;u++){var h=o[0][u];if(!v8[h])throw new Ie("Unknown accent ' "+h+"'",e);var p=v8[h][this.mode]||v8[h].text;if(!p)throw new Ie("Accent "+h+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:zo.range(e),label:p,isStretchy:!1,isShifty:!0,base:s}}return s}};v4.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var q8=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new v4(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 Ie("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new za("\\df@tag")])}]}return r},uV=function(e,t,n){t.textContent="";var r=G8(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."),uV=function(){throw new Ie("KaTeX doesn't work in quirks mode.")});var Ufe=function(e,t){var n=G8(e,t).toMarkup();return n},Wfe=function(e,t){var n=new X1(t);return q8(e,n)},hV=function(e,t,n){if(n.throwOnError||!(e instanceof Ie))throw e;var r=te.makeSpan(["katex-error"],[new yo(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},G8=function(e,t){var n=new X1(t);try{var r=q8(e,n);return Zhe(r,e,n)}catch(o){return hV(o,e,n)}},jfe=function(e,t){var n=new X1(t);try{var r=q8(e,n);return efe(r,e,n)}catch(o){return hV(o,e,n)}},qf={version:"0.16.7",render:uV,renderToString:Ufe,ParseError:Ie,SETTINGS_SCHEMA:l4,__parse:Wfe,__renderToDomTree:G8,__renderToHTMLTree:jfe,__setFontMetrics:Ehe,__defineSymbol:y,__defineFunction:Ye,__defineMacro:R,__domTree:{Span:Au,Anchor:J1,SymbolNode:yo,SvgNode:Vs,PathNode:Ua,LineNode:Z1}};var kn=function(i,e,t,n,r){let o=ec(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)},ec=function(i){if(i==null)return $8;if(typeof i=="string")return Kfe(i);if(typeof i=="object")return Vfe(i);if(typeof i=="function")return fV(i);throw new Error("Expected function, string, or array as test")};function Vfe(i){let e=[],t=-1;for(;++t<i.length;)e[t]=ec(i[t]);return fV(n);function n(...r){let o=-1;for(;++o<e.length;)if(e[o].call(this,...r))return!0;return!1}}function Kfe(i){return e;function e(t){return $8(t)&&t.tagName===i}}function fV(i){return e;function e(t,...n){return $8(t)&&!!i.call(this,t,...n)}}function $8(i){return!!(i&&typeof i=="object"&&i.type==="element"&&typeof i.tagName=="string")}var Y8=function(i,e,t){var n=Cr(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 pV=/\n/g,mV=/[\t ]+/g,X8=ec("br"),qfe=ec("p"),gV=ec(["th","td"]),vV=ec("tr"),Gfe=ec(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Qfe,Jfe]),_V=ec(["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 i0(i,e={}){let t="children"in i?i.children:[],n=_V(i),r=CV(i,{whitespace:e.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(i.type==="text"||i.type==="comment")&&o.push(...yV(i,{whitespace:r,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<t.length;)o.push(...bV(t[s],i,{whitespace:r,breakBefore:s?void 0:n,breakAfter:s<t.length-1?X8(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 bV(i,e,t){return i.type==="element"?$fe(i,e,t):i.type==="text"?t.whitespace==="normal"?yV(i,t):Yfe(i):[]}function $fe(i,e,t){let n=CV(i,t),r=i.children||[],o=-1,s=[];if(Gfe(i))return s;let a,l;for(X8(i)||vV(i)&&Y8(e,i,vV)?l=`
|
|
`:qfe(i)?(a=2,l=2):_V(i)&&(a=1,l=1);++o<r.length;)s=s.concat(bV(r[o],i,{whitespace:n,breakBefore:o?void 0:a,breakAfter:o<r.length-1?X8(r[o+1]):l}));return gV(i)&&Y8(e,i,gV)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function yV(i,e){let t=String(i.value),n=[],r=[],o=0;for(;o<=t.length;){pV.lastIndex=o;let l=pV.exec(t),c=l&&"index"in l?l.index:t.length;n.push(Xfe(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 Yfe(i){return[String(i.value)]}function Xfe(i,e,t){let n=[],r=0,o;for(;r<i.length;){mV.lastIndex=r;let s=mV.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 CV(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 Qfe(i){return!!(i.properties||{}).hidden}function Jfe(i){return i.tagName==="dialog"&&!(i.properties||{}).open}function Q8(i,e){return(i?wV(i,e||{}):void 0)||{type:"root",children:[]}}function wV(i,e){let t=Zfe(i,e);return t&&e.afterTransform&&e.afterTransform(i,t),t}function Zfe(i,e){switch(i.nodeType){case 1:return npe(i,e);case 3:return tpe(i);case 8:return ipe(i);case 9:return SV(i,e);case 10:return epe();case 11:return SV(i,e);default:return}}function SV(i,e){return{type:"root",children:xV(i,e)}}function epe(){return{type:"doctype"}}function tpe(i){return{type:"text",value:i.nodeValue||""}}function ipe(i){return{type:"comment",value:i.nodeValue||""}}function npe(i,e){let t=i.namespaceURI,n=t===Jr.svg?Ff:Pf,r=t===Jr.html?i.tagName.toLowerCase():i.tagName,o=t===Jr.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,xV(o,e))}function xV(i,e){let t=i.childNodes,n=[],r=-1;for(;++r<t.length;){let o=wV(t[r],e);o!==void 0&&n.push(o)}return n}var rpe=new DOMParser;function EV(i,e){let t=e!=null&&e.fragment?ope(i):rpe.parseFromString(i,"text/html");return Q8(t)}function ope(i){let e=document.createElement("template");return e.innerHTML=i,e.content}var TV=Object.assign,spe="rehype-katex";function J8(i){let e=i||{},t=e.throwOnError||!1;return(n,r)=>{Hr(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=i0(o,{whitespace:"pre"}),d;try{d=qf.renderToString(c,TV({},e,{displayMode:l,throwOnError:!0}))}catch(h){let p=h,m=t?"fail":"message",g=[spe,p.name.toLowerCase()].join(":");if(r[m](p.message,o.position,g),p.name!=="ParseError"){o.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(p),style:"color:"+(e.errorColor||"#cc0000")},children:[{type:"text",value:c}]}];return}d=qf.renderToString(c,TV({},e,{displayMode:l,throwOnError:!1,strict:"ignore"}))}let u=EV(d,{fragment:!0});o.children=u.children})}}var IV=Hi(Wx(),1);var kV={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 ape="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",lpe={2:!0,1:!1,0:null};function x4(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 IV.default({sourceCodeLocationInfo:!0,onParseError:a,scriptingEnabled:!1});return K1(l[s](r),{space:t.space,file:o,verbose:t.verbose});function c(d){let u=d.code,h=cpe(u),p=t[h],m=p==null?!0:p,g=typeof m=="number"?m:m?1:0,b={line:d.startLine,column:d.startCol,offset:d.startOffset},S={line:d.endLine,column:d.endCol,offset:d.endOffset};if(g){let N=kV[h]||{reason:"",description:"",url:""},A=o.message(k(N.reason),{start:b,end:S});A.source="parse-error",A.ruleId=u,A.fatal=lpe[g],A.note=k(N.description),A.url="url"in N&&N.url===!1?null:ape+u}function k(N){return N.replace(/%c(?:-(\d+))?/g,(A,H)=>{let K=H?-Number.parseInt(H,10):0,W=r.charAt(d.startOffset+K);return W==="`"?"` ` `":W}).replace(/%x/g,()=>"0x"+r.charCodeAt(d.startOffset).toString(16).toUpperCase())}}}}function cpe(i){return i.replace(/-[a-z]/g,e=>e.charAt(1).toUpperCase())}var bs={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 Ka={}.hasOwnProperty,dpe=[].push,Z8={root:{children:AV},doctype:upe,comment:hpe,element:{tagName:NV,properties:fpe,children:AV},text:{value:gpe},"*":{data:LV,position:LV}};function e6(i,e){var t={type:"root",children:[]},n;return i&&typeof i=="object"&&i.type&&(n=DV(Object.assign({},bs,e||{}),i,[]),n&&(Array.isArray(n)?n.length===1?t=n[0]:t.children=n:t=n)),t}function DV(i,e,t){var n=e&&e.type,r={type:e.type},o,s,a,l,c;if(Ka.call(Z8,n)&&(s=Z8[n],typeof s=="function"&&(s=s(i,e)),s)){o=!0,a=Object.assign({},s,Z8["*"]);for(c in a)Ka.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 AV(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=DV(i,e[o],n),s&&("length"in s?dpe.apply(r,s):r.push(s));t.type==="element"&&n.pop()}return r}function upe(i){return i.allowDoctypes?{name:ppe}:null}function hpe(i){return i.allowComments?{value:mpe}:null}function fpe(i,e,t,n){var r=NV(i,t.tagName,t,n),o=i.required||{},s=e||{},a=Object.assign({},MV(i.attributes["*"]),MV(r&&Ka.call(i.attributes,r)?i.attributes[r]:[])),l={},c,d,u;for(u in s)if(Ka.call(s,u)){if(Ka.call(a,u))c=a[u];else if(bpe(u)&&Ka.call(a,"data*"))c=a["data*"];else continue;d=s[u],d=Array.isArray(d)?vpe(i,d,u,c):RV(i,d,u,c),d!=null&&(l[u]=d)}if(r&&Ka.call(o,r))for(u in o[r])Ka.call(l,u)||(l[u]=o[r][u]);return l}function ppe(){return"html"}function NV(i,e,t,n){var r=typeof e=="string"?e:"",o=-1;if(!r||r==="*"||!i.tagNames.includes(r))return!1;if(Ka.call(i.ancestors,r)){for(;++o<i.ancestors[r].length;)if(n.includes(i.ancestors[r][o]))return r;return!1}return r}function mpe(i,e){var t=typeof e=="string"?e:"",n=t.indexOf("-->");return n<0?t:t.slice(0,n)}function gpe(i,e){return typeof e=="string"?e:""}function LV(i,e){return e}function vpe(i,e,t,n){for(var r=-1,o=[],s;++r<e.length;)s=RV(i,e[r],t,n),s!=null&&o.push(s);return o}function RV(i,e,t,n){if((typeof e=="boolean"||typeof e=="number"||typeof e=="string")&&_pe(i,e,t)&&(n.length===0||n.includes(e)))return i.clobber.includes(t)?i.clobberPrefix+e:e}function _pe(i,e,t){var n=String(e),r=n.indexOf(":"),o=n.indexOf("?"),s=n.indexOf("#"),a=n.indexOf("/"),l=Ka.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 MV(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 bpe(i){return i.length>4&&i.slice(0,4).toLowerCase()==="data"}function t6(i=bs){return e=>e6(e,i)}var Mu=Cr("comment");function E4(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 vn=OV(1),i6=OV(-1);function OV(i){return e;function e(t,n,r){let o=t&&t.children,s=n+i,a=o&&o[s];if(!r)for(;a&&E4(a);)s+=i,a=o[s];return a}}var ype=Cr("text");function T4(i){return ype(i)&&E4(i.value.charAt(0))}var Cpe={}.hasOwnProperty;function k4(i){return e;function e(t,n,r){return Cpe.call(i,t.tagName)&&i[t.tagName](t,n,r)}}var n0=k4({html:Spe,head:n6,body:wpe,p:xpe,li:Epe,dt:Tpe,dd:kpe,rt:PV,rp:PV,optgroup:Ipe,option:Ape,menuitem:Lpe,colgroup:n6,caption:n6,thead:Mpe,tbody:Dpe,tfoot:Npe,tr:Rpe,td:FV,th:FV});function n6(i,e,t){let n=vn(t,e,!0);return!n||!Mu(n)&&!T4(n)}function Spe(i,e,t){let n=vn(t,e);return!n||!Mu(n)}function wpe(i,e,t){let n=vn(t,e);return!n||!Mu(n)}function xpe(i,e,t){let n=vn(t,e);return n?kn(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||!kn(t,["a","audio","del","ins","map","noscript","video"])}function Epe(i,e,t){let n=vn(t,e);return!n||kn(n,"li")}function Tpe(i,e,t){let n=vn(t,e);return n&&kn(n,["dt","dd"])}function kpe(i,e,t){let n=vn(t,e);return!n||kn(n,["dt","dd"])}function PV(i,e,t){let n=vn(t,e);return!n||kn(n,["rp","rt"])}function Ipe(i,e,t){let n=vn(t,e);return!n||kn(n,"optgroup")}function Ape(i,e,t){let n=vn(t,e);return!n||kn(n,["option","optgroup"])}function Lpe(i,e,t){let n=vn(t,e);return!n||kn(n,["menuitem","hr","menu"])}function Mpe(i,e,t){let n=vn(t,e);return n&&kn(n,["tbody","tfoot"])}function Dpe(i,e,t){let n=vn(t,e);return!n||kn(n,["tbody","tfoot"])}function Npe(i,e,t){return!vn(t,e)}function Rpe(i,e,t){let n=vn(t,e);return!n||kn(n,"tr")}function FV(i,e,t){let n=vn(t,e);return!n||kn(n,["td","th"])}var HV=k4({html:Ope,head:Ppe,body:Fpe,colgroup:Hpe,tbody:Bpe});function Ope(i){let e=vn(i,-1);return!e||!Mu(e)}function Ppe(i){let e=i.children,t=[],n=-1,r;for(;++n<e.length;)if(r=e[n],kn(r,["title","base"])){if(t.includes(r.tagName))return!1;t.push(r.tagName)}return e.length>0}function Fpe(i){let e=vn(i,-1,!0);return!e||!Mu(e)&&!T4(e)&&!kn(e,["meta","link","script","style","template"])}function Hpe(i,e,t){let n=i6(t,e),r=vn(i,-1,!0);return kn(n,"colgroup")&&n0(n,t.children.indexOf(n),t)?!1:r&&kn(r,"col")}function Bpe(i,e,t){let n=i6(t,e),r=vn(i,-1);return kn(n,["thead","tbody"])&&n0(n,t.children.indexOf(n),t)?!1:r&&kn(r,"tr")}var BV={opening:HV,closing:n0};function zV(i,e){if(i=i.replace(e.subset?zpe(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 zpe(i){let e=[],t=-1;for(;++t<i.length;)e.push(i[t].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function UV(i,e,t){let n="&#x"+i.toString(16).toUpperCase();return t&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?n:n+";"}function WV(i,e,t){let n="&#"+String(i);return t&&e&&!/\d/.test(String.fromCharCode(e))?n:n+";"}var jV=["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 I4={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 VV=["cent","copy","divide","gt","lt","not","para","times"];var KV={}.hasOwnProperty,r6={},A4;for(A4 in I4)KV.call(I4,A4)&&(r6[I4[A4]]=A4);function qV(i,e,t,n){let r=String.fromCharCode(i);if(KV.call(r6,r)){let o=r6[r],s="&"+o;return t&&jV.includes(o)&&!VV.includes(o)&&(!n||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?s:s+";"}return""}function GV(i,e,t){let n=UV(i,e,t.omitOptionalSemicolons),r;if((t.useNamedReferences||t.useShortestReferences)&&(r=qV(i,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!r)&&t.useShortestReferences){let o=WV(i,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return r&&(!t.useShortestReferences||r.length<n.length)?r:n}function tc(i,e){return zV(i,Object.assign({format:GV},e))}var r0={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 $V(i,e){return i.bogusComments?"<?"+tc(e.value,Object.assign({},i.entities,{subset:[">"]}))+">":"<!--"+e.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,t)+"-->";function t(n){return tc(n,Object.assign({},i.entities,{subset:["<",">"]}))}}function YV(i){return"<!"+(i.upperDoctype?"DOCTYPE":"doctype")+(i.tightDoctype?"":" ")+"html>"}function L4(i,e,t,n){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:tc(e.value,Object.assign({},i.entities,{subset:["<","&"]}))}function XV(i,e,t,n){return i.dangerous?e.value:L4(i,e,t,n)}var QV={comment:$V,doctype:YV,element:Wpe,raw:XV,root:JV,text:L4},Upe={}.hasOwnProperty;function o6(i,e,t,n){if(!e||!e.type)throw new Error("Expected node, not `"+e+"`");if(!Upe.call(QV,e.type))throw new Error("Cannot compile unknown node `"+e.type+"`");return QV[e.type](i,e,t,n)}function JV(i,e){let t=[],n=e&&e.children||[],r=-1;for(;++r<n.length;)t[r]=o6(i,n[r],r,e);return t.join("")}function Wpe(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=Qr);let c=jpe(i,e.properties),d=JV(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 jpe(i,e){let t=[],n=-1,r,o,s;for(r in e)e[r]!==void 0&&e[r]!==null&&(o=Vpe(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 Vpe(i,e,t){let n=Us(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=tc(n.attribute,Object.assign({},i.entities,{subset:r0.name[i.schema.space==="html"?i.valid:1][i.safe]}));return t===!0||(t=typeof t=="object"&&"length"in t?(n.commaSeparated?q5:K5)(t,{padLeft:!i.tightLists}):String(t),i.collapseEmpty&&!t)?s:(i.unquoted&&(o=tc(t,Object.assign({},i.entities,{subset:r0.unquoted[i.valid][i.safe],attribute:!0}))),o!==t&&(i.smart&&Tf(t,r)>Tf(t,i.alternative)&&(r=i.alternative),o=r+tc(t,Object.assign({},i.entities,{subset:(r==="'"?r0.single:r0.double)[i.schema.space==="html"?i.valid:1][i.safe],attribute:!0}))+r),s+(o&&"="+o))}function s6(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"?Qr:Ws,omit:e.omitOptionalTags?BV: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||Y5.concat(),entities:e.entities||{},close:e.closeSelfClosing,closeEmpty:e.closeEmptyElements};return o6(r,Array.isArray(i)?{type:"root",children:i}:i,null,null)}function M4(i){let e=this.data("settings"),t=Object.assign({},e,i);Object.assign(this,{Compiler:n});function n(r){return s6(r,t)}}var Kpe={inline:["$","$"],display:["$$","$$"]};function qpe(i,e){e===void 0&&(e=Kpe);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 u=c[d];u.innerHTML=e.display[0]+u.innerHTML.substr(e.inline[0].length,u.innerHTML.length-e.inline[0].length-e.inline[1].length)+e.display[1]}return i}function ZV(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=ZV(n.startContainer);r&&n.setStartBefore(r);var o=ZV(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",qpe(s).textContent),i.preventDefault()}}});function a6(i,e){let t=typeof e=="boolean"?e:e?e.force:!1;return Hr(i,n),i;function n(r){t?delete r.position:r.position=void 0}}N_();h6();v6();y6();S6();T6();j6();Y6();Q6();eE();tE();vy();Sy();$E();var uht=Hi(JE());$7();pg();Cg();K2();J2();aC();uk();yk();var yht=Hi(xk());Tk();qk();Qk();tI();iI();_I();xI();II();BI();zI();VI();cp();JI();p2();nA();fA();pA();CA();o9();QA();JA();var Wht=Hi(tL()),jht=Hi(nL());rL();sL();fL();_L();yL();Os();CL();wL();xL();EL();TL();kL();IL();AL();LL();zi();var Dve={autoFormatTriggerCharacters:[`
|
|
`],provideOnTypeFormattingEdits(i,e,t,n,r){return t===`
|
|
`?Nve(i,e):[]}};function Nve(i,e){let t=i.getLinesContent(),n=e.lineNumber-1,r=t[n],o=t[n-1],s=ML(o);if(Rve(t,n)){let a=e.lineNumber<t.length&&fQ(r);return a?[Ove(e,s,a)]:[]}return[]}function Rve(i,e){let t=i[e-1],n=ML(t),r=uQ(t);if(hQ(r)==="do"||r.includes("fn")&&hQ(r)==="->"){let o=i.slice(e+1).filter(s=>!fQ(s)).find(s=>ML(s)===n);if(o){let[s]=uQ(o);if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}function Ove(i,e,t){return t?{range:new ii.Range(i.lineNumber+1,1,i.lineNumber+1,1),text:`${e}end
|
|
`}:{range:new ii.Range(i.lineNumber,i.column,i.lineNumber,i.column),text:`
|
|
${e}end`}}function ML(i){let[e]=i.match(/^\s*/);return e}function uQ(i){return i.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function hQ(i){return i[i.length-1]}function fQ(i){return i.trim()===""}var pQ=Dve;var Pve={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"]]}},mQ=Pve;var Fve={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*$/}},gQ=Fve;var DL={background:"#282c34",default:"#c4cad6",lightRed:"#e06c75",blue:"#61afef",gray:"#8c92a3",green:"#98c379",purple:"#c678dd",red:"#be5046",teal:"#56b6c2",peach:"#d19a66"},yv={background:"#fafafa",default:"#304254",lightRed:"#e45649",blue:"#4078F2",gray:"#707177",green:"#50a14f",purple:"#a726a4",red:"#ca1243",teal:"#56b6c2",peach:"#986801"},vQ=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}],_Q={base:"vs-dark",inherit:!1,rules:vQ(DL),colors:{"editor.background":DL.background,"editor.foreground":DL.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"}},bQ={base:"vs",inherit:!1,rules:vQ(yv),colors:{"editor.background":yv.background,"editor.foreground":yv.default,"editorLineNumber.foreground":"#9d9d9f","editorCursor.foreground":"#526fff","editor.selectionBackground":"#e5e5e6","editor.findMatchHighlightBackground":"#526fff33","editorSuggestWidget.highlightForeground":yv.default,"editorSuggestWidget.focusHighlightForeground":"#0431fa","editorSuggestWidget.selectedForeground":yv.default,"editorSuggestWidget.background":"#eaeaeb","editorSuggestWidget.border":"#dbdbdc","editorSuggestWidget.selectedBackground":"#ffffff","input.background":"#ffffff","input.border":"#dbdbdc","editorBracketMatch.border":"#fafafa","editorBracketMatch.background":"#e5e5e6"}};xre();var yQ="settings",Cv={normal:14,large:16},Hve={default:"default",emacs:"emacs",vim:"vim"},Qp={default:"default",light:"light"},Bve={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:Cv.normal,editor_theme:Qp.default,editor_markdown_word_wrap:!0,editor_mode:Hve.default,custom_view_show_section:!0,custom_view_show_markdown:!0,custom_view_show_output:!0,custom_view_spotlight:!1},NL=class{constructor(){this._subscribers=[],this._settings=Bve,this._loadSettings()}get(){return this._settings}update(e){let t=this._settings;this._settings=Re(Re({},this._settings),e),this._subscribers.forEach(n=>n(this._settings,t)),this._storeSettings()}getAndSubscribe(e){return this._subscribers.push(e),e(this._settings),()=>{this.unsubscribe(e)}}unsubscribe(e){let t=this._subscribers.indexOf(e);t!==-1&&this._subscribers.splice(t,1)}_loadSettings(){let e=hu(yQ);e&&(Object.values(Qp).includes(e.editor_theme)||delete e.editor_theme,this._settings=Re(Re({},this._settings),e))}_storeSettings(){wf(yQ,this._settings)}},en=new NL;window.MonacoEnvironment={globalAPI:!0,getWorkerUrl(i,e){return e==="json"?"/assets/language/json/json.worker.js":"/assets/editor/editor.worker.js"}};if(q_.prototype.finish){let i=q_.prototype.finish;q_.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");ka.registerOnTypeFormattingEditProvider("elixir",pQ);ka.register({id:"erlang"});ka.setMonarchTokensProvider("erlang",mQ);ka.setLanguageConfiguration("erlang",gQ);du.defineTheme("default",_Q);du.defineTheme("light",bQ);document.fonts.addEventListener("loadingdone",i=>{i.fontfaces.some(t=>t.family.includes("JetBrains Mono"))&&du.remeasureFonts()});var RL=null;en.getAndSubscribe(i=>{RL&&RL.dispose(),RL=ka.registerCompletionItemProvider("elixir",{triggerCharacters:i.editor_auto_completion?["."]:[],provideCompletionItems:(e,t,n,r)=>e.__getCompletionItems__?e.__getCompletionItems__(e,t):null})});ka.registerHoverProvider("elixir",{provideHover:(i,e,t)=>i.__getHover__?i.__getHover__(i,e):null});ka.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:(i,e,t,n)=>i.__getSignatureHelp__?i.__getSignatureHelp__(i,e):null});ka.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:(i,e,t)=>i.__getDocumentFormattingEdits__?i.__getDocumentFormattingEdits__(i):null});var ii=Rs;function Jp(i,e){if(!Jp.initialized){let t=en.get();du.create(document.createElement("div"),{theme:t.editor_theme}),Jp.initialized=!0}return du.colorize(i,e).then(t=>t.replace(/<br\/>$/,""))}var AQ=Hi(xQ()),LQ=Hi(TQ()),OL=Hi(IQ());function S9(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function Bd(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function PL(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function Zp(i){return i.offsetParent===null}function FL(i){return!Zp(i)&&PL(i)}function MQ(i,e,t){return Math.min(Math.max(i,e),t)}function DQ(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 NQ(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function zd(i){let{height:e}=i.getBoundingClientRect();e<window.innerHeight?i.scrollIntoView({behavior:"smooth",block:"center"}):i.scrollIntoView({behavior:"smooth",block:"start"})}function RQ(i){return Math.abs(i.scrollHeight-i.clientHeight-i.scrollTop)<1}function Sv(i){i.scrollTop=i.scrollHeight}function OQ(i){return btoa(unescape(encodeURIComponent(i)))}function PQ(i){return decodeURIComponent(escape(atob(i)))}function w9(){return HQ(24)}function FQ(){return HQ(40)}function HQ(i){let e=new Uint8Array(i);crypto.getRandomValues(e);let t=String.fromCharCode(...e);return btoa(t)}function x9(i){return(0,AQ.default)(i).toString(OL.default)}function BQ(i){return(0,LQ.default)(i).toString(OL.default)}function E9(i){let e=document.querySelector('[rel="icon"]');e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=`/${i}.svg`}function Sc(i,e){let t=i.querySelector(e);if(!t)throw new Error(`expected a child matching ${e}, but none was found`);return t}function dl(i){i.preventDefault(),i.stopPropagation()}var zve={"&":"&","<":"<",">":">",'"':""","'":"'"};function zQ(i){return(i||"").replace(/[&<>"']/g,e=>zve[e])}function UQ(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 T9(){return document.body.hasAttribute("data-within-iframe")?";SameSite=None;Secure":";SameSite=Lax"}var wv=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 Uve=0,Wve=()=>`mermaid-graph-${Uve++}`,WQ=!1,jve="5.15.4",jQ=new wv(25);function VQ(i){let e=x9(i),t=jQ.get(e);return t?Promise.resolve(t):Vve().then(n=>(Kve(i),n.render(Wve(),i).then(({svg:r})=>(jQ.set(e,r),r)).catch(r=>`<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span>
|
|
${r.message}</div>`)))}function Vve(){return import("./mermaid.core-MG3J7S3E.js").then(({default:i})=>(WQ||(i.initialize({startOnLoad:!1}),WQ=!0),i))}function Kve(i){let e=`https://cdnjs.cloudflare.com/ajax/libs/font-awesome/${jve}/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 HL=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>`;uH(this.container,t,{childrenOnly:!0})})}_getHtml(){return Qb().use(Jb).use(J3).use(ex).use(Xve).use(Gve,{highlight:Jp}).use(rx,{allowDangerousHtml:!0}).use(o8).use($ve,{baseUrl:this.baseUrl}).use(t6,qve(this.allowedUriSchemes)).use(J8).use(Qve).use(Jve,{baseUrl:this.baseUrl}).use(M4).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>
|
|
`)}},k9=HL;function qve(i){return Pt(Re({},bs),{attributes:Pt(Re({},bs.attributes),{"*":[...bs.attributes["*"]||[],"className","style"]}),protocols:Pt(Re({},bs.protocols),{href:[...bs.protocols.href,...i]})})}function Gve(i){return e=>{let t=[];return Hr(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 $ve(i){return e=>{i.baseUrl&&Hr(e,"element",t=>{if(t.tagName==="a"&&t.properties){let n=t.properties.href;n&&!BL(n)&&!zL(n)&&!Zve(n)&&(t.properties.href=KQ(i.baseUrl,n))}if(t.tagName==="img"&&t.properties){let n=t.properties.src;n&&!BL(n)&&!zL(n)&&(t.properties.src=KQ(i.baseUrl,n))}}),Hr(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 Yve=Qb().use(x4,{fragment:!0});function Xve(i){return e=>{Hr(e,"code",(t,n,r)=>{t.lang==="mermaid"&&(t.type="html",t.value=`
|
|
<div class="mermaid">${zQ(t.value)}</div>
|
|
`)})}}function Qve(i){return e=>{let t=[];return Hr(e,"element",n=>{if((n.properties&&Array.isArray(n.properties.className)?n.properties.className:[]).includes("mermaid")){let o=function(l){n.children=a6(Yve.parse(l),!0).children},s=i0(n,{whitespace:"pre"}),a=VQ(s).then(o);t.push(a)}}),Promise.all(t).then(()=>null)}}function Jve(i){return e=>{Hr(e,"element",t=>{if(t.properties&&t.properties.href){let n=t.properties.href;zL(n)?(t.properties["data-phx-link"]=i.baseUrl&&n.startsWith(i.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):BL(n)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}})}}function BL(i){return/^(?:[a-z]+:)?\/\//i.test(i)}function Zve(i){return i.startsWith("#")}function zL(i){return i.startsWith("/")||i.startsWith(window.location.origin)}function KQ(i,e){return i.replace(/\/$/,"")+"/"+e}var I9=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)})}},bn=new I9;var qQ=i=>typeof i=="object"&&i!=null&&i.nodeType===1,GQ=(i,e)=>(!e||i!=="hidden")&&i!=="visible"&&i!=="clip",UL=(i,e)=>{if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){let t=getComputedStyle(i,null);return GQ(t.overflowY,e)||GQ(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},A9=(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,e_e=i=>{let e=i.parentElement;return e==null?i.getRootNode().host||null:e},WL=(i,e)=>{var t,n,r,o;if(typeof document=="undefined")return[];let{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,u=typeof c=="function"?c:Xe=>Xe!==c;if(!qQ(i))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,p=[],m=i;for(;qQ(m)&&u(m);){if(m=e_e(m),m===h){p.push(m);break}m!=null&&m===document.body&&UL(m)&&!UL(document.documentElement)||m!=null&&UL(m,d)&&p.push(m)}let g=(n=(t=window.visualViewport)==null?void 0:t.width)!=null?n:innerWidth,b=(o=(r=window.visualViewport)==null?void 0:r.height)!=null?o:innerHeight,{scrollX:S,scrollY:k}=window,{height:N,width:A,top:H,right:K,bottom:W,left:re}=i.getBoundingClientRect(),ae=a==="start"||a==="nearest"?H:a==="end"?W:H+N/2,Ne=l==="center"?re+A/2:l==="end"?K:re,he=[];for(let Xe=0;Xe<p.length;Xe++){let st=p[Xe],{height:rt,width:Nt,top:Z,right:ye,bottom:ge,left:$}=st.getBoundingClientRect();if(s==="if-needed"&&H>=0&&re>=0&&W<=b&&K<=g&&H>=Z&&W<=ge&&re>=$&&K<=ye)return he;let Q=getComputedStyle(st),ie=parseInt(Q.borderLeftWidth,10),de=parseInt(Q.borderTopWidth,10),$t=parseInt(Q.borderRightWidth,10),Xt=parseInt(Q.borderBottomWidth,10),Qt=0,pi=0,Gi="offsetWidth"in st?st.offsetWidth-st.clientWidth-ie-$t:0,ai="offsetHeight"in st?st.offsetHeight-st.clientHeight-de-Xt:0,$i="offsetWidth"in st?st.offsetWidth===0?0:Nt/st.offsetWidth:0,nn="offsetHeight"in st?st.offsetHeight===0?0:rt/st.offsetHeight:0;if(h===st)Qt=a==="start"?ae:a==="end"?ae-b:a==="nearest"?A9(k,k+b,b,de,Xt,k+ae,k+ae+N,N):ae-b/2,pi=l==="start"?Ne:l==="center"?Ne-g/2:l==="end"?Ne-g:A9(S,S+g,g,ie,$t,S+Ne,S+Ne+A,A),Qt=Math.max(0,Qt+k),pi=Math.max(0,pi+S);else{Qt=a==="start"?ae-Z-de:a==="end"?ae-ge+Xt+ai:a==="nearest"?A9(Z,ge,rt,de,Xt+ai,ae,ae+N,N):ae-(Z+rt/2)+ai/2,pi=l==="start"?Ne-$-ie:l==="center"?Ne-($+Nt/2)+Gi/2:l==="end"?Ne-ye+$t+Gi:A9($,ye,Nt,ie,$t+Gi,Ne,Ne+A,A);let{scrollLeft:Wh,scrollTop:qd}=st;Qt=Math.max(0,Math.min(qd+Qt/nn,st.scrollHeight-rt/nn+ai)),pi=Math.max(0,Math.min(Wh+pi/$i,st.scrollWidth-Nt/$i+Gi)),ae+=qd-Qt,Ne+=Wh-pi}he.push({el:st,top:Qt,left:pi})}return he};var t_e=i=>i===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(i)?i:{block:"start",inline:"nearest"};function $Q(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(WL(i,e));let t=typeof e=="boolean"||e==null?void 0:e.behavior;for(let{el:n,top:r,left:o}of WL(i,t_e(e)))n.scroll({top:r,left:o,behavior:t})}function Lh(i){return["code","smart","setup"].includes(i)}function YQ(i){return["markdown","code","setup"].includes(i)}var i_e={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=bn.subscribe("navigation",i=>this.handleNavigationEvent(i)),this.unsubscribeFromCellsEvents=bn.subscribe("cells",i=>this.handleCellsEvent(i)),this.unsubscribeFromCellEvents=bn.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:vt(this.el,"data-cell-id"),type:vt(this.el,"data-type"),sessionPath:vt(this.el,"data-session-path"),evaluationDigest:_i(this.el,"data-evaluation-digest",null),smartCellJSViewRef:_i(this.el,"data-smart-cell-js-view-ref",null),allowedUriSchemes:vt(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&&zd(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 k9(n,t,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes.split(",")});e.onChange(o=>{r.setContent(o)})}Lh(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&&zd(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=x9(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&&zd(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?bn.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&&bn.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:e,editorSelection:i}})},scrollActiveElementIntoView(){$Q(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}},XQ=i_e;var n_e=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},r_e=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},o_e=/^\\begin{/,s_e=function(e,t){for(var n,r=[],o=new RegExp("("+t.map(c=>r_e(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=n_e(t[s].right,e,t[s].left.length),n===-1)break;var a=e.slice(0,n+t[s].right.length),l=o_e.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},a_e=function(e,t){var n=s_e(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)),qf.render(a,s,t)}catch(l){if(!(l instanceof qf.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},l_e=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=a_e(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+" ",u=t.ignoredTags.indexOf(r.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(h=>d.indexOf(" "+h+" ")===-1);u&&i(r,t)}()}},QQ=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||{},l_e(e,n)};var xv=class{constructor(e,t){this.serverAdapter=e,this.revision=t,this.state=new L9(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)}},L9=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 M9(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.")}},M9=class i{constructor(e,t){this.client=e,this.awaitedDelta=t}onClientDelta(e){return new jL(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 L9(this.client)}},jL=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 M9(this.client,this.buffer)}};var Mh=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 To(e)&&ko(t)?this.append(e).append(t):To(e)&&To(t)?(this.ops.push({insert:t.insert+e.insert}),this):ko(e)&&ko(t)?(this.ops.push({delete:t.delete+e.delete}),this):ea(e)&&ea(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}compose(e){let t=new em(this.ops),n=new em(e.ops),r=new i;for(;t.hasNext()||n.hasNext();)if(To(n.peek()))r.append(n.next());else if(ko(t.peek()))r.append(t.next());else{let o=Math.min(t.peekLength(),n.peekLength()),s=t.next(o),a=n.next(o);ea(a)?r.append(s):ko(a)&&ea(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 em(this.ops),r=new em(e.ops),o=new i;for(;n.hasNext()||r.hasNext();)if(To(n.peek())&&(!To(r.peek())||t==="left")){let s=VL(n.next());o.retain(s)}else if(To(r.peek()))o.append(r.next());else{let s=Math.min(n.peekLength(),r.peekLength()),a=n.next(s),l=r.next(s);if(ko(a))continue;ko(l)?o.append(l):o.retain(s)}return o._trim()}_trim(){return this.ops.length>0&&ea(this.ops[this.ops.length-1])&&this.ops.pop(),this}toCompressed(){return this.ops.map(e=>{if(To(e))return e.insert;if(ea(e))return e.retain;if(ko(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=>{ea(r)&&(t+=e.slice(n,n+r.retain),n+=r.retain),To(r)&&(t+=r.insert),ko(r)&&(n+=r.delete)}),t+=e.slice(n),t}},em=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=VL(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,ko(t))return{delete:e};if(ea(t))return{retain:e};if(To(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]?VL(this.ops[this.index])-this.offset:1/0}};function VL(i){if(To(i))return i.insert.length;if(ea(i))return i.retain;if(ko(i))return i.delete}function To(i){return typeof i.insert=="string"}function ea(i){return typeof i.retain=="number"}function ko(i){return typeof i.delete=="number"}var Ev=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=>ko(r)?!0:To(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 Mh;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(ea(o)&&(r+=o.retain),To(o)){let s=t.getPositionAt(r);n.push({forceMoveMarkers:!0,range:new ii.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:o.insert})}if(ko(o)){let s=t.getPositionAt(r),a=t.getPositionAt(r+o.delete);n.push({forceMoveMarkers:!1,range:new ii.Range(s.lineNumber,s.column,a.lineNumber,a.column),text:null}),r+=o.delete}}),n}};var Tv=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(Mh.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 kv=class{constructor(e,t,n,r){this._cursorWidget=new KL(e,t.getPosition(),n,r),this._selectionDecoration=new qL(e,t,n)}update(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}dispose(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}},KL=class{constructor(e,t,n,r){this._id=w9(),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:[ii.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(ii.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)}},qL=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 JQ(i,e){let t=e;for(;!i.endsWith(t);)t=t.slice(0,-1);return t.length}var Iv=class{constructor(e,t){this._editor=e,this._statusDecoration=new GL(e,t.line,t.status),t.status==="failed"&&(this._detailsWidget=new D9(e,t))}update(e){this._statusDecoration.update(e.status),e.status==="failed"&&(this._detailsWidget&&this._detailsWidget.dispose(),this._detailsWidget=new D9(this._editor,e))}dispose(){this._statusDecoration.dispose(),this._detailsWidget&&this._detailsWidget.dispose()}},GL=class{constructor(e,t,n){this._editor=e,this._lineNumber=t,this._decorations=[],this.update(n)}update(e){let t=[{range:new ii.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,[])}},D9=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(ii.editor.EditorOption.fontSize),d=this._editor.getOption(ii.editor.EditorOption.lineHeight),u=document.createElement("div");u.innerHTML=a,u.classList.add("doctest-details-widget","editor-theme-aware-ansi"),u.style.fontSize=`${c}px`,u.style.lineHeight=`${d}px`,this._overlayWidget={getId:()=>`livebook.doctest.overlay.${n}`,getDomNode:()=>u,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget),this._editor.changeViewZones(h=>{this._viewZone=h.addZone({afterLineNumber:r,heightInPx:l*d+12,domNode:document.createElement("div"),onDomNodeTop:p=>{u.style.top=`${p}px`;let m=this._editor.getDomNode().querySelector(".margin-view-overlays").offsetWidth;u.style.paddingLeft=`calc(${m}px + ${s}ch)`},onComputedHeight:p=>{u.style.height=`${p}px`}})})}dispose(){this._editor.removeOverlayWidget(this._overlayWidget),this._editor.changeViewZones(e=>{e.removeZone(this._viewZone)})}};var Ute=Hi(vJ()),fS=Hi(Bte());var rD=class{constructor(e,t,n,r,o,s,a,l,c,d,u){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),u.forEach(p=>{this.updateDoctest(p)})};let h=new Tv(e,n,r);this.editorClient=new xv(h,s),this.editorClient.onDelta(p=>{this.source=p.applyToString(this.source),this._onChange.forEach(m=>m(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 Ev(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 kv(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 Iv(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:ii.MarkerSeverity.Error,warning:ii.MarkerSeverity.Warning}[r.severity]}});ii.editor.setModelMarkers(this.editor.getModel(),t,n)}_mountEditor(){let e=en.get();this.editor=ii.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:[ii.KeyMod.Alt|ii.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:[ii.KeyMod.Alt|ii.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(),this._setEditorMode(e.editor_mode)}_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=en.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:d4e(a.items,e).map(c=>{let d=JQ(s,c.insertText),u=new ii.Range(r.lineNumber,r.column-d,r.lineNumber,r.column);return Pt(Re({},c),{range:u})})})).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||(QQ(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 ii.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:zte(t.response),dispose:()=>{}}:this._asyncIntellisenseRequest("signature",{hint:c}).then(u=>(t.response=u,t.codeUntilLastStop=d,{value:zte(u),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",Re({cell_id:this.cellId,type:e},t),({ref:o})=>{o?this.handlerByRef[o]=s=>{s?n(s):r(null)}:r(null)})})}_setEditorMode(e){e=="emacs"?(this.emacsMode=new fS.EmacsExtension(this.editor),this.emacsMode.start(),(0,fS.unregisterKey)("Tab")):e=="vim"&&(this.vimMode=(0,Ute.initVimMode)(this.editor),this.vimMode.on("vim-mode-change",({mode:t})=>{this.editor.getDomNode().setAttribute("data-vim-mode",t)}))}};function d4e(i,e){return i.map(t=>u4e(t,e)).map((t,n)=>Pt(Re({},t),{sortText:f4e(n,i.length)}))}function u4e(i,e){return{label:i.label,kind:h4e(i.kind),detail:i.detail,documentation:i.documentation&&{value:i.documentation,isTrusted:!0},insertText:i.insert_text,insertTextRules:ii.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:e.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}function h4e(i){switch(i){case"function":return ii.languages.CompletionItemKind.Function;case"module":return ii.languages.CompletionItemKind.Module;case"struct":return ii.languages.CompletionItemKind.Struct;case"interface":return ii.languages.CompletionItemKind.Interface;case"type":return ii.languages.CompletionItemKind.Class;case"variable":return ii.languages.CompletionItemKind.Variable;case"field":return ii.languages.CompletionItemKind.Field;case"keyword":return ii.languages.CompletionItemKind.Keyword;default:return null}}function f4e(i,e){return String(i).padStart(e,"0")}function zte(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 Wte=rD;var p4e={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 Wte(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:vt(this.el,"data-cell-id"),tag:vt(this.el,"data-tag"),language:_i(this.el,"data-language",null),intellisense:vt(this.el,"data-intellisense",Ol),readOnly:vt(this.el,"data-read-only",Ol)}}},jte=p4e;var oD="data-js-dragging",m4e={mounted(){this.el.addEventListener("dragenter",i=>{this.el.setAttribute(oD,"")}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.removeAttribute(oD)}),this.el.addEventListener("drop",i=>{this.el.removeAttribute(oD)})}},Vte=m4e;var g4e={mounted(){let i=en.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"]'),s=this.el.querySelector('select[name="editor_mode"]');e.checked=i.editor_auto_completion,t.checked=i.editor_auto_signature,n.checked=i.editor_font_size===Cv.large,r.checked=i.editor_theme===Qp.light,o.checked=i.editor_markdown_word_wrap,s.value=i.editor_mode,e.addEventListener("change",a=>{en.update({editor_auto_completion:a.target.checked})}),t.addEventListener("change",a=>{en.update({editor_auto_signature:a.target.checked})}),n.addEventListener("change",a=>{en.update({editor_font_size:a.target.checked?Cv.large:Cv.normal})}),r.addEventListener("change",a=>{en.update({editor_theme:a.target.checked?Qp.light:Qp.default})}),o.addEventListener("change",a=>{en.update({editor_markdown_word_wrap:a.target.checked})}),s.addEventListener("change",a=>{en.update({editor_mode:a.target.value})})}},Kte=g4e;var KD=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},kc=(i,e,t)=>(KD(i,e,"read from private field"),t?t.call(i):e.get(i)),Tc=(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)},hD=(i,e,t,n)=>(KD(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),ia=(i,e,t)=>(KD(i,e,"access private method"),t),v4e="14.0";function _4e(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 qD(i,e={}){let h=e,{local:t=!1,version:n="latest",cdnUrl:r}=h,o=aa(h,["local","version","cdnUrl"]),s=_4e(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,Re({credentials:"omit",mode:"cors",redirect:"error"},o));if(!d.ok)throw new Error("Failed to load Emojibase dataset.");let u=await d.json();try{a.setItem(l,JSON.stringify(u))}catch(p){}return u}var b4e={discord:"joypixels",slack:"iamcal"};async function qte(i,e,t){var n;return qD(`${i}/shortcodes/${(n=b4e[e])!==null&&n!==void 0?n:e}.json`,t)}function Yv(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=>{Yv(n,e)}),i}function y4e(i,e=[]){let t=[];return i.forEach(n=>{if(n.skins){let r=n,{skins:o}=r,s=aa(r,["skins"]);t.push(Yv(s,e)),o.forEach(a=>{let l=Re({},a);s.tags&&(l.tags=[...s.tags]),t.push(Yv(l,e))})}else t.push(Yv(n,e))}),t}function C4e(i,e){return e.length===0||i.forEach(t=>{Yv(t,e)}),i}async function tie(i,e={}){let l=e,{compact:t=!1,flat:n=!1,shortcodes:r=[]}=l,o=aa(l,["compact","flat","shortcodes"]),s=await qD(`${i}/${t?"compact":"data"}.json`,o),a=[];return r.length>0&&(a=await Promise.all(r.map(c=>{let d;if(c.includes("/")){let[u,h]=c.split("/");d=qte(u,h,o)}else d=qte(i,c,o);return d.catch(()=>({}))}))),n?y4e(s,a):C4e(s,a)}async function iie(i,e){return qD(`${i}/messages.json`,e)}function sD(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 nie(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 Gte(i,e){return i.toLowerCase().includes(e.toLowerCase())}function S4e(i,e){let t=null;return()=>{t||(t=window.setTimeout(()=>{i(),t=null},e))}}function w4e(i,e){let t=null;return(...n)=>{t&&window.clearTimeout(t),t=window.setTimeout(()=>{i(...n),t=null},e)}}function Ph(i,e,t,n){if(nie(n)&&i.animate)return i.animate(e,t).finished;let r=t.direction==="normal"?1:0,o=Object.entries(e).reduce((s,[a,l])=>Pt(Re({},s),{[a]:l[r]}),{});return Object.assign(i.style,o),Promise.resolve()}function fD(i){var e;let t=document.createElement("template");return t.innerHTML=i,(e=t.content)==null?void 0:e.firstElementChild}async function x4e(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 Ar(...i){return i.reduce((e,t)=>Pt(Re({},e),{[t]:GD(t)}),{})}function GD(i){return`picmo__${i}`}function vS(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function mm(i,...e){vS(i).append(...e)}function rie(i){try{return window[i].length,!0}catch(e){return!1}}function E4e(){return rie("sessionStorage")}function T4e(){return rie("localStorage")}function oie(){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 Qv(i){var e;return{emoji:i.emoji,label:i.label,tags:i.tags,skins:(e=i.skins)==null?void 0:e.map(t=>Qv(t)),order:i.order,custom:!1,hexcode:i.hexcode,version:i.version}}function xS(i,e,t){var n;return t&&!t.some(r=>r.order===i.group)?!1:Gte(i.label,e)||((n=i.tags)==null?void 0:n.some(r=>Gte(r,e)))}var ES=class{constructor(e="en"){this.locale=e}},k4e=[(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 I4e(i,e){return k4e.some(t=>t(i,e)===null)?null:i}function TS(i,e){return i.filter(t=>I4e(t,e)!==null)}var aD={};function sie(i){return aD[i]||(aD[i]=new pD(i)),aD[i]}sie.deleteDatabase=i=>{};var pD=class extends ES{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(Qv);return Promise.resolve(TS(n,t))}searchEmojis(e,t,n,r){let o=this.emojis.filter(l=>xS(l,e,r)&&l.version<=n).map(Qv),s=t.filter(l=>xS(l,e,r)),a=[...TS(o,n),...s];return Promise.resolve(a)}setMeta(e){this.meta=e}};!E4e()&&typeof window<"u"&&(console.warn("[picmo] sessionStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"sessionStorage",{value:oie()}));function A4e(i,e){let t=`https://cdn.jsdelivr.net/npm/emojibase-data@${i}/${e}`;return{emojisUrl:`${t}/data.json`,messagesUrl:`${t}/messages.json`}}async function $te(i){try{return(await fetch(i,{method:"HEAD"})).headers.get("etag")}catch(e){return null}}function L4e(i){let{emojisUrl:e,messagesUrl:t}=A4e("latest",i);try{return Promise.all([$te(e),$te(t)])}catch(n){return Promise.all([null,null])}}async function M4e(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([iie(i.locale),tie(i.locale)]);await i.populate({groups:s.groups,emojis:a,emojisEtag:e,messagesEtag:t})}}async function D4e(i,e){let t=await i.getHash();return e!==t}async function aie(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=sie(i)}return n}async function N4e(i,e,t){let n=await aie(i,e,t),[r,o]=await L4e(i);if(await n.isPopulated())r&&o&&await M4e(n,r,o);else{let[s,a]=await Promise.all([iie(i),tie(i)]);await n.populate({groups:s.groups,emojis:a,emojisEtag:r,messagesEtag:o})}return n}async function R4e(i,e,t,n,r){let o=await aie(i,e,r),s=await x4e(n);return(!await o.isPopulated()||await D4e(o,s))&&await o.populate({groups:t.groups,emojis:n,hash:s}),o}async function lie(i,e,t,n,r){return t&&n?R4e(i,e,t,n,r):N4e(i,e,r)}var Jv=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:O4e,dark:tyt,auto:iyt}=Ar("light","dark","auto"),Ot=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(Re({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(Re({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)=>Pt(Re({},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&&(nie(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}`}},P4e='<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>',F4e='<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>',H4e='<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>',B4e='<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>',z4e='<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>',U4e='<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>',W4e='<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>',j4e='<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>',V4e=`<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>`,K4e='<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>',q4e='<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>',G4e='<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>',$4e='<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>',Y4e='<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>',X4e=`<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>`,Q4e='<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 J4e(i,e){let t=fD(e);return t.dataset.icon=i,t.classList.add(GD("icon")),t}var Yte={clock:P4e,flag:F4e,frown:H4e,gamepad:B4e,lightbulb:z4e,mug:U4e,plane:W4e,robot:j4e,sad:V4e,search:K4e,smiley:q4e,symbols:G4e,tree:$4e,users:Y4e,warning:X4e,xmark:Q4e},LS={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 cie(i,e){if(!(i in Yte))return console.warn(`Unknown icon: "${i}"`),document.createElement("div");let t=J4e(i,Yte[i]);return e&&t.classList.add(GD(`icon-${e}`)),t}var Z4e={mode:"sync"},$v,_S,bS,mD,yS,gD,CS,vD,Fn=class{constructor(e,t={}){Tc(this,bS),Tc(this,yS),Tc(this,CS),Tc(this,$v,void 0),Tc(this,_S,void 0),hD(this,$v,e),hD(this,_S,t.mode||Z4e.mode)}renderSync(e={}){let t=fD(kc(this,$v).call(this,e));return ia(this,CS,vD).call(this,t,e),ia(this,yS,gD).call(this,t),ia(this,bS,mD).call(this,t,e),t}async renderAsync(e={}){let t=fD(kc(this,$v).call(this,e));return ia(this,CS,vD).call(this,t,e),ia(this,yS,gD).call(this,t),await ia(this,bS,mD).call(this,t,e),t}render(e){return kc(this,_S)==="sync"?this.renderSync(e):this.renderAsync(e)}};$v=new WeakMap,_S=new WeakMap,bS=new WeakSet,mD=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)},yS=new WeakSet,gD=function(i){i.querySelectorAll("i[data-icon]").forEach(e=>{let{icon:t,size:n}=e.dataset;e.replaceWith(cie(t,n))})},CS=new WeakSet,vD=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 eye=Ar("imagePlaceholder","placeholder"),tye=new Fn(({classes:i})=>`
|
|
<div class="${i.placeholder} ${i.imagePlaceholder}"></div>
|
|
`),_D=class extends Ot{constructor({classNames:e}={}){super({template:tye,classes:eye}),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}},iye=Ar("customEmoji"),bD=class{renderElement(e){return{content:e}}renderImage(e="",t){let n=new _D({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=[iye.customEmoji,n].join(" ").trim(),{content:o,resolver:s}=this.renderImage(r,()=>e.url),a=o instanceof Element?o:o.el;return s&&s(),a}},nye=new Fn(({emoji:i})=>`<span>${i}</span>`),yD=class extends bD{render(e){return this.renderElement(nye.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:n}){return{emoji:e,hexcode:t,label:n}}},rye={"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..."},CD="PicMo";function die(i){return new SD(i)}die.deleteDatabase=i=>new Promise((e,t)=>{let n=indexedDB.deleteDatabase(`${CD}-${i}`);n.addEventListener("success",e),n.addEventListener("error",t)});var SD=class extends ES{async open(){let e=indexedDB.open(`${CD}-${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(`${CD}-${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(Qv);return TS(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 u=(d=c.target)==null?void 0:d.result;if(!u)return s([...TS(o,n),...t.filter(p=>xS(p,e))]);let h=u.value;xS(h,e,r)&&h.version<=n&&o.push(Qv(h)),u.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)})})}},wD=class{},lD="PicMo:recents",xD=class extends wD{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(lD)}getRecents(e){var t;try{return JSON.parse((t=this.storage.getItem(lD))!=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(lD,JSON.stringify(n))}catch(r){console.warn("storage is not available, recent emojis will not be saved")}}},ED=class extends xD{constructor(){super(localStorage)}},oye={dataStore:die,theme:O4e,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:rye,locale:"en",maxRecents:50,custom:[]};!T4e()&&typeof window<"u"&&(console.warn("[picmo] localStorage not available, falling back to simple in-memory storage"),Object.defineProperty(window,"localStorage",{value:oie()}));function $D(i={}){return Pt(Re(Re({},oye),i),{renderer:i.renderer||new yD,recentsProvider:i.recentsProvider||new ED})}var Fh,Xv,kS,SS,TD,Hh=class{constructor(){Tc(this,Xv),Tc(this,SS),Tc(this,Fh,new Map)}on(e,t,n){ia(this,SS,TD).call(this,e,t,n)}once(e,t,n){ia(this,SS,TD).call(this,e,t,n,!0)}off(e,t){let n=ia(this,Xv,kS).call(this,e);kc(this,Fh).set(e,n.filter(r=>r.handler!==t))}emit(e,...t){ia(this,Xv,kS).call(this,e).forEach(n=>{n.handler.apply(n.context,t),n.once&&this.off(e,n.handler)})}removeAll(){kc(this,Fh).clear()}};Fh=new WeakMap,Xv=new WeakSet,kS=function(i){return kc(this,Fh).has(i)||kc(this,Fh).set(i,[]),kc(this,Fh).get(i)},SS=new WeakSet,TD=function(i,e,t,n=!1){ia(this,Xv,kS).call(this,i).push({context:t,handler:e,once:n})};var sye={injectStyles:!0},kD=class extends Hh{},ID=class extends Hh{},AD=Ar("emojiCategory","categoryName","noRecents","recentEmojis"),Zv=class extends Ot{constructor({template:e,category:t,showVariants:n,lazyLoader:r}){super({template:e,classes:AD}),this.baseUIElements={categoryName:Ot.byClass(AD.categoryName)},this.category=t,this.showVariants=n,this.lazyLoader=r}setActive(e,t,n){this.emojiContainer.setActive(e,t,n)}},aye=new Fn(({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>
|
|
`),lye=Ar("emojiButton"),IS=class extends Ot{constructor({emoji:e,lazyLoader:t,category:n}){super({template:aye,classes:lye}),this.emoji=e,this.lazyLoader=t,this.category=n}initialize(){this.uiEvents=[Ot.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)})}},LD=class{constructor(e,t,n=0,r=0,o=!1){this.events=new Hh,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}},cye=new Fn(({classes:i})=>`
|
|
<div class="${i.emojiContainer}">
|
|
<div data-placeholder="emojis"></div>
|
|
</div>
|
|
`),dye=Ar("emojiContainer"),Bh=class extends Ot{constructor({emojis:e,showVariants:t,preview:n=!0,lazyLoader:r,category:o,fullHeight:s=!1}){super({template:cye,classes:dye}),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 LD(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=[Ot.uiEvent("click",this.selectEmoji),Ot.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(Ot.uiEvent("mouseover",this.showPreview),Ot.uiEvent("mouseout",this.hidePreview),Ot.uiEvent("focus",this.showPreview,{capture:!0}),Ot.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(IS,{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=sD(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=sD(e,this.emojis);r&&this.events.emit("preview:show",r,n==null?void 0:n.cloneNode(!0))}hidePreview(e){sD(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}},uye=new Fn(({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>
|
|
`),MD=class extends Zv{constructor({category:e,showVariants:t,lazyLoader:n,emojiVersion:r}){super({category:e,showVariants:t,lazyLoader:n,template:uye}),this.showVariants=t,this.lazyLoader=n,this.emojiVersion=r}initialize(){this.uiElements=Re({},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(Bh,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:LS[this.category.key]})}},DD=class extends Bh{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(IS,{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)}}},hye=new Fn(({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"}),ND=class extends Zv{constructor({category:e,lazyLoader:t,provider:n}){super({category:e,showVariants:!1,lazyLoader:t,template:hye}),this.provider=n}initialize(){this.uiElements=Pt(Re({},this.baseUIElements),{recents:Ot.byClass(AD.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(DD,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:LS[this.category.key]}),this.el}},fye=new Fn(({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>
|
|
`),RD=class extends Zv{constructor({category:e,lazyLoader:t}){super({template:fye,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements=Re({},this.baseUIElements),super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Bh,{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:LS[this.category.key]})}},AS=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()})}},Xte=Ar("emojiArea"),pye=new Fn(({classes:i})=>`
|
|
<div class="${i.emojiArea}">
|
|
<div data-placeholder="emojis"></div>
|
|
</div>
|
|
`,{mode:"async"}),mye={recents:ND,custom:RD};function gye(i){return mye[i.key]||MD}function vye(i){return!i||i==="button"?{row:"first",offset:0}:i}var OD=class extends Ot{constructor({categoryTabs:e,categories:t,emojiVersion:n}){super({template:pye,classes:Xte}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new AS,this.categoryTabs=e,this.categories=t,this.emojiVersion=n,this.handleScroll=S4e(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:Ot.byClass(Xte.emojiArea)},this.uiEvents=[Ot.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=gye(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}=Re({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,vye(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)}},_ye=new Fn(({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>
|
|
`),Qte=Ar("error","iconContainer","title"),e_=class extends Ot{constructor({message:e,icon:t="warning",template:n=_ye,className:r}){super({template:n,classes:Qte}),this.message=e,this.icon=t,this.className=r}renderSync(){let e=[Qte.error,this.className].join(" ").trim();return super.renderSync({message:this.message,icon:this.icon,classList:e})}},bye=new Fn(({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>
|
|
`),yye=Ar("dataError"),PD=class extends e_{constructor({message:e}){super({message:e,template:bye,className:yye.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[Ot.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 lie(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}},qv=Ar("preview","previewEmoji","previewName","tagList","tag"),Cye=new Fn(({classes:i,tag:e})=>`
|
|
<li class="${i.tag}">${e}</li>
|
|
`),Sye=new Fn(({classes:i})=>`
|
|
<div class="${i.preview}">
|
|
<div class="${i.previewEmoji}"></div>
|
|
<div class="${i.previewName}"></div>
|
|
<ul class="${i.tagList}"></ul>
|
|
</div>
|
|
`),FD=class extends Ot{constructor(){super({template:Sye,classes:qv})}initialize(){this.uiElements={emoji:Ot.byClass(qv.previewEmoji),name:Ot.byClass(qv.previewName),tagList:Ot.byClass(qv.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(mm(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";let n=e.tags.map(r=>Cye.renderSync({tag:r,classes:qv}));mm(this.ui.tagList,...n)}}hidePreview(){vS(this.ui.emoji),vS(this.ui.name),vS(this.ui.tagList)}},wye=new Fn(({classes:i,i18n:e})=>`
|
|
<button title="${e.get("search.clear")}" class="${i.clearSearchButton}">
|
|
<i data-icon="xmark"></i>
|
|
</button>
|
|
`),xye=new Fn(({classes:i,i18n:e})=>`
|
|
<div class="${i.searchContainer}">
|
|
<input class="${i.searchField}" placeholder="${e.get("search")}">
|
|
<span class="${i.searchAccessory}"></span>
|
|
</div>
|
|
`,{mode:"async"}),Gv=Ar("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound"),HD=class extends Ot{constructor({categories:e,emojiVersion:t}){super({template:xye,classes:Gv}),this.categories=e.filter(n=>n.key!=="recents"),this.emojiVersion=t,this.search=w4e(this.search.bind(this),100)}initialize(){this.uiElements={searchField:Ot.byClass(Gv.searchField),searchAccessory:Ot.byClass(Gv.searchAccessory)},this.uiEvents=[Ot.childEvent("searchField","keydown",this.onKeyDown),Ot.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=cie("search"),this.notFoundMessage=this.viewFactory.create(e_,{message:this.i18n.get("search.notFound"),className:Gv.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(e_,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=wye.render({classes:Gv,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){mm(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 AS;this.resultsContainer=this.viewFactory.create(Bh,{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)}}},Eye=new Fn(({classes:i})=>`
|
|
<div class="${i.variantOverlay}">
|
|
<div class="${i.variantPopup}">
|
|
<div data-view="emojis" data-render="sync"></div>
|
|
</div>
|
|
</div>
|
|
`),Jte=Ar("variantOverlay","variantPopup"),cD={easing:"ease-in-out",duration:250,fill:"both"},Zte={opacity:[0,1]},eie={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]},BD=class extends Ot{constructor({emoji:e,parent:t}){super({template:Eye,classes:Jte,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new Jv,this.animateShow=()=>Promise.all([Ph(this.el,Zte,cD,this.options),Ph(this.ui.popup,eie,cD,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:Ot.byClass(Jte.variantPopup)},this.uiEvents=[Ot.uiEvent("click",this.handleClick),Ot.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){let e=Pt(Re({},cD),{direction:"reverse"});return Promise.all([Ph(this.el,Zte,e,this.options),Ph(this.ui.popup,eie,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=Pt(Re({},this.emoji),{skins:null}),t=(this.emoji.skins||[]).map(r=>Pt(Re({},r),{label:this.emoji.label,tags:this.emoji.tags})),n=[e,...t];return this.emojiContainer=this.viewFactory.create(Bh,{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)}},Tye=new Fn(({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>
|
|
`),dD=Ar("categoryTab","categoryTabActive","categoryButton"),zD=class extends Ot{constructor({category:e,icon:t}){super({template:Tye,classes:dD}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:Ot.byClass(dD.categoryButton)},this.uiEvents=[Ot.childEvent("button","click",this.selectCategory),Ot.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}=Re({changeFocusable:!0,performFocus:!0,scroll:!0},t);this.el.classList.toggle(dD.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})}},kye=new Fn(({classes:i})=>`
|
|
<div class="${i.categoryButtonsContainer}">
|
|
<ul role="tablist" class="${i.categoryButtons}">
|
|
<div data-placeholder="tabs"></div>
|
|
</ul>
|
|
</div>
|
|
`),Iye=Ar("categoryButtons","categoryButtonsContainer"),UD=class extends Ot{constructor({categories:e}){super({template:kye,classes:Iye}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[Ot.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(zD,{category:e,icon:LS[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})}}},Aye=[{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 Lye(){var i;let e=Aye.find(t=>Mye(t.emoji));return(i=e==null?void 0:e.version)!=null?i:1}function Mye(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 uD(i,e){return Array.from({length:i},()=>e).join("")}function Dye({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 Nye(i){let{classes:e,theme:t,className:n=""}=i;return`
|
|
<div class="picmo__picker ${e.picker} ${t} ${n}">
|
|
${Dye(i)}
|
|
<div class="${e.content}">
|
|
<div data-view="emojiArea"></div>
|
|
</div>
|
|
<div data-view="preview"></div>
|
|
</div>
|
|
`}function Rye(i){let{emojiCount:e,classes:t,theme:n,className:r,categoryCount:o}=i,s=({showSearch:d,classes:u})=>d?`
|
|
<div class="${u.searchSkeleton}">
|
|
<div class="${u.searchInput} ${u.placeholder}"></div>
|
|
</div>
|
|
`:"",a=({showCategoryTabs:d,classes:u})=>d?`
|
|
<div class="${u.categoryTabsSkeleton}">
|
|
${uD(o,`<div class="${u.placeholder} ${u.categoryTab}"></div>`)}
|
|
</div>
|
|
`:"",l=({showHeader:d,classes:u})=>d?`
|
|
<header class="${u.headerSkeleton}">
|
|
${s(i)}
|
|
${a(i)}
|
|
</header>
|
|
`:"",c=({showPreview:d,classes:u})=>d?`
|
|
<div class="${u.previewSkeleton}">
|
|
<div class="${u.placeholder} ${u.previewEmoji}"></div>
|
|
<div class="${u.placeholder} ${u.previewName}"></div>
|
|
<ul class="${u.tagList}">
|
|
${uD(3,`<li class="${u.placeholder} ${u.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}">
|
|
${uD(e,`<div class="${t.placeholder} ${t.emoji}"></div>`)}
|
|
</div>
|
|
</div>
|
|
${c(i)}
|
|
</div>
|
|
`}var Oye=new Fn(i=>i.isLoaded?Nye(i):Rye(i)),pS=Ar("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),mS={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"},WD=class extends Ot{constructor(){super({template:Oye,classes:pS}),this.pickerReady=!1,this.externalEvents=new ID,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(mS[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:Ot.byClass(pS.content),header:Ot.byClass(pS.header)},this.uiEvents=[Ot.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(FD)),this.options.showSearch&&(this.search=this.viewFactory.create(HD,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(UD,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(OD,{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(mS).forEach(e=>{this.options[e]&&this.el.style.setProperty(mS[e],this.options[e].toString())})}updateStyleProperty(e,t){this.el.style.setProperty(mS[e],t.toString())}reinitialize(){this.renderSync()}onError(e){let t=this.viewFactory.createWithOptions({data:!1},PD,{message:this.i18n.get("error.load")}),n=this.el.offsetHeight||375;throw this.el.style.height=`${n}px`,mm(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=Lye()||parseFloat(v4e):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 mm(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(pS.fullHeight,e!==this.emojiArea),mm(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(BD,{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)}},jD=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)}},wS,VD=class{constructor(e={}){Tc(this,wS,void 0),hD(this,wS,new Map(Object.entries(e)))}get(e,t=e){return kc(this,wS).get(e)||t}};wS=new WeakMap;function Pye(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 YD(){let i=!1;return function(e){sye.injectStyles&&!i&&(Pye(e),i=!0)}}var Fye=`.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 Hye(i){return lie(i.locale,i.dataStore,i.messages,i.emojiData)}var Bye=0,gS;function zye(){return`picmo-${Date.now()}-${Bye++}`}var Uye=YD();function uie(i){Uye(Fye);let e=$D(i),t=((e==null?void 0:e.custom)||[]).map(s=>Pt(Re({},s),{custom:!0,tags:["custom",...s.tags||[]]})),n=new kD;gS||(gS=Hye(e));let r=new VD(e.i18n);gS.then(s=>{n.emit("data:ready",s)}).catch(s=>{n.emit("error",s)});let o=new jD({events:n,i18n:r,customEmojis:t,renderer:e.renderer,options:e,emojiData:gS,pickerId:zye()}).create(WD);return o.renderSync(),o}function zh(i){return i.split("-")[0]}function gm(i){return i.split("-")[1]}function OS(i){return["top","bottom"].includes(zh(i))?"x":"y"}function Cie(i){return i==="y"?"height":"width"}function hie(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=OS(e),l=Cie(a),c=n[l]/2-r[l]/2,d=zh(e),u=a==="x",h;switch(d){case"top":h={x:o,y:n.y-r.height};break;case"bottom":h={x:o,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:s};break;case"left":h={x:n.x-r.width,y:s};break;default:h={x:n.x,y:n.y}}switch(gm(e)){case"start":h[a]-=c*(t&&u?-1:1);break;case"end":h[a]+=c*(t&&u?-1:1);break}return h}var Wye=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}=hie(l,n,a),u=n,h={},p=0;for(let m=0;m<o.length;m++){let{name:g,fn:b}=o[m],{x:S,y:k,data:N,reset:A}=await b({x:c,y:d,initialPlacement:n,placement:u,strategy:r,middlewareData:h,rects:l,platform:s,elements:{reference:i,floating:e}});if(c=S!=null?S:c,d=k!=null?k:d,h=Pt(Re({},h),{[g]:Re(Re({},h[g]),N)}),A&&p<=50){p++,typeof A=="object"&&(A.placement&&(u=A.placement),A.rects&&(l=A.rects===!0?await s.getElementRects({reference:i,floating:e,strategy:r}):A.rects),{x:c,y:d}=hie(l,u,a)),m=-1;continue}}return{x:c,y:d,placement:u,strategy:r,middlewareData:h}};function jye(i){return Re({top:0,right:0,bottom:0,left:0},i)}function Vye(i){return typeof i!="number"?jye(i):{top:i,right:i,bottom:i,left:i}}function MS(i){return Pt(Re({},i),{top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height})}async function ZD(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:u="floating",altBoundary:h=!1,padding:p=0}=e,m=Vye(p),g=a[h?u==="floating"?"reference":"floating":u],b=MS(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(g)))==null||t?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),S=MS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?Pt(Re({},s.floating),{x:n,y:r}):s.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),strategy:l}):s[u]);return{top:b.top-S.top+m.top,bottom:S.bottom-b.bottom+m.bottom,left:b.left-S.left+m.left,right:S.right-b.right+m.right}}var Kye=Math.min,qye=Math.max;function fie(i,e,t){return qye(i,Kye(e,t))}var Gye={left:"right",right:"left",bottom:"top",top:"bottom"};function DS(i){return i.replace(/left|right|bottom|top/g,e=>Gye[e])}function Sie(i,e,t){t===void 0&&(t=!1);let n=gm(i),r=OS(i),o=Cie(r),s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=DS(s)),{main:s,cross:DS(s)}}var $ye={start:"end",end:"start"};function XD(i){return i.replace(/start|end/g,e=>$ye[e])}var Yye=["top","right","bottom","left"],Xye=Yye.reduce((i,e)=>i.concat(e,e+"-start",e+"-end"),[]);function Qye(i,e,t){return(i?[...t.filter(n=>gm(n)===i),...t.filter(n=>gm(n)!==i)]:t.filter(n=>zh(n)===n)).filter(n=>i?gm(n)===i||(e?XD(n)!==n:!1):!0)}var Jye=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:u,platform:h,elements:p}=e,rt=i,{alignment:m=null,allowedPlacements:g=Xye,autoAlignment:b=!0}=rt,S=aa(rt,["alignment","allowedPlacements","autoAlignment"]),k=Qye(m,b,g),N=await ZD(e,S),A=(t=(n=d.autoPlacement)==null?void 0:n.index)!=null?t:0,H=k[A];if(H==null)return{};let{main:K,cross:W}=Sie(H,c,await(h.isRTL==null?void 0:h.isRTL(p.floating)));if(u!==H)return{x:a,y:l,reset:{placement:k[0]}};let re=[N[zh(H)],N[K],N[W]],ae=[...(r=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?r:[],{placement:H,overflows:re}],Ne=k[A+1];if(Ne)return{data:{index:A+1,overflows:ae},reset:{placement:Ne}};let he=ae.slice().sort((Nt,Z)=>Nt.overflows[0]-Z.overflows[0]),Xe=(s=he.find(Nt=>{let{overflows:Z}=Nt;return Z.every(ye=>ye<=0)}))==null?void 0:s.placement,st=Xe!=null?Xe:he[0].placement;return st!==u?{data:{index:A+1,overflows:ae},reset:{placement:st}}:{}}}};function Zye(i){let e=DS(i);return[XD(i),e,XD(e)]}var e2e=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,re=i,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",flipAlignment:p=!0}=re,m=aa(re,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),g=zh(n),b=u||(g===s||!p?[DS(s)]:Zye(s)),S=[s,...b],k=await ZD(e,m),N=[],A=((t=r.flip)==null?void 0:t.overflows)||[];if(c&&N.push(k[g]),d){let{main:ae,cross:Ne}=Sie(n,o,await(a.isRTL==null?void 0:a.isRTL(l.floating)));N.push(k[ae],k[Ne])}if(A=[...A,{placement:n,overflows:N}],!N.every(ae=>ae<=0)){var H,K;let ae=((H=(K=r.flip)==null?void 0:K.index)!=null?H:0)+1,Ne=S[ae];if(Ne)return{data:{index:ae,overflows:A},reset:{placement:Ne}};let he="bottom";switch(h){case"bestFit":{var W;let Xe=(W=A.map(st=>[st,st.overflows.filter(rt=>rt>0).reduce((rt,Nt)=>rt+Nt,0)]).sort((st,rt)=>st[1]-rt[1])[0])==null?void 0:W[0].placement;Xe&&(he=Xe);break}case"initialPlacement":he=s;break}if(n!==he)return{reset:{placement:he}}}return{}}}};async function t2e(i,e){let{placement:t,platform:n,elements:r}=i,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=zh(t),a=gm(t),l=OS(t)==="x",c=["left","top"].includes(s)?-1:1,d=o&&l?-1:1,u=typeof e=="function"?e(i):e,{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:Re({mainAxis:0,crossAxis:0,alignmentAxis:null},u);return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}var pie=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){let{x:t,y:n}=e,r=await t2e(e,i);return{x:t+r.x,y:n+r.y,data:r}}}};function i2e(i){return i==="x"?"y":"x"}var mie=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:n,placement:r}=e,b=i,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:k,y:N}=S;return{x:k,y:N}}}}=b,l=aa(b,["mainAxis","crossAxis","limiter"]),c={x:t,y:n},d=await ZD(e,l),u=OS(zh(r)),h=i2e(u),p=c[u],m=c[h];if(o){let S=u==="y"?"top":"left",k=u==="y"?"bottom":"right",N=p+d[S],A=p-d[k];p=fie(N,p,A)}if(s){let S=h==="y"?"top":"left",k=h==="y"?"bottom":"right",N=m+d[S],A=m-d[k];m=fie(N,m,A)}let g=a.fn(Pt(Re({},e),{[u]:p,[h]:m}));return Pt(Re({},g),{data:{x:g.x-t,y:g.y-n}})}}};function wie(i){return i&&i.document&&i.location&&i.alert&&i.setInterval}function Lc(i){if(i==null)return window;if(!wie(i)){let e=i.ownerDocument;return e&&e.defaultView||window}return i}function ul(i){return Lc(i).getComputedStyle(i)}function Ic(i){return wie(i)?"":i?(i.nodeName||"").toLowerCase():""}function xie(){let i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function hl(i){return i instanceof Lc(i).HTMLElement}function Vd(i){return i instanceof Lc(i).Element}function n2e(i){return i instanceof Lc(i).Node}function vm(i){if(typeof ShadowRoot>"u")return!1;let e=Lc(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function PS(i){let{overflow:e,overflowX:t,overflowY:n}=ul(i);return/auto|scroll|overlay|hidden/.test(e+n+t)}function r2e(i){return["table","td","th"].includes(Ic(i))}function Eie(i){let e=/firefox/i.test(xie()),t=ul(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 Tie(){return!/^((?!chrome|android).)*safari/i.test(xie())}var gie=Math.min,t_=Math.max,NS=Math.round;function Ac(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&&hl(i)&&(l=i.offsetWidth>0&&NS(a.width)/i.offsetWidth||1,c=i.offsetHeight>0&&NS(a.height)/i.offsetHeight||1);let d=Vd(i)?Lc(i):window,u=!Tie()&&t,h=(a.left+(u&&(n=(r=d.visualViewport)==null?void 0:r.offsetLeft)!=null?n:0))/l,p=(a.top+(u&&(o=(s=d.visualViewport)==null?void 0:s.offsetTop)!=null?o:0))/c,m=a.width/l,g=a.height/c;return{width:m,height:g,top:p,right:h+m,bottom:p+g,left:h,x:h,y:p}}function Kd(i){return((n2e(i)?i.ownerDocument:i.document)||window.document).documentElement}function FS(i){return Vd(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function kie(i){return Ac(Kd(i)).left+FS(i).scrollLeft}function o2e(i){let e=Ac(i);return NS(e.width)!==i.offsetWidth||NS(e.height)!==i.offsetHeight}function s2e(i,e,t){let n=hl(e),r=Kd(e),o=Ac(i,n&&o2e(e),t==="fixed"),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(n||!n&&t!=="fixed")if((Ic(e)!=="body"||PS(r))&&(s=FS(e)),hl(e)){let l=Ac(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else r&&(a.x=kie(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Iie(i){return Ic(i)==="html"?i:i.assignedSlot||i.parentNode||(vm(i)?i.host:null)||Kd(i)}function vie(i){return!hl(i)||ul(i).position==="fixed"?null:a2e(i)}function a2e(i){let{offsetParent:e}=i,t=i,n=!1;for(;t&&t!==e;){let{assignedSlot:r}=t;if(r){let o=r.offsetParent;if(ul(r).display==="contents"){let s=r.hasAttribute("style"),a=r.style.display;r.style.display=ul(t).display,o=r.offsetParent,r.style.display=a,s||r.removeAttribute("style")}t=r,e!==o&&(e=o,n=!0)}else if(vm(t)&&t.host&&n)break;t=vm(t)&&t.host||t.parentNode}return e}function l2e(i){let e=Iie(i);for(vm(e)&&(e=e.host);hl(e)&&!["html","body"].includes(Ic(e));){if(Eie(e))return e;{let t=e.parentNode;e=vm(t)?t.host:t}}return null}function QD(i){let e=Lc(i),t=vie(i);for(;t&&r2e(t)&&ul(t).position==="static";)t=vie(t);return t&&(Ic(t)==="html"||Ic(t)==="body"&&ul(t).position==="static"&&!Eie(t))?e:t||l2e(i)||e}function _ie(i){if(hl(i))return{width:i.offsetWidth,height:i.offsetHeight};let e=Ac(i);return{width:e.width,height:e.height}}function c2e(i){let{rect:e,offsetParent:t,strategy:n}=i,r=hl(t),o=Kd(t);if(t===o)return e;let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if((r||!r&&n!=="fixed")&&((Ic(t)!=="body"||PS(o))&&(s=FS(t)),hl(t))){let l=Ac(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}return Pt(Re({},e),{x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y})}function d2e(i,e){let t=Lc(i),n=Kd(i),r=t.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;let c=Tie();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a,y:l}}function u2e(i){var e;let t=Kd(i),n=FS(i),r=(e=i.ownerDocument)==null?void 0:e.body,o=t_(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=t_(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+kie(i),l=-n.scrollTop;return ul(r||t).direction==="rtl"&&(a+=t_(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Aie(i){let e=Iie(i);return["html","body","#document"].includes(Ic(e))?i.ownerDocument.body:hl(e)&&PS(e)?e:Aie(e)}function RS(i,e){var t;e===void 0&&(e=[]);let n=Aie(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),o=Lc(n),s=r?[o].concat(o.visualViewport||[],PS(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(RS(s))}function h2e(i,e){let t=e.getRootNode==null?void 0:e.getRootNode();if(i.contains(e))return!0;if(t&&vm(t)){let n=e;do{if(n&&i===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function f2e(i,e){let t=Ac(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 bie(i,e,t){return e==="viewport"?MS(d2e(i,t)):Vd(e)?f2e(e,t):MS(u2e(Kd(i)))}function p2e(i){let e=RS(i),t=["absolute","fixed"].includes(ul(i).position)&&hl(i)?QD(i):i;return Vd(t)?e.filter(n=>Vd(n)&&h2e(n,t)&&Ic(n)!=="body"):[]}function m2e(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i,o=[...t==="clippingAncestors"?p2e(e):[].concat(t),n],s=o[0],a=o.reduce((l,c)=>{let d=bie(e,c,r);return l.top=t_(d.top,l.top),l.right=gie(d.right,l.right),l.bottom=gie(d.bottom,l.bottom),l.left=t_(d.left,l.left),l},bie(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}var g2e={getClippingRect:m2e,convertOffsetParentRelativeRectToViewportRelativeRect:c2e,isElement:Vd,getDimensions:_ie,getOffsetParent:QD,getDocumentElement:Kd,getElementRects:i=>{let{reference:e,floating:t,strategy:n}=i;return{reference:s2e(e,QD(t),n),floating:Pt(Re({},_ie(t)),{x:0,y:0})}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>ul(i).direction==="rtl"};function v2e(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?[...Vd(i)?RS(i):[],...RS(e)]:[];d.forEach(g=>{l&&g.addEventListener("scroll",t,{passive:!0}),c&&g.addEventListener("resize",t)});let u=null;if(s){let g=!0;u=new ResizeObserver(()=>{g||t(),g=!1}),Vd(i)&&!a&&u.observe(i),u.observe(e)}let h,p=a?Ac(i):null;a&&m();function m(){let g=Ac(i);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&t(),p=g,h=requestAnimationFrame(m)}return t(),()=>{var g;d.forEach(b=>{l&&b.removeEventListener("scroll",t),c&&b.removeEventListener("resize",t)}),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(h)}}var _2e=(i,e,t)=>Wye(i,e,Re({platform:g2e},t));async function b2e(i,e,t,n){if(!n)throw new Error("Must provide a positioning option");return await(typeof n=="string"?y2e(i,e,t,n):C2e(e,n))}async function y2e(i,e,t,n){if(!t)throw new Error("Reference element is required for relative positioning");let r;return n==="auto"?r={middleware:[Jye(),mie(),pie({mainAxis:5,crossAxis:12})]}:r={placement:n,middleware:[e2e(),mie(),pie(5)]},v2e(t,e,async()=>{if((!t.isConnected||!t.offsetParent)&&S2e(i))return;let{x:o,y:s}=await _2e(t,e,r);Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${s}px`})})}function C2e(i,e){return i.style.position="fixed",Object.entries(e).forEach(([t,n])=>{i.style[t]=n}),()=>{}}function S2e(i){switch(i.options.onPositionLost){case"close":return i.close(),!0;case"destroy":return i.destroy(),!0;case"hold":return!0}}var w2e={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function x2e(i={}){return Re(Pt(Re({},w2e),{rootElement:document.body}),i)}var E2e='<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>',yie=Ar("popupContainer","closeButton"),JD=class{constructor(e,t){this.isOpen=!1,this.externalEvents=new Hh,this.options=Re(Re({},x2e(t)),$D(e)),this.popupEl=document.createElement("div"),this.popupEl.classList.add(yie.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(yie.closeButton),this.closeButton.innerHTML=E2e,this.closeButton.addEventListener("click",()=>{this.close()}),this.popupEl.appendChild(this.closeButton));let n=document.createElement("div");this.popupEl.appendChild(n),this.picker=uie(Pt(Re({},this.options),{rootElement:n})),this.focusTrap=new Jv,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 b2e(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 Ph(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 Ph(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()}},T2e=`.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}
|
|
`,k2e=YD();function Lie(i,e){return k2e(T2e),new JD(Re({autoFocus:"auto"},i),e)}var I2e={mounted(){let i=this.el.querySelector("[data-emoji-button]"),e=this.el.querySelector("[data-emoji-preview]"),t=this.el.querySelector("[data-emoji-input]"),n=Lie({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()})}},Mie=I2e;var A2e={mounted(){this.focus()},updated(){this.el!==document.activeElement&&this.focus()},focus(){Bd(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}},Die=A2e;var L2e={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=bn.subscribe("navigation",i=>{this.handleNavigationEvent(i)})},updated(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed(){this.unsubscribeFromNavigationEvents()},getProps(){return{focusableId:vt(this.el,"data-focusable-id"),onValueChange:vt(this.el,"data-on-value-change"),metadata:vt(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(),Nie(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&&zd(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(),Nie(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 Nie(i){let e=document.createRange();e.selectNodeContents(i),e.collapse(!1);let t=window.getSelection();t.removeAllRanges(),t.addRange(e)}var Rie=L2e;var M2e={mounted(){this.props=this.getProps(),this.sourceEl=Sc(this.el,"[data-source]"),this.targetEl=Sc(this.el,"[data-target]"),this.updateDOM()},updated(){this.props=this.getProps(),this.updateDOM()},getProps(){return{language:vt(this.el,"data-language")}},updateDOM(){let i=this.sourceEl.innerText;Jp(i,this.props.language).then(e=>{this.targetEl.innerHTML=e,this.el.setAttribute("data-highlighted","")})}},Oie=M2e;var eN=["bg-yellow-100","border-yellow-300"],D2e={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.updateImagePreview(),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(...eN)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...eN)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...eN)}),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(),this.updateImagePreview()},getProps(){return{id:vt(this.el,"data-id"),phxTarget:vt(this.el,"data-phx-target",uo),height:_i(this.el,"data-height",null,uo),width:_i(this.el,"data-width",null,uo),format:vt(this.el,"data-format"),fit:vt(this.el,"data-fit"),imageUrl:_i(this.el,"data-image-url",null),valueHeight:_i(this.el,"data-value-height",null,uo),valueWidth:_i(this.el,"data-value-width",null,uo)}},updateImagePreview(){this.props.imageUrl?O2e(this.props.imageUrl,this.props.valueHeight,this.props.valueWidth,this.props.format).then(i=>{this.setPreview(i)}):this.setPreview(this.initialPreviewContentEl)},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){N2e(i,this.props.format).then(e=>{let t={height:i.height,width:i.width},n=new Blob([e]);n.meta=()=>t,this.uploadTo(this.props.phxTarget,"file",[n])})},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),u=Math.round(t*c);o.width=d,o.height=u,s.drawImage(i,0,0,e,t,0,0,d,u)}else if(this.props.fit==="crop"){let a=n/e,l=r/t,c=Math.max(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=n,o.height=r,s.drawImage(i,Math.round((d-n)/c/2),Math.round((u-r)/c/2),e-Math.round((d-n)/c),t-Math.round((u-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),u=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-u)/2),d,u)}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 N2e(i,e){if(e==="png"||e==="jpeg")return new Promise((t,n)=>{i.toBlob(r=>{r.arrayBuffer().then(o=>{t(o)})},`image/${e}`)});if(e==="rgb"){let t=i.getContext("2d").getImageData(0,0,i.width,i.height),n=R2e(t);return Promise.resolve(n)}throw new Error(`Unexpected format: ${e}`)}function R2e(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 O2e(i,e,t,n){if(n==="png"||n==="jpeg"){let r=document.createElement("img");return r.src=i,Promise.resolve(r)}if(n==="rgb")return fetch(i).then(r=>r.arrayBuffer()).then(r=>{let o=document.createElement("canvas");o.height=e,o.width=t;let s=P2e(r,t,e);return o.getContext("2d").putImageData(s,0,0),o});throw new Error(`Unexpected format: ${n}`)}function P2e(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 Pie=D2e;var F2e={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=UQ(t),r=new DataView(n),o=r.getUint32(0,!1),s=r.getUint32(4,!1),a=r.getUint8(8),l=n.slice(9),c=H2e(l,s,o,a),d=document.createElement("canvas");d.height=o,d.width=s,d.getContext("2d").putImageData(c,0,0);let u=d.toDataURL("image/png");this.el.src=u}}};function H2e(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 Fie=F2e;var B2e=document.querySelector("meta[name='csrf-token']").getAttribute("content"),tN=new Mb(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:B2e}}),Uh=null;function Hie(i){return Uh||(tN.connect(),Uh=tN.channel("js_view",{session_token:i}),Uh.join()),Uh}function Bie(){Uh&&(Uh.leave(),Uh=null,tN.disconnect())}function zie(i,e){if(Array.isArray(e)&&e[1]&&e[1].constructor===ArrayBuffer){let[t,n]=e;return nH([i,t],n)}else return{root:[i,e]}}function iN(i){if(i.constructor===ArrayBuffer){let[[e,t],n]=rH(i);return[e,[t,n]]}else{let{root:[e,t]}=i;return[e,t]}}var Uie="wcqj5QWCo66osdAWDnEgPRFyL7nfe8oNqNggnw4vvW8=";function Wie(i,e,t){let n=z2e(e,t);return U2e(n).then(()=>{i.sandbox="allow-scripts allow-same-origin allow-downloads allow-forms allow-modals allow-popups allow-top-navigation",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 z2e(i,e){let t=window.location.protocol;return e?e.replace(/^https?:/,t):t==="https:"?"https://livebookusercontent.com/iframe/v5.html":`http://${window.location.hostname}:${i}/iframe/v5.html`}var nN=null;function U2e(i){return nN||(nN=fetch(i).then(e=>e.text()).then(e=>{if(BQ(e)!==Uie)throw new Error(`The iframe loaded from ${i} doesn't have the expected checksum ${Uie}`)})),nN}var W2e={mounted(){this.props=this.getProps(),this.id=w9(),this.childToken=FQ(),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout(()=>this.handleInitTimeout(),2e3),this.channel=Hie(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]=iN(r);this.handleServerInit(o)}),e=this.channel.on(`event:${this.props.ref}`,r=>{let[[o],s]=iN(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=bn.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=bn.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:vt(this.el,"data-ref"),assetsBasePath:vt(this.el,"data-assets-base-path"),assetsCdnUrl:_i(this.el,"data-assets-cdn-url",null),jsPath:vt(this.el,"data-js-path"),sessionToken:vt(this.el,"data-session-token"),connectToken:vt(this.el,"data-connect-token"),iframePort:vt(this.el,"data-iframe-local-port",uo),iframeUrl:_i(this.el,"data-iframe-url",null),timeoutMessage:vt(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=bn.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)=>{FL(this.iframePlaceholder)?a():(r=new IntersectionObserver(c=>{FL(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(Zp(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]");Wie(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=zie([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}):i.type==="setSmartCellEditorIntellisenseNode"&&this.pushEvent("set_smart_cell_editor_intellisense_node",{js_view_ref:this.props.ref,node:i.node,cookie:i.cookie})}},getAssetsBaseUrl(){return HS().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 HS(){return HS.promise=HS.promise||fetch("/public/health").then(i=>i.status===200).catch(i=>!1),HS.promise}var jie=W2e;var j2e={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{cellId:vt(this.el,"data-cell-id"),defaultHandlers:vt(this.el,"data-default-handlers"),isKeydownEnabled:vt(this.el,"data-keydown-enabled",Ol),isKeyupEnabled:vt(this.el,"data-keyup-enabled",Ol),target:vt(this.el,"data-target")}},handleDocumentKeyDown(i){if(this.isKeyboardToggle(i)&&!Bd(document.activeElement)){dl(i),this.keyboardEnabled()?this.disableKeyboard():this.enableKeyboard();return}if(this.keyboardEnabled()){if(this.props.defaultHandlers!=="on"&&dl(i),i.repeat)return;if(this.props.isKeydownEnabled){let{key:e}=i;this.pushEventTo(this.props.target,"keydown",{key:e})}}},handleDocumentKeyUp(i){if(this.keyboardEnabled()&&(this.props.defaultHandlers!=="on"&&dl(i),this.props.isKeyupEnabled)){let{key:e}=i;this.pushEventTo(this.props.target,"keyup",{key:e})}},handleDocumentFocus(i){this.props.isKeydownEnabled&&Bd(i.target)&&this.disableKeyboard()},enableKeyboard(){this.keyboardEnabled()||this.pushEventTo(this.props.target,"enable_keyboard",{})},disableKeyboard(){this.keyboardEnabled()&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled(){return this.props.isKeydownEnabled||this.props.isKeyupEnabled},isKeyboardToggle(i){if(i.repeat)return!1;let{metaKey:e,ctrlKey:t,key:n}=i;return(S9()?e:t)&&n==="k"&&this.isCellFocused()?!this.keyboardEnabled()||["on","disable_only"].includes(this.props.defaultHandlers):!1},isCellFocused(){let i=this.el.closest("[data-el-session]");return i&&i.getAttribute("data-js-focused-id")===this.props.cellId}},Vie=j2e;var V2e={mounted(){this.props=this.getProps(),this.templateEl=Sc(this.el,"[data-template]"),this.contentEl=Sc(this.el,"[data-content]"),this.markdown=new k9(this.contentEl,this.templateEl.textContent,{baseUrl:this.props.basePath,allowedUriSchemes:this.props.allowedUriSchemes.split(",")})},updated(){this.props=this.getProps(),this.markdown.setContent(this.templateEl.textContent)},getProps(){return{basePath:vt(this.el,"data-base-path"),allowedUriSchemes:vt(this.el,"data-allowed-uri-schemes")}}},Kie=V2e;var K2e={mounted(){this.scroll()},updated(){this.scroll()},scroll(){Sv(this.el)}},qie=K2e;var rN=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}},Gie=rN;var q2e={mounted(){this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.view=null,this.viewOptions=null,this.keyBuffer=new Gie,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,E9(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()),this.initializeDragAndDrop(),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=bn.subscribe("session",i=>{this.handleSessionEvent(i)})},updated(){let i=this.props;this.props=this.getProps(),this.props.globalStatus!==i.globalStatus&&E9(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),E9("favicon"),this.keepChannel||Bie()},getProps(){return{autofocusCellId:_i(this.el,"data-autofocus-cell-id",null),globalStatus:_i(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=S9()?i.metaKey:i.ctrlKey,t=i.altKey,n=i.shiftKey,r=i.key,o=this.keyBuffer;if(!(Bd(i.target)&&i.target.closest("[data-el-outputs-container]"))){if(e&&n&&!t&&r==="Enter"){dl(i),this.queueFullCellsEvaluation(!0);return}else if(!e&&n&&!t&&r==="Enter"){dl(i),Lh(this.focusedCellType())&&this.queueFocusedCellEvaluation(),this.moveFocus(1);return}else if(e&&!t&&r==="Enter"){dl(i),Lh(this.focusedCellType())&&this.queueFocusedCellEvaluation();return}else if(e&&r==="s"){dl(i),this.saveNotebook();return}else if(e||t)return}this.insertMode?(o.reset(),r==="Escape"&&(this.escapesMonacoWidget(i)||this.escapeInsertMode())):Bd(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"])?Lh(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"?(dl(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.view||this.viewOptions.showMarkdown)&&this.insertCellBelowFocused("markdown"):o.tryMatch(["M"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellAboveFocused("markdown"):o.tryMatch(["v","z"])?this.toggleView("code-zen"):o.tryMatch(["v","p"])?this.toggleView("presentation"):o.tryMatch(["v","c"])?this.toggleView("custom"):o.tryMatch(["c"])?(!this.view||this.viewOptions.showSection)&&this.toggleCollapseSection():o.tryMatch(["C"])&&(!this.view||this.viewOptions.showSection)&&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||["insert","visual"].includes(e.dataset.vimMode)):!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","")}},initializeDragAndDrop(){let i=!1,e=null,t=null,n=(o=null)=>{if(!i){i=!0,e=o;let s=o?"internal":"external";this.el.setAttribute("data-js-dragging",s),s==="external"&&this.toggleFilesList(!0)}},r=()=>{i&&(i=!1,this.el.removeAttribute("data-js-dragging"))};this.el.addEventListener("dragstart",o=>{n(o.target)}),this.el.addEventListener("dragenter",o=>{n()}),this.el.addEventListener("dragleave",o=>{this.el.contains(o.relatedTarget)||r()}),this.el.addEventListener("dragover",o=>{o.stopPropagation(),o.preventDefault()}),this.el.addEventListener("drop",o=>{o.stopPropagation(),o.preventDefault();let s=o.target.closest("[data-el-insert-drop-area]"),a=o.target.closest("[data-el-files-drop-area]");if(s){let l=s.getAttribute("data-section-id")||null,c=s.getAttribute("data-cell-id")||null;if(o.dataTransfer.files.length>0)t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{section_id:l,cell_id:c});else if(e&&e.matches("[data-el-file-entry]")){let d=e.getAttribute("data-name");this.pushEvent("insert_file",{file_entry_name:d,section_id:l,cell_id:c})}}else a&&o.dataTransfer.files.length>0&&(t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{}));r()}),this.handleEvent("finish_file_drop",o=>{let s=document.querySelector('#add-file-entry-modal input[type="file"]');s&&(s.files=t,s.dispatchEvent(new Event("change",{bubbles:!0})))})},toggleSectionsList(i=null){this.toggleSidePanelContent("sections-list",i)},toggleClientsList(i=null){this.toggleSidePanelContent("clients-list",i)},toggleSecretsList(i=null){this.toggleSidePanelContent("secrets-list",i)},toggleAppInfo(i=null){this.toggleSidePanelContent("app-info",i)},toggleFilesList(i=null){this.toggleSidePanelContent("files-list",i)},toggleRuntimeInfo(i=null){this.toggleSidePanelContent("runtime-info",i)},toggleSidePanelContent(i,e=null){(e===null?this.el.getAttribute("data-js-side-panel-content")!==i:e)?this.el.setAttribute("data-js-side-panel-content",i):this.el.removeAttribute("data-js-side-panel-content")},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){Lh(this.focusedCellType())?bn.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?this.el.setAttribute("data-js-focused-id",i):this.el.removeAttribute("data-js-focused-id"),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})}bn.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})),bn.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){i===this.view?(this.unsetView(),i==="custom"&&this.unsubscribeCustomViewFromSettings()):i==="code-zen"?this.setView(i,{showSection:!1,showMarkdown:!1,showOutput:!0,spotlight:!1}):i==="presentation"?this.setView(i,{showSection:!0,showMarkdown:!0,showOutput:!0,spotlight:!0}):i==="custom"&&(this.unsubscribeCustomViewFromSettings=en.getAndSubscribe(t=>{this.setView(i,{showSection:t.custom_view_show_section,showMarkdown:t.custom_view_show_markdown,showOutput:t.custom_view_show_output,spotlight:t.custom_view_spotlight})}),this.pushEvent("open_custom_view_settings"));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"})}},setView(i,e){this.view=i,this.viewOptions=e,this.el.setAttribute("data-js-view",i),this.el.toggleAttribute("data-js-hide-section",!e.showSection),this.el.toggleAttribute("data-js-hide-markdown",!e.showMarkdown),this.el.toggleAttribute("data-js-hide-output",!e.showOutput),this.el.toggleAttribute("data-js-spotlight",e.spotlight)},unsetView(){this.view=null,this.viewOptions=null,this.el.removeAttribute("data-js-view"),this.el.removeAttribute("data-js-hide-section"),this.el.removeAttribute("data-js-hide-markdown"),this.el.removeAttribute("data-js-hide-output"),this.el.removeAttribute("data-js-spotlight")},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),YQ(this.focusedCellType())&&this.setInsertMode(!0)},handleCellDeleted(i,e){if(this.focusedId===i)if(this.view){let t=this.ensureVisibleFocusableEl(e);this.setFocusedEl(t)}else this.setFocusedEl(e)},handleCellRestored(i){this.setFocusedEl(i)},handleCellMoved(i){this.repositionJSViews(),this.focusedId===i&&bn.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),NQ(document.activeElement)},handleSectionDeleted(i){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved(i){this.repositionJSViews();let e=this.getSectionById(i);zd(e)},handleCellUpload(i,e){this.focusedId!==i&&this.setFocusedEl(i),this.insertMode||this.setInsertMode(!0),bn.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){bn.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(){bn.broadcast("js_views",{type:"reposition"})},broadcastLocationReport(i,e){bn.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 ii.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(PL);return r?r.getAttribute("data-focusable-id"):t[0]}else{let r=MQ(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=>!Zp(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=>!Zp(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}]`)}},$ie=q2e;var G2e={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`}},Yie=G2e;var $2e=100,Y2e={mounted(){this.props=this.getProps(),this.interval=setInterval(()=>this.updateDOM(),$2e)},updated(){this.props=this.getProps(),this.updateDOM()},destroyed(){clearInterval(this.interval)},getProps(){return{start:vt(this.el,"data-start")}},updateDOM(){let e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML=`${e.toFixed(1)}s`}},Xie=Y2e;var Qie="lb:user_data";function Jie(i){let e=JSON.stringify(i),t=OQ(e);Q2e(Qie,t,15768e4)}function Zie(){let i=X2e(Qie);if(i){let e=PQ(i);return JSON.parse(e)}else return null}function X2e(i){let e=document.cookie.split("; ").find(t=>t.startsWith(`${i}=`));return e?e.replace(`${i}=`,""):null}function Q2e(i,e,t){let n=`${i}=${e};max-age=${t};path=/${T9()}`;document.cookie=n}var J2e={mounted(){this.el.addEventListener("submit",i=>{let e=this.el.user_form_name.value,t=this.el.user_form_hex_color.value;Jie({name:e,hex_color:t})})}},ene=J2e;var Z2e={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:_i(this.el,"data-utc-value",null),utcMin:_i(this.el,"data-utc-min",null),utcMax:_i(this.el,"data-utc-max",null),phxTarget:vt(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}`}},tne=Z2e;var eCe={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:_i(this.el,"data-utc-value",null),utcMin:_i(this.el,"data-utc-min",null),utcMax:_i(this.el,"data-utc-max",null),phxTarget:vt(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}`}},ine=eCe;var one=Hi(rne());var tCe={mounted(){this.props=this.getProps(),this.lineHeight=DQ(this.el),this.templateEl=Sc(this.el,"[data-template]"),this.contentEl=Sc(this.el,"[data-content]"),this.capLines();let i=this.hyperListConfig();this.virtualizedList=new one.default(this.contentEl,i),this.props.follow&&Sv(this.contentEl)},updated(){this.props=this.getProps(),this.capLines();let i=this.props.follow&&RQ(this.contentEl),e=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,e),i&&Sv(this.contentEl)},getProps(){return{maxHeight:vt(this.el,"data-max-height",uo),follow:_i(this.el,"data-follow",!1,Ol),maxLines:_i(this.el,"data-max-lines",null,uo),ignoreTrailingEmptyLine:_i(this.el,"data-ignore-trailing-empty-line",!1,Ol)}},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="...")}}},sne=tCe;var iCe={mounted(){let i=en.get(),e=this.el.querySelector('[name="show_section"][value="true"]'),t=this.el.querySelector('[name="show_markdown"][value="true"]'),n=this.el.querySelector('[name="show_output"][value="true"]'),r=this.el.querySelector('[name="spotlight"][value="true"]');e.checked=i.custom_view_show_section,t.checked=i.custom_view_show_markdown,n.checked=i.custom_view_show_output,r.checked=i.custom_view_spotlight,e.addEventListener("change",o=>{en.update({custom_view_show_section:o.target.checked})}),t.addEventListener("change",o=>{en.update({custom_view_show_markdown:o.target.checked})}),n.addEventListener("change",o=>{en.update({custom_view_show_output:o.target.checked})}),r.addEventListener("change",o=>{en.update({custom_view_spotlight:o.target.checked})})}},ane=iCe;var lne={AppAuth:tH,AudioInput:oH,Cell:XQ,CellEditor:jte,Dropzone:Vte,EditorSettings:Kte,EmojiPicker:Mie,FocusOnUpdate:Die,Headline:Rie,Highlight:Oie,ImageInput:Pie,ImageOutput:Fie,JSView:jie,KeyboardControl:Vie,MarkdownRenderer:Kie,ScrollOnUpdate:qie,Session:$ie,TextareaAutosize:Yie,Timer:Xie,UserForm:ene,UtcDateTimeInput:tne,UtcTimeInput:ine,VirtualizedLines:sne,CustomViewSettings:ane};var cne={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 zS=Hi(une());function hne(){zS.default.config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",()=>{zS.default.show(500)}),window.addEventListener("phx:page-loading-stop",()=>{zS.default.hide()})}function fne(){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 pne(){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 sN="confirm-opted-out-ids";function mne(){return hu(sN)||[]}function gne(){window.addEventListener("phx:add_confirm_opt_out_id",i=>{let e=hu(sN)||[],t=i.detail.opt_out_id;e.push(t),wf(sN,e)})}function nCe(){let i=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e=new XF(window.LIVEBOOK_BASE_URL_PATH+"/live",Mb,{params:t=>({_csrf_token:i,user_data:Zie(),app_auth_token:eH(),confirm_opt_out_ids:mne()}),hooks:lne,dom:cne});hne(),fne(),gne(),pne(),en.getAndSubscribe(t=>{document.body.setAttribute("data-editor-theme",t.editor_theme)}),e.connect(),window.liveSocket=e}if(rCe())nCe();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 rCe(){return document.cookie=`lb:probe_cookie=;path=/${T9()}`,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
|
|
*)
|
|
|
|
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
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.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/abap/abap.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/apex/apex.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/azcli/azcli.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/bat/bat.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/bicep/bicep.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/cameligo/cameligo.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/clojure/clojure.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/coffee/coffee.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/cpp/cpp.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/csharp/csharp.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/csp/csp.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/cypher/cypher.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/dart/dart.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/ecl/ecl.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/flow9/flow9.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/fsharp/fsharp.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/freemarker2/freemarker2.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/go/go.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/graphql/graphql.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/handlebars/handlebars.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/hcl/hcl.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/ini/ini.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/java/java.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/julia/julia.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/kotlin/kotlin.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/less/less.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/lexon/lexon.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/lua/lua.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/liquid/liquid.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/m3/m3.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/mips/mips.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/msdax/msdax.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/mysql/mysql.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/objective-c/objective-c.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/pascal/pascal.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/pascaligo/pascaligo.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/perl/perl.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/pgsql/pgsql.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/php/php.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/pla/pla.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/postiats/postiats.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/powerquery/powerquery.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/powershell/powershell.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/protobuf/protobuf.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/pug/pug.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/python/python.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/qsharp/qsharp.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/r/r.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/razor/razor.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/redis/redis.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/redshift/redshift.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/restructuredtext/restructuredtext.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/ruby/ruby.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/rust/rust.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/sb/sb.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/scala/scala.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/scheme/scheme.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/scss/scss.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/shell/shell.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/solidity/solidity.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/sophia/sophia.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/sparql/sparql.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/st/st.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/swift/swift.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/systemverilog/systemverilog.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/tcl/tcl.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/twig/twig.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/typescript/typescript.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/vb/vb.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/wgsl/wgsl.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/yaml/yaml.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/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/language/css/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/language/html/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
|
|
*-----------------------------------------------------------------------------*)
|
|
|
|
topbar/topbar.min.js:
|
|
(**
|
|
* @license MIT
|
|
* topbar 2.0.0, 2023-02-04
|
|
* http://buunguyen.github.io/topbar
|
|
* Copyright (c) 2021 Buu Nguyen
|
|
*)
|
|
*/
|