a
    ;@b                     @   s  d Z ddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ g dZdedd	d
ddd d Z dedd	d
ddddddd
 d Z!e d e! d Z"e#dZ$G dd de
Z%G dd de%Z&G dd de
Z'G dd de
Z(G d d! d!e
Z)G d"d# d#e
Z*G d$d% d%e
Z+G d&d' d'e
Z,G d(d) d)e
Z-G d*d+ d+e
Z.G d,d- d-e
Z/G d.d/ d/e	Z0dS )0z
    pygments.lexers.javascript
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for JavaScript and related languages.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)bygroupscombineddefaultdo_insertionsincludeinheritLexer
RegexLexerthisusingwords)
TextCommentOperatorKeywordNameStringNumberPunctuationOtherGeneric)get_bool_opt)JavascriptLexerKalLexerLiveScriptLexer	DartLexerTypeScriptLexer
LassoLexerObjectiveJLexerCoffeeScriptLexer	MaskLexerEarlGreyLexerJuttleLexerNodeConsoleLexerz(?:[$_ZLuZLlZLtZLmZLoZNlz]|\\u[a-fA-F0-9]{4})z(?:[$ZMnZMcZNdZPcu   ‌‍]|\\u[a-fA-F0-9]{4})z(?:z)*z.*?
c                   @   s  e Zd ZdZdZddgZg dZg dZej	ej
B ejB Zdefdefd	ejfd
ejfgeddejdfdedfedgdedfgdejfdedfeddejfdejfdejfdejfdejfdefdedfdedfdefdejdfdej fdedfd ej!dfd!ej fd"ej"fd#e#j$fd$e#j%fd%e&eedfd&e#j'dfe(e#j'fd'ej)fd(ejfd)ej*d*fgd)ej*dfd+ej*fd,ej+d-fd.ej*fd/ej*fgd0ej+dfed1gd2Z,d3S )4r   z%
    For JavaScript source code.
    Z
JavaScriptZ
javascriptZjs)z*.jsz*.jsmz*.mjsz*.cjs)zapplication/javascriptzapplication/x-javascriptztext/x-javascriptztext/javascript\s+<!--//.*?\n	/\*.*?\*/commentsandwhitespace7/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gimuysd]+\b|\B)#pop(?=/)r*   badregex\nz\A#! ?/.*?\n^(?=\s|/|<!--)slashstartsregexz0[bB][01]+n?z0[oO]?[0-7]+n?z0[xX][0-9a-fA-F]+n?z[0-9]+nz2(\.[0-9]+|[0-9]+\.[0-9]*|[0-9]+)([eE][-+]?[0-9]+)?z	\.\.\.|=>zP\+\+|--|~|\?\?=?|\?|:|\\(?=\n)|(<<|>>>?|==?|!=?|(?:\*\*|\|\||&&|[-<>+*%&|^/]))=?[{(\[;,][})\].]z((typeof|instanceof|in|void|delete|new)\bz\b(constructor|from|as)\bz(for|in|while|do|break|return|continue|switch|case|default|if|else|throw|try|catch|finally|yield|await|async|this|of|static|export|import|debugger|extends|super)\bz%(var|let|const|with|function|class)\bz(abstract|boolean|byte|char|double|enum|final|float|goto|implements|int|interface|long|native|package|private|protected|public|short|synchronized|throws|transient|volatile)\b*(true|false|null|NaN|Infinity|undefined)\ba  (Array|Boolean|Date|BigInt|Function|Math|ArrayBuffer|Number|Object|RegExp|String|Promise|Proxy|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|DataView|document|window|globalThis|global|Symbol|Intl|WeakSet|WeakMap|Set|Map|Reflect|JSON|Atomics|Int(?:8|16|32)Array|BigInt64Array|Float32Array|Float64Array|Uint8ClampedArray|Uint(?:8|16|32)Array|BigUint64Array)\bz;((?:Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\bz (super)(\s*)(\([\w,?.$\s]+\s*\))z!([a-zA-Z_?.$][\w?.$]*)(?=\(\) \{)"(\\\\|\\[^\\]|[^"\\])*"'(\\\\|\\[^\\]|[^'\\])*'`interp\\.z\$\{interp-insidez\$z[^`\\$]+\}root)r(   r0   r-   r;   r7   r9   N)-__name__
__module____qualname____doc__namealiases	filenames	mimetypesreDOTALLUNICODE	MULTILINEflagsr   r   Single	Multiliner   r   Regexr   ZHashbangr   BinOctHexIntegerFloatr   r   Wordr   ReservedDeclarationConstantr   Builtin	Exceptionr   r   JS_IDENTDoubleBacktickInterpoltokens r\   r\   9lib/python3.9/site-packages/pygments/lexers/javascript.pyr   "   s   

	


;

	
r   c                   @   s   e Zd ZdZdZddgZdgZddgZdZd	d
e	dfde	j
dfde	jfde	jfdee	jeejedfdeejee	jfde e	j
fegiZdS )r   z`
    For `TypeScript <http://typescriptlang.org/>`_ source code.

    .. versionadded:: 1.6
    Z
TypeScriptZ
typescripttsz*.tszapplication/x-typescriptztext/x-typescriptg      ?r;   z9(abstract|implements|private|protected|public|readonly)\br0   z(enum|interface|override)\bz\b(declare|type)\bz\b(string|boolean|number)\bz(\b(module)(\s*)(\s*[\w?.$][\w?.$]*)(\s*)z+([\w?.$][\w?.$]*)(\s*:\s*)([\w?.$][\w?.$]*)@N)r<   r=   r>   r?   r@   rA   rB   rC   priorityr   rS   rR   Typer   r   r   r   rW   r   r[   r\   r\   r\   r]   r      s.   
r   c                   @   s  e Zd ZdZdZdgZdgZddgZej	Z
defdejfd	ejfgd
ejdfedgdefdejdfd
ejfedgdedfdefedgdedfdefedgeddejfdefdejfdejfdefdedfdefdejdfdejdfd ed!fd"ejjfd#efd$ejfd%ejfd&ejfd'ejfd(ej fd)ej!fd*ed+fd,ed-fd.ed/fd0ed1fgd2efgd3ej"dfedgd.edfd4efd5ej"d6fed7gd0edfd8efed7gd*edfd9efd5ej"d6fed7gd,edfd:efed7gd;Z#d<S )=r   zk
    For `Kal`_ source code.

    .. _Kal: http://rzimmerman.github.io/kal


    .. versionadded:: 2.0
    ZKalZkalz*.kalztext/kalzapplication/kalr$   ###[^#].*?####(?!##[^#]).*?\nz[$a-zA-Z_][\w$]*\s*r*   r(   z\binherits\s+from\bz[$a-zA-Z_][\w$]*\s*\n\]z\b(property|value)\br;   r.   z\bfrom\b</(?! )(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gimuysd]+\b|\B)z%\?|:|_(?=\n)|==?|!=|-(?!>)|[<>+*/-]=?zE\b(and|or|isnt|is|not|but|bitwise|mod|\^|xor|exists|doesnt\s+exist)\bz(?:\([^()]+\))?\s*>z[{(]\[listcomprehensionz[})\].,]z\b(function|method|task)\bfunctiondefz	\bclass\bclassdefz\b(safe\s+)?wait\s+for\bwaitforz#\b(me|this)(\.[$a-zA-Z_][\w.$]*)?\bz(?<![.$])(for(\s+(parallel|series))?|in|of|while|until|break|return|continue|when|if|unless|else|otherwise|except\s+when|throw|raise|fail\s+with|try|catch|finally|new|delete|typeof|instanceof|super|run\s+in\s+parallel|inherits\s+from)\bzN(?<![.$])(true|false|yes|no|on|off|null|nothing|none|NaN|Infinity|undefined)\bz(Array|Boolean|Date|Error|Function|Math|Number|Object|RegExp|String|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|isSafeInteger|parseFloat|parseInt|document|window|globalThis|Symbol|print)\bz%[$a-zA-Z_][\w.$]*\s*(:|[+\-*/]?\=)?\b%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?0x[0-9a-fA-F]+[0-9]+"""tdqs'''tsqs"dqs'sqs
[^#\\\'"]+r:   \\.|\'#\{interpoling_stringstrings#|\\.|"\\.|\'|"
#|\\.|\'|")r(   rh   ri   rg   rj   r;   rz   ry   rs   ru   ro   rq   N)$r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rH   r   r   rJ   rI   r   Functionr   r   Classr   r   rK   r   rQ   rS   VariableInstancerT   rU   r   rP   rN   rO   rZ   r[   r\   r\   r\   r]   r      s   	




(


r   c                   @   s  e Zd ZdZdZddgZdgZdgZej	Z
defdejfd	ejfged
dejdfdejfdejfged
dejdfdejdfdedfedgdedfed
dejfdedfdedfdefdedfdejfdejfdejdfdejjdfdejdfdejdfdejfd ejfd!ed"fd#ed$fd%ed&fd'ed(fd)efd*efgd+efgd,ej dfed-gd%edfd.efd/ej d0fd1efed2gd'edfd3efed2gd!edfd4efd/ej d0fd1efed2gd#edfd5efed2gd6
Z!d7S )8r   zp
    For `LiveScript`_ source code.

    .. _LiveScript: https://livescript.net/

    .. versionadded:: 1.6
    Z
LiveScriptZ
livescriptzlive-scriptz*.lsztext/livescriptr$   r'   z#.*?\nr(   z//([gimuysd]+\b|\B)r*   /[^/#]+z//r*   multilineregexre   
\A(?=\s|/)r0   z?(?:\([^()]+\))?[ ]*[~-]{1,2}>|(?:\(?[^()\n]+\)?)?[ ]*<[~-]{1,2}z\+\+|&&|(?<![.$])\b(?:and|x?or|is|isnt|not)\b|\?|:|=|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|~(?!\~?>)|-(?!\-?>)|<(?!\[)|(?<!\])>|[+*`%&|^/])=?r1   r2   z(?<![.$])(for|own|in|of|while|until|loop|break|return|continue|switch|when|then|if|unless|else|throw|try|catch|finally|new|delete|typeof|instanceof|super|extends|this|class|by|const|var|to|til)\bzF(?<![.$])(true|false|yes|no|on|off|null|NaN|Infinity|undefined|void)\bz(Array|Boolean|Date|Error|Function|Math|Number|Object|RegExp|String|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|document|window|globalThis|Symbol|Symbol|BigInt)\bz[$a-zA-Z_][\w.\-:$]*\s*[:=]\sz@[$a-zA-Z_][\w.\-:$]*\s*[:=]\sr_   z@?[$a-zA-Z_][\w-]*z/[0-9]+\.[0-9]+([eE][0-9]+)?[fd]?(?:[a-zA-Z_]+)?z"[0-9]+(~[0-9a-z]+)?(?:[a-zA-Z_]+)?rn   ro   rp   rq   rr   rs   rt   ru   z\\\S+z	<\[.*?\]>rv   r:   r;   rw   rx   ry   #rz   r{   r|   r}   
r(   r   r0   r;   rz   ry   rs   ru   ro   rq   N)"r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rH   r   r   rJ   rI   r   r   rK   r   r   r   r~   r   r   rT   rU   r   r   r   r   rP   rO   rZ   r[   r\   r\   r\   r]   r   !  s   

	

)


r   c                   @   s
  e Zd ZdZdZdgZdgZdgZej	ej
B Zeddejfded	fd
efdefdejfdejfdeejedfdefdejfdejfdejfdefdejfdejfdefdefdejfdefdefdefgdejdfgeddefdefdefd efd!edfgd"ej fd#ejfd$ej fd%ejfd&ej d'fd(ejd)fd*ej d+fd,ejd-fgd.ej!fd/eej"efd0eej"e#e$ej"fgd*ej dfd1ej fed2d3ej fgd&ej dfd4ej fed2d5ej fgd,ejdfd6ejfed2d3ejfgd(ejdfd7ejfed2d8ejfgd9	Z%d:S );r   zP
    For `Dart <http://dart.dev/>`_ source code.

    .. versionadded:: 1.5
    ZDartZdartz*.dartztext/x-dartstring_literalz#!(.*?)$z\b(import|export)\bimport_declz!\b(library|source|part of|part)\b[^\S\n]+r&   r'   z \b(class|extension|mixin)\b(\s+)classz\b(as|assert|break|case|catch|const|continue|default|do|else|finally|for|if|in|is|new|rethrow|return|super|switch|this|throw|try|while)\bz\b(abstract|async|await|const|covariant|extends|external|factory|final|get|implements|late|native|on|operator|required|set|static|sync|typedef|var|with|yield)\bzH\b(bool|double|dynamic|int|num|Function|Never|Null|Object|String|void)\bz\b(false|null|true)\bz[~!%^&*+=|?:<>/-]|as\bz@[a-zA-Z_$]\w*z[a-zA-Z_$]\w*:z[a-zA-Z_$]\w*z[(){}\[\],.;]z0[xX][0-9a-fA-F]+z\d+(\.\d*)?([eE][+-]?\d+)?z\.\d+([eE][+-]?\d+)?r.   r*   r$   z\b(as|deferred|show|hide)\bz\,z\;zr"""([\w\W]*?)"""zr'''([\w\W]*?)'''zr"(.*?)"zr'(.*?)'rn   string_double_multilinerp   string_single_multilinerr   string_doublert   string_singlezA\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]*\}|[a-z'\"$\\])z(\$)([a-zA-Z_]\w*)z(\$\{)(.*?)(\})z
[^"$\\\n]+string_commonz\$+z[^"$\\]+z(\$|\")+z
[^'$\\\n]+z	[^\'$\\]+z(\$|\')+)	r;   r   r   r   r   r   r   r   r   N)&r<   r=   r>   r?   r@   rA   rB   rC   rD   rG   rE   rH   r   r   Preprocr   r   rI   rJ   r   rS   ra   rT   r   r   Z	DecoratorLabelr   r   rN   r   r   rX   EscaperZ   r   r
   r[   r\   r\   r\   r]   r     s    









r   c                /   @   s$  e Zd ZdZdZddgZddgZg dZdgZe	j
e	jB e	jB Zd	ejdfd
edfdefedgdejdfdejdfdejdfdejdfdefdefgdejdfdefdejdfdefdefgdejdfdefdefgdejdfedgdejdfedgdejdfedgdefdejfdejfd ejfged!d"ejfd#ejfd$ejfd%efd&ejd'fd(ejd)fd*ejfd+ejfd,ejj fd-e!ej"j#ejj$fd.e!ej"j#e%ejj$fd/e!ej"j#ejj&fd0e!e%ejj&fd1ej"j#fd2ej'fd3ej(fd4ej)fd5e!e*j+eej$e%e*fd6e!e*j+eej$e%ej,d7fd8e!e*j+eej,d7fd9e!e*eej,d7fd:e!e*eej,fd;e*j-fd<e*j+fd=e*j.fd>e!eee*fd?e!e*eefd@e*dAfdBe!e/e*j0fdCe!e/e*fdDe/dEfdFe%j1fdGe!eej(e%fdHe!e/ejfdIe!e%e%j1fdJe%fdKe/fg&d&ejdfdLejfedMdNejfgd(ejdfdOejfedMdNejfgdPej2fgdQe%dfdRe/dfdSe/dTfedgdRe/dfdUej'dfdVej"j#fedgdWedXfdYefdZedfd3ej(fdDe/fed!gd[e/dfdRe/d\fdUej'fd3ej(fdVej"j#fdSe/fed!gd]ej,d7fed!edgd^Z3d_d` Z4dadb Z5dcdd Z6deS )fr   a  
    For `Lasso <http://www.lassosoft.com/>`_ source code, covering both Lasso 9
    syntax and LassoScript for Lasso 8.6 and earlier. For Lasso embedded in
    HTML, use the `LassoHtmlLexer`.

    Additional options accepted:

    `builtinshighlighting`
        If given and ``True``, highlight builtin types, traits, methods, and
        members (default: ``True``).
    `requiredelimiters`
        If given and ``True``, only highlight code between delimiters as Lasso
        (default: ``False``).

    .. versionadded:: 1.6
    ZLassolassoZlassoscriptz*.lassoz*.lasso[89])z*.inclz*.incz*.lasztext/x-lassoz^#![ \S]+lasso9\bz(?=\[|<)
delimitersr$   )r   	lassofilez\[no_square_brackets\]nosquarebracketsz\[noprocess\]	noprocessrf   squarebracketsz<\?(lasso(script)?|=)anglebracketsz<(!--.*?-->)?z[^[<]+z\[/noprocess\]r*   z[^[]rd   z\?>z\]|\?>r&   z/\*\*!.*?\*/r'   whitespacecommentsz\d*\.\d+(e[+-]?\d+)?z
0x[\da-f]+\d+z(infinity|NaN)\brt   singlestringrr   doublestringz`[^`]*`z\$[a-z_][\w.]*z#([a-z_][\w.]*|\d+\b)z(\.\s*)('[a-z_][\w.]*')z (self)(\s*->\s*)('[a-z_][\w.]*')z!(\.\.?\s*)([a-z_][\w.]*(=(?!=))?)z&(->\\?\s*|&\s*)([a-z_][\w.]*(=(?!=))?)z3(?<!->)(self|inherited|currentcapture|givenblock)\bz-(?!infinity)[a-z_][\w.]*z::\s*[a-z_][\w.]*a  (error_(code|msg)_\w+|Error_AddError|Error_ColumnRestriction|Error_DatabaseConnectionUnavailable|Error_DatabaseTimeout|Error_DeleteError|Error_FieldRestriction|Error_FileNotFound|Error_InvalidDatabase|Error_InvalidPassword|Error_InvalidUsername|Error_ModuleNotFound|Error_NoError|Error_NoPermission|Error_OutOfMemory|Error_ReqColumnMissing|Error_ReqFieldMissing|Error_RequiredColumnMissing|Error_RequiredFieldMissing|Error_UpdateError)\bz:(define)(\s+)([a-z_][\w.]*)(\s*=>\s*)(type|trait|thread)\bz=(define)(\s+)([a-z_][\w.]*)(\s*->\s*)([a-z_][\w.]*=?|[-+*/%])	signaturez(define)(\s+)([a-z_][\w.]*)zJ(public|protected|private|provide)(\s+)(([a-z_][\w.]*=?|[-+*/%])(?=\s*\())z5(public|protected|private|provide)(\s+)([a-z_][\w.]*)z)(true|false|none|minimal|full|all|void)\bz((local|var|variable|global|data(?=\s))\bz(array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray)\bz([a-z_][\w.]*)(\s+)(in)\bz(let|into)(\s+)([a-z_][\w.]*)z	require\brequiresectionz(/?)(Namespace_Using)\ba  (/?)(Cache|Database_Names|Database_SchemaNames|Database_TableNames|Define_Tag|Define_Type|Email_Batch|Encode_Set|HTML_Comment|Handle|Handle_Error|Header|If|Inline|Iterate|LJAX_Target|Link|Link_CurrentAction|Link_CurrentGroup|Link_CurrentRecord|Link_Detail|Link_FirstGroup|Link_FirstRecord|Link_LastGroup|Link_LastRecord|Link_NextGroup|Link_NextRecord|Link_PrevGroup|Link_PrevRecord|Log|Loop|Output_None|Portal|Private|Protect|Records|Referer|Referrer|Repeating|ResultSet|Rows|Search_Args|Search_Arguments|Select|Sort_Args|Sort_Arguments|Thread_Atomic|Value_List|While|Abort|Case|Else|Fail_If|Fail_IfNot|Fail|If_Empty|If_False|If_Null|If_True|Loop_Abort|Loop_Continue|Loop_Count|Params|Params_Up|Return|Return_Value|Run_Children|SOAP_DefineTag|SOAP_LastRequest|SOAP_LastResponse|Tag_Name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b,commamemberz(and|or|not)\bz0([a-z_][\w.]*)(\s*::\s*[a-z_][\w.]*)?(\s*=(?!=))z(/?)([\w.]+)z,(=)(n?bw|n?ew|n?cn|lte?|gte?|n?eq|n?rx|ft)\bz:=|[-+*/%=<>&|!?\\]+z[{}():;,@^]z[^'\\]+escape\\z[^"\\]+zS\\(U[\da-f]{8}|u[\da-f]{4}|x[\da-f]{1,2}|[0-7]{1,3}|:[^:\n\r]+:|[abefnrtv?"\'\\]|$)z=>\)z[(,]	parameterz-?[a-z_][\w.]*z\.\.\.z#(([a-z_][\w.]*=?|[-+*/%])(?=\s*\())requiresignaturez3(([a-z_][\w.]*=?|[-+*/%])(?=(\s*::\s*[\w.]+)?\s*,))z[a-z_][\w.]*=?|[-+*/%]z(\)(?=(\s*::\s*[\w.]+)?\s*,))#pop:2zR(([a-z_][\w.]*=?|[-+*/%])(?=\s*(\(([^()]*\([^()]*\))*[^)]*\)\s*)?(::[\w.\s]+)?=>)))r;   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                 K   s   t |dd| _t |dd| _t | _t | _| jr~ddlm}m} |	 D ]\}}| j
| qJ|	 D ]\}}| j
| qhtj| fi | d S )NbuiltinshighlightingTrequiredelimitersFr   )BUILTINSMEMBERS)r   r   r   set	_builtins_membersZpygments.lexers._lasso_builtinsr   r   itemsupdater	   __init__)selfoptionsr   r   keyvaluer\   r\   r]   r     s    zLassoLexer.__init__c                 c   s   dg}| j r|d t| ||D ]^\}}}|tju rF| | jv sf|tjju rv| 	d| j
v rv|tj|fV  q$|||fV  q$d S )Nr;   r   =)r   appendr	   get_tokens_unprocessedr   r   lowerr   Memberrstripr   rU   )r   textstackindextokenr   r\   r\   r]   r     s    

z!LassoLexer.get_tokens_unprocessedc                 C   sH   d}d| v r|d7 }t d| t jr,|d7 }t d| t jrD|d7 }|S )Ng        z
bin/lasso9g?z<\?lassog?zlocal\()rD   searchI)r   rvr\   r\   r]   analyse_text  s    zLassoLexer.analyse_textN)7r<   r=   r>   r?   r@   rA   rB   Zalias_filenamesrC   rD   
IGNORECASErE   rG   rH   r   r   r   r   r   r   rI   r   ZDocrJ   r   rP   rN   rO   rX   rY   r   r   r   r   rU   Pseudor   r   r   	Attributer   rV   r   rS   r~   rT   ra   r   	NamespacerQ   r   r[   r   r   r   r\   r\   r\   r]   r     sN  




	









^



	

  Ar   c                   @   sV  e Zd ZdZdZg dZdgZdgZdZe	j
e	jB Zedde d	 e d
 e d eeeeeddeefdeeedfdeeedfdeeeefeddefdefgdeejeejfdeejeejfdeejeejfdeejeejfdejdfdejdfdefdefd efd!ejfd"ejfd#efgedd$ejd%fd&ed'fed%gded%fgd(ed)fd*ejfd+ejfd,ejfd-ejfd.ejfd/ejfd0ej fd1ej!fd2ed3fd4e"d3fd5ed3fd6efd7ed3fd8ej#d3fd9efd:ej$fd;e%j&fd<ej'fd=ej'fd>ej'fd?e%j&fd@e dA ee%j(eefdBe%fgdCe dD e dE ee%j)eee%j)d%fdCe dF ee%j)eee%j*ed%fdGe%j)d%fgdHee%j)edIfdJee%j)ed%fgeddKe dL e dM e dN e dO eeeej$eee%j(dPfdKe dL e dM e dQ eeeej$eee%j(d%fdRe dO ee%j(dPfdSee%j(d%fed%geddKe dT e dM e dQ eeeej$eeefdRe dO e%j(fdUe%j(fdVe dW eefdSefgdXee%j(efdYed%fgdZed%fd[ej+fd\efd efd]efgd^ejfd_ejfd`ejd%fdaejfdbejfdejd%fgdcejdIfddejd%fdeefgdfZ,dgdh Z-diS )jr   z^
    For Objective-J source code with preprocessor directives.

    .. versionadded:: 1.3
    zObjective-J)zobjective-jZ
objectivejzobj-jZobjjz*.jztext/x-objective-jz(?:\s|//.*?\n|/[*].*?[*]/)*
whitespacez^(z[+-]z)([(a-zA-Z_].*?[^(])(z\{)function_signature)statez!(@interface|@implementation)(\s+)	classnamez(@class|@protocol)(\s*)forward_classnamez(\s*)(@end)(\s*)
statementsz[{()}];z$(@import)(\s+)("(?:\\\\|\\"|[^"])*")z$(@import)(\s+)(<(?:\\\\|\\>|[^>])*>)z0(#(?:include|import))(\s+)("(?:\\\\|\\"|[^"])*")z0(#(?:include|import))(\s+)(<(?:\\\\|\\>|[^>])*>)z#if\s+0if0r   macror.   r$   \\\nz//(\n|(.|\n)*?[^\\]\n)z/(\\\n)?[*](.|\n)*?[*](\\\n)?/r%   z3/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)r*   r+   r,   z(L|@)?"stringz8(L|@)?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'r4   r5   z%(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?z(\d+\.\d*|\.\d+|\d+[fF])[fF]?z0x[0-9a-fA-F]+[Ll]?z0[0-7]+[Ll]?z\d+[Ll]?r/   r0   z@\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?r1   r2   z(for|in|while|do|break|return|continue|switch|case|default|if|else|throw|try|catch|finally|new|delete|typeof|instanceof|void|prototype|__proto__)\bz(var|with|function)\bz(@selector|@private|@protected|@public|@encode|@synchronized|@try|@throw|@catch|@finally|@end|@property|@synthesize|@dynamic|@for|@accessors|new)\bzt(int|long|float|short|double|char|unsigned|signed|void|id|BOOL|bool|boolean|IBOutlet|IBAction|SEL|@outlet|@action)\bz(self|super)\bz"(TRUE|YES|FALSE|NO|Nil|nil|NULL)\br3   z(ABS|ASIN|ACOS|ATAN|ATAN2|SIN|COS|TAN|EXP|POW|CEIL|FLOOR|ROUND|MIN|MAX|RAND|SQRT|E|LN2|LN10|LOG2E|LOG10E|PI|PI2|PI_2|SQRT1_2|SQRT2)\bz(Array|Boolean|Date|Error|Function|Math|Number|Object|RegExp|String|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|Error|eval|isFinite|isNaN|parseFloat|parseInt|document|this|window|globalThis|Symbol)\bz([$a-zA-Z_]\w*)(z)(?=\()z[$a-zA-Z_]\w*z([a-zA-Z_]\w*)(:z)([a-zA-Z_]\w*)?z\()([a-zA-Z_]\w*)(\))z([a-zA-Z_]\w*)z([a-zA-Z_]\w*)(\s*,\s*)z#pushz([a-zA-Z_]\w*)(\s*;?)z(\(z)([a-zA-Z_]\w+)(r   z)([$a-zA-Z_]\w+z:)function_parametersz)([$a-zA-Z_]\w+)z([$a-zA-Z_]\w+z([$a-zA-Z_]\w+)z	)([^)]+)(z(:)z(,z\.\.\.)z([$a-zA-Z_]\w*)(\()z(\))rr   z/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})z	[^\\"\n]+r   z[^/\n]+z/[*](.|\n)*?[*]/r&   r   z	(?<=\\)\nz^\s*#if.*?(?<!\\)\nz^\s*#endif.*?(?<!\\)\nz.*?\n)r;   r   r0   r-   r   r   r   r   r   
expressionr   r   r   c                 C   s   t d| t jrdS dS )Nz^\s*@import\s+[<"]TF)rD   r   rG   )r   r\   r\   r]   r     s    zObjectiveJLexer.analyse_textN).r<   r=   r>   r?   r@   rA   rB   rC   Z_wsrD   rE   rG   rH   r   r   r   r
   r   r   r   r   r   r   rX   rI   rJ   rK   r   ZCharr   rP   rN   rM   rO   r   rS   ra   r   rU   rT   r~   r   r   r   r[   r   r\   r\   r\   r]   r     s  





7










	

  Hr   c                   @   s  e Zd ZdZdZg dZdgZdgZdZe	j
Zdefdejfd	ejfgd
ejfdejdfdejdfdejfgeddejdfdejdfdedfedgeddedfeedfdejdfdedfdefdedfdejfdejfdejdfdejjdfdejdfd ejfd!ej fd"ej!fd#ej"fd$ed%fd&ed'fd(ed)fd*ed+fgd,efgd-ejdfed.gd(edfd/efdejdfd0efed1gd*edfd2efed1gd$edfd3efdejdfd0efed1gd&edfd4efed1gd5
Z#d6S )7r   zt
    For `CoffeeScript`_ source code.

    .. _CoffeeScript: http://coffeescript.org

    .. versionadded:: 1.3
    ZCoffeeScript)Zcoffeescriptzcoffee-scriptZcoffeez*.coffeeztext/coffeescriptzx\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&|\^/])=?r$   rb   rc   r   z///([gimuysd]+\b|\B)r*   rx   ry   z[/#]r(   z///r   re   r   r   r0   z(?:\([^()]*\))?\s*[=-]>r1   r2   z(?<![.$])(for|own|in|of|while|until|loop|break|return|continue|switch|when|then|if|unless|else|throw|try|catch|finally|new|delete|typeof|instanceof|super|extends|this|class|by)\bzA(?<![.$])(true|false|yes|no|on|off|null|NaN|Infinity|undefined)\bz(Array|Boolean|Date|Error|Function|Math|Number|Object|RegExp|String|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|document|window|globalThis|Symbol)\bz[$a-zA-Z_][\w.:$]*\s*[:=]\sz@[$a-zA-Z_][\w.:$]*\s*[:=]\sr_   z@?[$a-zA-Z_][\w$]*rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   r:   r;   rw   r   rz   r{   r|   r}   r   N)$r<   r=   r>   r?   r@   rA   rB   rC   Z_operator_rerD   rE   rH   r   r   rJ   rI   r   rK   rZ   r   r   r   r   r~   r   r   rT   rU   r   r   r   r   rP   rN   rO   r[   r\   r\   r\   r]   r     s   




#


r   c                   @   sn  e Zd ZdZdZdgZdgZdgZej	ej
B ejB Zdefdejfdejfd	efd
edfdedfdedfdedfdejdfdejdfdejdfdejjdfgdejfdejdfdejfgdejdfedgdejdfedgd
ejdfedgdejdfedgdejdfdejdfd ejfd!ejfgd!eedfgdefd"ejjd#fd$ejd%fd&ejd'fd(ejd)fd*ejfd+edfgd,ejjfdejdfedgd,ejfdejdfedgdefd-ejdfded.fded/fedgdefdejd0fdejd1fed)gdefd2efd3ej fged4dejd5fd6ej!fged4dejd5fd7ej!fgdejd5fedgdejd5fedgd8Z"d9S ):r    z\
    For `Mask <https://github.com/atmajs/MaskJS>`__ markup.

    .. versionadded:: 2.0
    ZMaskmaskz*.maskztext/x-maskr$   r&   r'   z[{};>]rp   string-trpl-singlern   string-trpl-doublert   string-singlerr   string-doublez([\w-]+)nodez([^.#;{>\s]+)z	(#[\w-]+)z
(\.[\w-]+)r8   z~\[interpolation.r*   string-baserd   z\s*:r   z\s*\w+:z[^\]]+z\.
node-classz\#node-idzstyle[ \t]*=node-attr-style-valuez[\w:-]+[ \t]*=node-attr-valuez[\w:-]+z[>{;]z[\w-]+z\w+string-single-pop2string-double-pop2css-single-endcss-double-endr   z[\w\-]+\s*:css-baser   z[^;']+z[^;"]+)r;   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)#r<   r=   r>   r?   r@   rA   rB   rC   rD   rG   r   rE   rH   r   r   rI   rJ   r   r   r   Tagr   r~   r   r   rZ   r   r   r   r   r   r   rU   Entityr[   r\   r\   r\   r]   r    H  s   























r    c                   @   st  e Zd ZdZdZg dZdgZdgZdefe	ddefd	e
fd
efdefdefe	deddddejfdejfdejfdejfdefdejfe	de	de	ddeeejeejjdfdejdfdejdfd ejfe	d!d"eed#d$fd%eed#d&fd'eed#d(fe	d)e	d*e	d+e	d,gd-eeejjfd.eeejjefd/efd0ejd1fgd2eejefgd3eeejfged4d5d6dejfd7ejfgd8ej fd9ej fd:eeej efd;eeej efgd<eeejfd=eeej!fd>eeejfged?d5d6dej"fed@d5dAdej#fedBd5dAdej$fgedCdDdEdej%fedFd5d6dej#fgdGejj&fdHeejejfgdIej'fgdJej(d1fe	dKgdLej)fgdMefdNefdefgdOed1fdPej)fe	dQgdRed1fdSej)fdTej(dUfe	dQgd'ed1fe	dQgdVejd1fdWejfdXej)fdYejfgdZejd1fdejfdXej)fd[ejfgd\e*j+fd]e*j+fd^e*j,fd_e*j-fd`e*j.fdae*j/fdbe*j0fgdcZ1ddS )er!   z{
    For `Earl-Grey`_ source code.

    .. _Earl-Grey: https://breuleux.github.io/earl-grey/

    .. versionadded: 2.1
    z	Earl Grey)z	earl-greyZearlgreyZegz*.egztext/x-earl-greyr.   controlr   z;;.*\nz[\[\]{}:(),;]r   r   errors)
withwhereZwhenandnotorinasZofisz
(?<=\s|\[)z(?![\w$\-]))prefixsuffixz[*@]?->z[+\-*/~^<>%&|?!@#.]*=z\.{2,3}z+([+*/~^<>&|?!]+)|([#\-](?=\s))|@@+(?=\s)|=+z(?<![\w$\-])(var|let)(?:[^\w$])keywordsbuiltins
assignmentz(?x)
                (?:()([a-zA-Z$_](?:[\w$\-]*[\w$])?)|
                   (?<=[\s{\[(])(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?))
                (?=.*%)dbsz[rR]?`btz[rR]?```tbtz=(?<=[\s\[{(,;])\.([a-zA-Z$_](?:[\w$\-]*[\w$])?)(?=[\s\]}),;])nestedz(?:[rR]|[rR]\.[gmi]{1,3})?"stringescapers   z(?:[rR]|[rR]\.[gmi]{1,3})?\'ru   rn   ro   tupleimport_pathsr@   numbersz-(\.)([a-zA-Z$_](?:[\w$\-]*[\w$])?)(?=[.\[\s])z+(\[)([\^#][a-zA-Z$_](?:[\w$\-]*[\w$])?)(\])r$   %r*   z>(?<=[\s:;,])(\.{1,3}(?:[\w\-]*/)*)(\w(?:[\w\-]*\w)*)(?=[\s;,])zB(\.)?([a-zA-Z$_](?:[\w$\-]*[\w$])?)(?=\s+[+\-*/~^<>%&|?!@#.]*\=\s))Error	TypeErrorReferenceErrorz(?<![\w\-$.])z(?![\w\-$.])z(?x)
                (?<![\w$])
                E\.[\w$](?:[\w$\-]*[\w$])?
                (?:\.[\w$](?:[\w$\-]*[\w$])?)*
                (?=[({\[?!\s])z(?x)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)
                (?!\n)\s+
                (?!and|as|each\*|each|in|is|mod|of|or|when|where|with)
                (?=(?:[+\-*/~^<>%&|?!@#.])?[a-zA-Z$_](?:[\w$-]*[\w$])?)z5([a-zA-Z$_](?:[\w$-]*[\w$])?)(?!\n)\s+(?=[\'"\d{\[(])z(?x)
                (?:
                    (?<=[%=])|
                    (?<=[=\-]>)|
                    (?<=with|each|with)|
                    (?<=each\*|where)
                )(\s+)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)zc(?x)
                (?<![+\-*/~^<>%&|?!@#.])(\s+)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)(:)zz(?x)
                (?<=[\w$\]})])(\.)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)
                (?=\s+with(?:\s|\n))zo(?x)
                (?<!\s)(\.)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)
                (?=[}\]).,;:\s])zq(?x)
                (?<=[\w$\]})])(\.)
                ([a-zA-Z$_](?:[\w$-]*[\w$])?)
                (?=[\[{(:]))Zeachzeach*modawaitbreakchaincontinueelifz
expr-valueifmatchreturnyieldpasselseZrequirevarZletasyncmethodgen)r
   r   r_   z(?![\w\-$]))	r~   ZObjectZArrayr   r   ZBooleanZErrorFactoryZENodeZPromise)sendobjectkeysr   	enumeratezipproductZ
neighbours	predicateZequalZnequalcontainsreprZclonerangeZ
getCheckerzget-checkerZgetPropertyzget-propertyZgetProjectorzget-projectorZconsumeZtakeZ	promisifyZspawnconstructorz(?<![\w\-#.])z(?![\w\-.]))trueZfalseZnullZ	undefinedz@([a-zA-Z$_](?:[\w$-]*[\w$])?)z)([a-zA-Z$_](?:[\w$-]*[\w$])?)(\+\+|\-\-)?z#[a-zA-Z_][\w\-]*(?=[\s{(,;])r:   r;   zY\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})z[^\\\'"]z[\'"\\]rr   z\\\\|\\"|\\\nrz   rt   z\\\\|\\'|\\\nz\{ry   r6   z(?<!`)\nz\^=?z.+z```z[^`]+z \d+\.(?!\.)\d*([eE][+-]?[0-9]+)?z\d+[eE][+-]?[0-9]+z8r[0-7]+z2r[01]+z16r[a-fA-F0-9]+z5([3-79]|[12][0-9]|3[0-6])r[a-zA-Z\d]+(\.[a-zA-Z\d]+)?r   )r;   r   r  r   r   r   r   r   r   r@   r   ry   r   rz   rs   ru   ro   r   r   r  N)2r<   r=   r>   r?   r@   rA   rB   rC   r   r   r   r   r   r   rQ   r   r~   r   rS   r   r   r   ZStartr   rY   ZSymbolr   ZDBSr   
Whitespacer   rV   ZControlZFieldr   rT   ra   rU   r   r   rZ   r   r   rP   rM   rL   rN   ZRadixrO   r[   r\   r\   r\   r]   r!     sV  

)
	

	


	




 r!   c                   @   s  e Zd ZdZdZdgZdgZg dZej	ej
B ejB Zdefdejfdejfged	d
ejdfdedfedgdedfgdedfed	dejfdejfdejfdejfdedfdedfdefdedfdejdfdejfdejfdejfeejfde j!fde j"fdej#fd ejfgd!Z$d"S )#r"   zq
    For `Juttle`_ source code.

    .. _Juttle: https://github.com/juttle/juttle

    .. versionadded:: 2.2
    ZJuttleZjuttlez*.juttle)zapplication/juttlezapplication/x-juttleztext/x-juttleztext/juttler$   r&   r'   r(   r)   r*   r+   r,   r.   z	^(?=\s|/)r0   z:\d{2}:\d{2}:\d{2}(\.\d*)?:zY:(now|beginning|end|forever|yesterday|today|tomorrow|(\d+(\.\d*)?|\.\d+)(ms|[smhdwMy])?):zN:\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d*)?)?(Z|[+-]\d{2}:\d{2}|[+-]\d{4})?:z:((\d+(\.\d*)?|\.\d+)[ ]+)?(millisecond|second|minute|hour|day|week|month|year)[s]?(([ ]+and[ ]+(\d+[ ]+)?(millisecond|second|minute|hour|day|week|month|year)[s]?)|[ ]+(ago|from[ ]+now))*:z8\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(==?|!=?|[-<>+*%&|^/])=?r1   r2   z"(import|return|continue|if|else)\bz((var|const|function|reducer|sub|input)\bz{(batch|emit|filter|head|join|keep|pace|pass|put|read|reduce|remove|sequence|skip|sort|split|tail|unbatch|uniq|view|write)\bz(true|false|null|Infinity)\bz6(Array|Date|Juttle|Math|Number|Object|RegExp|String)\brk   rm   r4   r5   )r(   r0   r-   r;   N)%r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r   r   rI   rJ   r   r   rK   r   ZMomentr   r   r   rS   rR   rT   r   rU   rW   r   r   rP   rO   rX   r[   r\   r\   r\   r]   r"     sl   r"   c                   @   s(   e Zd ZdZdZdgZdgZdd ZdS )r#   a  
    For parsing within an interactive Node.js REPL, such as:

    .. sourcecode:: nodejsrepl

        > let a = 3
        undefined
        > a
        3
        > let b = '4'
        undefined
        > b
        '4'
        > b == a
        false

    .. versionadded: 2.10
    zNode.js REPL console sessionZ
nodejsreplztext/x-nodejsreplc           	   	   c   s  t f i | j}d}g }t|D ]}| }|drn|t|dtj	|d d fgf ||dd  7 }q"|dr|
d}t|t| }|t|dtj	|d | fgf ||7 }q"|rt|||E d H  d}g }tg ||E d H  q"|rt|||E d H  d S )N z> r      z...r   )r   r   line_refinditergroup
startswithr   lenr   ZPromptlstripr   r   )	r   r   ZjslexerZcurcodeZ
insertionsr  linecodeZleadr\   r\   r]   r     s<    






z'NodeConsoleLexer.get_tokens_unprocessedN)r<   r=   r>   r?   r@   rA   rC   r   r\   r\   r\   r]   r#     s
   r#   )1r?   rD   Zpygments.lexerr   r   r   r   r   r   r   r	   r
   r   r   Zpygments.tokenr   r   r   r   r   r   r   r   r   r   Zpygments.utilr   Zpygments.unistringZ	unistringZuni__all__ZcombineZJS_IDENT_STARTZJS_IDENT_PARTrW   compiler&  r   r   r   r   r   r   r   r   r    r!   r"   r#   r\   r\   r\   r]   <module>   s@   
40
g%sog   `qs YE