@mx-space/api-client 1.16.1 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/controllers/ack.ts +1 -2
  2. package/controllers/activity.ts +1 -2
  3. package/controllers/aggregate.ts +1 -2
  4. package/controllers/ai.ts +12 -3
  5. package/controllers/base.ts +1 -2
  6. package/controllers/category.ts +4 -6
  7. package/controllers/comment.ts +1 -2
  8. package/controllers/link.ts +1 -3
  9. package/controllers/note.ts +5 -3
  10. package/controllers/page.ts +1 -2
  11. package/controllers/post.ts +1 -2
  12. package/controllers/project.ts +1 -3
  13. package/controllers/recently.ts +1 -2
  14. package/controllers/say.ts +1 -3
  15. package/controllers/search.ts +2 -3
  16. package/controllers/severless.ts +1 -2
  17. package/controllers/snippet.ts +1 -2
  18. package/controllers/subscribe.ts +1 -2
  19. package/controllers/topic.ts +1 -3
  20. package/controllers/user.ts +1 -2
  21. package/dist/adapter-B1dtiutp.d.cts +25 -0
  22. package/dist/adapter-CRsPadpS.d.mts +25 -0
  23. package/dist/adaptors/axios.cjs +53 -57
  24. package/dist/adaptors/axios.d.cts +5 -4
  25. package/dist/adaptors/axios.d.mts +7 -0
  26. package/dist/adaptors/axios.mjs +33 -0
  27. package/dist/adaptors/fetch.cjs +72 -108
  28. package/dist/adaptors/fetch.d.cts +4 -3
  29. package/dist/adaptors/fetch.d.mts +6 -0
  30. package/dist/adaptors/fetch.mjs +75 -0
  31. package/dist/adaptors/umi-request.cjs +32 -54
  32. package/dist/adaptors/umi-request.d.cts +5 -4
  33. package/dist/adaptors/umi-request.d.mts +7 -0
  34. package/dist/adaptors/umi-request.mjs +33 -0
  35. package/dist/index.cjs +1042 -1199
  36. package/dist/index.d.cts +1758 -1643
  37. package/dist/index.d.mts +2016 -0
  38. package/dist/index.mjs +1101 -0
  39. package/index.ts +0 -1
  40. package/interfaces/request.ts +3 -1
  41. package/mod-dts.mjs +15 -12
  42. package/models/aggregate.ts +0 -2
  43. package/models/ai.ts +9 -0
  44. package/models/comment.ts +1 -2
  45. package/models/note.ts +1 -1
  46. package/models/recently.ts +2 -0
  47. package/models/setting.ts +5 -0
  48. package/package.json +20 -20
  49. package/readme.md +3 -3
  50. package/tsconfig.json +11 -11
  51. package/{tsup.config.ts → tsdown.config.ts} +2 -2
  52. package/vitest.config.ts +0 -1
  53. package/.eslintcache +0 -1
  54. package/coverage/clover.xml +0 -591
  55. package/coverage/coverage-final.json +0 -5944
  56. package/coverage/lcov-report/adaptors/axios.ts.html +0 -201
  57. package/coverage/lcov-report/adaptors/index.html +0 -196
  58. package/coverage/lcov-report/adaptors/umi-request.ts.html +0 -186
  59. package/coverage/lcov-report/auto-bind.ts.html +0 -228
  60. package/coverage/lcov-report/base.css +0 -354
  61. package/coverage/lcov-report/block-navigation.js +0 -85
  62. package/coverage/lcov-report/controllers/aggregate.ts.html +0 -294
  63. package/coverage/lcov-report/controllers/base.ts.html +0 -183
  64. package/coverage/lcov-report/controllers/category.ts.html +0 -441
  65. package/coverage/lcov-report/controllers/comment.ts.html +0 -291
  66. package/coverage/lcov-report/controllers/index.html +0 -476
  67. package/coverage/lcov-report/controllers/index.ts.html +0 -297
  68. package/coverage/lcov-report/controllers/link.ts.html +0 -216
  69. package/coverage/lcov-report/controllers/note.ts.html +0 -375
  70. package/coverage/lcov-report/controllers/page.ts.html +0 -279
  71. package/coverage/lcov-report/controllers/post.ts.html +0 -369
  72. package/coverage/lcov-report/controllers/project.ts.html +0 -168
  73. package/coverage/lcov-report/controllers/recently.ts.html +0 -246
  74. package/coverage/lcov-report/controllers/say.ts.html +0 -207
  75. package/coverage/lcov-report/controllers/search.ts.html +0 -411
  76. package/coverage/lcov-report/controllers/severless.ts.html +0 -180
  77. package/coverage/lcov-report/controllers/snippet.ts.html +0 -195
  78. package/coverage/lcov-report/controllers/user.ts.html +0 -240
  79. package/coverage/lcov-report/core/attach-request.ts.html +0 -216
  80. package/coverage/lcov-report/core/client.ts.html +0 -786
  81. package/coverage/lcov-report/core/error.ts.html +0 -117
  82. package/coverage/lcov-report/core/index.html +0 -236
  83. package/coverage/lcov-report/core/index.ts.html +0 -93
  84. package/coverage/lcov-report/favicon.png +0 -0
  85. package/coverage/lcov-report/index.html +0 -276
  86. package/coverage/lcov-report/index.ts.html +0 -243
  87. package/coverage/lcov-report/models/aggregate.ts.html +0 -300
  88. package/coverage/lcov-report/models/category.ts.html +0 -162
  89. package/coverage/lcov-report/models/index.html +0 -196
  90. package/coverage/lcov-report/prettify.css +0 -101
  91. package/coverage/lcov-report/prettify.js +0 -1004
  92. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  93. package/coverage/lcov-report/sorter.js +0 -191
  94. package/coverage/lcov-report/utils/auto-bind.ts.html +0 -231
  95. package/coverage/lcov-report/utils/index.html +0 -216
  96. package/coverage/lcov-report/utils/index.ts.html +0 -246
  97. package/coverage/lcov-report/utils/path.ts.html +0 -105
  98. package/coverage/lcov.info +0 -1209
  99. package/dist/adapter-B8tKfr1O.d.cts +0 -23
  100. package/dist/adapter-B8tKfr1O.d.ts +0 -23
  101. package/dist/adaptors/axios.d.ts +0 -6
  102. package/dist/adaptors/axios.global.js +0 -14151
  103. package/dist/adaptors/axios.js +0 -33
  104. package/dist/adaptors/fetch.d.ts +0 -5
  105. package/dist/adaptors/fetch.global.js +0 -87
  106. package/dist/adaptors/fetch.js +0 -87
  107. package/dist/adaptors/umi-request.d.ts +0 -6
  108. package/dist/adaptors/umi-request.global.js +0 -7379
  109. package/dist/adaptors/umi-request.js +0 -33
  110. package/dist/index.d.ts +0 -1901
  111. package/dist/index.global.js +0 -1193
  112. package/dist/index.js +0 -1234
  113. package/esm/apps/core/src/modules/subscribe/subscribe.constant.d.ts +0 -12
  114. package/esm/apps/core/src/modules/subscribe/subscribe.constant.js +0 -16
  115. package/esm/apps/core/src/modules/subscribe/subscribe.constant.js.map +0 -1
  116. package/esm/packages/api-client/adaptors/axios.d.ts +0 -4
  117. package/esm/packages/api-client/adaptors/axios.js +0 -37
  118. package/esm/packages/api-client/adaptors/axios.js.map +0 -1
  119. package/esm/packages/api-client/adaptors/fetch.d.ts +0 -2
  120. package/esm/packages/api-client/adaptors/fetch.js +0 -95
  121. package/esm/packages/api-client/adaptors/fetch.js.map +0 -1
  122. package/esm/packages/api-client/adaptors/ky.d.ts +0 -23
  123. package/esm/packages/api-client/adaptors/ky.js +0 -62
  124. package/esm/packages/api-client/adaptors/ky.js.map +0 -1
  125. package/esm/packages/api-client/adaptors/umi-request.d.ts +0 -4
  126. package/esm/packages/api-client/adaptors/umi-request.js +0 -31
  127. package/esm/packages/api-client/adaptors/umi-request.js.map +0 -1
  128. package/esm/packages/api-client/controllers/aggregate.d.ts +0 -64
  129. package/esm/packages/api-client/controllers/aggregate.js +0 -46
  130. package/esm/packages/api-client/controllers/aggregate.js.map +0 -1
  131. package/esm/packages/api-client/controllers/base.d.ts +0 -43
  132. package/esm/packages/api-client/controllers/base.js +0 -27
  133. package/esm/packages/api-client/controllers/base.js.map +0 -1
  134. package/esm/packages/api-client/controllers/category.d.ts +0 -120
  135. package/esm/packages/api-client/controllers/category.js +0 -68
  136. package/esm/packages/api-client/controllers/category.js.map +0 -1
  137. package/esm/packages/api-client/controllers/comment.d.ts +0 -81
  138. package/esm/packages/api-client/controllers/comment.js +0 -47
  139. package/esm/packages/api-client/controllers/comment.js.map +0 -1
  140. package/esm/packages/api-client/controllers/index.d.ts +0 -19
  141. package/esm/packages/api-client/controllers/index.js +0 -60
  142. package/esm/packages/api-client/controllers/index.js.map +0 -1
  143. package/esm/packages/api-client/controllers/link.d.ts +0 -20
  144. package/esm/packages/api-client/controllers/link.js +0 -21
  145. package/esm/packages/api-client/controllers/link.js.map +0 -1
  146. package/esm/packages/api-client/controllers/note.d.ts +0 -103
  147. package/esm/packages/api-client/controllers/note.js +0 -68
  148. package/esm/packages/api-client/controllers/note.js.map +0 -1
  149. package/esm/packages/api-client/controllers/page.d.ts +0 -59
  150. package/esm/packages/api-client/controllers/page.js +0 -42
  151. package/esm/packages/api-client/controllers/page.js.map +0 -1
  152. package/esm/packages/api-client/controllers/post.d.ts +0 -72
  153. package/esm/packages/api-client/controllers/post.js +0 -52
  154. package/esm/packages/api-client/controllers/post.js.map +0 -1
  155. package/esm/packages/api-client/controllers/project.d.ts +0 -15
  156. package/esm/packages/api-client/controllers/project.js +0 -12
  157. package/esm/packages/api-client/controllers/project.js.map +0 -1
  158. package/esm/packages/api-client/controllers/recently.d.ts +0 -110
  159. package/esm/packages/api-client/controllers/recently.js +0 -49
  160. package/esm/packages/api-client/controllers/recently.js.map +0 -1
  161. package/esm/packages/api-client/controllers/say.d.ts +0 -37
  162. package/esm/packages/api-client/controllers/say.js +0 -21
  163. package/esm/packages/api-client/controllers/say.js.map +0 -1
  164. package/esm/packages/api-client/controllers/search.d.ts +0 -87
  165. package/esm/packages/api-client/controllers/search.js +0 -28
  166. package/esm/packages/api-client/controllers/search.js.map +0 -1
  167. package/esm/packages/api-client/controllers/severless.d.ts +0 -24
  168. package/esm/packages/api-client/controllers/severless.js +0 -16
  169. package/esm/packages/api-client/controllers/severless.js.map +0 -1
  170. package/esm/packages/api-client/controllers/snippet.d.ts +0 -24
  171. package/esm/packages/api-client/controllers/snippet.js +0 -19
  172. package/esm/packages/api-client/controllers/snippet.js.map +0 -1
  173. package/esm/packages/api-client/controllers/subscribe.d.ts +0 -64
  174. package/esm/packages/api-client/controllers/subscribe.js +0 -35
  175. package/esm/packages/api-client/controllers/subscribe.js.map +0 -1
  176. package/esm/packages/api-client/controllers/topic.d.ts +0 -26
  177. package/esm/packages/api-client/controllers/topic.js +0 -18
  178. package/esm/packages/api-client/controllers/topic.js.map +0 -1
  179. package/esm/packages/api-client/controllers/user.d.ts +0 -70
  180. package/esm/packages/api-client/controllers/user.js +0 -40
  181. package/esm/packages/api-client/controllers/user.js.map +0 -1
  182. package/esm/packages/api-client/core/attach-request.d.ts +0 -2
  183. package/esm/packages/api-client/core/attach-request.js +0 -36
  184. package/esm/packages/api-client/core/attach-request.js.map +0 -1
  185. package/esm/packages/api-client/core/client.d.ts +0 -29
  186. package/esm/packages/api-client/core/client.js +0 -193
  187. package/esm/packages/api-client/core/client.js.map +0 -1
  188. package/esm/packages/api-client/core/error.d.ts +0 -6
  189. package/esm/packages/api-client/core/error.js +0 -9
  190. package/esm/packages/api-client/core/error.js.map +0 -1
  191. package/esm/packages/api-client/core/index.d.ts +0 -2
  192. package/esm/packages/api-client/core/index.js +0 -3
  193. package/esm/packages/api-client/core/index.js.map +0 -1
  194. package/esm/packages/api-client/dtos/comment.d.ts +0 -8
  195. package/esm/packages/api-client/dtos/comment.js +0 -2
  196. package/esm/packages/api-client/dtos/comment.js.map +0 -1
  197. package/esm/packages/api-client/dtos/index.d.ts +0 -1
  198. package/esm/packages/api-client/dtos/index.js +0 -2
  199. package/esm/packages/api-client/dtos/index.js.map +0 -1
  200. package/esm/packages/api-client/index.d.ts +0 -8
  201. package/esm/packages/api-client/index.js +0 -9
  202. package/esm/packages/api-client/index.js.map +0 -1
  203. package/esm/packages/api-client/interfaces/adapter.d.ts +0 -14
  204. package/esm/packages/api-client/interfaces/adapter.js +0 -2
  205. package/esm/packages/api-client/interfaces/adapter.js.map +0 -1
  206. package/esm/packages/api-client/interfaces/client.d.ts +0 -13
  207. package/esm/packages/api-client/interfaces/client.js +0 -2
  208. package/esm/packages/api-client/interfaces/client.js.map +0 -1
  209. package/esm/packages/api-client/interfaces/controller.d.ts +0 -4
  210. package/esm/packages/api-client/interfaces/controller.js +0 -2
  211. package/esm/packages/api-client/interfaces/controller.js.map +0 -1
  212. package/esm/packages/api-client/interfaces/instance.d.ts +0 -7
  213. package/esm/packages/api-client/interfaces/instance.js +0 -2
  214. package/esm/packages/api-client/interfaces/instance.js.map +0 -1
  215. package/esm/packages/api-client/interfaces/options.d.ts +0 -1
  216. package/esm/packages/api-client/interfaces/options.js +0 -2
  217. package/esm/packages/api-client/interfaces/options.js.map +0 -1
  218. package/esm/packages/api-client/interfaces/params.d.ts +0 -4
  219. package/esm/packages/api-client/interfaces/params.js +0 -2
  220. package/esm/packages/api-client/interfaces/params.js.map +0 -1
  221. package/esm/packages/api-client/interfaces/request.d.ts +0 -44
  222. package/esm/packages/api-client/interfaces/request.js +0 -2
  223. package/esm/packages/api-client/interfaces/request.js.map +0 -1
  224. package/esm/packages/api-client/interfaces/types.d.ts +0 -2
  225. package/esm/packages/api-client/interfaces/types.js +0 -2
  226. package/esm/packages/api-client/interfaces/types.js.map +0 -1
  227. package/esm/packages/api-client/models/aggregate.d.ts +0 -67
  228. package/esm/packages/api-client/models/aggregate.js +0 -6
  229. package/esm/packages/api-client/models/aggregate.js.map +0 -1
  230. package/esm/packages/api-client/models/base.d.ts +0 -40
  231. package/esm/packages/api-client/models/base.js +0 -2
  232. package/esm/packages/api-client/models/base.js.map +0 -1
  233. package/esm/packages/api-client/models/category.d.ts +0 -22
  234. package/esm/packages/api-client/models/category.js +0 -6
  235. package/esm/packages/api-client/models/category.js.map +0 -1
  236. package/esm/packages/api-client/models/comment.d.ts +0 -39
  237. package/esm/packages/api-client/models/comment.js +0 -13
  238. package/esm/packages/api-client/models/comment.js.map +0 -1
  239. package/esm/packages/api-client/models/index.d.ts +0 -16
  240. package/esm/packages/api-client/models/index.js +0 -17
  241. package/esm/packages/api-client/models/index.js.map +0 -1
  242. package/esm/packages/api-client/models/link.d.ts +0 -22
  243. package/esm/packages/api-client/models/link.js +0 -14
  244. package/esm/packages/api-client/models/link.js.map +0 -1
  245. package/esm/packages/api-client/models/note.d.ts +0 -38
  246. package/esm/packages/api-client/models/note.js +0 -2
  247. package/esm/packages/api-client/models/note.js.map +0 -1
  248. package/esm/packages/api-client/models/page.d.ts +0 -14
  249. package/esm/packages/api-client/models/page.js +0 -7
  250. package/esm/packages/api-client/models/page.js.map +0 -1
  251. package/esm/packages/api-client/models/post.d.ts +0 -17
  252. package/esm/packages/api-client/models/post.js +0 -2
  253. package/esm/packages/api-client/models/post.js.map +0 -1
  254. package/esm/packages/api-client/models/project.d.ts +0 -11
  255. package/esm/packages/api-client/models/project.js +0 -2
  256. package/esm/packages/api-client/models/project.js.map +0 -1
  257. package/esm/packages/api-client/models/recently.d.ts +0 -20
  258. package/esm/packages/api-client/models/recently.js +0 -7
  259. package/esm/packages/api-client/models/recently.js.map +0 -1
  260. package/esm/packages/api-client/models/say.d.ts +0 -6
  261. package/esm/packages/api-client/models/say.js +0 -2
  262. package/esm/packages/api-client/models/say.js.map +0 -1
  263. package/esm/packages/api-client/models/setting.d.ts +0 -66
  264. package/esm/packages/api-client/models/setting.js +0 -2
  265. package/esm/packages/api-client/models/setting.js.map +0 -1
  266. package/esm/packages/api-client/models/snippet.d.ts +0 -18
  267. package/esm/packages/api-client/models/snippet.js +0 -8
  268. package/esm/packages/api-client/models/snippet.js.map +0 -1
  269. package/esm/packages/api-client/models/subscribe.d.ts +0 -3
  270. package/esm/packages/api-client/models/subscribe.js +0 -2
  271. package/esm/packages/api-client/models/subscribe.js.map +0 -1
  272. package/esm/packages/api-client/models/topic.d.ts +0 -8
  273. package/esm/packages/api-client/models/topic.js +0 -2
  274. package/esm/packages/api-client/models/topic.js.map +0 -1
  275. package/esm/packages/api-client/models/user.d.ts +0 -21
  276. package/esm/packages/api-client/models/user.js +0 -2
  277. package/esm/packages/api-client/models/user.js.map +0 -1
  278. package/esm/packages/api-client/tsup.config.d.ts +0 -2
  279. package/esm/packages/api-client/tsup.config.js +0 -14
  280. package/esm/packages/api-client/tsup.config.js.map +0 -1
  281. package/esm/packages/api-client/utils/auto-bind.d.ts +0 -4
  282. package/esm/packages/api-client/utils/auto-bind.js +0 -36
  283. package/esm/packages/api-client/utils/auto-bind.js.map +0 -1
  284. package/esm/packages/api-client/utils/camelcase-keys.d.ts +0 -6
  285. package/esm/packages/api-client/utils/camelcase-keys.js +0 -23
  286. package/esm/packages/api-client/utils/camelcase-keys.js.map +0 -1
  287. package/esm/packages/api-client/utils/index.d.ts +0 -5
  288. package/esm/packages/api-client/utils/index.js +0 -43
  289. package/esm/packages/api-client/utils/index.js.map +0 -1
  290. package/esm/packages/api-client/utils/path.d.ts +0 -1
  291. package/esm/packages/api-client/utils/path.js +0 -7
  292. package/esm/packages/api-client/utils/path.js.map +0 -1
  293. package/esm/packages/api-client/vitest.config.d.ts +0 -2
  294. package/esm/packages/api-client/vitest.config.js +0 -15
  295. package/esm/packages/api-client/vitest.config.js.map +0 -1
@@ -1,1004 +0,0 @@
1
- /* eslint-disable */
2
- window.PR_SHOULD_USE_CONTINUATION = true
3
- ;(function () {
4
- var h = ['break,continue,do,else,for,if,return,while']
5
- var u = [
6
- h,
7
- 'auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile',
8
- ]
9
- var p = [
10
- u,
11
- 'catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof',
12
- ]
13
- var l = [
14
- p,
15
- 'alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where',
16
- ]
17
- var x = [
18
- p,
19
- 'abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient',
20
- ]
21
- var R = [
22
- x,
23
- 'as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var',
24
- ]
25
- var r =
26
- 'all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes'
27
- var w = [
28
- p,
29
- 'debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN',
30
- ]
31
- var s =
32
- 'caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END'
33
- var I = [
34
- h,
35
- 'and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None',
36
- ]
37
- var f = [
38
- h,
39
- 'alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END',
40
- ]
41
- var H = [h, 'case,done,elif,esac,eval,fi,function,in,local,set,then,until']
42
- var A = [l, R, w, s + I, f, H]
43
- var e =
44
- /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/
45
- var C = 'str'
46
- var z = 'kwd'
47
- var j = 'com'
48
- var O = 'typ'
49
- var G = 'lit'
50
- var L = 'pun'
51
- var F = 'pln'
52
- var m = 'tag'
53
- var E = 'dec'
54
- var J = 'src'
55
- var P = 'atn'
56
- var n = 'atv'
57
- var N = 'nocode'
58
- var M =
59
- '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*'
60
- function k(Z) {
61
- var ad = 0
62
- var S = false
63
- var ac = false
64
- for (var V = 0, U = Z.length; V < U; ++V) {
65
- var ae = Z[V]
66
- if (ae.ignoreCase) {
67
- ac = true
68
- } else {
69
- if (
70
- /[a-z]/i.test(
71
- ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''),
72
- )
73
- ) {
74
- S = true
75
- ac = false
76
- break
77
- }
78
- }
79
- }
80
- var Y = { b: 8, t: 9, n: 10, v: 11, f: 12, r: 13 }
81
- function ab(ah) {
82
- var ag = ah.charCodeAt(0)
83
- if (ag !== 92) {
84
- return ag
85
- }
86
- var af = ah.charAt(1)
87
- ag = Y[af]
88
- if (ag) {
89
- return ag
90
- } else {
91
- if ('0' <= af && af <= '7') {
92
- return parseInt(ah.substring(1), 8)
93
- } else {
94
- if (af === 'u' || af === 'x') {
95
- return parseInt(ah.substring(2), 16)
96
- } else {
97
- return ah.charCodeAt(1)
98
- }
99
- }
100
- }
101
- }
102
- function T(af) {
103
- if (af < 32) {
104
- return (af < 16 ? '\\x0' : '\\x') + af.toString(16)
105
- }
106
- var ag = String.fromCharCode(af)
107
- if (ag === '\\' || ag === '-' || ag === '[' || ag === ']') {
108
- ag = '\\' + ag
109
- }
110
- return ag
111
- }
112
- function X(am) {
113
- var aq = am
114
- .substring(1, am.length - 1)
115
- .match(
116
- new RegExp(
117
- '\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]',
118
- 'g',
119
- ),
120
- )
121
- var ak = []
122
- var af = []
123
- var ao = aq[0] === '^'
124
- for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
125
- var ah = aq[ar]
126
- if (/\\[bdsw]/i.test(ah)) {
127
- ak.push(ah)
128
- } else {
129
- var ag = ab(ah)
130
- var al
131
- if (ar + 2 < aj && '-' === aq[ar + 1]) {
132
- al = ab(aq[ar + 2])
133
- ar += 2
134
- } else {
135
- al = ag
136
- }
137
- af.push([ag, al])
138
- if (!(al < 65 || ag > 122)) {
139
- if (!(al < 65 || ag > 90)) {
140
- af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32])
141
- }
142
- if (!(al < 97 || ag > 122)) {
143
- af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32])
144
- }
145
- }
146
- }
147
- }
148
- af.sort(function (av, au) {
149
- return av[0] - au[0] || au[1] - av[1]
150
- })
151
- var ai = []
152
- var ap = [NaN, NaN]
153
- for (var ar = 0; ar < af.length; ++ar) {
154
- var at = af[ar]
155
- if (at[0] <= ap[1] + 1) {
156
- ap[1] = Math.max(ap[1], at[1])
157
- } else {
158
- ai.push((ap = at))
159
- }
160
- }
161
- var an = ['[']
162
- if (ao) {
163
- an.push('^')
164
- }
165
- an.push.apply(an, ak)
166
- for (var ar = 0; ar < ai.length; ++ar) {
167
- var at = ai[ar]
168
- an.push(T(at[0]))
169
- if (at[1] > at[0]) {
170
- if (at[1] + 1 > at[0]) {
171
- an.push('-')
172
- }
173
- an.push(T(at[1]))
174
- }
175
- }
176
- an.push(']')
177
- return an.join('')
178
- }
179
- function W(al) {
180
- var aj = al.source.match(
181
- new RegExp(
182
- '(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)',
183
- 'g',
184
- ),
185
- )
186
- var ah = aj.length
187
- var an = []
188
- for (var ak = 0, am = 0; ak < ah; ++ak) {
189
- var ag = aj[ak]
190
- if (ag === '(') {
191
- ++am
192
- } else {
193
- if ('\\' === ag.charAt(0)) {
194
- var af = +ag.substring(1)
195
- if (af && af <= am) {
196
- an[af] = -1
197
- }
198
- }
199
- }
200
- }
201
- for (var ak = 1; ak < an.length; ++ak) {
202
- if (-1 === an[ak]) {
203
- an[ak] = ++ad
204
- }
205
- }
206
- for (var ak = 0, am = 0; ak < ah; ++ak) {
207
- var ag = aj[ak]
208
- if (ag === '(') {
209
- ++am
210
- if (an[am] === undefined) {
211
- aj[ak] = '(?:'
212
- }
213
- } else {
214
- if ('\\' === ag.charAt(0)) {
215
- var af = +ag.substring(1)
216
- if (af && af <= am) {
217
- aj[ak] = '\\' + an[am]
218
- }
219
- }
220
- }
221
- }
222
- for (var ak = 0, am = 0; ak < ah; ++ak) {
223
- if ('^' === aj[ak] && '^' !== aj[ak + 1]) {
224
- aj[ak] = ''
225
- }
226
- }
227
- if (al.ignoreCase && S) {
228
- for (var ak = 0; ak < ah; ++ak) {
229
- var ag = aj[ak]
230
- var ai = ag.charAt(0)
231
- if (ag.length >= 2 && ai === '[') {
232
- aj[ak] = X(ag)
233
- } else {
234
- if (ai !== '\\') {
235
- aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) {
236
- var ap = ao.charCodeAt(0)
237
- return '[' + String.fromCharCode(ap & ~32, ap | 32) + ']'
238
- })
239
- }
240
- }
241
- }
242
- }
243
- return aj.join('')
244
- }
245
- var aa = []
246
- for (var V = 0, U = Z.length; V < U; ++V) {
247
- var ae = Z[V]
248
- if (ae.global || ae.multiline) {
249
- throw new Error('' + ae)
250
- }
251
- aa.push('(?:' + W(ae) + ')')
252
- }
253
- return new RegExp(aa.join('|'), ac ? 'gi' : 'g')
254
- }
255
- function a(V) {
256
- var U = /(?:^|\s)nocode(?:\s|$)/
257
- var X = []
258
- var T = 0
259
- var Z = []
260
- var W = 0
261
- var S
262
- if (V.currentStyle) {
263
- S = V.currentStyle.whiteSpace
264
- } else {
265
- if (window.getComputedStyle) {
266
- S = document.defaultView
267
- .getComputedStyle(V, null)
268
- .getPropertyValue('white-space')
269
- }
270
- }
271
- var Y = S && 'pre' === S.substring(0, 3)
272
- function aa(ab) {
273
- switch (ab.nodeType) {
274
- case 1:
275
- if (U.test(ab.className)) {
276
- return
277
- }
278
- for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
279
- aa(ae)
280
- }
281
- var ad = ab.nodeName
282
- if ('BR' === ad || 'LI' === ad) {
283
- X[W] = '\n'
284
- Z[W << 1] = T++
285
- Z[(W++ << 1) | 1] = ab
286
- }
287
- break
288
- case 3:
289
- case 4:
290
- var ac = ab.nodeValue
291
- if (ac.length) {
292
- if (!Y) {
293
- ac = ac.replace(/[ \t\r\n]+/g, ' ')
294
- } else {
295
- ac = ac.replace(/\r\n?/g, '\n')
296
- }
297
- X[W] = ac
298
- Z[W << 1] = T
299
- T += ac.length
300
- Z[(W++ << 1) | 1] = ab
301
- }
302
- break
303
- }
304
- }
305
- aa(V)
306
- return { sourceCode: X.join('').replace(/\n$/, ''), spans: Z }
307
- }
308
- function B(S, U, W, T) {
309
- if (!U) {
310
- return
311
- }
312
- var V = { sourceCode: U, basePos: S }
313
- W(V)
314
- T.push.apply(T, V.decorations)
315
- }
316
- var v = /\S/
317
- function o(S) {
318
- var V = undefined
319
- for (var U = S.firstChild; U; U = U.nextSibling) {
320
- var T = U.nodeType
321
- V = T === 1 ? (V ? S : U) : T === 3 ? (v.test(U.nodeValue) ? S : V) : V
322
- }
323
- return V === S ? undefined : V
324
- }
325
- function g(U, T) {
326
- var S = {}
327
- var V
328
- ;(function () {
329
- var ad = U.concat(T)
330
- var ah = []
331
- var ag = {}
332
- for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
333
- var Y = ad[ab]
334
- var ac = Y[3]
335
- if (ac) {
336
- for (var ae = ac.length; --ae >= 0; ) {
337
- S[ac.charAt(ae)] = Y
338
- }
339
- }
340
- var af = Y[1]
341
- var aa = '' + af
342
- if (!ag.hasOwnProperty(aa)) {
343
- ah.push(af)
344
- ag[aa] = null
345
- }
346
- }
347
- ah.push(/[\0-\uffff]/)
348
- V = k(ah)
349
- })()
350
- var X = T.length
351
- var W = function (ah) {
352
- var Z = ah.sourceCode,
353
- Y = ah.basePos
354
- var ad = [Y, F]
355
- var af = 0
356
- var an = Z.match(V) || []
357
- var aj = {}
358
- for (var ae = 0, aq = an.length; ae < aq; ++ae) {
359
- var ag = an[ae]
360
- var ap = aj[ag]
361
- var ai = void 0
362
- var am
363
- if (typeof ap === 'string') {
364
- am = false
365
- } else {
366
- var aa = S[ag.charAt(0)]
367
- if (aa) {
368
- ai = ag.match(aa[1])
369
- ap = aa[0]
370
- } else {
371
- for (var ao = 0; ao < X; ++ao) {
372
- aa = T[ao]
373
- ai = ag.match(aa[1])
374
- if (ai) {
375
- ap = aa[0]
376
- break
377
- }
378
- }
379
- if (!ai) {
380
- ap = F
381
- }
382
- }
383
- am = ap.length >= 5 && 'lang-' === ap.substring(0, 5)
384
- if (am && !(ai && typeof ai[1] === 'string')) {
385
- am = false
386
- ap = J
387
- }
388
- if (!am) {
389
- aj[ag] = ap
390
- }
391
- }
392
- var ab = af
393
- af += ag.length
394
- if (!am) {
395
- ad.push(Y + ab, ap)
396
- } else {
397
- var al = ai[1]
398
- var ak = ag.indexOf(al)
399
- var ac = ak + al.length
400
- if (ai[2]) {
401
- ac = ag.length - ai[2].length
402
- ak = ac - al.length
403
- }
404
- var ar = ap.substring(5)
405
- B(Y + ab, ag.substring(0, ak), W, ad)
406
- B(Y + ab + ak, al, q(ar, al), ad)
407
- B(Y + ab + ac, ag.substring(ac), W, ad)
408
- }
409
- }
410
- ah.decorations = ad
411
- }
412
- return W
413
- }
414
- function i(T) {
415
- var W = [],
416
- S = []
417
- if (T.tripleQuotedStrings) {
418
- W.push([
419
- C,
420
- /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
421
- null,
422
- '\'"',
423
- ])
424
- } else {
425
- if (T.multiLineStrings) {
426
- W.push([
427
- C,
428
- /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
429
- null,
430
- '\'"`',
431
- ])
432
- } else {
433
- W.push([
434
- C,
435
- /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
436
- null,
437
- '"\'',
438
- ])
439
- }
440
- }
441
- if (T.verbatimStrings) {
442
- S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null])
443
- }
444
- var Y = T.hashComments
445
- if (Y) {
446
- if (T.cStyleComments) {
447
- if (Y > 1) {
448
- W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#'])
449
- } else {
450
- W.push([
451
- j,
452
- /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
453
- null,
454
- '#',
455
- ])
456
- }
457
- S.push([
458
- C,
459
- /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
460
- null,
461
- ])
462
- } else {
463
- W.push([j, /^#[^\r\n]*/, null, '#'])
464
- }
465
- }
466
- if (T.cStyleComments) {
467
- S.push([j, /^\/\/[^\r\n]*/, null])
468
- S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null])
469
- }
470
- if (T.regexLiterals) {
471
- var X =
472
- '/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/'
473
- S.push(['lang-regex', new RegExp('^' + M + '(' + X + ')')])
474
- }
475
- var V = T.types
476
- if (V) {
477
- S.push([O, V])
478
- }
479
- var U = ('' + T.keywords).replace(/^ | $/g, '')
480
- if (U.length) {
481
- S.push([z, new RegExp('^(?:' + U.replace(/[\s,]+/g, '|') + ')\\b'), null])
482
- }
483
- W.push([F, /^\s+/, null, ' \r\n\t\xA0'])
484
- S.push(
485
- [G, /^@[a-z_$][a-z_$@0-9]*/i, null],
486
- [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
487
- [F, /^[a-z_$][a-z_$@0-9]*/i, null],
488
- [
489
- G,
490
- new RegExp(
491
- '^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*',
492
- 'i',
493
- ),
494
- null,
495
- '0123456789',
496
- ],
497
- [F, /^\\[\s\S]?/, null],
498
- [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null],
499
- )
500
- return g(W, S)
501
- }
502
- var K = i({
503
- keywords: A,
504
- hashComments: true,
505
- cStyleComments: true,
506
- multiLineStrings: true,
507
- regexLiterals: true,
508
- })
509
- function Q(V, ag) {
510
- var U = /(?:^|\s)nocode(?:\s|$)/
511
- var ab = /\r\n?|\n/
512
- var ac = V.ownerDocument
513
- var S
514
- if (V.currentStyle) {
515
- S = V.currentStyle.whiteSpace
516
- } else {
517
- if (window.getComputedStyle) {
518
- S = ac.defaultView
519
- .getComputedStyle(V, null)
520
- .getPropertyValue('white-space')
521
- }
522
- }
523
- var Z = S && 'pre' === S.substring(0, 3)
524
- var af = ac.createElement('LI')
525
- while (V.firstChild) {
526
- af.appendChild(V.firstChild)
527
- }
528
- var W = [af]
529
- function ae(al) {
530
- switch (al.nodeType) {
531
- case 1:
532
- if (U.test(al.className)) {
533
- break
534
- }
535
- if ('BR' === al.nodeName) {
536
- ad(al)
537
- if (al.parentNode) {
538
- al.parentNode.removeChild(al)
539
- }
540
- } else {
541
- for (var an = al.firstChild; an; an = an.nextSibling) {
542
- ae(an)
543
- }
544
- }
545
- break
546
- case 3:
547
- case 4:
548
- if (Z) {
549
- var am = al.nodeValue
550
- var aj = am.match(ab)
551
- if (aj) {
552
- var ai = am.substring(0, aj.index)
553
- al.nodeValue = ai
554
- var ah = am.substring(aj.index + aj[0].length)
555
- if (ah) {
556
- var ak = al.parentNode
557
- ak.insertBefore(ac.createTextNode(ah), al.nextSibling)
558
- }
559
- ad(al)
560
- if (!ai) {
561
- al.parentNode.removeChild(al)
562
- }
563
- }
564
- }
565
- break
566
- }
567
- }
568
- function ad(ak) {
569
- while (!ak.nextSibling) {
570
- ak = ak.parentNode
571
- if (!ak) {
572
- return
573
- }
574
- }
575
- function ai(al, ar) {
576
- var aq = ar ? al.cloneNode(false) : al
577
- var ao = al.parentNode
578
- if (ao) {
579
- var ap = ai(ao, 1)
580
- var an = al.nextSibling
581
- ap.appendChild(aq)
582
- for (var am = an; am; am = an) {
583
- an = am.nextSibling
584
- ap.appendChild(am)
585
- }
586
- }
587
- return aq
588
- }
589
- var ah = ai(ak.nextSibling, 0)
590
- for (var aj; (aj = ah.parentNode) && aj.nodeType === 1; ) {
591
- ah = aj
592
- }
593
- W.push(ah)
594
- }
595
- for (var Y = 0; Y < W.length; ++Y) {
596
- ae(W[Y])
597
- }
598
- if (ag === (ag | 0)) {
599
- W[0].setAttribute('value', ag)
600
- }
601
- var aa = ac.createElement('OL')
602
- aa.className = 'linenums'
603
- var X = Math.max(0, (ag - 1) | 0) || 0
604
- for (var Y = 0, T = W.length; Y < T; ++Y) {
605
- af = W[Y]
606
- af.className = 'L' + ((Y + X) % 10)
607
- if (!af.firstChild) {
608
- af.appendChild(ac.createTextNode('\xA0'))
609
- }
610
- aa.appendChild(af)
611
- }
612
- V.appendChild(aa)
613
- }
614
- function D(ac) {
615
- var aj = /\bMSIE\b/.test(navigator.userAgent)
616
- var am = /\n/g
617
- var al = ac.sourceCode
618
- var an = al.length
619
- var V = 0
620
- var aa = ac.spans
621
- var T = aa.length
622
- var ah = 0
623
- var X = ac.decorations
624
- var Y = X.length
625
- var Z = 0
626
- X[Y] = an
627
- var ar, aq
628
- for (aq = ar = 0; aq < Y; ) {
629
- if (X[aq] !== X[aq + 2]) {
630
- X[ar++] = X[aq++]
631
- X[ar++] = X[aq++]
632
- } else {
633
- aq += 2
634
- }
635
- }
636
- Y = ar
637
- for (aq = ar = 0; aq < Y; ) {
638
- var at = X[aq]
639
- var ab = X[aq + 1]
640
- var W = aq + 2
641
- while (W + 2 <= Y && X[W + 1] === ab) {
642
- W += 2
643
- }
644
- X[ar++] = at
645
- X[ar++] = ab
646
- aq = W
647
- }
648
- Y = X.length = ar
649
- var ae = null
650
- while (ah < T) {
651
- var af = aa[ah]
652
- var S = aa[ah + 2] || an
653
- var ag = X[Z]
654
- var ap = X[Z + 2] || an
655
- var W = Math.min(S, ap)
656
- var ak = aa[ah + 1]
657
- var U
658
- if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
659
- if (aj) {
660
- U = U.replace(am, '\r')
661
- }
662
- ak.nodeValue = U
663
- var ai = ak.ownerDocument
664
- var ao = ai.createElement('SPAN')
665
- ao.className = X[Z + 1]
666
- var ad = ak.parentNode
667
- ad.replaceChild(ao, ak)
668
- ao.appendChild(ak)
669
- if (V < S) {
670
- aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S))
671
- ad.insertBefore(ak, ao.nextSibling)
672
- }
673
- }
674
- V = W
675
- if (V >= S) {
676
- ah += 2
677
- }
678
- if (V >= ap) {
679
- Z += 2
680
- }
681
- }
682
- }
683
- var t = {}
684
- function c(U, V) {
685
- for (var S = V.length; --S >= 0; ) {
686
- var T = V[S]
687
- if (!t.hasOwnProperty(T)) {
688
- t[T] = U
689
- } else {
690
- if (window.console) {
691
- console.warn('cannot override language handler %s', T)
692
- }
693
- }
694
- }
695
- }
696
- function q(T, S) {
697
- if (!(T && t.hasOwnProperty(T))) {
698
- T = /^\s*</.test(S) ? 'default-markup' : 'default-code'
699
- }
700
- return t[T]
701
- }
702
- c(K, ['default-code'])
703
- c(
704
- g(
705
- [],
706
- [
707
- [F, /^[^<?]+/],
708
- [E, /^<!\w[^>]*(?:>|$)/],
709
- [j, /^<\!--[\s\S]*?(?:-\->|$)/],
710
- ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
711
- ['lang-', /^<%([\s\S]+?)(?:%>|$)/],
712
- [L, /^(?:<[%?]|[%?]>)/],
713
- ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
714
- ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
715
- ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
716
- ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i],
717
- ],
718
- ),
719
- ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl'],
720
- )
721
- c(
722
- g(
723
- [
724
- [F, /^[\s]+/, null, ' \t\r\n'],
725
- [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '"\''],
726
- ],
727
- [
728
- [m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
729
- [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
730
- ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
731
- [L, /^[=<>\/]+/],
732
- ['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i],
733
- ['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i],
734
- ['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i],
735
- ['lang-css', /^style\s*=\s*\"([^\"]+)\"/i],
736
- ['lang-css', /^style\s*=\s*\'([^\']+)\'/i],
737
- ['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i],
738
- ],
739
- ),
740
- ['in.tag'],
741
- )
742
- c(g([], [[n, /^[\s\S]+/]]), ['uq.val'])
743
- c(i({ keywords: l, hashComments: true, cStyleComments: true, types: e }), [
744
- 'c',
745
- 'cc',
746
- 'cpp',
747
- 'cxx',
748
- 'cyc',
749
- 'm',
750
- ])
751
- c(i({ keywords: 'null,true,false' }), ['json'])
752
- c(
753
- i({
754
- keywords: R,
755
- hashComments: true,
756
- cStyleComments: true,
757
- verbatimStrings: true,
758
- types: e,
759
- }),
760
- ['cs'],
761
- )
762
- c(i({ keywords: x, cStyleComments: true }), ['java'])
763
- c(i({ keywords: H, hashComments: true, multiLineStrings: true }), [
764
- 'bsh',
765
- 'csh',
766
- 'sh',
767
- ])
768
- c(
769
- i({
770
- keywords: I,
771
- hashComments: true,
772
- multiLineStrings: true,
773
- tripleQuotedStrings: true,
774
- }),
775
- ['cv', 'py'],
776
- )
777
- c(
778
- i({
779
- keywords: s,
780
- hashComments: true,
781
- multiLineStrings: true,
782
- regexLiterals: true,
783
- }),
784
- ['perl', 'pl', 'pm'],
785
- )
786
- c(
787
- i({
788
- keywords: f,
789
- hashComments: true,
790
- multiLineStrings: true,
791
- regexLiterals: true,
792
- }),
793
- ['rb'],
794
- )
795
- c(i({ keywords: w, cStyleComments: true, regexLiterals: true }), ['js'])
796
- c(
797
- i({
798
- keywords: r,
799
- hashComments: 3,
800
- cStyleComments: true,
801
- multilineStrings: true,
802
- tripleQuotedStrings: true,
803
- regexLiterals: true,
804
- }),
805
- ['coffee'],
806
- )
807
- c(g([], [[C, /^[\s\S]+/]]), ['regex'])
808
- function d(V) {
809
- var U = V.langExtension
810
- try {
811
- var S = a(V.sourceNode)
812
- var T = S.sourceCode
813
- V.sourceCode = T
814
- V.spans = S.spans
815
- V.basePos = 0
816
- q(U, T)(V)
817
- D(V)
818
- } catch (W) {
819
- if ('console' in window) {
820
- console.log(W && W.stack ? W.stack : W)
821
- }
822
- }
823
- }
824
- function y(W, V, U) {
825
- var S = document.createElement('PRE')
826
- S.innerHTML = W
827
- if (U) {
828
- Q(S, U)
829
- }
830
- var T = { langExtension: V, numberLines: U, sourceNode: S }
831
- d(T)
832
- return S.innerHTML
833
- }
834
- function b(ad) {
835
- function Y(af) {
836
- return document.getElementsByTagName(af)
837
- }
838
- var ac = [Y('pre'), Y('code'), Y('xmp')]
839
- var T = []
840
- for (var aa = 0; aa < ac.length; ++aa) {
841
- for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
842
- T.push(ac[aa][Z])
843
- }
844
- }
845
- ac = null
846
- var W = Date
847
- if (!W.now) {
848
- W = {
849
- now: function () {
850
- return +new Date()
851
- },
852
- }
853
- }
854
- var X = 0
855
- var S
856
- var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/
857
- var ae = /\bprettyprint\b/
858
- function U() {
859
- var ag = window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity
860
- for (; X < T.length && W.now() < ag; X++) {
861
- var aj = T[X]
862
- var ai = aj.className
863
- if (ai.indexOf('prettyprint') >= 0) {
864
- var ah = ai.match(ab)
865
- var am
866
- if (!ah && (am = o(aj)) && 'CODE' === am.tagName) {
867
- ah = am.className.match(ab)
868
- }
869
- if (ah) {
870
- ah = ah[1]
871
- }
872
- var al = false
873
- for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
874
- if (
875
- (ak.tagName === 'pre' ||
876
- ak.tagName === 'code' ||
877
- ak.tagName === 'xmp') &&
878
- ak.className &&
879
- ak.className.indexOf('prettyprint') >= 0
880
- ) {
881
- al = true
882
- break
883
- }
884
- }
885
- if (!al) {
886
- var af = aj.className.match(/\blinenums\b(?::(\d+))?/)
887
- af = af ? (af[1] && af[1].length ? +af[1] : true) : false
888
- if (af) {
889
- Q(aj, af)
890
- }
891
- S = { langExtension: ah, sourceNode: aj, numberLines: af }
892
- d(S)
893
- }
894
- }
895
- }
896
- if (X < T.length) {
897
- setTimeout(U, 250)
898
- } else {
899
- if (ad) {
900
- ad()
901
- }
902
- }
903
- }
904
- U()
905
- }
906
- window.prettyPrintOne = y
907
- window.prettyPrint = b
908
- window.PR = {
909
- createSimpleLexer: g,
910
- registerLangHandler: c,
911
- sourceDecorator: i,
912
- PR_ATTRIB_NAME: P,
913
- PR_ATTRIB_VALUE: n,
914
- PR_COMMENT: j,
915
- PR_DECLARATION: E,
916
- PR_KEYWORD: z,
917
- PR_LITERAL: G,
918
- PR_NOCODE: N,
919
- PR_PLAIN: F,
920
- PR_PUNCTUATION: L,
921
- PR_SOURCE: J,
922
- PR_STRING: C,
923
- PR_TAG: m,
924
- PR_TYPE: O,
925
- }
926
- })()
927
- PR.registerLangHandler(
928
- PR.createSimpleLexer(
929
- [],
930
- [
931
- [PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
932
- [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/],
933
- [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
934
- ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
935
- ['lang-', /^<%([\s\S]+?)(?:%>|$)/],
936
- ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
937
- [
938
- 'lang-handlebars',
939
- /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i,
940
- ],
941
- ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
942
- ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
943
- ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i],
944
- [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/],
945
- [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/],
946
- [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/],
947
- [PR.PR_COMMENT, /^{{![^}]*}}/],
948
- ],
949
- ),
950
- ['handlebars', 'hbs'],
951
- )
952
- PR.registerLangHandler(
953
- PR.createSimpleLexer(
954
- [[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, ' \t\r\n\f']],
955
- [
956
- [
957
- PR.PR_STRING,
958
- /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,
959
- null,
960
- ],
961
- [
962
- PR.PR_STRING,
963
- /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,
964
- null,
965
- ],
966
- ['lang-css-str', /^url\(([^\)\"\']*)\)/i],
967
- [
968
- PR.PR_KEYWORD,
969
- /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,
970
- null,
971
- ],
972
- [
973
- 'lang-css-kw',
974
- /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i,
975
- ],
976
- [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
977
- [PR.PR_COMMENT, /^(?:<!--|-->)/],
978
- [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
979
- [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i],
980
- [
981
- PR.PR_PLAIN,
982
- /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i,
983
- ],
984
- [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/],
985
- ],
986
- ),
987
- ['css'],
988
- )
989
- PR.registerLangHandler(
990
- PR.createSimpleLexer(
991
- [],
992
- [
993
- [
994
- PR.PR_KEYWORD,
995
- /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i,
996
- ],
997
- ],
998
- ),
999
- ['css-kw'],
1000
- )
1001
- PR.registerLangHandler(
1002
- PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]),
1003
- ['css-str'],
1004
- )