@quoreadmin/ui 1.8.10 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +35 -33
- package/dist/index10.js +2 -2
- package/dist/index100.js +34 -0
- package/dist/{index101.js → index102.js} +1 -1
- package/dist/index104.js +140 -2
- package/dist/index105.js +2 -37
- package/dist/index106.js +39 -0
- package/dist/{index107.js → index108.js} +2 -2
- package/dist/index11.js +2 -2
- package/dist/{index109.js → index110.js} +1 -1
- package/dist/{index111.js → index112.js} +3 -3
- package/dist/{index113.js → index114.js} +5 -5
- package/dist/{index115.js → index116.js} +1 -1
- package/dist/{index117.js → index118.js} +5 -5
- package/dist/index12.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/{index131.js → index132.js} +1 -1
- package/dist/{index133.js → index134.js} +2 -2
- package/dist/index14.js +2 -2
- package/dist/{index142.js → index143.js} +4 -4
- package/dist/{index144.js → index145.js} +1 -1
- package/dist/{index146.js → index147.js} +10 -10
- package/dist/index15.js +2 -2
- package/dist/index153.js +562 -0
- package/dist/index157.js +87 -356
- package/dist/index16.js +2 -2
- package/dist/index160.js +389 -0
- package/dist/{index159.js → index162.js} +1 -1
- package/dist/index164.js +205 -111
- package/dist/index167.js +110 -87
- package/dist/index168.js +478 -844
- package/dist/index169.js +5520 -36
- package/dist/index17.js +2 -2
- package/dist/index170.js +90 -279
- package/dist/index171.js +833 -122
- package/dist/index172.js +36 -1197
- package/dist/index173.js +268 -760
- package/dist/index174.js +146 -1304
- package/dist/index175.js +1151 -228
- package/dist/index176.js +754 -88
- package/dist/index177.js +1308 -2
- package/dist/index178.js +259 -1359
- package/dist/index179.js +108 -0
- package/dist/index18.js +2 -2
- package/dist/index180.js +2 -18
- package/dist/index181.js +1372 -14
- package/dist/index183.js +8 -8
- package/dist/index184.js +10 -17
- package/dist/index185.js +18 -759
- package/dist/index186.js +18 -1144
- package/dist/index187.js +22 -1231
- package/dist/index188.js +740 -11258
- package/dist/index189.js +1144 -36
- package/dist/index19.js +2 -2
- package/dist/index190.js +1233 -43
- package/dist/index191.js +11260 -1173
- package/dist/index192.js +38 -0
- package/dist/index193.js +44 -5938
- package/dist/index194.js +1116 -133
- package/dist/index196.js +5933 -13
- package/dist/index197.js +205 -76
- package/dist/index198.js +28 -246
- package/dist/index199.js +14 -13680
- package/dist/index2.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index200.js +77 -26
- package/dist/index201.js +245 -55
- package/dist/index202.js +13655 -209
- package/dist/index203.js +26 -310
- package/dist/index204.js +43 -275
- package/dist/index205.js +231 -81
- package/dist/index206.js +291 -387
- package/dist/index207.js +294 -21
- package/dist/index208.js +84 -29
- package/dist/index209.js +400 -109
- package/dist/index21.js +2 -2
- package/dist/index210.js +22 -36
- package/dist/index211.js +33 -26
- package/dist/index212.js +111 -31
- package/dist/index213.js +35 -50
- package/dist/index214.js +26 -43
- package/dist/index215.js +35 -3
- package/dist/index216.js +51 -9
- package/dist/index217.js +42 -18
- package/dist/index218.js +4 -10
- package/dist/index219.js +9 -10
- package/dist/index22.js +2 -2
- package/dist/index220.js +18 -38
- package/dist/index221.js +10 -21
- package/dist/index222.js +10 -127
- package/dist/index223.js +37 -36
- package/dist/index224.js +21 -80
- package/dist/index225.js +126 -19
- package/dist/index226.js +34 -16
- package/dist/index227.js +80 -20
- package/dist/index228.js +12 -12
- package/dist/index229.js +11 -11
- package/dist/index23.js +2 -2
- package/dist/index230.js +19 -160
- package/dist/index231.js +11 -11
- package/dist/index232.js +13 -15
- package/dist/index233.js +156 -194
- package/dist/index234.js +224 -66
- package/dist/index235.js +37 -34
- package/dist/index236.js +9 -39
- package/dist/index237.js +3627 -152
- package/dist/index238.js +53 -226
- package/dist/index239.js +77 -37
- package/dist/index24.js +2 -2
- package/dist/index240.js +52 -10
- package/dist/index241.js +182 -3603
- package/dist/index242.js +8 -53
- package/dist/index243.js +40 -60
- package/dist/index244.js +44 -35
- package/dist/index245.js +32 -193
- package/dist/index246.js +74 -9
- package/dist/index247.js +707 -38
- package/dist/index248.js +25 -44
- package/dist/index249.js +46 -36
- package/dist/index250.js +10 -74
- package/dist/index251.js +679 -700
- package/dist/index252.js +817 -39
- package/dist/index253.js +154 -57
- package/dist/index254.js +20 -11
- package/dist/index255.js +22 -705
- package/dist/index256.js +189 -810
- package/dist/index257.js +69 -21
- package/dist/index258.js +34 -22
- package/dist/index259.js +39 -19
- package/dist/index26.js +2 -2
- package/dist/index260.js +22 -836
- package/dist/index261.js +21 -701
- package/dist/index262.js +20 -176
- package/dist/index263.js +836 -22
- package/dist/index264.js +701 -19
- package/dist/index265.js +176 -20
- package/dist/index266.js +22 -3
- package/dist/index267.js +19 -186
- package/dist/index268.js +19 -132
- package/dist/index269.js +3 -1223
- package/dist/index27.js +2 -2
- package/dist/index270.js +185 -18
- package/dist/index271.js +132 -21
- package/dist/index272.js +1223 -22
- package/dist/index273.js +13 -22
- package/dist/index274.js +15 -13
- package/dist/index275.js +14 -12
- package/dist/index276.js +29 -2
- package/dist/index277.js +20 -2
- package/dist/index278.js +20 -253
- package/dist/index279.js +2 -8
- package/dist/index28.js +2 -2
- package/dist/index280.js +2 -138
- package/dist/index281.js +232 -62
- package/dist/index282.js +8 -2
- package/dist/index283.js +118 -59
- package/dist/index284.js +79 -50
- package/dist/index285.js +3 -26
- package/dist/index286.js +26 -21
- package/dist/index287.js +2 -22
- package/dist/index288.js +78 -15
- package/dist/index289.js +1534 -17
- package/dist/index29.js +2 -2
- package/dist/index290.js +386 -23
- package/dist/index291.js +2714 -245
- package/dist/index292.js +84 -4
- package/dist/index293.js +3785 -133
- package/dist/index294.js +57 -70
- package/dist/index295.js +14 -86
- package/dist/index296.js +82 -27
- package/dist/index297.js +199 -13
- package/dist/index298.js +237 -66
- package/dist/index299.js +53 -3
- package/dist/index3.js +2 -2
- package/dist/index30.js +2 -2
- package/dist/index300.js +26 -2
- package/dist/index301.js +21 -82
- package/dist/index302.js +21 -52
- package/dist/index303.js +16 -6
- package/dist/index304.js +16 -4
- package/dist/index305.js +22 -178
- package/dist/index306.js +77 -61
- package/dist/index307.js +22 -75
- package/dist/index308.js +908 -1507
- package/dist/index309.js +22 -386
- package/dist/index31.js +3 -3
- package/dist/index310.js +20 -2731
- package/dist/index311.js +19 -85
- package/dist/index312.js +58 -3781
- package/dist/index313.js +19 -60
- package/dist/index314.js +19 -15
- package/dist/index315.js +21 -83
- package/dist/index316.js +22 -202
- package/dist/index317.js +63 -246
- package/dist/index318.js +262 -3
- package/dist/index319.js +4 -25
- package/dist/index32.js +2 -2
- package/dist/index320.js +137 -76
- package/dist/index321.js +72 -21
- package/dist/index322.js +78 -926
- package/dist/index323.js +28 -21
- package/dist/index324.js +15 -19
- package/dist/index325.js +74 -19
- package/dist/index326.js +3 -68
- package/dist/index327.js +2 -19
- package/dist/index328.js +82 -18
- package/dist/index329.js +52 -21
- package/dist/index33.js +2 -2
- package/dist/index330.js +5 -21
- package/dist/index331.js +5 -63
- package/dist/index332.js +171 -29
- package/dist/index333.js +61 -17
- package/dist/index334.js +75 -57
- package/dist/index335.js +8 -28
- package/dist/index336.js +12 -6
- package/dist/index337.js +51 -48
- package/dist/index338.js +12 -7
- package/dist/index339.js +12 -10
- package/dist/index34.js +2 -2
- package/dist/index340.js +58 -7
- package/dist/index341.js +52 -28
- package/dist/index342.js +31 -2
- package/dist/index343.js +2 -70
- package/dist/index344.js +4 -166
- package/dist/index345.js +2 -10
- package/dist/index346.js +22 -9
- package/dist/index347.js +39 -12
- package/dist/index348.js +2 -10
- package/dist/index349.js +10 -16
- package/dist/index35.js +2 -2
- package/dist/index350.js +19 -8
- package/dist/index351.js +10 -13
- package/dist/index352.js +10 -55
- package/dist/index353.js +16 -11
- package/dist/index354.js +2 -14
- package/dist/index355.js +9 -58
- package/dist/index356.js +9 -51
- package/dist/index357.js +12 -29
- package/dist/index358.js +37 -2
- package/dist/index359.js +20 -5
- package/dist/index36.js +2 -2
- package/dist/index360.js +20 -2
- package/dist/index361.js +64 -23
- package/dist/index362.js +37 -41
- package/dist/index363.js +19 -2
- package/dist/index364.js +57 -11
- package/dist/index365.js +27 -18
- package/dist/index366.js +7 -2
- package/dist/index367.js +51 -8
- package/dist/index368.js +7 -20
- package/dist/index369.js +11 -19
- package/dist/index37.js +2 -2
- package/dist/index370.js +7 -64
- package/dist/index371.js +28 -37
- package/dist/index372.js +2 -31
- package/dist/index373.js +70 -11
- package/dist/index374.js +167 -4
- package/dist/index375.js +98 -4
- package/dist/index376.js +100 -12
- package/dist/index377.js +91 -7
- package/dist/index378.js +17 -12
- package/dist/index379.js +30 -4
- package/dist/index38.js +2 -2
- package/dist/index380.js +11 -33
- package/dist/index381.js +4 -31
- package/dist/index382.js +4 -28
- package/dist/index383.js +12 -60
- package/dist/index384.js +7 -101
- package/dist/index385.js +11 -90
- package/dist/index386.js +5 -98
- package/dist/index387.js +33 -17
- package/dist/index388.js +31 -3
- package/dist/index389.js +28 -2
- package/dist/index39.js +2 -2
- package/dist/index390.js +61 -2
- package/dist/index391.js +3 -17
- package/dist/index392.js +2 -13
- package/dist/index393.js +2 -6
- package/dist/index394.js +17 -32
- package/dist/index395.js +15 -0
- package/dist/index396.js +8 -0
- package/dist/index397.js +34 -0
- package/dist/index4.js +2 -2
- package/dist/index40.js +2 -2
- package/dist/index41.js +2 -2
- package/dist/index42.js +2 -2
- package/dist/index43.js +2 -2
- package/dist/index44.js +4 -4
- package/dist/index45.js +26 -26
- package/dist/index46.js +2 -2
- package/dist/index47.js +2 -2
- package/dist/index48.js +3 -3
- package/dist/index49.js +4 -69
- package/dist/index5.js +2 -2
- package/dist/index50.js +67 -61
- package/dist/index51.js +57 -175
- package/dist/index52.js +173 -77
- package/dist/index53.js +79 -200
- package/dist/index54.js +206 -68
- package/dist/index55.js +69 -20
- package/dist/index56.js +20 -11
- package/dist/index57.js +10 -6
- package/dist/index58.js +5 -209
- package/dist/index59.js +210 -12
- package/dist/index6.js +2 -2
- package/dist/index60.js +12 -184
- package/dist/index61.js +176 -68
- package/dist/index62.js +79 -0
- package/dist/index64.js +7 -91
- package/dist/index65.js +93 -0
- package/dist/index7.js +12 -12
- package/dist/{index72.js → index73.js} +2 -2
- package/dist/index77.js +40 -308
- package/dist/index78.js +330 -0
- package/dist/index8.js +3 -3
- package/dist/{index81.js → index82.js} +4 -4
- package/dist/{index83.js → index84.js} +1 -1
- package/dist/index86.js +23 -131
- package/dist/index87.js +144 -0
- package/dist/{index88.js → index89.js} +5 -5
- package/dist/index9.js +2 -2
- package/dist/{index90.js → index91.js} +5 -5
- package/dist/{index96.js → index97.js} +4 -4
- package/dist/index99.js +20 -25
- package/dist/src/components/time-picker/time-picker.stories.d.ts +25 -0
- package/dist/src/components/time-picker/time-picker.vue.d.ts +52 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index103.js +0 -142
- package/dist/index154.js +0 -120
- package/dist/index161.js +0 -210
- package/dist/index165.js +0 -497
- package/dist/index166.js +0 -5524
- package/dist/index182.js +0 -20
- package/dist/index195.js +0 -37
- package/dist/index63.js +0 -9
- package/dist/index76.js +0 -62
- package/dist/index85.js +0 -36
- package/dist/index98.js +0 -29
- /package/dist/{index119.js → index120.js} +0 -0
- /package/dist/{index121.js → index122.js} +0 -0
- /package/dist/{index123.js → index124.js} +0 -0
- /package/dist/{index125.js → index126.js} +0 -0
- /package/dist/{index127.js → index128.js} +0 -0
- /package/dist/{index129.js → index130.js} +0 -0
- /package/dist/{index136.js → index137.js} +0 -0
- /package/dist/{index138.js → index139.js} +0 -0
- /package/dist/{index140.js → index141.js} +0 -0
- /package/dist/{index148.js → index149.js} +0 -0
- /package/dist/{index150.js → index151.js} +0 -0
- /package/dist/{index152.js → index155.js} +0 -0
- /package/dist/{index66.js → index67.js} +0 -0
- /package/dist/{index68.js → index69.js} +0 -0
- /package/dist/{index70.js → index71.js} +0 -0
- /package/dist/{index74.js → index75.js} +0 -0
- /package/dist/{index79.js → index80.js} +0 -0
- /package/dist/{index92.js → index93.js} +0 -0
- /package/dist/{index94.js → index95.js} +0 -0
package/dist/index308.js
CHANGED
|
@@ -1,1536 +1,937 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return (t < 0 ? e != a : e != c) && (m |= Y), new L(d, m, u);
|
|
1
|
+
import j from "./index253.js";
|
|
2
|
+
import _ from "./index359.js";
|
|
3
|
+
import G from "./index360.js";
|
|
4
|
+
import W from "./index361.js";
|
|
5
|
+
import { DomHandler as C, ObjectUtils as k } from "./index175.js";
|
|
6
|
+
import H from "./index209.js";
|
|
7
|
+
import q from "./index362.js";
|
|
8
|
+
import { resolveComponent as O, openBlock as m, createElementBlock as U, mergeProps as p, createVNode as $, toHandlers as w, withCtx as x, renderSlot as S, createBlock as I, resolveDynamicComponent as v, createCommentVNode as V } from "vue";
|
|
9
|
+
var z = {
|
|
10
|
+
name: "BaseInputNumber",
|
|
11
|
+
extends: H,
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
format: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
showButtons: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
buttonLayout: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "stacked"
|
|
28
|
+
},
|
|
29
|
+
incrementButtonClass: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
decrementButtonClass: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: null
|
|
36
|
+
},
|
|
37
|
+
incrementButtonIcon: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: void 0
|
|
40
|
+
},
|
|
41
|
+
decrementButtonIcon: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
45
|
+
locale: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
localeMatcher: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
mode: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "decimal"
|
|
56
|
+
},
|
|
57
|
+
prefix: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: null
|
|
60
|
+
},
|
|
61
|
+
suffix: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: null
|
|
64
|
+
},
|
|
65
|
+
currency: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: void 0
|
|
68
|
+
},
|
|
69
|
+
currencyDisplay: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: void 0
|
|
72
|
+
},
|
|
73
|
+
useGrouping: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !0
|
|
76
|
+
},
|
|
77
|
+
minFractionDigits: {
|
|
78
|
+
type: Number,
|
|
79
|
+
default: void 0
|
|
80
|
+
},
|
|
81
|
+
maxFractionDigits: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: void 0
|
|
84
|
+
},
|
|
85
|
+
roundingMode: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: "halfExpand",
|
|
88
|
+
validator: function(e) {
|
|
89
|
+
return ["ceil", "floor", "expand", "trunc", "halfCeil", "halfFloor", "halfExpand", "halfTrunc", "halfEven"].includes(e);
|
|
91
90
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
91
|
+
},
|
|
92
|
+
min: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: null
|
|
95
|
+
},
|
|
96
|
+
max: {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: null
|
|
99
|
+
},
|
|
100
|
+
step: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 1
|
|
103
|
+
},
|
|
104
|
+
allowEmpty: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: !0
|
|
107
|
+
},
|
|
108
|
+
highlightOnFocus: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: !1
|
|
111
|
+
},
|
|
112
|
+
readonly: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: !1
|
|
115
|
+
},
|
|
116
|
+
variant: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: null
|
|
119
|
+
},
|
|
120
|
+
invalid: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
disabled: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: !1
|
|
127
|
+
},
|
|
128
|
+
placeholder: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: null
|
|
131
|
+
},
|
|
132
|
+
inputId: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: null
|
|
135
|
+
},
|
|
136
|
+
inputClass: {
|
|
137
|
+
type: [String, Object],
|
|
138
|
+
default: null
|
|
139
|
+
},
|
|
140
|
+
inputStyle: {
|
|
141
|
+
type: Object,
|
|
142
|
+
default: null
|
|
143
|
+
},
|
|
144
|
+
inputProps: {
|
|
145
|
+
type: null,
|
|
146
|
+
default: null
|
|
147
|
+
},
|
|
148
|
+
incrementButtonProps: {
|
|
149
|
+
type: null,
|
|
150
|
+
default: null
|
|
151
|
+
},
|
|
152
|
+
decrementButtonProps: {
|
|
153
|
+
type: null,
|
|
154
|
+
default: null
|
|
155
|
+
},
|
|
156
|
+
ariaLabelledby: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: null
|
|
159
|
+
},
|
|
160
|
+
ariaLabel: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: null
|
|
121
163
|
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
map positions in the post-step document to the pre-step document.
|
|
126
|
-
*/
|
|
127
|
-
invert() {
|
|
128
|
-
return new S(this.ranges, !this.inverted);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
@internal
|
|
132
|
-
*/
|
|
133
|
-
toString() {
|
|
134
|
-
return (this.inverted ? "-" : "") + JSON.stringify(this.ranges);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
Create a map that moves all positions by offset `n` (which may be
|
|
138
|
-
negative). This can be useful when applying steps meant for a
|
|
139
|
-
sub-document to a larger document, or vice-versa.
|
|
140
|
-
*/
|
|
141
|
-
static offset(e) {
|
|
142
|
-
return e == 0 ? S.empty : new S(e < 0 ? [0, -e, 0] : [0, 0, e]);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
S.empty = new S([]);
|
|
146
|
-
class A {
|
|
147
|
-
/**
|
|
148
|
-
Create a new mapping with the given position maps.
|
|
149
|
-
*/
|
|
150
|
-
constructor(e, t, r = 0, n = e ? e.length : 0) {
|
|
151
|
-
this.mirror = t, this.from = r, this.to = n, this._maps = e || [], this.ownData = !(e || t);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
The step maps in this mapping.
|
|
155
|
-
*/
|
|
156
|
-
get maps() {
|
|
157
|
-
return this._maps;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
Create a mapping that maps only through a part of this one.
|
|
161
|
-
*/
|
|
162
|
-
slice(e = 0, t = this.maps.length) {
|
|
163
|
-
return new A(this._maps, this.mirror, e, t);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
Add a step map to the end of this mapping. If `mirrors` is
|
|
167
|
-
given, it should be the index of the step map that is the mirror
|
|
168
|
-
image of this one.
|
|
169
|
-
*/
|
|
170
|
-
appendMap(e, t) {
|
|
171
|
-
this.ownData || (this._maps = this._maps.slice(), this.mirror = this.mirror && this.mirror.slice(), this.ownData = !0), this.to = this._maps.push(e), t != null && this.setMirror(this._maps.length - 1, t);
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
Add all the step maps in a given mapping to this one (preserving
|
|
175
|
-
mirroring information).
|
|
176
|
-
*/
|
|
177
|
-
appendMapping(e) {
|
|
178
|
-
for (let t = 0, r = this._maps.length; t < e._maps.length; t++) {
|
|
179
|
-
let n = e.getMirror(t);
|
|
180
|
-
this.appendMap(e._maps[t], n != null && n < t ? r + n : void 0);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
Finds the offset of the step map that mirrors the map at the
|
|
185
|
-
given offset, in this mapping (as per the second argument to
|
|
186
|
-
`appendMap`).
|
|
187
|
-
*/
|
|
188
|
-
getMirror(e) {
|
|
189
|
-
if (this.mirror) {
|
|
190
|
-
for (let t = 0; t < this.mirror.length; t++)
|
|
191
|
-
if (this.mirror[t] == e)
|
|
192
|
-
return this.mirror[t + (t % 2 ? -1 : 1)];
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
@internal
|
|
197
|
-
*/
|
|
198
|
-
setMirror(e, t) {
|
|
199
|
-
this.mirror || (this.mirror = []), this.mirror.push(e, t);
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
Append the inverse of the given mapping to this one.
|
|
203
|
-
*/
|
|
204
|
-
appendMappingInverted(e) {
|
|
205
|
-
for (let t = e.maps.length - 1, r = this._maps.length + e._maps.length; t >= 0; t--) {
|
|
206
|
-
let n = e.getMirror(t);
|
|
207
|
-
this.appendMap(e._maps[t].invert(), n != null && n > t ? r - n - 1 : void 0);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
Create an inverted version of this mapping.
|
|
212
|
-
*/
|
|
213
|
-
invert() {
|
|
214
|
-
let e = new A();
|
|
215
|
-
return e.appendMappingInverted(this), e;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
Map a position through this mapping.
|
|
219
|
-
*/
|
|
220
|
-
map(e, t = 1) {
|
|
221
|
-
if (this.mirror)
|
|
222
|
-
return this._map(e, t, !0);
|
|
223
|
-
for (let r = this.from; r < this.to; r++)
|
|
224
|
-
e = this._maps[r].map(e, t);
|
|
225
|
-
return e;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
Map a position through this mapping, returning a mapping
|
|
229
|
-
result.
|
|
230
|
-
*/
|
|
231
|
-
mapResult(e, t = 1) {
|
|
232
|
-
return this._map(e, t, !1);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
@internal
|
|
236
|
-
*/
|
|
237
|
-
_map(e, t, r) {
|
|
238
|
-
let n = 0;
|
|
239
|
-
for (let i = this.from; i < this.to; i++) {
|
|
240
|
-
let o = this._maps[i], l = o.mapResult(e, t);
|
|
241
|
-
if (l.recover != null) {
|
|
242
|
-
let a = this.getMirror(i);
|
|
243
|
-
if (a != null && a > i && a < this.to) {
|
|
244
|
-
i = a, e = this._maps[a].recover(l.recover);
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
n |= l.delInfo, e = l.pos;
|
|
249
|
-
}
|
|
250
|
-
return r ? e : new L(e, n, null);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
const B = /* @__PURE__ */ Object.create(null);
|
|
254
|
-
class k {
|
|
255
|
-
/**
|
|
256
|
-
Get the step map that represents the changes made by this step,
|
|
257
|
-
and which can be used to transform between positions in the old
|
|
258
|
-
and the new document.
|
|
259
|
-
*/
|
|
260
|
-
getMap() {
|
|
261
|
-
return S.empty;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
Try to merge this step with another one, to be applied directly
|
|
265
|
-
after it. Returns the merged step when possible, null if the
|
|
266
|
-
steps can't be merged.
|
|
267
|
-
*/
|
|
268
|
-
merge(e) {
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
Deserialize a step from its JSON representation. Will call
|
|
273
|
-
through to the step class' own implementation of this method.
|
|
274
|
-
*/
|
|
275
|
-
static fromJSON(e, t) {
|
|
276
|
-
if (!t || !t.stepType)
|
|
277
|
-
throw new RangeError("Invalid input for Step.fromJSON");
|
|
278
|
-
let r = B[t.stepType];
|
|
279
|
-
if (!r)
|
|
280
|
-
throw new RangeError(`No step type ${t.stepType} defined`);
|
|
281
|
-
return r.fromJSON(e, t);
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
To be able to serialize steps to JSON, each step needs a string
|
|
285
|
-
ID to attach to its JSON representation. Use this method to
|
|
286
|
-
register an ID for your step classes. Try to pick something
|
|
287
|
-
that's unlikely to clash with steps from other modules.
|
|
288
|
-
*/
|
|
289
|
-
static jsonID(e, t) {
|
|
290
|
-
if (e in B)
|
|
291
|
-
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
292
|
-
return B[e] = t, t.prototype.jsonID = e, t;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
class y {
|
|
296
|
-
/**
|
|
297
|
-
@internal
|
|
298
|
-
*/
|
|
299
|
-
constructor(e, t) {
|
|
300
|
-
this.doc = e, this.failed = t;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
Create a successful step result.
|
|
304
|
-
*/
|
|
305
|
-
static ok(e) {
|
|
306
|
-
return new y(e, null);
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
Create a failed step result.
|
|
310
|
-
*/
|
|
311
|
-
static fail(e) {
|
|
312
|
-
return new y(null, e);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
|
|
316
|
-
arguments. Create a successful result if it succeeds, and a
|
|
317
|
-
failed one if it throws a `ReplaceError`.
|
|
318
|
-
*/
|
|
319
|
-
static fromReplace(e, t, r, n) {
|
|
320
|
-
try {
|
|
321
|
-
return y.ok(e.replace(t, r, n));
|
|
322
|
-
} catch (i) {
|
|
323
|
-
if (i instanceof le)
|
|
324
|
-
return y.fail(i.message);
|
|
325
|
-
throw i;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
function P(s, e, t) {
|
|
330
|
-
let r = [];
|
|
331
|
-
for (let n = 0; n < s.childCount; n++) {
|
|
332
|
-
let i = s.child(n);
|
|
333
|
-
i.content.size && (i = i.copy(P(i.content, e, i))), i.isInline && (i = e(i, t, n)), r.push(i);
|
|
334
|
-
}
|
|
335
|
-
return w.fromArray(r);
|
|
336
|
-
}
|
|
337
|
-
class C extends k {
|
|
338
|
-
/**
|
|
339
|
-
Create a mark step.
|
|
340
|
-
*/
|
|
341
|
-
constructor(e, t, r) {
|
|
342
|
-
super(), this.from = e, this.to = t, this.mark = r;
|
|
343
|
-
}
|
|
344
|
-
apply(e) {
|
|
345
|
-
let t = e.slice(this.from, this.to), r = e.resolve(this.from), n = r.node(r.sharedDepth(this.to)), i = new g(P(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), n), t.openStart, t.openEnd);
|
|
346
|
-
return y.fromReplace(e, this.from, this.to, i);
|
|
347
|
-
}
|
|
348
|
-
invert() {
|
|
349
|
-
return new b(this.from, this.to, this.mark);
|
|
350
|
-
}
|
|
351
|
-
map(e) {
|
|
352
|
-
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
353
|
-
return t.deleted && r.deleted || t.pos >= r.pos ? null : new C(t.pos, r.pos, this.mark);
|
|
354
|
-
}
|
|
355
|
-
merge(e) {
|
|
356
|
-
return e instanceof C && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new C(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
357
|
-
}
|
|
358
|
-
toJSON() {
|
|
164
|
+
},
|
|
165
|
+
style: q,
|
|
166
|
+
provide: function() {
|
|
359
167
|
return {
|
|
360
|
-
|
|
361
|
-
mark: this.mark.toJSON(),
|
|
362
|
-
from: this.from,
|
|
363
|
-
to: this.to
|
|
168
|
+
$parentInstance: this
|
|
364
169
|
};
|
|
365
170
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return
|
|
171
|
+
};
|
|
172
|
+
function D(n) {
|
|
173
|
+
"@babel/helpers - typeof";
|
|
174
|
+
return D = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
175
|
+
return typeof e;
|
|
176
|
+
} : function(e) {
|
|
177
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
178
|
+
}, D(n);
|
|
179
|
+
}
|
|
180
|
+
function A(n, e) {
|
|
181
|
+
var t = Object.keys(n);
|
|
182
|
+
if (Object.getOwnPropertySymbols) {
|
|
183
|
+
var i = Object.getOwnPropertySymbols(n);
|
|
184
|
+
e && (i = i.filter(function(r) {
|
|
185
|
+
return Object.getOwnPropertyDescriptor(n, r).enumerable;
|
|
186
|
+
})), t.push.apply(t, i);
|
|
373
187
|
}
|
|
188
|
+
return t;
|
|
374
189
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
190
|
+
function R(n) {
|
|
191
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
192
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
193
|
+
e % 2 ? A(Object(t), !0).forEach(function(i) {
|
|
194
|
+
J(n, i, t[i]);
|
|
195
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : A(Object(t)).forEach(function(i) {
|
|
196
|
+
Object.defineProperty(n, i, Object.getOwnPropertyDescriptor(t, i));
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return n;
|
|
200
|
+
}
|
|
201
|
+
function J(n, e, t) {
|
|
202
|
+
return e = Q(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
|
|
203
|
+
}
|
|
204
|
+
function Q(n) {
|
|
205
|
+
var e = X(n, "string");
|
|
206
|
+
return D(e) == "symbol" ? e : String(e);
|
|
207
|
+
}
|
|
208
|
+
function X(n, e) {
|
|
209
|
+
if (D(n) != "object" || !n) return n;
|
|
210
|
+
var t = n[Symbol.toPrimitive];
|
|
211
|
+
if (t !== void 0) {
|
|
212
|
+
var i = t.call(n, e);
|
|
213
|
+
if (D(i) != "object") return i;
|
|
214
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
215
|
+
}
|
|
216
|
+
return (e === "string" ? String : Number)(n);
|
|
217
|
+
}
|
|
218
|
+
function Y(n) {
|
|
219
|
+
return ne(n) || te(n) || ee(n) || Z();
|
|
220
|
+
}
|
|
221
|
+
function Z() {
|
|
222
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
223
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
224
|
+
}
|
|
225
|
+
function ee(n, e) {
|
|
226
|
+
if (n) {
|
|
227
|
+
if (typeof n == "string") return M(n, e);
|
|
228
|
+
var t = Object.prototype.toString.call(n).slice(8, -1);
|
|
229
|
+
if (t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set") return Array.from(n);
|
|
230
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return M(n, e);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function te(n) {
|
|
234
|
+
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
235
|
+
}
|
|
236
|
+
function ne(n) {
|
|
237
|
+
if (Array.isArray(n)) return M(n);
|
|
238
|
+
}
|
|
239
|
+
function M(n, e) {
|
|
240
|
+
(e == null || e > n.length) && (e = n.length);
|
|
241
|
+
for (var t = 0, i = new Array(e); t < e; t++) i[t] = n[t];
|
|
242
|
+
return i;
|
|
243
|
+
}
|
|
244
|
+
var ie = {
|
|
245
|
+
name: "InputNumber",
|
|
246
|
+
extends: z,
|
|
247
|
+
inheritAttrs: !1,
|
|
248
|
+
emits: ["update:modelValue", "input", "focus", "blur"],
|
|
249
|
+
numberFormat: null,
|
|
250
|
+
_numeral: null,
|
|
251
|
+
_decimal: null,
|
|
252
|
+
_group: null,
|
|
253
|
+
_minusSign: null,
|
|
254
|
+
_currency: null,
|
|
255
|
+
_suffix: null,
|
|
256
|
+
_prefix: null,
|
|
257
|
+
_index: null,
|
|
258
|
+
groupChar: "",
|
|
259
|
+
isSpecialChar: null,
|
|
260
|
+
prefixChar: null,
|
|
261
|
+
suffixChar: null,
|
|
262
|
+
timer: null,
|
|
263
|
+
data: function() {
|
|
398
264
|
return {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
from: this.from,
|
|
402
|
-
to: this.to
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
@internal
|
|
407
|
-
*/
|
|
408
|
-
static fromJSON(e, t) {
|
|
409
|
-
if (typeof t.from != "number" || typeof t.to != "number")
|
|
410
|
-
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
411
|
-
return new b(t.from, t.to, e.markFromJSON(t.mark));
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
k.jsonID("removeMark", b);
|
|
415
|
-
class N extends k {
|
|
416
|
-
/**
|
|
417
|
-
Create a node mark step.
|
|
418
|
-
*/
|
|
419
|
-
constructor(e, t) {
|
|
420
|
-
super(), this.pos = e, this.mark = t;
|
|
421
|
-
}
|
|
422
|
-
apply(e) {
|
|
423
|
-
let t = e.nodeAt(this.pos);
|
|
424
|
-
if (!t)
|
|
425
|
-
return y.fail("No node at mark step's position");
|
|
426
|
-
let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
|
|
427
|
-
return y.fromReplace(e, this.pos, this.pos + 1, new g(w.from(r), 0, t.isLeaf ? 0 : 1));
|
|
428
|
-
}
|
|
429
|
-
invert(e) {
|
|
430
|
-
let t = e.nodeAt(this.pos);
|
|
431
|
-
if (t) {
|
|
432
|
-
let r = this.mark.addToSet(t.marks);
|
|
433
|
-
if (r.length == t.marks.length) {
|
|
434
|
-
for (let n = 0; n < t.marks.length; n++)
|
|
435
|
-
if (!t.marks[n].isInSet(r))
|
|
436
|
-
return new N(this.pos, t.marks[n]);
|
|
437
|
-
return new N(this.pos, this.mark);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
return new R(this.pos, this.mark);
|
|
441
|
-
}
|
|
442
|
-
map(e) {
|
|
443
|
-
let t = e.mapResult(this.pos, 1);
|
|
444
|
-
return t.deletedAfter ? null : new N(t.pos, this.mark);
|
|
445
|
-
}
|
|
446
|
-
toJSON() {
|
|
447
|
-
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
@internal
|
|
451
|
-
*/
|
|
452
|
-
static fromJSON(e, t) {
|
|
453
|
-
if (typeof t.pos != "number")
|
|
454
|
-
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
455
|
-
return new N(t.pos, e.markFromJSON(t.mark));
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
k.jsonID("addNodeMark", N);
|
|
459
|
-
class R extends k {
|
|
460
|
-
/**
|
|
461
|
-
Create a mark-removing step.
|
|
462
|
-
*/
|
|
463
|
-
constructor(e, t) {
|
|
464
|
-
super(), this.pos = e, this.mark = t;
|
|
465
|
-
}
|
|
466
|
-
apply(e) {
|
|
467
|
-
let t = e.nodeAt(this.pos);
|
|
468
|
-
if (!t)
|
|
469
|
-
return y.fail("No node at mark step's position");
|
|
470
|
-
let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
|
|
471
|
-
return y.fromReplace(e, this.pos, this.pos + 1, new g(w.from(r), 0, t.isLeaf ? 0 : 1));
|
|
472
|
-
}
|
|
473
|
-
invert(e) {
|
|
474
|
-
let t = e.nodeAt(this.pos);
|
|
475
|
-
return !t || !this.mark.isInSet(t.marks) ? this : new N(this.pos, this.mark);
|
|
476
|
-
}
|
|
477
|
-
map(e) {
|
|
478
|
-
let t = e.mapResult(this.pos, 1);
|
|
479
|
-
return t.deletedAfter ? null : new R(t.pos, this.mark);
|
|
480
|
-
}
|
|
481
|
-
toJSON() {
|
|
482
|
-
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
@internal
|
|
486
|
-
*/
|
|
487
|
-
static fromJSON(e, t) {
|
|
488
|
-
if (typeof t.pos != "number")
|
|
489
|
-
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
490
|
-
return new R(t.pos, e.markFromJSON(t.mark));
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
k.jsonID("removeNodeMark", R);
|
|
494
|
-
class v extends k {
|
|
495
|
-
/**
|
|
496
|
-
The given `slice` should fit the 'gap' between `from` and
|
|
497
|
-
`to`—the depths must line up, and the surrounding nodes must be
|
|
498
|
-
able to be joined with the open sides of the slice. When
|
|
499
|
-
`structure` is true, the step will fail if the content between
|
|
500
|
-
from and to is not just a sequence of closing and then opening
|
|
501
|
-
tokens (this is to guard against rebased replace steps
|
|
502
|
-
overwriting something they weren't supposed to).
|
|
503
|
-
*/
|
|
504
|
-
constructor(e, t, r, n = !1) {
|
|
505
|
-
super(), this.from = e, this.to = t, this.slice = r, this.structure = n;
|
|
506
|
-
}
|
|
507
|
-
apply(e) {
|
|
508
|
-
return this.structure && q(e, this.from, this.to) ? y.fail("Structure replace would overwrite content") : y.fromReplace(e, this.from, this.to, this.slice);
|
|
509
|
-
}
|
|
510
|
-
getMap() {
|
|
511
|
-
return new S([this.from, this.to - this.from, this.slice.size]);
|
|
512
|
-
}
|
|
513
|
-
invert(e) {
|
|
514
|
-
return new v(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
515
|
-
}
|
|
516
|
-
map(e) {
|
|
517
|
-
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
518
|
-
return t.deletedAcross && r.deletedAcross ? null : new v(t.pos, Math.max(t.pos, r.pos), this.slice, this.structure);
|
|
519
|
-
}
|
|
520
|
-
merge(e) {
|
|
521
|
-
if (!(e instanceof v) || e.structure || this.structure)
|
|
522
|
-
return null;
|
|
523
|
-
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
524
|
-
let t = this.slice.size + e.slice.size == 0 ? g.empty : new g(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
525
|
-
return new v(this.from, this.to + (e.to - e.from), t, this.structure);
|
|
526
|
-
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
527
|
-
let t = this.slice.size + e.slice.size == 0 ? g.empty : new g(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
528
|
-
return new v(e.from, this.to, t, this.structure);
|
|
529
|
-
} else
|
|
530
|
-
return null;
|
|
531
|
-
}
|
|
532
|
-
toJSON() {
|
|
533
|
-
let e = { stepType: "replace", from: this.from, to: this.to };
|
|
534
|
-
return this.slice.size && (e.slice = this.slice.toJSON()), this.structure && (e.structure = !0), e;
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
@internal
|
|
538
|
-
*/
|
|
539
|
-
static fromJSON(e, t) {
|
|
540
|
-
if (typeof t.from != "number" || typeof t.to != "number")
|
|
541
|
-
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
542
|
-
return new v(t.from, t.to, g.fromJSON(e, t.slice), !!t.structure);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
k.jsonID("replace", v);
|
|
546
|
-
class M extends k {
|
|
547
|
-
/**
|
|
548
|
-
Create a replace-around step with the given range and gap.
|
|
549
|
-
`insert` should be the point in the slice into which the content
|
|
550
|
-
of the gap should be moved. `structure` has the same meaning as
|
|
551
|
-
it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.
|
|
552
|
-
*/
|
|
553
|
-
constructor(e, t, r, n, i, o, l = !1) {
|
|
554
|
-
super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = n, this.slice = i, this.insert = o, this.structure = l;
|
|
555
|
-
}
|
|
556
|
-
apply(e) {
|
|
557
|
-
if (this.structure && (q(e, this.from, this.gapFrom) || q(e, this.gapTo, this.to)))
|
|
558
|
-
return y.fail("Structure gap-replace would overwrite content");
|
|
559
|
-
let t = e.slice(this.gapFrom, this.gapTo);
|
|
560
|
-
if (t.openStart || t.openEnd)
|
|
561
|
-
return y.fail("Gap is not a flat range");
|
|
562
|
-
let r = this.slice.insertAt(this.insert, t.content);
|
|
563
|
-
return r ? y.fromReplace(e, this.from, this.to, r) : y.fail("Content does not fit in gap");
|
|
564
|
-
}
|
|
565
|
-
getMap() {
|
|
566
|
-
return new S([
|
|
567
|
-
this.from,
|
|
568
|
-
this.gapFrom - this.from,
|
|
569
|
-
this.insert,
|
|
570
|
-
this.gapTo,
|
|
571
|
-
this.to - this.gapTo,
|
|
572
|
-
this.slice.size - this.insert
|
|
573
|
-
]);
|
|
574
|
-
}
|
|
575
|
-
invert(e) {
|
|
576
|
-
let t = this.gapTo - this.gapFrom;
|
|
577
|
-
return new M(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
|
|
578
|
-
}
|
|
579
|
-
map(e) {
|
|
580
|
-
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1), n = this.from == this.gapFrom ? t.pos : e.map(this.gapFrom, -1), i = this.to == this.gapTo ? r.pos : e.map(this.gapTo, 1);
|
|
581
|
-
return t.deletedAcross && r.deletedAcross || n < t.pos || i > r.pos ? null : new M(t.pos, r.pos, n, i, this.slice, this.insert, this.structure);
|
|
582
|
-
}
|
|
583
|
-
toJSON() {
|
|
584
|
-
let e = {
|
|
585
|
-
stepType: "replaceAround",
|
|
586
|
-
from: this.from,
|
|
587
|
-
to: this.to,
|
|
588
|
-
gapFrom: this.gapFrom,
|
|
589
|
-
gapTo: this.gapTo,
|
|
590
|
-
insert: this.insert
|
|
265
|
+
d_modelValue: this.modelValue,
|
|
266
|
+
focused: !1
|
|
591
267
|
};
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
268
|
+
},
|
|
269
|
+
watch: {
|
|
270
|
+
modelValue: function(e) {
|
|
271
|
+
this.d_modelValue = e;
|
|
272
|
+
},
|
|
273
|
+
locale: function(e, t) {
|
|
274
|
+
this.updateConstructParser(e, t);
|
|
275
|
+
},
|
|
276
|
+
localeMatcher: function(e, t) {
|
|
277
|
+
this.updateConstructParser(e, t);
|
|
278
|
+
},
|
|
279
|
+
mode: function(e, t) {
|
|
280
|
+
this.updateConstructParser(e, t);
|
|
281
|
+
},
|
|
282
|
+
currency: function(e, t) {
|
|
283
|
+
this.updateConstructParser(e, t);
|
|
284
|
+
},
|
|
285
|
+
currencyDisplay: function(e, t) {
|
|
286
|
+
this.updateConstructParser(e, t);
|
|
287
|
+
},
|
|
288
|
+
useGrouping: function(e, t) {
|
|
289
|
+
this.updateConstructParser(e, t);
|
|
290
|
+
},
|
|
291
|
+
minFractionDigits: function(e, t) {
|
|
292
|
+
this.updateConstructParser(e, t);
|
|
293
|
+
},
|
|
294
|
+
maxFractionDigits: function(e, t) {
|
|
295
|
+
this.updateConstructParser(e, t);
|
|
296
|
+
},
|
|
297
|
+
suffix: function(e, t) {
|
|
298
|
+
this.updateConstructParser(e, t);
|
|
299
|
+
},
|
|
300
|
+
prefix: function(e, t) {
|
|
301
|
+
this.updateConstructParser(e, t);
|
|
614
302
|
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
return
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
303
|
+
},
|
|
304
|
+
created: function() {
|
|
305
|
+
this.constructParser();
|
|
306
|
+
},
|
|
307
|
+
methods: {
|
|
308
|
+
getOptions: function() {
|
|
309
|
+
var e, t;
|
|
310
|
+
return {
|
|
311
|
+
localeMatcher: this.localeMatcher,
|
|
312
|
+
style: this.mode,
|
|
313
|
+
currency: this.currency,
|
|
314
|
+
currencyDisplay: this.currencyDisplay,
|
|
315
|
+
useGrouping: this.useGrouping,
|
|
316
|
+
minimumFractionDigits: (e = this.minFractionDigits) !== null && e !== void 0 ? e : void 0,
|
|
317
|
+
maximumFractionDigits: (t = this.maxFractionDigits) !== null && t !== void 0 ? t : void 0,
|
|
318
|
+
roundingMode: this.roundingMode
|
|
319
|
+
};
|
|
320
|
+
},
|
|
321
|
+
constructParser: function() {
|
|
322
|
+
this.numberFormat = new Intl.NumberFormat(this.locale, this.getOptions());
|
|
323
|
+
var e = Y(new Intl.NumberFormat(this.locale, {
|
|
324
|
+
useGrouping: !1
|
|
325
|
+
}).format(9876543210)).reverse(), t = new Map(e.map(function(i, r) {
|
|
326
|
+
return [i, r];
|
|
327
|
+
}));
|
|
328
|
+
this._numeral = new RegExp("[".concat(e.join(""), "]"), "g"), this._group = this.getGroupingExpression(), this._minusSign = this.getMinusSignExpression(), this._currency = this.getCurrencyExpression(), this._decimal = this.getDecimalExpression(), this._suffix = this.getSuffixExpression(), this._prefix = this.getPrefixExpression(), this._index = function(i) {
|
|
329
|
+
return t.get(i);
|
|
330
|
+
};
|
|
331
|
+
},
|
|
332
|
+
updateConstructParser: function(e, t) {
|
|
333
|
+
e !== t && this.constructParser();
|
|
334
|
+
},
|
|
335
|
+
escapeRegExp: function(e) {
|
|
336
|
+
return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
337
|
+
},
|
|
338
|
+
getDecimalExpression: function() {
|
|
339
|
+
var e = new Intl.NumberFormat(this.locale, R(R({}, this.getOptions()), {}, {
|
|
340
|
+
useGrouping: !1
|
|
341
|
+
}));
|
|
342
|
+
return new RegExp("[".concat(e.format(1.1).replace(this._currency, "").trim().replace(this._numeral, ""), "]"), "g");
|
|
343
|
+
},
|
|
344
|
+
getGroupingExpression: function() {
|
|
345
|
+
var e = new Intl.NumberFormat(this.locale, {
|
|
346
|
+
useGrouping: !0
|
|
347
|
+
});
|
|
348
|
+
return this.groupChar = e.format(1e6).trim().replace(this._numeral, "").charAt(0), new RegExp("[".concat(this.groupChar, "]"), "g");
|
|
349
|
+
},
|
|
350
|
+
getMinusSignExpression: function() {
|
|
351
|
+
var e = new Intl.NumberFormat(this.locale, {
|
|
352
|
+
useGrouping: !1
|
|
353
|
+
});
|
|
354
|
+
return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral, ""), "]"), "g");
|
|
355
|
+
},
|
|
356
|
+
getCurrencyExpression: function() {
|
|
357
|
+
if (this.currency) {
|
|
358
|
+
var e = new Intl.NumberFormat(this.locale, {
|
|
359
|
+
style: "currency",
|
|
360
|
+
currency: this.currency,
|
|
361
|
+
currencyDisplay: this.currencyDisplay,
|
|
362
|
+
minimumFractionDigits: 0,
|
|
363
|
+
maximumFractionDigits: 0,
|
|
364
|
+
roundingMode: this.roundingMode
|
|
365
|
+
});
|
|
366
|
+
return new RegExp("[".concat(e.format(1).replace(/\s/g, "").replace(this._numeral, "").replace(this._group, ""), "]"), "g");
|
|
653
367
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
t.allowsMarkType(h.marks[f].type) || s.step(new b(l, p, h.marks[f]));
|
|
667
|
-
if (n && h.isText && t.whitespace != "pre") {
|
|
668
|
-
let f, d = /\r?\n|\r/g, u;
|
|
669
|
-
for (; f = d.exec(h.text); )
|
|
670
|
-
u || (u = new g(w.from(t.schema.text(" ", t.allowedMarks(h.marks))), 0, 0)), o.push(new v(l + f.index, l + f.index + f[0].length, u));
|
|
368
|
+
return new RegExp("[]", "g");
|
|
369
|
+
},
|
|
370
|
+
getPrefixExpression: function() {
|
|
371
|
+
if (this.prefix)
|
|
372
|
+
this.prefixChar = this.prefix;
|
|
373
|
+
else {
|
|
374
|
+
var e = new Intl.NumberFormat(this.locale, {
|
|
375
|
+
style: this.mode,
|
|
376
|
+
currency: this.currency,
|
|
377
|
+
currencyDisplay: this.currencyDisplay
|
|
378
|
+
});
|
|
379
|
+
this.prefixChar = e.format(1).split("1")[0];
|
|
671
380
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
for (let r = s.depth, n = 0, i = 0; ; --r) {
|
|
688
|
-
let o = s.$from.node(r), l = s.$from.index(r) + n, a = s.$to.indexAfter(r) - i;
|
|
689
|
-
if (r < s.depth && o.canReplace(l, a, t))
|
|
690
|
-
return r;
|
|
691
|
-
if (r == 0 || o.type.spec.isolating || !ce(o, l, a))
|
|
692
|
-
break;
|
|
693
|
-
l && (n = 1), a < o.childCount && (i = 1);
|
|
694
|
-
}
|
|
695
|
-
return null;
|
|
696
|
-
}
|
|
697
|
-
function de(s, e, t) {
|
|
698
|
-
let { $from: r, $to: n, depth: i } = e, o = r.before(i + 1), l = n.after(i + 1), a = o, h = l, p = w.empty, c = 0;
|
|
699
|
-
for (let u = i, m = !1; u > t; u--)
|
|
700
|
-
m || r.index(u) > 0 ? (m = !0, p = w.from(r.node(u).copy(p)), c++) : a--;
|
|
701
|
-
let f = w.empty, d = 0;
|
|
702
|
-
for (let u = i, m = !1; u > t; u--)
|
|
703
|
-
m || n.after(u + 1) < n.end(u) ? (m = !0, f = w.from(n.node(u).copy(f)), d++) : h++;
|
|
704
|
-
s.step(new M(a, h, o, l, new g(p.append(f), c, d), p.size - c, !0));
|
|
705
|
-
}
|
|
706
|
-
function ze(s, e, t = null, r = s) {
|
|
707
|
-
let n = ue(s, e), i = n && me(r, e);
|
|
708
|
-
return i ? n.map(K).concat({ type: e, attrs: t }).concat(i.map(K)) : null;
|
|
709
|
-
}
|
|
710
|
-
function K(s) {
|
|
711
|
-
return { type: s, attrs: null };
|
|
712
|
-
}
|
|
713
|
-
function ue(s, e) {
|
|
714
|
-
let { parent: t, startIndex: r, endIndex: n } = s, i = t.contentMatchAt(r).findWrapping(e);
|
|
715
|
-
if (!i)
|
|
716
|
-
return null;
|
|
717
|
-
let o = i.length ? i[0] : e;
|
|
718
|
-
return t.canReplaceWith(r, n, o) ? i : null;
|
|
719
|
-
}
|
|
720
|
-
function me(s, e) {
|
|
721
|
-
let { parent: t, startIndex: r, endIndex: n } = s, i = t.child(r), o = e.contentMatch.findWrapping(i.type);
|
|
722
|
-
if (!o)
|
|
723
|
-
return null;
|
|
724
|
-
let a = (o.length ? o[o.length - 1] : e).contentMatch;
|
|
725
|
-
for (let h = r; a && h < n; h++)
|
|
726
|
-
a = a.matchType(t.child(h).type);
|
|
727
|
-
return !a || !a.validEnd ? null : o;
|
|
728
|
-
}
|
|
729
|
-
function ge(s, e, t) {
|
|
730
|
-
let r = w.empty;
|
|
731
|
-
for (let o = t.length - 1; o >= 0; o--) {
|
|
732
|
-
if (r.size) {
|
|
733
|
-
let l = t[o].type.contentMatch.matchFragment(r);
|
|
734
|
-
if (!l || !l.validEnd)
|
|
735
|
-
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
736
|
-
}
|
|
737
|
-
r = w.from(t[o].type.create(t[o].attrs, r));
|
|
738
|
-
}
|
|
739
|
-
let n = e.start, i = e.end;
|
|
740
|
-
s.step(new M(n, i, n, i, new g(r, 0, 0), t.length, !0));
|
|
741
|
-
}
|
|
742
|
-
function we(s, e, t, r, n) {
|
|
743
|
-
if (!r.isTextblock)
|
|
744
|
-
throw new RangeError("Type given to setBlockType should be a textblock");
|
|
745
|
-
let i = s.steps.length;
|
|
746
|
-
s.doc.nodesBetween(e, t, (o, l) => {
|
|
747
|
-
let a = typeof n == "function" ? n(o) : n;
|
|
748
|
-
if (o.isTextblock && !o.hasMarkup(r, a) && ye(s.doc, s.mapping.slice(i).map(l), r)) {
|
|
749
|
-
let h = null;
|
|
750
|
-
if (r.schema.linebreakReplacement) {
|
|
751
|
-
let d = r.whitespace == "pre", u = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
|
|
752
|
-
d && !u ? h = !1 : !d && u && (h = !0);
|
|
381
|
+
return new RegExp("".concat(this.escapeRegExp(this.prefixChar || "")), "g");
|
|
382
|
+
},
|
|
383
|
+
getSuffixExpression: function() {
|
|
384
|
+
if (this.suffix)
|
|
385
|
+
this.suffixChar = this.suffix;
|
|
386
|
+
else {
|
|
387
|
+
var e = new Intl.NumberFormat(this.locale, {
|
|
388
|
+
style: this.mode,
|
|
389
|
+
currency: this.currency,
|
|
390
|
+
currencyDisplay: this.currencyDisplay,
|
|
391
|
+
minimumFractionDigits: 0,
|
|
392
|
+
maximumFractionDigits: 0,
|
|
393
|
+
roundingMode: this.roundingMode
|
|
394
|
+
});
|
|
395
|
+
this.suffixChar = e.format(1).split("1")[1];
|
|
753
396
|
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
let a = s.mapping.slice(r).map(t + 1 + i + o.index);
|
|
766
|
-
s.replaceWith(a, a + 1, e.type.schema.linebreakReplacement.create());
|
|
397
|
+
return new RegExp("".concat(this.escapeRegExp(this.suffixChar || "")), "g");
|
|
398
|
+
},
|
|
399
|
+
formatValue: function(e) {
|
|
400
|
+
if (e != null) {
|
|
401
|
+
if (e === "-")
|
|
402
|
+
return e;
|
|
403
|
+
if (this.format) {
|
|
404
|
+
var t = new Intl.NumberFormat(this.locale, this.getOptions()), i = t.format(e);
|
|
405
|
+
return this.prefix && (i = this.prefix + i), this.suffix && (i = i + this.suffix), i;
|
|
406
|
+
}
|
|
407
|
+
return e.toString();
|
|
767
408
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
function ye(s, e, t) {
|
|
781
|
-
let r = s.resolve(e), n = r.index();
|
|
782
|
-
return r.parent.canReplaceWith(n, n + 1, t);
|
|
783
|
-
}
|
|
784
|
-
function ke(s, e, t, r, n) {
|
|
785
|
-
let i = s.doc.nodeAt(e);
|
|
786
|
-
if (!i)
|
|
787
|
-
throw new RangeError("No node at given position");
|
|
788
|
-
t || (t = i.type);
|
|
789
|
-
let o = t.create(r, null, n || i.marks);
|
|
790
|
-
if (i.isLeaf)
|
|
791
|
-
return s.replaceWith(e, e + i.nodeSize, o);
|
|
792
|
-
if (!t.validContent(i.content))
|
|
793
|
-
throw new RangeError("Invalid content for node type " + t.name);
|
|
794
|
-
s.step(new M(e, e + i.nodeSize, e + 1, e + i.nodeSize - 1, new g(w.from(o), 0, 0), 1, !0));
|
|
795
|
-
}
|
|
796
|
-
function Je(s, e, t = 1, r) {
|
|
797
|
-
let n = s.resolve(e), i = n.depth - t, o = r && r[r.length - 1] || n.parent;
|
|
798
|
-
if (i < 0 || n.parent.type.spec.isolating || !n.parent.canReplace(n.index(), n.parent.childCount) || !o.type.validContent(n.parent.content.cutByIndex(n.index(), n.parent.childCount)))
|
|
799
|
-
return !1;
|
|
800
|
-
for (let h = n.depth - 1, p = t - 2; h > i; h--, p--) {
|
|
801
|
-
let c = n.node(h), f = n.index(h);
|
|
802
|
-
if (c.type.spec.isolating)
|
|
803
|
-
return !1;
|
|
804
|
-
let d = c.content.cutByIndex(f, c.childCount), u = r && r[p + 1];
|
|
805
|
-
u && (d = d.replaceChild(0, u.type.create(u.attrs)));
|
|
806
|
-
let m = r && r[p] || c;
|
|
807
|
-
if (!c.canReplace(f + 1, c.childCount) || !m.type.validContent(d))
|
|
808
|
-
return !1;
|
|
809
|
-
}
|
|
810
|
-
let l = n.indexAfter(i), a = r && r[0];
|
|
811
|
-
return n.node(i).canReplaceWith(l, l, a ? a.type : n.node(i + 1).type);
|
|
812
|
-
}
|
|
813
|
-
function ve(s, e, t = 1, r) {
|
|
814
|
-
let n = s.doc.resolve(e), i = w.empty, o = w.empty;
|
|
815
|
-
for (let l = n.depth, a = n.depth - t, h = t - 1; l > a; l--, h--) {
|
|
816
|
-
i = w.from(n.node(l).copy(i));
|
|
817
|
-
let p = r && r[h];
|
|
818
|
-
o = w.from(p ? p.type.create(p.attrs, o) : n.node(l).copy(o));
|
|
819
|
-
}
|
|
820
|
-
s.step(new v(e, e, new g(i.append(o), t, t), !0));
|
|
821
|
-
}
|
|
822
|
-
function Ae(s, e) {
|
|
823
|
-
let t = s.resolve(e), r = t.index();
|
|
824
|
-
return j(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
825
|
-
}
|
|
826
|
-
function xe(s, e) {
|
|
827
|
-
e.content.size || s.type.compatibleContent(e.type);
|
|
828
|
-
let t = s.contentMatchAt(s.childCount), { linebreakReplacement: r } = s.type.schema;
|
|
829
|
-
for (let n = 0; n < e.childCount; n++) {
|
|
830
|
-
let i = e.child(n), o = i.type == r ? s.type.schema.nodes.text : i.type;
|
|
831
|
-
if (t = t.matchType(o), !t || !s.type.allowsMarks(i.marks))
|
|
832
|
-
return !1;
|
|
833
|
-
}
|
|
834
|
-
return t.validEnd;
|
|
835
|
-
}
|
|
836
|
-
function j(s, e) {
|
|
837
|
-
return !!(s && e && !s.isLeaf && xe(s, e));
|
|
838
|
-
}
|
|
839
|
-
function Be(s, e, t = -1) {
|
|
840
|
-
let r = s.resolve(e);
|
|
841
|
-
for (let n = r.depth; ; n--) {
|
|
842
|
-
let i, o, l = r.index(n);
|
|
843
|
-
if (n == r.depth ? (i = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (i = r.node(n + 1), l++, o = r.node(n).maybeChild(l)) : (i = r.node(n).maybeChild(l - 1), o = r.node(n + 1)), i && !i.isTextblock && j(i, o) && r.node(n).canReplace(l, l + 1))
|
|
844
|
-
return e;
|
|
845
|
-
if (n == 0)
|
|
846
|
-
break;
|
|
847
|
-
e = t < 0 ? r.before(n) : r.after(n);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
function Se(s, e, t) {
|
|
851
|
-
let r = null, { linebreakReplacement: n } = s.doc.type.schema, i = s.doc.resolve(e - t), o = i.node().type;
|
|
852
|
-
if (n && o.inlineContent) {
|
|
853
|
-
let p = o.whitespace == "pre", c = !!o.contentMatch.matchType(n);
|
|
854
|
-
p && !c ? r = !1 : !p && c && (r = !0);
|
|
855
|
-
}
|
|
856
|
-
let l = s.steps.length;
|
|
857
|
-
if (r === !1) {
|
|
858
|
-
let p = s.doc.resolve(e + t);
|
|
859
|
-
_(s, p.node(), p.before(), l);
|
|
860
|
-
}
|
|
861
|
-
o.inlineContent && $(s, e + t - 1, o, i.node().contentMatchAt(i.index()), r == null);
|
|
862
|
-
let a = s.mapping.slice(l), h = a.map(e - t);
|
|
863
|
-
if (s.step(new v(h, a.map(e + t, -1), g.empty, !0)), r === !0) {
|
|
864
|
-
let p = s.doc.resolve(h);
|
|
865
|
-
Z(s, p.node(), p.before(), s.steps.length);
|
|
866
|
-
}
|
|
867
|
-
return s;
|
|
868
|
-
}
|
|
869
|
-
function be(s, e, t) {
|
|
870
|
-
let r = s.resolve(e);
|
|
871
|
-
if (r.parent.canReplaceWith(r.index(), r.index(), t))
|
|
872
|
-
return e;
|
|
873
|
-
if (r.parentOffset == 0)
|
|
874
|
-
for (let n = r.depth - 1; n >= 0; n--) {
|
|
875
|
-
let i = r.index(n);
|
|
876
|
-
if (r.node(n).canReplaceWith(i, i, t))
|
|
877
|
-
return r.before(n + 1);
|
|
878
|
-
if (i > 0)
|
|
879
|
-
return null;
|
|
880
|
-
}
|
|
881
|
-
if (r.parentOffset == r.parent.content.size)
|
|
882
|
-
for (let n = r.depth - 1; n >= 0; n--) {
|
|
883
|
-
let i = r.indexAfter(n);
|
|
884
|
-
if (r.node(n).canReplaceWith(i, i, t))
|
|
885
|
-
return r.after(n + 1);
|
|
886
|
-
if (i < r.node(n).childCount)
|
|
887
|
-
return null;
|
|
888
|
-
}
|
|
889
|
-
return null;
|
|
890
|
-
}
|
|
891
|
-
function We(s, e, t) {
|
|
892
|
-
let r = s.resolve(e);
|
|
893
|
-
if (!t.content.size)
|
|
894
|
-
return e;
|
|
895
|
-
let n = t.content;
|
|
896
|
-
for (let i = 0; i < t.openStart; i++)
|
|
897
|
-
n = n.firstChild.content;
|
|
898
|
-
for (let i = 1; i <= (t.openStart == 0 && t.size ? 2 : 1); i++)
|
|
899
|
-
for (let o = r.depth; o >= 0; o--) {
|
|
900
|
-
let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), h = r.node(o), p = !1;
|
|
901
|
-
if (i == 1)
|
|
902
|
-
p = h.canReplace(a, a, n);
|
|
903
|
-
else {
|
|
904
|
-
let c = h.contentMatchAt(a).findWrapping(n.firstChild.type);
|
|
905
|
-
p = c && h.canReplaceWith(a, a, c[0]);
|
|
409
|
+
return "";
|
|
410
|
+
},
|
|
411
|
+
parseValue: function(e) {
|
|
412
|
+
var t = e.replace(this._suffix, "").replace(this._prefix, "").trim().replace(/\s/g, "").replace(this._currency, "").replace(this._group, "").replace(this._minusSign, "-").replace(this._decimal, ".").replace(this._numeral, this._index);
|
|
413
|
+
if (t) {
|
|
414
|
+
if (t === "-")
|
|
415
|
+
return t;
|
|
416
|
+
var i = +t;
|
|
417
|
+
return isNaN(i) ? null : i;
|
|
906
418
|
}
|
|
907
|
-
if (p)
|
|
908
|
-
return l == 0 ? r.pos : l < 0 ? r.before(o + 1) : r.after(o + 1);
|
|
909
|
-
}
|
|
910
|
-
return null;
|
|
911
|
-
}
|
|
912
|
-
function Me(s, e, t = e, r = g.empty) {
|
|
913
|
-
if (e == t && !r.size)
|
|
914
|
-
return null;
|
|
915
|
-
let n = s.resolve(e), i = s.resolve(t);
|
|
916
|
-
return ee(n, i, r) ? new v(e, t, r) : new Ce(n, i, r).fit();
|
|
917
|
-
}
|
|
918
|
-
function ee(s, e, t) {
|
|
919
|
-
return !t.openStart && !t.openEnd && s.start() == e.start() && s.parent.canReplace(s.index(), e.index(), t.content);
|
|
920
|
-
}
|
|
921
|
-
class Ce {
|
|
922
|
-
constructor(e, t, r) {
|
|
923
|
-
this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = w.empty;
|
|
924
|
-
for (let n = 0; n <= e.depth; n++) {
|
|
925
|
-
let i = e.node(n);
|
|
926
|
-
this.frontier.push({
|
|
927
|
-
type: i.type,
|
|
928
|
-
match: i.contentMatchAt(e.indexAfter(n))
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
for (let n = e.depth; n > 0; n--)
|
|
932
|
-
this.placed = w.from(e.node(n).copy(this.placed));
|
|
933
|
-
}
|
|
934
|
-
get depth() {
|
|
935
|
-
return this.frontier.length - 1;
|
|
936
|
-
}
|
|
937
|
-
fit() {
|
|
938
|
-
for (; this.unplaced.size; ) {
|
|
939
|
-
let h = this.findFittable();
|
|
940
|
-
h ? this.placeNodes(h) : this.openMore() || this.dropNode();
|
|
941
|
-
}
|
|
942
|
-
let e = this.mustMoveInline(), t = this.placed.size - this.depth - this.$from.depth, r = this.$from, n = this.close(e < 0 ? this.$to : r.doc.resolve(e));
|
|
943
|
-
if (!n)
|
|
944
419
|
return null;
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
// depths, one for the slice and one for the frontier.
|
|
954
|
-
findFittable() {
|
|
955
|
-
let e = this.unplaced.openStart;
|
|
956
|
-
for (let t = this.unplaced.content, r = 0, n = this.unplaced.openEnd; r < e; r++) {
|
|
957
|
-
let i = t.firstChild;
|
|
958
|
-
if (t.childCount > 1 && (n = 0), i.type.spec.isolating && n <= r) {
|
|
959
|
-
e = r;
|
|
960
|
-
break;
|
|
420
|
+
},
|
|
421
|
+
repeat: function(e, t, i) {
|
|
422
|
+
var r = this;
|
|
423
|
+
if (!this.readonly) {
|
|
424
|
+
var s = t || 500;
|
|
425
|
+
this.clearTimer(), this.timer = setTimeout(function() {
|
|
426
|
+
r.repeat(e, 40, i);
|
|
427
|
+
}, s), this.spin(e, i);
|
|
961
428
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
429
|
+
},
|
|
430
|
+
spin: function(e, t) {
|
|
431
|
+
if (this.$refs.input) {
|
|
432
|
+
var i = this.step * t, r = this.parseValue(this.$refs.input.$el.value) || 0, s = this.validateValue(r + i);
|
|
433
|
+
this.updateInput(s, null, "spin"), this.updateModel(e, s), this.handleOnInput(e, r, s);
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
onUpButtonMouseDown: function(e) {
|
|
437
|
+
this.disabled || (this.$refs.input.$el.focus(), this.repeat(e, null, 1), e.preventDefault());
|
|
438
|
+
},
|
|
439
|
+
onUpButtonMouseUp: function() {
|
|
440
|
+
this.disabled || this.clearTimer();
|
|
441
|
+
},
|
|
442
|
+
onUpButtonMouseLeave: function() {
|
|
443
|
+
this.disabled || this.clearTimer();
|
|
444
|
+
},
|
|
445
|
+
onUpButtonKeyUp: function() {
|
|
446
|
+
this.disabled || this.clearTimer();
|
|
447
|
+
},
|
|
448
|
+
onUpButtonKeyDown: function(e) {
|
|
449
|
+
(e.code === "Space" || e.code === "Enter" || e.code === "NumpadEnter") && this.repeat(e, null, 1);
|
|
450
|
+
},
|
|
451
|
+
onDownButtonMouseDown: function(e) {
|
|
452
|
+
this.disabled || (this.$refs.input.$el.focus(), this.repeat(e, null, -1), e.preventDefault());
|
|
453
|
+
},
|
|
454
|
+
onDownButtonMouseUp: function() {
|
|
455
|
+
this.disabled || this.clearTimer();
|
|
456
|
+
},
|
|
457
|
+
onDownButtonMouseLeave: function() {
|
|
458
|
+
this.disabled || this.clearTimer();
|
|
459
|
+
},
|
|
460
|
+
onDownButtonKeyUp: function() {
|
|
461
|
+
this.disabled || this.clearTimer();
|
|
462
|
+
},
|
|
463
|
+
onDownButtonKeyDown: function(e) {
|
|
464
|
+
(e.code === "Space" || e.code === "Enter" || e.code === "NumpadEnter") && this.repeat(e, null, -1);
|
|
465
|
+
},
|
|
466
|
+
onUserInput: function() {
|
|
467
|
+
this.isSpecialChar && (this.$refs.input.$el.value = this.lastValue), this.isSpecialChar = !1;
|
|
468
|
+
},
|
|
469
|
+
onInputKeyDown: function(e) {
|
|
470
|
+
if (!this.readonly) {
|
|
471
|
+
if (e.altKey || e.ctrlKey || e.metaKey) {
|
|
472
|
+
this.isSpecialChar = !0, this.lastValue = this.$refs.input.$el.value;
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
this.lastValue = e.target.value;
|
|
476
|
+
var t = e.target.selectionStart, i = e.target.selectionEnd, r = e.target.value, s = null;
|
|
477
|
+
switch (e.code) {
|
|
478
|
+
case "ArrowUp":
|
|
479
|
+
this.spin(e, 1), e.preventDefault();
|
|
480
|
+
break;
|
|
481
|
+
case "ArrowDown":
|
|
482
|
+
this.spin(e, -1), e.preventDefault();
|
|
483
|
+
break;
|
|
484
|
+
case "ArrowLeft":
|
|
485
|
+
this.isNumeralChar(r.charAt(t - 1)) || e.preventDefault();
|
|
486
|
+
break;
|
|
487
|
+
case "ArrowRight":
|
|
488
|
+
this.isNumeralChar(r.charAt(t)) || e.preventDefault();
|
|
489
|
+
break;
|
|
490
|
+
case "Tab":
|
|
491
|
+
case "Enter":
|
|
492
|
+
case "NumpadEnter":
|
|
493
|
+
s = this.validateValue(this.parseValue(r)), this.$refs.input.$el.value = this.formatValue(s), this.$refs.input.$el.setAttribute("aria-valuenow", s), this.updateModel(e, s);
|
|
494
|
+
break;
|
|
495
|
+
case "Backspace": {
|
|
496
|
+
if (e.preventDefault(), t === i) {
|
|
497
|
+
var u = r.charAt(t - 1), a = this.getDecimalCharIndexes(r), h = a.decimalCharIndex, c = a.decimalCharIndexWithoutPrefix;
|
|
498
|
+
if (this.isNumeralChar(u)) {
|
|
499
|
+
var g = this.getDecimalLength(r);
|
|
500
|
+
if (this._group.test(u))
|
|
501
|
+
this._group.lastIndex = 0, s = r.slice(0, t - 2) + r.slice(t - 1);
|
|
502
|
+
else if (this._decimal.test(u))
|
|
503
|
+
this._decimal.lastIndex = 0, g ? this.$refs.input.$el.setSelectionRange(t - 1, t - 1) : s = r.slice(0, t - 1) + r.slice(t);
|
|
504
|
+
else if (h > 0 && t > h) {
|
|
505
|
+
var l = this.isDecimalMode() && (this.minFractionDigits || 0) < g ? "" : "0";
|
|
506
|
+
s = r.slice(0, t - 1) + l + r.slice(t);
|
|
507
|
+
} else c === 1 ? (s = r.slice(0, t - 1) + "0" + r.slice(t), s = this.parseValue(s) > 0 ? s : "") : s = r.slice(0, t - 1) + r.slice(t);
|
|
508
|
+
}
|
|
509
|
+
this.updateValue(e, s, null, "delete-single");
|
|
510
|
+
} else
|
|
511
|
+
s = this.deleteRange(r, t, i), this.updateValue(e, s, null, "delete-range");
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
case "Delete":
|
|
515
|
+
if (e.preventDefault(), t === i) {
|
|
516
|
+
var f = r.charAt(t), o = this.getDecimalCharIndexes(r), y = o.decimalCharIndex, b = o.decimalCharIndexWithoutPrefix;
|
|
517
|
+
if (this.isNumeralChar(f)) {
|
|
518
|
+
var d = this.getDecimalLength(r);
|
|
519
|
+
if (this._group.test(f))
|
|
520
|
+
this._group.lastIndex = 0, s = r.slice(0, t) + r.slice(t + 2);
|
|
521
|
+
else if (this._decimal.test(f))
|
|
522
|
+
this._decimal.lastIndex = 0, d ? this.$refs.input.$el.setSelectionRange(t + 1, t + 1) : s = r.slice(0, t) + r.slice(t + 1);
|
|
523
|
+
else if (y > 0 && t > y) {
|
|
524
|
+
var B = this.isDecimalMode() && (this.minFractionDigits || 0) < d ? "" : "0";
|
|
525
|
+
s = r.slice(0, t) + B + r.slice(t + 1);
|
|
526
|
+
} else b === 1 ? (s = r.slice(0, t) + "0" + r.slice(t + 1), s = this.parseValue(s) > 0 ? s : "") : s = r.slice(0, t) + r.slice(t + 1);
|
|
527
|
+
}
|
|
528
|
+
this.updateValue(e, s, null, "delete-back-single");
|
|
529
|
+
} else
|
|
530
|
+
s = this.deleteRange(r, t, i), this.updateValue(e, s, null, "delete-range");
|
|
531
|
+
break;
|
|
532
|
+
case "Home":
|
|
533
|
+
e.preventDefault(), k.isEmpty(this.min) || this.updateModel(e, this.min);
|
|
534
|
+
break;
|
|
535
|
+
case "End":
|
|
536
|
+
e.preventDefault(), k.isEmpty(this.max) || this.updateModel(e, this.max);
|
|
976
537
|
break;
|
|
977
538
|
}
|
|
978
539
|
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
for (; this.depth > t; )
|
|
997
|
-
this.closeFrontierNode();
|
|
998
|
-
if (i)
|
|
999
|
-
for (let m = 0; m < i.length; m++)
|
|
1000
|
-
this.openFrontierNode(i[m]);
|
|
1001
|
-
let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, h = 0, p = [], { match: c, type: f } = this.frontier[t];
|
|
1002
|
-
if (n) {
|
|
1003
|
-
for (let m = 0; m < n.childCount; m++)
|
|
1004
|
-
p.push(n.child(m));
|
|
1005
|
-
c = c.matchFragment(n);
|
|
1006
|
-
}
|
|
1007
|
-
let d = l.size + e - (o.content.size - o.openEnd);
|
|
1008
|
-
for (; h < l.childCount; ) {
|
|
1009
|
-
let m = l.child(h), x = c.matchType(m.type);
|
|
1010
|
-
if (!x)
|
|
1011
|
-
break;
|
|
1012
|
-
h++, (h > 1 || a == 0 || m.content.size) && (c = x, p.push(te(m.mark(f.allowedMarks(m.marks)), h == 1 ? a : 0, h == l.childCount ? d : -1)));
|
|
1013
|
-
}
|
|
1014
|
-
let u = h == l.childCount;
|
|
1015
|
-
u || (d = -1), this.placed = F(this.placed, t, w.from(p)), this.frontier[t].match = c, u && d < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
1016
|
-
for (let m = 0, x = l; m < d; m++) {
|
|
1017
|
-
let I = x.lastChild;
|
|
1018
|
-
this.frontier.push({ type: I.type, match: I.contentMatchAt(I.childCount) }), x = I.content;
|
|
1019
|
-
}
|
|
1020
|
-
this.unplaced = u ? e == 0 ? g.empty : new g(O(o.content, e - 1, 1), e - 1, d < 0 ? o.openEnd : e - 1) : new g(O(o.content, e, h), o.openStart, o.openEnd);
|
|
1021
|
-
}
|
|
1022
|
-
mustMoveInline() {
|
|
1023
|
-
if (!this.$to.parent.isTextblock)
|
|
1024
|
-
return -1;
|
|
1025
|
-
let e = this.frontier[this.depth], t;
|
|
1026
|
-
if (!e.type.isTextblock || !D(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
1027
|
-
return -1;
|
|
1028
|
-
let { depth: r } = this.$to, n = this.$to.after(r);
|
|
1029
|
-
for (; r > 1 && n == this.$to.end(--r); )
|
|
1030
|
-
++n;
|
|
1031
|
-
return n;
|
|
1032
|
-
}
|
|
1033
|
-
findCloseLevel(e) {
|
|
1034
|
-
e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
1035
|
-
let { match: r, type: n } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = D(e, t, n, r, i);
|
|
1036
|
-
if (o) {
|
|
1037
|
-
for (let l = t - 1; l >= 0; l--) {
|
|
1038
|
-
let { match: a, type: h } = this.frontier[l], p = D(e, l, h, a, !0);
|
|
1039
|
-
if (!p || p.childCount)
|
|
1040
|
-
continue e;
|
|
540
|
+
},
|
|
541
|
+
onInputKeyPress: function(e) {
|
|
542
|
+
if (!this.readonly) {
|
|
543
|
+
var t = e.key, i = this.isDecimalSign(t), r = this.isMinusSign(t);
|
|
544
|
+
this.locale === "fr-FR" && (e.code === "Comma" || e.code === "NumpadDecimal") && !i && (i = !0, t = decimalSign), e.code !== "Enter" && e.preventDefault(), (Number(t) >= 0 && Number(t) <= 9 || r || i) && this.insert(e, t, {
|
|
545
|
+
isDecimalSign: i,
|
|
546
|
+
isMinusSign: r
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
onPaste: function(e) {
|
|
551
|
+
if (!(this.readonly || this.disabled)) {
|
|
552
|
+
e.preventDefault();
|
|
553
|
+
var t = (e.clipboardData || window.clipboardData).getData("Text");
|
|
554
|
+
if (t) {
|
|
555
|
+
var i = this.parseValue(t);
|
|
556
|
+
i != null && this.insert(e, i.toString());
|
|
1041
557
|
}
|
|
1042
|
-
return { depth: t, fit: o, move: i ? e.doc.resolve(e.after(t + 1)) : e };
|
|
1043
558
|
}
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
return
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
this.
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
if (!r.size)
|
|
1103
|
-
return s.deleteRange(e, t);
|
|
1104
|
-
let n = s.doc.resolve(e), i = s.doc.resolve(t);
|
|
1105
|
-
if (ee(n, i, r))
|
|
1106
|
-
return s.step(new v(e, t, r));
|
|
1107
|
-
let o = ne(n, i);
|
|
1108
|
-
o[o.length - 1] == 0 && o.pop();
|
|
1109
|
-
let l = -(n.depth + 1);
|
|
1110
|
-
o.unshift(l);
|
|
1111
|
-
for (let f = n.depth, d = n.pos - 1; f > 0; f--, d--) {
|
|
1112
|
-
let u = n.node(f).type.spec;
|
|
1113
|
-
if (u.defining || u.definingAsContext || u.isolating)
|
|
1114
|
-
break;
|
|
1115
|
-
o.indexOf(f) > -1 ? l = f : n.before(f) == d && o.splice(1, 0, -f);
|
|
1116
|
-
}
|
|
1117
|
-
let a = o.indexOf(l), h = [], p = r.openStart;
|
|
1118
|
-
for (let f = r.content, d = 0; ; d++) {
|
|
1119
|
-
let u = f.firstChild;
|
|
1120
|
-
if (h.push(u), d == r.openStart)
|
|
1121
|
-
break;
|
|
1122
|
-
f = u.content;
|
|
1123
|
-
}
|
|
1124
|
-
for (let f = p - 1; f >= 0; f--) {
|
|
1125
|
-
let d = h[f], u = Ie(d.type);
|
|
1126
|
-
if (u && !d.sameMarkup(n.node(Math.abs(l) - 1)))
|
|
1127
|
-
p = f;
|
|
1128
|
-
else if (u || !d.type.isTextblock)
|
|
1129
|
-
break;
|
|
1130
|
-
}
|
|
1131
|
-
for (let f = r.openStart; f >= 0; f--) {
|
|
1132
|
-
let d = (f + p + 1) % (r.openStart + 1), u = h[d];
|
|
1133
|
-
if (u)
|
|
1134
|
-
for (let m = 0; m < o.length; m++) {
|
|
1135
|
-
let x = o[(m + a) % o.length], I = !0;
|
|
1136
|
-
x < 0 && (I = !1, x = -x);
|
|
1137
|
-
let ie = n.node(x - 1), G = n.index(x - 1);
|
|
1138
|
-
if (ie.canReplaceWith(G, G, u.type, u.marks))
|
|
1139
|
-
return s.replace(n.before(x), I ? i.after(x) : t, new g(re(r.content, 0, r.openStart, d), d, r.openEnd));
|
|
559
|
+
},
|
|
560
|
+
allowMinusSign: function() {
|
|
561
|
+
return this.min === null || this.min < 0;
|
|
562
|
+
},
|
|
563
|
+
isMinusSign: function(e) {
|
|
564
|
+
return this._minusSign.test(e) || e === "-" ? (this._minusSign.lastIndex = 0, !0) : !1;
|
|
565
|
+
},
|
|
566
|
+
isDecimalSign: function(e) {
|
|
567
|
+
return this._decimal.test(e) ? (this._decimal.lastIndex = 0, !0) : !1;
|
|
568
|
+
},
|
|
569
|
+
isDecimalMode: function() {
|
|
570
|
+
return this.mode === "decimal";
|
|
571
|
+
},
|
|
572
|
+
getDecimalCharIndexes: function(e) {
|
|
573
|
+
var t = e.search(this._decimal);
|
|
574
|
+
this._decimal.lastIndex = 0;
|
|
575
|
+
var i = e.replace(this._prefix, "").trim().replace(/\s/g, "").replace(this._currency, ""), r = i.search(this._decimal);
|
|
576
|
+
return this._decimal.lastIndex = 0, {
|
|
577
|
+
decimalCharIndex: t,
|
|
578
|
+
decimalCharIndexWithoutPrefix: r
|
|
579
|
+
};
|
|
580
|
+
},
|
|
581
|
+
getCharIndexes: function(e) {
|
|
582
|
+
var t = e.search(this._decimal);
|
|
583
|
+
this._decimal.lastIndex = 0;
|
|
584
|
+
var i = e.search(this._minusSign);
|
|
585
|
+
this._minusSign.lastIndex = 0;
|
|
586
|
+
var r = e.search(this._suffix);
|
|
587
|
+
this._suffix.lastIndex = 0;
|
|
588
|
+
var s = e.search(this._currency);
|
|
589
|
+
return this._currency.lastIndex = 0, {
|
|
590
|
+
decimalCharIndex: t,
|
|
591
|
+
minusCharIndex: i,
|
|
592
|
+
suffixCharIndex: r,
|
|
593
|
+
currencyCharIndex: s
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
insert: function(e, t) {
|
|
597
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
598
|
+
isDecimalSign: !1,
|
|
599
|
+
isMinusSign: !1
|
|
600
|
+
}, r = t.search(this._minusSign);
|
|
601
|
+
if (this._minusSign.lastIndex = 0, !(!this.allowMinusSign() && r !== -1)) {
|
|
602
|
+
var s = this.$refs.input.$el.selectionStart, u = this.$refs.input.$el.selectionEnd, a = this.$refs.input.$el.value.trim(), h = this.getCharIndexes(a), c = h.decimalCharIndex, g = h.minusCharIndex, l = h.suffixCharIndex, f = h.currencyCharIndex, o;
|
|
603
|
+
if (i.isMinusSign)
|
|
604
|
+
s === 0 && (o = a, (g === -1 || u !== 0) && (o = this.insertText(a, t, 0, u)), this.updateValue(e, o, t, "insert"));
|
|
605
|
+
else if (i.isDecimalSign)
|
|
606
|
+
c > 0 && s === c ? this.updateValue(e, a, t, "insert") : c > s && c < u ? (o = this.insertText(a, t, s, u), this.updateValue(e, o, t, "insert")) : c === -1 && this.maxFractionDigits && (o = this.insertText(a, t, s, u), this.updateValue(e, o, t, "insert"));
|
|
607
|
+
else {
|
|
608
|
+
var y = this.numberFormat.resolvedOptions().maximumFractionDigits, b = s !== u ? "range-insert" : "insert";
|
|
609
|
+
if (c > 0 && s > c) {
|
|
610
|
+
if (s + t.length - (c + 1) <= y) {
|
|
611
|
+
var d = f >= s ? f - 1 : l >= s ? l : a.length;
|
|
612
|
+
o = a.slice(0, s) + t + a.slice(s + t.length, d) + a.slice(d), this.updateValue(e, o, t, b);
|
|
613
|
+
}
|
|
614
|
+
} else
|
|
615
|
+
o = this.insertText(a, t, s, u), this.updateValue(e, o, t, b);
|
|
616
|
+
}
|
|
1140
617
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
apply(e) {
|
|
1198
|
-
let t = e.nodeAt(this.pos);
|
|
1199
|
-
if (!t)
|
|
1200
|
-
return y.fail("No node at attribute step's position");
|
|
1201
|
-
let r = /* @__PURE__ */ Object.create(null);
|
|
1202
|
-
for (let i in t.attrs)
|
|
1203
|
-
r[i] = t.attrs[i];
|
|
1204
|
-
r[this.attr] = this.value;
|
|
1205
|
-
let n = t.type.create(r, null, t.marks);
|
|
1206
|
-
return y.fromReplace(e, this.pos, this.pos + 1, new g(w.from(n), 0, t.isLeaf ? 0 : 1));
|
|
1207
|
-
}
|
|
1208
|
-
getMap() {
|
|
1209
|
-
return S.empty;
|
|
1210
|
-
}
|
|
1211
|
-
invert(e) {
|
|
1212
|
-
return new E(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
1213
|
-
}
|
|
1214
|
-
map(e) {
|
|
1215
|
-
let t = e.mapResult(this.pos, 1);
|
|
1216
|
-
return t.deletedAfter ? null : new E(t.pos, this.attr, this.value);
|
|
1217
|
-
}
|
|
1218
|
-
toJSON() {
|
|
1219
|
-
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
1220
|
-
}
|
|
1221
|
-
static fromJSON(e, t) {
|
|
1222
|
-
if (typeof t.pos != "number" || typeof t.attr != "string")
|
|
1223
|
-
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
1224
|
-
return new E(t.pos, t.attr, t.value);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
k.jsonID("attr", E);
|
|
1228
|
-
class z extends k {
|
|
1229
|
-
/**
|
|
1230
|
-
Construct an attribute step.
|
|
1231
|
-
*/
|
|
1232
|
-
constructor(e, t) {
|
|
1233
|
-
super(), this.attr = e, this.value = t;
|
|
1234
|
-
}
|
|
1235
|
-
apply(e) {
|
|
1236
|
-
let t = /* @__PURE__ */ Object.create(null);
|
|
1237
|
-
for (let n in e.attrs)
|
|
1238
|
-
t[n] = e.attrs[n];
|
|
1239
|
-
t[this.attr] = this.value;
|
|
1240
|
-
let r = e.type.create(t, e.content, e.marks);
|
|
1241
|
-
return y.ok(r);
|
|
1242
|
-
}
|
|
1243
|
-
getMap() {
|
|
1244
|
-
return S.empty;
|
|
1245
|
-
}
|
|
1246
|
-
invert(e) {
|
|
1247
|
-
return new z(this.attr, e.attrs[this.attr]);
|
|
1248
|
-
}
|
|
1249
|
-
map(e) {
|
|
1250
|
-
return this;
|
|
1251
|
-
}
|
|
1252
|
-
toJSON() {
|
|
1253
|
-
return { stepType: "docAttr", attr: this.attr, value: this.value };
|
|
1254
|
-
}
|
|
1255
|
-
static fromJSON(e, t) {
|
|
1256
|
-
if (typeof t.attr != "string")
|
|
1257
|
-
throw new RangeError("Invalid input for DocAttrStep.fromJSON");
|
|
1258
|
-
return new z(t.attr, t.value);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
k.jsonID("docAttr", z);
|
|
1262
|
-
let T = class extends Error {
|
|
1263
|
-
};
|
|
1264
|
-
T = function s(e) {
|
|
1265
|
-
let t = Error.call(this, e);
|
|
1266
|
-
return t.__proto__ = s.prototype, t;
|
|
1267
|
-
};
|
|
1268
|
-
T.prototype = Object.create(Error.prototype);
|
|
1269
|
-
T.prototype.constructor = T;
|
|
1270
|
-
T.prototype.name = "TransformError";
|
|
1271
|
-
class De {
|
|
1272
|
-
/**
|
|
1273
|
-
Create a transform that starts with the given document.
|
|
1274
|
-
*/
|
|
1275
|
-
constructor(e) {
|
|
1276
|
-
this.doc = e, this.steps = [], this.docs = [], this.mapping = new A();
|
|
1277
|
-
}
|
|
1278
|
-
/**
|
|
1279
|
-
The starting document.
|
|
1280
|
-
*/
|
|
1281
|
-
get before() {
|
|
1282
|
-
return this.docs.length ? this.docs[0] : this.doc;
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
Apply a new step in this transform, saving the result. Throws an
|
|
1286
|
-
error when the step fails.
|
|
1287
|
-
*/
|
|
1288
|
-
step(e) {
|
|
1289
|
-
let t = this.maybeStep(e);
|
|
1290
|
-
if (t.failed)
|
|
1291
|
-
throw new T(t.failed);
|
|
1292
|
-
return this;
|
|
1293
|
-
}
|
|
1294
|
-
/**
|
|
1295
|
-
Try to apply a step in this transformation, ignoring it if it
|
|
1296
|
-
fails. Returns the step result.
|
|
1297
|
-
*/
|
|
1298
|
-
maybeStep(e) {
|
|
1299
|
-
let t = e.apply(this.doc);
|
|
1300
|
-
return t.failed || this.addStep(e, t.doc), t;
|
|
1301
|
-
}
|
|
1302
|
-
/**
|
|
1303
|
-
True when the document has been changed (when there are any
|
|
1304
|
-
steps).
|
|
1305
|
-
*/
|
|
1306
|
-
get docChanged() {
|
|
1307
|
-
return this.steps.length > 0;
|
|
1308
|
-
}
|
|
1309
|
-
/**
|
|
1310
|
-
Return a single range, in post-transform document positions,
|
|
1311
|
-
that covers all content changed by this transform. Returns null
|
|
1312
|
-
if no replacements are made. Note that this will ignore changes
|
|
1313
|
-
that add/remove marks without replacing the underlying content.
|
|
1314
|
-
*/
|
|
1315
|
-
changedRange() {
|
|
1316
|
-
let e = 1e9, t = -1e9;
|
|
1317
|
-
for (let r = 0; r < this.mapping.maps.length; r++) {
|
|
1318
|
-
let n = this.mapping.maps[r];
|
|
1319
|
-
r && (e = n.map(e, 1), t = n.map(t, -1)), n.forEach((i, o, l, a) => {
|
|
1320
|
-
e = Math.min(e, l), t = Math.max(t, a);
|
|
618
|
+
},
|
|
619
|
+
insertText: function(e, t, i, r) {
|
|
620
|
+
var s = t === "." ? t : t.split(".");
|
|
621
|
+
if (s.length === 2) {
|
|
622
|
+
var u = e.slice(i, r).search(this._decimal);
|
|
623
|
+
return this._decimal.lastIndex = 0, u > 0 ? e.slice(0, i) + this.formatValue(t) + e.slice(r) : this.formatValue(t) || e;
|
|
624
|
+
} else return r - i === e.length ? this.formatValue(t) : i === 0 ? t + e.slice(r) : r === e.length ? e.slice(0, i) + t : e.slice(0, i) + t + e.slice(r);
|
|
625
|
+
},
|
|
626
|
+
deleteRange: function(e, t, i) {
|
|
627
|
+
var r;
|
|
628
|
+
return i - t === e.length ? r = "" : t === 0 ? r = e.slice(i) : i === e.length ? r = e.slice(0, t) : r = e.slice(0, t) + e.slice(i), r;
|
|
629
|
+
},
|
|
630
|
+
initCursor: function() {
|
|
631
|
+
var e = this.$refs.input.$el.selectionStart, t = this.$refs.input.$el.value, i = t.length, r = null, s = (this.prefixChar || "").length;
|
|
632
|
+
t = t.replace(this._prefix, ""), e = e - s;
|
|
633
|
+
var u = t.charAt(e);
|
|
634
|
+
if (this.isNumeralChar(u))
|
|
635
|
+
return e + s;
|
|
636
|
+
for (var a = e - 1; a >= 0; )
|
|
637
|
+
if (u = t.charAt(a), this.isNumeralChar(u)) {
|
|
638
|
+
r = a + s;
|
|
639
|
+
break;
|
|
640
|
+
} else
|
|
641
|
+
a--;
|
|
642
|
+
if (r !== null)
|
|
643
|
+
this.$refs.input.$el.setSelectionRange(r + 1, r + 1);
|
|
644
|
+
else {
|
|
645
|
+
for (a = e; a < i; )
|
|
646
|
+
if (u = t.charAt(a), this.isNumeralChar(u)) {
|
|
647
|
+
r = a + s;
|
|
648
|
+
break;
|
|
649
|
+
} else
|
|
650
|
+
a++;
|
|
651
|
+
r !== null && this.$refs.input.$el.setSelectionRange(r, r);
|
|
652
|
+
}
|
|
653
|
+
return r || 0;
|
|
654
|
+
},
|
|
655
|
+
onInputClick: function() {
|
|
656
|
+
var e = this.$refs.input.$el.value;
|
|
657
|
+
!this.readonly && e !== C.getSelection() && this.initCursor();
|
|
658
|
+
},
|
|
659
|
+
isNumeralChar: function(e) {
|
|
660
|
+
return e.length === 1 && (this._numeral.test(e) || this._decimal.test(e) || this._group.test(e) || this._minusSign.test(e)) ? (this.resetRegex(), !0) : !1;
|
|
661
|
+
},
|
|
662
|
+
resetRegex: function() {
|
|
663
|
+
this._numeral.lastIndex = 0, this._decimal.lastIndex = 0, this._group.lastIndex = 0, this._minusSign.lastIndex = 0;
|
|
664
|
+
},
|
|
665
|
+
updateValue: function(e, t, i, r) {
|
|
666
|
+
var s = this.$refs.input.$el.value, u = null;
|
|
667
|
+
t != null && (u = this.parseValue(t), u = !u && !this.allowEmpty ? 0 : u, this.updateInput(u, i, r, t), this.handleOnInput(e, s, u));
|
|
668
|
+
},
|
|
669
|
+
handleOnInput: function(e, t, i) {
|
|
670
|
+
this.isValueChanged(t, i) && this.$emit("input", {
|
|
671
|
+
originalEvent: e,
|
|
672
|
+
value: i,
|
|
673
|
+
formattedValue: t
|
|
1321
674
|
});
|
|
675
|
+
},
|
|
676
|
+
isValueChanged: function(e, t) {
|
|
677
|
+
if (t === null && e !== null)
|
|
678
|
+
return !0;
|
|
679
|
+
if (t != null) {
|
|
680
|
+
var i = typeof e == "string" ? this.parseValue(e) : e;
|
|
681
|
+
return t !== i;
|
|
682
|
+
}
|
|
683
|
+
return !1;
|
|
684
|
+
},
|
|
685
|
+
validateValue: function(e) {
|
|
686
|
+
return e === "-" || e == null ? null : this.min != null && e < this.min ? this.min : this.max != null && e > this.max ? this.max : e;
|
|
687
|
+
},
|
|
688
|
+
updateInput: function(e, t, i, r) {
|
|
689
|
+
t = t || "";
|
|
690
|
+
var s = this.$refs.input.$el.value, u = this.formatValue(e), a = s.length;
|
|
691
|
+
if (u !== r && (u = this.concatValues(u, r)), a === 0) {
|
|
692
|
+
this.$refs.input.$el.value = u, this.$refs.input.$el.setSelectionRange(0, 0);
|
|
693
|
+
var h = this.initCursor(), c = h + t.length;
|
|
694
|
+
this.$refs.input.$el.setSelectionRange(c, c);
|
|
695
|
+
} else {
|
|
696
|
+
var g = this.$refs.input.$el.selectionStart, l = this.$refs.input.$el.selectionEnd;
|
|
697
|
+
this.$refs.input.$el.value = u;
|
|
698
|
+
var f = u.length;
|
|
699
|
+
if (i === "range-insert") {
|
|
700
|
+
var o = this.parseValue((s || "").slice(0, g)), y = o !== null ? o.toString() : "", b = y.split("").join("(".concat(this.groupChar, ")?")), d = new RegExp(b, "g");
|
|
701
|
+
d.test(u);
|
|
702
|
+
var B = t.split("").join("(".concat(this.groupChar, ")?")), P = new RegExp(B, "g");
|
|
703
|
+
P.test(u.slice(d.lastIndex)), l = d.lastIndex + P.lastIndex, this.$refs.input.$el.setSelectionRange(l, l);
|
|
704
|
+
} else if (f === a)
|
|
705
|
+
i === "insert" || i === "delete-back-single" ? this.$refs.input.$el.setSelectionRange(l + 1, l + 1) : i === "delete-single" ? this.$refs.input.$el.setSelectionRange(l - 1, l - 1) : (i === "delete-range" || i === "spin") && this.$refs.input.$el.setSelectionRange(l, l);
|
|
706
|
+
else if (i === "delete-back-single") {
|
|
707
|
+
var T = s.charAt(l - 1), K = s.charAt(l), F = a - f, N = this._group.test(K);
|
|
708
|
+
N && F === 1 ? l += 1 : !N && this.isNumeralChar(T) && (l += -1 * F + 1), this._group.lastIndex = 0, this.$refs.input.$el.setSelectionRange(l, l);
|
|
709
|
+
} else if (s === "-" && i === "insert") {
|
|
710
|
+
this.$refs.input.$el.setSelectionRange(0, 0);
|
|
711
|
+
var L = this.initCursor(), E = L + t.length + 1;
|
|
712
|
+
this.$refs.input.$el.setSelectionRange(E, E);
|
|
713
|
+
} else
|
|
714
|
+
l = l + (f - a), this.$refs.input.$el.setSelectionRange(l, l);
|
|
715
|
+
}
|
|
716
|
+
this.$refs.input.$el.setAttribute("aria-valuenow", e);
|
|
717
|
+
},
|
|
718
|
+
concatValues: function(e, t) {
|
|
719
|
+
if (e && t) {
|
|
720
|
+
var i = t.search(this._decimal);
|
|
721
|
+
return this._decimal.lastIndex = 0, this.suffixChar ? i !== -1 ? e.replace(this.suffixChar, "").split(this._decimal)[0] + t.replace(this.suffixChar, "").slice(i) + this.suffixChar : e : i !== -1 ? e.split(this._decimal)[0] + t.slice(i) : e;
|
|
722
|
+
}
|
|
723
|
+
return e;
|
|
724
|
+
},
|
|
725
|
+
getDecimalLength: function(e) {
|
|
726
|
+
if (e) {
|
|
727
|
+
var t = e.split(this._decimal);
|
|
728
|
+
if (t.length === 2)
|
|
729
|
+
return t[1].replace(this._suffix, "").trim().replace(/\s/g, "").replace(this._currency, "").length;
|
|
730
|
+
}
|
|
731
|
+
return 0;
|
|
732
|
+
},
|
|
733
|
+
updateModel: function(e, t) {
|
|
734
|
+
this.d_modelValue = t, this.$emit("update:modelValue", t);
|
|
735
|
+
},
|
|
736
|
+
onInputFocus: function(e) {
|
|
737
|
+
this.focused = !0, !this.disabled && !this.readonly && this.$refs.input.$el.value !== C.getSelection() && this.highlightOnFocus && e.target.select(), this.$emit("focus", e);
|
|
738
|
+
},
|
|
739
|
+
onInputBlur: function(e) {
|
|
740
|
+
this.focused = !1;
|
|
741
|
+
var t = e.target, i = this.validateValue(this.parseValue(t.value));
|
|
742
|
+
this.$emit("blur", {
|
|
743
|
+
originalEvent: e,
|
|
744
|
+
value: t.value
|
|
745
|
+
}), t.value = this.formatValue(i), t.setAttribute("aria-valuenow", i), this.updateModel(e, i), !this.disabled && !this.readonly && this.highlightOnFocus && C.clearSelection();
|
|
746
|
+
},
|
|
747
|
+
clearTimer: function() {
|
|
748
|
+
this.timer && clearInterval(this.timer);
|
|
749
|
+
},
|
|
750
|
+
maxBoundry: function() {
|
|
751
|
+
return this.d_modelValue >= this.max;
|
|
752
|
+
},
|
|
753
|
+
minBoundry: function() {
|
|
754
|
+
return this.d_modelValue <= this.min;
|
|
1322
755
|
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
range, and is useful in situations where you need more precise
|
|
1375
|
-
control over what happens.
|
|
1376
|
-
*/
|
|
1377
|
-
replaceRange(e, t, r) {
|
|
1378
|
-
return Re(this, e, t, r), this;
|
|
1379
|
-
}
|
|
1380
|
-
/**
|
|
1381
|
-
Replace the given range with a node, but use `from` and `to` as
|
|
1382
|
-
hints, rather than precise positions. When from and to are the same
|
|
1383
|
-
and are at the start or end of a parent node in which the given
|
|
1384
|
-
node doesn't fit, this method may _move_ them out towards a parent
|
|
1385
|
-
that does allow the given node to be placed. When the given range
|
|
1386
|
-
completely covers a parent node, this method may completely replace
|
|
1387
|
-
that parent node.
|
|
1388
|
-
*/
|
|
1389
|
-
replaceRangeWith(e, t, r) {
|
|
1390
|
-
return Ee(this, e, t, r), this;
|
|
1391
|
-
}
|
|
1392
|
-
/**
|
|
1393
|
-
Delete the given range, expanding it to cover fully covered
|
|
1394
|
-
parent nodes until a valid replace is found.
|
|
1395
|
-
*/
|
|
1396
|
-
deleteRange(e, t) {
|
|
1397
|
-
return Te(this, e, t), this;
|
|
1398
|
-
}
|
|
1399
|
-
/**
|
|
1400
|
-
Split the content in the given range off from its parent, if there
|
|
1401
|
-
is sibling content before or after it, and move it up the tree to
|
|
1402
|
-
the depth specified by `target`. You'll probably want to use
|
|
1403
|
-
[`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make
|
|
1404
|
-
sure the lift is valid.
|
|
1405
|
-
*/
|
|
1406
|
-
lift(e, t) {
|
|
1407
|
-
return de(this, e, t), this;
|
|
1408
|
-
}
|
|
1409
|
-
/**
|
|
1410
|
-
Join the blocks around the given position. If depth is 2, their
|
|
1411
|
-
last and first siblings are also joined, and so on.
|
|
1412
|
-
*/
|
|
1413
|
-
join(e, t = 1) {
|
|
1414
|
-
return Se(this, e, t), this;
|
|
1415
|
-
}
|
|
1416
|
-
/**
|
|
1417
|
-
Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
|
|
1418
|
-
The wrappers are assumed to be valid in this position, and should
|
|
1419
|
-
probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
|
|
1420
|
-
*/
|
|
1421
|
-
wrap(e, t) {
|
|
1422
|
-
return ge(this, e, t), this;
|
|
1423
|
-
}
|
|
1424
|
-
/**
|
|
1425
|
-
Set the type of all textblocks (partly) between `from` and `to` to
|
|
1426
|
-
the given node type with the given attributes.
|
|
1427
|
-
*/
|
|
1428
|
-
setBlockType(e, t = e, r, n = null) {
|
|
1429
|
-
return we(this, e, t, r, n), this;
|
|
1430
|
-
}
|
|
1431
|
-
/**
|
|
1432
|
-
Change the type, attributes, and/or marks of the node at `pos`.
|
|
1433
|
-
When `type` isn't given, the existing node type is preserved,
|
|
1434
|
-
*/
|
|
1435
|
-
setNodeMarkup(e, t, r = null, n) {
|
|
1436
|
-
return ke(this, e, t, r, n), this;
|
|
1437
|
-
}
|
|
1438
|
-
/**
|
|
1439
|
-
Set a single attribute on a given node to a new value.
|
|
1440
|
-
The `pos` addresses the document content. Use `setDocAttribute`
|
|
1441
|
-
to set attributes on the document itself.
|
|
1442
|
-
*/
|
|
1443
|
-
setNodeAttribute(e, t, r) {
|
|
1444
|
-
return this.step(new E(e, t, r)), this;
|
|
1445
|
-
}
|
|
1446
|
-
/**
|
|
1447
|
-
Set a single attribute on the document to a new value.
|
|
1448
|
-
*/
|
|
1449
|
-
setDocAttribute(e, t) {
|
|
1450
|
-
return this.step(new z(e, t)), this;
|
|
1451
|
-
}
|
|
1452
|
-
/**
|
|
1453
|
-
Add a mark to the node at position `pos`.
|
|
1454
|
-
*/
|
|
1455
|
-
addNodeMark(e, t) {
|
|
1456
|
-
return this.step(new N(e, t)), this;
|
|
1457
|
-
}
|
|
1458
|
-
/**
|
|
1459
|
-
Remove a mark (or all marks of the given type) from the node at
|
|
1460
|
-
position `pos`.
|
|
1461
|
-
*/
|
|
1462
|
-
removeNodeMark(e, t) {
|
|
1463
|
-
let r = this.doc.nodeAt(e);
|
|
1464
|
-
if (!r)
|
|
1465
|
-
throw new RangeError("No node at position " + e);
|
|
1466
|
-
if (t instanceof se)
|
|
1467
|
-
t.isInSet(r.marks) && this.step(new R(e, t));
|
|
1468
|
-
else {
|
|
1469
|
-
let n = r.marks, i, o = [];
|
|
1470
|
-
for (; i = t.isInSet(n); )
|
|
1471
|
-
o.push(new R(e, i)), n = i.removeFromSet(n);
|
|
1472
|
-
for (let l = o.length - 1; l >= 0; l--)
|
|
1473
|
-
this.step(o[l]);
|
|
756
|
+
},
|
|
757
|
+
computed: {
|
|
758
|
+
filled: function() {
|
|
759
|
+
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
760
|
+
},
|
|
761
|
+
upButtonListeners: function() {
|
|
762
|
+
var e = this;
|
|
763
|
+
return {
|
|
764
|
+
mousedown: function(i) {
|
|
765
|
+
return e.onUpButtonMouseDown(i);
|
|
766
|
+
},
|
|
767
|
+
mouseup: function(i) {
|
|
768
|
+
return e.onUpButtonMouseUp(i);
|
|
769
|
+
},
|
|
770
|
+
mouseleave: function(i) {
|
|
771
|
+
return e.onUpButtonMouseLeave(i);
|
|
772
|
+
},
|
|
773
|
+
keydown: function(i) {
|
|
774
|
+
return e.onUpButtonKeyDown(i);
|
|
775
|
+
},
|
|
776
|
+
keyup: function(i) {
|
|
777
|
+
return e.onUpButtonKeyUp(i);
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
},
|
|
781
|
+
downButtonListeners: function() {
|
|
782
|
+
var e = this;
|
|
783
|
+
return {
|
|
784
|
+
mousedown: function(i) {
|
|
785
|
+
return e.onDownButtonMouseDown(i);
|
|
786
|
+
},
|
|
787
|
+
mouseup: function(i) {
|
|
788
|
+
return e.onDownButtonMouseUp(i);
|
|
789
|
+
},
|
|
790
|
+
mouseleave: function(i) {
|
|
791
|
+
return e.onDownButtonMouseLeave(i);
|
|
792
|
+
},
|
|
793
|
+
keydown: function(i) {
|
|
794
|
+
return e.onDownButtonKeyDown(i);
|
|
795
|
+
},
|
|
796
|
+
keyup: function(i) {
|
|
797
|
+
return e.onDownButtonKeyUp(i);
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
},
|
|
801
|
+
formattedValue: function() {
|
|
802
|
+
var e = !this.modelValue && !this.allowEmpty ? 0 : this.modelValue;
|
|
803
|
+
return this.formatValue(e);
|
|
804
|
+
},
|
|
805
|
+
getFormatter: function() {
|
|
806
|
+
return this.numberFormat;
|
|
1474
807
|
}
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
This can be changed by passing an array of types and attributes to
|
|
1482
|
-
use after the split (with the outermost nodes coming first).
|
|
1483
|
-
*/
|
|
1484
|
-
split(e, t = 1, r) {
|
|
1485
|
-
return ve(this, e, t, r), this;
|
|
1486
|
-
}
|
|
1487
|
-
/**
|
|
1488
|
-
Add the given mark to the inline content between `from` and `to`.
|
|
1489
|
-
*/
|
|
1490
|
-
addMark(e, t, r) {
|
|
1491
|
-
return pe(this, e, t, r), this;
|
|
808
|
+
},
|
|
809
|
+
components: {
|
|
810
|
+
INInputText: W,
|
|
811
|
+
INButton: j,
|
|
812
|
+
AngleUpIcon: G,
|
|
813
|
+
AngleDownIcon: _
|
|
1492
814
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
815
|
+
};
|
|
816
|
+
function re(n, e, t, i, r, s) {
|
|
817
|
+
var u = O("INInputText"), a = O("INButton");
|
|
818
|
+
return m(), U("span", p({
|
|
819
|
+
class: n.cx("root")
|
|
820
|
+
}, n.ptmi("root")), [$(u, p({
|
|
821
|
+
ref: "input",
|
|
822
|
+
id: n.inputId,
|
|
823
|
+
role: "spinbutton",
|
|
824
|
+
class: [n.cx("input"), n.inputClass],
|
|
825
|
+
style: n.inputStyle,
|
|
826
|
+
value: s.formattedValue,
|
|
827
|
+
"aria-valuemin": n.min,
|
|
828
|
+
"aria-valuemax": n.max,
|
|
829
|
+
"aria-valuenow": n.modelValue,
|
|
830
|
+
inputmode: n.mode === "decimal" && !n.minFractionDigits ? "numeric" : "decimal",
|
|
831
|
+
disabled: n.disabled,
|
|
832
|
+
readonly: n.readonly,
|
|
833
|
+
placeholder: n.placeholder,
|
|
834
|
+
"aria-labelledby": n.ariaLabelledby,
|
|
835
|
+
"aria-label": n.ariaLabel,
|
|
836
|
+
"aria-invalid": n.invalid || void 0,
|
|
837
|
+
onInput: s.onUserInput,
|
|
838
|
+
onKeydown: s.onInputKeyDown,
|
|
839
|
+
onKeypress: s.onInputKeyPress,
|
|
840
|
+
onPaste: s.onPaste,
|
|
841
|
+
onClick: s.onInputClick,
|
|
842
|
+
onFocus: s.onInputFocus,
|
|
843
|
+
onBlur: s.onInputBlur
|
|
844
|
+
}, n.inputProps, {
|
|
845
|
+
pt: n.ptm("input"),
|
|
846
|
+
unstyled: n.unstyled
|
|
847
|
+
}), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "inputmode", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "aria-invalid", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur", "pt", "unstyled"]), n.showButtons && n.buttonLayout === "stacked" ? (m(), U("span", p({
|
|
848
|
+
key: 0,
|
|
849
|
+
class: n.cx("buttonGroup")
|
|
850
|
+
}, n.ptm("buttonGroup")), [$(a, p({
|
|
851
|
+
class: [n.cx("incrementButton"), n.incrementButtonClass]
|
|
852
|
+
}, w(s.upButtonListeners), {
|
|
853
|
+
disabled: n.disabled,
|
|
854
|
+
tabindex: -1,
|
|
855
|
+
"aria-hidden": "true"
|
|
856
|
+
}, n.incrementButtonProps, {
|
|
857
|
+
pt: n.ptm("incrementButton"),
|
|
858
|
+
unstyled: n.unstyled
|
|
859
|
+
}), {
|
|
860
|
+
icon: x(function() {
|
|
861
|
+
return [S(n.$slots, "incrementbuttonicon", {}, function() {
|
|
862
|
+
return [(m(), I(v(n.incrementButtonIcon ? "span" : "AngleUpIcon"), p({
|
|
863
|
+
class: n.incrementButtonIcon
|
|
864
|
+
}, n.ptm("incrementButton").icon, {
|
|
865
|
+
"data-pc-section": "incrementbuttonicon"
|
|
866
|
+
}), null, 16, ["class"]))];
|
|
867
|
+
})];
|
|
868
|
+
}),
|
|
869
|
+
_: 3
|
|
870
|
+
}, 16, ["class", "disabled", "pt", "unstyled"]), $(a, p({
|
|
871
|
+
class: [n.cx("decrementButton"), n.decrementButtonClass]
|
|
872
|
+
}, w(s.downButtonListeners), {
|
|
873
|
+
disabled: n.disabled,
|
|
874
|
+
tabindex: -1,
|
|
875
|
+
"aria-hidden": "true"
|
|
876
|
+
}, n.decrementButtonProps, {
|
|
877
|
+
pt: n.ptm("decrementButton"),
|
|
878
|
+
unstyled: n.unstyled
|
|
879
|
+
}), {
|
|
880
|
+
icon: x(function() {
|
|
881
|
+
return [S(n.$slots, "decrementbuttonicon", {}, function() {
|
|
882
|
+
return [(m(), I(v(n.decrementButtonIcon ? "span" : "AngleDownIcon"), p({
|
|
883
|
+
class: n.decrementButtonIcon
|
|
884
|
+
}, n.ptm("decrementButton").icon, {
|
|
885
|
+
"data-pc-section": "decrementbuttonicon"
|
|
886
|
+
}), null, 16, ["class"]))];
|
|
887
|
+
})];
|
|
888
|
+
}),
|
|
889
|
+
_: 3
|
|
890
|
+
}, 16, ["class", "disabled", "pt", "unstyled"])], 16)) : V("", !0), n.showButtons && n.buttonLayout !== "stacked" ? (m(), I(a, p({
|
|
891
|
+
key: 1,
|
|
892
|
+
class: [n.cx("incrementButton"), n.incrementButtonClass]
|
|
893
|
+
}, w(s.upButtonListeners), {
|
|
894
|
+
disabled: n.disabled,
|
|
895
|
+
tabindex: -1,
|
|
896
|
+
"aria-hidden": "true"
|
|
897
|
+
}, n.incrementButtonProps, {
|
|
898
|
+
pt: n.ptm("incrementButton"),
|
|
899
|
+
unstyled: n.unstyled
|
|
900
|
+
}), {
|
|
901
|
+
icon: x(function() {
|
|
902
|
+
return [S(n.$slots, "incrementbuttonicon", {}, function() {
|
|
903
|
+
return [(m(), I(v(n.incrementButtonIcon ? "span" : "AngleUpIcon"), p({
|
|
904
|
+
class: n.incrementButtonIcon
|
|
905
|
+
}, n.ptm("incrementButton").icon, {
|
|
906
|
+
"data-pc-section": "incrementbuttonicon"
|
|
907
|
+
}), null, 16, ["class"]))];
|
|
908
|
+
})];
|
|
909
|
+
}),
|
|
910
|
+
_: 3
|
|
911
|
+
}, 16, ["class", "disabled", "pt", "unstyled"])) : V("", !0), n.showButtons && n.buttonLayout !== "stacked" ? (m(), I(a, p({
|
|
912
|
+
key: 2,
|
|
913
|
+
class: [n.cx("decrementButton"), n.decrementButtonClass]
|
|
914
|
+
}, w(s.downButtonListeners), {
|
|
915
|
+
disabled: n.disabled,
|
|
916
|
+
tabindex: -1,
|
|
917
|
+
"aria-hidden": "true"
|
|
918
|
+
}, n.decrementButtonProps, {
|
|
919
|
+
pt: n.ptm("decrementButton"),
|
|
920
|
+
unstyled: n.unstyled
|
|
921
|
+
}), {
|
|
922
|
+
icon: x(function() {
|
|
923
|
+
return [S(n.$slots, "decrementbuttonicon", {}, function() {
|
|
924
|
+
return [(m(), I(v(n.decrementButtonIcon ? "span" : "AngleDownIcon"), p({
|
|
925
|
+
class: n.decrementButtonIcon
|
|
926
|
+
}, n.ptm("decrementButton").icon, {
|
|
927
|
+
"data-pc-section": "decrementbuttonicon"
|
|
928
|
+
}), null, 16, ["class"]))];
|
|
929
|
+
})];
|
|
930
|
+
}),
|
|
931
|
+
_: 3
|
|
932
|
+
}, 16, ["class", "disabled", "pt", "unstyled"])) : V("", !0)], 16);
|
|
933
|
+
}
|
|
934
|
+
ie.render = re;
|
|
1512
935
|
export {
|
|
1513
|
-
|
|
1514
|
-
N as AddNodeMarkStep,
|
|
1515
|
-
E as AttrStep,
|
|
1516
|
-
z as DocAttrStep,
|
|
1517
|
-
L as MapResult,
|
|
1518
|
-
A as Mapping,
|
|
1519
|
-
b as RemoveMarkStep,
|
|
1520
|
-
R as RemoveNodeMarkStep,
|
|
1521
|
-
M as ReplaceAroundStep,
|
|
1522
|
-
v as ReplaceStep,
|
|
1523
|
-
k as Step,
|
|
1524
|
-
S as StepMap,
|
|
1525
|
-
y as StepResult,
|
|
1526
|
-
De as Transform,
|
|
1527
|
-
T as TransformError,
|
|
1528
|
-
Ae as canJoin,
|
|
1529
|
-
Je as canSplit,
|
|
1530
|
-
We as dropPoint,
|
|
1531
|
-
ze as findWrapping,
|
|
1532
|
-
be as insertPoint,
|
|
1533
|
-
Be as joinPoint,
|
|
1534
|
-
Fe as liftTarget,
|
|
1535
|
-
Me as replaceStep
|
|
936
|
+
ie as default
|
|
1536
937
|
};
|