@keymanapp/common-types 18.0.41-alpha → 18.0.46-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/build/src/consts/virtual-key-constants.d.ts +191 -191
  2. package/build/src/consts/virtual-key-constants.js +221 -221
  3. package/build/src/consts/virtual-key-constants.js.map +1 -1
  4. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +5 -5
  5. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +72 -72
  6. package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -1
  7. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +28 -28
  8. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +120 -120
  9. package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -1
  10. package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +95 -95
  11. package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +52 -52
  12. package/build/src/kmx/element-string.d.ts +23 -23
  13. package/build/src/kmx/element-string.js +125 -125
  14. package/build/src/kmx/element-string.js.map +1 -1
  15. package/build/src/kmx/keyman-targets.d.ts +20 -20
  16. package/build/src/kmx/keyman-targets.js +79 -79
  17. package/build/src/kmx/keyman-targets.js.map +1 -1
  18. package/build/src/kmx/kmx-builder.d.ts +32 -32
  19. package/build/src/kmx/kmx-builder.js +189 -189
  20. package/build/src/kmx/kmx-builder.js.map +1 -1
  21. package/build/src/kmx/kmx-file-reader.d.ts +13 -13
  22. package/build/src/kmx/kmx-file-reader.js +134 -134
  23. package/build/src/kmx/kmx-file-reader.js.map +1 -1
  24. package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +18 -18
  25. package/build/src/kmx/kmx-plus-builder/build-disp.js +27 -27
  26. package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -1
  27. package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +28 -28
  28. package/build/src/kmx/kmx-plus-builder/build-elem.js +89 -89
  29. package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -1
  30. package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +56 -56
  31. package/build/src/kmx/kmx-plus-builder/build-keys.js +107 -107
  32. package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -1
  33. package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +53 -53
  34. package/build/src/kmx/kmx-plus-builder/build-layr.js +101 -101
  35. package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -1
  36. package/build/src/kmx/kmx-plus-builder/build-list.d.ts +35 -35
  37. package/build/src/kmx/kmx-plus-builder/build-list.js +66 -66
  38. package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -1
  39. package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +11 -11
  40. package/build/src/kmx/kmx-plus-builder/build-loca.js +21 -21
  41. package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -1
  42. package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +16 -16
  43. package/build/src/kmx/kmx-plus-builder/build-meta.js +20 -20
  44. package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +15 -15
  45. package/build/src/kmx/kmx-plus-builder/build-sect.js +15 -15
  46. package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -1
  47. package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +22 -22
  48. package/build/src/kmx/kmx-plus-builder/build-strs.js +46 -46
  49. package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -1
  50. package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +32 -32
  51. package/build/src/kmx/kmx-plus-builder/build-tran.js +69 -69
  52. package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -1
  53. package/build/src/kmx/kmx-plus-builder/build-uset.d.ts +30 -30
  54. package/build/src/kmx/kmx-plus-builder/build-uset.js +60 -60
  55. package/build/src/kmx/kmx-plus-builder/build-uset.js.map +1 -1
  56. package/build/src/kmx/kmx-plus-builder/build-vars.d.ts +21 -21
  57. package/build/src/kmx/kmx-plus-builder/build-vars.js +48 -48
  58. package/build/src/kmx/kmx-plus-builder/build-vars.js.map +1 -1
  59. package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +9 -9
  60. package/build/src/kmx/kmx-plus-builder/builder-section.js +2 -2
  61. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +42 -42
  62. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +137 -137
  63. package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -1
  64. package/build/src/kmx/kmx-plus.d.ts +322 -322
  65. package/build/src/kmx/kmx-plus.js +830 -830
  66. package/build/src/kmx/kmx-plus.js.map +1 -1
  67. package/build/src/kmx/kmx.d.ts +233 -233
  68. package/build/src/kmx/kmx.js +302 -302
  69. package/build/src/kmx/kmx.js.map +1 -1
  70. package/build/src/kmx/string-list.d.ts +35 -35
  71. package/build/src/kmx/string-list.js +88 -88
  72. package/build/src/kmx/string-list.js.map +1 -1
  73. package/build/src/kpj/keyman-developer-project.d.ts +78 -78
  74. package/build/src/kpj/keyman-developer-project.js +195 -195
  75. package/build/src/kpj/keyman-developer-project.js.map +1 -1
  76. package/build/src/kpj/kpj-file-reader.d.ts +18 -18
  77. package/build/src/kpj/kpj-file-reader.js +119 -119
  78. package/build/src/kpj/kpj-file-reader.js.map +1 -1
  79. package/build/src/kpj/kpj-file.d.ts +39 -39
  80. package/build/src/kpj/kpj-file.js +10 -10
  81. package/build/src/kvk/kvk-file-reader.d.ts +4 -4
  82. package/build/src/kvk/kvk-file-reader.js +37 -37
  83. package/build/src/kvk/kvk-file-reader.js.map +1 -1
  84. package/build/src/kvk/kvk-file-writer.d.ts +19 -19
  85. package/build/src/kvk/kvk-file-writer.js +77 -77
  86. package/build/src/kvk/kvk-file-writer.js.map +1 -1
  87. package/build/src/kvk/kvk-file.d.ts +66 -66
  88. package/build/src/kvk/kvk-file.d.ts.map +1 -1
  89. package/build/src/kvk/kvk-file.js +90 -90
  90. package/build/src/kvk/kvk-file.js.map +1 -1
  91. package/build/src/kvk/kvks-file-reader.d.ts +23 -23
  92. package/build/src/kvk/kvks-file-reader.js +175 -175
  93. package/build/src/kvk/kvks-file-reader.js.map +1 -1
  94. package/build/src/kvk/kvks-file-writer.d.ts +6 -6
  95. package/build/src/kvk/kvks-file-writer.js +106 -106
  96. package/build/src/kvk/kvks-file-writer.js.map +1 -1
  97. package/build/src/kvk/kvks-file.d.ts +43 -43
  98. package/build/src/kvk/kvks-file.js +9 -9
  99. package/build/src/kvk/visual-keyboard.d.ts +44 -44
  100. package/build/src/kvk/visual-keyboard.js +75 -75
  101. package/build/src/kvk/visual-keyboard.js.map +1 -1
  102. package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +60 -60
  103. package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +19 -19
  104. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +95 -95
  105. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +409 -409
  106. package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
  107. package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +170 -170
  108. package/build/src/ldml-keyboard/ldml-keyboard-xml.js +55 -55
  109. package/build/src/ldml-keyboard/pattern-parser.d.ts +201 -201
  110. package/build/src/ldml-keyboard/pattern-parser.js +490 -490
  111. package/build/src/ldml-keyboard/pattern-parser.js.map +1 -1
  112. package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts +37 -37
  113. package/build/src/ldml-keyboard/unicodeset-parser-api.js +27 -27
  114. package/build/src/main.d.ts +33 -33
  115. package/build/src/main.js +32 -32
  116. package/build/src/package/kmp-json-file.d.ts +115 -115
  117. package/build/src/package/kmp-json-file.js +1 -1
  118. package/build/src/package/kps-file.d.ts +175 -175
  119. package/build/src/package/kps-file.js +15 -15
  120. package/build/src/schema-validators.d.ts +13 -13
  121. package/build/src/schema-validators.js +25 -25
  122. package/build/src/schemas/displaymap.schema.d.ts +57 -57
  123. package/build/src/schemas/displaymap.schema.js +35 -35
  124. package/build/src/schemas/displaymap.schema.validator.d.mts +2 -2
  125. package/build/src/schemas/displaymap.schema.validator.mjs +266 -266
  126. package/build/src/schemas/displaymap.schema.validator.mjs.map +1 -1
  127. package/build/src/schemas/keyboard_info.schema.d.ts +209 -209
  128. package/build/src/schemas/keyboard_info.schema.js +98 -98
  129. package/build/src/schemas/keyboard_info.schema.validator.d.mts +2 -2
  130. package/build/src/schemas/keyboard_info.schema.validator.mjs +1160 -1160
  131. package/build/src/schemas/keyboard_info.schema.validator.mjs.map +1 -1
  132. package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts +227 -227
  133. package/build/src/schemas/keyman-touch-layout.clean.spec.js +151 -151
  134. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.d.mts +2 -2
  135. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs +1094 -1094
  136. package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs.map +1 -1
  137. package/build/src/schemas/keyman-touch-layout.spec.d.ts +229 -229
  138. package/build/src/schemas/keyman-touch-layout.spec.js +140 -140
  139. package/build/src/schemas/keyman-touch-layout.spec.validator.d.mts +2 -2
  140. package/build/src/schemas/keyman-touch-layout.spec.validator.mjs +1436 -1436
  141. package/build/src/schemas/keyman-touch-layout.spec.validator.mjs.map +1 -1
  142. package/build/src/schemas/kmp.schema.d.ts +324 -324
  143. package/build/src/schemas/kmp.schema.js +353 -353
  144. package/build/src/schemas/kmp.schema.validator.d.mts +2 -2
  145. package/build/src/schemas/kmp.schema.validator.mjs +1627 -1627
  146. package/build/src/schemas/kmp.schema.validator.mjs.map +1 -1
  147. package/build/src/schemas/kpj-9.0.schema.d.ts +152 -152
  148. package/build/src/schemas/kpj-9.0.schema.js +131 -131
  149. package/build/src/schemas/kpj-9.0.schema.validator.d.mts +2 -2
  150. package/build/src/schemas/kpj-9.0.schema.validator.mjs +655 -655
  151. package/build/src/schemas/kpj-9.0.schema.validator.mjs.map +1 -1
  152. package/build/src/schemas/kpj.schema.d.ts +122 -122
  153. package/build/src/schemas/kpj.schema.js +129 -129
  154. package/build/src/schemas/kpj.schema.validator.d.mts +2 -2
  155. package/build/src/schemas/kpj.schema.validator.mjs +515 -515
  156. package/build/src/schemas/kpj.schema.validator.mjs.map +1 -1
  157. package/build/src/schemas/kvks.schema.d.ts +160 -160
  158. package/build/src/schemas/kvks.schema.js +182 -182
  159. package/build/src/schemas/kvks.schema.validator.d.mts +2 -2
  160. package/build/src/schemas/kvks.schema.validator.mjs +625 -625
  161. package/build/src/schemas/kvks.schema.validator.mjs.map +1 -1
  162. package/build/src/schemas/ldml-keyboard3.schema.d.ts +635 -635
  163. package/build/src/schemas/ldml-keyboard3.schema.js +696 -696
  164. package/build/src/schemas/ldml-keyboard3.schema.validator.d.mts +2 -2
  165. package/build/src/schemas/ldml-keyboard3.schema.validator.mjs +3117 -3117
  166. package/build/src/schemas/ldml-keyboard3.schema.validator.mjs.map +1 -1
  167. package/build/src/schemas/ldml-keyboardtest3.schema.d.ts +192 -192
  168. package/build/src/schemas/ldml-keyboardtest3.schema.js +225 -225
  169. package/build/src/schemas/ldml-keyboardtest3.schema.validator.d.mts +2 -2
  170. package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs +744 -744
  171. package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs.map +1 -1
  172. package/build/src/schemas.d.ts +2300 -2300
  173. package/build/src/schemas.js +23 -23
  174. package/build/src/util/common-events.d.ts +44 -44
  175. package/build/src/util/common-events.js +26 -26
  176. package/build/src/util/compiler-interfaces.d.ts +371 -371
  177. package/build/src/util/compiler-interfaces.d.ts.map +1 -1
  178. package/build/src/util/compiler-interfaces.js +380 -380
  179. package/build/src/util/compiler-interfaces.js.map +1 -1
  180. package/build/src/util/errors.d.ts +5 -5
  181. package/build/src/util/errors.js +5 -5
  182. package/build/src/util/file-types.d.ts +93 -93
  183. package/build/src/util/file-types.d.ts.map +1 -1
  184. package/build/src/util/file-types.js +142 -142
  185. package/build/src/util/file-types.js.map +1 -1
  186. package/build/src/util/util.d.ts +98 -98
  187. package/build/src/util/util.js +368 -368
  188. package/build/src/util/util.js.map +1 -1
  189. package/package.json +3 -3
@@ -1,1438 +1,1438 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d7c8e24e-a784-5f9f-8fbc-96e7a36e0211")}catch(e){}}();
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __commonJS = (cb, mod) => function __require() {
5
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6
- };
7
- // obj/schemas/keyman-touch-layout.spec.validator.cjs
8
- var require_keyman_touch_layout_spec_validator = __commonJS({
9
- "obj/schemas/keyman-touch-layout.spec.validator.cjs"(exports, module) {
10
- module.exports = validate20;
11
- module.exports.default = validate20;
12
- var schema24 = { "type": "object", "properties": { "font": { "$ref": "#/definitions/font-spec" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "layer": { "$ref": "#/definitions/layers" }, "displayUnderlying": { "type": "boolean" }, "defaultHint": { "type": "string", "enum": ["none", "dot", "longpress", "multitap", "flick", "flick-n", "flick-ne", "flick-e", "flick-se", "flick-s", "flick-sw", "flick-w", "flick-nw"] } }, "required": ["layer"], "additionalProperties": false };
13
- var pattern0 = new RegExp("^[\\S]+$", "u");
14
- var pattern1 = new RegExp("^[0-9]+$", "u");
15
- var schema34 = { "type": "object", "properties": { "id": { "$ref": "#/definitions/key-id" }, "text": { "type": "string" }, "layer": { "$ref": "#/definitions/layer-id" }, "nextlayer": { "$ref": "#/definitions/layer-id" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "font": { "$ref": "#/definitions/font-spec" }, "dk": { "type": "string" }, "sp": { "$ref": "#/definitions/numeric" }, "pad": { "$ref": "#/definitions/numeric" }, "width": { "$ref": "#/definitions/numeric" }, "sk": { "$ref": "#/definitions/subkeys" }, "flick": { "$ref": "#/definitions/flick" }, "multitap": { "$ref": "#/definitions/subkeys" }, "hint": { "type": "string" } }, "additionalProperties": false };
16
- var func4 = Object.prototype.hasOwnProperty;
17
- var pattern2 = new RegExp("^[TKUtku]_[a-zA-Z0-9_]+$|^$", "u");
18
- var pattern5 = new RegExp("^[0-9]+(\\.?[0-9]*)$|^$", "u");
19
- var schema44 = { "type": "object", "properties": { "id": { "$ref": "#/definitions/key-id" }, "text": { "type": "string" }, "layer": { "$ref": "#/definitions/layer-id" }, "nextlayer": { "$ref": "#/definitions/layer-id" }, "sp": { "$ref": "#/definitions/numeric" }, "pad": { "$ref": "#/definitions/numeric" }, "width": { "$ref": "#/definitions/numeric" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "font": { "$ref": "#/definitions/font-spec" }, "dk": { "type": "string" }, "default": { "type": "boolean" } }, "required": ["id"], "additionalProperties": false };
20
- function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
21
- let vErrors = null;
22
- let errors = 0;
23
- if (errors === 0) {
24
- if (data && typeof data == "object" && !Array.isArray(data)) {
25
- let missing0;
26
- if (data.id === void 0 && (missing0 = "id")) {
27
- validate30.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
28
- return false;
29
- }
30
- else {
31
- const _errs1 = errors;
32
- for (const key0 in data) {
33
- if (!func4.call(schema44.properties, key0)) {
34
- validate30.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
35
- return false;
36
- break;
37
- }
38
- }
39
- if (_errs1 === errors) {
40
- if (data.id !== void 0) {
41
- let data0 = data.id;
42
- const _errs2 = errors;
43
- const _errs3 = errors;
44
- if (errors === _errs3) {
45
- if (typeof data0 === "string") {
46
- if (!pattern2.test(data0)) {
47
- validate30.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/pattern", keyword: "pattern", params: { pattern: "^[TKUtku]_[a-zA-Z0-9_]+$|^$" }, message: 'must match pattern "^[TKUtku]_[a-zA-Z0-9_]+$|^$"' }];
48
- return false;
49
- }
50
- }
51
- else {
52
- validate30.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
53
- return false;
54
- }
55
- }
56
- var valid0 = _errs2 === errors;
57
- }
58
- else {
59
- var valid0 = true;
60
- }
61
- if (valid0) {
62
- if (data.text !== void 0) {
63
- const _errs5 = errors;
64
- if (typeof data.text !== "string") {
65
- validate30.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
66
- return false;
67
- }
68
- var valid0 = _errs5 === errors;
69
- }
70
- else {
71
- var valid0 = true;
72
- }
73
- if (valid0) {
74
- if (data.layer !== void 0) {
75
- let data2 = data.layer;
76
- const _errs7 = errors;
77
- const _errs8 = errors;
78
- if (errors === _errs8) {
79
- if (typeof data2 === "string") {
80
- if (!pattern0.test(data2)) {
81
- validate30.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
82
- return false;
83
- }
84
- }
85
- else {
86
- validate30.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
87
- return false;
88
- }
89
- }
90
- var valid0 = _errs7 === errors;
91
- }
92
- else {
93
- var valid0 = true;
94
- }
95
- if (valid0) {
96
- if (data.nextlayer !== void 0) {
97
- let data3 = data.nextlayer;
98
- const _errs10 = errors;
99
- const _errs11 = errors;
100
- if (errors === _errs11) {
101
- if (typeof data3 === "string") {
102
- if (!pattern0.test(data3)) {
103
- validate30.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
104
- return false;
105
- }
106
- }
107
- else {
108
- validate30.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
109
- return false;
110
- }
111
- }
112
- var valid0 = _errs10 === errors;
113
- }
114
- else {
115
- var valid0 = true;
116
- }
117
- if (valid0) {
118
- if (data.sp !== void 0) {
119
- let data4 = data.sp;
120
- const _errs13 = errors;
121
- const _errs15 = errors;
122
- let valid5 = false;
123
- let passing0 = null;
124
- const _errs16 = errors;
125
- if (errors === _errs16) {
126
- if (typeof data4 === "string") {
127
- if (!pattern5.test(data4)) {
128
- const err0 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
129
- if (vErrors === null) {
130
- vErrors = [err0];
131
- }
132
- else {
133
- vErrors.push(err0);
134
- }
135
- errors++;
136
- }
137
- }
138
- else {
139
- const err1 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
140
- if (vErrors === null) {
141
- vErrors = [err1];
142
- }
143
- else {
144
- vErrors.push(err1);
145
- }
146
- errors++;
147
- }
148
- }
149
- var _valid0 = _errs16 === errors;
150
- if (_valid0) {
151
- valid5 = true;
152
- passing0 = 0;
153
- }
154
- const _errs18 = errors;
155
- if (!(typeof data4 == "number" && isFinite(data4))) {
156
- const err2 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
157
- if (vErrors === null) {
158
- vErrors = [err2];
159
- }
160
- else {
161
- vErrors.push(err2);
162
- }
163
- errors++;
164
- }
165
- var _valid0 = _errs18 === errors;
166
- if (_valid0 && valid5) {
167
- valid5 = false;
168
- passing0 = [passing0, 1];
169
- }
170
- else {
171
- if (_valid0) {
172
- valid5 = true;
173
- passing0 = 1;
174
- }
175
- }
176
- if (!valid5) {
177
- const err3 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
178
- if (vErrors === null) {
179
- vErrors = [err3];
180
- }
181
- else {
182
- vErrors.push(err3);
183
- }
184
- errors++;
185
- validate30.errors = vErrors;
186
- return false;
187
- }
188
- else {
189
- errors = _errs15;
190
- if (vErrors !== null) {
191
- if (_errs15) {
192
- vErrors.length = _errs15;
193
- }
194
- else {
195
- vErrors = null;
196
- }
197
- }
198
- }
199
- var valid0 = _errs13 === errors;
200
- }
201
- else {
202
- var valid0 = true;
203
- }
204
- if (valid0) {
205
- if (data.pad !== void 0) {
206
- let data5 = data.pad;
207
- const _errs20 = errors;
208
- const _errs22 = errors;
209
- let valid7 = false;
210
- let passing1 = null;
211
- const _errs23 = errors;
212
- if (errors === _errs23) {
213
- if (typeof data5 === "string") {
214
- if (!pattern5.test(data5)) {
215
- const err4 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
216
- if (vErrors === null) {
217
- vErrors = [err4];
218
- }
219
- else {
220
- vErrors.push(err4);
221
- }
222
- errors++;
223
- }
224
- }
225
- else {
226
- const err5 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
227
- if (vErrors === null) {
228
- vErrors = [err5];
229
- }
230
- else {
231
- vErrors.push(err5);
232
- }
233
- errors++;
234
- }
235
- }
236
- var _valid1 = _errs23 === errors;
237
- if (_valid1) {
238
- valid7 = true;
239
- passing1 = 0;
240
- }
241
- const _errs25 = errors;
242
- if (!(typeof data5 == "number" && isFinite(data5))) {
243
- const err6 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
244
- if (vErrors === null) {
245
- vErrors = [err6];
246
- }
247
- else {
248
- vErrors.push(err6);
249
- }
250
- errors++;
251
- }
252
- var _valid1 = _errs25 === errors;
253
- if (_valid1 && valid7) {
254
- valid7 = false;
255
- passing1 = [passing1, 1];
256
- }
257
- else {
258
- if (_valid1) {
259
- valid7 = true;
260
- passing1 = 1;
261
- }
262
- }
263
- if (!valid7) {
264
- const err7 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
265
- if (vErrors === null) {
266
- vErrors = [err7];
267
- }
268
- else {
269
- vErrors.push(err7);
270
- }
271
- errors++;
272
- validate30.errors = vErrors;
273
- return false;
274
- }
275
- else {
276
- errors = _errs22;
277
- if (vErrors !== null) {
278
- if (_errs22) {
279
- vErrors.length = _errs22;
280
- }
281
- else {
282
- vErrors = null;
283
- }
284
- }
285
- }
286
- var valid0 = _errs20 === errors;
287
- }
288
- else {
289
- var valid0 = true;
290
- }
291
- if (valid0) {
292
- if (data.width !== void 0) {
293
- let data6 = data.width;
294
- const _errs27 = errors;
295
- const _errs29 = errors;
296
- let valid9 = false;
297
- let passing2 = null;
298
- const _errs30 = errors;
299
- if (errors === _errs30) {
300
- if (typeof data6 === "string") {
301
- if (!pattern5.test(data6)) {
302
- const err8 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
303
- if (vErrors === null) {
304
- vErrors = [err8];
305
- }
306
- else {
307
- vErrors.push(err8);
308
- }
309
- errors++;
310
- }
311
- }
312
- else {
313
- const err9 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
314
- if (vErrors === null) {
315
- vErrors = [err9];
316
- }
317
- else {
318
- vErrors.push(err9);
319
- }
320
- errors++;
321
- }
322
- }
323
- var _valid2 = _errs30 === errors;
324
- if (_valid2) {
325
- valid9 = true;
326
- passing2 = 0;
327
- }
328
- const _errs32 = errors;
329
- if (!(typeof data6 == "number" && isFinite(data6))) {
330
- const err10 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
331
- if (vErrors === null) {
332
- vErrors = [err10];
333
- }
334
- else {
335
- vErrors.push(err10);
336
- }
337
- errors++;
338
- }
339
- var _valid2 = _errs32 === errors;
340
- if (_valid2 && valid9) {
341
- valid9 = false;
342
- passing2 = [passing2, 1];
343
- }
344
- else {
345
- if (_valid2) {
346
- valid9 = true;
347
- passing2 = 1;
348
- }
349
- }
350
- if (!valid9) {
351
- const err11 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing2 }, message: "must match exactly one schema in oneOf" };
352
- if (vErrors === null) {
353
- vErrors = [err11];
354
- }
355
- else {
356
- vErrors.push(err11);
357
- }
358
- errors++;
359
- validate30.errors = vErrors;
360
- return false;
361
- }
362
- else {
363
- errors = _errs29;
364
- if (vErrors !== null) {
365
- if (_errs29) {
366
- vErrors.length = _errs29;
367
- }
368
- else {
369
- vErrors = null;
370
- }
371
- }
372
- }
373
- var valid0 = _errs27 === errors;
374
- }
375
- else {
376
- var valid0 = true;
377
- }
378
- if (valid0) {
379
- if (data.fontsize !== void 0) {
380
- const _errs34 = errors;
381
- if (typeof data.fontsize !== "string") {
382
- validate30.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
383
- return false;
384
- }
385
- var valid0 = _errs34 === errors;
386
- }
387
- else {
388
- var valid0 = true;
389
- }
390
- if (valid0) {
391
- if (data.font !== void 0) {
392
- const _errs37 = errors;
393
- if (typeof data.font !== "string") {
394
- validate30.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
395
- return false;
396
- }
397
- var valid0 = _errs37 === errors;
398
- }
399
- else {
400
- var valid0 = true;
401
- }
402
- if (valid0) {
403
- if (data.dk !== void 0) {
404
- const _errs40 = errors;
405
- if (typeof data.dk !== "string") {
406
- validate30.errors = [{ instancePath: instancePath + "/dk", schemaPath: "#/properties/dk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
407
- return false;
408
- }
409
- var valid0 = _errs40 === errors;
410
- }
411
- else {
412
- var valid0 = true;
413
- }
414
- if (valid0) {
415
- if (data.default !== void 0) {
416
- const _errs42 = errors;
417
- if (typeof data.default !== "boolean") {
418
- validate30.errors = [{ instancePath: instancePath + "/default", schemaPath: "#/properties/default/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
419
- return false;
420
- }
421
- var valid0 = _errs42 === errors;
422
- }
423
- else {
424
- var valid0 = true;
425
- }
426
- }
427
- }
428
- }
429
- }
430
- }
431
- }
432
- }
433
- }
434
- }
435
- }
436
- }
437
- }
438
- }
439
- else {
440
- validate30.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
441
- return false;
442
- }
443
- }
444
- validate30.errors = vErrors;
445
- return errors === 0;
446
- }
447
- function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
448
- let vErrors = null;
449
- let errors = 0;
450
- if (errors === 0) {
451
- if (Array.isArray(data)) {
452
- var valid0 = true;
453
- const len0 = data.length;
454
- for (let i0 = 0; i0 < len0; i0++) {
455
- const _errs1 = errors;
456
- if (!validate30(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
457
- vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
458
- errors = vErrors.length;
459
- }
460
- var valid0 = _errs1 === errors;
461
- if (!valid0) {
462
- break;
463
- }
464
- }
465
- }
466
- else {
467
- validate29.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
468
- return false;
469
- }
470
- }
471
- validate29.errors = vErrors;
472
- return errors === 0;
473
- }
474
- var pattern14 = new RegExp("^(n|s|e|w|ne|nw|se|sw)$", "u");
475
- function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
476
- let vErrors = null;
477
- let errors = 0;
478
- if (errors === 0) {
479
- if (data && typeof data == "object" && !Array.isArray(data)) {
480
- const _errs1 = errors;
481
- for (const key0 in data) {
482
- if (!pattern14.test(key0)) {
483
- validate33.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
484
- return false;
485
- break;
486
- }
487
- }
488
- if (_errs1 === errors) {
489
- var valid0 = true;
490
- for (const key1 in data) {
491
- if (pattern14.test(key1)) {
492
- const _errs2 = errors;
493
- if (!validate30(data[key1], { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key1, rootData })) {
494
- vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
495
- errors = vErrors.length;
496
- }
497
- var valid0 = _errs2 === errors;
498
- if (!valid0) {
499
- break;
500
- }
501
- }
502
- }
503
- }
504
- }
505
- else {
506
- validate33.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
507
- return false;
508
- }
509
- }
510
- validate33.errors = vErrors;
511
- return errors === 0;
512
- }
513
- function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
514
- let vErrors = null;
515
- let errors = 0;
516
- if (errors === 0) {
517
- if (data && typeof data == "object" && !Array.isArray(data)) {
518
- const _errs1 = errors;
519
- for (const key0 in data) {
520
- if (!func4.call(schema34.properties, key0)) {
521
- validate28.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
522
- return false;
523
- break;
524
- }
525
- }
526
- if (_errs1 === errors) {
527
- if (data.id !== void 0) {
528
- let data0 = data.id;
529
- const _errs2 = errors;
530
- const _errs3 = errors;
531
- if (errors === _errs3) {
532
- if (typeof data0 === "string") {
533
- if (!pattern2.test(data0)) {
534
- validate28.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/pattern", keyword: "pattern", params: { pattern: "^[TKUtku]_[a-zA-Z0-9_]+$|^$" }, message: 'must match pattern "^[TKUtku]_[a-zA-Z0-9_]+$|^$"' }];
535
- return false;
536
- }
537
- }
538
- else {
539
- validate28.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
540
- return false;
541
- }
542
- }
543
- var valid0 = _errs2 === errors;
544
- }
545
- else {
546
- var valid0 = true;
547
- }
548
- if (valid0) {
549
- if (data.text !== void 0) {
550
- const _errs5 = errors;
551
- if (typeof data.text !== "string") {
552
- validate28.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
553
- return false;
554
- }
555
- var valid0 = _errs5 === errors;
556
- }
557
- else {
558
- var valid0 = true;
559
- }
560
- if (valid0) {
561
- if (data.layer !== void 0) {
562
- let data2 = data.layer;
563
- const _errs7 = errors;
564
- const _errs8 = errors;
565
- if (errors === _errs8) {
566
- if (typeof data2 === "string") {
567
- if (!pattern0.test(data2)) {
568
- validate28.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
569
- return false;
570
- }
571
- }
572
- else {
573
- validate28.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
574
- return false;
575
- }
576
- }
577
- var valid0 = _errs7 === errors;
578
- }
579
- else {
580
- var valid0 = true;
581
- }
582
- if (valid0) {
583
- if (data.nextlayer !== void 0) {
584
- let data3 = data.nextlayer;
585
- const _errs10 = errors;
586
- const _errs11 = errors;
587
- if (errors === _errs11) {
588
- if (typeof data3 === "string") {
589
- if (!pattern0.test(data3)) {
590
- validate28.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
591
- return false;
592
- }
593
- }
594
- else {
595
- validate28.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
596
- return false;
597
- }
598
- }
599
- var valid0 = _errs10 === errors;
600
- }
601
- else {
602
- var valid0 = true;
603
- }
604
- if (valid0) {
605
- if (data.fontsize !== void 0) {
606
- const _errs13 = errors;
607
- if (typeof data.fontsize !== "string") {
608
- validate28.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
609
- return false;
610
- }
611
- var valid0 = _errs13 === errors;
612
- }
613
- else {
614
- var valid0 = true;
615
- }
616
- if (valid0) {
617
- if (data.font !== void 0) {
618
- const _errs16 = errors;
619
- if (typeof data.font !== "string") {
620
- validate28.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
621
- return false;
622
- }
623
- var valid0 = _errs16 === errors;
624
- }
625
- else {
626
- var valid0 = true;
627
- }
628
- if (valid0) {
629
- if (data.dk !== void 0) {
630
- const _errs19 = errors;
631
- if (typeof data.dk !== "string") {
632
- validate28.errors = [{ instancePath: instancePath + "/dk", schemaPath: "#/properties/dk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
633
- return false;
634
- }
635
- var valid0 = _errs19 === errors;
636
- }
637
- else {
638
- var valid0 = true;
639
- }
640
- if (valid0) {
641
- if (data.sp !== void 0) {
642
- let data7 = data.sp;
643
- const _errs21 = errors;
644
- const _errs23 = errors;
645
- let valid7 = false;
646
- let passing0 = null;
647
- const _errs24 = errors;
648
- if (errors === _errs24) {
649
- if (typeof data7 === "string") {
650
- if (!pattern5.test(data7)) {
651
- const err0 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
652
- if (vErrors === null) {
653
- vErrors = [err0];
654
- }
655
- else {
656
- vErrors.push(err0);
657
- }
658
- errors++;
659
- }
660
- }
661
- else {
662
- const err1 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
663
- if (vErrors === null) {
664
- vErrors = [err1];
665
- }
666
- else {
667
- vErrors.push(err1);
668
- }
669
- errors++;
670
- }
671
- }
672
- var _valid0 = _errs24 === errors;
673
- if (_valid0) {
674
- valid7 = true;
675
- passing0 = 0;
676
- }
677
- const _errs26 = errors;
678
- if (!(typeof data7 == "number" && isFinite(data7))) {
679
- const err2 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
680
- if (vErrors === null) {
681
- vErrors = [err2];
682
- }
683
- else {
684
- vErrors.push(err2);
685
- }
686
- errors++;
687
- }
688
- var _valid0 = _errs26 === errors;
689
- if (_valid0 && valid7) {
690
- valid7 = false;
691
- passing0 = [passing0, 1];
692
- }
693
- else {
694
- if (_valid0) {
695
- valid7 = true;
696
- passing0 = 1;
697
- }
698
- }
699
- if (!valid7) {
700
- const err3 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
701
- if (vErrors === null) {
702
- vErrors = [err3];
703
- }
704
- else {
705
- vErrors.push(err3);
706
- }
707
- errors++;
708
- validate28.errors = vErrors;
709
- return false;
710
- }
711
- else {
712
- errors = _errs23;
713
- if (vErrors !== null) {
714
- if (_errs23) {
715
- vErrors.length = _errs23;
716
- }
717
- else {
718
- vErrors = null;
719
- }
720
- }
721
- }
722
- var valid0 = _errs21 === errors;
723
- }
724
- else {
725
- var valid0 = true;
726
- }
727
- if (valid0) {
728
- if (data.pad !== void 0) {
729
- let data8 = data.pad;
730
- const _errs28 = errors;
731
- const _errs30 = errors;
732
- let valid9 = false;
733
- let passing1 = null;
734
- const _errs31 = errors;
735
- if (errors === _errs31) {
736
- if (typeof data8 === "string") {
737
- if (!pattern5.test(data8)) {
738
- const err4 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
739
- if (vErrors === null) {
740
- vErrors = [err4];
741
- }
742
- else {
743
- vErrors.push(err4);
744
- }
745
- errors++;
746
- }
747
- }
748
- else {
749
- const err5 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
750
- if (vErrors === null) {
751
- vErrors = [err5];
752
- }
753
- else {
754
- vErrors.push(err5);
755
- }
756
- errors++;
757
- }
758
- }
759
- var _valid1 = _errs31 === errors;
760
- if (_valid1) {
761
- valid9 = true;
762
- passing1 = 0;
763
- }
764
- const _errs33 = errors;
765
- if (!(typeof data8 == "number" && isFinite(data8))) {
766
- const err6 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
767
- if (vErrors === null) {
768
- vErrors = [err6];
769
- }
770
- else {
771
- vErrors.push(err6);
772
- }
773
- errors++;
774
- }
775
- var _valid1 = _errs33 === errors;
776
- if (_valid1 && valid9) {
777
- valid9 = false;
778
- passing1 = [passing1, 1];
779
- }
780
- else {
781
- if (_valid1) {
782
- valid9 = true;
783
- passing1 = 1;
784
- }
785
- }
786
- if (!valid9) {
787
- const err7 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
788
- if (vErrors === null) {
789
- vErrors = [err7];
790
- }
791
- else {
792
- vErrors.push(err7);
793
- }
794
- errors++;
795
- validate28.errors = vErrors;
796
- return false;
797
- }
798
- else {
799
- errors = _errs30;
800
- if (vErrors !== null) {
801
- if (_errs30) {
802
- vErrors.length = _errs30;
803
- }
804
- else {
805
- vErrors = null;
806
- }
807
- }
808
- }
809
- var valid0 = _errs28 === errors;
810
- }
811
- else {
812
- var valid0 = true;
813
- }
814
- if (valid0) {
815
- if (data.width !== void 0) {
816
- let data9 = data.width;
817
- const _errs35 = errors;
818
- const _errs37 = errors;
819
- let valid11 = false;
820
- let passing2 = null;
821
- const _errs38 = errors;
822
- if (errors === _errs38) {
823
- if (typeof data9 === "string") {
824
- if (!pattern5.test(data9)) {
825
- const err8 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
826
- if (vErrors === null) {
827
- vErrors = [err8];
828
- }
829
- else {
830
- vErrors.push(err8);
831
- }
832
- errors++;
833
- }
834
- }
835
- else {
836
- const err9 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
837
- if (vErrors === null) {
838
- vErrors = [err9];
839
- }
840
- else {
841
- vErrors.push(err9);
842
- }
843
- errors++;
844
- }
845
- }
846
- var _valid2 = _errs38 === errors;
847
- if (_valid2) {
848
- valid11 = true;
849
- passing2 = 0;
850
- }
851
- const _errs40 = errors;
852
- if (!(typeof data9 == "number" && isFinite(data9))) {
853
- const err10 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
854
- if (vErrors === null) {
855
- vErrors = [err10];
856
- }
857
- else {
858
- vErrors.push(err10);
859
- }
860
- errors++;
861
- }
862
- var _valid2 = _errs40 === errors;
863
- if (_valid2 && valid11) {
864
- valid11 = false;
865
- passing2 = [passing2, 1];
866
- }
867
- else {
868
- if (_valid2) {
869
- valid11 = true;
870
- passing2 = 1;
871
- }
872
- }
873
- if (!valid11) {
874
- const err11 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing2 }, message: "must match exactly one schema in oneOf" };
875
- if (vErrors === null) {
876
- vErrors = [err11];
877
- }
878
- else {
879
- vErrors.push(err11);
880
- }
881
- errors++;
882
- validate28.errors = vErrors;
883
- return false;
884
- }
885
- else {
886
- errors = _errs37;
887
- if (vErrors !== null) {
888
- if (_errs37) {
889
- vErrors.length = _errs37;
890
- }
891
- else {
892
- vErrors = null;
893
- }
894
- }
895
- }
896
- var valid0 = _errs35 === errors;
897
- }
898
- else {
899
- var valid0 = true;
900
- }
901
- if (valid0) {
902
- if (data.sk !== void 0) {
903
- const _errs42 = errors;
904
- if (!validate29(data.sk, { instancePath: instancePath + "/sk", parentData: data, parentDataProperty: "sk", rootData })) {
905
- vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
906
- errors = vErrors.length;
907
- }
908
- var valid0 = _errs42 === errors;
909
- }
910
- else {
911
- var valid0 = true;
912
- }
913
- if (valid0) {
914
- if (data.flick !== void 0) {
915
- const _errs43 = errors;
916
- if (!validate33(data.flick, { instancePath: instancePath + "/flick", parentData: data, parentDataProperty: "flick", rootData })) {
917
- vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
918
- errors = vErrors.length;
919
- }
920
- var valid0 = _errs43 === errors;
921
- }
922
- else {
923
- var valid0 = true;
924
- }
925
- if (valid0) {
926
- if (data.multitap !== void 0) {
927
- const _errs44 = errors;
928
- if (!validate29(data.multitap, { instancePath: instancePath + "/multitap", parentData: data, parentDataProperty: "multitap", rootData })) {
929
- vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
930
- errors = vErrors.length;
931
- }
932
- var valid0 = _errs44 === errors;
933
- }
934
- else {
935
- var valid0 = true;
936
- }
937
- if (valid0) {
938
- if (data.hint !== void 0) {
939
- const _errs45 = errors;
940
- if (typeof data.hint !== "string") {
941
- validate28.errors = [{ instancePath: instancePath + "/hint", schemaPath: "#/properties/hint/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
942
- return false;
943
- }
944
- var valid0 = _errs45 === errors;
945
- }
946
- else {
947
- var valid0 = true;
948
- }
949
- }
950
- }
951
- }
952
- }
953
- }
954
- }
955
- }
956
- }
957
- }
958
- }
959
- }
960
- }
961
- }
962
- }
963
- }
964
- else {
965
- validate28.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
966
- return false;
967
- }
968
- }
969
- validate28.errors = vErrors;
970
- return errors === 0;
971
- }
972
- function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
973
- let vErrors = null;
974
- let errors = 0;
975
- if (errors === 0) {
976
- if (Array.isArray(data)) {
977
- var valid0 = true;
978
- const len0 = data.length;
979
- for (let i0 = 0; i0 < len0; i0++) {
980
- const _errs1 = errors;
981
- if (!validate28(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
982
- vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
983
- errors = vErrors.length;
984
- }
985
- var valid0 = _errs1 === errors;
986
- if (!valid0) {
987
- break;
988
- }
989
- }
990
- }
991
- else {
992
- validate27.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
993
- return false;
994
- }
995
- }
996
- validate27.errors = vErrors;
997
- return errors === 0;
998
- }
999
- function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1000
- let vErrors = null;
1001
- let errors = 0;
1002
- if (errors === 0) {
1003
- if (data && typeof data == "object" && !Array.isArray(data)) {
1004
- let missing0;
1005
- if (data.id === void 0 && (missing0 = "id") || data.key === void 0 && (missing0 = "key")) {
1006
- validate26.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1007
- return false;
1008
- }
1009
- else {
1010
- const _errs1 = errors;
1011
- for (const key0 in data) {
1012
- if (!(key0 === "id" || key0 === "key")) {
1013
- validate26.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1014
- return false;
1015
- break;
1016
- }
1017
- }
1018
- if (_errs1 === errors) {
1019
- if (data.id !== void 0) {
1020
- let data0 = data.id;
1021
- const _errs2 = errors;
1022
- const _errs4 = errors;
1023
- let valid2 = false;
1024
- let passing0 = null;
1025
- const _errs5 = errors;
1026
- if (!(typeof data0 == "number" && (!(data0 % 1) && !isNaN(data0)) && isFinite(data0))) {
1027
- const err0 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1028
- if (vErrors === null) {
1029
- vErrors = [err0];
1030
- }
1031
- else {
1032
- vErrors.push(err0);
1033
- }
1034
- errors++;
1035
- }
1036
- if (errors === _errs5) {
1037
- if (typeof data0 == "number" && isFinite(data0)) {
1038
- if (data0 > 100 || isNaN(data0)) {
1039
- const err1 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/maximum", keyword: "maximum", params: { comparison: "<=", limit: 100 }, message: "must be <= 100" };
1040
- if (vErrors === null) {
1041
- vErrors = [err1];
1042
- }
1043
- else {
1044
- vErrors.push(err1);
1045
- }
1046
- errors++;
1047
- }
1048
- else {
1049
- if (data0 < 0 || isNaN(data0)) {
1050
- const err2 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
1051
- if (vErrors === null) {
1052
- vErrors = [err2];
1053
- }
1054
- else {
1055
- vErrors.push(err2);
1056
- }
1057
- errors++;
1058
- }
1059
- }
1060
- }
1061
- }
1062
- var _valid0 = _errs5 === errors;
1063
- if (_valid0) {
1064
- valid2 = true;
1065
- passing0 = 0;
1066
- }
1067
- const _errs7 = errors;
1068
- if (errors === _errs7) {
1069
- if (typeof data0 === "string") {
1070
- if (!pattern1.test(data0)) {
1071
- const err3 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/1/pattern", keyword: "pattern", params: { pattern: "^[0-9]+$" }, message: 'must match pattern "^[0-9]+$"' };
1072
- if (vErrors === null) {
1073
- vErrors = [err3];
1074
- }
1075
- else {
1076
- vErrors.push(err3);
1077
- }
1078
- errors++;
1079
- }
1080
- }
1081
- else {
1082
- const err4 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1083
- if (vErrors === null) {
1084
- vErrors = [err4];
1085
- }
1086
- else {
1087
- vErrors.push(err4);
1088
- }
1089
- errors++;
1090
- }
1091
- }
1092
- var _valid0 = _errs7 === errors;
1093
- if (_valid0 && valid2) {
1094
- valid2 = false;
1095
- passing0 = [passing0, 1];
1096
- }
1097
- else {
1098
- if (_valid0) {
1099
- valid2 = true;
1100
- passing0 = 1;
1101
- }
1102
- }
1103
- if (!valid2) {
1104
- const err5 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
1105
- if (vErrors === null) {
1106
- vErrors = [err5];
1107
- }
1108
- else {
1109
- vErrors.push(err5);
1110
- }
1111
- errors++;
1112
- validate26.errors = vErrors;
1113
- return false;
1114
- }
1115
- else {
1116
- errors = _errs4;
1117
- if (vErrors !== null) {
1118
- if (_errs4) {
1119
- vErrors.length = _errs4;
1120
- }
1121
- else {
1122
- vErrors = null;
1123
- }
1124
- }
1125
- }
1126
- var valid0 = _errs2 === errors;
1127
- }
1128
- else {
1129
- var valid0 = true;
1130
- }
1131
- if (valid0) {
1132
- if (data.key !== void 0) {
1133
- const _errs9 = errors;
1134
- if (!validate27(data.key, { instancePath: instancePath + "/key", parentData: data, parentDataProperty: "key", rootData })) {
1135
- vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
1136
- errors = vErrors.length;
1137
- }
1138
- var valid0 = _errs9 === errors;
1139
- }
1140
- else {
1141
- var valid0 = true;
1142
- }
1143
- }
1144
- }
1145
- }
1146
- }
1147
- else {
1148
- validate26.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1149
- return false;
1150
- }
1151
- }
1152
- validate26.errors = vErrors;
1153
- return errors === 0;
1154
- }
1155
- function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1156
- let vErrors = null;
1157
- let errors = 0;
1158
- if (errors === 0) {
1159
- if (Array.isArray(data)) {
1160
- var valid0 = true;
1161
- const len0 = data.length;
1162
- for (let i0 = 0; i0 < len0; i0++) {
1163
- const _errs1 = errors;
1164
- if (!validate26(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
1165
- vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
1166
- errors = vErrors.length;
1167
- }
1168
- var valid0 = _errs1 === errors;
1169
- if (!valid0) {
1170
- break;
1171
- }
1172
- }
1173
- }
1174
- else {
1175
- validate25.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
1176
- return false;
1177
- }
1178
- }
1179
- validate25.errors = vErrors;
1180
- return errors === 0;
1181
- }
1182
- function validate24(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1183
- let vErrors = null;
1184
- let errors = 0;
1185
- if (errors === 0) {
1186
- if (data && typeof data == "object" && !Array.isArray(data)) {
1187
- let missing0;
1188
- if (data.id === void 0 && (missing0 = "id") || data.row === void 0 && (missing0 = "row")) {
1189
- validate24.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1190
- return false;
1191
- }
1192
- else {
1193
- const _errs1 = errors;
1194
- for (const key0 in data) {
1195
- if (!(key0 === "id" || key0 === "row")) {
1196
- validate24.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1197
- return false;
1198
- break;
1199
- }
1200
- }
1201
- if (_errs1 === errors) {
1202
- if (data.id !== void 0) {
1203
- let data0 = data.id;
1204
- const _errs2 = errors;
1205
- const _errs3 = errors;
1206
- if (errors === _errs3) {
1207
- if (typeof data0 === "string") {
1208
- if (!pattern0.test(data0)) {
1209
- validate24.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
1210
- return false;
1211
- }
1212
- }
1213
- else {
1214
- validate24.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1215
- return false;
1216
- }
1217
- }
1218
- var valid0 = _errs2 === errors;
1219
- }
1220
- else {
1221
- var valid0 = true;
1222
- }
1223
- if (valid0) {
1224
- if (data.row !== void 0) {
1225
- const _errs5 = errors;
1226
- if (!validate25(data.row, { instancePath: instancePath + "/row", parentData: data, parentDataProperty: "row", rootData })) {
1227
- vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
1228
- errors = vErrors.length;
1229
- }
1230
- var valid0 = _errs5 === errors;
1231
- }
1232
- else {
1233
- var valid0 = true;
1234
- }
1235
- }
1236
- }
1237
- }
1238
- }
1239
- else {
1240
- validate24.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1241
- return false;
1242
- }
1243
- }
1244
- validate24.errors = vErrors;
1245
- return errors === 0;
1246
- }
1247
- function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1248
- let vErrors = null;
1249
- let errors = 0;
1250
- if (errors === 0) {
1251
- if (Array.isArray(data)) {
1252
- var valid0 = true;
1253
- const len0 = data.length;
1254
- for (let i0 = 0; i0 < len0; i0++) {
1255
- const _errs1 = errors;
1256
- if (!validate24(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
1257
- vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
1258
- errors = vErrors.length;
1259
- }
1260
- var valid0 = _errs1 === errors;
1261
- if (!valid0) {
1262
- break;
1263
- }
1264
- }
1265
- }
1266
- else {
1267
- validate23.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
1268
- return false;
1269
- }
1270
- }
1271
- validate23.errors = vErrors;
1272
- return errors === 0;
1273
- }
1274
- function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1275
- let vErrors = null;
1276
- let errors = 0;
1277
- if (errors === 0) {
1278
- if (data && typeof data == "object" && !Array.isArray(data)) {
1279
- let missing0;
1280
- if (data.layer === void 0 && (missing0 = "layer")) {
1281
- validate22.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1282
- return false;
1283
- }
1284
- else {
1285
- const _errs1 = errors;
1286
- for (const key0 in data) {
1287
- if (!(key0 === "font" || key0 === "fontsize" || key0 === "layer" || key0 === "displayUnderlying" || key0 === "defaultHint")) {
1288
- validate22.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1289
- return false;
1290
- break;
1291
- }
1292
- }
1293
- if (_errs1 === errors) {
1294
- if (data.font !== void 0) {
1295
- const _errs2 = errors;
1296
- if (typeof data.font !== "string") {
1297
- validate22.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1298
- return false;
1299
- }
1300
- var valid0 = _errs2 === errors;
1301
- }
1302
- else {
1303
- var valid0 = true;
1304
- }
1305
- if (valid0) {
1306
- if (data.fontsize !== void 0) {
1307
- const _errs5 = errors;
1308
- if (typeof data.fontsize !== "string") {
1309
- validate22.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1310
- return false;
1311
- }
1312
- var valid0 = _errs5 === errors;
1313
- }
1314
- else {
1315
- var valid0 = true;
1316
- }
1317
- if (valid0) {
1318
- if (data.layer !== void 0) {
1319
- const _errs8 = errors;
1320
- if (!validate23(data.layer, { instancePath: instancePath + "/layer", parentData: data, parentDataProperty: "layer", rootData })) {
1321
- vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
1322
- errors = vErrors.length;
1323
- }
1324
- var valid0 = _errs8 === errors;
1325
- }
1326
- else {
1327
- var valid0 = true;
1328
- }
1329
- if (valid0) {
1330
- if (data.displayUnderlying !== void 0) {
1331
- const _errs9 = errors;
1332
- if (typeof data.displayUnderlying !== "boolean") {
1333
- validate22.errors = [{ instancePath: instancePath + "/displayUnderlying", schemaPath: "#/properties/displayUnderlying/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
1334
- return false;
1335
- }
1336
- var valid0 = _errs9 === errors;
1337
- }
1338
- else {
1339
- var valid0 = true;
1340
- }
1341
- if (valid0) {
1342
- if (data.defaultHint !== void 0) {
1343
- let data4 = data.defaultHint;
1344
- const _errs11 = errors;
1345
- if (typeof data4 !== "string") {
1346
- validate22.errors = [{ instancePath: instancePath + "/defaultHint", schemaPath: "#/properties/defaultHint/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1347
- return false;
1348
- }
1349
- if (!(data4 === "none" || data4 === "dot" || data4 === "longpress" || data4 === "multitap" || data4 === "flick" || data4 === "flick-n" || data4 === "flick-ne" || data4 === "flick-e" || data4 === "flick-se" || data4 === "flick-s" || data4 === "flick-sw" || data4 === "flick-w" || data4 === "flick-nw")) {
1350
- validate22.errors = [{ instancePath: instancePath + "/defaultHint", schemaPath: "#/properties/defaultHint/enum", keyword: "enum", params: { allowedValues: schema24.properties.defaultHint.enum }, message: "must be equal to one of the allowed values" }];
1351
- return false;
1352
- }
1353
- var valid0 = _errs11 === errors;
1354
- }
1355
- else {
1356
- var valid0 = true;
1357
- }
1358
- }
1359
- }
1360
- }
1361
- }
1362
- }
1363
- }
1364
- }
1365
- else {
1366
- validate22.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1367
- return false;
1368
- }
1369
- }
1370
- validate22.errors = vErrors;
1371
- return errors === 0;
1372
- }
1373
- function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1374
- let vErrors = null;
1375
- let errors = 0;
1376
- if (errors === 0) {
1377
- if (data && typeof data == "object" && !Array.isArray(data)) {
1378
- if (data.tablet !== void 0) {
1379
- const _errs1 = errors;
1380
- if (!validate22(data.tablet, { instancePath: instancePath + "/tablet", parentData: data, parentDataProperty: "tablet", rootData })) {
1381
- vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1382
- errors = vErrors.length;
1383
- }
1384
- var valid0 = _errs1 === errors;
1385
- }
1386
- else {
1387
- var valid0 = true;
1388
- }
1389
- if (valid0) {
1390
- if (data.phone !== void 0) {
1391
- const _errs2 = errors;
1392
- if (!validate22(data.phone, { instancePath: instancePath + "/phone", parentData: data, parentDataProperty: "phone", rootData })) {
1393
- vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1394
- errors = vErrors.length;
1395
- }
1396
- var valid0 = _errs2 === errors;
1397
- }
1398
- else {
1399
- var valid0 = true;
1400
- }
1401
- if (valid0) {
1402
- if (data.desktop !== void 0) {
1403
- const _errs3 = errors;
1404
- if (!validate22(data.desktop, { instancePath: instancePath + "/desktop", parentData: data, parentDataProperty: "desktop", rootData })) {
1405
- vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1406
- errors = vErrors.length;
1407
- }
1408
- var valid0 = _errs3 === errors;
1409
- }
1410
- else {
1411
- var valid0 = true;
1412
- }
1413
- }
1414
- }
1415
- }
1416
- else {
1417
- validate21.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1418
- return false;
1419
- }
1420
- }
1421
- validate21.errors = vErrors;
1422
- return errors === 0;
1423
- }
1424
- function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1425
- let vErrors = null;
1426
- let errors = 0;
1427
- if (!validate21(data, { instancePath, parentData, parentDataProperty, rootData })) {
1428
- vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
1429
- errors = vErrors.length;
1430
- }
1431
- validate20.errors = vErrors;
1432
- return errors === 0;
1433
- }
1434
- }
1435
- });
1436
- export default require_keyman_touch_layout_spec_validator();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ec131f0a-58a1-5690-bac7-3b601effa26e")}catch(e){}}();
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __commonJS = (cb, mod) => function __require() {
5
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6
+ };
7
+ // obj/schemas/keyman-touch-layout.spec.validator.cjs
8
+ var require_keyman_touch_layout_spec_validator = __commonJS({
9
+ "obj/schemas/keyman-touch-layout.spec.validator.cjs"(exports, module) {
10
+ module.exports = validate20;
11
+ module.exports.default = validate20;
12
+ var schema24 = { "type": "object", "properties": { "font": { "$ref": "#/definitions/font-spec" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "layer": { "$ref": "#/definitions/layers" }, "displayUnderlying": { "type": "boolean" }, "defaultHint": { "type": "string", "enum": ["none", "dot", "longpress", "multitap", "flick", "flick-n", "flick-ne", "flick-e", "flick-se", "flick-s", "flick-sw", "flick-w", "flick-nw"] } }, "required": ["layer"], "additionalProperties": false };
13
+ var pattern0 = new RegExp("^[\\S]+$", "u");
14
+ var pattern1 = new RegExp("^[0-9]+$", "u");
15
+ var schema34 = { "type": "object", "properties": { "id": { "$ref": "#/definitions/key-id" }, "text": { "type": "string" }, "layer": { "$ref": "#/definitions/layer-id" }, "nextlayer": { "$ref": "#/definitions/layer-id" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "font": { "$ref": "#/definitions/font-spec" }, "dk": { "type": "string" }, "sp": { "$ref": "#/definitions/numeric" }, "pad": { "$ref": "#/definitions/numeric" }, "width": { "$ref": "#/definitions/numeric" }, "sk": { "$ref": "#/definitions/subkeys" }, "flick": { "$ref": "#/definitions/flick" }, "multitap": { "$ref": "#/definitions/subkeys" }, "hint": { "type": "string" } }, "additionalProperties": false };
16
+ var func4 = Object.prototype.hasOwnProperty;
17
+ var pattern2 = new RegExp("^[TKUtku]_[a-zA-Z0-9_]+$|^$", "u");
18
+ var pattern5 = new RegExp("^[0-9]+(\\.?[0-9]*)$|^$", "u");
19
+ var schema44 = { "type": "object", "properties": { "id": { "$ref": "#/definitions/key-id" }, "text": { "type": "string" }, "layer": { "$ref": "#/definitions/layer-id" }, "nextlayer": { "$ref": "#/definitions/layer-id" }, "sp": { "$ref": "#/definitions/numeric" }, "pad": { "$ref": "#/definitions/numeric" }, "width": { "$ref": "#/definitions/numeric" }, "fontsize": { "$ref": "#/definitions/fontsize-spec" }, "font": { "$ref": "#/definitions/font-spec" }, "dk": { "type": "string" }, "default": { "type": "boolean" } }, "required": ["id"], "additionalProperties": false };
20
+ function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
21
+ let vErrors = null;
22
+ let errors = 0;
23
+ if (errors === 0) {
24
+ if (data && typeof data == "object" && !Array.isArray(data)) {
25
+ let missing0;
26
+ if (data.id === void 0 && (missing0 = "id")) {
27
+ validate30.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
28
+ return false;
29
+ }
30
+ else {
31
+ const _errs1 = errors;
32
+ for (const key0 in data) {
33
+ if (!func4.call(schema44.properties, key0)) {
34
+ validate30.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
35
+ return false;
36
+ break;
37
+ }
38
+ }
39
+ if (_errs1 === errors) {
40
+ if (data.id !== void 0) {
41
+ let data0 = data.id;
42
+ const _errs2 = errors;
43
+ const _errs3 = errors;
44
+ if (errors === _errs3) {
45
+ if (typeof data0 === "string") {
46
+ if (!pattern2.test(data0)) {
47
+ validate30.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/pattern", keyword: "pattern", params: { pattern: "^[TKUtku]_[a-zA-Z0-9_]+$|^$" }, message: 'must match pattern "^[TKUtku]_[a-zA-Z0-9_]+$|^$"' }];
48
+ return false;
49
+ }
50
+ }
51
+ else {
52
+ validate30.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
53
+ return false;
54
+ }
55
+ }
56
+ var valid0 = _errs2 === errors;
57
+ }
58
+ else {
59
+ var valid0 = true;
60
+ }
61
+ if (valid0) {
62
+ if (data.text !== void 0) {
63
+ const _errs5 = errors;
64
+ if (typeof data.text !== "string") {
65
+ validate30.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
66
+ return false;
67
+ }
68
+ var valid0 = _errs5 === errors;
69
+ }
70
+ else {
71
+ var valid0 = true;
72
+ }
73
+ if (valid0) {
74
+ if (data.layer !== void 0) {
75
+ let data2 = data.layer;
76
+ const _errs7 = errors;
77
+ const _errs8 = errors;
78
+ if (errors === _errs8) {
79
+ if (typeof data2 === "string") {
80
+ if (!pattern0.test(data2)) {
81
+ validate30.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
82
+ return false;
83
+ }
84
+ }
85
+ else {
86
+ validate30.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
87
+ return false;
88
+ }
89
+ }
90
+ var valid0 = _errs7 === errors;
91
+ }
92
+ else {
93
+ var valid0 = true;
94
+ }
95
+ if (valid0) {
96
+ if (data.nextlayer !== void 0) {
97
+ let data3 = data.nextlayer;
98
+ const _errs10 = errors;
99
+ const _errs11 = errors;
100
+ if (errors === _errs11) {
101
+ if (typeof data3 === "string") {
102
+ if (!pattern0.test(data3)) {
103
+ validate30.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
104
+ return false;
105
+ }
106
+ }
107
+ else {
108
+ validate30.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
109
+ return false;
110
+ }
111
+ }
112
+ var valid0 = _errs10 === errors;
113
+ }
114
+ else {
115
+ var valid0 = true;
116
+ }
117
+ if (valid0) {
118
+ if (data.sp !== void 0) {
119
+ let data4 = data.sp;
120
+ const _errs13 = errors;
121
+ const _errs15 = errors;
122
+ let valid5 = false;
123
+ let passing0 = null;
124
+ const _errs16 = errors;
125
+ if (errors === _errs16) {
126
+ if (typeof data4 === "string") {
127
+ if (!pattern5.test(data4)) {
128
+ const err0 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
129
+ if (vErrors === null) {
130
+ vErrors = [err0];
131
+ }
132
+ else {
133
+ vErrors.push(err0);
134
+ }
135
+ errors++;
136
+ }
137
+ }
138
+ else {
139
+ const err1 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
140
+ if (vErrors === null) {
141
+ vErrors = [err1];
142
+ }
143
+ else {
144
+ vErrors.push(err1);
145
+ }
146
+ errors++;
147
+ }
148
+ }
149
+ var _valid0 = _errs16 === errors;
150
+ if (_valid0) {
151
+ valid5 = true;
152
+ passing0 = 0;
153
+ }
154
+ const _errs18 = errors;
155
+ if (!(typeof data4 == "number" && isFinite(data4))) {
156
+ const err2 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
157
+ if (vErrors === null) {
158
+ vErrors = [err2];
159
+ }
160
+ else {
161
+ vErrors.push(err2);
162
+ }
163
+ errors++;
164
+ }
165
+ var _valid0 = _errs18 === errors;
166
+ if (_valid0 && valid5) {
167
+ valid5 = false;
168
+ passing0 = [passing0, 1];
169
+ }
170
+ else {
171
+ if (_valid0) {
172
+ valid5 = true;
173
+ passing0 = 1;
174
+ }
175
+ }
176
+ if (!valid5) {
177
+ const err3 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
178
+ if (vErrors === null) {
179
+ vErrors = [err3];
180
+ }
181
+ else {
182
+ vErrors.push(err3);
183
+ }
184
+ errors++;
185
+ validate30.errors = vErrors;
186
+ return false;
187
+ }
188
+ else {
189
+ errors = _errs15;
190
+ if (vErrors !== null) {
191
+ if (_errs15) {
192
+ vErrors.length = _errs15;
193
+ }
194
+ else {
195
+ vErrors = null;
196
+ }
197
+ }
198
+ }
199
+ var valid0 = _errs13 === errors;
200
+ }
201
+ else {
202
+ var valid0 = true;
203
+ }
204
+ if (valid0) {
205
+ if (data.pad !== void 0) {
206
+ let data5 = data.pad;
207
+ const _errs20 = errors;
208
+ const _errs22 = errors;
209
+ let valid7 = false;
210
+ let passing1 = null;
211
+ const _errs23 = errors;
212
+ if (errors === _errs23) {
213
+ if (typeof data5 === "string") {
214
+ if (!pattern5.test(data5)) {
215
+ const err4 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
216
+ if (vErrors === null) {
217
+ vErrors = [err4];
218
+ }
219
+ else {
220
+ vErrors.push(err4);
221
+ }
222
+ errors++;
223
+ }
224
+ }
225
+ else {
226
+ const err5 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
227
+ if (vErrors === null) {
228
+ vErrors = [err5];
229
+ }
230
+ else {
231
+ vErrors.push(err5);
232
+ }
233
+ errors++;
234
+ }
235
+ }
236
+ var _valid1 = _errs23 === errors;
237
+ if (_valid1) {
238
+ valid7 = true;
239
+ passing1 = 0;
240
+ }
241
+ const _errs25 = errors;
242
+ if (!(typeof data5 == "number" && isFinite(data5))) {
243
+ const err6 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
244
+ if (vErrors === null) {
245
+ vErrors = [err6];
246
+ }
247
+ else {
248
+ vErrors.push(err6);
249
+ }
250
+ errors++;
251
+ }
252
+ var _valid1 = _errs25 === errors;
253
+ if (_valid1 && valid7) {
254
+ valid7 = false;
255
+ passing1 = [passing1, 1];
256
+ }
257
+ else {
258
+ if (_valid1) {
259
+ valid7 = true;
260
+ passing1 = 1;
261
+ }
262
+ }
263
+ if (!valid7) {
264
+ const err7 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
265
+ if (vErrors === null) {
266
+ vErrors = [err7];
267
+ }
268
+ else {
269
+ vErrors.push(err7);
270
+ }
271
+ errors++;
272
+ validate30.errors = vErrors;
273
+ return false;
274
+ }
275
+ else {
276
+ errors = _errs22;
277
+ if (vErrors !== null) {
278
+ if (_errs22) {
279
+ vErrors.length = _errs22;
280
+ }
281
+ else {
282
+ vErrors = null;
283
+ }
284
+ }
285
+ }
286
+ var valid0 = _errs20 === errors;
287
+ }
288
+ else {
289
+ var valid0 = true;
290
+ }
291
+ if (valid0) {
292
+ if (data.width !== void 0) {
293
+ let data6 = data.width;
294
+ const _errs27 = errors;
295
+ const _errs29 = errors;
296
+ let valid9 = false;
297
+ let passing2 = null;
298
+ const _errs30 = errors;
299
+ if (errors === _errs30) {
300
+ if (typeof data6 === "string") {
301
+ if (!pattern5.test(data6)) {
302
+ const err8 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
303
+ if (vErrors === null) {
304
+ vErrors = [err8];
305
+ }
306
+ else {
307
+ vErrors.push(err8);
308
+ }
309
+ errors++;
310
+ }
311
+ }
312
+ else {
313
+ const err9 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
314
+ if (vErrors === null) {
315
+ vErrors = [err9];
316
+ }
317
+ else {
318
+ vErrors.push(err9);
319
+ }
320
+ errors++;
321
+ }
322
+ }
323
+ var _valid2 = _errs30 === errors;
324
+ if (_valid2) {
325
+ valid9 = true;
326
+ passing2 = 0;
327
+ }
328
+ const _errs32 = errors;
329
+ if (!(typeof data6 == "number" && isFinite(data6))) {
330
+ const err10 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
331
+ if (vErrors === null) {
332
+ vErrors = [err10];
333
+ }
334
+ else {
335
+ vErrors.push(err10);
336
+ }
337
+ errors++;
338
+ }
339
+ var _valid2 = _errs32 === errors;
340
+ if (_valid2 && valid9) {
341
+ valid9 = false;
342
+ passing2 = [passing2, 1];
343
+ }
344
+ else {
345
+ if (_valid2) {
346
+ valid9 = true;
347
+ passing2 = 1;
348
+ }
349
+ }
350
+ if (!valid9) {
351
+ const err11 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing2 }, message: "must match exactly one schema in oneOf" };
352
+ if (vErrors === null) {
353
+ vErrors = [err11];
354
+ }
355
+ else {
356
+ vErrors.push(err11);
357
+ }
358
+ errors++;
359
+ validate30.errors = vErrors;
360
+ return false;
361
+ }
362
+ else {
363
+ errors = _errs29;
364
+ if (vErrors !== null) {
365
+ if (_errs29) {
366
+ vErrors.length = _errs29;
367
+ }
368
+ else {
369
+ vErrors = null;
370
+ }
371
+ }
372
+ }
373
+ var valid0 = _errs27 === errors;
374
+ }
375
+ else {
376
+ var valid0 = true;
377
+ }
378
+ if (valid0) {
379
+ if (data.fontsize !== void 0) {
380
+ const _errs34 = errors;
381
+ if (typeof data.fontsize !== "string") {
382
+ validate30.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
383
+ return false;
384
+ }
385
+ var valid0 = _errs34 === errors;
386
+ }
387
+ else {
388
+ var valid0 = true;
389
+ }
390
+ if (valid0) {
391
+ if (data.font !== void 0) {
392
+ const _errs37 = errors;
393
+ if (typeof data.font !== "string") {
394
+ validate30.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
395
+ return false;
396
+ }
397
+ var valid0 = _errs37 === errors;
398
+ }
399
+ else {
400
+ var valid0 = true;
401
+ }
402
+ if (valid0) {
403
+ if (data.dk !== void 0) {
404
+ const _errs40 = errors;
405
+ if (typeof data.dk !== "string") {
406
+ validate30.errors = [{ instancePath: instancePath + "/dk", schemaPath: "#/properties/dk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
407
+ return false;
408
+ }
409
+ var valid0 = _errs40 === errors;
410
+ }
411
+ else {
412
+ var valid0 = true;
413
+ }
414
+ if (valid0) {
415
+ if (data.default !== void 0) {
416
+ const _errs42 = errors;
417
+ if (typeof data.default !== "boolean") {
418
+ validate30.errors = [{ instancePath: instancePath + "/default", schemaPath: "#/properties/default/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
419
+ return false;
420
+ }
421
+ var valid0 = _errs42 === errors;
422
+ }
423
+ else {
424
+ var valid0 = true;
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ else {
440
+ validate30.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
441
+ return false;
442
+ }
443
+ }
444
+ validate30.errors = vErrors;
445
+ return errors === 0;
446
+ }
447
+ function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
448
+ let vErrors = null;
449
+ let errors = 0;
450
+ if (errors === 0) {
451
+ if (Array.isArray(data)) {
452
+ var valid0 = true;
453
+ const len0 = data.length;
454
+ for (let i0 = 0; i0 < len0; i0++) {
455
+ const _errs1 = errors;
456
+ if (!validate30(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
457
+ vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
458
+ errors = vErrors.length;
459
+ }
460
+ var valid0 = _errs1 === errors;
461
+ if (!valid0) {
462
+ break;
463
+ }
464
+ }
465
+ }
466
+ else {
467
+ validate29.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
468
+ return false;
469
+ }
470
+ }
471
+ validate29.errors = vErrors;
472
+ return errors === 0;
473
+ }
474
+ var pattern14 = new RegExp("^(n|s|e|w|ne|nw|se|sw)$", "u");
475
+ function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
476
+ let vErrors = null;
477
+ let errors = 0;
478
+ if (errors === 0) {
479
+ if (data && typeof data == "object" && !Array.isArray(data)) {
480
+ const _errs1 = errors;
481
+ for (const key0 in data) {
482
+ if (!pattern14.test(key0)) {
483
+ validate33.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
484
+ return false;
485
+ break;
486
+ }
487
+ }
488
+ if (_errs1 === errors) {
489
+ var valid0 = true;
490
+ for (const key1 in data) {
491
+ if (pattern14.test(key1)) {
492
+ const _errs2 = errors;
493
+ if (!validate30(data[key1], { instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key1, rootData })) {
494
+ vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
495
+ errors = vErrors.length;
496
+ }
497
+ var valid0 = _errs2 === errors;
498
+ if (!valid0) {
499
+ break;
500
+ }
501
+ }
502
+ }
503
+ }
504
+ }
505
+ else {
506
+ validate33.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
507
+ return false;
508
+ }
509
+ }
510
+ validate33.errors = vErrors;
511
+ return errors === 0;
512
+ }
513
+ function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
514
+ let vErrors = null;
515
+ let errors = 0;
516
+ if (errors === 0) {
517
+ if (data && typeof data == "object" && !Array.isArray(data)) {
518
+ const _errs1 = errors;
519
+ for (const key0 in data) {
520
+ if (!func4.call(schema34.properties, key0)) {
521
+ validate28.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
522
+ return false;
523
+ break;
524
+ }
525
+ }
526
+ if (_errs1 === errors) {
527
+ if (data.id !== void 0) {
528
+ let data0 = data.id;
529
+ const _errs2 = errors;
530
+ const _errs3 = errors;
531
+ if (errors === _errs3) {
532
+ if (typeof data0 === "string") {
533
+ if (!pattern2.test(data0)) {
534
+ validate28.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/pattern", keyword: "pattern", params: { pattern: "^[TKUtku]_[a-zA-Z0-9_]+$|^$" }, message: 'must match pattern "^[TKUtku]_[a-zA-Z0-9_]+$|^$"' }];
535
+ return false;
536
+ }
537
+ }
538
+ else {
539
+ validate28.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/key-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
540
+ return false;
541
+ }
542
+ }
543
+ var valid0 = _errs2 === errors;
544
+ }
545
+ else {
546
+ var valid0 = true;
547
+ }
548
+ if (valid0) {
549
+ if (data.text !== void 0) {
550
+ const _errs5 = errors;
551
+ if (typeof data.text !== "string") {
552
+ validate28.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
553
+ return false;
554
+ }
555
+ var valid0 = _errs5 === errors;
556
+ }
557
+ else {
558
+ var valid0 = true;
559
+ }
560
+ if (valid0) {
561
+ if (data.layer !== void 0) {
562
+ let data2 = data.layer;
563
+ const _errs7 = errors;
564
+ const _errs8 = errors;
565
+ if (errors === _errs8) {
566
+ if (typeof data2 === "string") {
567
+ if (!pattern0.test(data2)) {
568
+ validate28.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
569
+ return false;
570
+ }
571
+ }
572
+ else {
573
+ validate28.errors = [{ instancePath: instancePath + "/layer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
574
+ return false;
575
+ }
576
+ }
577
+ var valid0 = _errs7 === errors;
578
+ }
579
+ else {
580
+ var valid0 = true;
581
+ }
582
+ if (valid0) {
583
+ if (data.nextlayer !== void 0) {
584
+ let data3 = data.nextlayer;
585
+ const _errs10 = errors;
586
+ const _errs11 = errors;
587
+ if (errors === _errs11) {
588
+ if (typeof data3 === "string") {
589
+ if (!pattern0.test(data3)) {
590
+ validate28.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
591
+ return false;
592
+ }
593
+ }
594
+ else {
595
+ validate28.errors = [{ instancePath: instancePath + "/nextlayer", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
596
+ return false;
597
+ }
598
+ }
599
+ var valid0 = _errs10 === errors;
600
+ }
601
+ else {
602
+ var valid0 = true;
603
+ }
604
+ if (valid0) {
605
+ if (data.fontsize !== void 0) {
606
+ const _errs13 = errors;
607
+ if (typeof data.fontsize !== "string") {
608
+ validate28.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
609
+ return false;
610
+ }
611
+ var valid0 = _errs13 === errors;
612
+ }
613
+ else {
614
+ var valid0 = true;
615
+ }
616
+ if (valid0) {
617
+ if (data.font !== void 0) {
618
+ const _errs16 = errors;
619
+ if (typeof data.font !== "string") {
620
+ validate28.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
621
+ return false;
622
+ }
623
+ var valid0 = _errs16 === errors;
624
+ }
625
+ else {
626
+ var valid0 = true;
627
+ }
628
+ if (valid0) {
629
+ if (data.dk !== void 0) {
630
+ const _errs19 = errors;
631
+ if (typeof data.dk !== "string") {
632
+ validate28.errors = [{ instancePath: instancePath + "/dk", schemaPath: "#/properties/dk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
633
+ return false;
634
+ }
635
+ var valid0 = _errs19 === errors;
636
+ }
637
+ else {
638
+ var valid0 = true;
639
+ }
640
+ if (valid0) {
641
+ if (data.sp !== void 0) {
642
+ let data7 = data.sp;
643
+ const _errs21 = errors;
644
+ const _errs23 = errors;
645
+ let valid7 = false;
646
+ let passing0 = null;
647
+ const _errs24 = errors;
648
+ if (errors === _errs24) {
649
+ if (typeof data7 === "string") {
650
+ if (!pattern5.test(data7)) {
651
+ const err0 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
652
+ if (vErrors === null) {
653
+ vErrors = [err0];
654
+ }
655
+ else {
656
+ vErrors.push(err0);
657
+ }
658
+ errors++;
659
+ }
660
+ }
661
+ else {
662
+ const err1 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
663
+ if (vErrors === null) {
664
+ vErrors = [err1];
665
+ }
666
+ else {
667
+ vErrors.push(err1);
668
+ }
669
+ errors++;
670
+ }
671
+ }
672
+ var _valid0 = _errs24 === errors;
673
+ if (_valid0) {
674
+ valid7 = true;
675
+ passing0 = 0;
676
+ }
677
+ const _errs26 = errors;
678
+ if (!(typeof data7 == "number" && isFinite(data7))) {
679
+ const err2 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
680
+ if (vErrors === null) {
681
+ vErrors = [err2];
682
+ }
683
+ else {
684
+ vErrors.push(err2);
685
+ }
686
+ errors++;
687
+ }
688
+ var _valid0 = _errs26 === errors;
689
+ if (_valid0 && valid7) {
690
+ valid7 = false;
691
+ passing0 = [passing0, 1];
692
+ }
693
+ else {
694
+ if (_valid0) {
695
+ valid7 = true;
696
+ passing0 = 1;
697
+ }
698
+ }
699
+ if (!valid7) {
700
+ const err3 = { instancePath: instancePath + "/sp", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
701
+ if (vErrors === null) {
702
+ vErrors = [err3];
703
+ }
704
+ else {
705
+ vErrors.push(err3);
706
+ }
707
+ errors++;
708
+ validate28.errors = vErrors;
709
+ return false;
710
+ }
711
+ else {
712
+ errors = _errs23;
713
+ if (vErrors !== null) {
714
+ if (_errs23) {
715
+ vErrors.length = _errs23;
716
+ }
717
+ else {
718
+ vErrors = null;
719
+ }
720
+ }
721
+ }
722
+ var valid0 = _errs21 === errors;
723
+ }
724
+ else {
725
+ var valid0 = true;
726
+ }
727
+ if (valid0) {
728
+ if (data.pad !== void 0) {
729
+ let data8 = data.pad;
730
+ const _errs28 = errors;
731
+ const _errs30 = errors;
732
+ let valid9 = false;
733
+ let passing1 = null;
734
+ const _errs31 = errors;
735
+ if (errors === _errs31) {
736
+ if (typeof data8 === "string") {
737
+ if (!pattern5.test(data8)) {
738
+ const err4 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
739
+ if (vErrors === null) {
740
+ vErrors = [err4];
741
+ }
742
+ else {
743
+ vErrors.push(err4);
744
+ }
745
+ errors++;
746
+ }
747
+ }
748
+ else {
749
+ const err5 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
750
+ if (vErrors === null) {
751
+ vErrors = [err5];
752
+ }
753
+ else {
754
+ vErrors.push(err5);
755
+ }
756
+ errors++;
757
+ }
758
+ }
759
+ var _valid1 = _errs31 === errors;
760
+ if (_valid1) {
761
+ valid9 = true;
762
+ passing1 = 0;
763
+ }
764
+ const _errs33 = errors;
765
+ if (!(typeof data8 == "number" && isFinite(data8))) {
766
+ const err6 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
767
+ if (vErrors === null) {
768
+ vErrors = [err6];
769
+ }
770
+ else {
771
+ vErrors.push(err6);
772
+ }
773
+ errors++;
774
+ }
775
+ var _valid1 = _errs33 === errors;
776
+ if (_valid1 && valid9) {
777
+ valid9 = false;
778
+ passing1 = [passing1, 1];
779
+ }
780
+ else {
781
+ if (_valid1) {
782
+ valid9 = true;
783
+ passing1 = 1;
784
+ }
785
+ }
786
+ if (!valid9) {
787
+ const err7 = { instancePath: instancePath + "/pad", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing1 }, message: "must match exactly one schema in oneOf" };
788
+ if (vErrors === null) {
789
+ vErrors = [err7];
790
+ }
791
+ else {
792
+ vErrors.push(err7);
793
+ }
794
+ errors++;
795
+ validate28.errors = vErrors;
796
+ return false;
797
+ }
798
+ else {
799
+ errors = _errs30;
800
+ if (vErrors !== null) {
801
+ if (_errs30) {
802
+ vErrors.length = _errs30;
803
+ }
804
+ else {
805
+ vErrors = null;
806
+ }
807
+ }
808
+ }
809
+ var valid0 = _errs28 === errors;
810
+ }
811
+ else {
812
+ var valid0 = true;
813
+ }
814
+ if (valid0) {
815
+ if (data.width !== void 0) {
816
+ let data9 = data.width;
817
+ const _errs35 = errors;
818
+ const _errs37 = errors;
819
+ let valid11 = false;
820
+ let passing2 = null;
821
+ const _errs38 = errors;
822
+ if (errors === _errs38) {
823
+ if (typeof data9 === "string") {
824
+ if (!pattern5.test(data9)) {
825
+ const err8 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.?[0-9]*)$|^$" }, message: 'must match pattern "^[0-9]+(\\.?[0-9]*)$|^$"' };
826
+ if (vErrors === null) {
827
+ vErrors = [err8];
828
+ }
829
+ else {
830
+ vErrors.push(err8);
831
+ }
832
+ errors++;
833
+ }
834
+ }
835
+ else {
836
+ const err9 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
837
+ if (vErrors === null) {
838
+ vErrors = [err9];
839
+ }
840
+ else {
841
+ vErrors.push(err9);
842
+ }
843
+ errors++;
844
+ }
845
+ }
846
+ var _valid2 = _errs38 === errors;
847
+ if (_valid2) {
848
+ valid11 = true;
849
+ passing2 = 0;
850
+ }
851
+ const _errs40 = errors;
852
+ if (!(typeof data9 == "number" && isFinite(data9))) {
853
+ const err10 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
854
+ if (vErrors === null) {
855
+ vErrors = [err10];
856
+ }
857
+ else {
858
+ vErrors.push(err10);
859
+ }
860
+ errors++;
861
+ }
862
+ var _valid2 = _errs40 === errors;
863
+ if (_valid2 && valid11) {
864
+ valid11 = false;
865
+ passing2 = [passing2, 1];
866
+ }
867
+ else {
868
+ if (_valid2) {
869
+ valid11 = true;
870
+ passing2 = 1;
871
+ }
872
+ }
873
+ if (!valid11) {
874
+ const err11 = { instancePath: instancePath + "/width", schemaPath: "#/definitions/numeric/oneOf", keyword: "oneOf", params: { passingSchemas: passing2 }, message: "must match exactly one schema in oneOf" };
875
+ if (vErrors === null) {
876
+ vErrors = [err11];
877
+ }
878
+ else {
879
+ vErrors.push(err11);
880
+ }
881
+ errors++;
882
+ validate28.errors = vErrors;
883
+ return false;
884
+ }
885
+ else {
886
+ errors = _errs37;
887
+ if (vErrors !== null) {
888
+ if (_errs37) {
889
+ vErrors.length = _errs37;
890
+ }
891
+ else {
892
+ vErrors = null;
893
+ }
894
+ }
895
+ }
896
+ var valid0 = _errs35 === errors;
897
+ }
898
+ else {
899
+ var valid0 = true;
900
+ }
901
+ if (valid0) {
902
+ if (data.sk !== void 0) {
903
+ const _errs42 = errors;
904
+ if (!validate29(data.sk, { instancePath: instancePath + "/sk", parentData: data, parentDataProperty: "sk", rootData })) {
905
+ vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
906
+ errors = vErrors.length;
907
+ }
908
+ var valid0 = _errs42 === errors;
909
+ }
910
+ else {
911
+ var valid0 = true;
912
+ }
913
+ if (valid0) {
914
+ if (data.flick !== void 0) {
915
+ const _errs43 = errors;
916
+ if (!validate33(data.flick, { instancePath: instancePath + "/flick", parentData: data, parentDataProperty: "flick", rootData })) {
917
+ vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
918
+ errors = vErrors.length;
919
+ }
920
+ var valid0 = _errs43 === errors;
921
+ }
922
+ else {
923
+ var valid0 = true;
924
+ }
925
+ if (valid0) {
926
+ if (data.multitap !== void 0) {
927
+ const _errs44 = errors;
928
+ if (!validate29(data.multitap, { instancePath: instancePath + "/multitap", parentData: data, parentDataProperty: "multitap", rootData })) {
929
+ vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
930
+ errors = vErrors.length;
931
+ }
932
+ var valid0 = _errs44 === errors;
933
+ }
934
+ else {
935
+ var valid0 = true;
936
+ }
937
+ if (valid0) {
938
+ if (data.hint !== void 0) {
939
+ const _errs45 = errors;
940
+ if (typeof data.hint !== "string") {
941
+ validate28.errors = [{ instancePath: instancePath + "/hint", schemaPath: "#/properties/hint/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
942
+ return false;
943
+ }
944
+ var valid0 = _errs45 === errors;
945
+ }
946
+ else {
947
+ var valid0 = true;
948
+ }
949
+ }
950
+ }
951
+ }
952
+ }
953
+ }
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }
959
+ }
960
+ }
961
+ }
962
+ }
963
+ }
964
+ else {
965
+ validate28.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
966
+ return false;
967
+ }
968
+ }
969
+ validate28.errors = vErrors;
970
+ return errors === 0;
971
+ }
972
+ function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
973
+ let vErrors = null;
974
+ let errors = 0;
975
+ if (errors === 0) {
976
+ if (Array.isArray(data)) {
977
+ var valid0 = true;
978
+ const len0 = data.length;
979
+ for (let i0 = 0; i0 < len0; i0++) {
980
+ const _errs1 = errors;
981
+ if (!validate28(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
982
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
983
+ errors = vErrors.length;
984
+ }
985
+ var valid0 = _errs1 === errors;
986
+ if (!valid0) {
987
+ break;
988
+ }
989
+ }
990
+ }
991
+ else {
992
+ validate27.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
993
+ return false;
994
+ }
995
+ }
996
+ validate27.errors = vErrors;
997
+ return errors === 0;
998
+ }
999
+ function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1000
+ let vErrors = null;
1001
+ let errors = 0;
1002
+ if (errors === 0) {
1003
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1004
+ let missing0;
1005
+ if (data.id === void 0 && (missing0 = "id") || data.key === void 0 && (missing0 = "key")) {
1006
+ validate26.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1007
+ return false;
1008
+ }
1009
+ else {
1010
+ const _errs1 = errors;
1011
+ for (const key0 in data) {
1012
+ if (!(key0 === "id" || key0 === "key")) {
1013
+ validate26.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1014
+ return false;
1015
+ break;
1016
+ }
1017
+ }
1018
+ if (_errs1 === errors) {
1019
+ if (data.id !== void 0) {
1020
+ let data0 = data.id;
1021
+ const _errs2 = errors;
1022
+ const _errs4 = errors;
1023
+ let valid2 = false;
1024
+ let passing0 = null;
1025
+ const _errs5 = errors;
1026
+ if (!(typeof data0 == "number" && (!(data0 % 1) && !isNaN(data0)) && isFinite(data0))) {
1027
+ const err0 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
1028
+ if (vErrors === null) {
1029
+ vErrors = [err0];
1030
+ }
1031
+ else {
1032
+ vErrors.push(err0);
1033
+ }
1034
+ errors++;
1035
+ }
1036
+ if (errors === _errs5) {
1037
+ if (typeof data0 == "number" && isFinite(data0)) {
1038
+ if (data0 > 100 || isNaN(data0)) {
1039
+ const err1 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/maximum", keyword: "maximum", params: { comparison: "<=", limit: 100 }, message: "must be <= 100" };
1040
+ if (vErrors === null) {
1041
+ vErrors = [err1];
1042
+ }
1043
+ else {
1044
+ vErrors.push(err1);
1045
+ }
1046
+ errors++;
1047
+ }
1048
+ else {
1049
+ if (data0 < 0 || isNaN(data0)) {
1050
+ const err2 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/0/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
1051
+ if (vErrors === null) {
1052
+ vErrors = [err2];
1053
+ }
1054
+ else {
1055
+ vErrors.push(err2);
1056
+ }
1057
+ errors++;
1058
+ }
1059
+ }
1060
+ }
1061
+ }
1062
+ var _valid0 = _errs5 === errors;
1063
+ if (_valid0) {
1064
+ valid2 = true;
1065
+ passing0 = 0;
1066
+ }
1067
+ const _errs7 = errors;
1068
+ if (errors === _errs7) {
1069
+ if (typeof data0 === "string") {
1070
+ if (!pattern1.test(data0)) {
1071
+ const err3 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/1/pattern", keyword: "pattern", params: { pattern: "^[0-9]+$" }, message: 'must match pattern "^[0-9]+$"' };
1072
+ if (vErrors === null) {
1073
+ vErrors = [err3];
1074
+ }
1075
+ else {
1076
+ vErrors.push(err3);
1077
+ }
1078
+ errors++;
1079
+ }
1080
+ }
1081
+ else {
1082
+ const err4 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf/1/type", keyword: "type", params: { type: "string" }, message: "must be string" };
1083
+ if (vErrors === null) {
1084
+ vErrors = [err4];
1085
+ }
1086
+ else {
1087
+ vErrors.push(err4);
1088
+ }
1089
+ errors++;
1090
+ }
1091
+ }
1092
+ var _valid0 = _errs7 === errors;
1093
+ if (_valid0 && valid2) {
1094
+ valid2 = false;
1095
+ passing0 = [passing0, 1];
1096
+ }
1097
+ else {
1098
+ if (_valid0) {
1099
+ valid2 = true;
1100
+ passing0 = 1;
1101
+ }
1102
+ }
1103
+ if (!valid2) {
1104
+ const err5 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/row-id/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
1105
+ if (vErrors === null) {
1106
+ vErrors = [err5];
1107
+ }
1108
+ else {
1109
+ vErrors.push(err5);
1110
+ }
1111
+ errors++;
1112
+ validate26.errors = vErrors;
1113
+ return false;
1114
+ }
1115
+ else {
1116
+ errors = _errs4;
1117
+ if (vErrors !== null) {
1118
+ if (_errs4) {
1119
+ vErrors.length = _errs4;
1120
+ }
1121
+ else {
1122
+ vErrors = null;
1123
+ }
1124
+ }
1125
+ }
1126
+ var valid0 = _errs2 === errors;
1127
+ }
1128
+ else {
1129
+ var valid0 = true;
1130
+ }
1131
+ if (valid0) {
1132
+ if (data.key !== void 0) {
1133
+ const _errs9 = errors;
1134
+ if (!validate27(data.key, { instancePath: instancePath + "/key", parentData: data, parentDataProperty: "key", rootData })) {
1135
+ vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
1136
+ errors = vErrors.length;
1137
+ }
1138
+ var valid0 = _errs9 === errors;
1139
+ }
1140
+ else {
1141
+ var valid0 = true;
1142
+ }
1143
+ }
1144
+ }
1145
+ }
1146
+ }
1147
+ else {
1148
+ validate26.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1149
+ return false;
1150
+ }
1151
+ }
1152
+ validate26.errors = vErrors;
1153
+ return errors === 0;
1154
+ }
1155
+ function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1156
+ let vErrors = null;
1157
+ let errors = 0;
1158
+ if (errors === 0) {
1159
+ if (Array.isArray(data)) {
1160
+ var valid0 = true;
1161
+ const len0 = data.length;
1162
+ for (let i0 = 0; i0 < len0; i0++) {
1163
+ const _errs1 = errors;
1164
+ if (!validate26(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
1165
+ vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
1166
+ errors = vErrors.length;
1167
+ }
1168
+ var valid0 = _errs1 === errors;
1169
+ if (!valid0) {
1170
+ break;
1171
+ }
1172
+ }
1173
+ }
1174
+ else {
1175
+ validate25.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
1176
+ return false;
1177
+ }
1178
+ }
1179
+ validate25.errors = vErrors;
1180
+ return errors === 0;
1181
+ }
1182
+ function validate24(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1183
+ let vErrors = null;
1184
+ let errors = 0;
1185
+ if (errors === 0) {
1186
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1187
+ let missing0;
1188
+ if (data.id === void 0 && (missing0 = "id") || data.row === void 0 && (missing0 = "row")) {
1189
+ validate24.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1190
+ return false;
1191
+ }
1192
+ else {
1193
+ const _errs1 = errors;
1194
+ for (const key0 in data) {
1195
+ if (!(key0 === "id" || key0 === "row")) {
1196
+ validate24.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1197
+ return false;
1198
+ break;
1199
+ }
1200
+ }
1201
+ if (_errs1 === errors) {
1202
+ if (data.id !== void 0) {
1203
+ let data0 = data.id;
1204
+ const _errs2 = errors;
1205
+ const _errs3 = errors;
1206
+ if (errors === _errs3) {
1207
+ if (typeof data0 === "string") {
1208
+ if (!pattern0.test(data0)) {
1209
+ validate24.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/layer-id/pattern", keyword: "pattern", params: { pattern: "^[\\S]+$" }, message: 'must match pattern "^[\\S]+$"' }];
1210
+ return false;
1211
+ }
1212
+ }
1213
+ else {
1214
+ validate24.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/definitions/layer-id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1215
+ return false;
1216
+ }
1217
+ }
1218
+ var valid0 = _errs2 === errors;
1219
+ }
1220
+ else {
1221
+ var valid0 = true;
1222
+ }
1223
+ if (valid0) {
1224
+ if (data.row !== void 0) {
1225
+ const _errs5 = errors;
1226
+ if (!validate25(data.row, { instancePath: instancePath + "/row", parentData: data, parentDataProperty: "row", rootData })) {
1227
+ vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
1228
+ errors = vErrors.length;
1229
+ }
1230
+ var valid0 = _errs5 === errors;
1231
+ }
1232
+ else {
1233
+ var valid0 = true;
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+ else {
1240
+ validate24.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1241
+ return false;
1242
+ }
1243
+ }
1244
+ validate24.errors = vErrors;
1245
+ return errors === 0;
1246
+ }
1247
+ function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1248
+ let vErrors = null;
1249
+ let errors = 0;
1250
+ if (errors === 0) {
1251
+ if (Array.isArray(data)) {
1252
+ var valid0 = true;
1253
+ const len0 = data.length;
1254
+ for (let i0 = 0; i0 < len0; i0++) {
1255
+ const _errs1 = errors;
1256
+ if (!validate24(data[i0], { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData })) {
1257
+ vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
1258
+ errors = vErrors.length;
1259
+ }
1260
+ var valid0 = _errs1 === errors;
1261
+ if (!valid0) {
1262
+ break;
1263
+ }
1264
+ }
1265
+ }
1266
+ else {
1267
+ validate23.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
1268
+ return false;
1269
+ }
1270
+ }
1271
+ validate23.errors = vErrors;
1272
+ return errors === 0;
1273
+ }
1274
+ function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1275
+ let vErrors = null;
1276
+ let errors = 0;
1277
+ if (errors === 0) {
1278
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1279
+ let missing0;
1280
+ if (data.layer === void 0 && (missing0 = "layer")) {
1281
+ validate22.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1282
+ return false;
1283
+ }
1284
+ else {
1285
+ const _errs1 = errors;
1286
+ for (const key0 in data) {
1287
+ if (!(key0 === "font" || key0 === "fontsize" || key0 === "layer" || key0 === "displayUnderlying" || key0 === "defaultHint")) {
1288
+ validate22.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1289
+ return false;
1290
+ break;
1291
+ }
1292
+ }
1293
+ if (_errs1 === errors) {
1294
+ if (data.font !== void 0) {
1295
+ const _errs2 = errors;
1296
+ if (typeof data.font !== "string") {
1297
+ validate22.errors = [{ instancePath: instancePath + "/font", schemaPath: "#/definitions/font-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1298
+ return false;
1299
+ }
1300
+ var valid0 = _errs2 === errors;
1301
+ }
1302
+ else {
1303
+ var valid0 = true;
1304
+ }
1305
+ if (valid0) {
1306
+ if (data.fontsize !== void 0) {
1307
+ const _errs5 = errors;
1308
+ if (typeof data.fontsize !== "string") {
1309
+ validate22.errors = [{ instancePath: instancePath + "/fontsize", schemaPath: "#/definitions/fontsize-spec/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1310
+ return false;
1311
+ }
1312
+ var valid0 = _errs5 === errors;
1313
+ }
1314
+ else {
1315
+ var valid0 = true;
1316
+ }
1317
+ if (valid0) {
1318
+ if (data.layer !== void 0) {
1319
+ const _errs8 = errors;
1320
+ if (!validate23(data.layer, { instancePath: instancePath + "/layer", parentData: data, parentDataProperty: "layer", rootData })) {
1321
+ vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
1322
+ errors = vErrors.length;
1323
+ }
1324
+ var valid0 = _errs8 === errors;
1325
+ }
1326
+ else {
1327
+ var valid0 = true;
1328
+ }
1329
+ if (valid0) {
1330
+ if (data.displayUnderlying !== void 0) {
1331
+ const _errs9 = errors;
1332
+ if (typeof data.displayUnderlying !== "boolean") {
1333
+ validate22.errors = [{ instancePath: instancePath + "/displayUnderlying", schemaPath: "#/properties/displayUnderlying/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
1334
+ return false;
1335
+ }
1336
+ var valid0 = _errs9 === errors;
1337
+ }
1338
+ else {
1339
+ var valid0 = true;
1340
+ }
1341
+ if (valid0) {
1342
+ if (data.defaultHint !== void 0) {
1343
+ let data4 = data.defaultHint;
1344
+ const _errs11 = errors;
1345
+ if (typeof data4 !== "string") {
1346
+ validate22.errors = [{ instancePath: instancePath + "/defaultHint", schemaPath: "#/properties/defaultHint/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1347
+ return false;
1348
+ }
1349
+ if (!(data4 === "none" || data4 === "dot" || data4 === "longpress" || data4 === "multitap" || data4 === "flick" || data4 === "flick-n" || data4 === "flick-ne" || data4 === "flick-e" || data4 === "flick-se" || data4 === "flick-s" || data4 === "flick-sw" || data4 === "flick-w" || data4 === "flick-nw")) {
1350
+ validate22.errors = [{ instancePath: instancePath + "/defaultHint", schemaPath: "#/properties/defaultHint/enum", keyword: "enum", params: { allowedValues: schema24.properties.defaultHint.enum }, message: "must be equal to one of the allowed values" }];
1351
+ return false;
1352
+ }
1353
+ var valid0 = _errs11 === errors;
1354
+ }
1355
+ else {
1356
+ var valid0 = true;
1357
+ }
1358
+ }
1359
+ }
1360
+ }
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ else {
1366
+ validate22.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1367
+ return false;
1368
+ }
1369
+ }
1370
+ validate22.errors = vErrors;
1371
+ return errors === 0;
1372
+ }
1373
+ function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1374
+ let vErrors = null;
1375
+ let errors = 0;
1376
+ if (errors === 0) {
1377
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1378
+ if (data.tablet !== void 0) {
1379
+ const _errs1 = errors;
1380
+ if (!validate22(data.tablet, { instancePath: instancePath + "/tablet", parentData: data, parentDataProperty: "tablet", rootData })) {
1381
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1382
+ errors = vErrors.length;
1383
+ }
1384
+ var valid0 = _errs1 === errors;
1385
+ }
1386
+ else {
1387
+ var valid0 = true;
1388
+ }
1389
+ if (valid0) {
1390
+ if (data.phone !== void 0) {
1391
+ const _errs2 = errors;
1392
+ if (!validate22(data.phone, { instancePath: instancePath + "/phone", parentData: data, parentDataProperty: "phone", rootData })) {
1393
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1394
+ errors = vErrors.length;
1395
+ }
1396
+ var valid0 = _errs2 === errors;
1397
+ }
1398
+ else {
1399
+ var valid0 = true;
1400
+ }
1401
+ if (valid0) {
1402
+ if (data.desktop !== void 0) {
1403
+ const _errs3 = errors;
1404
+ if (!validate22(data.desktop, { instancePath: instancePath + "/desktop", parentData: data, parentDataProperty: "desktop", rootData })) {
1405
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
1406
+ errors = vErrors.length;
1407
+ }
1408
+ var valid0 = _errs3 === errors;
1409
+ }
1410
+ else {
1411
+ var valid0 = true;
1412
+ }
1413
+ }
1414
+ }
1415
+ }
1416
+ else {
1417
+ validate21.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1418
+ return false;
1419
+ }
1420
+ }
1421
+ validate21.errors = vErrors;
1422
+ return errors === 0;
1423
+ }
1424
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1425
+ let vErrors = null;
1426
+ let errors = 0;
1427
+ if (!validate21(data, { instancePath, parentData, parentDataProperty, rootData })) {
1428
+ vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
1429
+ errors = vErrors.length;
1430
+ }
1431
+ validate20.errors = vErrors;
1432
+ return errors === 0;
1433
+ }
1434
+ }
1435
+ });
1436
+ export default require_keyman_touch_layout_spec_validator();
1437
1437
  //# sourceMappingURL=keyman-touch-layout.spec.validator.mjs.map
1438
- //# debugId=d7c8e24e-a784-5f9f-8fbc-96e7a36e0211
1438
+ //# debugId=ec131f0a-58a1-5690-bac7-3b601effa26e