markdown-komponents 0.3.3 → 0.3.4
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/kotlin-kotlin-stdlib.mjs +1004 -921
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/markdown-komponents.mjs +1093 -630
- package/markdown-komponents.mjs.map +1 -1
- package/package.json +1 -1
package/markdown-komponents.mjs
CHANGED
|
@@ -4,23 +4,29 @@ import {
|
|
|
4
4
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
5
5
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
6
6
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
7
|
+
asList1pji8rwrhkggq as asList,
|
|
8
|
+
setOf45ia9pnfhe90 as setOf,
|
|
9
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
10
|
+
ArrayList3it5z8td81qkl as ArrayList,
|
|
11
|
+
addAll1k27qatfgp3k5 as addAll,
|
|
12
|
+
listOfvhqybd2zx248 as listOf,
|
|
13
|
+
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
7
14
|
toString30pk9tzaqopn as toString,
|
|
8
15
|
hashCodeq5arwsb9dgti as hashCode,
|
|
9
16
|
equals2au1ep9vhcato as equals,
|
|
10
17
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
11
18
|
Regexxgw0gjiagf4z as Regex,
|
|
12
|
-
|
|
19
|
+
toList3jhuyej2anx2q as toList,
|
|
20
|
+
split2bvyvnrlcifjv as split,
|
|
21
|
+
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
13
22
|
to2cs3ny02qtbcb as to,
|
|
14
|
-
asList1pji8rwrhkggq as asList,
|
|
15
23
|
take9j4462mea726 as take,
|
|
16
|
-
split2bvyvnrlcifjv as split,
|
|
17
24
|
getOrNull1go7ef9ldk0df as getOrNull,
|
|
18
25
|
singleOrNullrknfaxokm1sl as singleOrNull,
|
|
19
26
|
isCharSequence1ju9jr1w86plq as isCharSequence,
|
|
20
27
|
trim11nh7r46at6sx as trim,
|
|
21
28
|
toString1pkumu07cwy4m as toString_0,
|
|
22
29
|
singleo93pzdgfc557 as single,
|
|
23
|
-
toList3jhuyej2anx2q as toList,
|
|
24
30
|
isInterface3d6p8outrmvmk as isInterface,
|
|
25
31
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
26
32
|
until1jbpn0z3f8lbg as until,
|
|
@@ -31,8 +37,6 @@ import {
|
|
|
31
37
|
lastIndexOfpmd3ei5son2n as lastIndexOf,
|
|
32
38
|
substring3saq8ornu0luv as substring_0,
|
|
33
39
|
indexOf1xbs558u7wr52 as indexOf,
|
|
34
|
-
listOfvhqybd2zx248 as listOf,
|
|
35
|
-
ArrayList3it5z8td81qkl as ArrayList,
|
|
36
40
|
repeat2w4c6j8zoq09o as repeat,
|
|
37
41
|
trimIndent1qytc1wvt8suh as trimIndent,
|
|
38
42
|
trimStart5ewg8zf6cs5u as trimStart,
|
|
@@ -57,25 +61,25 @@ var imul = Math.imul;
|
|
|
57
61
|
//endregion
|
|
58
62
|
//region block: pre-declaration
|
|
59
63
|
class BaseWebComponent extends HTMLElement {
|
|
60
|
-
|
|
64
|
+
cc() {
|
|
61
65
|
}
|
|
62
66
|
connectedCallback() {
|
|
63
|
-
return this.
|
|
67
|
+
return this.cc();
|
|
64
68
|
}
|
|
65
|
-
|
|
69
|
+
dc() {
|
|
66
70
|
}
|
|
67
71
|
disconnectedCallback() {
|
|
68
|
-
return this.
|
|
72
|
+
return this.dc();
|
|
69
73
|
}
|
|
70
|
-
|
|
74
|
+
ec() {
|
|
71
75
|
}
|
|
72
76
|
adoptedCallback() {
|
|
73
|
-
return this.
|
|
77
|
+
return this.ec();
|
|
74
78
|
}
|
|
75
|
-
|
|
79
|
+
fc(name, oldValue, newValue) {
|
|
76
80
|
}
|
|
77
81
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
78
|
-
return this.
|
|
82
|
+
return this.fc(name, oldValue, newValue);
|
|
79
83
|
}
|
|
80
84
|
upgradeProperty(name) {
|
|
81
85
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -99,18 +103,18 @@ class BoldToolbarButton extends BaseWebComponent {
|
|
|
99
103
|
var shadow = this.attachShadow(o);
|
|
100
104
|
var tmp = this;
|
|
101
105
|
var tmp_0 = element(shadow, 'toolbar-button', BoldToolbarButton$lambda);
|
|
102
|
-
tmp.
|
|
106
|
+
tmp.el_1 = tmp_0 instanceof ToolbarButton ? tmp_0 : THROW_CCE();
|
|
103
107
|
}
|
|
104
|
-
|
|
108
|
+
fl() {
|
|
105
109
|
return this.hasAttribute('highlighted');
|
|
106
110
|
}
|
|
107
|
-
|
|
111
|
+
fc(name, oldValue, newValue) {
|
|
108
112
|
if (name === 'highlighted') {
|
|
109
|
-
this.
|
|
113
|
+
this.el_1.hl(this.fl());
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
113
|
-
return this.
|
|
117
|
+
return this.fc(name, oldValue, newValue);
|
|
114
118
|
}
|
|
115
119
|
}
|
|
116
120
|
class DropdownElement extends BaseWebComponent {
|
|
@@ -146,19 +150,19 @@ class DropdownElements extends BaseWebComponent {
|
|
|
146
150
|
class EditorToolbar {}
|
|
147
151
|
class StashedSelection {
|
|
148
152
|
constructor(anchorNode, anchorOffset, focusNode, focusOffset) {
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
+
this.il_1 = anchorNode;
|
|
154
|
+
this.jl_1 = anchorOffset;
|
|
155
|
+
this.kl_1 = focusNode;
|
|
156
|
+
this.ll_1 = focusOffset;
|
|
153
157
|
}
|
|
154
158
|
toString() {
|
|
155
|
-
return 'StashedSelection(anchorNode=' + toString(this.
|
|
159
|
+
return 'StashedSelection(anchorNode=' + toString(this.il_1) + ', anchorOffset=' + this.jl_1 + ', focusNode=' + toString(this.kl_1) + ', focusOffset=' + this.ll_1 + ')';
|
|
156
160
|
}
|
|
157
161
|
hashCode() {
|
|
158
|
-
var result = this.
|
|
159
|
-
result = imul(result, 31) + this.hl_1 | 0;
|
|
160
|
-
result = imul(result, 31) + (this.il_1 == null ? 0 : hashCode(this.il_1)) | 0;
|
|
162
|
+
var result = this.il_1 == null ? 0 : hashCode(this.il_1);
|
|
161
163
|
result = imul(result, 31) + this.jl_1 | 0;
|
|
164
|
+
result = imul(result, 31) + (this.kl_1 == null ? 0 : hashCode(this.kl_1)) | 0;
|
|
165
|
+
result = imul(result, 31) + this.ll_1 | 0;
|
|
162
166
|
return result;
|
|
163
167
|
}
|
|
164
168
|
equals(other) {
|
|
@@ -166,91 +170,91 @@ class StashedSelection {
|
|
|
166
170
|
return true;
|
|
167
171
|
if (!(other instanceof StashedSelection))
|
|
168
172
|
return false;
|
|
169
|
-
if (!equals(this.gl_1, other.gl_1))
|
|
170
|
-
return false;
|
|
171
|
-
if (!(this.hl_1 === other.hl_1))
|
|
172
|
-
return false;
|
|
173
173
|
if (!equals(this.il_1, other.il_1))
|
|
174
174
|
return false;
|
|
175
175
|
if (!(this.jl_1 === other.jl_1))
|
|
176
176
|
return false;
|
|
177
|
+
if (!equals(this.kl_1, other.kl_1))
|
|
178
|
+
return false;
|
|
179
|
+
if (!(this.ll_1 === other.ll_1))
|
|
180
|
+
return false;
|
|
177
181
|
return true;
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
class BaseMarkdownDocument extends BaseWebComponent {
|
|
181
185
|
constructor() {
|
|
182
186
|
super();
|
|
183
|
-
this.
|
|
184
|
-
this.ll_1 = null;
|
|
185
|
-
this.ml_1 = document;
|
|
187
|
+
this.ml_1 = null;
|
|
186
188
|
this.nl_1 = null;
|
|
187
|
-
this.ol_1 =
|
|
189
|
+
this.ol_1 = document;
|
|
190
|
+
this.pl_1 = null;
|
|
191
|
+
this.ql_1 = true;
|
|
188
192
|
this.currentSelection = null;
|
|
189
193
|
this.editable = false;
|
|
190
|
-
this.pl_1 = null;
|
|
191
|
-
this.ql_1 = 0;
|
|
192
194
|
this.rl_1 = null;
|
|
193
|
-
this.sl_1 =
|
|
195
|
+
this.sl_1 = 0;
|
|
196
|
+
this.tl_1 = null;
|
|
197
|
+
this.ul_1 = false;
|
|
194
198
|
var tmp = this;
|
|
195
199
|
// Inline function 'kotlin.js.asDynamic' call
|
|
196
|
-
tmp.
|
|
200
|
+
tmp.vl_1 = window.chrome != null;
|
|
197
201
|
var tmp_0 = this;
|
|
198
|
-
tmp_0.
|
|
202
|
+
tmp_0.wl_1 = BaseMarkdownDocument$onMouseDown$lambda(this);
|
|
199
203
|
var tmp_1 = this;
|
|
200
|
-
tmp_1.
|
|
204
|
+
tmp_1.xl_1 = BaseMarkdownDocument$onMouseUp$lambda(this);
|
|
201
205
|
var tmp_2 = this;
|
|
202
|
-
tmp_2.
|
|
206
|
+
tmp_2.yl_1 = BaseMarkdownDocument$onSelectStart$lambda(this);
|
|
203
207
|
var tmp_3 = this;
|
|
204
|
-
tmp_3.
|
|
208
|
+
tmp_3.zl_1 = BaseMarkdownDocument$onSelectionChange$lambda(this);
|
|
205
209
|
this.upgradeProperty('parser');
|
|
206
210
|
this.upgradeProperty('markdown');
|
|
207
211
|
this.upgradeProperty('toolbar');
|
|
208
212
|
this.upgradeProperty('selectionRoot');
|
|
209
213
|
this.upgradeProperty('onLinkClick');
|
|
210
214
|
this.upgradeProperty('autoNormalize');
|
|
211
|
-
this.
|
|
212
|
-
}
|
|
213
|
-
im(value) {
|
|
214
|
-
this.kl_1 = value;
|
|
215
|
-
}
|
|
216
|
-
jm() {
|
|
217
|
-
var tmp0_elvis_lhs = this.kl_1;
|
|
218
|
-
return tmp0_elvis_lhs == null ? get_defaultParser() : tmp0_elvis_lhs;
|
|
215
|
+
this.am_1 = false;
|
|
219
216
|
}
|
|
220
217
|
km(value) {
|
|
221
|
-
|
|
218
|
+
this.ml_1 = value;
|
|
222
219
|
}
|
|
223
220
|
lm() {
|
|
224
|
-
|
|
221
|
+
var tmp0_elvis_lhs = this.ml_1;
|
|
222
|
+
return tmp0_elvis_lhs == null ? get_defaultParser() : tmp0_elvis_lhs;
|
|
225
223
|
}
|
|
226
224
|
mm(value) {
|
|
227
|
-
this
|
|
225
|
+
return renderMarkdown(this, value);
|
|
228
226
|
}
|
|
229
227
|
nm() {
|
|
230
|
-
return this.
|
|
228
|
+
return this.getMarkdown();
|
|
231
229
|
}
|
|
232
230
|
om(value) {
|
|
233
|
-
this.
|
|
231
|
+
this.nl_1 = value;
|
|
234
232
|
}
|
|
235
233
|
pm() {
|
|
236
|
-
return this.
|
|
234
|
+
return this.nl_1;
|
|
237
235
|
}
|
|
238
236
|
qm(value) {
|
|
239
|
-
this.
|
|
237
|
+
this.ol_1 = value;
|
|
240
238
|
}
|
|
241
239
|
rm() {
|
|
242
|
-
return this.
|
|
240
|
+
return this.ol_1;
|
|
243
241
|
}
|
|
244
242
|
sm(value) {
|
|
245
|
-
this.
|
|
243
|
+
this.pl_1 = value;
|
|
246
244
|
}
|
|
247
245
|
tm() {
|
|
248
|
-
return this.
|
|
246
|
+
return this.pl_1;
|
|
249
247
|
}
|
|
250
|
-
um() {
|
|
251
|
-
|
|
248
|
+
um(value) {
|
|
249
|
+
this.ql_1 = value;
|
|
252
250
|
}
|
|
253
251
|
vm() {
|
|
252
|
+
return this.ql_1;
|
|
253
|
+
}
|
|
254
|
+
wm() {
|
|
255
|
+
return this.currentSelection;
|
|
256
|
+
}
|
|
257
|
+
xm() {
|
|
254
258
|
return this.editable;
|
|
255
259
|
}
|
|
256
260
|
renderStandardShadow() {
|
|
@@ -265,36 +269,38 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
265
269
|
style(this_0, ":host {\n display: block;\n border: solid 1px gray;\n border-top: none;\n padding: 16px;\n /* inherited by descendants (including a shadow-DOM toolbar/headings), matching\n the original's separate styles/global-variables.ts stylesheet */\n --header1-font-size: 2em;\n --header2-font-size: 1.5em;\n --header3-font-size: 1.17em;\n --header4-font-size: 1em;\n --header5-font-size: 0.83em;\n --header6-font-size: 0.67em;\n}\n.toolbar {\n z-index: 3;\n top: 0px;\n position: fixed;\n right: 30%;\n background: white;\n}\n.toc {\n position: absolute;\n z-index: 3;\n top: 0px;\n right: 0%;\n}\n@media print {\n :host {\n border: none;\n }\n}");
|
|
266
270
|
element(this_0, 'div', BaseMarkdownDocument$renderStandardShadow$lambda);
|
|
267
271
|
}
|
|
268
|
-
|
|
269
|
-
super.
|
|
270
|
-
if (!this.
|
|
271
|
-
this.
|
|
272
|
+
cc() {
|
|
273
|
+
super.cc();
|
|
274
|
+
if (!this.am_1) {
|
|
275
|
+
this.am_1 = true;
|
|
272
276
|
firstUpdated(this);
|
|
273
277
|
}
|
|
274
278
|
this.setAttribute('contenteditable', this.getAttribute('readonly') === 'true' ? 'false' : 'true');
|
|
275
279
|
if (this.getAttribute('spellcheck') == null) {
|
|
276
280
|
this.setAttribute('spellcheck', 'false');
|
|
277
281
|
}
|
|
278
|
-
this.addEventListener('mousedown', this.
|
|
279
|
-
this.addEventListener('mouseup', this.
|
|
280
|
-
document.addEventListener('selectstart', this.
|
|
281
|
-
document.addEventListener('selectionchange', this.
|
|
282
|
+
this.addEventListener('mousedown', this.wl_1);
|
|
283
|
+
this.addEventListener('mouseup', this.xl_1);
|
|
284
|
+
document.addEventListener('selectstart', this.yl_1);
|
|
285
|
+
document.addEventListener('selectionchange', this.zl_1);
|
|
282
286
|
this.addEventListener('keydown', BaseMarkdownDocument$connectedCallback$lambda(this));
|
|
283
287
|
this.addEventListener('input', BaseMarkdownDocument$connectedCallback$lambda_0(this));
|
|
284
288
|
this.addEventListener('blur', BaseMarkdownDocument$connectedCallback$lambda_1(this));
|
|
285
289
|
this.addEventListener('drop', BaseMarkdownDocument$connectedCallback$lambda_2(this));
|
|
286
290
|
this.addEventListener('dragover', BaseMarkdownDocument$connectedCallback$lambda_3(this));
|
|
287
291
|
this.addEventListener('paste', BaseMarkdownDocument$connectedCallback$lambda_4(this));
|
|
292
|
+
this.addEventListener('copy', BaseMarkdownDocument$connectedCallback$lambda_5(this));
|
|
293
|
+
this.addEventListener('cut', BaseMarkdownDocument$connectedCallback$lambda_6(this));
|
|
288
294
|
}
|
|
289
295
|
connectedCallback() {
|
|
290
|
-
return this.
|
|
296
|
+
return this.cc();
|
|
291
297
|
}
|
|
292
|
-
|
|
293
|
-
document.removeEventListener('selectionchange', this.
|
|
294
|
-
document.removeEventListener('selectstart', this.
|
|
298
|
+
dc() {
|
|
299
|
+
document.removeEventListener('selectionchange', this.zl_1);
|
|
300
|
+
document.removeEventListener('selectstart', this.yl_1);
|
|
295
301
|
}
|
|
296
302
|
disconnectedCallback() {
|
|
297
|
-
return this.
|
|
303
|
+
return this.dc();
|
|
298
304
|
}
|
|
299
305
|
getSelection() {
|
|
300
306
|
return getSelection(this.selectionRoot);
|
|
@@ -306,9 +312,9 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
306
312
|
return 0;
|
|
307
313
|
var result = 0;
|
|
308
314
|
// Inline function 'kotlin.collections.forEach' call
|
|
309
|
-
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).
|
|
310
|
-
while (_iterator__ex2g4s.
|
|
311
|
-
var element = _iterator__ex2g4s.
|
|
315
|
+
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).r();
|
|
316
|
+
while (_iterator__ex2g4s.s()) {
|
|
317
|
+
var element = _iterator__ex2g4s.t();
|
|
312
318
|
if (element instanceof MarkdownComponent)
|
|
313
319
|
result = result + element.contentLength() | 0;
|
|
314
320
|
}
|
|
@@ -320,9 +326,9 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
320
326
|
contentLength() {
|
|
321
327
|
var result = 0;
|
|
322
328
|
// Inline function 'kotlin.collections.forEach' call
|
|
323
|
-
var _iterator__ex2g4s = asList(this.children).
|
|
324
|
-
while (_iterator__ex2g4s.
|
|
325
|
-
var element = _iterator__ex2g4s.
|
|
329
|
+
var _iterator__ex2g4s = asList(this.children).r();
|
|
330
|
+
while (_iterator__ex2g4s.s()) {
|
|
331
|
+
var element = _iterator__ex2g4s.t();
|
|
326
332
|
if (element instanceof MarkdownComponent)
|
|
327
333
|
result = result + element.contentLength() | 0;
|
|
328
334
|
}
|
|
@@ -333,7 +339,7 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
333
339
|
tmp.setTimeout(BaseMarkdownDocument$onChange$lambda(this), 0);
|
|
334
340
|
}
|
|
335
341
|
setToolbar(newToolbar) {
|
|
336
|
-
this.
|
|
342
|
+
this.om(newToolbar);
|
|
337
343
|
var tmp0_safe_receiver = newToolbar instanceof MarkdownToolbar ? newToolbar : null;
|
|
338
344
|
if (tmp0_safe_receiver == null)
|
|
339
345
|
null;
|
|
@@ -356,7 +362,7 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
356
362
|
return null;
|
|
357
363
|
}
|
|
358
364
|
getLastLeafBlock() {
|
|
359
|
-
var element = this.
|
|
365
|
+
var element = this.rl_1;
|
|
360
366
|
while (!(element == null) && !equals(element, document) && !equals(element, this)) {
|
|
361
367
|
if (element instanceof LeafElement)
|
|
362
368
|
return element;
|
|
@@ -599,7 +605,7 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
599
605
|
image.title = text;
|
|
600
606
|
}
|
|
601
607
|
if (!(url == null)) {
|
|
602
|
-
image.
|
|
608
|
+
image.cm(url);
|
|
603
609
|
}
|
|
604
610
|
var tmp2_safe_receiver = this.currentSelection;
|
|
605
611
|
var anchorOffset = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.anchorOffset;
|
|
@@ -618,7 +624,7 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
618
624
|
}
|
|
619
625
|
}
|
|
620
626
|
restoreStashedSelection() {
|
|
621
|
-
var tmp0_elvis_lhs = this.
|
|
627
|
+
var tmp0_elvis_lhs = this.tl_1;
|
|
622
628
|
var tmp;
|
|
623
629
|
if (tmp0_elvis_lhs == null) {
|
|
624
630
|
return Unit_instance;
|
|
@@ -627,8 +633,8 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
627
633
|
}
|
|
628
634
|
var stashed = tmp;
|
|
629
635
|
var range = document.createRange();
|
|
630
|
-
range.setStart(ensureNotNull(stashed.
|
|
631
|
-
range.setEnd(ensureNotNull(stashed.
|
|
636
|
+
range.setStart(ensureNotNull(stashed.il_1), stashed.jl_1);
|
|
637
|
+
range.setEnd(ensureNotNull(stashed.kl_1), stashed.ll_1);
|
|
632
638
|
var tmp1_safe_receiver = this.currentSelection;
|
|
633
639
|
if (tmp1_safe_receiver == null)
|
|
634
640
|
null;
|
|
@@ -658,7 +664,7 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
658
664
|
link.textContent = 'http://';
|
|
659
665
|
}
|
|
660
666
|
var tmp1_elvis_lhs = link.textContent;
|
|
661
|
-
link.
|
|
667
|
+
link.cm(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
|
|
662
668
|
link.classList.add('fresh');
|
|
663
669
|
}
|
|
664
670
|
header1Element() {
|
|
@@ -727,40 +733,40 @@ class BaseMarkdownDocument extends BaseWebComponent {
|
|
|
727
733
|
this.onChange();
|
|
728
734
|
}
|
|
729
735
|
get parser() {
|
|
730
|
-
return this.
|
|
736
|
+
return this.lm();
|
|
731
737
|
}
|
|
732
738
|
set parser(value) {
|
|
733
|
-
this.
|
|
739
|
+
this.km(value);
|
|
734
740
|
}
|
|
735
741
|
get markdown() {
|
|
736
|
-
return this.
|
|
742
|
+
return this.nm();
|
|
737
743
|
}
|
|
738
744
|
set markdown(value) {
|
|
739
|
-
this.
|
|
745
|
+
this.mm(value);
|
|
740
746
|
}
|
|
741
747
|
get toolbar() {
|
|
742
|
-
return this.
|
|
748
|
+
return this.pm();
|
|
743
749
|
}
|
|
744
750
|
set toolbar(value) {
|
|
745
|
-
this.
|
|
751
|
+
this.om(value);
|
|
746
752
|
}
|
|
747
753
|
get selectionRoot() {
|
|
748
|
-
return this.
|
|
754
|
+
return this.rm();
|
|
749
755
|
}
|
|
750
756
|
set selectionRoot(value) {
|
|
751
|
-
this.
|
|
757
|
+
this.qm(value);
|
|
752
758
|
}
|
|
753
759
|
get onLinkClick() {
|
|
754
|
-
return this.
|
|
760
|
+
return this.tm();
|
|
755
761
|
}
|
|
756
762
|
set onLinkClick(value) {
|
|
757
|
-
this.
|
|
763
|
+
this.sm(value);
|
|
758
764
|
}
|
|
759
765
|
get autoNormalize() {
|
|
760
|
-
return this.
|
|
766
|
+
return this.vm();
|
|
761
767
|
}
|
|
762
768
|
set autoNormalize(value) {
|
|
763
|
-
this.
|
|
769
|
+
this.um(value);
|
|
764
770
|
}
|
|
765
771
|
}
|
|
766
772
|
class MarkdownDocument extends BaseMarkdownDocument {
|
|
@@ -787,7 +793,7 @@ class MarkdownEditor extends BaseMarkdownDocument {
|
|
|
787
793
|
class MarkdownToolbar extends BaseWebComponent {
|
|
788
794
|
constructor() {
|
|
789
795
|
super();
|
|
790
|
-
this.
|
|
796
|
+
this.bn_1 = null;
|
|
791
797
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
792
798
|
// Inline function 'kotlin.js.asDynamic' call
|
|
793
799
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -799,7 +805,7 @@ class MarkdownToolbar extends BaseWebComponent {
|
|
|
799
805
|
var toolbarRow = element(shadow, 'div', MarkdownToolbar$lambda);
|
|
800
806
|
var dropdown = element(toolbarRow, 'toolbar-dropdown');
|
|
801
807
|
var tmp = this;
|
|
802
|
-
tmp.
|
|
808
|
+
tmp.fn_1 = element(dropdown, 'span', MarkdownToolbar$lambda_0);
|
|
803
809
|
dropdown.appendChild(document.createTextNode(' \u25BE'));
|
|
804
810
|
var dropdownElements = element(dropdown, 'dropdown-elements', MarkdownToolbar$lambda_1);
|
|
805
811
|
headingOption(this, dropdownElements, 1, MarkdownToolbar$lambda_2(this));
|
|
@@ -811,11 +817,11 @@ class MarkdownToolbar extends BaseWebComponent {
|
|
|
811
817
|
paragraphOption(this, dropdownElements, MarkdownToolbar$lambda_8(this));
|
|
812
818
|
element(toolbarRow, 'toolbar-separator');
|
|
813
819
|
var tmp_0 = this;
|
|
814
|
-
tmp_0.
|
|
820
|
+
tmp_0.cn_1 = toggleButton(this, toolbarRow, 'bold', 'toggle bold', MarkdownToolbar$lambda_9(this));
|
|
815
821
|
var tmp_1 = this;
|
|
816
|
-
tmp_1.
|
|
822
|
+
tmp_1.dn_1 = toggleButton(this, toolbarRow, 'italic', 'toggle italic', MarkdownToolbar$lambda_10(this));
|
|
817
823
|
var tmp_2 = this;
|
|
818
|
-
tmp_2.
|
|
824
|
+
tmp_2.en_1 = toggleButton(this, toolbarRow, 'strikethrough', 'toggle strike', MarkdownToolbar$lambda_11(this));
|
|
819
825
|
element(toolbarRow, 'toolbar-separator');
|
|
820
826
|
actionButton(this, toolbarRow, 'list-bulleted', 'list', MarkdownToolbar$lambda_12(this));
|
|
821
827
|
actionButton(this, toolbarRow, 'list-numbered', 'numbered list', MarkdownToolbar$lambda_13(this));
|
|
@@ -831,48 +837,48 @@ class MarkdownToolbar extends BaseWebComponent {
|
|
|
831
837
|
slot(shadow);
|
|
832
838
|
this.upgradeProperty('markdownDocument');
|
|
833
839
|
}
|
|
834
|
-
|
|
835
|
-
this.
|
|
840
|
+
in(value) {
|
|
841
|
+
this.bn_1 = value;
|
|
836
842
|
}
|
|
837
|
-
|
|
838
|
-
return this.
|
|
843
|
+
jn() {
|
|
844
|
+
return this.bn_1;
|
|
839
845
|
}
|
|
840
|
-
|
|
841
|
-
super.
|
|
846
|
+
cc() {
|
|
847
|
+
super.cc();
|
|
842
848
|
this.addEventListener('mousedown', MarkdownToolbar$connectedCallback$lambda);
|
|
843
849
|
}
|
|
844
850
|
connectedCallback() {
|
|
845
|
-
return this.
|
|
851
|
+
return this.cc();
|
|
846
852
|
}
|
|
847
853
|
setMarkdownDocument(document) {
|
|
848
|
-
this.
|
|
854
|
+
this.in(document);
|
|
849
855
|
}
|
|
850
856
|
highlightBoldButton() {
|
|
851
|
-
this.
|
|
857
|
+
this.cn_1.hl(true);
|
|
852
858
|
}
|
|
853
859
|
removeBoldButtonHighlighting() {
|
|
854
|
-
this.
|
|
860
|
+
this.cn_1.hl(false);
|
|
855
861
|
}
|
|
856
862
|
highlightItalicButton() {
|
|
857
|
-
this.
|
|
863
|
+
this.dn_1.hl(true);
|
|
858
864
|
}
|
|
859
865
|
removeItalicButtonHighlighting() {
|
|
860
|
-
this.
|
|
866
|
+
this.dn_1.hl(false);
|
|
861
867
|
}
|
|
862
868
|
highlightStrikeButton() {
|
|
863
|
-
this.
|
|
869
|
+
this.en_1.hl(true);
|
|
864
870
|
}
|
|
865
871
|
removeStrikeButtonHighlighting() {
|
|
866
|
-
this.
|
|
872
|
+
this.en_1.hl(false);
|
|
867
873
|
}
|
|
868
874
|
setDropdownTitle(title) {
|
|
869
|
-
this.
|
|
875
|
+
this.fn_1.textContent = title;
|
|
870
876
|
}
|
|
871
877
|
get markdownDocument() {
|
|
872
|
-
return this.
|
|
878
|
+
return this.jn();
|
|
873
879
|
}
|
|
874
880
|
set markdownDocument(value) {
|
|
875
|
-
this.
|
|
881
|
+
this.in(value);
|
|
876
882
|
}
|
|
877
883
|
}
|
|
878
884
|
class ToggleToolbarButton extends BaseWebComponent {
|
|
@@ -887,12 +893,12 @@ class ToggleToolbarButton extends BaseWebComponent {
|
|
|
887
893
|
var shadow = this.attachShadow(o);
|
|
888
894
|
var tmp = this;
|
|
889
895
|
var tmp_0 = element(shadow, 'toolbar-button', ToggleToolbarButton$lambda);
|
|
890
|
-
tmp.
|
|
896
|
+
tmp.gn_1 = tmp_0 instanceof ToolbarButton ? tmp_0 : THROW_CCE();
|
|
891
897
|
var tmp_1 = this;
|
|
892
|
-
var tmp_2 = element(this.
|
|
893
|
-
tmp_1.
|
|
898
|
+
var tmp_2 = element(this.gn_1, 'toolbar-icon', ToggleToolbarButton$lambda_0);
|
|
899
|
+
tmp_1.hn_1 = tmp_2 instanceof ToolbarIcon ? tmp_2 : THROW_CCE();
|
|
894
900
|
}
|
|
895
|
-
|
|
901
|
+
hl(value) {
|
|
896
902
|
var tmp;
|
|
897
903
|
if (value) {
|
|
898
904
|
this.setAttribute('highlighted', '');
|
|
@@ -903,18 +909,18 @@ class ToggleToolbarButton extends BaseWebComponent {
|
|
|
903
909
|
}
|
|
904
910
|
return tmp;
|
|
905
911
|
}
|
|
906
|
-
|
|
912
|
+
fl() {
|
|
907
913
|
return this.hasAttribute('highlighted');
|
|
908
914
|
}
|
|
909
|
-
|
|
915
|
+
fc(name, oldValue, newValue) {
|
|
910
916
|
if (name === 'highlighted') {
|
|
911
|
-
this.
|
|
917
|
+
this.gn_1.hl(this.fl());
|
|
912
918
|
} else if (name === 'icon') {
|
|
913
|
-
this.
|
|
919
|
+
this.hn_1.ln(newValue == null ? '' : newValue);
|
|
914
920
|
}
|
|
915
921
|
}
|
|
916
922
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
917
|
-
return this.
|
|
923
|
+
return this.fc(name, oldValue, newValue);
|
|
918
924
|
}
|
|
919
925
|
}
|
|
920
926
|
class ToolbarButton extends BaseWebComponent {
|
|
@@ -929,9 +935,9 @@ class ToolbarButton extends BaseWebComponent {
|
|
|
929
935
|
var shadow = this.attachShadow(o);
|
|
930
936
|
style(shadow, 'button {\n padding: 0;\n margin: 0;\n border: none;\n background-color: transparent;\n vertical-align: center;\n height: 24px;\n}\nbutton:hover {\n background-color: lightblue;\n}\n.highlighted {\n background-color: gray;\n}');
|
|
931
937
|
var tmp = this;
|
|
932
|
-
tmp.
|
|
938
|
+
tmp.gl_1 = element(shadow, 'button', ToolbarButton$lambda);
|
|
933
939
|
}
|
|
934
|
-
|
|
940
|
+
hl(value) {
|
|
935
941
|
var tmp;
|
|
936
942
|
if (value) {
|
|
937
943
|
this.setAttribute('highlighted', '');
|
|
@@ -942,24 +948,24 @@ class ToolbarButton extends BaseWebComponent {
|
|
|
942
948
|
}
|
|
943
949
|
return tmp;
|
|
944
950
|
}
|
|
945
|
-
|
|
951
|
+
fc(name, oldValue, newValue) {
|
|
946
952
|
if (name === 'highlighted') {
|
|
947
953
|
if (!(newValue == null)) {
|
|
948
|
-
this.
|
|
954
|
+
this.gl_1.classList.add('highlighted');
|
|
949
955
|
} else {
|
|
950
|
-
this.
|
|
956
|
+
this.gl_1.classList.remove('highlighted');
|
|
951
957
|
}
|
|
952
958
|
}
|
|
953
959
|
}
|
|
954
960
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
955
|
-
return this.
|
|
961
|
+
return this.fc(name, oldValue, newValue);
|
|
956
962
|
}
|
|
957
963
|
}
|
|
958
964
|
class ToolbarDropdown extends BaseWebComponent {
|
|
959
965
|
constructor() {
|
|
960
966
|
super();
|
|
961
967
|
var tmp = this;
|
|
962
|
-
tmp.
|
|
968
|
+
tmp.nn_1 = ToolbarDropdown$hideOnOutsideMouseDown$lambda(this);
|
|
963
969
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
964
970
|
// Inline function 'kotlin.js.asDynamic' call
|
|
965
971
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -971,20 +977,20 @@ class ToolbarDropdown extends BaseWebComponent {
|
|
|
971
977
|
var button = element(shadow, 'toolbar-button', ToolbarDropdown$lambda);
|
|
972
978
|
button.addEventListener('mousedown', ToolbarDropdown$lambda_0(this));
|
|
973
979
|
var tmp_0 = this;
|
|
974
|
-
tmp_0.
|
|
980
|
+
tmp_0.mn_1 = element(shadow, 'slot', ToolbarDropdown$lambda_1);
|
|
975
981
|
}
|
|
976
|
-
|
|
977
|
-
super.
|
|
978
|
-
document.addEventListener('mousedown', this.
|
|
982
|
+
cc() {
|
|
983
|
+
super.cc();
|
|
984
|
+
document.addEventListener('mousedown', this.nn_1);
|
|
979
985
|
}
|
|
980
986
|
connectedCallback() {
|
|
981
|
-
return this.
|
|
987
|
+
return this.cc();
|
|
982
988
|
}
|
|
983
|
-
|
|
984
|
-
document.removeEventListener('mousedown', this.
|
|
989
|
+
dc() {
|
|
990
|
+
document.removeEventListener('mousedown', this.nn_1);
|
|
985
991
|
}
|
|
986
992
|
disconnectedCallback() {
|
|
987
|
-
return this.
|
|
993
|
+
return this.dc();
|
|
988
994
|
}
|
|
989
995
|
}
|
|
990
996
|
class ToolbarIcon extends BaseWebComponent {
|
|
@@ -998,18 +1004,18 @@ class ToolbarIcon extends BaseWebComponent {
|
|
|
998
1004
|
o['mode'] = 'open';
|
|
999
1005
|
var shadow = this.attachShadow(o);
|
|
1000
1006
|
style(shadow, ':host {\n display: inline-flex;\n width: 24px;\n height: 24px;\n align-items: center;\n justify-content: center;\n color: inherit;\n}\nspan, svg {\n display: block;\n width: 100%;\n height: 100%;\n}');
|
|
1001
|
-
this.
|
|
1007
|
+
this.kn_1 = element(shadow, 'span');
|
|
1002
1008
|
}
|
|
1003
|
-
|
|
1009
|
+
ln(value) {
|
|
1004
1010
|
return this.setAttribute('icon', value);
|
|
1005
1011
|
}
|
|
1006
|
-
|
|
1012
|
+
fc(name, oldValue, newValue) {
|
|
1007
1013
|
if (name === 'icon') {
|
|
1008
|
-
this.
|
|
1014
|
+
this.kn_1.innerHTML = svgFor(this, newValue == null ? '' : newValue);
|
|
1009
1015
|
}
|
|
1010
1016
|
}
|
|
1011
1017
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
1012
|
-
return this.
|
|
1018
|
+
return this.fc(name, oldValue, newValue);
|
|
1013
1019
|
}
|
|
1014
1020
|
}
|
|
1015
1021
|
class ToolbarSeparator extends BaseWebComponent {
|
|
@@ -1051,13 +1057,13 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1051
1057
|
var indexOfBreak = siblings.n1(content);
|
|
1052
1058
|
var elementsToMove = drop(siblings, indexOfBreak + 1 | 0);
|
|
1053
1059
|
var tmp_0;
|
|
1054
|
-
if (elementsToMove.
|
|
1060
|
+
if (elementsToMove.d1()) {
|
|
1055
1061
|
tmp_0 = this.newEmptyElementAfterBreak();
|
|
1056
1062
|
} else {
|
|
1057
1063
|
var tmp_1;
|
|
1058
|
-
if (elementsToMove.
|
|
1064
|
+
if (elementsToMove.u() === 1) {
|
|
1059
1065
|
// Inline function 'kotlin.let' call
|
|
1060
|
-
var it = elementsToMove.
|
|
1066
|
+
var it = elementsToMove.v(0);
|
|
1061
1067
|
var tmp_2;
|
|
1062
1068
|
if (it instanceof Text) {
|
|
1063
1069
|
tmp_2 = it.textContent === get_ZERO_WIDTH_SPACE();
|
|
@@ -1085,17 +1091,17 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1085
1091
|
var rightElement = tmp_0;
|
|
1086
1092
|
if (!(rightElement == null)) {
|
|
1087
1093
|
// Inline function 'kotlin.collections.forEach' call
|
|
1088
|
-
var _iterator__ex2g4s = elementsToMove.
|
|
1089
|
-
while (_iterator__ex2g4s.
|
|
1090
|
-
var element = _iterator__ex2g4s.
|
|
1094
|
+
var _iterator__ex2g4s = elementsToMove.r();
|
|
1095
|
+
while (_iterator__ex2g4s.s()) {
|
|
1096
|
+
var element = _iterator__ex2g4s.t();
|
|
1091
1097
|
rightElement.append(element);
|
|
1092
1098
|
}
|
|
1093
1099
|
parent.insertBefore(rightElement, this.nextSibling);
|
|
1094
1100
|
} else {
|
|
1095
1101
|
// Inline function 'kotlin.collections.forEach' call
|
|
1096
|
-
var _iterator__ex2g4s_0 = elementsToMove.
|
|
1097
|
-
while (_iterator__ex2g4s_0.
|
|
1098
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1102
|
+
var _iterator__ex2g4s_0 = elementsToMove.r();
|
|
1103
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
1104
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
1099
1105
|
parent.insertBefore(element_0, this.nextSibling);
|
|
1100
1106
|
}
|
|
1101
1107
|
}
|
|
@@ -1160,9 +1166,9 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1160
1166
|
contentLength() {
|
|
1161
1167
|
var result = 0;
|
|
1162
1168
|
// Inline function 'kotlin.collections.forEach' call
|
|
1163
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1164
|
-
while (_iterator__ex2g4s.
|
|
1165
|
-
var element = _iterator__ex2g4s.
|
|
1169
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1170
|
+
while (_iterator__ex2g4s.s()) {
|
|
1171
|
+
var element = _iterator__ex2g4s.t();
|
|
1166
1172
|
var tmp = result;
|
|
1167
1173
|
var tmp_0;
|
|
1168
1174
|
if (element instanceof MarkdownComponent) {
|
|
@@ -1187,9 +1193,9 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1187
1193
|
var result = 0;
|
|
1188
1194
|
if (indexOfChild >= 0) {
|
|
1189
1195
|
// Inline function 'kotlin.collections.forEach' call
|
|
1190
|
-
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).
|
|
1191
|
-
while (_iterator__ex2g4s.
|
|
1192
|
-
var element = _iterator__ex2g4s.
|
|
1196
|
+
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).r();
|
|
1197
|
+
while (_iterator__ex2g4s.s()) {
|
|
1198
|
+
var element = _iterator__ex2g4s.t();
|
|
1193
1199
|
var tmp = result;
|
|
1194
1200
|
var tmp_0;
|
|
1195
1201
|
if (element instanceof MarkdownComponent) {
|
|
@@ -1217,12 +1223,12 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1217
1223
|
}
|
|
1218
1224
|
getNodeAndOffsetFromContentOffsetAnchor(contentOffset) {
|
|
1219
1225
|
var nodes = asList(this.childNodes);
|
|
1220
|
-
if (nodes.
|
|
1226
|
+
if (nodes.d1())
|
|
1221
1227
|
return to(this, contentOffset);
|
|
1222
|
-
var resultNode = nodes.
|
|
1223
|
-
var _iterator__ex2g4s = nodes.
|
|
1224
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
1225
|
-
var child = _iterator__ex2g4s.
|
|
1228
|
+
var resultNode = nodes.v(0);
|
|
1229
|
+
var _iterator__ex2g4s = nodes.r();
|
|
1230
|
+
$l$loop_0: while (_iterator__ex2g4s.s()) {
|
|
1231
|
+
var child = _iterator__ex2g4s.t();
|
|
1226
1232
|
var lengthUntilChild = this.contentLengthUntil(child);
|
|
1227
1233
|
if (contentOffset === lengthUntilChild) {
|
|
1228
1234
|
resultNode = child;
|
|
@@ -1242,13 +1248,13 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1242
1248
|
}
|
|
1243
1249
|
getNodeAndOffsetFromContentOffset(contentOffset) {
|
|
1244
1250
|
var nodes = asList(this.childNodes);
|
|
1245
|
-
if (nodes.
|
|
1251
|
+
if (nodes.d1())
|
|
1246
1252
|
return to(this, contentOffset);
|
|
1247
|
-
var resultNode = nodes.
|
|
1253
|
+
var resultNode = nodes.v(0);
|
|
1248
1254
|
var previousNodeWasEol = false;
|
|
1249
|
-
var _iterator__ex2g4s = nodes.
|
|
1250
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
1251
|
-
var child = _iterator__ex2g4s.
|
|
1255
|
+
var _iterator__ex2g4s = nodes.r();
|
|
1256
|
+
$l$loop_0: while (_iterator__ex2g4s.s()) {
|
|
1257
|
+
var child = _iterator__ex2g4s.t();
|
|
1252
1258
|
var lengthUntilChild = this.contentLengthUntil(child);
|
|
1253
1259
|
if (contentOffset === lengthUntilChild) {
|
|
1254
1260
|
if (previousNodeWasEol)
|
|
@@ -1279,21 +1285,21 @@ class MarkdownComponent extends BaseWebComponent {
|
|
|
1279
1285
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, MarkdownComponent$getMarkdown$lambda);
|
|
1280
1286
|
}
|
|
1281
1287
|
get mustBeDirectChildOfDocument() {
|
|
1282
|
-
return this.
|
|
1288
|
+
return this.on();
|
|
1283
1289
|
}
|
|
1284
1290
|
}
|
|
1285
1291
|
class BlockElement extends MarkdownComponent {
|
|
1286
1292
|
get mustBeDirectChildOfDocument() {
|
|
1287
|
-
return this.
|
|
1293
|
+
return this.on();
|
|
1288
1294
|
}
|
|
1289
1295
|
}
|
|
1290
1296
|
class ContainerElement extends MarkdownComponent {
|
|
1291
1297
|
contentLength() {
|
|
1292
1298
|
var result = 0;
|
|
1293
1299
|
// Inline function 'kotlin.collections.forEach' call
|
|
1294
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1295
|
-
while (_iterator__ex2g4s.
|
|
1296
|
-
var element = _iterator__ex2g4s.
|
|
1300
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1301
|
+
while (_iterator__ex2g4s.s()) {
|
|
1302
|
+
var element = _iterator__ex2g4s.t();
|
|
1297
1303
|
if (element instanceof MarkdownComponent)
|
|
1298
1304
|
result = result + element.contentLength() | 0;
|
|
1299
1305
|
}
|
|
@@ -1305,9 +1311,9 @@ class ContainerElement extends MarkdownComponent {
|
|
|
1305
1311
|
var result = 0;
|
|
1306
1312
|
if (indexOfChild >= 0) {
|
|
1307
1313
|
// Inline function 'kotlin.collections.forEach' call
|
|
1308
|
-
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).
|
|
1309
|
-
while (_iterator__ex2g4s.
|
|
1310
|
-
var element = _iterator__ex2g4s.
|
|
1314
|
+
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).r();
|
|
1315
|
+
while (_iterator__ex2g4s.s()) {
|
|
1316
|
+
var element = _iterator__ex2g4s.t();
|
|
1311
1317
|
if (element instanceof MarkdownComponent)
|
|
1312
1318
|
result = result + element.contentLength() | 0;
|
|
1313
1319
|
}
|
|
@@ -1318,7 +1324,7 @@ class ContainerElement extends MarkdownComponent {
|
|
|
1318
1324
|
return this.children.length > 0;
|
|
1319
1325
|
}
|
|
1320
1326
|
get mustBeDirectChildOfDocument() {
|
|
1321
|
-
return this.
|
|
1327
|
+
return this.on();
|
|
1322
1328
|
}
|
|
1323
1329
|
}
|
|
1324
1330
|
class LeafElement extends BlockElement {
|
|
@@ -1332,9 +1338,9 @@ class LeafElement extends BlockElement {
|
|
|
1332
1338
|
return true;
|
|
1333
1339
|
}
|
|
1334
1340
|
var sawBr = false;
|
|
1335
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1336
|
-
$l$loop: while (_iterator__ex2g4s.
|
|
1337
|
-
var content = _iterator__ex2g4s.
|
|
1341
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1342
|
+
$l$loop: while (_iterator__ex2g4s.s()) {
|
|
1343
|
+
var content = _iterator__ex2g4s.t();
|
|
1338
1344
|
if (content instanceof HTMLBRElement) {
|
|
1339
1345
|
if (sawBr) {
|
|
1340
1346
|
this.removeChild(content);
|
|
@@ -1344,9 +1350,9 @@ class LeafElement extends BlockElement {
|
|
|
1344
1350
|
}
|
|
1345
1351
|
}
|
|
1346
1352
|
// Inline function 'kotlin.collections.forEach' call
|
|
1347
|
-
var _iterator__ex2g4s_0 = asList(this.childNodes).
|
|
1348
|
-
while (_iterator__ex2g4s_0.
|
|
1349
|
-
var element = _iterator__ex2g4s_0.
|
|
1353
|
+
var _iterator__ex2g4s_0 = asList(this.childNodes).r();
|
|
1354
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
1355
|
+
var element = _iterator__ex2g4s_0.t();
|
|
1350
1356
|
if (element instanceof HTMLBRElement) {
|
|
1351
1357
|
this.pushNodesAfterBreakToParent(element);
|
|
1352
1358
|
this.removeChild(element);
|
|
@@ -1388,9 +1394,9 @@ class LeafElement extends BlockElement {
|
|
|
1388
1394
|
other.setSelectionToEnd(currentSelection);
|
|
1389
1395
|
}
|
|
1390
1396
|
// Inline function 'kotlin.collections.forEach' call
|
|
1391
|
-
var _iterator__ex2g4s = toList(asList(this.childNodes)).
|
|
1392
|
-
while (_iterator__ex2g4s.
|
|
1393
|
-
var element = _iterator__ex2g4s.
|
|
1397
|
+
var _iterator__ex2g4s = toList(asList(this.childNodes)).r();
|
|
1398
|
+
while (_iterator__ex2g4s.s()) {
|
|
1399
|
+
var element = _iterator__ex2g4s.t();
|
|
1394
1400
|
other.appendChild(element);
|
|
1395
1401
|
}
|
|
1396
1402
|
this.remove();
|
|
@@ -1404,9 +1410,9 @@ class LeafElement extends BlockElement {
|
|
|
1404
1410
|
var next = this.nextElementSibling;
|
|
1405
1411
|
if (next instanceof LeafElement) {
|
|
1406
1412
|
// Inline function 'kotlin.collections.forEach' call
|
|
1407
|
-
var _iterator__ex2g4s = toList(asList(next.childNodes)).
|
|
1408
|
-
while (_iterator__ex2g4s.
|
|
1409
|
-
var element = _iterator__ex2g4s.
|
|
1413
|
+
var _iterator__ex2g4s = toList(asList(next.childNodes)).r();
|
|
1414
|
+
while (_iterator__ex2g4s.s()) {
|
|
1415
|
+
var element = _iterator__ex2g4s.t();
|
|
1410
1416
|
this.appendChild(element);
|
|
1411
1417
|
}
|
|
1412
1418
|
next.remove();
|
|
@@ -1430,16 +1436,16 @@ class LeafElement extends BlockElement {
|
|
|
1430
1436
|
return tmp;
|
|
1431
1437
|
}
|
|
1432
1438
|
get mustBeDirectChildOfDocument() {
|
|
1433
|
-
return this.
|
|
1439
|
+
return this.on();
|
|
1434
1440
|
}
|
|
1435
1441
|
}
|
|
1436
1442
|
class Heading extends LeafElement {
|
|
1437
1443
|
constructor() {
|
|
1438
1444
|
super();
|
|
1439
|
-
this.
|
|
1445
|
+
this.pn_1 = true;
|
|
1440
1446
|
}
|
|
1441
|
-
|
|
1442
|
-
return this.
|
|
1447
|
+
on() {
|
|
1448
|
+
return this.pn_1;
|
|
1443
1449
|
}
|
|
1444
1450
|
getMarkdown() {
|
|
1445
1451
|
return repeat('#', this.depth) + ' ' + getMarkdownWithTextForElement(this) + '\n';
|
|
@@ -1464,19 +1470,19 @@ class Heading extends LeafElement {
|
|
|
1464
1470
|
element(this_0, tmp, Heading$renderHeading$lambda);
|
|
1465
1471
|
}
|
|
1466
1472
|
get depth() {
|
|
1467
|
-
return this.
|
|
1473
|
+
return this.qn();
|
|
1468
1474
|
}
|
|
1469
1475
|
get mustBeDirectChildOfDocument() {
|
|
1470
|
-
return this.
|
|
1476
|
+
return this.on();
|
|
1471
1477
|
}
|
|
1472
1478
|
}
|
|
1473
1479
|
class InlineElement extends MarkdownComponent {
|
|
1474
1480
|
constructor() {
|
|
1475
1481
|
super();
|
|
1476
|
-
this.
|
|
1482
|
+
this.rn_1 = false;
|
|
1477
1483
|
}
|
|
1478
|
-
|
|
1479
|
-
return this.
|
|
1484
|
+
on() {
|
|
1485
|
+
return this.rn_1;
|
|
1480
1486
|
}
|
|
1481
1487
|
normalizeContent() {
|
|
1482
1488
|
var next = this.nextSibling;
|
|
@@ -1494,9 +1500,9 @@ class InlineElement extends MarkdownComponent {
|
|
|
1494
1500
|
}
|
|
1495
1501
|
if (tmp) {
|
|
1496
1502
|
// Inline function 'kotlin.collections.forEach' call
|
|
1497
|
-
var _iterator__ex2g4s = toList(asList(next.childNodes)).
|
|
1498
|
-
while (_iterator__ex2g4s.
|
|
1499
|
-
var element = _iterator__ex2g4s.
|
|
1503
|
+
var _iterator__ex2g4s = toList(asList(next.childNodes)).r();
|
|
1504
|
+
while (_iterator__ex2g4s.s()) {
|
|
1505
|
+
var element = _iterator__ex2g4s.t();
|
|
1500
1506
|
this.appendChild(element);
|
|
1501
1507
|
}
|
|
1502
1508
|
var tmp0_safe_receiver = this.parentNode;
|
|
@@ -1508,9 +1514,9 @@ class InlineElement extends MarkdownComponent {
|
|
|
1508
1514
|
return true;
|
|
1509
1515
|
}
|
|
1510
1516
|
// Inline function 'kotlin.collections.forEach' call
|
|
1511
|
-
var _iterator__ex2g4s_0 = asList(this.childNodes).
|
|
1512
|
-
while (_iterator__ex2g4s_0.
|
|
1513
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1517
|
+
var _iterator__ex2g4s_0 = asList(this.childNodes).r();
|
|
1518
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
1519
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
1514
1520
|
if (element_0 instanceof HTMLBRElement) {
|
|
1515
1521
|
this.pushBreakAndNodesAfterToParent(element_0);
|
|
1516
1522
|
return true;
|
|
@@ -1569,23 +1575,23 @@ class InlineElement extends MarkdownComponent {
|
|
|
1569
1575
|
}
|
|
1570
1576
|
}
|
|
1571
1577
|
get mustBeDirectChildOfDocument() {
|
|
1572
|
-
return this.
|
|
1578
|
+
return this.on();
|
|
1573
1579
|
}
|
|
1574
1580
|
}
|
|
1575
1581
|
class TerminalInlineElement extends MarkdownComponent {
|
|
1576
1582
|
get mustBeDirectChildOfDocument() {
|
|
1577
|
-
return this.
|
|
1583
|
+
return this.on();
|
|
1578
1584
|
}
|
|
1579
1585
|
}
|
|
1580
1586
|
class ListItem extends ContainerElement {
|
|
1581
1587
|
constructor() {
|
|
1582
1588
|
super();
|
|
1583
|
-
this.
|
|
1589
|
+
this.sn_1 = false;
|
|
1584
1590
|
}
|
|
1585
|
-
|
|
1586
|
-
return this.
|
|
1591
|
+
on() {
|
|
1592
|
+
return this.sn_1;
|
|
1587
1593
|
}
|
|
1588
|
-
|
|
1594
|
+
tn() {
|
|
1589
1595
|
var depth = 0;
|
|
1590
1596
|
var ancestor = this.parentNode;
|
|
1591
1597
|
$l$loop: while (true) {
|
|
@@ -1618,18 +1624,18 @@ class ListItem extends ContainerElement {
|
|
|
1618
1624
|
return depth;
|
|
1619
1625
|
}
|
|
1620
1626
|
getMarkdown() {
|
|
1621
|
-
return repeat(' ', this.
|
|
1627
|
+
return repeat(' ', this.tn()) + '- ' + this.un() + this.vn();
|
|
1622
1628
|
}
|
|
1623
|
-
|
|
1629
|
+
un() {
|
|
1624
1630
|
return '';
|
|
1625
1631
|
}
|
|
1626
|
-
|
|
1632
|
+
vn() {
|
|
1627
1633
|
var line = '';
|
|
1628
1634
|
var nestedBlocks = '';
|
|
1629
1635
|
// Inline function 'kotlin.collections.forEach' call
|
|
1630
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1631
|
-
while (_iterator__ex2g4s.
|
|
1632
|
-
var element = _iterator__ex2g4s.
|
|
1636
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1637
|
+
while (_iterator__ex2g4s.s()) {
|
|
1638
|
+
var element = _iterator__ex2g4s.t();
|
|
1633
1639
|
var markdownElement = asMarkdownElement(element);
|
|
1634
1640
|
var tmp;
|
|
1635
1641
|
if (isInterface(element, MarkdownElementWithLevel)) {
|
|
@@ -1666,9 +1672,9 @@ class ListItem extends ContainerElement {
|
|
|
1666
1672
|
return true;
|
|
1667
1673
|
}
|
|
1668
1674
|
// Inline function 'kotlin.collections.forEach' call
|
|
1669
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1670
|
-
while (_iterator__ex2g4s.
|
|
1671
|
-
var element = _iterator__ex2g4s.
|
|
1675
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1676
|
+
while (_iterator__ex2g4s.s()) {
|
|
1677
|
+
var element = _iterator__ex2g4s.t();
|
|
1672
1678
|
if (element instanceof HTMLBRElement) {
|
|
1673
1679
|
this.pushNodesAfterBreakToParent(element);
|
|
1674
1680
|
this.removeChild(element);
|
|
@@ -1699,9 +1705,9 @@ class ListItem extends ContainerElement {
|
|
|
1699
1705
|
contentLength() {
|
|
1700
1706
|
var result = 0;
|
|
1701
1707
|
// Inline function 'kotlin.collections.forEach' call
|
|
1702
|
-
var _iterator__ex2g4s = asList(this.childNodes).
|
|
1703
|
-
while (_iterator__ex2g4s.
|
|
1704
|
-
var element = _iterator__ex2g4s.
|
|
1708
|
+
var _iterator__ex2g4s = asList(this.childNodes).r();
|
|
1709
|
+
while (_iterator__ex2g4s.s()) {
|
|
1710
|
+
var element = _iterator__ex2g4s.t();
|
|
1705
1711
|
var tmp = result;
|
|
1706
1712
|
var tmp_0;
|
|
1707
1713
|
if (element instanceof MarkdownComponent) {
|
|
@@ -1726,9 +1732,9 @@ class ListItem extends ContainerElement {
|
|
|
1726
1732
|
var result = 0;
|
|
1727
1733
|
if (indexOfChild >= 0) {
|
|
1728
1734
|
// Inline function 'kotlin.collections.forEach' call
|
|
1729
|
-
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).
|
|
1730
|
-
while (_iterator__ex2g4s.
|
|
1731
|
-
var element = _iterator__ex2g4s.
|
|
1735
|
+
var _iterator__ex2g4s = nodes.o1(0, indexOfChild).r();
|
|
1736
|
+
while (_iterator__ex2g4s.s()) {
|
|
1737
|
+
var element = _iterator__ex2g4s.t();
|
|
1732
1738
|
var tmp = result;
|
|
1733
1739
|
var tmp_0;
|
|
1734
1740
|
if (element instanceof MarkdownComponent) {
|
|
@@ -1755,9 +1761,9 @@ class ListItem extends ContainerElement {
|
|
|
1755
1761
|
previous.setSelectionToEnd(currentSelection);
|
|
1756
1762
|
}
|
|
1757
1763
|
// Inline function 'kotlin.collections.forEach' call
|
|
1758
|
-
var _iterator__ex2g4s = toList(asList(this.childNodes)).
|
|
1759
|
-
while (_iterator__ex2g4s.
|
|
1760
|
-
var element = _iterator__ex2g4s.
|
|
1764
|
+
var _iterator__ex2g4s = toList(asList(this.childNodes)).r();
|
|
1765
|
+
while (_iterator__ex2g4s.s()) {
|
|
1766
|
+
var element = _iterator__ex2g4s.t();
|
|
1761
1767
|
previous.appendChild(element);
|
|
1762
1768
|
}
|
|
1763
1769
|
this.remove();
|
|
@@ -1766,9 +1772,9 @@ class ListItem extends ContainerElement {
|
|
|
1766
1772
|
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.childNodes;
|
|
1767
1773
|
if ((tmp3_safe_receiver == null ? null : tmp3_safe_receiver.length) === 1) {
|
|
1768
1774
|
// Inline function 'kotlin.collections.forEach' call
|
|
1769
|
-
var _iterator__ex2g4s_0 = toList(asList(this.childNodes)).
|
|
1770
|
-
while (_iterator__ex2g4s_0.
|
|
1771
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
1775
|
+
var _iterator__ex2g4s_0 = toList(asList(this.childNodes)).r();
|
|
1776
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
1777
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
1772
1778
|
var tmp0_safe_receiver = this.parentElement;
|
|
1773
1779
|
if (tmp0_safe_receiver == null)
|
|
1774
1780
|
null;
|
|
@@ -1789,9 +1795,9 @@ class ListItem extends ContainerElement {
|
|
|
1789
1795
|
var next = this.nextElementSibling;
|
|
1790
1796
|
if (next instanceof ListItem) {
|
|
1791
1797
|
// Inline function 'kotlin.collections.forEach' call
|
|
1792
|
-
var _iterator__ex2g4s = toList(asList(next.childNodes)).
|
|
1793
|
-
while (_iterator__ex2g4s.
|
|
1794
|
-
var element = _iterator__ex2g4s.
|
|
1798
|
+
var _iterator__ex2g4s = toList(asList(next.childNodes)).r();
|
|
1799
|
+
while (_iterator__ex2g4s.s()) {
|
|
1800
|
+
var element = _iterator__ex2g4s.t();
|
|
1795
1801
|
this.appendChild(element);
|
|
1796
1802
|
}
|
|
1797
1803
|
next.remove();
|
|
@@ -1818,7 +1824,7 @@ class ListItem extends ContainerElement {
|
|
|
1818
1824
|
return true;
|
|
1819
1825
|
}
|
|
1820
1826
|
get mustBeDirectChildOfDocument() {
|
|
1821
|
-
return this.
|
|
1827
|
+
return this.on();
|
|
1822
1828
|
}
|
|
1823
1829
|
}
|
|
1824
1830
|
class MarkdownElementWithLevel {}
|
|
@@ -1826,12 +1832,12 @@ class MarkdownElementEscapeByBackspace {}
|
|
|
1826
1832
|
class TableCell extends ContainerElement {
|
|
1827
1833
|
constructor() {
|
|
1828
1834
|
super();
|
|
1829
|
-
this.
|
|
1835
|
+
this.wn_1 = false;
|
|
1830
1836
|
}
|
|
1831
|
-
|
|
1832
|
-
return this.
|
|
1837
|
+
on() {
|
|
1838
|
+
return this.wn_1;
|
|
1833
1839
|
}
|
|
1834
|
-
|
|
1840
|
+
xn(hostCss) {
|
|
1835
1841
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
1836
1842
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1837
1843
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -1851,13 +1857,13 @@ class TableCell extends ContainerElement {
|
|
|
1851
1857
|
return true;
|
|
1852
1858
|
}
|
|
1853
1859
|
get mustBeDirectChildOfDocument() {
|
|
1854
|
-
return this.
|
|
1860
|
+
return this.on();
|
|
1855
1861
|
}
|
|
1856
1862
|
}
|
|
1857
1863
|
class MarkdownBreak extends LeafElement {
|
|
1858
1864
|
constructor() {
|
|
1859
1865
|
super();
|
|
1860
|
-
this.
|
|
1866
|
+
this.yn_1 = true;
|
|
1861
1867
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
1862
1868
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1863
1869
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -1866,8 +1872,8 @@ class MarkdownBreak extends LeafElement {
|
|
|
1866
1872
|
o['mode'] = 'open';
|
|
1867
1873
|
element(this.attachShadow(o), 'hr');
|
|
1868
1874
|
}
|
|
1869
|
-
|
|
1870
|
-
return this.
|
|
1875
|
+
on() {
|
|
1876
|
+
return this.yn_1;
|
|
1871
1877
|
}
|
|
1872
1878
|
getMarkdown() {
|
|
1873
1879
|
return '-----------------------\n';
|
|
@@ -1879,13 +1885,13 @@ class MarkdownBreak extends LeafElement {
|
|
|
1879
1885
|
return true;
|
|
1880
1886
|
}
|
|
1881
1887
|
get mustBeDirectChildOfDocument() {
|
|
1882
|
-
return this.
|
|
1888
|
+
return this.on();
|
|
1883
1889
|
}
|
|
1884
1890
|
}
|
|
1885
1891
|
class MarkdownCode extends LeafElement {
|
|
1886
1892
|
constructor() {
|
|
1887
1893
|
super();
|
|
1888
|
-
this.
|
|
1894
|
+
this.zn_1 = true;
|
|
1889
1895
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
1890
1896
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1891
1897
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -1895,33 +1901,33 @@ class MarkdownCode extends LeafElement {
|
|
|
1895
1901
|
var tmp = element(this.attachShadow(o), 'pre');
|
|
1896
1902
|
element(tmp, 'code', MarkdownCode$lambda);
|
|
1897
1903
|
}
|
|
1898
|
-
|
|
1899
|
-
return this.
|
|
1904
|
+
on() {
|
|
1905
|
+
return this.zn_1;
|
|
1900
1906
|
}
|
|
1901
1907
|
getMarkdown() {
|
|
1902
1908
|
var lang = this.getAttribute('lang');
|
|
1903
1909
|
var id = this.getAttribute('id');
|
|
1904
1910
|
return !(id == null) ? '``` ' + lang + ' {' + id + '}\n' + this.textContent + '\n```\n' : '``` ' + lang + '\n' + this.textContent + '\n```\n';
|
|
1905
1911
|
}
|
|
1906
|
-
|
|
1907
|
-
super.
|
|
1912
|
+
cc() {
|
|
1913
|
+
super.cc();
|
|
1908
1914
|
highlight(this);
|
|
1909
1915
|
this.addEventListener('input', MarkdownCode$connectedCallback$lambda(this));
|
|
1910
1916
|
}
|
|
1911
1917
|
connectedCallback() {
|
|
1912
|
-
return this.
|
|
1918
|
+
return this.cc();
|
|
1913
1919
|
}
|
|
1914
1920
|
containsMarkdownTextContent() {
|
|
1915
1921
|
return true;
|
|
1916
1922
|
}
|
|
1917
1923
|
get mustBeDirectChildOfDocument() {
|
|
1918
|
-
return this.
|
|
1924
|
+
return this.on();
|
|
1919
1925
|
}
|
|
1920
1926
|
}
|
|
1921
1927
|
class MarkdownCodeSpan extends TerminalInlineElement {
|
|
1922
1928
|
constructor() {
|
|
1923
1929
|
super();
|
|
1924
|
-
this.
|
|
1930
|
+
this.ao_1 = false;
|
|
1925
1931
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
1926
1932
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1927
1933
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -1931,8 +1937,8 @@ class MarkdownCodeSpan extends TerminalInlineElement {
|
|
|
1931
1937
|
var tmp = this.attachShadow(o);
|
|
1932
1938
|
element(tmp, 'code', MarkdownCodeSpan$lambda);
|
|
1933
1939
|
}
|
|
1934
|
-
|
|
1935
|
-
return this.
|
|
1940
|
+
on() {
|
|
1941
|
+
return this.ao_1;
|
|
1936
1942
|
}
|
|
1937
1943
|
getMarkdown() {
|
|
1938
1944
|
return '`' + getMarkdownWithTextForElement(this) + '`';
|
|
@@ -1941,7 +1947,7 @@ class MarkdownCodeSpan extends TerminalInlineElement {
|
|
|
1941
1947
|
return true;
|
|
1942
1948
|
}
|
|
1943
1949
|
get mustBeDirectChildOfDocument() {
|
|
1944
|
-
return this.
|
|
1950
|
+
return this.on();
|
|
1945
1951
|
}
|
|
1946
1952
|
}
|
|
1947
1953
|
class MarkdownEmphasis extends InlineElement {
|
|
@@ -1966,67 +1972,67 @@ class MarkdownEmphasis extends InlineElement {
|
|
|
1966
1972
|
class MarkdownHeading1 extends Heading {
|
|
1967
1973
|
constructor() {
|
|
1968
1974
|
super();
|
|
1969
|
-
this.
|
|
1975
|
+
this.co_1 = 1;
|
|
1970
1976
|
this.renderHeading();
|
|
1971
1977
|
}
|
|
1972
|
-
|
|
1973
|
-
return this.
|
|
1978
|
+
qn() {
|
|
1979
|
+
return this.co_1;
|
|
1974
1980
|
}
|
|
1975
1981
|
}
|
|
1976
1982
|
class MarkdownHeading2 extends Heading {
|
|
1977
1983
|
constructor() {
|
|
1978
1984
|
super();
|
|
1979
|
-
this.
|
|
1985
|
+
this.eo_1 = 2;
|
|
1980
1986
|
this.renderHeading();
|
|
1981
1987
|
}
|
|
1982
|
-
|
|
1983
|
-
return this.
|
|
1988
|
+
qn() {
|
|
1989
|
+
return this.eo_1;
|
|
1984
1990
|
}
|
|
1985
1991
|
}
|
|
1986
1992
|
class MarkdownHeading3 extends Heading {
|
|
1987
1993
|
constructor() {
|
|
1988
1994
|
super();
|
|
1989
|
-
this.
|
|
1995
|
+
this.go_1 = 3;
|
|
1990
1996
|
this.renderHeading();
|
|
1991
1997
|
}
|
|
1992
|
-
|
|
1993
|
-
return this.
|
|
1998
|
+
qn() {
|
|
1999
|
+
return this.go_1;
|
|
1994
2000
|
}
|
|
1995
2001
|
}
|
|
1996
2002
|
class MarkdownHeading4 extends Heading {
|
|
1997
2003
|
constructor() {
|
|
1998
2004
|
super();
|
|
1999
|
-
this.
|
|
2005
|
+
this.io_1 = 4;
|
|
2000
2006
|
this.renderHeading();
|
|
2001
2007
|
}
|
|
2002
|
-
|
|
2003
|
-
return this.
|
|
2008
|
+
qn() {
|
|
2009
|
+
return this.io_1;
|
|
2004
2010
|
}
|
|
2005
2011
|
}
|
|
2006
2012
|
class MarkdownHeading5 extends Heading {
|
|
2007
2013
|
constructor() {
|
|
2008
2014
|
super();
|
|
2009
|
-
this.
|
|
2015
|
+
this.ko_1 = 5;
|
|
2010
2016
|
this.renderHeading();
|
|
2011
2017
|
}
|
|
2012
|
-
|
|
2013
|
-
return this.
|
|
2018
|
+
qn() {
|
|
2019
|
+
return this.ko_1;
|
|
2014
2020
|
}
|
|
2015
2021
|
}
|
|
2016
2022
|
class MarkdownHeading6 extends Heading {
|
|
2017
2023
|
constructor() {
|
|
2018
2024
|
super();
|
|
2019
|
-
this.
|
|
2025
|
+
this.mo_1 = 6;
|
|
2020
2026
|
this.renderHeading();
|
|
2021
2027
|
}
|
|
2022
|
-
|
|
2023
|
-
return this.
|
|
2028
|
+
qn() {
|
|
2029
|
+
return this.mo_1;
|
|
2024
2030
|
}
|
|
2025
2031
|
}
|
|
2026
2032
|
class MarkdownHtml extends LeafElement {
|
|
2027
2033
|
constructor() {
|
|
2028
2034
|
super();
|
|
2029
|
-
this.
|
|
2035
|
+
this.no_1 = false;
|
|
2030
2036
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2031
2037
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2032
2038
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2035,8 +2041,8 @@ class MarkdownHtml extends LeafElement {
|
|
|
2035
2041
|
o['mode'] = 'open';
|
|
2036
2042
|
slot(this.attachShadow(o));
|
|
2037
2043
|
}
|
|
2038
|
-
|
|
2039
|
-
return this.
|
|
2044
|
+
on() {
|
|
2045
|
+
return this.no_1;
|
|
2040
2046
|
}
|
|
2041
2047
|
isEditable() {
|
|
2042
2048
|
return false;
|
|
@@ -2050,13 +2056,13 @@ class MarkdownHtml extends LeafElement {
|
|
|
2050
2056
|
return true;
|
|
2051
2057
|
}
|
|
2052
2058
|
get mustBeDirectChildOfDocument() {
|
|
2053
|
-
return this.
|
|
2059
|
+
return this.on();
|
|
2054
2060
|
}
|
|
2055
2061
|
}
|
|
2056
2062
|
class MarkdownImage extends TerminalInlineElement {
|
|
2057
2063
|
constructor() {
|
|
2058
2064
|
super();
|
|
2059
|
-
this.
|
|
2065
|
+
this.bm_1 = false;
|
|
2060
2066
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2061
2067
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2062
2068
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2064,7 +2070,7 @@ class MarkdownImage extends TerminalInlineElement {
|
|
|
2064
2070
|
var o = {};
|
|
2065
2071
|
o['mode'] = 'open';
|
|
2066
2072
|
var shadow = this.attachShadow(o);
|
|
2067
|
-
style(shadow, ':host([destination]) .upload {\n display: none;\n}\n.upload {\n border: #c7c7c7 1px dashed;\n padding: 10px;\n}');
|
|
2073
|
+
style(shadow, ':host {\n position: relative;\n display: inline-block;\n}\n:host([destination]) .upload {\n display: none;\n}\n.upload {\n border: #c7c7c7 1px dashed;\n padding: 10px;\n}\n.delete {\n user-select: none;\n position: absolute;\n top: -8px;\n right: -8px;\n width: 16px;\n height: 16px;\n line-height: 16px;\n text-align: center;\n border-radius: 50%;\n background: white;\n border: 1px solid #c7c7c7;\n cursor: pointer;\n opacity: 0.0;\n transition: opacity 0.2s ease-in-out;\n}\n:host(:hover) .delete {\n opacity: 1.0;\n}');
|
|
2068
2074
|
var tmp = this;
|
|
2069
2075
|
var tmp_0 = element(shadow, 'input', MarkdownImage$lambda);
|
|
2070
2076
|
tmp.uploadInput = tmp_0 instanceof HTMLInputElement ? tmp_0 : THROW_CCE();
|
|
@@ -2074,38 +2080,40 @@ class MarkdownImage extends TerminalInlineElement {
|
|
|
2074
2080
|
tmp_1.img = tmp_2 instanceof HTMLImageElement ? tmp_2 : THROW_CCE();
|
|
2075
2081
|
this.img.addEventListener('error', MarkdownImage$lambda_2(this));
|
|
2076
2082
|
element(shadow, 'slot', MarkdownImage$lambda_3);
|
|
2083
|
+
var deleteButton = element(shadow, 'span', MarkdownImage$lambda_4);
|
|
2084
|
+
deleteButton.addEventListener('click', MarkdownImage$lambda_5(this));
|
|
2077
2085
|
this.upgradeProperty('destination');
|
|
2078
2086
|
}
|
|
2079
|
-
|
|
2080
|
-
return this.
|
|
2087
|
+
on() {
|
|
2088
|
+
return this.bm_1;
|
|
2081
2089
|
}
|
|
2082
|
-
|
|
2090
|
+
oo() {
|
|
2083
2091
|
return this.img;
|
|
2084
2092
|
}
|
|
2085
|
-
|
|
2093
|
+
po() {
|
|
2086
2094
|
return this.uploadInput;
|
|
2087
2095
|
}
|
|
2088
|
-
|
|
2096
|
+
cm(value) {
|
|
2089
2097
|
return this.setAttribute('destination', value);
|
|
2090
2098
|
}
|
|
2091
|
-
|
|
2099
|
+
qo() {
|
|
2092
2100
|
var tmp0_elvis_lhs = this.getAttribute('destination');
|
|
2093
2101
|
return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
|
|
2094
2102
|
}
|
|
2095
|
-
|
|
2096
|
-
super.
|
|
2103
|
+
cc() {
|
|
2104
|
+
super.cc();
|
|
2097
2105
|
this.render();
|
|
2098
2106
|
}
|
|
2099
2107
|
connectedCallback() {
|
|
2100
|
-
return this.
|
|
2108
|
+
return this.cc();
|
|
2101
2109
|
}
|
|
2102
|
-
|
|
2110
|
+
fc(name, oldValue, newValue) {
|
|
2103
2111
|
if (name === 'destination' || name === 'title') {
|
|
2104
2112
|
this.render();
|
|
2105
2113
|
}
|
|
2106
2114
|
}
|
|
2107
2115
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
2108
|
-
return this.
|
|
2116
|
+
return this.fc(name, oldValue, newValue);
|
|
2109
2117
|
}
|
|
2110
2118
|
render() {
|
|
2111
2119
|
this.img.src = this.destination;
|
|
@@ -2125,19 +2133,19 @@ class MarkdownImage extends TerminalInlineElement {
|
|
|
2125
2133
|
return true;
|
|
2126
2134
|
}
|
|
2127
2135
|
get mustBeDirectChildOfDocument() {
|
|
2128
|
-
return this.
|
|
2136
|
+
return this.on();
|
|
2129
2137
|
}
|
|
2130
2138
|
get destination() {
|
|
2131
|
-
return this.
|
|
2139
|
+
return this.qo();
|
|
2132
2140
|
}
|
|
2133
2141
|
set destination(value) {
|
|
2134
|
-
this.
|
|
2142
|
+
this.cm(value);
|
|
2135
2143
|
}
|
|
2136
2144
|
}
|
|
2137
2145
|
class MarkdownLink extends TerminalInlineElement {
|
|
2138
2146
|
constructor() {
|
|
2139
2147
|
super();
|
|
2140
|
-
this.
|
|
2148
|
+
this.ym_1 = false;
|
|
2141
2149
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2142
2150
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2143
2151
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2151,42 +2159,42 @@ class MarkdownLink extends TerminalInlineElement {
|
|
|
2151
2159
|
// Inline function 'kotlin.also' call
|
|
2152
2160
|
var this_0 = tmp_0 instanceof HTMLAnchorElement ? tmp_0 : THROW_CCE();
|
|
2153
2161
|
slot(this_0);
|
|
2154
|
-
tmp.
|
|
2162
|
+
tmp.zm_1 = this_0;
|
|
2155
2163
|
var showLink = element(shadow, 'span', MarkdownLink$lambda_0);
|
|
2156
2164
|
showLink.addEventListener('click', MarkdownLink$lambda_1(this));
|
|
2157
2165
|
var tmp_1 = this;
|
|
2158
2166
|
var tmp_2 = element(shadow, 'input', MarkdownLink$lambda_2);
|
|
2159
|
-
tmp_1.
|
|
2160
|
-
this.
|
|
2161
|
-
this.
|
|
2162
|
-
this.
|
|
2167
|
+
tmp_1.an_1 = tmp_2 instanceof HTMLInputElement ? tmp_2 : THROW_CCE();
|
|
2168
|
+
this.an_1.addEventListener('input', MarkdownLink$lambda_3(this));
|
|
2169
|
+
this.an_1.addEventListener('blur', MarkdownLink$lambda_4(this));
|
|
2170
|
+
this.an_1.addEventListener('keydown', MarkdownLink$lambda_5(this));
|
|
2163
2171
|
}
|
|
2164
|
-
|
|
2165
|
-
return this.
|
|
2172
|
+
on() {
|
|
2173
|
+
return this.ym_1;
|
|
2166
2174
|
}
|
|
2167
|
-
|
|
2175
|
+
cm(value) {
|
|
2168
2176
|
return this.setAttribute('destination', value);
|
|
2169
2177
|
}
|
|
2170
|
-
|
|
2178
|
+
qo() {
|
|
2171
2179
|
var tmp0_elvis_lhs = this.getAttribute('destination');
|
|
2172
2180
|
return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
|
|
2173
2181
|
}
|
|
2174
|
-
|
|
2175
|
-
super.
|
|
2182
|
+
cc() {
|
|
2183
|
+
super.cc();
|
|
2176
2184
|
var tmp = window;
|
|
2177
2185
|
tmp.setTimeout(MarkdownLink$connectedCallback$lambda(this), 5000);
|
|
2178
2186
|
updateLinkTarget(this);
|
|
2179
2187
|
}
|
|
2180
2188
|
connectedCallback() {
|
|
2181
|
-
return this.
|
|
2189
|
+
return this.cc();
|
|
2182
2190
|
}
|
|
2183
|
-
|
|
2191
|
+
fc(name, oldValue, newValue) {
|
|
2184
2192
|
if (name === 'destination' || name === 'title') {
|
|
2185
2193
|
updateLinkTarget(this);
|
|
2186
2194
|
}
|
|
2187
2195
|
}
|
|
2188
2196
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
2189
|
-
return this.
|
|
2197
|
+
return this.fc(name, oldValue, newValue);
|
|
2190
2198
|
}
|
|
2191
2199
|
newEmptyElementNameAfterBreak() {
|
|
2192
2200
|
return null;
|
|
@@ -2196,9 +2204,9 @@ class MarkdownLink extends TerminalInlineElement {
|
|
|
2196
2204
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
2197
2205
|
var this_0 = this.title;
|
|
2198
2206
|
if (charSequenceLength(this_0) > 0) {
|
|
2199
|
-
tmp = '[' + this.innerText + '](' + this.
|
|
2207
|
+
tmp = '[' + this.innerText + '](' + this.qo() + ' "' + this.title + '")';
|
|
2200
2208
|
} else {
|
|
2201
|
-
tmp = '[' + this.innerText + '](' + this.
|
|
2209
|
+
tmp = '[' + this.innerText + '](' + this.qo() + ')';
|
|
2202
2210
|
}
|
|
2203
2211
|
return tmp;
|
|
2204
2212
|
}
|
|
@@ -2206,13 +2214,13 @@ class MarkdownLink extends TerminalInlineElement {
|
|
|
2206
2214
|
return true;
|
|
2207
2215
|
}
|
|
2208
2216
|
get mustBeDirectChildOfDocument() {
|
|
2209
|
-
return this.
|
|
2217
|
+
return this.on();
|
|
2210
2218
|
}
|
|
2211
2219
|
}
|
|
2212
2220
|
class MarkdownList extends ContainerElement {
|
|
2213
2221
|
constructor() {
|
|
2214
2222
|
super();
|
|
2215
|
-
this.
|
|
2223
|
+
this.ro_1 = false;
|
|
2216
2224
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2217
2225
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2218
2226
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2224,13 +2232,13 @@ class MarkdownList extends ContainerElement {
|
|
|
2224
2232
|
style(this_0, ":host {\n counter-reset: section;\n}\n:host ::slotted(*) {\n display: list-item;\n}\n:host([ordered='true']) ::slotted(*) {\n list-style-type: decimal;\n}");
|
|
2225
2233
|
slot(this_0);
|
|
2226
2234
|
}
|
|
2227
|
-
|
|
2228
|
-
return this.
|
|
2235
|
+
on() {
|
|
2236
|
+
return this.ro_1;
|
|
2229
2237
|
}
|
|
2230
|
-
|
|
2238
|
+
so(value) {
|
|
2231
2239
|
return this.setAttribute('ordered', value.toString());
|
|
2232
2240
|
}
|
|
2233
|
-
|
|
2241
|
+
to() {
|
|
2234
2242
|
return this.getAttribute('ordered') === 'true';
|
|
2235
2243
|
}
|
|
2236
2244
|
getMarkdown() {
|
|
@@ -2239,7 +2247,7 @@ class MarkdownList extends ContainerElement {
|
|
|
2239
2247
|
containsMarkdownTextContent() {
|
|
2240
2248
|
return false;
|
|
2241
2249
|
}
|
|
2242
|
-
|
|
2250
|
+
im(child) {
|
|
2243
2251
|
if (child == null)
|
|
2244
2252
|
return Unit_instance;
|
|
2245
2253
|
var list = document.createElement('markdown-list');
|
|
@@ -2249,7 +2257,7 @@ class MarkdownList extends ContainerElement {
|
|
|
2249
2257
|
child.innerHTML = ' ';
|
|
2250
2258
|
child.appendChild(list);
|
|
2251
2259
|
}
|
|
2252
|
-
|
|
2260
|
+
jm(child) {
|
|
2253
2261
|
if (child == null)
|
|
2254
2262
|
return Unit_instance;
|
|
2255
2263
|
var tmp0_safe_receiver = this.parentElement;
|
|
@@ -2264,13 +2272,13 @@ class MarkdownList extends ContainerElement {
|
|
|
2264
2272
|
var nodes = asList(this.childNodes);
|
|
2265
2273
|
var indexOfChild = nodes.n1(child);
|
|
2266
2274
|
// Inline function 'kotlin.collections.forEach' call
|
|
2267
|
-
var _iterator__ex2g4s = drop(nodes, indexOfChild).
|
|
2268
|
-
while (_iterator__ex2g4s.
|
|
2269
|
-
var element = _iterator__ex2g4s.
|
|
2275
|
+
var _iterator__ex2g4s = drop(nodes, indexOfChild).r();
|
|
2276
|
+
while (_iterator__ex2g4s.s()) {
|
|
2277
|
+
var element = _iterator__ex2g4s.t();
|
|
2270
2278
|
nextUp.after(element);
|
|
2271
2279
|
}
|
|
2272
2280
|
}
|
|
2273
|
-
|
|
2281
|
+
hm(child) {
|
|
2274
2282
|
if (child == null)
|
|
2275
2283
|
return Unit_instance;
|
|
2276
2284
|
var nodes = asList(this.childNodes);
|
|
@@ -2279,19 +2287,19 @@ class MarkdownList extends ContainerElement {
|
|
|
2279
2287
|
return Unit_instance;
|
|
2280
2288
|
var paragraph = document.createElement('markdown-paragraph');
|
|
2281
2289
|
// Inline function 'kotlin.collections.forEach' call
|
|
2282
|
-
var _iterator__ex2g4s = toList(asList(child.childNodes)).
|
|
2283
|
-
while (_iterator__ex2g4s.
|
|
2284
|
-
var element = _iterator__ex2g4s.
|
|
2290
|
+
var _iterator__ex2g4s = toList(asList(child.childNodes)).r();
|
|
2291
|
+
while (_iterator__ex2g4s.s()) {
|
|
2292
|
+
var element = _iterator__ex2g4s.t();
|
|
2285
2293
|
paragraph.appendChild(element);
|
|
2286
2294
|
}
|
|
2287
|
-
if (indexOfChild < (nodes.
|
|
2295
|
+
if (indexOfChild < (nodes.u() - 1 | 0)) {
|
|
2288
2296
|
var tmp = document.createElement('markdown-list');
|
|
2289
2297
|
var rest = tmp instanceof MarkdownList ? tmp : THROW_CCE();
|
|
2290
|
-
rest.
|
|
2298
|
+
rest.so(this.to());
|
|
2291
2299
|
// Inline function 'kotlin.collections.forEach' call
|
|
2292
|
-
var _iterator__ex2g4s_0 = drop(nodes, indexOfChild + 1 | 0).
|
|
2293
|
-
while (_iterator__ex2g4s_0.
|
|
2294
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
2300
|
+
var _iterator__ex2g4s_0 = drop(nodes, indexOfChild + 1 | 0).r();
|
|
2301
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
2302
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
2295
2303
|
rest.appendChild(element_0);
|
|
2296
2304
|
}
|
|
2297
2305
|
this.after(rest);
|
|
@@ -2303,7 +2311,7 @@ class MarkdownList extends ContainerElement {
|
|
|
2303
2311
|
}
|
|
2304
2312
|
}
|
|
2305
2313
|
get mustBeDirectChildOfDocument() {
|
|
2306
|
-
return this.
|
|
2314
|
+
return this.on();
|
|
2307
2315
|
}
|
|
2308
2316
|
}
|
|
2309
2317
|
class MarkdownListItem extends ListItem {
|
|
@@ -2324,7 +2332,7 @@ class MarkdownListItem extends ListItem {
|
|
|
2324
2332
|
class MarkdownNumericList extends ContainerElement {
|
|
2325
2333
|
constructor() {
|
|
2326
2334
|
super();
|
|
2327
|
-
this.
|
|
2335
|
+
this.uo_1 = false;
|
|
2328
2336
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2329
2337
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2330
2338
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2336,16 +2344,16 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2336
2344
|
style(this_0, ":host {\n /* fallback for browsers without ::marker { content } support */\n list-style-type: decimal;\n /* a real <ol> gets a fresh counter scope per nesting level for free (it's baked\n into the UA stylesheet); a custom element doesn't, so this does it explicitly \u2014\n without it, nested lists just continue the outer count instead of showing 1.1 */\n counter-reset: numbered-item;\n}");
|
|
2337
2345
|
slot(this_0);
|
|
2338
2346
|
}
|
|
2339
|
-
|
|
2340
|
-
return this.
|
|
2347
|
+
on() {
|
|
2348
|
+
return this.uo_1;
|
|
2341
2349
|
}
|
|
2342
|
-
|
|
2350
|
+
so(value) {
|
|
2343
2351
|
return this.setAttribute('ordered', value.toString());
|
|
2344
2352
|
}
|
|
2345
|
-
|
|
2353
|
+
to() {
|
|
2346
2354
|
return this.getAttribute('ordered') === 'true';
|
|
2347
2355
|
}
|
|
2348
|
-
|
|
2356
|
+
vo(value) {
|
|
2349
2357
|
var tmp;
|
|
2350
2358
|
if (value == null) {
|
|
2351
2359
|
this.removeAttribute('start');
|
|
@@ -2356,7 +2364,7 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2356
2364
|
}
|
|
2357
2365
|
return tmp;
|
|
2358
2366
|
}
|
|
2359
|
-
|
|
2367
|
+
s8() {
|
|
2360
2368
|
var tmp0_safe_receiver = this.getAttribute('start');
|
|
2361
2369
|
return tmp0_safe_receiver == null ? null : toIntOrNull(tmp0_safe_receiver);
|
|
2362
2370
|
}
|
|
@@ -2366,7 +2374,7 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2366
2374
|
containsMarkdownTextContent() {
|
|
2367
2375
|
return false;
|
|
2368
2376
|
}
|
|
2369
|
-
|
|
2377
|
+
im(child) {
|
|
2370
2378
|
if (child == null)
|
|
2371
2379
|
return Unit_instance;
|
|
2372
2380
|
var list = document.createElement('markdown-numeric-list');
|
|
@@ -2376,7 +2384,7 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2376
2384
|
child.innerHTML = ' ';
|
|
2377
2385
|
child.appendChild(list);
|
|
2378
2386
|
}
|
|
2379
|
-
|
|
2387
|
+
jm(child) {
|
|
2380
2388
|
if (child == null)
|
|
2381
2389
|
return Unit_instance;
|
|
2382
2390
|
var tmp0_safe_receiver = this.parentElement;
|
|
@@ -2391,13 +2399,13 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2391
2399
|
var nodes = asList(this.childNodes);
|
|
2392
2400
|
var indexOfChild = nodes.n1(child);
|
|
2393
2401
|
// Inline function 'kotlin.collections.forEach' call
|
|
2394
|
-
var _iterator__ex2g4s = drop(nodes, indexOfChild).
|
|
2395
|
-
while (_iterator__ex2g4s.
|
|
2396
|
-
var element = _iterator__ex2g4s.
|
|
2402
|
+
var _iterator__ex2g4s = drop(nodes, indexOfChild).r();
|
|
2403
|
+
while (_iterator__ex2g4s.s()) {
|
|
2404
|
+
var element = _iterator__ex2g4s.t();
|
|
2397
2405
|
nextUp.after(element);
|
|
2398
2406
|
}
|
|
2399
2407
|
}
|
|
2400
|
-
|
|
2408
|
+
hm(child) {
|
|
2401
2409
|
if (child == null)
|
|
2402
2410
|
return Unit_instance;
|
|
2403
2411
|
var nodes = asList(this.childNodes);
|
|
@@ -2406,21 +2414,21 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2406
2414
|
return Unit_instance;
|
|
2407
2415
|
var paragraph = document.createElement('markdown-paragraph');
|
|
2408
2416
|
// Inline function 'kotlin.collections.forEach' call
|
|
2409
|
-
var _iterator__ex2g4s = toList(asList(child.childNodes)).
|
|
2410
|
-
while (_iterator__ex2g4s.
|
|
2411
|
-
var element = _iterator__ex2g4s.
|
|
2417
|
+
var _iterator__ex2g4s = toList(asList(child.childNodes)).r();
|
|
2418
|
+
while (_iterator__ex2g4s.s()) {
|
|
2419
|
+
var element = _iterator__ex2g4s.t();
|
|
2412
2420
|
paragraph.appendChild(element);
|
|
2413
2421
|
}
|
|
2414
|
-
if (indexOfChild < (nodes.
|
|
2422
|
+
if (indexOfChild < (nodes.u() - 1 | 0)) {
|
|
2415
2423
|
var tmp = document.createElement('markdown-numeric-list');
|
|
2416
2424
|
var rest = tmp instanceof MarkdownNumericList ? tmp : THROW_CCE();
|
|
2417
|
-
rest.
|
|
2418
|
-
var tmp0_elvis_lhs = this.
|
|
2419
|
-
rest.
|
|
2425
|
+
rest.so(this.to());
|
|
2426
|
+
var tmp0_elvis_lhs = this.s8();
|
|
2427
|
+
rest.vo(((tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) + indexOfChild | 0) + 1 | 0);
|
|
2420
2428
|
// Inline function 'kotlin.collections.forEach' call
|
|
2421
|
-
var _iterator__ex2g4s_0 = drop(nodes, indexOfChild + 1 | 0).
|
|
2422
|
-
while (_iterator__ex2g4s_0.
|
|
2423
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
2429
|
+
var _iterator__ex2g4s_0 = drop(nodes, indexOfChild + 1 | 0).r();
|
|
2430
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
2431
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
2424
2432
|
rest.appendChild(element_0);
|
|
2425
2433
|
}
|
|
2426
2434
|
this.after(rest);
|
|
@@ -2432,7 +2440,7 @@ class MarkdownNumericList extends ContainerElement {
|
|
|
2432
2440
|
}
|
|
2433
2441
|
}
|
|
2434
2442
|
get mustBeDirectChildOfDocument() {
|
|
2435
|
-
return this.
|
|
2443
|
+
return this.on();
|
|
2436
2444
|
}
|
|
2437
2445
|
}
|
|
2438
2446
|
class MarkdownNumericListItem extends ListItem {
|
|
@@ -2453,7 +2461,7 @@ class MarkdownNumericListItem extends ListItem {
|
|
|
2453
2461
|
class MarkdownParagraph extends LeafElement {
|
|
2454
2462
|
constructor() {
|
|
2455
2463
|
super();
|
|
2456
|
-
this.
|
|
2464
|
+
this.wo_1 = true;
|
|
2457
2465
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2458
2466
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2459
2467
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2465,8 +2473,8 @@ class MarkdownParagraph extends LeafElement {
|
|
|
2465
2473
|
style(this_0, ':host {\n position: relative;\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n}');
|
|
2466
2474
|
slot(this_0);
|
|
2467
2475
|
}
|
|
2468
|
-
|
|
2469
|
-
return this.
|
|
2476
|
+
on() {
|
|
2477
|
+
return this.wo_1;
|
|
2470
2478
|
}
|
|
2471
2479
|
getMarkdown() {
|
|
2472
2480
|
var tmp = asList(this.childNodes);
|
|
@@ -2491,13 +2499,13 @@ class MarkdownParagraph extends LeafElement {
|
|
|
2491
2499
|
return this.getMarkdown() === '\n\n';
|
|
2492
2500
|
}
|
|
2493
2501
|
get mustBeDirectChildOfDocument() {
|
|
2494
|
-
return this.
|
|
2502
|
+
return this.on();
|
|
2495
2503
|
}
|
|
2496
2504
|
}
|
|
2497
2505
|
class MarkdownQuote extends ContainerElement {
|
|
2498
2506
|
constructor() {
|
|
2499
2507
|
super();
|
|
2500
|
-
this.
|
|
2508
|
+
this.xo_1 = true;
|
|
2501
2509
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2502
2510
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2503
2511
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2509,8 +2517,8 @@ class MarkdownQuote extends ContainerElement {
|
|
|
2509
2517
|
style(this_0, ":host {\n position: relative;\n}\nblockquote::before {\n position: absolute;\n width: 3px;\n height: 100%;\n left: 20px;\n background-color: lightgray;\n content: '';\n}");
|
|
2510
2518
|
element(this_0, 'blockquote', MarkdownQuote$lambda);
|
|
2511
2519
|
}
|
|
2512
|
-
|
|
2513
|
-
return this.
|
|
2520
|
+
on() {
|
|
2521
|
+
return this.xo_1;
|
|
2514
2522
|
}
|
|
2515
2523
|
getMarkdown() {
|
|
2516
2524
|
var tmp = asList(this.childNodes);
|
|
@@ -2528,24 +2536,24 @@ class MarkdownQuote extends ContainerElement {
|
|
|
2528
2536
|
this.before(tmp0_safe_receiver);
|
|
2529
2537
|
}
|
|
2530
2538
|
}
|
|
2531
|
-
|
|
2539
|
+
im(child) {
|
|
2532
2540
|
if (!(child == null)) {
|
|
2533
2541
|
var quote = document.createElement('markdown-quote');
|
|
2534
2542
|
child.replaceWith(quote);
|
|
2535
2543
|
quote.append(child);
|
|
2536
2544
|
}
|
|
2537
2545
|
}
|
|
2538
|
-
|
|
2546
|
+
jm(child) {
|
|
2539
2547
|
if (!(child == null) && this.childNodes.length > 1) {
|
|
2540
2548
|
var nodes = asList(this.childNodes);
|
|
2541
2549
|
var indexOfChild = nodes.n1(child);
|
|
2542
|
-
if (indexOfChild < (nodes.
|
|
2550
|
+
if (indexOfChild < (nodes.u() - 1 | 0)) {
|
|
2543
2551
|
var quote = document.createElement('markdown-quote');
|
|
2544
2552
|
this.after(quote);
|
|
2545
2553
|
// Inline function 'kotlin.collections.forEach' call
|
|
2546
|
-
var _iterator__ex2g4s = drop(nodes, indexOfChild + 1 | 0).
|
|
2547
|
-
while (_iterator__ex2g4s.
|
|
2548
|
-
var element = _iterator__ex2g4s.
|
|
2554
|
+
var _iterator__ex2g4s = drop(nodes, indexOfChild + 1 | 0).r();
|
|
2555
|
+
while (_iterator__ex2g4s.s()) {
|
|
2556
|
+
var element = _iterator__ex2g4s.t();
|
|
2549
2557
|
quote.append(element);
|
|
2550
2558
|
}
|
|
2551
2559
|
}
|
|
@@ -2559,19 +2567,19 @@ class MarkdownQuote extends ContainerElement {
|
|
|
2559
2567
|
}
|
|
2560
2568
|
} else {
|
|
2561
2569
|
// Inline function 'kotlin.collections.forEach' call
|
|
2562
|
-
var _iterator__ex2g4s_0 = toList(asList(this.childNodes)).
|
|
2563
|
-
while (_iterator__ex2g4s_0.
|
|
2564
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
2570
|
+
var _iterator__ex2g4s_0 = toList(asList(this.childNodes)).r();
|
|
2571
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
2572
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
2565
2573
|
this.before(element_0);
|
|
2566
2574
|
}
|
|
2567
2575
|
this.remove();
|
|
2568
2576
|
}
|
|
2569
2577
|
}
|
|
2570
|
-
|
|
2571
|
-
this.
|
|
2578
|
+
hm(child) {
|
|
2579
|
+
this.jm(child);
|
|
2572
2580
|
}
|
|
2573
2581
|
get mustBeDirectChildOfDocument() {
|
|
2574
|
-
return this.
|
|
2582
|
+
return this.on();
|
|
2575
2583
|
}
|
|
2576
2584
|
}
|
|
2577
2585
|
class MarkdownStrike extends InlineElement {
|
|
@@ -2620,7 +2628,7 @@ class MarkdownStrong extends InlineElement {
|
|
|
2620
2628
|
class MarkdownTable extends ContainerElement {
|
|
2621
2629
|
constructor() {
|
|
2622
2630
|
super();
|
|
2623
|
-
this.
|
|
2631
|
+
this.yo_1 = true;
|
|
2624
2632
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2625
2633
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2626
2634
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2632,8 +2640,8 @@ class MarkdownTable extends ContainerElement {
|
|
|
2632
2640
|
style(this_0, ':host {\n display: table;\n border-collapse: collapse;\n}');
|
|
2633
2641
|
slot(this_0);
|
|
2634
2642
|
}
|
|
2635
|
-
|
|
2636
|
-
return this.
|
|
2643
|
+
on() {
|
|
2644
|
+
return this.yo_1;
|
|
2637
2645
|
}
|
|
2638
2646
|
getMarkdown() {
|
|
2639
2647
|
var tmp = asList(this.children);
|
|
@@ -2643,25 +2651,25 @@ class MarkdownTable extends ContainerElement {
|
|
|
2643
2651
|
return false;
|
|
2644
2652
|
}
|
|
2645
2653
|
get mustBeDirectChildOfDocument() {
|
|
2646
|
-
return this.
|
|
2654
|
+
return this.on();
|
|
2647
2655
|
}
|
|
2648
2656
|
}
|
|
2649
2657
|
class MarkdownTableCell extends TableCell {
|
|
2650
2658
|
constructor() {
|
|
2651
2659
|
super();
|
|
2652
|
-
this.
|
|
2660
|
+
this.xn('display: table-cell; border: lightgrey 1px solid;');
|
|
2653
2661
|
}
|
|
2654
2662
|
}
|
|
2655
2663
|
class MarkdownTableHeaderCell extends TableCell {
|
|
2656
2664
|
constructor() {
|
|
2657
2665
|
super();
|
|
2658
|
-
this.
|
|
2666
|
+
this.xn('display: table-cell; border: lightgrey 1px solid; background-color: lightgray;');
|
|
2659
2667
|
}
|
|
2660
2668
|
}
|
|
2661
2669
|
class MarkdownTableRow extends ContainerElement {
|
|
2662
2670
|
constructor() {
|
|
2663
2671
|
super();
|
|
2664
|
-
this.
|
|
2672
|
+
this.zo_1 = false;
|
|
2665
2673
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2666
2674
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2667
2675
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2673,8 +2681,8 @@ class MarkdownTableRow extends ContainerElement {
|
|
|
2673
2681
|
style(this_0, ':host {\n display: table-row;\n border: lightgrey 1px solid;\n}');
|
|
2674
2682
|
slot(this_0);
|
|
2675
2683
|
}
|
|
2676
|
-
|
|
2677
|
-
return this.
|
|
2684
|
+
on() {
|
|
2685
|
+
return this.zo_1;
|
|
2678
2686
|
}
|
|
2679
2687
|
getMarkdown() {
|
|
2680
2688
|
var tmp = asList(this.children);
|
|
@@ -2684,7 +2692,7 @@ class MarkdownTableRow extends ContainerElement {
|
|
|
2684
2692
|
return false;
|
|
2685
2693
|
}
|
|
2686
2694
|
get mustBeDirectChildOfDocument() {
|
|
2687
|
-
return this.
|
|
2695
|
+
return this.on();
|
|
2688
2696
|
}
|
|
2689
2697
|
}
|
|
2690
2698
|
class MarkdownTableHeaderRow extends MarkdownTableRow {
|
|
@@ -2706,31 +2714,31 @@ class MarkdownTaskListItem extends ListItem {
|
|
|
2706
2714
|
var container = element(shadow, 'div', MarkdownTaskListItem$lambda);
|
|
2707
2715
|
var tmp = this;
|
|
2708
2716
|
var tmp_0 = element(container, 'input', MarkdownTaskListItem$lambda_0);
|
|
2709
|
-
tmp.
|
|
2710
|
-
this.
|
|
2717
|
+
tmp.bp_1 = tmp_0 instanceof HTMLInputElement ? tmp_0 : THROW_CCE();
|
|
2718
|
+
this.bp_1.addEventListener('change', MarkdownTaskListItem$lambda_1(this));
|
|
2711
2719
|
element(container, 'div', MarkdownTaskListItem$lambda_2);
|
|
2712
2720
|
}
|
|
2713
|
-
|
|
2721
|
+
cp() {
|
|
2714
2722
|
return this.getAttribute('checked') === 'true';
|
|
2715
2723
|
}
|
|
2716
|
-
|
|
2724
|
+
fc(name, oldValue, newValue) {
|
|
2717
2725
|
if (name === 'checked') {
|
|
2718
|
-
this.
|
|
2726
|
+
this.bp_1.checked = this.cp();
|
|
2719
2727
|
}
|
|
2720
2728
|
}
|
|
2721
2729
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
2722
|
-
return this.
|
|
2730
|
+
return this.fc(name, oldValue, newValue);
|
|
2723
2731
|
}
|
|
2724
|
-
|
|
2725
|
-
return '[' + (this.
|
|
2732
|
+
un() {
|
|
2733
|
+
return '[' + (this.cp() ? 'x' : ' ') + '] ';
|
|
2726
2734
|
}
|
|
2727
2735
|
}
|
|
2728
2736
|
class MarkdownToc extends BaseWebComponent {
|
|
2729
2737
|
constructor() {
|
|
2730
2738
|
super();
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2733
|
-
this.
|
|
2739
|
+
this.dm_1 = false;
|
|
2740
|
+
this.em_1 = null;
|
|
2741
|
+
this.fm_1 = null;
|
|
2734
2742
|
// Inline function 'org.w3c.dom.OPEN' call
|
|
2735
2743
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2736
2744
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2740,29 +2748,29 @@ class MarkdownToc extends BaseWebComponent {
|
|
|
2740
2748
|
style(this.attachShadow(o), ':host {\n display: block;\n}\n@media screen {\n :host(.floating) {\n position: absolute;\n right: 0px;\n top: 0px;\n }\n :host(.floating) .level-2 {\n height: 0px;\n visibility: collapse;\n }\n :host(.floating:hover) .level-2 {\n height: auto;\n visibility: visible;\n }\n}\n.level {\n padding-left: 10px;\n font-size: 0.9em;\n}\n.level a {\n display: block;\n}\ndiv {\n display: flex;\n flex-direction: column;\n}');
|
|
2741
2749
|
this.upgradeProperty('markdownDocument');
|
|
2742
2750
|
}
|
|
2743
|
-
|
|
2744
|
-
return this.
|
|
2751
|
+
on() {
|
|
2752
|
+
return this.dm_1;
|
|
2745
2753
|
}
|
|
2746
|
-
|
|
2747
|
-
this.
|
|
2754
|
+
gm(value) {
|
|
2755
|
+
this.fm_1 = value;
|
|
2748
2756
|
this.refresh();
|
|
2749
2757
|
}
|
|
2750
|
-
|
|
2751
|
-
return this.
|
|
2758
|
+
jn() {
|
|
2759
|
+
return this.fm_1;
|
|
2752
2760
|
}
|
|
2753
|
-
|
|
2754
|
-
super.
|
|
2755
|
-
if (this.
|
|
2756
|
-
this.
|
|
2761
|
+
cc() {
|
|
2762
|
+
super.cc();
|
|
2763
|
+
if (this.fm_1 == null) {
|
|
2764
|
+
this.gm(this.closest('markdown-document'));
|
|
2757
2765
|
var tmp = window;
|
|
2758
2766
|
tmp.setTimeout(MarkdownToc$connectedCallback$lambda(this), 1000);
|
|
2759
2767
|
}
|
|
2760
2768
|
}
|
|
2761
2769
|
connectedCallback() {
|
|
2762
|
-
return this.
|
|
2770
|
+
return this.cc();
|
|
2763
2771
|
}
|
|
2764
2772
|
refresh() {
|
|
2765
|
-
var tmp0_elvis_lhs = this.
|
|
2773
|
+
var tmp0_elvis_lhs = this.fm_1;
|
|
2766
2774
|
var tmp;
|
|
2767
2775
|
if (tmp0_elvis_lhs == null) {
|
|
2768
2776
|
return Unit_instance;
|
|
@@ -2778,7 +2786,7 @@ class MarkdownToc extends BaseWebComponent {
|
|
|
2778
2786
|
tmp_0 = tmp1_elvis_lhs;
|
|
2779
2787
|
}
|
|
2780
2788
|
var shadow = tmp_0;
|
|
2781
|
-
var tmp2_safe_receiver = this.
|
|
2789
|
+
var tmp2_safe_receiver = this.em_1;
|
|
2782
2790
|
if (tmp2_safe_receiver == null)
|
|
2783
2791
|
null;
|
|
2784
2792
|
else {
|
|
@@ -2786,24 +2794,24 @@ class MarkdownToc extends BaseWebComponent {
|
|
|
2786
2794
|
}
|
|
2787
2795
|
var currentDepth = 1;
|
|
2788
2796
|
var currentList = document.createElement('div');
|
|
2789
|
-
this.
|
|
2797
|
+
this.em_1 = currentList;
|
|
2790
2798
|
shadow.appendChild(currentList);
|
|
2791
2799
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2792
2800
|
var tmp0 = asList(root.querySelectorAll('*'));
|
|
2793
2801
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2794
|
-
var destination = ArrayList.
|
|
2795
|
-
var _iterator__ex2g4s = tmp0.
|
|
2796
|
-
while (_iterator__ex2g4s.
|
|
2797
|
-
var element = _iterator__ex2g4s.
|
|
2802
|
+
var destination = ArrayList.z();
|
|
2803
|
+
var _iterator__ex2g4s = tmp0.r();
|
|
2804
|
+
while (_iterator__ex2g4s.s()) {
|
|
2805
|
+
var element = _iterator__ex2g4s.t();
|
|
2798
2806
|
if (element instanceof Heading) {
|
|
2799
|
-
destination.
|
|
2807
|
+
destination.n(element);
|
|
2800
2808
|
}
|
|
2801
2809
|
}
|
|
2802
2810
|
var headings = destination;
|
|
2803
2811
|
// Inline function 'kotlin.collections.forEach' call
|
|
2804
|
-
var _iterator__ex2g4s_0 = headings.
|
|
2805
|
-
while (_iterator__ex2g4s_0.
|
|
2806
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
2812
|
+
var _iterator__ex2g4s_0 = headings.r();
|
|
2813
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
2814
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
2807
2815
|
var tmp_1 = document.createElement('a');
|
|
2808
2816
|
var a = tmp_1 instanceof HTMLAnchorElement ? tmp_1 : THROW_CCE();
|
|
2809
2817
|
a.href = '#' + element_0.id;
|
|
@@ -2828,44 +2836,44 @@ class MarkdownToc extends BaseWebComponent {
|
|
|
2828
2836
|
return '${toc}';
|
|
2829
2837
|
}
|
|
2830
2838
|
get mustBeDirectChildOfDocument() {
|
|
2831
|
-
return this.
|
|
2839
|
+
return this.on();
|
|
2832
2840
|
}
|
|
2833
2841
|
get markdownDocument() {
|
|
2834
|
-
return this.
|
|
2842
|
+
return this.jn();
|
|
2835
2843
|
}
|
|
2836
2844
|
set markdownDocument(value) {
|
|
2837
|
-
this.
|
|
2845
|
+
this.gm(value);
|
|
2838
2846
|
}
|
|
2839
2847
|
}
|
|
2840
2848
|
class HeadingAnchors {
|
|
2841
2849
|
constructor() {
|
|
2842
2850
|
HeadingAnchors_instance = this;
|
|
2843
|
-
this.
|
|
2844
|
-
this.
|
|
2851
|
+
this.dp_1 = Regex.l8('\\s*\\{([^}]+)\\}$');
|
|
2852
|
+
this.ep_1 = Regex.k8('[^\\w\u0430-\u044F\u0456\u0457\u0454]+', RegexOption_IGNORE_CASE_getInstance());
|
|
2845
2853
|
}
|
|
2846
|
-
|
|
2847
|
-
var match = this.
|
|
2854
|
+
fp(idPrefixForDefault, text, useTextInId) {
|
|
2855
|
+
var match = this.dp_1.o8(text);
|
|
2848
2856
|
var tmp;
|
|
2849
2857
|
if (!(match == null)) {
|
|
2850
|
-
tmp = to(match.
|
|
2858
|
+
tmp = to(match.m9().v(1), substring(text, 0, match.r8().wa_1));
|
|
2851
2859
|
} else {
|
|
2852
2860
|
var tmp_0;
|
|
2853
2861
|
if (useTextInId) {
|
|
2854
|
-
tmp_0 = idPrefixForDefault + this.
|
|
2862
|
+
tmp_0 = idPrefixForDefault + this.gp(text);
|
|
2855
2863
|
} else {
|
|
2856
|
-
tmp_0 = idPrefixForDefault + ((new Date()).getTime() + Default_getInstance().
|
|
2864
|
+
tmp_0 = idPrefixForDefault + ((new Date()).getTime() + Default_getInstance().ma());
|
|
2857
2865
|
}
|
|
2858
2866
|
var id = tmp_0;
|
|
2859
2867
|
tmp = to(id, text);
|
|
2860
2868
|
}
|
|
2861
2869
|
return tmp;
|
|
2862
2870
|
}
|
|
2863
|
-
|
|
2871
|
+
gp(text) {
|
|
2864
2872
|
// Inline function 'kotlin.text.lowercase' call
|
|
2865
2873
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2866
2874
|
var tmp0 = text.toLowerCase();
|
|
2867
2875
|
// Inline function 'kotlin.text.replace' call
|
|
2868
|
-
return this.
|
|
2876
|
+
return this.ep_1.p8(tmp0, '-');
|
|
2869
2877
|
}
|
|
2870
2878
|
}
|
|
2871
2879
|
class MarkdownRenderer {}
|
|
@@ -2981,19 +2989,19 @@ class TsStackMarkdownRenderer extends logic_tools_markdown_komponents_tsstack_Ts
|
|
|
2981
2989
|
constructor(delegate) {
|
|
2982
2990
|
delegate = delegate === VOID ? new MarkdownComponentsRenderer() : delegate;
|
|
2983
2991
|
super();
|
|
2984
|
-
this.
|
|
2985
|
-
this.
|
|
2992
|
+
this.hp_1 = delegate;
|
|
2993
|
+
this.ip_1 = false;
|
|
2986
2994
|
}
|
|
2987
|
-
|
|
2988
|
-
return this.
|
|
2995
|
+
jp() {
|
|
2996
|
+
return this.hp_1;
|
|
2989
2997
|
}
|
|
2990
|
-
|
|
2998
|
+
kp(code, lang, escaped, meta) {
|
|
2991
2999
|
var tmp;
|
|
2992
3000
|
// Inline function 'kotlin.text.isNullOrEmpty' call
|
|
2993
3001
|
if (!(meta == null || charSequenceLength(meta) === 0)) {
|
|
2994
|
-
var _destruct__k2r9zo = HeadingAnchors_getInstance().
|
|
2995
|
-
var id = _destruct__k2r9zo.
|
|
2996
|
-
var newLang = _destruct__k2r9zo.
|
|
3002
|
+
var _destruct__k2r9zo = HeadingAnchors_getInstance().fp('code-', meta, false);
|
|
3003
|
+
var id = _destruct__k2r9zo.ob();
|
|
3004
|
+
var newLang = _destruct__k2r9zo.pb();
|
|
2997
3005
|
tmp = this.codeWithAnchor(code, newLang, id, escaped);
|
|
2998
3006
|
} else {
|
|
2999
3007
|
tmp = this.codeWithAnchor(code, lang, null, escaped);
|
|
@@ -3001,9 +3009,9 @@ class TsStackMarkdownRenderer extends logic_tools_markdown_komponents_tsstack_Ts
|
|
|
3001
3009
|
return tmp;
|
|
3002
3010
|
}
|
|
3003
3011
|
code(code, lang, escaped, meta) {
|
|
3004
|
-
return this.
|
|
3012
|
+
return this.kp(code, lang, escaped, meta);
|
|
3005
3013
|
}
|
|
3006
|
-
|
|
3014
|
+
lp(code, lang, id, escaped) {
|
|
3007
3015
|
var tmp;
|
|
3008
3016
|
if (!(escaped === true)) {
|
|
3009
3017
|
var tmp0_safe_receiver = this.options.escape;
|
|
@@ -3013,119 +3021,119 @@ class TsStackMarkdownRenderer extends logic_tools_markdown_komponents_tsstack_Ts
|
|
|
3013
3021
|
tmp = code;
|
|
3014
3022
|
}
|
|
3015
3023
|
var codeText = tmp;
|
|
3016
|
-
return this.
|
|
3024
|
+
return this.hp_1.code(codeText, lang, id);
|
|
3017
3025
|
}
|
|
3018
3026
|
codeWithAnchor(code, lang, id, escaped, $super) {
|
|
3019
3027
|
escaped = escaped === VOID ? null : escaped;
|
|
3020
|
-
return $super === VOID ? this.
|
|
3028
|
+
return $super === VOID ? this.lp(code, lang, id, escaped) : $super.lp.call(this, code, lang, id, escaped);
|
|
3021
3029
|
}
|
|
3022
|
-
|
|
3023
|
-
return this.
|
|
3030
|
+
mp(quote) {
|
|
3031
|
+
return this.hp_1.blockquote(quote);
|
|
3024
3032
|
}
|
|
3025
3033
|
blockquote(quote) {
|
|
3026
|
-
return this.
|
|
3034
|
+
return this.mp(quote);
|
|
3027
3035
|
}
|
|
3028
|
-
|
|
3029
|
-
return this.
|
|
3036
|
+
np(html) {
|
|
3037
|
+
return this.hp_1.html(html);
|
|
3030
3038
|
}
|
|
3031
3039
|
html(html) {
|
|
3032
|
-
return this.
|
|
3040
|
+
return this.np(html);
|
|
3033
3041
|
}
|
|
3034
|
-
|
|
3035
|
-
var _destruct__k2r9zo = HeadingAnchors_getInstance().
|
|
3036
|
-
var id = _destruct__k2r9zo.
|
|
3037
|
-
var newText = _destruct__k2r9zo.
|
|
3038
|
-
return this.
|
|
3042
|
+
op(text, level, raw) {
|
|
3043
|
+
var _destruct__k2r9zo = HeadingAnchors_getInstance().fp('heading-', text, true);
|
|
3044
|
+
var id = _destruct__k2r9zo.ob();
|
|
3045
|
+
var newText = _destruct__k2r9zo.pb();
|
|
3046
|
+
return this.hp_1.heading(newText, level, id);
|
|
3039
3047
|
}
|
|
3040
3048
|
heading(text, level, raw) {
|
|
3041
|
-
return this.
|
|
3049
|
+
return this.op(text, level, raw);
|
|
3042
3050
|
}
|
|
3043
|
-
|
|
3044
|
-
return this.
|
|
3051
|
+
pp() {
|
|
3052
|
+
return this.hp_1.hr();
|
|
3045
3053
|
}
|
|
3046
3054
|
hr() {
|
|
3047
|
-
return this.
|
|
3055
|
+
return this.pp();
|
|
3048
3056
|
}
|
|
3049
|
-
|
|
3050
|
-
return this.
|
|
3057
|
+
qp(body, ordered) {
|
|
3058
|
+
return this.hp_1.list(body, ordered === true);
|
|
3051
3059
|
}
|
|
3052
3060
|
list(body, ordered) {
|
|
3053
|
-
return this.
|
|
3061
|
+
return this.qp(body, ordered);
|
|
3054
3062
|
}
|
|
3055
|
-
|
|
3056
|
-
return startsWith(text, '<markdown-paragraph>[ ] ') ? this.
|
|
3063
|
+
rp(text) {
|
|
3064
|
+
return startsWith(text, '<markdown-paragraph>[ ] ') ? this.hp_1.taskListItem(replacePrefixOnce(text, '<markdown-paragraph>[ ] ', '<markdown-paragraph>'), false) : startsWith(text, '<markdown-paragraph>[x] ') ? this.hp_1.taskListItem(replacePrefixOnce(text, '<markdown-paragraph>[x] ', '<markdown-paragraph>'), true) : startsWith(text, '[ ] ') ? this.hp_1.taskListItem(removePrefix(text, '[ ] '), false) : startsWith(text, '[x] ') ? this.hp_1.taskListItem(removePrefix(text, '[x] '), true) : this.hp_1.listItem(text);
|
|
3057
3065
|
}
|
|
3058
3066
|
listitem(text) {
|
|
3059
|
-
return this.
|
|
3067
|
+
return this.rp(text);
|
|
3060
3068
|
}
|
|
3061
|
-
|
|
3062
|
-
return this.
|
|
3069
|
+
sp(text) {
|
|
3070
|
+
return this.hp_1.paragraph(text);
|
|
3063
3071
|
}
|
|
3064
3072
|
paragraph(text) {
|
|
3065
|
-
return this.
|
|
3073
|
+
return this.sp(text);
|
|
3066
3074
|
}
|
|
3067
|
-
|
|
3068
|
-
return this.
|
|
3075
|
+
tp(header, body) {
|
|
3076
|
+
return this.hp_1.table(header, body);
|
|
3069
3077
|
}
|
|
3070
3078
|
table(header, body) {
|
|
3071
|
-
return this.
|
|
3079
|
+
return this.tp(header, body);
|
|
3072
3080
|
}
|
|
3073
|
-
|
|
3074
|
-
var isHeaderRow = this.
|
|
3075
|
-
this.
|
|
3076
|
-
return isHeaderRow ? this.
|
|
3081
|
+
up(content) {
|
|
3082
|
+
var isHeaderRow = this.ip_1;
|
|
3083
|
+
this.ip_1 = false;
|
|
3084
|
+
return isHeaderRow ? this.hp_1.tableHeaderRow(content) : this.hp_1.tableRow(content);
|
|
3077
3085
|
}
|
|
3078
3086
|
tablerow(content) {
|
|
3079
|
-
return this.
|
|
3087
|
+
return this.up(content);
|
|
3080
3088
|
}
|
|
3081
|
-
|
|
3089
|
+
vp(content, flags) {
|
|
3082
3090
|
var tmp;
|
|
3083
3091
|
if (flags.header == true) {
|
|
3084
|
-
this.
|
|
3085
|
-
tmp = this.
|
|
3092
|
+
this.ip_1 = true;
|
|
3093
|
+
tmp = this.hp_1.tableHeaderCell(content);
|
|
3086
3094
|
} else {
|
|
3087
|
-
tmp = this.
|
|
3095
|
+
tmp = this.hp_1.tableCell(content);
|
|
3088
3096
|
}
|
|
3089
3097
|
return tmp;
|
|
3090
3098
|
}
|
|
3091
3099
|
tablecell(content, flags) {
|
|
3092
|
-
return this.
|
|
3100
|
+
return this.vp(content, flags);
|
|
3093
3101
|
}
|
|
3094
|
-
|
|
3095
|
-
return this.
|
|
3102
|
+
wp(text) {
|
|
3103
|
+
return this.hp_1.strong(text);
|
|
3096
3104
|
}
|
|
3097
3105
|
strong(text) {
|
|
3098
|
-
return this.
|
|
3106
|
+
return this.wp(text);
|
|
3099
3107
|
}
|
|
3100
|
-
|
|
3101
|
-
return this.
|
|
3108
|
+
xp(text) {
|
|
3109
|
+
return this.hp_1.emphasis(text);
|
|
3102
3110
|
}
|
|
3103
3111
|
em(text) {
|
|
3104
|
-
return this.
|
|
3112
|
+
return this.xp(text);
|
|
3105
3113
|
}
|
|
3106
|
-
|
|
3107
|
-
return this.
|
|
3114
|
+
yp(text) {
|
|
3115
|
+
return this.hp_1.codeSpan(text);
|
|
3108
3116
|
}
|
|
3109
3117
|
codespan(text) {
|
|
3110
|
-
return this.
|
|
3118
|
+
return this.yp(text);
|
|
3111
3119
|
}
|
|
3112
|
-
|
|
3113
|
-
return this.
|
|
3120
|
+
zp(text) {
|
|
3121
|
+
return this.hp_1.strikethrough(text);
|
|
3114
3122
|
}
|
|
3115
3123
|
del(text) {
|
|
3116
|
-
return this.
|
|
3124
|
+
return this.zp(text);
|
|
3117
3125
|
}
|
|
3118
|
-
|
|
3119
|
-
return this.
|
|
3126
|
+
aq(href, title, text) {
|
|
3127
|
+
return this.hp_1.link(href, title, text);
|
|
3120
3128
|
}
|
|
3121
3129
|
link(href, title, text) {
|
|
3122
|
-
return this.
|
|
3130
|
+
return this.aq(href, title, text);
|
|
3123
3131
|
}
|
|
3124
|
-
|
|
3125
|
-
return this.
|
|
3132
|
+
bq(href, title, text) {
|
|
3133
|
+
return this.hp_1.image(href, title, text);
|
|
3126
3134
|
}
|
|
3127
3135
|
image(href, title, text) {
|
|
3128
|
-
return this.
|
|
3136
|
+
return this.bq(href, title, text);
|
|
3129
3137
|
}
|
|
3130
3138
|
}
|
|
3131
3139
|
//endregion
|
|
@@ -3244,6 +3252,177 @@ function DropdownElement$lambda($this$element) {
|
|
|
3244
3252
|
slot($this$element);
|
|
3245
3253
|
return Unit_instance;
|
|
3246
3254
|
}
|
|
3255
|
+
function htmlToMarkdownFragment(html) {
|
|
3256
|
+
var container = document.createElement('div');
|
|
3257
|
+
container.innerHTML = html;
|
|
3258
|
+
var fragment = document.createDocumentFragment();
|
|
3259
|
+
var currentParagraph = {_v: document.createElement('markdown-paragraph')};
|
|
3260
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3261
|
+
var _iterator__ex2g4s = asList(container.childNodes).r();
|
|
3262
|
+
while (_iterator__ex2g4s.s()) {
|
|
3263
|
+
var element = _iterator__ex2g4s.t();
|
|
3264
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3265
|
+
var _iterator__ex2g4s_0 = convertInlineNode(element).r();
|
|
3266
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
3267
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
3268
|
+
currentParagraph._v.appendChild(element_0);
|
|
3269
|
+
}
|
|
3270
|
+
var tmp;
|
|
3271
|
+
if (element instanceof Element) {
|
|
3272
|
+
var tmp_0 = setOf(['p', 'div']);
|
|
3273
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
3274
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
3275
|
+
var tmp$ret$4 = element.tagName.toLowerCase();
|
|
3276
|
+
tmp = tmp_0.m1(tmp$ret$4);
|
|
3277
|
+
} else {
|
|
3278
|
+
tmp = false;
|
|
3279
|
+
}
|
|
3280
|
+
if (tmp) {
|
|
3281
|
+
htmlToMarkdownFragment$flushParagraphIfNonEmpty(currentParagraph, fragment);
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
htmlToMarkdownFragment$flushParagraphIfNonEmpty(currentParagraph, fragment);
|
|
3285
|
+
return fragment;
|
|
3286
|
+
}
|
|
3287
|
+
function convertInlineNode(node) {
|
|
3288
|
+
var tmp;
|
|
3289
|
+
if (node instanceof Text) {
|
|
3290
|
+
var tmp_0 = document;
|
|
3291
|
+
var tmp0_elvis_lhs = node.textContent;
|
|
3292
|
+
tmp = listOf(tmp_0.createTextNode(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
|
|
3293
|
+
} else {
|
|
3294
|
+
if (node instanceof Element) {
|
|
3295
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
3296
|
+
var tmp0 = asList(node.childNodes);
|
|
3297
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
3298
|
+
var destination = ArrayList.z();
|
|
3299
|
+
var _iterator__ex2g4s = tmp0.r();
|
|
3300
|
+
while (_iterator__ex2g4s.s()) {
|
|
3301
|
+
var element = _iterator__ex2g4s.t();
|
|
3302
|
+
var list = convertInlineNode(element);
|
|
3303
|
+
addAll(destination, list);
|
|
3304
|
+
}
|
|
3305
|
+
var children = destination;
|
|
3306
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
3307
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
3308
|
+
var tmp_1;
|
|
3309
|
+
switch (node.tagName.toLowerCase()) {
|
|
3310
|
+
case 'b':
|
|
3311
|
+
case 'strong':
|
|
3312
|
+
tmp_1 = children.d1() ? children : listOf(wrapChildren('markdown-strong', children));
|
|
3313
|
+
break;
|
|
3314
|
+
case 'i':
|
|
3315
|
+
case 'em':
|
|
3316
|
+
tmp_1 = children.d1() ? children : listOf(wrapChildren('markdown-emphasis', children));
|
|
3317
|
+
break;
|
|
3318
|
+
case 'a':
|
|
3319
|
+
var tmp2_safe_receiver = node.getAttribute('href');
|
|
3320
|
+
var tmp_2;
|
|
3321
|
+
if (tmp2_safe_receiver == null) {
|
|
3322
|
+
tmp_2 = null;
|
|
3323
|
+
} else {
|
|
3324
|
+
// Inline function 'kotlin.takeIf' call
|
|
3325
|
+
var tmp_3;
|
|
3326
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
3327
|
+
if (charSequenceLength(tmp2_safe_receiver) > 0) {
|
|
3328
|
+
tmp_3 = tmp2_safe_receiver;
|
|
3329
|
+
} else {
|
|
3330
|
+
tmp_3 = null;
|
|
3331
|
+
}
|
|
3332
|
+
tmp_2 = tmp_3;
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
var tmp3_safe_receiver = tmp_2;
|
|
3336
|
+
var tmp_4;
|
|
3337
|
+
if (tmp3_safe_receiver == null) {
|
|
3338
|
+
tmp_4 = null;
|
|
3339
|
+
} else {
|
|
3340
|
+
// Inline function 'kotlin.let' call
|
|
3341
|
+
// Inline function 'kotlin.apply' call
|
|
3342
|
+
var this_0 = wrapChildren('markdown-link', children);
|
|
3343
|
+
this_0.setAttribute('destination', tmp3_safe_receiver);
|
|
3344
|
+
tmp_4 = listOf(this_0);
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
var tmp4_elvis_lhs = tmp_4;
|
|
3348
|
+
tmp_1 = tmp4_elvis_lhs == null ? children : tmp4_elvis_lhs;
|
|
3349
|
+
break;
|
|
3350
|
+
case 'img':
|
|
3351
|
+
var tmp5_safe_receiver = node.getAttribute('src');
|
|
3352
|
+
var tmp_5;
|
|
3353
|
+
if (tmp5_safe_receiver == null) {
|
|
3354
|
+
tmp_5 = null;
|
|
3355
|
+
} else {
|
|
3356
|
+
// Inline function 'kotlin.takeIf' call
|
|
3357
|
+
var tmp_6;
|
|
3358
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
3359
|
+
if (charSequenceLength(tmp5_safe_receiver) > 0) {
|
|
3360
|
+
tmp_6 = tmp5_safe_receiver;
|
|
3361
|
+
} else {
|
|
3362
|
+
tmp_6 = null;
|
|
3363
|
+
}
|
|
3364
|
+
tmp_5 = tmp_6;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
var tmp6_safe_receiver = tmp_5;
|
|
3368
|
+
var tmp_7;
|
|
3369
|
+
if (tmp6_safe_receiver == null) {
|
|
3370
|
+
tmp_7 = null;
|
|
3371
|
+
} else {
|
|
3372
|
+
// Inline function 'kotlin.let' call
|
|
3373
|
+
// Inline function 'kotlin.apply' call
|
|
3374
|
+
var this_1 = document.createElement('markdown-image');
|
|
3375
|
+
this_1.setAttribute('destination', tmp6_safe_receiver);
|
|
3376
|
+
var tmp0_safe_receiver = node.getAttribute('title');
|
|
3377
|
+
if (tmp0_safe_receiver == null)
|
|
3378
|
+
null;
|
|
3379
|
+
else {
|
|
3380
|
+
// Inline function 'kotlin.let' call
|
|
3381
|
+
this_1.setAttribute('title', tmp0_safe_receiver);
|
|
3382
|
+
}
|
|
3383
|
+
var tmp1_elvis_lhs = node.getAttribute('alt');
|
|
3384
|
+
this_1.textContent = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
|
|
3385
|
+
tmp_7 = listOf(this_1);
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
var tmp7_elvis_lhs = tmp_7;
|
|
3389
|
+
tmp_1 = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
|
|
3390
|
+
break;
|
|
3391
|
+
case 'br':
|
|
3392
|
+
tmp_1 = listOf(document.createElement('br'));
|
|
3393
|
+
break;
|
|
3394
|
+
case 'script':
|
|
3395
|
+
case 'style':
|
|
3396
|
+
tmp_1 = emptyList();
|
|
3397
|
+
break;
|
|
3398
|
+
default:
|
|
3399
|
+
tmp_1 = children;
|
|
3400
|
+
break;
|
|
3401
|
+
}
|
|
3402
|
+
tmp = tmp_1;
|
|
3403
|
+
} else {
|
|
3404
|
+
tmp = emptyList();
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
return tmp;
|
|
3408
|
+
}
|
|
3409
|
+
function wrapChildren(tagName, children) {
|
|
3410
|
+
// Inline function 'kotlin.apply' call
|
|
3411
|
+
var this_0 = document.createElement(tagName);
|
|
3412
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3413
|
+
var _iterator__ex2g4s = children.r();
|
|
3414
|
+
while (_iterator__ex2g4s.s()) {
|
|
3415
|
+
var element = _iterator__ex2g4s.t();
|
|
3416
|
+
this_0.appendChild(element);
|
|
3417
|
+
}
|
|
3418
|
+
return this_0;
|
|
3419
|
+
}
|
|
3420
|
+
function htmlToMarkdownFragment$flushParagraphIfNonEmpty(currentParagraph, fragment) {
|
|
3421
|
+
if (currentParagraph._v.hasChildNodes()) {
|
|
3422
|
+
fragment.appendChild(currentParagraph._v);
|
|
3423
|
+
}
|
|
3424
|
+
currentParagraph._v = document.createElement('markdown-paragraph');
|
|
3425
|
+
}
|
|
3247
3426
|
function get_defaultParser() {
|
|
3248
3427
|
_init_properties_MarkdownDocument_kt__r41r2i();
|
|
3249
3428
|
return defaultParser;
|
|
@@ -3292,7 +3471,7 @@ function onDrop($this, event) {
|
|
|
3292
3471
|
var file = ensureNotNull(files.item(0));
|
|
3293
3472
|
var tmp0 = file.type;
|
|
3294
3473
|
// Inline function 'kotlin.text.matches' call
|
|
3295
|
-
if (Regex.
|
|
3474
|
+
if (Regex.l8('image.*').m8(tmp0)) {
|
|
3296
3475
|
event.stopPropagation();
|
|
3297
3476
|
event.preventDefault();
|
|
3298
3477
|
var reader = new FileReader();
|
|
@@ -3339,59 +3518,153 @@ function onDragOver($this, event) {
|
|
|
3339
3518
|
event.preventDefault();
|
|
3340
3519
|
}
|
|
3341
3520
|
function onPaste($this, event) {
|
|
3342
|
-
var
|
|
3343
|
-
var
|
|
3521
|
+
var clipboardData = event.clipboardData;
|
|
3522
|
+
var tmp1_safe_receiver = clipboardData == null ? null : clipboardData.getData('text/markdown');
|
|
3523
|
+
var tmp;
|
|
3524
|
+
if (tmp1_safe_receiver == null) {
|
|
3525
|
+
tmp = null;
|
|
3526
|
+
} else {
|
|
3527
|
+
// Inline function 'kotlin.takeIf' call
|
|
3528
|
+
var tmp_0;
|
|
3529
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
3530
|
+
if (charSequenceLength(tmp1_safe_receiver) > 0) {
|
|
3531
|
+
tmp_0 = tmp1_safe_receiver;
|
|
3532
|
+
} else {
|
|
3533
|
+
tmp_0 = null;
|
|
3534
|
+
}
|
|
3535
|
+
tmp = tmp_0;
|
|
3536
|
+
}
|
|
3537
|
+
var markdownFromClipboard = tmp;
|
|
3344
3538
|
// Inline function 'kotlin.text.isNullOrEmpty' call
|
|
3345
|
-
if (!(
|
|
3346
|
-
|
|
3347
|
-
|
|
3539
|
+
if (!(markdownFromClipboard == null || charSequenceLength(markdownFromClipboard) === 0)) {
|
|
3540
|
+
insertMarkdownAtSelection($this, markdownFromClipboard);
|
|
3541
|
+
event.preventDefault();
|
|
3542
|
+
$this.onChange();
|
|
3543
|
+
return Unit_instance;
|
|
3544
|
+
}
|
|
3545
|
+
var tmp3_safe_receiver = clipboardData == null ? null : clipboardData.getData('text/html');
|
|
3546
|
+
var tmp_1;
|
|
3547
|
+
if (tmp3_safe_receiver == null) {
|
|
3548
|
+
tmp_1 = null;
|
|
3549
|
+
} else {
|
|
3550
|
+
// Inline function 'kotlin.takeIf' call
|
|
3551
|
+
var tmp_2;
|
|
3552
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
3553
|
+
if (charSequenceLength(tmp3_safe_receiver) > 0) {
|
|
3554
|
+
tmp_2 = tmp3_safe_receiver;
|
|
3555
|
+
} else {
|
|
3556
|
+
tmp_2 = null;
|
|
3557
|
+
}
|
|
3558
|
+
tmp_1 = tmp_2;
|
|
3559
|
+
}
|
|
3560
|
+
var html = tmp_1;
|
|
3561
|
+
var tmp_3;
|
|
3562
|
+
if (html == null) {
|
|
3563
|
+
tmp_3 = null;
|
|
3564
|
+
} else {
|
|
3565
|
+
// Inline function 'kotlin.let' call
|
|
3566
|
+
tmp_3 = htmlToMarkdownFragment(html);
|
|
3567
|
+
}
|
|
3568
|
+
var htmlFragment = tmp_3;
|
|
3569
|
+
if (!(htmlFragment == null) && htmlFragment.hasChildNodes()) {
|
|
3570
|
+
var tmp5_safe_receiver = $this.getSelection();
|
|
3571
|
+
if (tmp5_safe_receiver == null)
|
|
3348
3572
|
null;
|
|
3349
3573
|
else {
|
|
3350
|
-
|
|
3574
|
+
tmp5_safe_receiver.deleteFromDocument();
|
|
3351
3575
|
}
|
|
3352
|
-
var
|
|
3353
|
-
var
|
|
3354
|
-
|
|
3355
|
-
|
|
3576
|
+
var tmp6_safe_receiver = $this.getSelection();
|
|
3577
|
+
var range = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.getRangeAt(0);
|
|
3578
|
+
if (!(range == null)) {
|
|
3579
|
+
insertFragmentAtSelection($this, range, htmlFragment);
|
|
3580
|
+
event.preventDefault();
|
|
3581
|
+
$this.onChange();
|
|
3356
3582
|
return Unit_instance;
|
|
3357
|
-
} else {
|
|
3358
|
-
tmp = tmp3_elvis_lhs;
|
|
3359
3583
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3584
|
+
}
|
|
3585
|
+
var plainText = clipboardData == null ? null : clipboardData.getData('text/plain');
|
|
3586
|
+
// Inline function 'kotlin.text.isNullOrEmpty' call
|
|
3587
|
+
if (!(plainText == null || charSequenceLength(plainText) === 0)) {
|
|
3588
|
+
insertPlainTextAtSelection($this, plainText);
|
|
3589
|
+
event.preventDefault();
|
|
3590
|
+
$this.onChange();
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
function insertMarkdownAtSelection($this, markdown) {
|
|
3594
|
+
var tmp0_safe_receiver = $this.getSelection();
|
|
3595
|
+
if (tmp0_safe_receiver == null)
|
|
3596
|
+
null;
|
|
3597
|
+
else {
|
|
3598
|
+
tmp0_safe_receiver.deleteFromDocument();
|
|
3599
|
+
}
|
|
3600
|
+
var tmp1_safe_receiver = $this.getSelection();
|
|
3601
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.getRangeAt(0);
|
|
3602
|
+
var tmp;
|
|
3603
|
+
if (tmp2_elvis_lhs == null) {
|
|
3604
|
+
return Unit_instance;
|
|
3605
|
+
} else {
|
|
3606
|
+
tmp = tmp2_elvis_lhs;
|
|
3607
|
+
}
|
|
3608
|
+
var range = tmp;
|
|
3609
|
+
insertFragmentAtSelection($this, range, range.createContextualFragment($this.parser(markdown)));
|
|
3610
|
+
}
|
|
3611
|
+
function insertFragmentAtSelection($this, range, pastedNode) {
|
|
3612
|
+
var firstChild = pastedNode.firstChild;
|
|
3613
|
+
var tmp;
|
|
3614
|
+
var tmp_0;
|
|
3615
|
+
if (pastedNode.childNodes.length === 1) {
|
|
3616
|
+
tmp_0 = firstChild instanceof MarkdownParagraph;
|
|
3617
|
+
} else {
|
|
3618
|
+
tmp_0 = false;
|
|
3619
|
+
}
|
|
3620
|
+
if (tmp_0) {
|
|
3621
|
+
var tmp_1 = $this.getCurrentLeafBlock();
|
|
3622
|
+
tmp = tmp_1 instanceof MarkdownParagraph;
|
|
3623
|
+
} else {
|
|
3624
|
+
tmp = false;
|
|
3625
|
+
}
|
|
3626
|
+
if (tmp) {
|
|
3627
|
+
var inlineContent = document.createDocumentFragment();
|
|
3628
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3629
|
+
var _iterator__ex2g4s = toList(asList(firstChild.childNodes)).r();
|
|
3630
|
+
while (_iterator__ex2g4s.s()) {
|
|
3631
|
+
var element = _iterator__ex2g4s.t();
|
|
3632
|
+
inlineContent.appendChild(element);
|
|
3633
|
+
}
|
|
3634
|
+
range.insertNode(inlineContent);
|
|
3635
|
+
} else {
|
|
3365
3636
|
var tmp_2;
|
|
3637
|
+
var tmp_3;
|
|
3638
|
+
var tmp_4;
|
|
3366
3639
|
if (pastedNode.childNodes.length === 1) {
|
|
3367
|
-
|
|
3640
|
+
tmp_4 = firstChild instanceof MarkdownComponent;
|
|
3368
3641
|
} else {
|
|
3369
|
-
|
|
3642
|
+
tmp_4 = false;
|
|
3370
3643
|
}
|
|
3371
|
-
if (
|
|
3372
|
-
|
|
3644
|
+
if (tmp_4) {
|
|
3645
|
+
tmp_3 = firstChild.mustBeDirectChildOfDocument;
|
|
3373
3646
|
} else {
|
|
3374
|
-
|
|
3647
|
+
tmp_3 = false;
|
|
3375
3648
|
}
|
|
3376
|
-
if (
|
|
3377
|
-
var
|
|
3378
|
-
|
|
3649
|
+
if (tmp_3) {
|
|
3650
|
+
var tmp5_safe_receiver = $this.getSelection();
|
|
3651
|
+
tmp_2 = !equals(tmp5_safe_receiver == null ? null : tmp5_safe_receiver.anchorNode, $this);
|
|
3379
3652
|
} else {
|
|
3380
|
-
|
|
3653
|
+
tmp_2 = false;
|
|
3381
3654
|
}
|
|
3382
|
-
if (
|
|
3383
|
-
var
|
|
3384
|
-
var documentChild =
|
|
3655
|
+
if (tmp_2) {
|
|
3656
|
+
var tmp0_safe_receiver = $this.getSelection();
|
|
3657
|
+
var documentChild = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.anchorNode;
|
|
3385
3658
|
while (!(documentChild == null) && !equals(documentChild.parentElement, $this)) {
|
|
3386
3659
|
documentChild = documentChild.parentElement;
|
|
3387
3660
|
}
|
|
3388
3661
|
if (documentChild instanceof Element) {
|
|
3389
|
-
var
|
|
3390
|
-
var offset =
|
|
3391
|
-
var
|
|
3392
|
-
var
|
|
3393
|
-
var
|
|
3394
|
-
var length =
|
|
3662
|
+
var tmp1_safe_receiver = $this.getSelection();
|
|
3663
|
+
var offset = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.anchorOffset;
|
|
3664
|
+
var tmp2_safe_receiver = $this.getSelection();
|
|
3665
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.anchorNode;
|
|
3666
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.textContent;
|
|
3667
|
+
var length = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.length;
|
|
3395
3668
|
if (!(offset == null) && !(length == null) && offset > (length / 2 | 0)) {
|
|
3396
3669
|
documentChild.after(pastedNode);
|
|
3397
3670
|
} else {
|
|
@@ -3403,28 +3676,125 @@ function onPaste($this, event) {
|
|
|
3403
3676
|
} else {
|
|
3404
3677
|
range.insertNode(pastedNode);
|
|
3405
3678
|
}
|
|
3406
|
-
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
function insertPlainTextAtSelection($this, text) {
|
|
3682
|
+
var tmp0_safe_receiver = $this.getSelection();
|
|
3683
|
+
if (tmp0_safe_receiver == null)
|
|
3684
|
+
null;
|
|
3685
|
+
else {
|
|
3686
|
+
tmp0_safe_receiver.deleteFromDocument();
|
|
3687
|
+
}
|
|
3688
|
+
var tmp1_safe_receiver = $this.getSelection();
|
|
3689
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.getRangeAt(0);
|
|
3690
|
+
var tmp;
|
|
3691
|
+
if (tmp2_elvis_lhs == null) {
|
|
3692
|
+
return Unit_instance;
|
|
3693
|
+
} else {
|
|
3694
|
+
tmp = tmp2_elvis_lhs;
|
|
3695
|
+
}
|
|
3696
|
+
var range = tmp;
|
|
3697
|
+
var fragment = document.createDocumentFragment();
|
|
3698
|
+
var lastNode = null;
|
|
3699
|
+
// Inline function 'kotlin.collections.forEachIndexed' call
|
|
3700
|
+
var index = 0;
|
|
3701
|
+
var _iterator__ex2g4s = split(text, ['\n']).r();
|
|
3702
|
+
while (_iterator__ex2g4s.s()) {
|
|
3703
|
+
var item = _iterator__ex2g4s.t();
|
|
3704
|
+
var _unary__edvuaz = index;
|
|
3705
|
+
index = _unary__edvuaz + 1 | 0;
|
|
3706
|
+
if (checkIndexOverflow(_unary__edvuaz) > 0) {
|
|
3707
|
+
fragment.appendChild(document.createElement('br'));
|
|
3708
|
+
}
|
|
3709
|
+
var textNode = document.createTextNode(item);
|
|
3710
|
+
fragment.appendChild(textNode);
|
|
3711
|
+
lastNode = textNode;
|
|
3712
|
+
}
|
|
3713
|
+
range.insertNode(fragment);
|
|
3714
|
+
var tmp3_safe_receiver = lastNode;
|
|
3715
|
+
if (tmp3_safe_receiver == null)
|
|
3716
|
+
null;
|
|
3717
|
+
else {
|
|
3718
|
+
// Inline function 'kotlin.let' call
|
|
3719
|
+
var newRange = document.createRange();
|
|
3720
|
+
var tmp0_safe_receiver_0 = tmp3_safe_receiver.textContent;
|
|
3721
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.length;
|
|
3722
|
+
newRange.setStart(tmp3_safe_receiver, tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs);
|
|
3723
|
+
newRange.collapse(true);
|
|
3724
|
+
var tmp2_safe_receiver = $this.getSelection();
|
|
3725
|
+
if (tmp2_safe_receiver == null)
|
|
3726
|
+
null;
|
|
3727
|
+
else {
|
|
3728
|
+
tmp2_safe_receiver.removeAllRanges();
|
|
3729
|
+
}
|
|
3730
|
+
var tmp3_safe_receiver_0 = $this.getSelection();
|
|
3731
|
+
var tmp_0;
|
|
3732
|
+
if (tmp3_safe_receiver_0 == null) {
|
|
3733
|
+
tmp_0 = null;
|
|
3734
|
+
} else {
|
|
3735
|
+
tmp3_safe_receiver_0.addRange(newRange);
|
|
3736
|
+
tmp_0 = Unit_instance;
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
function onCopy($this, event) {
|
|
3741
|
+
var tmp0_elvis_lhs = $this.getSelection();
|
|
3742
|
+
var tmp;
|
|
3743
|
+
if (tmp0_elvis_lhs == null) {
|
|
3744
|
+
return Unit_instance;
|
|
3745
|
+
} else {
|
|
3746
|
+
tmp = tmp0_elvis_lhs;
|
|
3747
|
+
}
|
|
3748
|
+
var selection = tmp;
|
|
3749
|
+
if (selection.isCollapsed || selection.rangeCount === 0)
|
|
3750
|
+
return Unit_instance;
|
|
3751
|
+
var fragment = selection.getRangeAt(0).cloneContents();
|
|
3752
|
+
var tmp1_safe_receiver = event.clipboardData;
|
|
3753
|
+
if (tmp1_safe_receiver == null)
|
|
3754
|
+
null;
|
|
3755
|
+
else {
|
|
3756
|
+
var tmp2_elvis_lhs = fragment.textContent;
|
|
3757
|
+
tmp1_safe_receiver.setData('text/plain', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
|
|
3758
|
+
}
|
|
3759
|
+
var tmp3_safe_receiver = event.clipboardData;
|
|
3760
|
+
if (tmp3_safe_receiver == null)
|
|
3761
|
+
null;
|
|
3762
|
+
else {
|
|
3763
|
+
tmp3_safe_receiver.setData('text/markdown', getMarkdownWithTextForElement(fragment));
|
|
3764
|
+
}
|
|
3765
|
+
event.preventDefault();
|
|
3766
|
+
}
|
|
3767
|
+
function onCut($this, event) {
|
|
3768
|
+
onCopy($this, event);
|
|
3769
|
+
if (event.defaultPrevented) {
|
|
3770
|
+
var tmp0_safe_receiver = $this.getSelection();
|
|
3771
|
+
if (tmp0_safe_receiver == null)
|
|
3772
|
+
null;
|
|
3773
|
+
else {
|
|
3774
|
+
tmp0_safe_receiver.deleteFromDocument();
|
|
3775
|
+
}
|
|
3776
|
+
$this.normalizeContent();
|
|
3407
3777
|
$this.onChange();
|
|
3408
3778
|
}
|
|
3409
3779
|
}
|
|
3410
3780
|
function onMouseSelection($this) {
|
|
3411
|
-
if ($this.
|
|
3781
|
+
if ($this.vl_1 && $this.getAttribute('contenteditable') === 'true') {
|
|
3412
3782
|
$this.setAttribute('contenteditable', 'false');
|
|
3413
3783
|
}
|
|
3414
3784
|
}
|
|
3415
3785
|
function onEndMouseSelection($this) {
|
|
3416
|
-
if ($this.
|
|
3786
|
+
if ($this.vl_1 && $this.getAttribute('contenteditable') === 'false') {
|
|
3417
3787
|
$this.setAttribute('contenteditable', $this.getAttribute('readonly') === 'true' ? 'false' : 'true');
|
|
3418
3788
|
$this.focus();
|
|
3419
3789
|
}
|
|
3420
3790
|
}
|
|
3421
3791
|
function mousedown($this, event) {
|
|
3422
3792
|
if ((event.buttons % 2 | 0) === 1) {
|
|
3423
|
-
$this.
|
|
3793
|
+
$this.ul_1 = true;
|
|
3424
3794
|
}
|
|
3425
3795
|
}
|
|
3426
3796
|
function mouseup($this) {
|
|
3427
|
-
$this.
|
|
3797
|
+
$this.ul_1 = false;
|
|
3428
3798
|
onEndMouseSelection($this);
|
|
3429
3799
|
}
|
|
3430
3800
|
function selectstart($this) {
|
|
@@ -3453,7 +3823,7 @@ function selectionchange($this) {
|
|
|
3453
3823
|
tmp_0 = false;
|
|
3454
3824
|
}
|
|
3455
3825
|
if (tmp_0) {
|
|
3456
|
-
if ($this.
|
|
3826
|
+
if ($this.ul_1) {
|
|
3457
3827
|
onMouseSelection($this);
|
|
3458
3828
|
}
|
|
3459
3829
|
enableEditable($this);
|
|
@@ -3461,9 +3831,9 @@ function selectionchange($this) {
|
|
|
3461
3831
|
disableEditable($this);
|
|
3462
3832
|
}
|
|
3463
3833
|
$this.currentSelection = selection;
|
|
3464
|
-
$this.
|
|
3465
|
-
$this.
|
|
3466
|
-
$this.
|
|
3834
|
+
$this.rl_1 = anchorNode;
|
|
3835
|
+
$this.sl_1 = selection.anchorOffset;
|
|
3836
|
+
$this.tl_1 = new StashedSelection(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
|
3467
3837
|
affectToolbar($this);
|
|
3468
3838
|
} else {
|
|
3469
3839
|
disableEditable($this);
|
|
@@ -3591,7 +3961,7 @@ function selectionNodeAndOffsetToContentOffset($this, node, offset) {
|
|
|
3591
3961
|
var tmp0_safe_receiver = node.textContent;
|
|
3592
3962
|
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : take(tmp0_safe_receiver, offset);
|
|
3593
3963
|
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : split(tmp1_safe_receiver, [get_ZERO_WIDTH_SPACE()]);
|
|
3594
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
3964
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.u();
|
|
3595
3965
|
var numberOfSpecialChars = (tmp3_elvis_lhs == null ? 1 : tmp3_elvis_lhs) - 1 | 0;
|
|
3596
3966
|
tmp_2 = (parentOffset_0 + offset | 0) - numberOfSpecialChars | 0;
|
|
3597
3967
|
}
|
|
@@ -3603,11 +3973,11 @@ function selectionNodeAndOffsetToContentOffset($this, node, offset) {
|
|
|
3603
3973
|
}
|
|
3604
3974
|
function setSelectionToContentRange($this, range) {
|
|
3605
3975
|
var _destruct__k2r9zo = getNodeAndOffsetFromContentOffsetAnchor($this, range.first);
|
|
3606
|
-
var anchorNode = _destruct__k2r9zo.
|
|
3607
|
-
var anchorOffset = _destruct__k2r9zo.
|
|
3976
|
+
var anchorNode = _destruct__k2r9zo.ob();
|
|
3977
|
+
var anchorOffset = _destruct__k2r9zo.pb();
|
|
3608
3978
|
var _destruct__k2r9zo_0 = getNodeAndOffsetFromContentOffset($this, range.second);
|
|
3609
|
-
var focusNode = _destruct__k2r9zo_0.
|
|
3610
|
-
var focusOffset = _destruct__k2r9zo_0.
|
|
3979
|
+
var focusNode = _destruct__k2r9zo_0.ob();
|
|
3980
|
+
var focusOffset = _destruct__k2r9zo_0.pb();
|
|
3611
3981
|
var domRange = document.createRange();
|
|
3612
3982
|
domRange.setStart(anchorNode, anchorOffset);
|
|
3613
3983
|
domRange.setEnd(focusNode, focusOffset);
|
|
@@ -3626,12 +3996,12 @@ function setSelectionToContentRange($this, range) {
|
|
|
3626
3996
|
}
|
|
3627
3997
|
function getNodeAndOffsetFromContentOffsetAnchor($this, contentOffset) {
|
|
3628
3998
|
var elements = asList($this.children);
|
|
3629
|
-
if (elements.
|
|
3999
|
+
if (elements.d1())
|
|
3630
4000
|
return to($this, contentOffset);
|
|
3631
|
-
var resultNode = elements.
|
|
3632
|
-
var _iterator__ex2g4s = elements.
|
|
3633
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
3634
|
-
var child = _iterator__ex2g4s.
|
|
4001
|
+
var resultNode = elements.v(0);
|
|
4002
|
+
var _iterator__ex2g4s = elements.r();
|
|
4003
|
+
$l$loop_0: while (_iterator__ex2g4s.s()) {
|
|
4004
|
+
var child = _iterator__ex2g4s.t();
|
|
3635
4005
|
var lengthUntilChild = $this.contentLengthUntil(child);
|
|
3636
4006
|
if (contentOffset === lengthUntilChild) {
|
|
3637
4007
|
resultNode = child;
|
|
@@ -3651,13 +4021,13 @@ function getNodeAndOffsetFromContentOffsetAnchor($this, contentOffset) {
|
|
|
3651
4021
|
}
|
|
3652
4022
|
function getNodeAndOffsetFromContentOffset($this, contentOffset) {
|
|
3653
4023
|
var elements = asList($this.children);
|
|
3654
|
-
if (elements.
|
|
4024
|
+
if (elements.d1())
|
|
3655
4025
|
return to($this, contentOffset);
|
|
3656
|
-
var resultNode = elements.
|
|
4026
|
+
var resultNode = elements.v(0);
|
|
3657
4027
|
var previousNodeWasEol = false;
|
|
3658
|
-
var _iterator__ex2g4s = elements.
|
|
3659
|
-
$l$loop_0: while (_iterator__ex2g4s.
|
|
3660
|
-
var child = _iterator__ex2g4s.
|
|
4028
|
+
var _iterator__ex2g4s = elements.r();
|
|
4029
|
+
$l$loop_0: while (_iterator__ex2g4s.s()) {
|
|
4030
|
+
var child = _iterator__ex2g4s.t();
|
|
3661
4031
|
var lengthUntilChild = $this.contentLengthUntil(child);
|
|
3662
4032
|
if (contentOffset === lengthUntilChild) {
|
|
3663
4033
|
if (previousNodeWasEol)
|
|
@@ -3693,9 +4063,9 @@ function domModificationOperation($this, operation) {
|
|
|
3693
4063
|
affectToolbar($this);
|
|
3694
4064
|
}
|
|
3695
4065
|
function normalizeDOM($this) {
|
|
3696
|
-
var _iterator__ex2g4s = asList($this.childNodes).
|
|
3697
|
-
while (_iterator__ex2g4s.
|
|
3698
|
-
var child = _iterator__ex2g4s.
|
|
4066
|
+
var _iterator__ex2g4s = asList($this.childNodes).r();
|
|
4067
|
+
while (_iterator__ex2g4s.s()) {
|
|
4068
|
+
var child = _iterator__ex2g4s.t();
|
|
3699
4069
|
if (child instanceof MarkdownComponent) {
|
|
3700
4070
|
if (child.normalizeContent()) {
|
|
3701
4071
|
normalizeDOM($this);
|
|
@@ -3704,9 +4074,9 @@ function normalizeDOM($this) {
|
|
|
3704
4074
|
} else {
|
|
3705
4075
|
if (child instanceof HTMLDivElement) {
|
|
3706
4076
|
// Inline function 'kotlin.collections.forEach' call
|
|
3707
|
-
var _iterator__ex2g4s_0 = toList(asList(child.childNodes)).
|
|
3708
|
-
while (_iterator__ex2g4s_0.
|
|
3709
|
-
var element = _iterator__ex2g4s_0.
|
|
4077
|
+
var _iterator__ex2g4s_0 = toList(asList(child.childNodes)).r();
|
|
4078
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
4079
|
+
var element = _iterator__ex2g4s_0.t();
|
|
3710
4080
|
$this.append(element);
|
|
3711
4081
|
}
|
|
3712
4082
|
child.remove();
|
|
@@ -3720,14 +4090,14 @@ function normalizeDOM($this) {
|
|
|
3720
4090
|
null;
|
|
3721
4091
|
else {
|
|
3722
4092
|
// Inline function 'kotlin.let' call
|
|
3723
|
-
img.
|
|
4093
|
+
img.cm(tmp0_safe_receiver);
|
|
3724
4094
|
}
|
|
3725
4095
|
var tmp1_safe_receiver = child.getAttribute('title');
|
|
3726
4096
|
if (tmp1_safe_receiver == null)
|
|
3727
4097
|
null;
|
|
3728
4098
|
else {
|
|
3729
4099
|
// Inline function 'kotlin.let' call
|
|
3730
|
-
img.
|
|
4100
|
+
img.cm(tmp1_safe_receiver);
|
|
3731
4101
|
}
|
|
3732
4102
|
var tmp2_safe_receiver = child.getAttribute('alt');
|
|
3733
4103
|
if (tmp2_safe_receiver == null)
|
|
@@ -3823,7 +4193,7 @@ function firstUpdated($this) {
|
|
|
3823
4193
|
var tmp = document.createElement('markdown-toc');
|
|
3824
4194
|
var toc = tmp instanceof MarkdownToc ? tmp : THROW_CCE();
|
|
3825
4195
|
toc.classList.add('floating');
|
|
3826
|
-
toc.
|
|
4196
|
+
toc.gm($this);
|
|
3827
4197
|
var tmp0_safe_receiver = $this.shadowRoot;
|
|
3828
4198
|
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.querySelector('.toc');
|
|
3829
4199
|
if (tmp1_safe_receiver == null)
|
|
@@ -3846,6 +4216,64 @@ function renderMarkdown($this, newMarkdown) {
|
|
|
3846
4216
|
$this.innerHTML = $this.parser(newMarkdown);
|
|
3847
4217
|
$this.normalizeContent();
|
|
3848
4218
|
}
|
|
4219
|
+
function deletableComponentAdjacentToCaret($this, before) {
|
|
4220
|
+
var selection = $this.currentSelection;
|
|
4221
|
+
if (!((selection == null ? null : selection.isCollapsed) === true))
|
|
4222
|
+
return null;
|
|
4223
|
+
var tmp1_elvis_lhs = selection.anchorNode;
|
|
4224
|
+
var tmp;
|
|
4225
|
+
if (tmp1_elvis_lhs == null) {
|
|
4226
|
+
return null;
|
|
4227
|
+
} else {
|
|
4228
|
+
tmp = tmp1_elvis_lhs;
|
|
4229
|
+
}
|
|
4230
|
+
var anchor = tmp;
|
|
4231
|
+
var offset = selection.anchorOffset;
|
|
4232
|
+
var tmp_0;
|
|
4233
|
+
if (anchor instanceof Text) {
|
|
4234
|
+
var tmp_1;
|
|
4235
|
+
if (before) {
|
|
4236
|
+
// Inline function 'kotlin.takeIf' call
|
|
4237
|
+
var tmp_2;
|
|
4238
|
+
if (offset === 0) {
|
|
4239
|
+
tmp_2 = anchor;
|
|
4240
|
+
} else {
|
|
4241
|
+
tmp_2 = null;
|
|
4242
|
+
}
|
|
4243
|
+
var tmp2_safe_receiver = tmp_2;
|
|
4244
|
+
tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.previousSibling;
|
|
4245
|
+
} else {
|
|
4246
|
+
// Inline function 'kotlin.takeIf' call
|
|
4247
|
+
var tmp_3;
|
|
4248
|
+
if (offset === anchor.length) {
|
|
4249
|
+
tmp_3 = anchor;
|
|
4250
|
+
} else {
|
|
4251
|
+
tmp_3 = null;
|
|
4252
|
+
}
|
|
4253
|
+
var tmp3_safe_receiver = tmp_3;
|
|
4254
|
+
tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.nextSibling;
|
|
4255
|
+
}
|
|
4256
|
+
tmp_0 = tmp_1;
|
|
4257
|
+
} else {
|
|
4258
|
+
tmp_0 = getOrNull(asList(anchor.childNodes), before ? offset - 1 | 0 : offset);
|
|
4259
|
+
}
|
|
4260
|
+
var candidate = tmp_0;
|
|
4261
|
+
var tmp4_safe_receiver = candidate instanceof MarkdownComponent ? candidate : null;
|
|
4262
|
+
var tmp_4;
|
|
4263
|
+
if (tmp4_safe_receiver == null) {
|
|
4264
|
+
tmp_4 = null;
|
|
4265
|
+
} else {
|
|
4266
|
+
// Inline function 'kotlin.takeIf' call
|
|
4267
|
+
var tmp_5;
|
|
4268
|
+
if (tmp4_safe_receiver.isDeletableAsAWhole()) {
|
|
4269
|
+
tmp_5 = tmp4_safe_receiver;
|
|
4270
|
+
} else {
|
|
4271
|
+
tmp_5 = null;
|
|
4272
|
+
}
|
|
4273
|
+
tmp_4 = tmp_5;
|
|
4274
|
+
}
|
|
4275
|
+
return tmp_4;
|
|
4276
|
+
}
|
|
3849
4277
|
function handleBackspaceKeyDown($this, event) {
|
|
3850
4278
|
var tmp0_safe_receiver = $this.currentSelection;
|
|
3851
4279
|
var anchorOffset = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.anchorOffset;
|
|
@@ -3857,6 +4285,7 @@ function handleBackspaceKeyDown($this, event) {
|
|
|
3857
4285
|
var tmp4_safe_receiver = $this.currentSelection;
|
|
3858
4286
|
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.anchorNode;
|
|
3859
4287
|
var sibling = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.previousSibling;
|
|
4288
|
+
var deletableBefore = deletableComponentAdjacentToCaret($this, true);
|
|
3860
4289
|
var tmp;
|
|
3861
4290
|
var tmp_0;
|
|
3862
4291
|
if (!(parent == null) && anchorOffset === 0 && focusOffset === 0) {
|
|
@@ -3873,26 +4302,14 @@ function handleBackspaceKeyDown($this, event) {
|
|
|
3873
4302
|
event.preventDefault();
|
|
3874
4303
|
var grandparent = parent.parentElement;
|
|
3875
4304
|
if (!(grandparent == null) ? isInterface(grandparent, MarkdownElementEscapeByBackspace) : false) {
|
|
3876
|
-
grandparent.
|
|
4305
|
+
grandparent.hm(parent);
|
|
3877
4306
|
} else {
|
|
3878
4307
|
parent.mergeWithPrevious($this.currentSelection);
|
|
3879
4308
|
}
|
|
3880
4309
|
} else {
|
|
3881
|
-
|
|
3882
|
-
var tmp_2;
|
|
3883
|
-
if (!(sibling == null) && anchorOffset === 0 && focusOffset === 0) {
|
|
3884
|
-
tmp_2 = sibling instanceof MarkdownComponent;
|
|
3885
|
-
} else {
|
|
3886
|
-
tmp_2 = false;
|
|
3887
|
-
}
|
|
3888
|
-
if (tmp_2) {
|
|
3889
|
-
tmp_1 = sibling.isDeletableAsAWhole();
|
|
3890
|
-
} else {
|
|
3891
|
-
tmp_1 = false;
|
|
3892
|
-
}
|
|
3893
|
-
if (tmp_1) {
|
|
4310
|
+
if (!(deletableBefore == null)) {
|
|
3894
4311
|
event.preventDefault();
|
|
3895
|
-
|
|
4312
|
+
deletableBefore.remove();
|
|
3896
4313
|
}
|
|
3897
4314
|
}
|
|
3898
4315
|
}
|
|
@@ -3904,6 +4321,7 @@ function handleDeleteKeyDown($this, event) {
|
|
|
3904
4321
|
var tmp2_safe_receiver = $this.currentSelection;
|
|
3905
4322
|
var focusOffset = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.focusOffset;
|
|
3906
4323
|
var parent = anchor == null ? null : anchor.parentElement;
|
|
4324
|
+
var deletableAfter = deletableComponentAdjacentToCaret($this, false);
|
|
3907
4325
|
var tmp;
|
|
3908
4326
|
var tmp_0;
|
|
3909
4327
|
var tmp_1;
|
|
@@ -3937,6 +4355,11 @@ function handleDeleteKeyDown($this, event) {
|
|
|
3937
4355
|
if (tmp) {
|
|
3938
4356
|
event.preventDefault();
|
|
3939
4357
|
parent.mergeNextIn();
|
|
4358
|
+
} else {
|
|
4359
|
+
if (!(deletableAfter == null)) {
|
|
4360
|
+
event.preventDefault();
|
|
4361
|
+
deletableAfter.remove();
|
|
4362
|
+
}
|
|
3940
4363
|
}
|
|
3941
4364
|
}
|
|
3942
4365
|
function handleTabKeyDown($this, shift) {
|
|
@@ -3959,9 +4382,9 @@ function handleTabKeyDown($this, shift) {
|
|
|
3959
4382
|
}
|
|
3960
4383
|
if (!(parent == null) ? isInterface(parent, MarkdownElementWithLevel) : false) {
|
|
3961
4384
|
if (shift) {
|
|
3962
|
-
parent.
|
|
4385
|
+
parent.jm(child);
|
|
3963
4386
|
} else {
|
|
3964
|
-
parent.
|
|
4387
|
+
parent.im(child);
|
|
3965
4388
|
}
|
|
3966
4389
|
$this.onChange();
|
|
3967
4390
|
}
|
|
@@ -4173,13 +4596,25 @@ function BaseMarkdownDocument$connectedCallback$lambda_4(this$0) {
|
|
|
4173
4596
|
return Unit_instance;
|
|
4174
4597
|
};
|
|
4175
4598
|
}
|
|
4599
|
+
function BaseMarkdownDocument$connectedCallback$lambda_5(this$0) {
|
|
4600
|
+
return (event) => {
|
|
4601
|
+
onCopy(this$0, event instanceof ClipboardEvent ? event : THROW_CCE());
|
|
4602
|
+
return Unit_instance;
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4605
|
+
function BaseMarkdownDocument$connectedCallback$lambda_6(this$0) {
|
|
4606
|
+
return (event) => {
|
|
4607
|
+
onCut(this$0, event instanceof ClipboardEvent ? event : THROW_CCE());
|
|
4608
|
+
return Unit_instance;
|
|
4609
|
+
};
|
|
4610
|
+
}
|
|
4176
4611
|
function BaseMarkdownDocument$onDrop$lambda($reader, this$0, $event) {
|
|
4177
4612
|
return (it) => {
|
|
4178
4613
|
var tmp = $reader.result;
|
|
4179
4614
|
var dataUri = (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
|
|
4180
4615
|
var tmp_0 = document.createElement('markdown-image');
|
|
4181
4616
|
var img = tmp_0 instanceof MarkdownImage ? tmp_0 : THROW_CCE();
|
|
4182
|
-
img.
|
|
4617
|
+
img.cm(dataUri);
|
|
4183
4618
|
var pos = this$0.selectionRoot.caretPositionFromPoint($event.clientX, $event.clientY);
|
|
4184
4619
|
var tmp_1;
|
|
4185
4620
|
if (!(pos == null)) {
|
|
@@ -4450,7 +4885,7 @@ function getAllTextNodesForRange(range) {
|
|
|
4450
4885
|
if (container instanceof Text)
|
|
4451
4886
|
return listOf(container);
|
|
4452
4887
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
4453
|
-
var result = ArrayList.
|
|
4888
|
+
var result = ArrayList.z();
|
|
4454
4889
|
var walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT, null);
|
|
4455
4890
|
var node = walker.nextNode();
|
|
4456
4891
|
while (!(node == null)) {
|
|
@@ -4467,7 +4902,7 @@ function getAllTextNodesForRange(range) {
|
|
|
4467
4902
|
tmp_3 = false;
|
|
4468
4903
|
}
|
|
4469
4904
|
if (tmp_3) {
|
|
4470
|
-
result.
|
|
4905
|
+
result.n(node);
|
|
4471
4906
|
}
|
|
4472
4907
|
node = walker.nextNode();
|
|
4473
4908
|
}
|
|
@@ -4496,9 +4931,9 @@ function surroundRangeIfNotYet(tagName, range) {
|
|
|
4496
4931
|
return Unit_instance;
|
|
4497
4932
|
}
|
|
4498
4933
|
// Inline function 'kotlin.collections.forEach' call
|
|
4499
|
-
var _iterator__ex2g4s = getAllTextNodesForRange(range).
|
|
4500
|
-
while (_iterator__ex2g4s.
|
|
4501
|
-
var element = _iterator__ex2g4s.
|
|
4934
|
+
var _iterator__ex2g4s = getAllTextNodesForRange(range).r();
|
|
4935
|
+
while (_iterator__ex2g4s.s()) {
|
|
4936
|
+
var element = _iterator__ex2g4s.t();
|
|
4502
4937
|
var tmp0_safe_receiver = element.parentElement;
|
|
4503
4938
|
if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.closest(tagName)) == null) {
|
|
4504
4939
|
var replaceLevel = element;
|
|
@@ -4521,9 +4956,9 @@ function dispatchToChildren(element) {
|
|
|
4521
4956
|
var parent = element.parentElement;
|
|
4522
4957
|
element.remove();
|
|
4523
4958
|
// Inline function 'kotlin.collections.forEach' call
|
|
4524
|
-
var _iterator__ex2g4s = toList(asList(element.childNodes)).
|
|
4525
|
-
while (_iterator__ex2g4s.
|
|
4526
|
-
var element_0 = _iterator__ex2g4s.
|
|
4959
|
+
var _iterator__ex2g4s = toList(asList(element.childNodes)).r();
|
|
4960
|
+
while (_iterator__ex2g4s.s()) {
|
|
4961
|
+
var element_0 = _iterator__ex2g4s.t();
|
|
4527
4962
|
var tmp = element.cloneNode(false);
|
|
4528
4963
|
var clone = tmp instanceof Element ? tmp : THROW_CCE();
|
|
4529
4964
|
clone.appendChild(element_0);
|
|
@@ -4547,9 +4982,9 @@ function unsurroundRange(tagName, range) {
|
|
|
4547
4982
|
do {
|
|
4548
4983
|
surrounded = false;
|
|
4549
4984
|
// Inline function 'kotlin.collections.forEach' call
|
|
4550
|
-
var _iterator__ex2g4s = allTexts.
|
|
4551
|
-
while (_iterator__ex2g4s.
|
|
4552
|
-
var element = _iterator__ex2g4s.
|
|
4985
|
+
var _iterator__ex2g4s = allTexts.r();
|
|
4986
|
+
while (_iterator__ex2g4s.s()) {
|
|
4987
|
+
var element = _iterator__ex2g4s.t();
|
|
4553
4988
|
var tmp0_safe_receiver = element.parentElement;
|
|
4554
4989
|
var enclosing = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.closest(tagName);
|
|
4555
4990
|
if (!(enclosing == null)) {
|
|
@@ -4575,12 +5010,12 @@ function unsurroundRange(tagName, range) {
|
|
|
4575
5010
|
} else {
|
|
4576
5011
|
var tmp4_safe_receiver = element.parentElement;
|
|
4577
5012
|
enclosing = ensureNotNull(tmp4_safe_receiver == null ? null : tmp4_safe_receiver.closest(tagName));
|
|
4578
|
-
var child = asList(enclosing.childNodes).
|
|
5013
|
+
var child = asList(enclosing.childNodes).v(0);
|
|
4579
5014
|
enclosing.replaceWith(child);
|
|
4580
5015
|
// Inline function 'kotlin.collections.forEach' call
|
|
4581
|
-
var _iterator__ex2g4s_0 = toList(asList(child.childNodes)).
|
|
4582
|
-
while (_iterator__ex2g4s_0.
|
|
4583
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
5016
|
+
var _iterator__ex2g4s_0 = toList(asList(child.childNodes)).r();
|
|
5017
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
5018
|
+
var element_0 = _iterator__ex2g4s_0.t();
|
|
4584
5019
|
child.removeChild(element_0);
|
|
4585
5020
|
enclosing.appendChild(element_0);
|
|
4586
5021
|
}
|
|
@@ -4625,7 +5060,7 @@ function paragraphOption($this, parent, onClick) {
|
|
|
4625
5060
|
item.addEventListener('mousedown', MarkdownToolbar$paragraphOption$lambda_0(onClick));
|
|
4626
5061
|
}
|
|
4627
5062
|
function onBoldClick($this) {
|
|
4628
|
-
if ($this.
|
|
5063
|
+
if ($this.cn_1.fl()) {
|
|
4629
5064
|
var tmp0_safe_receiver = $this.markdownDocument;
|
|
4630
5065
|
if (tmp0_safe_receiver == null)
|
|
4631
5066
|
null;
|
|
@@ -4642,7 +5077,7 @@ function onBoldClick($this) {
|
|
|
4642
5077
|
}
|
|
4643
5078
|
}
|
|
4644
5079
|
function onItalicClick($this) {
|
|
4645
|
-
if ($this.
|
|
5080
|
+
if ($this.dn_1.fl()) {
|
|
4646
5081
|
var tmp0_safe_receiver = $this.markdownDocument;
|
|
4647
5082
|
if (tmp0_safe_receiver == null)
|
|
4648
5083
|
null;
|
|
@@ -4659,7 +5094,7 @@ function onItalicClick($this) {
|
|
|
4659
5094
|
}
|
|
4660
5095
|
}
|
|
4661
5096
|
function onStrikeClick($this) {
|
|
4662
|
-
if ($this.
|
|
5097
|
+
if ($this.en_1.fl()) {
|
|
4663
5098
|
var tmp0_safe_receiver = $this.markdownDocument;
|
|
4664
5099
|
if (tmp0_safe_receiver == null)
|
|
4665
5100
|
null;
|
|
@@ -4982,11 +5417,11 @@ function ToolbarButton$lambda($this$element) {
|
|
|
4982
5417
|
}
|
|
4983
5418
|
function showDropdown($this, event) {
|
|
4984
5419
|
event.stopPropagation();
|
|
4985
|
-
var tmp = $this.
|
|
5420
|
+
var tmp = $this.mn_1;
|
|
4986
5421
|
(tmp instanceof HTMLElement ? tmp : THROW_CCE()).style.display = 'block';
|
|
4987
5422
|
}
|
|
4988
5423
|
function hideDropdown($this) {
|
|
4989
|
-
var tmp = $this.
|
|
5424
|
+
var tmp = $this.mn_1;
|
|
4990
5425
|
(tmp instanceof HTMLElement ? tmp : THROW_CCE()).style.display = 'none';
|
|
4991
5426
|
}
|
|
4992
5427
|
function ToolbarDropdown$hideOnOutsideMouseDown$lambda(this$0) {
|
|
@@ -5084,9 +5519,9 @@ function getMarkdownWithTextForElement$lambda(child) {
|
|
|
5084
5519
|
}
|
|
5085
5520
|
function normalizeContent(element) {
|
|
5086
5521
|
// Inline function 'kotlin.collections.forEach' call
|
|
5087
|
-
var _iterator__ex2g4s = asList(element.childNodes).
|
|
5088
|
-
while (_iterator__ex2g4s.
|
|
5089
|
-
var element_0 = _iterator__ex2g4s.
|
|
5522
|
+
var _iterator__ex2g4s = asList(element.childNodes).r();
|
|
5523
|
+
while (_iterator__ex2g4s.s()) {
|
|
5524
|
+
var element_0 = _iterator__ex2g4s.t();
|
|
5090
5525
|
if (element_0 instanceof MarkdownComponent) {
|
|
5091
5526
|
if (element_0.normalizeContent())
|
|
5092
5527
|
return normalizeContent(element);
|
|
@@ -5149,7 +5584,7 @@ function TableCell$getMarkdown$lambda(child) {
|
|
|
5149
5584
|
tmp_0 = null;
|
|
5150
5585
|
} else {
|
|
5151
5586
|
// Inline function 'kotlin.text.replace' call
|
|
5152
|
-
tmp_0 = Regex.
|
|
5587
|
+
tmp_0 = Regex.l8('\\s').p8(tmp0_safe_receiver, '');
|
|
5153
5588
|
}
|
|
5154
5589
|
var tmp1_safe_receiver = tmp_0;
|
|
5155
5590
|
var tmp_1;
|
|
@@ -5168,7 +5603,7 @@ function TableCell$getMarkdown$lambda(child) {
|
|
|
5168
5603
|
tmp_2 = null;
|
|
5169
5604
|
} else {
|
|
5170
5605
|
// Inline function 'kotlin.text.replace' call
|
|
5171
|
-
tmp_2 = Regex.
|
|
5606
|
+
tmp_2 = Regex.k8('^\\s+', RegexOption_MULTILINE_getInstance()).p8(tmp2_safe_receiver, ' ');
|
|
5172
5607
|
}
|
|
5173
5608
|
var tmp3_elvis_lhs = tmp_2;
|
|
5174
5609
|
tmp = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
|
|
@@ -5225,6 +5660,21 @@ function upload($this) {
|
|
|
5225
5660
|
reader.onload = MarkdownImage$upload$lambda($this, reader);
|
|
5226
5661
|
reader.readAsDataURL(file);
|
|
5227
5662
|
}
|
|
5663
|
+
function deleteImage($this) {
|
|
5664
|
+
var parent = $this.parentElement;
|
|
5665
|
+
$this.remove();
|
|
5666
|
+
if (parent == null)
|
|
5667
|
+
null;
|
|
5668
|
+
else {
|
|
5669
|
+
// Inline function 'org.w3c.dom.CustomEventInit' call
|
|
5670
|
+
var o = {};
|
|
5671
|
+
o['detail'] = null;
|
|
5672
|
+
o['bubbles'] = true;
|
|
5673
|
+
o['cancelable'] = false;
|
|
5674
|
+
o['composed'] = false;
|
|
5675
|
+
parent.dispatchEvent(new CustomEvent('input', o));
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5228
5678
|
function MarkdownImage$lambda($this$element) {
|
|
5229
5679
|
$this$element.className = 'upload';
|
|
5230
5680
|
$this$element.setAttribute('type', 'file');
|
|
@@ -5251,6 +5701,19 @@ function MarkdownImage$lambda_3($this$element) {
|
|
|
5251
5701
|
$this$element.setAttribute('style', 'display:none;');
|
|
5252
5702
|
return Unit_instance;
|
|
5253
5703
|
}
|
|
5704
|
+
function MarkdownImage$lambda_4($this$element) {
|
|
5705
|
+
$this$element.className = 'delete';
|
|
5706
|
+
$this$element.setAttribute('part', 'delete');
|
|
5707
|
+
$this$element.textContent = '\u2715';
|
|
5708
|
+
return Unit_instance;
|
|
5709
|
+
}
|
|
5710
|
+
function MarkdownImage$lambda_5(this$0) {
|
|
5711
|
+
return (event) => {
|
|
5712
|
+
event.stopPropagation();
|
|
5713
|
+
deleteImage(this$0);
|
|
5714
|
+
return Unit_instance;
|
|
5715
|
+
};
|
|
5716
|
+
}
|
|
5254
5717
|
function MarkdownImage$upload$lambda(this$0, $reader) {
|
|
5255
5718
|
return (it) => {
|
|
5256
5719
|
var tmp = $reader.result;
|
|
@@ -5259,23 +5722,23 @@ function MarkdownImage$upload$lambda(this$0, $reader) {
|
|
|
5259
5722
|
};
|
|
5260
5723
|
}
|
|
5261
5724
|
function updateLinkTarget($this) {
|
|
5262
|
-
$this.
|
|
5263
|
-
$this.
|
|
5264
|
-
$this.
|
|
5265
|
-
$this.
|
|
5725
|
+
$this.zm_1.href = $this.qo();
|
|
5726
|
+
$this.zm_1.title = $this.title;
|
|
5727
|
+
$this.zm_1.target = startsWith($this.qo(), '#') ? '_self' : '_blank';
|
|
5728
|
+
$this.zm_1.onclick = MarkdownLink$updateLinkTarget$lambda($this);
|
|
5266
5729
|
}
|
|
5267
5730
|
function onDestinationInput($this) {
|
|
5268
|
-
$this.
|
|
5731
|
+
$this.cm($this.an_1.value);
|
|
5269
5732
|
updateLinkTarget($this);
|
|
5270
5733
|
}
|
|
5271
5734
|
function hideDestinationInput($this) {
|
|
5272
5735
|
$this.classList.remove('fresh');
|
|
5273
|
-
$this.
|
|
5736
|
+
$this.an_1.classList.remove('visible');
|
|
5274
5737
|
}
|
|
5275
5738
|
function showDestinationInput($this) {
|
|
5276
|
-
$this.
|
|
5277
|
-
$this.
|
|
5278
|
-
$this.
|
|
5739
|
+
$this.an_1.classList.add('visible');
|
|
5740
|
+
$this.an_1.focus();
|
|
5741
|
+
$this.an_1.setSelectionRange($this.an_1.value.length, $this.an_1.value.length);
|
|
5279
5742
|
}
|
|
5280
5743
|
function onDestinationKey($this, event) {
|
|
5281
5744
|
if (event.key === 'Enter') {
|
|
@@ -5335,7 +5798,7 @@ function MarkdownLink$connectedCallback$lambda(this$0) {
|
|
|
5335
5798
|
function MarkdownLink$updateLinkTarget$lambda(this$0) {
|
|
5336
5799
|
return (event) => {
|
|
5337
5800
|
// Inline function 'org.w3c.dom.CustomEventInit' call
|
|
5338
|
-
var detail = this$0.
|
|
5801
|
+
var detail = this$0.qo();
|
|
5339
5802
|
var o = {};
|
|
5340
5803
|
o['detail'] = detail;
|
|
5341
5804
|
o['bubbles'] = true;
|
|
@@ -5372,7 +5835,7 @@ function MarkdownParagraph$getMarkdown$lambda(child) {
|
|
|
5372
5835
|
tmp_0 = null;
|
|
5373
5836
|
} else {
|
|
5374
5837
|
// Inline function 'kotlin.text.replace' call
|
|
5375
|
-
tmp_0 = Regex.
|
|
5838
|
+
tmp_0 = Regex.k8('^\\s+', RegexOption_MULTILINE_getInstance()).p8(tmp0_safe_receiver, ' ');
|
|
5376
5839
|
}
|
|
5377
5840
|
var tmp1_elvis_lhs = tmp_0;
|
|
5378
5841
|
tmp = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
|
|
@@ -5423,7 +5886,7 @@ function MarkdownTaskListItem$lambda_0($this$element) {
|
|
|
5423
5886
|
}
|
|
5424
5887
|
function MarkdownTaskListItem$lambda_1(this$0) {
|
|
5425
5888
|
return (it) => {
|
|
5426
|
-
this$0.setAttribute('checked', this$0.
|
|
5889
|
+
this$0.setAttribute('checked', this$0.bp_1.checked.toString());
|
|
5427
5890
|
return Unit_instance;
|
|
5428
5891
|
};
|
|
5429
5892
|
}
|
|
@@ -5539,7 +6002,7 @@ function parseMarkdown$lambda($renderer) {
|
|
|
5539
6002
|
function parseMarkdown$lambda_0($renderer) {
|
|
5540
6003
|
return (execArr) => {
|
|
5541
6004
|
var groups = ensureNotNull(execArr);
|
|
5542
|
-
return $renderer.
|
|
6005
|
+
return $renderer.hp_1.custom(ensureNotNull(groups[1]), parseMarkdownWithTsStackRenderer(ensureNotNull(groups[2]), $renderer));
|
|
5543
6006
|
};
|
|
5544
6007
|
}
|
|
5545
6008
|
var properties_initialized_TsStackMarkdownRenderer_kt_6onrsl;
|