зеркало из https://github.com/nextcloud/text.git
3 строки
4.0 KiB
JavaScript
3 строки
4.0 KiB
JavaScript
/*! third party licenses: js/vendor.LICENSE.txt */
|
|
import{g as _}from"./emoji-picker-SoWZqoso.chunk.mjs";function u(e,o){for(var a=0;a<o.length;a++){const i=o[a];if(typeof i!="string"&&!Array.isArray(i)){for(const t in i)if(t!=="default"&&!(t in e)){const n=Object.getOwnPropertyDescriptor(i,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function y(e){const o=e.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},c={begin:/\{\{/,relevance:0},b={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,c,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,c,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,l]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},r="[0-9](_?[0-9])*",g="(\\b(".concat(r,"))?\\.(").concat(r,")|\\b(").concat(r,")\\."),s="\\b|".concat(i.join("|")),d={className:"number",relevance:0,variants:[{begin:"(\\b(".concat(r,")|(").concat(g,"))[eE][+-]?(").concat(r,")[jJ]?(?=").concat(s,")")},{begin:"(".concat(g,")[jJ]?")},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=".concat(s,")")},{begin:"\\b0[bB](_?[01])+[lL]?(?=".concat(s,")")},{begin:"\\b0[oO](_?[0-7])+[lL]?(?=".concat(s,")")},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=".concat(s,")")},{begin:"\\b(".concat(r,")[jJ](?=").concat(s,")")}]},f={className:"comment",begin:o.lookahead(/# type:/),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",n,d,b,e.HASH_COMMENT_MODE]}]};return l.contains=[b,d,n],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:t,illegal:/(<\/|\?)|=>/,contains:[n,d,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},b,f,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,p,b]}]}}var m=y;const S=_(m),E=u({__proto__:null,default:S},[m]);export{m as a,E as p};
|