earthsdk3-assets 3.0.0 → 3.0.1
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.
- package/markdown/marked/css/app.css +573 -0
- package/markdown/marked/index.html +80 -0
- package/markdown/marked/js/marked.js +1 -0
- package/markdown/marked/js/prism.js +7 -0
- package/markdown/monaco-editor/html-editor.html +124 -0
- package/markdown/monaco-editor/js/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/markdown/monaco-editor/js/min/vs/base/worker/workerMain.js +22 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/abap/abap.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/apex/apex.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/azcli/azcli.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/bat/bat.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/bicep/bicep.js +11 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/cameligo/cameligo.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/clojure/clojure.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/coffee/coffee.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/cpp/cpp.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/csharp/csharp.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/csp/csp.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/css/css.js +12 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/dart/dart.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/dockerfile/dockerfile.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/ecl/ecl.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/elixir/elixir.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/flow9/flow9.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/freemarker2/freemarker2.js +12 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/fsharp/fsharp.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/go/go.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/graphql/graphql.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/handlebars/handlebars.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/hcl/hcl.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/html/html.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/ini/ini.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/java/java.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/javascript/javascript.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/julia/julia.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/kotlin/kotlin.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/less/less.js +11 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/lexon/lexon.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/liquid/liquid.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/lua/lua.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/m3/m3.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/markdown/markdown.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/mips/mips.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/msdax/msdax.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/mysql/mysql.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/objective-c/objective-c.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/pascal/pascal.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/pascaligo/pascaligo.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/perl/perl.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/pgsql/pgsql.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/php/php.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/pla/pla.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/postiats/postiats.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/powerquery/powerquery.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/powershell/powershell.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/protobuf/protobuf.js +11 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/pug/pug.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/python/python.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/qsharp/qsharp.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/r/r.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/razor/razor.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/redis/redis.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/redshift/redshift.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/ruby/ruby.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/rust/rust.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/sb/sb.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/scala/scala.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/scheme/scheme.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/scss/scss.js +12 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/shell/shell.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/solidity/solidity.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/sophia/sophia.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/sparql/sparql.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/sql/sql.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/st/st.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/swift/swift.js +13 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/systemverilog/systemverilog.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/tcl/tcl.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/twig/twig.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/typescript/typescript.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/vb/vb.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/xml/xml.js +10 -0
- package/markdown/monaco-editor/js/min/vs/basic-languages/yaml/yaml.js +10 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.css +6 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.js +805 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.de.js +29 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.es.js +29 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.fr.js +27 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.it.js +27 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.ja.js +29 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.js +27 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.ko.js +27 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.ru.js +29 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.zh-cn.js +29 -0
- package/markdown/monaco-editor/js/min/vs/editor/editor.main.nls.zh-tw.js +27 -0
- package/markdown/monaco-editor/js/min/vs/language/css/cssMode.js +13 -0
- package/markdown/monaco-editor/js/min/vs/language/css/cssWorker.js +63 -0
- package/markdown/monaco-editor/js/min/vs/language/html/htmlMode.js +13 -0
- package/markdown/monaco-editor/js/min/vs/language/html/htmlWorker.js +453 -0
- package/markdown/monaco-editor/js/min/vs/language/json/jsonMode.js +15 -0
- package/markdown/monaco-editor/js/min/vs/language/json/jsonWorker.js +36 -0
- package/markdown/monaco-editor/js/min/vs/language/typescript/tsMode.js +20 -0
- package/markdown/monaco-editor/js/min/vs/language/typescript/tsWorker.js +33970 -0
- package/markdown/monaco-editor/js/min/vs/loader.js +11 -0
- package/markdown/monaco-editor/js-editor.html +124 -0
- package/markdown/monaco-editor/json-editor.html +126 -0
- package/package.json +4 -3
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
/* General Setting */
|
|
2
|
+
|
|
3
|
+
/* Small screens (default) */
|
|
4
|
+
html {
|
|
5
|
+
font-size: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Medium screens (640px) */
|
|
9
|
+
@media (min-width: 40rem) {
|
|
10
|
+
html {
|
|
11
|
+
font-size: 112%;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Large screens (1024px) */
|
|
16
|
+
@media (min-width: 64rem) {
|
|
17
|
+
html {
|
|
18
|
+
font-size: 120%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Grid */
|
|
23
|
+
|
|
24
|
+
/* Ditto */
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
color: #fff;
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
|
|
31
|
+
font-family: Verdana, Arial;
|
|
32
|
+
font-size: 0.8rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#sidebar {
|
|
36
|
+
margin-top: 0;
|
|
37
|
+
padding-left: 25px;
|
|
38
|
+
padding-bottom: 25px;
|
|
39
|
+
padding-top: 25px;
|
|
40
|
+
|
|
41
|
+
box-shadow: 0 0 40px #CCC;
|
|
42
|
+
-webkit-box-shadow: 0 0 40px #CCC;
|
|
43
|
+
-moz-box-shadow: 0 0 40px #CCC;
|
|
44
|
+
border-right: 1px solid #BBB;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (min-width: 40rem) {
|
|
48
|
+
#sidebar {
|
|
49
|
+
width: 280px;
|
|
50
|
+
position: fixed;
|
|
51
|
+
height: 100%;
|
|
52
|
+
margin-right: 20px;
|
|
53
|
+
padding-bottom: 0px;
|
|
54
|
+
padding-top: 0px;
|
|
55
|
+
overflow-y: scroll;
|
|
56
|
+
overflow: -moz-scrollbars-vertical;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#sidebar h1 {
|
|
61
|
+
font-size: 25px;
|
|
62
|
+
margin-bottom: 0px;
|
|
63
|
+
padding-bottom: 0px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#sidebar h1 a:link,
|
|
67
|
+
#sidebar h1 a:visited {
|
|
68
|
+
color: #333;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#sidebar h2 {
|
|
72
|
+
font-size: 0.7rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#sidebar h5 {
|
|
76
|
+
margin-top: 20px;
|
|
77
|
+
margin-bottom: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#sidebar a:visited,
|
|
81
|
+
#sidebar a:link {
|
|
82
|
+
color: #4682BE;
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
#sidebar ul {
|
|
87
|
+
list-style-type: none;
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding-left: 10px;
|
|
90
|
+
padding-top: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#sidebar ol {
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding-left: 30px;
|
|
96
|
+
padding-top: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
#sidebar ul li:before {
|
|
100
|
+
/* a hack to have dashes as a list style */
|
|
101
|
+
content: "-";
|
|
102
|
+
position: relative;
|
|
103
|
+
left: -5px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#sidebar ul li,
|
|
107
|
+
#sidebar ol li {
|
|
108
|
+
margin-top: 0;
|
|
109
|
+
margin-bottom: 0.2rem;
|
|
110
|
+
margin-left: 10px;
|
|
111
|
+
padding: 0;
|
|
112
|
+
|
|
113
|
+
text-indent: -5px;
|
|
114
|
+
/* to compensate for the padding for the dash */
|
|
115
|
+
font-size: 0.7rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
form.searchBox {
|
|
119
|
+
width: 180px;
|
|
120
|
+
border: 1px solid #4682BE;
|
|
121
|
+
height: 20px;
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
input[type=search] {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: 0;
|
|
128
|
+
left: 0;
|
|
129
|
+
width: 160px;
|
|
130
|
+
height: 18px;
|
|
131
|
+
text-align: left;
|
|
132
|
+
border: none;
|
|
133
|
+
outline: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
input.searchButton {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 0;
|
|
139
|
+
left: 160px;
|
|
140
|
+
height: 18px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#content {
|
|
144
|
+
font-size: 0.8rem;
|
|
145
|
+
line-height: 1.3rem;
|
|
146
|
+
counter-reset: section;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (min-width: 40rem) {
|
|
150
|
+
#content {
|
|
151
|
+
margin-left: 0px;
|
|
152
|
+
margin-right: 0px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#content pre {
|
|
157
|
+
margin-left: auto;
|
|
158
|
+
margin-right: auto;
|
|
159
|
+
padding-top: 10px;
|
|
160
|
+
padding-bottom: 10px;
|
|
161
|
+
padding-left: 0.7rem;
|
|
162
|
+
line-height: 1.2;
|
|
163
|
+
|
|
164
|
+
color: #FFF;
|
|
165
|
+
|
|
166
|
+
background: #111;
|
|
167
|
+
border-radius: 5px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
#content code {
|
|
171
|
+
color: #a6e22e;
|
|
172
|
+
font-size: 0.7rem;
|
|
173
|
+
font-weight: normal;
|
|
174
|
+
font-family: Consolas, "Courier New", Courier, FreeMono, monospace;
|
|
175
|
+
|
|
176
|
+
background: #111;
|
|
177
|
+
border-radius: 2px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#content p code,
|
|
181
|
+
#content li>code,
|
|
182
|
+
#content h2>code,
|
|
183
|
+
#content h3>code {
|
|
184
|
+
padding-left: 3px;
|
|
185
|
+
padding-right: 3px;
|
|
186
|
+
color: #c7254e;
|
|
187
|
+
background: #f9f2f4;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
#content h2 {
|
|
191
|
+
padding-bottom: 0px;
|
|
192
|
+
font-size: 18px;
|
|
193
|
+
text-align: left;
|
|
194
|
+
counter-increment: section;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
#content h2:before {
|
|
198
|
+
content: counter(section) ". ";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
#content h3 {
|
|
202
|
+
margin-bottom: 0px;
|
|
203
|
+
padding-bottom: 0px;
|
|
204
|
+
text-align: left;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
#content h2:hover,
|
|
208
|
+
#content h3:hover {
|
|
209
|
+
color: #ED1C24;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
#content img {
|
|
213
|
+
max-width: 90%;
|
|
214
|
+
display: block;
|
|
215
|
+
|
|
216
|
+
margin-left: auto;
|
|
217
|
+
margin-right: auto;
|
|
218
|
+
margin-top: 40px;
|
|
219
|
+
margin-bottom: 40px;
|
|
220
|
+
|
|
221
|
+
border-radius: 5px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
#content ul {
|
|
225
|
+
display: block;
|
|
226
|
+
list-style-type: none;
|
|
227
|
+
padding-top: 0.5rem;
|
|
228
|
+
padding-bottom: 0.5rem;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#content ol {
|
|
232
|
+
display: block;
|
|
233
|
+
padding-top: 0.5rem;
|
|
234
|
+
padding-bottom: 0.5rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
#content ul li:before {
|
|
239
|
+
/* a hack to have dashes as a list style */
|
|
240
|
+
content: "-";
|
|
241
|
+
position: relative;
|
|
242
|
+
left: -5px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
#content ul li,
|
|
246
|
+
#content ol li {
|
|
247
|
+
text-indent: -5px;
|
|
248
|
+
/* to compensate for the padding for the dash */
|
|
249
|
+
font-size: 0.8rem;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
#content ul li.link,
|
|
253
|
+
#content ol li.link {
|
|
254
|
+
color: #2980b9;
|
|
255
|
+
text-decoration: none;
|
|
256
|
+
font-size: 0.7rem;
|
|
257
|
+
font-weight: bold;
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
#content a:link,
|
|
262
|
+
#content a:visited {
|
|
263
|
+
color: #4682BE;
|
|
264
|
+
text-decoration: none;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
#content .content-toc {
|
|
268
|
+
background: #bdc3c7;
|
|
269
|
+
border-radius: 5px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
#content table {
|
|
273
|
+
display: block;
|
|
274
|
+
width: 100%;
|
|
275
|
+
overflow: auto;
|
|
276
|
+
word-break: normal;
|
|
277
|
+
word-break: keep-all
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
#content table th {
|
|
281
|
+
font-weight: bold
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#content table th,
|
|
285
|
+
#content table td {
|
|
286
|
+
padding: 6px 13px;
|
|
287
|
+
border: 1px solid #ddd
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#content table tr {
|
|
291
|
+
background-color: #fff;
|
|
292
|
+
border-top: 1px solid #ccc
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
#content table tr:nth-child(2n) {
|
|
296
|
+
background-color: #f8f8f8
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#back_to_top {
|
|
300
|
+
display: none;
|
|
301
|
+
position: fixed;
|
|
302
|
+
|
|
303
|
+
height: 20px;
|
|
304
|
+
width: 70px;
|
|
305
|
+
top: 20px;
|
|
306
|
+
|
|
307
|
+
margin-left: 930px;
|
|
308
|
+
margin-top: 0px;
|
|
309
|
+
|
|
310
|
+
color: #FFF;
|
|
311
|
+
line-height: 20px;
|
|
312
|
+
text-align: center;
|
|
313
|
+
font-size: 10px;
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
border-radius: 5px;
|
|
317
|
+
background-color: #AAA;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
#back_to_top:hover {
|
|
321
|
+
background-color: #444;
|
|
322
|
+
cursor: pointer;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
#edit {
|
|
326
|
+
display: none;
|
|
327
|
+
position: fixed;
|
|
328
|
+
|
|
329
|
+
height: 17px;
|
|
330
|
+
width: 70px;
|
|
331
|
+
top: 45px;
|
|
332
|
+
|
|
333
|
+
margin-left: 930px;
|
|
334
|
+
margin-top: 0px;
|
|
335
|
+
|
|
336
|
+
color: #FFF;
|
|
337
|
+
line-height: 17px;
|
|
338
|
+
text-align: center;
|
|
339
|
+
font-size: 10px;
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
border-radius: 5px;
|
|
343
|
+
background-color: #AAA;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
#edit:hover {
|
|
347
|
+
background-color: #444;
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
#theme {
|
|
352
|
+
display: none;
|
|
353
|
+
position: fixed;
|
|
354
|
+
|
|
355
|
+
height: 17px;
|
|
356
|
+
width: 70px;
|
|
357
|
+
top: 70px;
|
|
358
|
+
|
|
359
|
+
margin-left: 930px;
|
|
360
|
+
margin-top: 0px;
|
|
361
|
+
|
|
362
|
+
color: #FFF;
|
|
363
|
+
line-height: 17px;
|
|
364
|
+
text-align: center;
|
|
365
|
+
font-size: 10px;
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
border-radius: 5px;
|
|
369
|
+
background-color: #AAA;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
#theme:hover {
|
|
373
|
+
background-color: #444;
|
|
374
|
+
cursor: pointer;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
#loading,
|
|
378
|
+
#error {
|
|
379
|
+
display: none;
|
|
380
|
+
position: fixed;
|
|
381
|
+
|
|
382
|
+
top: 0;
|
|
383
|
+
height: 17px;
|
|
384
|
+
|
|
385
|
+
font-size: 14px;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@media (min-width: 40rem) {
|
|
389
|
+
|
|
390
|
+
#loading,
|
|
391
|
+
#error {
|
|
392
|
+
display: none;
|
|
393
|
+
position: fixed;
|
|
394
|
+
|
|
395
|
+
height: 17px;
|
|
396
|
+
top: 45%;
|
|
397
|
+
|
|
398
|
+
margin-left: 560px;
|
|
399
|
+
|
|
400
|
+
font-size: 14px;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
#flip {
|
|
405
|
+
position: fixed;
|
|
406
|
+
height: 20px;
|
|
407
|
+
width: 100%;
|
|
408
|
+
bottom: 10px;
|
|
409
|
+
font-size: 10px;
|
|
410
|
+
text-align: center;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
#pageup,
|
|
414
|
+
#pagedown {
|
|
415
|
+
height: 20px;
|
|
416
|
+
width: 70px;
|
|
417
|
+
display: inline-block;
|
|
418
|
+
border-radius: 5px;
|
|
419
|
+
background-color: #AAA;
|
|
420
|
+
text-align: center;
|
|
421
|
+
line-height: 20px;
|
|
422
|
+
color: #FFF;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
#pageup {
|
|
426
|
+
margin-right: 5px;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
#pageup:hover,
|
|
430
|
+
#pagedown:hover {
|
|
431
|
+
background-color: #444;
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
#pagedown {
|
|
436
|
+
margin-left: 5px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@media (min-width: 40rem) {
|
|
440
|
+
#flip {
|
|
441
|
+
margin-left: 545px;
|
|
442
|
+
width: 150px;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.progress-indicator-2 {
|
|
447
|
+
position: fixed;
|
|
448
|
+
top: 0;
|
|
449
|
+
left: 0;
|
|
450
|
+
height: 3px;
|
|
451
|
+
background-color: #0A74DA;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* okaidia theme for JavaScript, CSS and HTML
|
|
456
|
+
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
|
|
457
|
+
* @author ocodia
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
/* PrismJS 1.29.0
|
|
461
|
+
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */
|
|
462
|
+
code[class*=language-],
|
|
463
|
+
pre[class*=language-] {
|
|
464
|
+
color: #ccc;
|
|
465
|
+
background: 0 0;
|
|
466
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
467
|
+
font-size: 1em;
|
|
468
|
+
text-align: left;
|
|
469
|
+
white-space: pre;
|
|
470
|
+
word-spacing: normal;
|
|
471
|
+
word-break: normal;
|
|
472
|
+
word-wrap: normal;
|
|
473
|
+
line-height: 1.5;
|
|
474
|
+
-moz-tab-size: 4;
|
|
475
|
+
-o-tab-size: 4;
|
|
476
|
+
tab-size: 4;
|
|
477
|
+
-webkit-hyphens: none;
|
|
478
|
+
-moz-hyphens: none;
|
|
479
|
+
-ms-hyphens: none;
|
|
480
|
+
hyphens: none
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
pre[class*=language-] {
|
|
484
|
+
padding: 1em;
|
|
485
|
+
margin: .5em 0;
|
|
486
|
+
overflow: auto
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
:not(pre)>code[class*=language-],
|
|
490
|
+
pre[class*=language-] {
|
|
491
|
+
background: #2d2d2d
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
:not(pre)>code[class*=language-] {
|
|
495
|
+
padding: .1em;
|
|
496
|
+
border-radius: .3em;
|
|
497
|
+
white-space: normal
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.token.block-comment,
|
|
501
|
+
.token.cdata,
|
|
502
|
+
.token.comment,
|
|
503
|
+
.token.doctype,
|
|
504
|
+
.token.prolog {
|
|
505
|
+
color: #999
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.token.punctuation {
|
|
509
|
+
color: #ccc
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.token.attr-name,
|
|
513
|
+
.token.deleted,
|
|
514
|
+
.token.namespace,
|
|
515
|
+
.token.tag {
|
|
516
|
+
color: #e2777a
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.token.function-name {
|
|
520
|
+
color: #6196cc
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.token.boolean,
|
|
524
|
+
.token.function,
|
|
525
|
+
.token.number {
|
|
526
|
+
color: #f08d49
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.token.class-name,
|
|
530
|
+
.token.constant,
|
|
531
|
+
.token.property,
|
|
532
|
+
.token.symbol {
|
|
533
|
+
color: #f8c555
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.token.atrule,
|
|
537
|
+
.token.builtin,
|
|
538
|
+
.token.important,
|
|
539
|
+
.token.keyword,
|
|
540
|
+
.token.selector {
|
|
541
|
+
color: #cc99cd
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.token.attr-value,
|
|
545
|
+
.token.char,
|
|
546
|
+
.token.regex,
|
|
547
|
+
.token.string,
|
|
548
|
+
.token.variable {
|
|
549
|
+
color: #7ec699
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.token.entity,
|
|
553
|
+
.token.operator,
|
|
554
|
+
.token.url {
|
|
555
|
+
color: #67cdcc
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.token.bold,
|
|
559
|
+
.token.important {
|
|
560
|
+
font-weight: 700
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.token.italic {
|
|
564
|
+
font-style: italic
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.token.entity {
|
|
568
|
+
cursor: help
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.token.inserted {
|
|
572
|
+
color: green
|
|
573
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
+
<title>示例面板</title>
|
|
9
|
+
<script src="./js/prism.js"></script>
|
|
10
|
+
<script src="./js/marked.js"></script>
|
|
11
|
+
<link href="./css/app.css" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<style>
|
|
14
|
+
html {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
width: calc(100% - 10px);
|
|
22
|
+
height: calc(100% - 10px);
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
pre::-webkit-scrollbar,
|
|
27
|
+
div::-webkit-scrollbar {
|
|
28
|
+
width: 10px;
|
|
29
|
+
height: 10px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
pre::-webkit-scrollbar-track,
|
|
34
|
+
div::-webkit-scrollbar-track {
|
|
35
|
+
background: #00212b;
|
|
36
|
+
opacity: 0.5;
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
pre::-webkit-scrollbar-thumb,
|
|
42
|
+
div::-webkit-scrollbar-thumb {
|
|
43
|
+
background: #3f4347;
|
|
44
|
+
border-radius: 2px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
</style>
|
|
49
|
+
|
|
50
|
+
<body>
|
|
51
|
+
<div id="content" style="width: 100%;height:100%;overflow: auto;">
|
|
52
|
+
</div>
|
|
53
|
+
<script>
|
|
54
|
+
function setHtml(str) {
|
|
55
|
+
const content = document.getElementById('content')
|
|
56
|
+
content.innerHTML = marked(str);
|
|
57
|
+
Prism.highlightAll();
|
|
58
|
+
}
|
|
59
|
+
addEventListener('message', function (messageEvent) {
|
|
60
|
+
const data = messageEvent.data;
|
|
61
|
+
if (!data || !data.type || !data.id) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (data.type === 'setSample') {
|
|
65
|
+
if (typeof data.value !== 'string') {
|
|
66
|
+
console.warn(`typeof data.value !=='string'`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
setHtml(data.value)
|
|
71
|
+
parent.postMessage({ type: 'setSampleReturn', id: data.id, status: 'ok' }, '*');
|
|
72
|
+
} catch (error) {
|
|
73
|
+
parent.postMessage({ type: 'setSampleReturn', id: data.id, status: 'error' }, '*');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, false);
|
|
77
|
+
</script>
|
|
78
|
+
</body>
|
|
79
|
+
|
|
80
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(err){if(err){opt.highlight=highlight;return callback(err)}var out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
|