@opengis/gis 0.2.206 → 0.2.208

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 (166) hide show
  1. package/README.md +181 -181
  2. package/dist/{CardIcon-Das_4-zP.js → CardIcon-iGo8QJu9.js} +1 -1
  3. package/dist/{EntityTablePage-VnczwXQf.js → EntityTablePage-BiVoVAhN.js} +2 -2
  4. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CSmMFcSb.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BdL5cQgN.js} +1 -1
  5. package/dist/{MapSettings-DQ8UiQm3.js → MapSettings-CXqiYxV4.js} +2 -2
  6. package/dist/{MapToolbarRight.vue_vue_type_script_setup_true_lang-D1pkL5Zi.js → MapToolbarRight.vue_vue_type_script_setup_true_lang-BHCChxmg.js} +1 -1
  7. package/dist/{RastersTablePage-P5UlG30e.js → RastersTablePage-Dgk1wp3d.js} +2 -2
  8. package/dist/{cartocss-jQ06BuDY.js → cartocss-BIpgQU6F.js} +6 -6
  9. package/dist/{import-utils-BSzqf3hF.js → import-utils-CfXKgZFd.js} +1 -1
  10. package/dist/{index-Bbe7SAdS.js → index-CM_DTEUa.js} +49 -43
  11. package/dist/index.css +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.umd.cjs +48 -42
  14. package/dist/{raster-C9rmMnma.js → raster-D_vEBha8.js} +3 -3
  15. package/dist/{register-j_ATka3H.js → register-C5_Un1Ms.js} +3 -3
  16. package/dist/service-JN82JN81.js +3676 -0
  17. package/dist/{vs-datatable-Zl_KZIHN.js → vs-datatable--K-DxayK.js} +2 -2
  18. package/module/gis/cls/service_type.json +42 -42
  19. package/module/gis/form/gis.registers.form.json +127 -127
  20. package/module/test/map/addr.json +302 -302
  21. package/module/test/map/addr1.yml +23 -23
  22. package/module/test/select/address.str_id.sql +3 -3
  23. package/package.json +79 -79
  24. package/plugin.js +64 -64
  25. package/server/migrations/array_intersect.sql +13 -13
  26. package/server/migrations/cartocss.sql +27 -27
  27. package/server/migrations/group_list.sql +74 -74
  28. package/server/migrations/maps.sql +30 -30
  29. package/server/migrations/metadata.sql +415 -415
  30. package/server/migrations/ogc.sql +106 -106
  31. package/server/migrations/rasters.sql +265 -265
  32. package/server/migrations/services.sql +248 -247
  33. package/server/migrations/services_users_rel.sql +22 -22
  34. package/server/migrations/widgets.sql +20 -20
  35. package/server/plugins/crons.js +21 -21
  36. package/server/plugins/mapnik/funcs/checkRasterFile.js +107 -107
  37. package/server/plugins/mapnik/funcs/mapnik.js +151 -151
  38. package/server/plugins/mapnik/funcs/rootFolder.mjs +8 -8
  39. package/server/plugins/mapnik/map.proto +437 -437
  40. package/server/plugins/vite.js +74 -74
  41. package/server/routes/cartocss/cartocss.route.js +31 -31
  42. package/server/routes/cartocss/cartocss.route.test.js +78 -78
  43. package/server/routes/cartocss/cartocss.schema.js +76 -73
  44. package/server/routes/cartocss/functions/add.cartocss.js +39 -39
  45. package/server/routes/cartocss/functions/get.cartocss.js +57 -57
  46. package/server/routes/gis/functions/checkXML.js +107 -107
  47. package/server/routes/gis/functions/dashboard.js +24 -24
  48. package/server/routes/gis/gis.route.js +26 -26
  49. package/server/routes/gis/gis.route.test.js +33 -33
  50. package/server/routes/map/fonts/index.js +1933 -1933
  51. package/server/routes/map/functions/clearTiles.js +35 -35
  52. package/server/routes/map/functions/geojson.js +187 -187
  53. package/server/routes/map/functions/gis.convert.js +65 -65
  54. package/server/routes/map/functions/gis.icon.js +327 -327
  55. package/server/routes/map/functions/jsonData.js +206 -206
  56. package/server/routes/map/functions/layerList.js +144 -144
  57. package/server/routes/map/functions/map.js +122 -122
  58. package/server/routes/map/functions/mapCatalog.js +72 -72
  59. package/server/routes/map/functions/mapCatalogAttribute.js +53 -53
  60. package/server/routes/map/functions/mapFeatures.js +133 -133
  61. package/server/routes/map/functions/mapFormat.js +246 -246
  62. package/server/routes/map/functions/mapTiles.js +162 -162
  63. package/server/routes/map/functions/maps.js +15 -15
  64. package/server/routes/map/functions/marker_icon.js +43 -43
  65. package/server/routes/map/functions/parseGeoFile.js +85 -85
  66. package/server/routes/map/functions/pointHeight.js +51 -51
  67. package/server/routes/map/functions/vtile.js +174 -174
  68. package/server/routes/map/functions/vtile1.js +191 -191
  69. package/server/routes/map/map.route.js +283 -283
  70. package/server/routes/map/map.route.test.js +693 -693
  71. package/server/routes/map/map.schema.js +356 -356
  72. package/server/routes/map/pin/circle1.svg +76 -76
  73. package/server/routes/map/pin/circle2.svg +18 -18
  74. package/server/routes/map/pin/none.svg +12 -12
  75. package/server/routes/map/pin/pin.svg +14 -14
  76. package/server/routes/map/pin/pin1.svg +16 -16
  77. package/server/routes/map/pin/pin2.svg +7 -7
  78. package/server/routes/map/pin/pin3.svg +34 -34
  79. package/server/routes/map/pin/pin4.svg +14 -14
  80. package/server/routes/map/pin/pin5.svg +7 -7
  81. package/server/routes/map/pin/pin6.svg +12 -12
  82. package/server/routes/map/pin/pin7.svg +12 -12
  83. package/server/routes/mapnik/functions/cartoBounds.js +32 -32
  84. package/server/routes/mapnik/functions/clearTiles.js +103 -103
  85. package/server/routes/mapnik/functions/convertBoundToTile.js +27 -27
  86. package/server/routes/mapnik/functions/createXml.js +76 -76
  87. package/server/routes/mapnik/functions/createXmlMulti.js +72 -72
  88. package/server/routes/mapnik/functions/fileSearch.js +35 -35
  89. package/server/routes/mapnik/functions/fileStat.js +28 -28
  90. package/server/routes/mapnik/functions/pretile.js +138 -138
  91. package/server/routes/mapnik/functions/rasterInfo.js +66 -66
  92. package/server/routes/mapnik/functions/readDir.js +22 -22
  93. package/server/routes/mapnik/functions/rtile.js +164 -164
  94. package/server/routes/mapnik/functions/uploadRaster.js +152 -152
  95. package/server/routes/mapnik/functions/uploadXML.js +140 -140
  96. package/server/routes/mapnik/mapnik.route.js +102 -102
  97. package/server/routes/mapnik/mapnik.route.test.js +370 -370
  98. package/server/routes/mapnik/mapnik.schema.mjs +195 -195
  99. package/server/routes/mapnik.prefixless/functions/mapnikLogger.js +31 -31
  100. package/server/routes/mapnik.prefixless/functions/mapnikStat.js +21 -21
  101. package/server/routes/mapnik.prefixless/mapnik.prefixless.route.js +20 -20
  102. package/server/routes/mapnik.prefixless/mapnik.prefixless.route.test.js +91 -91
  103. package/server/routes/mapnik.prefixless/mapnik.prefixless.schema.mjs +27 -27
  104. package/server/routes/maps/functions/add.map.js +42 -42
  105. package/server/routes/maps/functions/del.map.js +17 -17
  106. package/server/routes/maps/functions/get.map.js +119 -119
  107. package/server/routes/maps/maps.route.js +58 -58
  108. package/server/routes/maps/maps.route.test.js +231 -231
  109. package/server/routes/maps/maps.schema.js +9 -9
  110. package/server/routes/metadata/functions/editMetadata.js +35 -35
  111. package/server/routes/metadata/functions/metadataXML.js +19 -19
  112. package/server/routes/metadata/metadata.route.js +26 -26
  113. package/server/routes/metadata/metadata.route.test.js +46 -46
  114. package/server/routes/metadata/metadata.schema.js +53 -53
  115. package/server/routes/ogc/functions/map.info.point.js +117 -117
  116. package/server/routes/ogc/ogc.route.js +21 -21
  117. package/server/routes/ogc/ogc.route.test.js +53 -53
  118. package/server/routes/ogc/ogc.schema.js +16 -16
  119. package/server/routes/permissions/functions/catalog.permissions.edit.js +20 -20
  120. package/server/routes/permissions/functions/catalog.permissions.js +12 -12
  121. package/server/routes/permissions/functions/get.permissions.js +59 -59
  122. package/server/routes/permissions/functions/gis.catalog.js +80 -80
  123. package/server/routes/permissions/permissions.route.js +35 -35
  124. package/server/routes/permissions/permissions.route.test.js +35 -35
  125. package/server/routes/permissions/permissions.schema.js +43 -43
  126. package/server/routes/registers/functions/add.registry.js +37 -37
  127. package/server/routes/registers/functions/classifiers.js +100 -100
  128. package/server/routes/registers/functions/columns.js +3 -3
  129. package/server/routes/registers/functions/content.type.js +9 -9
  130. package/server/routes/registers/functions/del.registry.js +14 -14
  131. package/server/routes/registers/functions/get.info.js +93 -93
  132. package/server/routes/registers/functions/getFilterSQLParametrized/formatValue.js +328 -328
  133. package/server/routes/registers/functions/getFilterSQLParametrized/getFilterQuery.js +126 -126
  134. package/server/routes/registers/functions/getFilterSQLParametrized/getRangeQuery.js +353 -353
  135. package/server/routes/registers/functions/getFilterSQLParametrized/index.js +81 -81
  136. package/server/routes/registers/functions/getTableColumnMeta.js +148 -148
  137. package/server/routes/registers/functions/gis.export.js +159 -159
  138. package/server/routes/registers/functions/gis.registry.js +71 -71
  139. package/server/routes/registers/functions/gis.registry.list.js +61 -61
  140. package/server/routes/registers/functions/gis.suggest.js +310 -310
  141. package/server/routes/registers/functions/handleRegistryRequest.js +178 -178
  142. package/server/routes/registers/functions/map.registry.js +87 -87
  143. package/server/routes/registers/registers.route.js +92 -92
  144. package/server/routes/registers/registers.route.test.js +173 -173
  145. package/server/routes/registers/registers.schema.js +276 -276
  146. package/server/routes/root.mjs +3 -3
  147. package/server/routes/services/functions/add.service.js +62 -62
  148. package/server/routes/services/functions/create.route.js +93 -93
  149. package/server/routes/services/functions/del.service.js +12 -12
  150. package/server/routes/services/functions/get.layer.geom.js +27 -27
  151. package/server/routes/services/functions/get.service.users.js +76 -76
  152. package/server/routes/services/functions/get.services.col.js +34 -34
  153. package/server/routes/services/functions/get.services.js +124 -124
  154. package/server/routes/services/functions/legend.auto.js +77 -77
  155. package/server/routes/services/services.route.js +76 -76
  156. package/server/routes/services/services.route.test.js +171 -171
  157. package/server/routes/services/services.schema.js +459 -459
  158. package/server/routes/widgets/functions/add.widget.js +38 -38
  159. package/server/routes/widgets/functions/del.widget.js +17 -17
  160. package/server/routes/widgets/functions/get.widget.js +41 -41
  161. package/server/routes/widgets/widgets.route.js +61 -61
  162. package/server/routes/widgets/widgets.route.test.js +144 -144
  163. package/server/routes/widgets/widgets.schema.js +24 -24
  164. package/server/shared/listFiles.js +14 -14
  165. package/utils.js +13 -13
  166. package/dist/service-DJAlc1rE.js +0 -3484
@@ -0,0 +1,3676 @@
1
+ var pi = Object.defineProperty;
2
+ var mi = (e, n, t) => n in e ? pi(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var Q = (e, n, t) => mi(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { openBlock as T, createElementBlock as q, createElementVNode as v, defineComponent as ae, ref as I, watch as F, createTextVNode as hi, createVNode as P, createBlock as U, createCommentVNode as H, defineAsyncComponent as gi, unref as Ue, withCtx as Ke, withDirectives as ln, vModelText as an, normalizeClass as Le, Fragment as vt, renderList as yt, toDisplayString as ue, getCurrentInstance as xt, onBeforeUnmount as bt, toRef as vi, computed as he, onMounted as yi, resolveDynamicComponent as xi } from "vue";
5
+ import { useRoute as bi, useRouter as Si } from "vue-router";
6
+ import { notify as oe } from "@opengis/core";
7
+ import { _ as Ge, u as qe, f as _i, M as ki, g as Ci, h as Ai, i as Ei, j as Xn, k as Ti, l as Ii, m as wi, s as Jn, n as Ni } from "./index-CM_DTEUa.js";
8
+ import { _ as Li, a as Oi, b as Fi, c as $i, d as Pi, e as Ri, f as Mi, g as Bi } from "./MapToolbarRight.vue_vue_type_script_setup_true_lang-BHCChxmg.js";
9
+ import { S as Di, C as Ui } from "./CardIcon-iGo8QJu9.js";
10
+ import { _ as St } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
11
+ import { V as ze } from "./vs-datatable--K-DxayK.js";
12
+ import { _ as En, m as Tn, r as Oe } from "./import-utils-CfXKgZFd.js";
13
+ /*! js-yaml 5.5.0 https://github.com/nodeca/js-yaml @license MIT */
14
+ var E = Symbol("NOT_RESOLVED");
15
+ function V(e, n) {
16
+ return {
17
+ tagName: e,
18
+ nodeKind: "scalar",
19
+ implicit: n.implicit ?? !1,
20
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
21
+ implicitFirstChars: n.implicitFirstChars ?? null,
22
+ resolve: n.resolve,
23
+ identify: n.identify,
24
+ represent: n.represent ?? ((t) => String(t)),
25
+ representTagName: n.representTagName ?? (() => e)
26
+ };
27
+ }
28
+ function In(e, n) {
29
+ const t = n.finalize === void 0;
30
+ return {
31
+ tagName: e,
32
+ nodeKind: "sequence",
33
+ implicit: !1,
34
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
35
+ create: n.create,
36
+ addItem: n.addItem,
37
+ finalize: n.finalize ?? ((i) => i),
38
+ carrierIsResult: t,
39
+ identify: n.identify,
40
+ represent: n.represent ?? ((i) => i),
41
+ representTagName: n.representTagName ?? (() => e)
42
+ };
43
+ }
44
+ function Qe(e, n) {
45
+ const t = n.finalize === void 0;
46
+ return {
47
+ tagName: e,
48
+ nodeKind: "mapping",
49
+ implicit: !1,
50
+ matchByTagPrefix: n.matchByTagPrefix ?? !1,
51
+ create: n.create,
52
+ addPair: n.addPair,
53
+ has: n.has,
54
+ keys: n.keys,
55
+ get: n.get,
56
+ finalize: n.finalize ?? ((i) => i),
57
+ carrierIsResult: t,
58
+ identify: n.identify,
59
+ represent: n.represent ?? ((i) => i),
60
+ representTagName: n.representTagName ?? (() => e)
61
+ };
62
+ }
63
+ var Ki = V("tag:yaml.org,2002:str", {
64
+ resolve: (e) => e,
65
+ identify: (e) => typeof e == "string"
66
+ }), qi = [
67
+ "",
68
+ "~",
69
+ "null",
70
+ "Null",
71
+ "NULL"
72
+ ], Vi = V("tag:yaml.org,2002:null", {
73
+ implicit: !0,
74
+ implicitFirstChars: [
75
+ "",
76
+ "~",
77
+ "n",
78
+ "N"
79
+ ],
80
+ resolve: (e) => qi.indexOf(e) !== -1 ? null : E,
81
+ identify: (e) => e === null,
82
+ represent: () => "null"
83
+ }), Yi = V("tag:yaml.org,2002:null", {
84
+ implicit: !0,
85
+ implicitFirstChars: ["n"],
86
+ resolve: (e, n) => e === "null" || n && e === "" ? null : E,
87
+ identify: (e) => e === null,
88
+ represent: () => "null"
89
+ }), ji = [
90
+ "",
91
+ "~",
92
+ "null",
93
+ "Null",
94
+ "NULL"
95
+ ], Wi = V("tag:yaml.org,2002:null", {
96
+ implicit: !0,
97
+ implicitFirstChars: [
98
+ "",
99
+ "~",
100
+ "n",
101
+ "N"
102
+ ],
103
+ resolve: (e) => ji.indexOf(e) !== -1 ? null : E,
104
+ identify: (e) => e === null,
105
+ represent: () => "null"
106
+ }), Gi = [
107
+ "true",
108
+ "True",
109
+ "TRUE"
110
+ ], zi = [
111
+ "false",
112
+ "False",
113
+ "FALSE"
114
+ ], Qi = V("tag:yaml.org,2002:bool", {
115
+ implicit: !0,
116
+ implicitFirstChars: [
117
+ "t",
118
+ "T",
119
+ "f",
120
+ "F"
121
+ ],
122
+ resolve: (e) => Gi.indexOf(e) !== -1 ? !0 : zi.indexOf(e) !== -1 ? !1 : E,
123
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
124
+ represent: (e) => e ? "true" : "false"
125
+ }), Hi = ["true"], Xi = ["false"], Ji = V("tag:yaml.org,2002:bool", {
126
+ implicit: !0,
127
+ implicitFirstChars: ["t", "f"],
128
+ resolve: (e) => Hi.indexOf(e) !== -1 ? !0 : Xi.indexOf(e) !== -1 ? !1 : E,
129
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
130
+ represent: (e) => e ? "true" : "false"
131
+ }), Zi = [
132
+ "true",
133
+ "True",
134
+ "TRUE",
135
+ "y",
136
+ "Y",
137
+ "yes",
138
+ "Yes",
139
+ "YES",
140
+ "on",
141
+ "On",
142
+ "ON"
143
+ ], er = [
144
+ "false",
145
+ "False",
146
+ "FALSE",
147
+ "n",
148
+ "N",
149
+ "no",
150
+ "No",
151
+ "NO",
152
+ "off",
153
+ "Off",
154
+ "OFF"
155
+ ], nr = V("tag:yaml.org,2002:bool", {
156
+ implicit: !0,
157
+ implicitFirstChars: [
158
+ "y",
159
+ "Y",
160
+ "n",
161
+ "N",
162
+ "t",
163
+ "T",
164
+ "f",
165
+ "F",
166
+ "o",
167
+ "O"
168
+ ],
169
+ resolve: (e) => Zi.indexOf(e) !== -1 ? !0 : er.indexOf(e) !== -1 ? !1 : E,
170
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
171
+ represent: (e) => e ? "true" : "false"
172
+ }), tr = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"), ir = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
173
+ function rr(e) {
174
+ let n = e, t = 1;
175
+ return (n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b") ? t * parseInt(n.slice(2), 2) : n.startsWith("0o") ? t * parseInt(n.slice(2), 8) : n.startsWith("0x") ? t * parseInt(n.slice(2), 16) : t * parseInt(n, 10);
176
+ }
177
+ function or(e, n) {
178
+ if (n) {
179
+ if (!ir.test(e)) return E;
180
+ } else if (!tr.test(e)) return E;
181
+ const t = rr(e);
182
+ return Number.isFinite(t) ? t : E;
183
+ }
184
+ var _t = V("tag:yaml.org,2002:int", {
185
+ implicit: !0,
186
+ implicitFirstChars: [
187
+ "-",
188
+ "+",
189
+ ..."0123456789"
190
+ ],
191
+ resolve: or,
192
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
193
+ represent: (e) => e.toString(10)
194
+ }), lr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"), ar = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
195
+ function sr(e) {
196
+ let n = e, t = 1;
197
+ return (n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b") ? t * parseInt(n.slice(2), 2) : n.startsWith("0o") ? t * parseInt(n.slice(2), 8) : n.startsWith("0x") ? t * parseInt(n.slice(2), 16) : t * parseInt(n, 10);
198
+ }
199
+ function cr(e, n) {
200
+ if (n) {
201
+ if (!ar.test(e)) return E;
202
+ } else if (!lr.test(e)) return E;
203
+ const t = sr(e);
204
+ return Number.isFinite(t) ? t : E;
205
+ }
206
+ var ur = V("tag:yaml.org,2002:int", {
207
+ implicit: !0,
208
+ implicitFirstChars: ["-", ..."0123456789"],
209
+ resolve: cr,
210
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
211
+ represent: (e) => e.toString(10)
212
+ }), fr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");
213
+ function dr(e) {
214
+ let n = e.replace(/_/g, ""), t = 1;
215
+ if ((n[0] === "-" || n[0] === "+") && (n[0] === "-" && (t = -1), n = n.slice(1)), n.startsWith("0b")) return t * parseInt(n.slice(2), 2);
216
+ if (n.startsWith("0x")) return t * parseInt(n.slice(2), 16);
217
+ if (n.includes(":")) {
218
+ let i = 0;
219
+ for (const r of n.split(":")) i = i * 60 + Number(r);
220
+ return t * i;
221
+ }
222
+ return n !== "0" && n[0] === "0" ? t * parseInt(n, 8) : t * parseInt(n, 10);
223
+ }
224
+ function pr(e) {
225
+ if (!fr.test(e)) return E;
226
+ const n = dr(e);
227
+ return Number.isFinite(n) ? n : E;
228
+ }
229
+ var hn = V("tag:yaml.org,2002:int", {
230
+ implicit: !0,
231
+ implicitFirstChars: [
232
+ "-",
233
+ "+",
234
+ ..."0123456789"
235
+ ],
236
+ resolve: pr,
237
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
238
+ represent: (e) => e.toString(10)
239
+ }), mr = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), hr = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
240
+ function gr(e) {
241
+ if (!mr.test(e)) return E;
242
+ let n = e.toLowerCase();
243
+ const t = n[0] === "-" ? -1 : 1;
244
+ if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
245
+ if (n === ".nan") return NaN;
246
+ const i = t * parseFloat(n);
247
+ return Number.isFinite(i) || hr.test(e) ? i : E;
248
+ }
249
+ function vr(e) {
250
+ if (isNaN(e)) return ".nan";
251
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
252
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
253
+ if (Object.is(e, -0)) return "-0.0";
254
+ const n = e.toString(10);
255
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
256
+ }
257
+ var kt = V("tag:yaml.org,2002:float", {
258
+ implicit: !0,
259
+ implicitFirstChars: [
260
+ "-",
261
+ "+",
262
+ ".",
263
+ ..."0123456789"
264
+ ],
265
+ resolve: gr,
266
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
267
+ represent: vr
268
+ }), yr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"), xr = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
269
+ function br(e, n) {
270
+ if (n) {
271
+ if (!xr.test(e)) return E;
272
+ let i = e.toLowerCase();
273
+ const r = i[0] === "-" ? -1 : 1;
274
+ if ("+-".includes(i[0]) && (i = i.slice(1)), i === ".inf") return r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
275
+ if (i === ".nan") return NaN;
276
+ const o = r * parseFloat(i);
277
+ return Number.isFinite(o) ? o : E;
278
+ }
279
+ if (!yr.test(e)) return E;
280
+ const t = Number(e);
281
+ return Number.isFinite(t) ? t : E;
282
+ }
283
+ function Sr(e) {
284
+ if (isNaN(e)) return ".nan";
285
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
286
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
287
+ if (Object.is(e, -0)) return "-0.0";
288
+ const n = e.toString(10);
289
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
290
+ }
291
+ var _r = V("tag:yaml.org,2002:float", {
292
+ implicit: !0,
293
+ implicitFirstChars: ["-", ..."0123456789"],
294
+ resolve: br,
295
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
296
+ represent: Sr
297
+ }), kr = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), Cr = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
298
+ function Ar(e) {
299
+ if (!kr.test(e)) return E;
300
+ let n = e.toLowerCase().replace(/_/g, "");
301
+ const t = n[0] === "-" ? -1 : 1;
302
+ if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
303
+ if (n === ".nan") return NaN;
304
+ let i = 0;
305
+ if (n.includes(":")) {
306
+ for (const r of n.split(":")) i = i * 60 + Number(r);
307
+ i *= t;
308
+ } else i = t * parseFloat(n);
309
+ return Number.isFinite(i) || Cr.test(e) ? i : E;
310
+ }
311
+ function Er(e) {
312
+ if (isNaN(e)) return ".nan";
313
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
314
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
315
+ if (Object.is(e, -0)) return "-0.0";
316
+ const n = e.toString(10);
317
+ return /^[-+]?[0-9]+e/.test(n) ? n.replace("e", ".e") : n;
318
+ }
319
+ var gn = V("tag:yaml.org,2002:float", {
320
+ implicit: !0,
321
+ implicitFirstChars: [
322
+ "-",
323
+ "+",
324
+ ".",
325
+ ..."0123456789"
326
+ ],
327
+ resolve: Ar,
328
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
329
+ represent: Er
330
+ }), Tr = V("tag:yaml.org,2002:merge", {
331
+ implicit: !0,
332
+ implicitFirstChars: ["<"],
333
+ resolve: (e, n) => e === "<<" || n && e === "" ? "<<" : E,
334
+ identify: () => !1
335
+ }), Ir = /^[A-Za-z0-9+/]*={0,2}$/;
336
+ function wr(e) {
337
+ const n = e.replace(/\s/g, "");
338
+ if (n.length % 4 !== 0 || !Ir.test(n)) return E;
339
+ const t = atob(n), i = new Uint8Array(t.length);
340
+ for (let r = 0; r < t.length; r++) i[r] = t.charCodeAt(r);
341
+ return i;
342
+ }
343
+ function Nr(e) {
344
+ let n = "";
345
+ for (let t = 0; t < e.length; t++) n += String.fromCharCode(e[t]);
346
+ return btoa(n);
347
+ }
348
+ var Lr = V("tag:yaml.org,2002:binary", {
349
+ resolve: wr,
350
+ identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]",
351
+ represent: Nr
352
+ }), Or = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Fr = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
353
+ function Zn(e, n, t, i = 0, r = 0, o = 0, l = 0) {
354
+ const a = new Date(Date.UTC(e, n, t, i, r, o, l));
355
+ return a.setUTCFullYear(e, n, t), a;
356
+ }
357
+ function $r(e) {
358
+ let n = Or.exec(e);
359
+ if (n === null && (n = Fr.exec(e)), n === null) return E;
360
+ const t = +n[1], i = +n[2] - 1, r = +n[3];
361
+ if (!n[4]) {
362
+ const u = Zn(t, i, r);
363
+ return u.getUTCFullYear() !== t || u.getUTCMonth() !== i || u.getUTCDate() !== r ? E : u;
364
+ }
365
+ const o = +n[4], l = +n[5], a = +n[6];
366
+ let s = 0;
367
+ if (o > 23 || l > 59 || a > 59) return E;
368
+ if (n[7]) {
369
+ let u = n[7].slice(0, 3);
370
+ for (; u.length < 3; ) u += "0";
371
+ s = +u;
372
+ }
373
+ const c = Zn(t, i, r, o, l, a, s);
374
+ if (c.getUTCFullYear() !== t || c.getUTCMonth() !== i || c.getUTCDate() !== r) return E;
375
+ if (n[9]) {
376
+ const u = +n[10], y = +(n[11] || 0);
377
+ if (u > 23 || y > 59) return E;
378
+ const h = (u * 60 + y) * 6e4;
379
+ c.setTime(c.getTime() - (n[9] === "-" ? -h : h));
380
+ }
381
+ return c;
382
+ }
383
+ var Pr = V("tag:yaml.org,2002:timestamp", {
384
+ implicit: !0,
385
+ implicitFirstChars: [..."0123456789"],
386
+ resolve: $r,
387
+ identify: (e) => e instanceof Date,
388
+ represent: (e) => e.toISOString()
389
+ }), Rr = In("tag:yaml.org,2002:seq", {
390
+ create: () => [],
391
+ addItem: (e, n) => {
392
+ e.push(n);
393
+ },
394
+ identify: Array.isArray
395
+ });
396
+ function He(e) {
397
+ if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
398
+ const n = Object.getPrototypeOf(e);
399
+ return n === null || n === Object.prototype;
400
+ }
401
+ function vn(e, n) {
402
+ const t = {};
403
+ for (const i of n) e[i] !== void 0 && (t[i] = e[i]);
404
+ return t;
405
+ }
406
+ var Mr = In("tag:yaml.org,2002:omap", {
407
+ create: () => ({
408
+ list: [],
409
+ seen: /* @__PURE__ */ new Set()
410
+ }),
411
+ addItem: (e, n) => {
412
+ let t;
413
+ if (n instanceof Map) {
414
+ if (n.size !== 1) return "cannot resolve an ordered map item";
415
+ t = n.keys().next().value;
416
+ } else if (He(n)) {
417
+ const i = Object.keys(n);
418
+ if (i.length !== 1) return "cannot resolve an ordered map item";
419
+ t = i[0];
420
+ } else return "cannot resolve an ordered map item";
421
+ return e.seen.has(t) ? "duplicate key in ordered map" : (e.seen.add(t), e.list.push(n), "");
422
+ },
423
+ finalize: (e) => e.list,
424
+ identify: () => !1
425
+ }), Br = In("tag:yaml.org,2002:pairs", {
426
+ create: () => [],
427
+ addItem: (e, n) => {
428
+ if (n instanceof Map)
429
+ return n.size !== 1 ? "cannot resolve a pairs item" : (e.push(n.entries().next().value), "");
430
+ if (Object.prototype.toString.call(n) !== "[object Object]") return "cannot resolve a pairs item";
431
+ const t = n, i = Object.keys(t);
432
+ return i.length !== 1 ? "cannot resolve a pairs item" : (e.push([i[0], t[i[0]]]), "");
433
+ },
434
+ identify: () => !1
435
+ }), Dr = Qe("tag:yaml.org,2002:map", {
436
+ create: () => ({}),
437
+ identify: He,
438
+ represent: (e) => {
439
+ const n = /* @__PURE__ */ new Map();
440
+ for (const t of Object.keys(e)) n.set(t, e[t]);
441
+ return n;
442
+ },
443
+ addPair: (e, n, t) => {
444
+ if (n !== null && typeof n == "object") return "object-based map does not support complex keys";
445
+ const i = String(n);
446
+ return i === "__proto__" ? Object.defineProperty(e, i, {
447
+ value: t,
448
+ enumerable: !0,
449
+ configurable: !0,
450
+ writable: !0
451
+ }) : e[i] = t, "";
452
+ },
453
+ has: (e, n) => n !== null && typeof n == "object" ? !1 : Object.prototype.hasOwnProperty.call(e, String(n)),
454
+ keys: (e) => Object.keys(e),
455
+ get: (e, n) => {
456
+ const t = String(n);
457
+ return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : null;
458
+ }
459
+ }), Ur = Qe("tag:yaml.org,2002:set", {
460
+ create: () => /* @__PURE__ */ new Set(),
461
+ identify: (e) => e instanceof Set,
462
+ represent: (e) => {
463
+ const n = /* @__PURE__ */ new Map();
464
+ for (const t of e) n.set(t, null);
465
+ return n;
466
+ },
467
+ addPair: (e, n, t) => t !== null ? "cannot resolve a set item" : (e.add(n), ""),
468
+ has: (e, n) => e.has(n),
469
+ keys: (e) => e.keys(),
470
+ get: () => null
471
+ });
472
+ function Kr() {
473
+ return {
474
+ scalar: /* @__PURE__ */ Object.create(null),
475
+ sequence: /* @__PURE__ */ Object.create(null),
476
+ mapping: /* @__PURE__ */ Object.create(null)
477
+ };
478
+ }
479
+ function qr() {
480
+ return {
481
+ scalar: [],
482
+ sequence: [],
483
+ mapping: []
484
+ };
485
+ }
486
+ function Vr(e) {
487
+ const n = [];
488
+ for (const t of e) {
489
+ let i = n.length;
490
+ for (let r = 0; r < n.length; r++) {
491
+ const o = n[r];
492
+ if (o.nodeKind === t.nodeKind && o.tagName === t.tagName && o.matchByTagPrefix === t.matchByTagPrefix) {
493
+ i = r;
494
+ break;
495
+ }
496
+ }
497
+ n[i] = t;
498
+ }
499
+ return n;
500
+ }
501
+ var Xe = class Ct {
502
+ constructor(n) {
503
+ Q(this, "tags");
504
+ /** @internal */
505
+ Q(this, "implicitScalarTags");
506
+ /**
507
+ * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds
508
+ * the resolvers that may match that key, in schema order; a key absent from
509
+ * the map uses
510
+ * {@link Schema.implicitScalarAnyFirstChar}
511
+ * (resolvers that declared no first-char constraint, so they apply to any
512
+ * first character).
513
+ */
514
+ Q(this, "implicitScalarByFirstChar");
515
+ Q(this, "implicitScalarAnyFirstChar");
516
+ /**
517
+ * The default scalar tag (`!!str`), resolved once so the composer's fallback
518
+ * for unresolved plain scalars avoids a keyed lookup per scalar.
519
+ *
520
+ * @internal
521
+ */
522
+ Q(this, "defaultScalarTag");
523
+ /**
524
+ * The default container tags (`!!seq` / `!!map`), used by the dumper: when a
525
+ * value is identified by its default tag, the tag is implicit and not
526
+ * printed. Undefined if the schema does not define them (then such values
527
+ * can't be dumped).
528
+ *
529
+ * @internal
530
+ */
531
+ Q(this, "defaultSequenceTag");
532
+ /** @internal */
533
+ Q(this, "defaultMappingTag");
534
+ Q(this, "exact");
535
+ Q(this, "prefix");
536
+ const t = Vr(n), i = [], r = Kr(), o = qr();
537
+ for (const u of t) {
538
+ if (u.nodeKind === "scalar" && u.implicit) {
539
+ if (u.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
540
+ i.push(u);
541
+ }
542
+ switch (u.nodeKind) {
543
+ case "scalar":
544
+ u.matchByTagPrefix ? o.scalar.push(u) : r.scalar[u.tagName] = u;
545
+ break;
546
+ case "sequence":
547
+ u.matchByTagPrefix ? o.sequence.push(u) : r.sequence[u.tagName] = u;
548
+ break;
549
+ case "mapping":
550
+ u.matchByTagPrefix ? o.mapping.push(u) : r.mapping[u.tagName] = u;
551
+ }
552
+ }
553
+ const l = i.filter((u) => u.implicitFirstChars === null), a = /* @__PURE__ */ new Set();
554
+ for (const u of i) if (u.implicitFirstChars !== null) for (const y of u.implicitFirstChars) a.add(y);
555
+ const s = /* @__PURE__ */ new Map();
556
+ for (const u of a) s.set(u, i.filter((y) => y.implicitFirstChars === null || y.implicitFirstChars.indexOf(u) !== -1));
557
+ const c = r.scalar["tag:yaml.org,2002:str"];
558
+ if (!c) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
559
+ this.tags = t, this.implicitScalarTags = i, this.implicitScalarByFirstChar = s, this.implicitScalarAnyFirstChar = l, this.defaultScalarTag = c, this.defaultSequenceTag = r.sequence["tag:yaml.org,2002:seq"], this.defaultMappingTag = r.mapping["tag:yaml.org,2002:map"], this.exact = r, this.prefix = o;
560
+ }
561
+ /** @internal */
562
+ lookupScalarTag(n) {
563
+ const t = this.exact.scalar[n];
564
+ if (t) return t;
565
+ for (const i of this.prefix.scalar) if (n.startsWith(i.tagName)) return i;
566
+ }
567
+ /** @internal */
568
+ lookupSequenceTag(n) {
569
+ const t = this.exact.sequence[n];
570
+ if (t) return t;
571
+ for (const i of this.prefix.sequence) if (n.startsWith(i.tagName)) return i;
572
+ }
573
+ /** @internal */
574
+ lookupMappingTag(n) {
575
+ const t = this.exact.mapping[n];
576
+ if (t) return t;
577
+ for (const i of this.prefix.mapping) if (n.startsWith(i.tagName)) return i;
578
+ }
579
+ /** @internal */
580
+ resolveImplicitScalarTag(n) {
581
+ const t = this.implicitScalarByFirstChar.get(n.charAt(0)) ?? this.implicitScalarAnyFirstChar;
582
+ for (const r of t) {
583
+ const o = r.resolve(n, !1, r.tagName);
584
+ if (o !== E) return {
585
+ value: o,
586
+ tag: r
587
+ };
588
+ }
589
+ const i = this.defaultScalarTag;
590
+ return {
591
+ value: i.resolve(n, !1, i.tagName),
592
+ tag: i
593
+ };
594
+ }
595
+ /**
596
+ * Creates a new schema with the specified tags added. If a tag already
597
+ * exists, it is replaced by the specified tag.
598
+ *
599
+ * @example
600
+ *
601
+ * ```javascript
602
+ * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'
603
+ *
604
+ * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag)
605
+ * ```
606
+ */
607
+ withTags(...n) {
608
+ let t = [];
609
+ for (const i of n) t = t.concat(i);
610
+ return new Ct([...this.tags, ...t]);
611
+ }
612
+ }, wn = new Xe([
613
+ Ki,
614
+ Rr,
615
+ Dr
616
+ ]);
617
+ new Xe([
618
+ ...wn.tags,
619
+ Yi,
620
+ Ji,
621
+ ur,
622
+ _r
623
+ ]);
624
+ var Yr = new Xe([
625
+ ...wn.tags,
626
+ Vi,
627
+ Qi,
628
+ _t,
629
+ kt
630
+ ]), jr = new Xe([
631
+ ...wn.tags,
632
+ Wi,
633
+ nr,
634
+ hn,
635
+ gn,
636
+ Pr,
637
+ Tr,
638
+ Lr,
639
+ Mr,
640
+ Br,
641
+ Ur
642
+ ]), Wr = jr.withTags({
643
+ ...hn,
644
+ resolve: (e, n, t) => {
645
+ const i = hn.resolve(e, n, t);
646
+ return i === E ? _t.resolve(e, n, t) : i;
647
+ }
648
+ }, {
649
+ ...gn,
650
+ resolve: (e, n, t) => {
651
+ const i = gn.resolve(e, n, t);
652
+ return i === E ? kt.resolve(e, n, t) : i;
653
+ }
654
+ });
655
+ Qe("tag:yaml.org,2002:map", {
656
+ create: () => /* @__PURE__ */ new Map(),
657
+ addPair: (e, n, t) => (e.set(n, t), ""),
658
+ has: (e, n) => e.has(n),
659
+ keys: (e) => e.keys(),
660
+ get: (e, n) => e.get(n),
661
+ identify: (e) => e instanceof Map || He(e),
662
+ represent: (e) => {
663
+ if (e instanceof Map) return e;
664
+ const n = /* @__PURE__ */ new Map(), t = e;
665
+ for (const i of Object.keys(t)) n.set(i, t[i]);
666
+ return n;
667
+ }
668
+ });
669
+ function et(e) {
670
+ if (Array.isArray(e)) {
671
+ const n = Array.prototype.slice.call(e);
672
+ for (let t = 0; t < n.length; t++) {
673
+ if (Array.isArray(n[t])) return null;
674
+ typeof n[t] == "object" && Object.prototype.toString.call(n[t]) === "[object Object]" && (n[t] = "[object Object]");
675
+ }
676
+ return String(n);
677
+ }
678
+ return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e);
679
+ }
680
+ Qe("tag:yaml.org,2002:map", {
681
+ create: () => ({}),
682
+ identify: He,
683
+ represent: (e) => {
684
+ const n = /* @__PURE__ */ new Map();
685
+ for (const t of Object.keys(e)) n.set(t, e[t]);
686
+ return n;
687
+ },
688
+ addPair: (e, n, t) => {
689
+ const i = et(n);
690
+ return i === null ? "nested arrays are not supported inside keys" : (i === "__proto__" ? Object.defineProperty(e, i, {
691
+ value: t,
692
+ enumerable: !0,
693
+ configurable: !0,
694
+ writable: !0
695
+ }) : e[i] = t, "");
696
+ },
697
+ has: (e, n) => {
698
+ const t = et(n);
699
+ return t !== null && Object.prototype.hasOwnProperty.call(e, t);
700
+ },
701
+ keys: (e) => Object.keys(e),
702
+ get: (e, n) => {
703
+ const t = String(n);
704
+ return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : null;
705
+ }
706
+ });
707
+ var Gr = {
708
+ maxLength: 79,
709
+ indent: 1,
710
+ linesBefore: 3,
711
+ linesAfter: 2
712
+ };
713
+ function sn(e, n, t, i, r) {
714
+ let o = "", l = "";
715
+ const a = Math.floor(r / 2) - 1;
716
+ return i - n > a && (o = " ... ", n = i - a + o.length), t - i > a && (l = " ...", t = i + a - l.length), {
717
+ str: o + e.slice(n, t).replace(/\t/g, "→") + l,
718
+ pos: i - n + o.length
719
+ };
720
+ }
721
+ function cn(e, n) {
722
+ return " ".repeat(Math.max(n - e.length, 0)) + e;
723
+ }
724
+ function zr(e, n) {
725
+ if (!e.buffer) return null;
726
+ const t = {
727
+ ...Gr,
728
+ ...n
729
+ }, i = /\r?\n|\r|\0/g, r = [0], o = [];
730
+ let l, a = -1;
731
+ for (; l = i.exec(e.buffer); )
732
+ o.push(l.index), r.push(l.index + l[0].length), e.position <= l.index && a < 0 && (a = r.length - 2);
733
+ a < 0 && (a = r.length - 1);
734
+ let s = "";
735
+ const c = Math.min(e.line + t.linesAfter, o.length).toString().length, u = t.maxLength - (t.indent + c + 3);
736
+ for (let h = 1; h <= t.linesBefore && !(a - h < 0); h++) {
737
+ const x = sn(e.buffer, r[a - h], o[a - h], e.position - (r[a] - r[a - h]), u);
738
+ s = `${" ".repeat(t.indent)}${cn((e.line - h + 1).toString(), c)} | ${x.str}
739
+ ${s}`;
740
+ }
741
+ const y = sn(e.buffer, r[a], o[a], e.position, u);
742
+ s += `${" ".repeat(t.indent)}${cn((e.line + 1).toString(), c)} | ${y.str}
743
+ `, s += `${"-".repeat(t.indent + c + 3 + y.pos)}^
744
+ `;
745
+ for (let h = 1; h <= t.linesAfter && !(a + h >= o.length); h++) {
746
+ const x = sn(e.buffer, r[a + h], o[a + h], e.position - (r[a] - r[a + h]), u);
747
+ s += `${" ".repeat(t.indent)}${cn((e.line + h + 1).toString(), c)} | ${x.str}
748
+ `;
749
+ }
750
+ return s.replace(/\n$/, "");
751
+ }
752
+ function nt(e, n) {
753
+ let t = "";
754
+ return e.mark ? (e.mark.name && (t += `in "${e.mark.name}" `), t += `(${e.mark.line + 1}:${e.mark.column + 1})`, !n && e.mark.snippet && (t += `
755
+
756
+ ${e.mark.snippet}`), `${e.reason} ${t}`) : e.reason;
757
+ }
758
+ var le = class At extends Error {
759
+ /**
760
+ * Optional `mark` contains source snippet data. Usually, use
761
+ * {@link YAMLException.throwAt} instead of passing it directly.
762
+ */
763
+ constructor(t, i) {
764
+ super();
765
+ Q(this, "reason");
766
+ Q(this, "mark");
767
+ this.name = "YAMLException", this.reason = t, this.mark = i, this.message = nt(this, !1), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
768
+ }
769
+ /**
770
+ * Returns the formatted error, omitting the source snippet in compact mode.
771
+ */
772
+ toString(t) {
773
+ return `${this.name}: ${nt(this, t)}`;
774
+ }
775
+ /**
776
+ * Builds a YAMLException with a source snippet and throws it. `source` is
777
+ * the raw input text; `position` is an offset into it.
778
+ */
779
+ static throwAt(t, i, r, o = "") {
780
+ let l = 0, a = 0;
781
+ for (let c = 0; c < i; c++) {
782
+ const u = t.charCodeAt(c);
783
+ u === 10 ? (l++, a = c + 1) : u === 13 && (l++, t.charCodeAt(c + 1) === 10 && c++, a = c + 1);
784
+ }
785
+ const s = {
786
+ name: o,
787
+ buffer: t,
788
+ position: i,
789
+ line: l,
790
+ column: i - a
791
+ };
792
+ throw s.snippet = zr(s), new At(r, s);
793
+ }
794
+ }, B = {
795
+ DOCUMENT: 1,
796
+ SEQUENCE: 2,
797
+ MAPPING: 3,
798
+ SCALAR: 4,
799
+ ALIAS: 5,
800
+ POP: 6
801
+ }, _ = {
802
+ PLAIN: 1,
803
+ SINGLE_QUOTED: 2,
804
+ DOUBLE_QUOTED: 3,
805
+ LITERAL_BLOCK: 4,
806
+ FOLDED_BLOCK: 5
807
+ }, X = {
808
+ BLOCK: 1,
809
+ FLOW: 2
810
+ }, ne = {
811
+ CLIP: 1,
812
+ STRIP: 2,
813
+ KEEP: 3
814
+ }, Qr = -1;
815
+ function tt(e) {
816
+ switch (e) {
817
+ case 48:
818
+ return "\0";
819
+ case 97:
820
+ return "\x07";
821
+ case 98:
822
+ return "\b";
823
+ case 116:
824
+ return " ";
825
+ case 9:
826
+ return " ";
827
+ case 110:
828
+ return `
829
+ `;
830
+ case 118:
831
+ return "\v";
832
+ case 102:
833
+ return "\f";
834
+ case 114:
835
+ return "\r";
836
+ case 101:
837
+ return "\x1B";
838
+ case 32:
839
+ return " ";
840
+ case 34:
841
+ return '"';
842
+ case 47:
843
+ return "/";
844
+ case 92:
845
+ return "\\";
846
+ case 78:
847
+ return "…";
848
+ case 95:
849
+ return " ";
850
+ case 76:
851
+ return "\u2028";
852
+ case 80:
853
+ return "\u2029";
854
+ default:
855
+ return "";
856
+ }
857
+ }
858
+ var Et = new Array(256), Tt = new Array(256);
859
+ for (let e = 0; e < 256; e++)
860
+ Et[e] = tt(e) ? 1 : 0, Tt[e] = tt(e);
861
+ function Hr(e) {
862
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
863
+ }
864
+ function Xr(e) {
865
+ return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10;
866
+ }
867
+ function Jr(e) {
868
+ return e === 120 ? 2 : e === 117 ? 4 : 8;
869
+ }
870
+ function Ve(e, n, t) {
871
+ let i = 0;
872
+ for (; n < t; ) {
873
+ const r = e.charCodeAt(n);
874
+ if (r === 10)
875
+ i++, n++;
876
+ else if (r === 13)
877
+ i++, n++, e.charCodeAt(n) === 10 && n++;
878
+ else if (r === 32 || r === 9) n++;
879
+ else break;
880
+ }
881
+ return {
882
+ position: n,
883
+ breaks: i
884
+ };
885
+ }
886
+ function Nn(e) {
887
+ return e === 1 ? " " : `
888
+ `.repeat(e - 1);
889
+ }
890
+ function Zr(e, n, t) {
891
+ let i = "", r = n, o = n, l = n;
892
+ for (; r < t; ) {
893
+ const a = e.charCodeAt(r);
894
+ if (a === 10 || a === 13) {
895
+ i += e.slice(o, l);
896
+ const s = Ve(e, r, t);
897
+ i += Nn(s.breaks), r = o = l = s.position;
898
+ } else
899
+ r++, a !== 32 && a !== 9 && (l = r);
900
+ }
901
+ return i + e.slice(o, l);
902
+ }
903
+ function eo(e, n, t) {
904
+ let i = "", r = n, o = n, l = n;
905
+ for (; r < t; ) {
906
+ const a = e.charCodeAt(r);
907
+ if (a === 39)
908
+ i += e.slice(o, r) + "'", r += 2, o = l = r;
909
+ else if (a === 10 || a === 13) {
910
+ i += e.slice(o, l);
911
+ const s = Ve(e, r, t);
912
+ i += Nn(s.breaks), r = o = l = s.position;
913
+ } else
914
+ r++, a !== 32 && a !== 9 && (l = r);
915
+ }
916
+ return i + e.slice(o, t);
917
+ }
918
+ function no(e, n, t) {
919
+ let i = "", r = n, o = n, l = n;
920
+ for (; r < t; ) {
921
+ const a = e.charCodeAt(r);
922
+ if (a === 92) {
923
+ i += e.slice(o, r), r++;
924
+ const s = e.charCodeAt(r);
925
+ if (s === 10 || s === 13) r = Ve(e, r, t).position;
926
+ else if (s < 256 && Et[s])
927
+ i += Tt[s], r++;
928
+ else {
929
+ let c = Jr(s), u = 0;
930
+ for (; c > 0; c--) {
931
+ r++;
932
+ const y = Xr(e.charCodeAt(r));
933
+ u = (u << 4) + y;
934
+ }
935
+ i += Hr(u), r++;
936
+ }
937
+ o = l = r;
938
+ } else if (a === 10 || a === 13) {
939
+ i += e.slice(o, l);
940
+ const s = Ve(e, r, t);
941
+ i += Nn(s.breaks), r = o = l = s.position;
942
+ } else
943
+ r++, a !== 32 && a !== 9 && (l = r);
944
+ }
945
+ return i + e.slice(o, t);
946
+ }
947
+ function it(e, n, t, i, r, o) {
948
+ const l = i < 0 ? 0 : i, a = e.slice(n, t).replace(/\r\n?/g, `
949
+ `), s = a === "" ? [] : (a.endsWith(`
950
+ `) ? a.slice(0, -1) : a).split(`
951
+ `);
952
+ let c = "", u = !1, y = 0, h = !1;
953
+ for (const x of s) {
954
+ let p = 0;
955
+ for (; p < l && x.charCodeAt(p) === 32; ) p++;
956
+ if (i < 0 || p >= x.length) {
957
+ y++;
958
+ continue;
959
+ }
960
+ const m = x.slice(l), g = m.charCodeAt(0);
961
+ o ? g === 32 || g === 9 ? (h = !0, c += `
962
+ `.repeat(u ? 1 + y : y)) : h ? (h = !1, c += `
963
+ `.repeat(y + 1)) : y === 0 ? u && (c += " ") : c += `
964
+ `.repeat(y) : c += `
965
+ `.repeat(u ? 1 + y : y), c += m, u = !0, y = 0;
966
+ }
967
+ return r === ne.KEEP ? c += `
968
+ `.repeat(u ? 1 + y : y) : r !== ne.STRIP && u && (c += `
969
+ `), c;
970
+ }
971
+ function to(e, n) {
972
+ if (n.valueStart === Qr) return "";
973
+ const { valueStart: t, valueEnd: i } = n;
974
+ if (n.fast) return e.slice(t, i);
975
+ switch (n.style) {
976
+ case _.SINGLE_QUOTED:
977
+ return eo(e, t, i);
978
+ case _.DOUBLE_QUOTED:
979
+ return no(e, t, i);
980
+ case _.LITERAL_BLOCK:
981
+ return it(e, t, i, n.indent, n.chomping, !1);
982
+ case _.FOLDED_BLOCK:
983
+ return it(e, t, i, n.indent, n.chomping, !0);
984
+ default:
985
+ return Zr(e, t, i);
986
+ }
987
+ }
988
+ var io = Object.assign(/* @__PURE__ */ Object.create(null), {
989
+ "!": "!",
990
+ "!!": "tag:yaml.org,2002:"
991
+ }), It = "-#;/?:@&=+$_.~*'()", ro = It + "!,[]", rt = "0123456789ABCDEF";
992
+ function ee(e) {
993
+ return "%" + rt[e >> 4] + rt[e & 15];
994
+ }
995
+ function un(e, n) {
996
+ const t = n ? It : ro;
997
+ let i = "";
998
+ for (let r = 0; r < e.length; r++) {
999
+ let o = e.charCodeAt(r);
1000
+ if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || t.includes(e[r])) {
1001
+ i += e[r];
1002
+ continue;
1003
+ }
1004
+ o >= 55296 && o <= 56319 && (o = 65536 + ((o & 1023) << 10) + (e.charCodeAt(++r) & 1023)), o < 128 ? i += ee(o) : o < 2048 ? i += ee(192 | o >> 6) + ee(128 | o & 63) : o < 65536 ? i += ee(224 | o >> 12) + ee(128 | o >> 6 & 63) + ee(128 | o & 63) : i += ee(240 | o >> 18) + ee(128 | o >> 12 & 63) + ee(128 | o >> 6 & 63) + ee(128 | o & 63);
1005
+ }
1006
+ return i;
1007
+ }
1008
+ function fn(e) {
1009
+ let n = "", t = 0;
1010
+ for (; t < e.length; ) {
1011
+ if (e.charCodeAt(t) !== 37) {
1012
+ n += e[t++];
1013
+ continue;
1014
+ }
1015
+ let i = parseInt(e.slice(t + 1, t + 3), 16);
1016
+ if (t += 3, i >= 192) {
1017
+ let r = i < 224 ? 1 : i < 240 ? 2 : 3;
1018
+ for (i &= (1 << 6 - r) - 1; r-- > 0; )
1019
+ i = i << 6 | parseInt(e.slice(t + 1, t + 3), 16) & 63, t += 3;
1020
+ }
1021
+ i < 65536 ? n += String.fromCharCode(i) : (i -= 65536, n += String.fromCharCode(55296 | i >> 10, 56320 | i & 1023));
1022
+ }
1023
+ return n;
1024
+ }
1025
+ function wt(e, n) {
1026
+ if (e.startsWith("!<") && e.endsWith(">")) return fn(e.slice(2, -1));
1027
+ const t = e.indexOf("!", 1), i = t === -1 ? "!" : e.slice(0, t + 1);
1028
+ return fn((n == null ? void 0 : n[i]) ?? io[i] ?? i) + fn(e.slice(i.length));
1029
+ }
1030
+ function Nt(e) {
1031
+ let n = e;
1032
+ return n.charCodeAt(0) === 33 ? (n = n.slice(1), `!${un(n, !0)}`) : n.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${un(n.slice(18), !0)}` : `!<${un(n, !1)}>`;
1033
+ }
1034
+ var ge = -1, oo = "tag:yaml.org,2002:merge", Ln = {
1035
+ filename: "",
1036
+ schema: Yr,
1037
+ json: !1,
1038
+ maxTotalMergeKeys: 1e4,
1039
+ maxAliases: -1
1040
+ };
1041
+ function lo(e) {
1042
+ return "tagStart" in e && e.tagStart !== ge ? e.tagStart : "anchorStart" in e && e.anchorStart !== ge ? e.anchorStart : "valueStart" in e && e.valueStart !== ge ? e.valueStart : "start" in e ? e.start : 0;
1043
+ }
1044
+ function D(e, n) {
1045
+ le.throwAt(e.source, e.position, n, e.filename);
1046
+ }
1047
+ function Lt(e, n, t, i) {
1048
+ try {
1049
+ return t.finalize(i);
1050
+ } catch (r) {
1051
+ if (r instanceof le) throw r;
1052
+ le.throwAt(e.source, n, r instanceof Error ? r.message : String(r), e.filename);
1053
+ }
1054
+ }
1055
+ function ao(e, n) {
1056
+ const t = to(e.source, n), i = n.tagStart === ge ? "" : e.source.slice(n.tagStart, n.tagEnd), r = e.schema.defaultScalarTag;
1057
+ if (i !== "") {
1058
+ if (i === "!") return {
1059
+ value: t,
1060
+ tag: r
1061
+ };
1062
+ const o = wt(i, e.tagHandlers), l = e.schema.lookupScalarTag(o);
1063
+ if (l) {
1064
+ const s = l.resolve(t, !0, o);
1065
+ return s === E && D(e, `cannot resolve a node with !<${o}> explicit tag`), {
1066
+ value: s,
1067
+ tag: l
1068
+ };
1069
+ }
1070
+ const a = e.schema.lookupMappingTag(o) ?? e.schema.lookupSequenceTag(o);
1071
+ if (a) {
1072
+ t !== "" && D(e, `cannot resolve a node with !<${o}> explicit tag`);
1073
+ const s = a.create(o);
1074
+ return {
1075
+ value: a.carrierIsResult ? s : Lt(e, e.position, a, s),
1076
+ tag: a
1077
+ };
1078
+ }
1079
+ D(e, `unknown scalar tag !<${o}>`);
1080
+ }
1081
+ return n.style === _.PLAIN ? e.schema.resolveImplicitScalarTag(t) : {
1082
+ value: r.resolve(t, !1, r.tagName),
1083
+ tag: r
1084
+ };
1085
+ }
1086
+ function ot(e, n, t) {
1087
+ const i = n.tagStart === ge ? "" : e.source.slice(n.tagStart, n.tagEnd);
1088
+ return i === "" || i === "!" ? t : wt(i, e.tagHandlers);
1089
+ }
1090
+ function Ot(e) {
1091
+ return e.nodeKind === "mapping";
1092
+ }
1093
+ function lt(e) {
1094
+ e.totalMergeKeys++, e.maxTotalMergeKeys !== -1 && e.totalMergeKeys > e.maxTotalMergeKeys && D(e, `merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`);
1095
+ }
1096
+ function at(e, n, t, i) {
1097
+ lt(e);
1098
+ for (const r of i.keys(t)) {
1099
+ if (lt(e), n.tag.has(n.value, r)) continue;
1100
+ const o = n.tag.addPair(n.value, r, i.get(t, r));
1101
+ o && D(e, o), n.overridable ?? (n.overridable = /* @__PURE__ */ new Set()), n.overridable.add(r);
1102
+ }
1103
+ }
1104
+ function so(e, n, t, i) {
1105
+ if (e.position = n.keyPosition, Ot(i)) at(e, n, t, i);
1106
+ else if (i.nodeKind === "sequence" && Array.isArray(t)) {
1107
+ t.length > 100 && D(e, "abnormal merge sequence size");
1108
+ for (const r of t) {
1109
+ const o = e.nodeTags.get(r);
1110
+ o || D(e, "cannot merge mappings; the provided source object is unacceptable"), at(e, n, r, o);
1111
+ }
1112
+ } else D(e, "cannot merge mappings; the provided source object is unacceptable");
1113
+ }
1114
+ function co(e, n, t, i, r) {
1115
+ var l, a;
1116
+ if (e.position = n.keyPosition, n.keyIsMerge) {
1117
+ so(e, n, i, r);
1118
+ return;
1119
+ }
1120
+ !e.json && n.tag.has(n.value, t) && !((l = n.overridable) != null && l.has(t)) && D(e, "duplicated mapping key");
1121
+ const o = n.tag.addPair(n.value, t, i);
1122
+ o && D(e, o), (a = n.overridable) == null || a.delete(t);
1123
+ }
1124
+ function dn(e, n, t) {
1125
+ const i = e.frames[e.frames.length - 1];
1126
+ if (i.kind === "document")
1127
+ i.value = n, i.hasValue = !0;
1128
+ else if (i.kind === "sequence") {
1129
+ Ot(t) && e.nodeTags.set(n, t);
1130
+ const r = i.tag.addItem(i.value, n, i.index++);
1131
+ r && D(e, r);
1132
+ } else if (i.hasKey) {
1133
+ const r = i.key;
1134
+ i.key = void 0, i.hasKey = !1, co(e, i, r, n, t);
1135
+ } else
1136
+ i.key = n, i.keyPosition = e.position, i.hasKey = !0, i.keyIsMerge = t.tagName === oo;
1137
+ }
1138
+ function pn(e, n, t, i, r) {
1139
+ if (n.anchorStart !== ge) {
1140
+ const o = {
1141
+ value: t,
1142
+ tag: i,
1143
+ isValueFinal: r
1144
+ };
1145
+ return e.anchors.set(e.source.slice(n.anchorStart, n.anchorEnd), o), o;
1146
+ }
1147
+ return null;
1148
+ }
1149
+ function uo(e, n) {
1150
+ const t = {
1151
+ ...Ln,
1152
+ ...n,
1153
+ events: e,
1154
+ documents: [],
1155
+ eventIndex: 0,
1156
+ position: 0,
1157
+ frames: [],
1158
+ anchors: /* @__PURE__ */ new Map(),
1159
+ nodeTags: /* @__PURE__ */ new Map(),
1160
+ tagHandlers: /* @__PURE__ */ Object.create(null),
1161
+ totalMergeKeys: 0,
1162
+ aliasCount: 0
1163
+ };
1164
+ for (; t.eventIndex < t.events.length; ) {
1165
+ const i = t.events[t.eventIndex++];
1166
+ switch (t.position = lo(i), i.type) {
1167
+ case B.DOCUMENT:
1168
+ t.anchors = /* @__PURE__ */ new Map(), t.nodeTags = /* @__PURE__ */ new Map(), t.aliasCount = 0, t.tagHandlers = /* @__PURE__ */ Object.create(null);
1169
+ for (const r of i.directives) r.kind === "tag" && (t.tagHandlers[r.handle] = r.prefix);
1170
+ t.frames.push({
1171
+ kind: "document",
1172
+ position: t.position,
1173
+ value: void 0,
1174
+ hasValue: !1
1175
+ });
1176
+ break;
1177
+ case B.SCALAR: {
1178
+ const { value: r, tag: o } = ao(t, i);
1179
+ pn(t, i, r, o, !0), dn(t, r, o);
1180
+ break;
1181
+ }
1182
+ case B.SEQUENCE: {
1183
+ const r = ot(t, i, "tag:yaml.org,2002:seq"), o = t.schema.lookupSequenceTag(r);
1184
+ o || D(t, `unknown sequence tag !<${r}>`);
1185
+ const l = o.create(r), a = pn(t, i, l, o, o.carrierIsResult);
1186
+ t.frames.push({
1187
+ kind: "sequence",
1188
+ position: t.position,
1189
+ value: l,
1190
+ tag: o,
1191
+ anchor: a,
1192
+ index: 0
1193
+ });
1194
+ break;
1195
+ }
1196
+ case B.MAPPING: {
1197
+ const r = ot(t, i, "tag:yaml.org,2002:map"), o = t.schema.lookupMappingTag(r);
1198
+ o || D(t, `unknown mapping tag !<${r}>`);
1199
+ const l = o.create(r), a = pn(t, i, l, o, o.carrierIsResult);
1200
+ t.frames.push({
1201
+ kind: "mapping",
1202
+ position: t.position,
1203
+ value: l,
1204
+ tag: o,
1205
+ anchor: a,
1206
+ key: void 0,
1207
+ keyPosition: t.position,
1208
+ hasKey: !1,
1209
+ keyIsMerge: !1,
1210
+ overridable: null
1211
+ });
1212
+ break;
1213
+ }
1214
+ case B.ALIAS: {
1215
+ t.maxAliases !== -1 && ++t.aliasCount > t.maxAliases && D(t, `aliases exceeded maxAliases (${t.maxAliases})`);
1216
+ const r = t.source.slice(i.anchorStart, i.anchorEnd), o = t.anchors.get(r);
1217
+ o || D(t, `unidentified alias "${r}"`), o.isValueFinal || D(t, `recursive alias "${r}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), dn(t, o.value, o.tag);
1218
+ break;
1219
+ }
1220
+ case B.POP: {
1221
+ const r = t.frames.pop();
1222
+ if (r.kind === "mapping" && r.hasKey && (t.position = r.keyPosition, D(t, "incomplete mapping pair in event stream")), r.kind === "document") t.documents.push(r.value);
1223
+ else {
1224
+ const o = r.tag.carrierIsResult ? r.value : Lt(t, r.position, r.tag, r.value);
1225
+ r.anchor && (r.anchor.value = o, r.anchor.isValueFinal = !0), dn(t, o, r.tag);
1226
+ }
1227
+ break;
1228
+ }
1229
+ }
1230
+ }
1231
+ return t.documents;
1232
+ }
1233
+ var w = -1, Ft = Object.prototype.hasOwnProperty, be = 1, $t = 2, Pt = 3, Ye = 4, fo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, po = /[,\[\]{}]/, Rt = /^(?:!|!!|![0-9A-Za-z-]+!)$/, yn = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, Mt = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, mo = new RegExp(`^(?:${yn})*$`), ho = new RegExp(`^(?:${Mt})+$`), go = new RegExp(`^(?:!(?:${yn})*|${Mt}(?:${yn})*)$`), On = {
1234
+ filename: "",
1235
+ maxDepth: 100
1236
+ };
1237
+ function vo(e, n, t) {
1238
+ e.events.push({
1239
+ type: B.DOCUMENT,
1240
+ explicitStart: n,
1241
+ explicitEnd: t,
1242
+ directives: e.directives
1243
+ });
1244
+ }
1245
+ function Bt(e, n, t, i, r, o, l) {
1246
+ e.events.push({
1247
+ type: B.SEQUENCE,
1248
+ start: n,
1249
+ anchorStart: t,
1250
+ anchorEnd: i,
1251
+ tagStart: r,
1252
+ tagEnd: o,
1253
+ style: l
1254
+ });
1255
+ }
1256
+ function Dt(e, n, t, i, r, o, l) {
1257
+ e.events.push({
1258
+ type: B.MAPPING,
1259
+ start: n,
1260
+ anchorStart: t,
1261
+ anchorEnd: i,
1262
+ tagStart: r,
1263
+ tagEnd: o,
1264
+ style: l
1265
+ });
1266
+ }
1267
+ function st(e, n) {
1268
+ e.events.splice(n.eventsLength, 0, {
1269
+ type: B.MAPPING,
1270
+ start: n.position,
1271
+ anchorStart: w,
1272
+ anchorEnd: w,
1273
+ tagStart: w,
1274
+ tagEnd: w,
1275
+ style: X.FLOW
1276
+ });
1277
+ }
1278
+ function ke(e, n, t, i, r, o, l, a, s = ne.CLIP, c = -1, u = !1) {
1279
+ e.events.push({
1280
+ type: B.SCALAR,
1281
+ valueStart: n,
1282
+ valueEnd: t,
1283
+ anchorStart: i,
1284
+ anchorEnd: r,
1285
+ tagStart: o,
1286
+ tagEnd: l,
1287
+ style: a,
1288
+ chomping: s,
1289
+ indent: c,
1290
+ fast: u
1291
+ });
1292
+ }
1293
+ function yo(e, n, t) {
1294
+ e.events.push({
1295
+ type: B.ALIAS,
1296
+ anchorStart: n,
1297
+ anchorEnd: t
1298
+ });
1299
+ }
1300
+ function ve(e) {
1301
+ e.events.push({ type: B.POP });
1302
+ }
1303
+ function Y(e) {
1304
+ ke(e, w, w, w, w, w, w, _.PLAIN);
1305
+ }
1306
+ function ct() {
1307
+ return {
1308
+ anchorStart: w,
1309
+ anchorEnd: w,
1310
+ tagStart: w,
1311
+ tagEnd: w
1312
+ };
1313
+ }
1314
+ function ye(e) {
1315
+ return {
1316
+ position: e.position,
1317
+ line: e.line,
1318
+ lineStart: e.lineStart,
1319
+ lineIndent: e.lineIndent,
1320
+ firstTabInLine: e.firstTabInLine,
1321
+ eventsLength: e.events.length
1322
+ };
1323
+ }
1324
+ function xe(e, n) {
1325
+ e.position = n.position, e.line = n.line, e.lineStart = n.lineStart, e.lineIndent = n.lineIndent, e.firstTabInLine = n.firstTabInLine, e.events.length = n.eventsLength;
1326
+ }
1327
+ function b(e, n) {
1328
+ le.throwAt(e.input.slice(0, e.length), e.position, n, e.filename);
1329
+ }
1330
+ function R(e) {
1331
+ return e === 10 || e === 13;
1332
+ }
1333
+ function Ce(e) {
1334
+ return e === 9 || e === 32;
1335
+ }
1336
+ function J(e) {
1337
+ return Ce(e) || R(e);
1338
+ }
1339
+ function te(e) {
1340
+ return e === 0 || J(e);
1341
+ }
1342
+ function de(e) {
1343
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
1344
+ }
1345
+ function xo(e) {
1346
+ return e >= 48 && e <= 57 ? e - 48 : -1;
1347
+ }
1348
+ function bo(e) {
1349
+ if (e >= 48 && e <= 57) return e - 48;
1350
+ const n = e | 32;
1351
+ return n >= 97 && n <= 102 ? n - 97 + 10 : -1;
1352
+ }
1353
+ function So(e) {
1354
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
1355
+ }
1356
+ function _o(e) {
1357
+ return e === 48 || e === 97 || e === 98 || e === 116 || e === 9 || e === 110 || e === 118 || e === 102 || e === 114 || e === 101 || e === 32 || e === 34 || e === 47 || e === 92 || e === 78 || e === 95 || e === 76 || e === 80;
1358
+ }
1359
+ function je(e) {
1360
+ e.input.charCodeAt(e.position) === 10 ? e.position++ : (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++), e.line++, e.lineStart = e.position, e.lineIndent = 0, e.firstTabInLine = -1;
1361
+ }
1362
+ function K(e, n) {
1363
+ let t = 0, i = e.input.charCodeAt(e.position), r = e.position === e.lineStart || J(e.input.charCodeAt(e.position - 1));
1364
+ for (; i !== 0; ) {
1365
+ for (; Ce(i); )
1366
+ r = !0, i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
1367
+ if (n && r && i === 35) do
1368
+ i = e.input.charCodeAt(++e.position);
1369
+ while (!R(i) && i !== 0);
1370
+ if (!R(i)) break;
1371
+ for (je(e), t++, r = !0, i = e.input.charCodeAt(e.position); i === 32; )
1372
+ e.lineIndent++, i = e.input.charCodeAt(++e.position);
1373
+ }
1374
+ return t;
1375
+ }
1376
+ function Se(e, n = e.position) {
1377
+ const t = e.input.charCodeAt(n);
1378
+ if ((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2)) {
1379
+ const i = e.input.charCodeAt(n + 3);
1380
+ return i === 0 || J(i);
1381
+ }
1382
+ return !1;
1383
+ }
1384
+ function Ut(e) {
1385
+ e.position === e.lineStart && e.input.charCodeAt(e.position) === 65279 && (e.position++, e.lineStart = e.position);
1386
+ }
1387
+ function Fn(e) {
1388
+ if (e.position !== e.lineStart) return !1;
1389
+ if (Se(e)) return !0;
1390
+ if (e.input.charCodeAt(e.position) !== 65279) return !1;
1391
+ const n = ye(e);
1392
+ Ut(e), K(e, !0);
1393
+ const t = e.input.charCodeAt(e.position), i = e.position === e.lineStart && (t === 37 || t === 45 && Se(e));
1394
+ return xe(e, n), i;
1395
+ }
1396
+ function ut(e) {
1397
+ let n = e.input.charCodeAt(e.position);
1398
+ for (; n !== 0 && !R(n); ) n = e.input.charCodeAt(++e.position);
1399
+ }
1400
+ function Kt(e, n, t) {
1401
+ const i = fo.exec(e.input.slice(n, t));
1402
+ i !== null && (e.position = n + i.index + i[0].length - 1, b(e, "the stream contains non-printable characters"));
1403
+ }
1404
+ function ko(e, n, t) {
1405
+ if (e.input.charCodeAt(e.position) !== 33) return !1;
1406
+ n.tagStart !== w && b(e, "duplication of a tag property");
1407
+ const i = e.position;
1408
+ let r = !1, o = !1, l = "!", a = e.input.charCodeAt(++e.position);
1409
+ a === 60 ? (r = !0, a = e.input.charCodeAt(++e.position)) : a === 33 && (o = !0, l = "!!", a = e.input.charCodeAt(++e.position));
1410
+ let s = e.position, c;
1411
+ if (r) {
1412
+ for (; a !== 0 && a !== 62; ) a = e.input.charCodeAt(++e.position);
1413
+ a !== 62 && b(e, "unexpected end of the stream within a verbatim tag"), c = e.input.slice(s, e.position), e.position++;
1414
+ } else {
1415
+ for (; a !== 0 && !J(a) && !(t && de(a)); )
1416
+ a === 33 && (o ? b(e, "tag suffix cannot contain exclamation marks") : (l = e.input.slice(s - 1, e.position + 1), Rt.test(l) || b(e, "named tag handle cannot contain such characters"), o = !0, s = e.position + 1)), a = e.input.charCodeAt(++e.position);
1417
+ c = e.input.slice(s, e.position), po.test(c) && b(e, "tag suffix cannot contain flow indicator characters");
1418
+ }
1419
+ return c && !(r ? mo.test(c) : ho.test(c)) && b(e, `tag name cannot contain such characters: ${c}`), !r && l !== "!" && l !== "!!" && !Ft.call(e.tagHandlers, l) && b(e, `undeclared tag handle "${l}"`), n.tagStart = i, n.tagEnd = e.position, !0;
1420
+ }
1421
+ function Co(e, n) {
1422
+ if (e.input.charCodeAt(e.position) !== 38) return !1;
1423
+ n.anchorStart !== w && b(e, "duplication of an anchor property"), e.position++;
1424
+ const t = e.position;
1425
+ for (; e.input.charCodeAt(e.position) !== 0 && !J(e.input.charCodeAt(e.position)) && !de(e.input.charCodeAt(e.position)); ) e.position++;
1426
+ return e.position === t && b(e, "name of an anchor node must contain at least one character"), n.anchorStart = t, n.anchorEnd = e.position, !0;
1427
+ }
1428
+ function Ao(e, n) {
1429
+ if (e.input.charCodeAt(e.position) !== 42) return !1;
1430
+ (n.anchorStart !== w || n.tagStart !== w) && b(e, "alias node should not have any properties"), e.position++;
1431
+ const t = e.position;
1432
+ for (; e.input.charCodeAt(e.position) !== 0 && !J(e.input.charCodeAt(e.position)) && !de(e.input.charCodeAt(e.position)); ) e.position++;
1433
+ return e.position === t && b(e, "name of an alias node must contain at least one character"), yo(e, t, e.position), !0;
1434
+ }
1435
+ function xn(e, n) {
1436
+ K(e, !1), e.lineIndent < n && b(e, "deficient indentation");
1437
+ }
1438
+ function Eo(e, n, t) {
1439
+ if (e.input.charCodeAt(e.position) !== 39) return !1;
1440
+ e.position++;
1441
+ const i = e.position;
1442
+ let r = !0;
1443
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1444
+ const o = e.input.charCodeAt(e.position);
1445
+ if (o === 39) {
1446
+ if (e.input.charCodeAt(e.position + 1) === 39) {
1447
+ r = !1, e.position += 2;
1448
+ continue;
1449
+ }
1450
+ const l = e.position;
1451
+ return e.position++, ke(e, i, l, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, _.SINGLE_QUOTED, ne.CLIP, -1, r), !0;
1452
+ }
1453
+ R(o) ? (r = !1, xn(e, n)) : e.position === e.lineStart && Se(e) ? b(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? b(e, "expected valid JSON character") : e.position++;
1454
+ }
1455
+ b(e, "unexpected end of the stream within a single quoted scalar");
1456
+ }
1457
+ function To(e, n, t) {
1458
+ if (e.input.charCodeAt(e.position) !== 34) return !1;
1459
+ e.position++;
1460
+ const i = e.position;
1461
+ let r = !0;
1462
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1463
+ const o = e.input.charCodeAt(e.position);
1464
+ if (o === 34) {
1465
+ const l = e.position;
1466
+ return e.position++, ke(e, i, l, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, _.DOUBLE_QUOTED, ne.CLIP, -1, r), !0;
1467
+ }
1468
+ if (o === 92) {
1469
+ r = !1;
1470
+ const l = e.input.charCodeAt(++e.position);
1471
+ if (R(l)) xn(e, n);
1472
+ else if (_o(l)) e.position++;
1473
+ else {
1474
+ let a = So(l);
1475
+ for (a === 0 && b(e, "unknown escape sequence"); a-- > 0; )
1476
+ e.position++, bo(e.input.charCodeAt(e.position)) < 0 && b(e, "expected hexadecimal character");
1477
+ e.position++;
1478
+ }
1479
+ } else R(o) ? (r = !1, xn(e, n)) : e.position === e.lineStart && Se(e) ? b(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? b(e, "expected valid JSON character") : e.position++;
1480
+ }
1481
+ b(e, "unexpected end of the stream within a double quoted scalar");
1482
+ }
1483
+ function Io(e, n, t) {
1484
+ const i = e.input.charCodeAt(e.position);
1485
+ let r = ne.CLIP, o = -1, l = !1;
1486
+ if (i !== 124 && i !== 62) return !1;
1487
+ const a = i === 124 ? _.LITERAL_BLOCK : _.FOLDED_BLOCK;
1488
+ for (e.position++; e.input.charCodeAt(e.position) !== 0; ) {
1489
+ const x = e.input.charCodeAt(e.position), p = xo(x);
1490
+ if (x === 43 || x === 45)
1491
+ r !== ne.CLIP && b(e, "repeat of a chomping mode identifier"), r = x === 43 ? ne.KEEP : ne.STRIP, e.position++;
1492
+ else if (p >= 0)
1493
+ p === 0 && b(e, "bad explicit indentation width of a block scalar; it cannot be less than one"), l && b(e, "repeat of an indentation width identifier"), o = n + p - 1, l = !0, e.position++;
1494
+ else break;
1495
+ }
1496
+ let s = !1;
1497
+ for (; Ce(e.input.charCodeAt(e.position)); )
1498
+ s = !0, e.position++;
1499
+ s && e.input.charCodeAt(e.position) === 35 && ut(e), R(e.input.charCodeAt(e.position)) ? je(e) : e.input.charCodeAt(e.position) !== 0 && b(e, "a line break is expected");
1500
+ let c = l ? o : -1, u = 0;
1501
+ const y = e.position;
1502
+ let h = e.position;
1503
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
1504
+ const x = e.position;
1505
+ let p = 0;
1506
+ for (; e.input.charCodeAt(x + p) === 32; ) p++;
1507
+ const m = e.input.charCodeAt(x + p);
1508
+ if (m === 0) {
1509
+ c >= 0 ? p > c && (h = x + p) : p > 0 && (h = x + p);
1510
+ break;
1511
+ }
1512
+ if (Fn(e)) break;
1513
+ if (!l && c === -1 && R(m) && (u = Math.max(u, p)), !l && c === -1 && !R(m) && (m === 9 && p < n && (e.position = x + p, b(e, "tab characters must not be used in indentation")), p >= n && p < u && (e.position = x + p, b(e, "bad indentation of a mapping entry"))), c === -1 && m !== 0 && !R(m) && p < n) {
1514
+ e.lineIndent = p, e.position = x + p;
1515
+ break;
1516
+ }
1517
+ !l && m !== 0 && !R(m) && c === -1 && (c = p);
1518
+ const g = c === -1 ? n + 1 : c;
1519
+ if (m !== 0 && !R(m) && p < g) {
1520
+ e.lineIndent = p, e.position = x + p;
1521
+ break;
1522
+ }
1523
+ ut(e), h = e.position, R(e.input.charCodeAt(e.position)) && (je(e), h = e.position);
1524
+ }
1525
+ return Kt(e, y, h), ke(e, y, h, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, a, r, c), !0;
1526
+ }
1527
+ function wo(e, n) {
1528
+ const t = e.input.charCodeAt(e.position), i = n === be;
1529
+ if (t === 0 || J(t) || t === 35 || t === 38 || t === 42 || t === 33 || t === 124 || t === 62 || t === 39 || t === 34 || t === 37 || t === 64 || t === 96 || de(t)) return !1;
1530
+ if (t === 63 || t === 45) {
1531
+ const r = e.input.charCodeAt(e.position + 1);
1532
+ if (te(r) || i && de(r)) return !1;
1533
+ }
1534
+ return !0;
1535
+ }
1536
+ function No(e, n, t, i) {
1537
+ if (!wo(e, t)) return !1;
1538
+ const r = e.position;
1539
+ let o = e.position, l = e.input.charCodeAt(e.position);
1540
+ const a = t === be;
1541
+ let s = !1;
1542
+ for (; l !== 0 && !Fn(e); ) {
1543
+ if (l === 58) {
1544
+ const c = e.input.charCodeAt(e.position + 1);
1545
+ if (te(c) || a && de(c)) break;
1546
+ } else if (l === 35) {
1547
+ if (J(e.input.charCodeAt(e.position - 1))) break;
1548
+ } else {
1549
+ if (a && de(l)) break;
1550
+ if (R(l)) {
1551
+ const c = e.position, u = e.line, y = e.lineStart, h = e.lineIndent;
1552
+ if (K(e, !1), e.lineIndent >= n) {
1553
+ s = !0, l = e.input.charCodeAt(e.position);
1554
+ continue;
1555
+ }
1556
+ e.position = c, e.line = u, e.lineStart = y, e.lineIndent = h;
1557
+ break;
1558
+ }
1559
+ }
1560
+ Ce(l) || (o = e.position + 1), l = e.input.charCodeAt(++e.position);
1561
+ }
1562
+ return o === r ? !1 : (Kt(e, r, o), ke(e, r, o, i.anchorStart, i.anchorEnd, i.tagStart, i.tagEnd, _.PLAIN, ne.CLIP, -1, !s), !0);
1563
+ }
1564
+ function Ie(e, n) {
1565
+ const t = e.line;
1566
+ K(e, !0), (e.line > t && e.lineIndent < n || e.firstTabInLine !== -1 && e.lineIndent < n) && b(e, "deficient indentation");
1567
+ }
1568
+ function Lo(e, n, t) {
1569
+ const i = e.input.charCodeAt(e.position), r = i === 123, o = e.position;
1570
+ let l = !0;
1571
+ if (i !== 91 && i !== 123) return !1;
1572
+ const a = r ? 125 : 93;
1573
+ for (r ? Dt(e, o, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, X.FLOW) : Bt(e, o, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, X.FLOW), e.position++; e.input.charCodeAt(e.position) !== 0; ) {
1574
+ Ie(e, n);
1575
+ let s = e.input.charCodeAt(e.position);
1576
+ if (s === a)
1577
+ return e.position++, ve(e), !0;
1578
+ l ? s === 44 && b(e, "expected the node content, but found ','") : b(e, "missed comma between flow collection entries");
1579
+ let c = !1, u = !1;
1580
+ s === 63 && J(e.input.charCodeAt(e.position + 1)) && (c = u = !0, e.position += 1, Ie(e, n));
1581
+ const y = e.line, h = ye(e), x = _e(e, n, be, !1, !0);
1582
+ Ie(e, n), s = e.input.charCodeAt(e.position), (r || u || e.line === y) && s === 58 ? (c = !0, e.position++, Ie(e, n), r || st(e, h), x || Y(e), _e(e, n, be, !1, !0) || Y(e), Ie(e, n), r || ve(e)) : r && c ? (x || Y(e), Y(e)) : r ? Y(e) : c && (st(e, h), x || Y(e), Y(e), ve(e)), s = e.input.charCodeAt(e.position), s === 44 ? (l = !0, e.position++) : l = !1;
1583
+ }
1584
+ b(e, "unexpected end of the stream within a flow collection");
1585
+ }
1586
+ function ft(e, n, t) {
1587
+ if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !te(e.input.charCodeAt(e.position + 1))) return !1;
1588
+ for (Bt(e, e.position, t.anchorStart, t.anchorEnd, t.tagStart, t.tagEnd, X.BLOCK); e.input.charCodeAt(e.position) === 45 && te(e.input.charCodeAt(e.position + 1)); ) {
1589
+ e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, b(e, "tab characters must not be used in indentation"));
1590
+ const i = e.line;
1591
+ e.position++;
1592
+ const r = K(e, !0) > 0;
1593
+ if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && te(e.input.charCodeAt(e.position + 1)) && b(e, "bad indentation of a sequence entry"), r && e.lineIndent <= n ? Y(e) : _e(e, n, Pt, !1, !0), K(e, !0), e.lineIndent < n || e.position >= e.length) break;
1594
+ e.lineIndent > n && b(e, "bad indentation of a sequence entry"), e.line === i && e.input.charCodeAt(e.position) === 45 && te(e.input.charCodeAt(e.position + 1)) && b(e, "bad indentation of a sequence entry");
1595
+ }
1596
+ return ve(e), !0;
1597
+ }
1598
+ function mn(e, n, t, i) {
1599
+ let r = !1, o = !1, l = !1, a = !1;
1600
+ if (e.firstTabInLine !== -1) return !1;
1601
+ let s = e.input.charCodeAt(e.position);
1602
+ for (; s !== 0; ) {
1603
+ !r && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, b(e, "tab characters must not be used in indentation"));
1604
+ const c = e.input.charCodeAt(e.position + 1), u = e.line;
1605
+ if ((s === 63 || s === 58) && te(c))
1606
+ l || (Dt(e, e.position, i.anchorStart, i.anchorEnd, i.tagStart, i.tagEnd, X.BLOCK), l = !0), s === 63 ? (r && Y(e), o = !0, r = !0) : (r || (Y(e), o = !0), r = !1), e.position += 1, a = !0;
1607
+ else {
1608
+ r && (Y(e), r = !1);
1609
+ const y = ye(e);
1610
+ if (!_e(e, t, $t, !1, !0)) break;
1611
+ if (e.line === u) {
1612
+ for (s = e.input.charCodeAt(e.position); Ce(s); ) s = e.input.charCodeAt(++e.position);
1613
+ if (s === 58)
1614
+ s = e.input.charCodeAt(++e.position), te(s) || b(e, "a whitespace character is expected after the key-value separator within a block mapping"), l || (e.events.splice(y.eventsLength, 0, {
1615
+ type: B.MAPPING,
1616
+ start: y.position,
1617
+ anchorStart: i.anchorStart,
1618
+ anchorEnd: i.anchorEnd,
1619
+ tagStart: i.tagStart,
1620
+ tagEnd: i.tagEnd,
1621
+ style: X.BLOCK
1622
+ }), l = !0), o = !0, r = !1, a = !1;
1623
+ else if (o) b(e, "expected ':' after a mapping key");
1624
+ else
1625
+ return i.anchorStart !== w || i.tagStart !== w ? (xe(e, y), !1) : !0;
1626
+ } else if (o) b(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1627
+ else
1628
+ return i.anchorStart !== w || i.tagStart !== w ? (xe(e, y), !1) : !0;
1629
+ }
1630
+ if (_e(e, n, Ye, !0, a) && (a = !1), r || a && (Y(e), a = !1), K(e, !0), s = e.input.charCodeAt(e.position), (e.line === u || e.lineIndent > n) && s !== 0) b(e, "bad indentation of a mapping entry");
1631
+ else if (e.lineIndent < n) break;
1632
+ }
1633
+ return o ? (r && Y(e), l && ve(e), !0) : !1;
1634
+ }
1635
+ function _e(e, n, t, i, r, o = !0) {
1636
+ var p, m;
1637
+ e.depth >= e.maxDepth && b(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
1638
+ let l = 1, a = !1, s = !1, c = null;
1639
+ const u = ct();
1640
+ let y = t === Ye || t === Pt, h = y;
1641
+ const x = y;
1642
+ if (i && K(e, !0) && (a = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : l = -1), l === 1) for (; ; ) {
1643
+ const g = e.input.charCodeAt(e.position), S = ye(e);
1644
+ if (a && l !== 1 && (g === 33 || g === 38)) break;
1645
+ if (a && x && (u.tagStart !== w || u.anchorStart !== w) && (g === 33 || g === 38)) {
1646
+ const A = ye(e), N = n + 1;
1647
+ if (mn(e, e.position - e.lineStart, N, u) && ((p = e.events[A.eventsLength]) == null ? void 0 : p.type) === B.MAPPING)
1648
+ return e.depth--, !0;
1649
+ xe(e, A);
1650
+ }
1651
+ if (a && (g === 33 && u.tagStart !== w || g === 38 && u.anchorStart !== w) || !ko(e, u, t === be) && !Co(e, u)) break;
1652
+ c === null && (c = S), K(e, !0) ? (a = !0, h = x, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : l = -1) : h = !1;
1653
+ }
1654
+ if (h && (h = a || r), l === 1 || t === Ye) {
1655
+ const g = t === be || t === $t ? n : n + 1, S = e.position - e.lineStart;
1656
+ if (l === 1)
1657
+ if (h && (ft(e, S, u) || mn(e, S, g, u)) || Lo(e, g, u)) s = !0;
1658
+ else {
1659
+ const A = e.input.charCodeAt(e.position);
1660
+ if (c !== null && o && x && !h && A !== 124 && A !== 62) {
1661
+ const N = ye(e), $ = c.position - c.lineStart;
1662
+ xe(e, c), mn(e, $, g, ct()) && ((m = e.events[N.eventsLength]) == null ? void 0 : m.type) === B.MAPPING ? s = !0 : xe(e, N);
1663
+ }
1664
+ !s && (y && Io(e, g, u) || Eo(e, g, u) || To(e, g, u) || Ao(e, u) || No(e, g, t, u)) && (s = !0);
1665
+ }
1666
+ else l === 0 && (s = h && ft(e, S, u));
1667
+ }
1668
+ return y = y && !s, !s && (u.anchorStart !== w || u.tagStart !== w || y) && (ke(e, w, w, u.anchorStart, u.anchorEnd, u.tagStart, u.tagEnd, _.PLAIN), s = !0), e.depth--, s || u.anchorStart !== w || u.tagStart !== w;
1669
+ }
1670
+ function Oo(e) {
1671
+ if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1;
1672
+ e.position++;
1673
+ const n = e.position;
1674
+ for (; e.input.charCodeAt(e.position) !== 0 && !J(e.input.charCodeAt(e.position)); ) e.position++;
1675
+ const t = e.input.slice(n, e.position), i = [];
1676
+ for (t.length === 0 && b(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !R(e.input.charCodeAt(e.position)); ) {
1677
+ for (; Ce(e.input.charCodeAt(e.position)); ) e.position++;
1678
+ if (e.input.charCodeAt(e.position) === 35 || R(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
1679
+ const r = e.position;
1680
+ for (; e.input.charCodeAt(e.position) !== 0 && !J(e.input.charCodeAt(e.position)); ) e.position++;
1681
+ i.push(e.input.slice(r, e.position));
1682
+ }
1683
+ if (R(e.input.charCodeAt(e.position)) && je(e), t === "YAML") {
1684
+ e.directives.some((o) => o.kind === "yaml") && b(e, "duplication of %YAML directive"), i.length !== 1 && b(e, "YAML directive accepts exactly one argument");
1685
+ const r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]);
1686
+ r === null && b(e, "ill-formed argument of the YAML directive"), parseInt(r[1], 10) !== 1 && b(e, "unacceptable YAML version of the document"), e.directives.push({
1687
+ kind: "yaml",
1688
+ version: i[0]
1689
+ });
1690
+ } else if (t === "TAG") {
1691
+ i.length !== 2 && b(e, "TAG directive accepts exactly two arguments");
1692
+ const [r, o] = i;
1693
+ Rt.test(r) || b(e, "ill-formed tag handle (first argument) of the TAG directive"), Ft.call(e.tagHandlers, r) && b(e, `there is a previously declared suffix for "${r}" tag handle`), go.test(o) || b(e, "ill-formed tag prefix (second argument) of the TAG directive"), e.tagHandlers[r] = o, e.directives.push({
1694
+ kind: "tag",
1695
+ handle: r,
1696
+ prefix: o
1697
+ });
1698
+ }
1699
+ return !0;
1700
+ }
1701
+ function Fo(e) {
1702
+ e.directives = [], e.tagHandlers = /* @__PURE__ */ Object.create(null);
1703
+ let n = !1;
1704
+ for (K(e, !0); Oo(e); )
1705
+ n = !0, K(e, !0);
1706
+ let t = !1, i = !1, r = !0;
1707
+ if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 && te(e.input.charCodeAt(e.position + 3))) {
1708
+ t = !0;
1709
+ const a = e.line;
1710
+ e.position += 3, K(e, !0), r = e.line > a;
1711
+ } else n && b(e, "directives end mark is expected");
1712
+ const o = e.events.length;
1713
+ if (!t && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && Se(e)) {
1714
+ e.position += 3, K(e, !0);
1715
+ return;
1716
+ }
1717
+ if (vo(e, t, !1), _e(e, e.lineIndent - 1, Ye, !1, r, r) || Y(e), K(e, !0), e.position === e.lineStart && Se(e) && (i = e.input.charCodeAt(e.position) === 46, i)) {
1718
+ const a = e.line;
1719
+ e.position += 3, K(e, !0), e.line === a && e.position < e.length && b(e, "end of the stream or a document separator is expected");
1720
+ }
1721
+ const l = e.events[o];
1722
+ (l == null ? void 0 : l.type) === B.DOCUMENT && (l.explicitEnd = i), ve(e), !i && e.position < e.length && !Fn(e) && b(e, "end of the stream or a document separator is expected");
1723
+ }
1724
+ function $o(e, n) {
1725
+ const t = e.length, i = {
1726
+ ...On,
1727
+ ...n,
1728
+ input: `${e}\0`,
1729
+ length: t,
1730
+ position: 0,
1731
+ line: 0,
1732
+ lineStart: 0,
1733
+ lineIndent: 0,
1734
+ firstTabInLine: -1,
1735
+ depth: 0,
1736
+ directives: [],
1737
+ tagHandlers: /* @__PURE__ */ Object.create(null),
1738
+ events: []
1739
+ }, r = e.indexOf("\0");
1740
+ for (r !== -1 && le.throwAt(e, r, "null byte is not allowed in input", i.filename); i.position < i.length && (Ut(i), K(i, !0), !(i.position >= i.length)); ) {
1741
+ const o = i.position;
1742
+ Fo(i), i.position === o && b(i, "can not read a document");
1743
+ }
1744
+ return i.events;
1745
+ }
1746
+ var Po = {
1747
+ ...On,
1748
+ ...Ln
1749
+ };
1750
+ function Ro(e, n = {}) {
1751
+ const t = {
1752
+ ...Po,
1753
+ ...n
1754
+ }, i = String(e), r = Object.keys(On), o = Object.keys(Ln);
1755
+ return uo($o(i, vn(t, r)), {
1756
+ ...vn(t, o),
1757
+ source: i
1758
+ });
1759
+ }
1760
+ function bn(e, n) {
1761
+ const t = Ro(e, n);
1762
+ if (t.length === 0) throw new le("expected a document, but the input is empty");
1763
+ if (t.length === 1) return t[0];
1764
+ throw new le("expected a single document in the stream, but found more");
1765
+ }
1766
+ var fe = Symbol("INVALID");
1767
+ function Mo(e) {
1768
+ const n = new Set([
1769
+ e.defaultScalarTag,
1770
+ e.defaultSequenceTag,
1771
+ e.defaultMappingTag
1772
+ ].filter((o) => o !== void 0)), t = e.implicitScalarTags, i = e.tags.filter((o) => !(o.nodeKind === "scalar" && o.implicit) && !n.has(o)), r = e.tags.filter((o) => n.has(o));
1773
+ return [
1774
+ ...t.map((o) => ({
1775
+ tag: o,
1776
+ implicitTag: !0
1777
+ })),
1778
+ ...i.map((o) => ({
1779
+ tag: o,
1780
+ implicitTag: !1
1781
+ })),
1782
+ ...r.map((o) => ({
1783
+ tag: o,
1784
+ implicitTag: !0
1785
+ }))
1786
+ ];
1787
+ }
1788
+ function Bo(e, n) {
1789
+ for (let t = 0, i = e.representTypes.length; t < i; t += 1) {
1790
+ const { tag: r, implicitTag: o } = e.representTypes[t];
1791
+ if (r.identify(n)) {
1792
+ let l;
1793
+ return r.matchByTagPrefix ? l = r.representTagName(n) : l = r.tagName, {
1794
+ tag: r,
1795
+ tagName: l,
1796
+ implicitTag: o
1797
+ };
1798
+ }
1799
+ }
1800
+ return null;
1801
+ }
1802
+ function Ne(e, n) {
1803
+ if (!e.noRefs && n !== null && typeof n == "object") {
1804
+ const c = e.refs.get(n);
1805
+ if (c)
1806
+ return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
1807
+ kind: "alias",
1808
+ anchor: c.anchor
1809
+ };
1810
+ }
1811
+ const t = Bo(e, n);
1812
+ if (!t) {
1813
+ if (n === void 0 || e.skipInvalid) return fe;
1814
+ throw new le(`unacceptable kind of an object to dump ${Object.prototype.toString.call(n)}`);
1815
+ }
1816
+ const { tag: i, tagName: r, implicitTag: o } = t, l = o ? r : Nt(r);
1817
+ if (i.nodeKind === "scalar") return {
1818
+ kind: "scalar",
1819
+ tag: l,
1820
+ tagged: !o,
1821
+ style: _.PLAIN,
1822
+ value: i.represent(n)
1823
+ };
1824
+ if (i.nodeKind === "sequence") {
1825
+ const c = i.represent(n), u = {
1826
+ kind: "sequence",
1827
+ tag: l,
1828
+ tagged: !o,
1829
+ style: X.BLOCK,
1830
+ items: []
1831
+ };
1832
+ e.noRefs || e.refs.set(n, u);
1833
+ for (let y = 0, h = c.length; y < h; y += 1) {
1834
+ let x = Ne(e, c[y]);
1835
+ x === fe && c[y] === void 0 && (x = Ne(e, null)), x !== fe && u.items.push(x);
1836
+ }
1837
+ return u;
1838
+ }
1839
+ const a = i.represent(n), s = {
1840
+ kind: "mapping",
1841
+ tag: l,
1842
+ tagged: !o,
1843
+ style: X.BLOCK,
1844
+ items: []
1845
+ };
1846
+ e.noRefs || e.refs.set(n, s);
1847
+ for (const [c, u] of a) {
1848
+ const y = Ne(e, c);
1849
+ if (y === fe) continue;
1850
+ const h = Ne(e, u);
1851
+ h !== fe && s.items.push({
1852
+ key: y,
1853
+ value: h
1854
+ });
1855
+ }
1856
+ return s;
1857
+ }
1858
+ function Do(e, n, t = {}) {
1859
+ const i = Ne({
1860
+ representTypes: Mo(n),
1861
+ noRefs: t.noRefs ?? !1,
1862
+ skipInvalid: t.skipInvalid ?? !1,
1863
+ refs: /* @__PURE__ */ new Map(),
1864
+ refCounter: 0
1865
+ }, e);
1866
+ return [{
1867
+ contents: i === fe ? null : i,
1868
+ directives: []
1869
+ }];
1870
+ }
1871
+ var Uo = Symbol("visit:break"), qt = Symbol("visit:skip");
1872
+ function De(e, n, t) {
1873
+ const i = n(e, t);
1874
+ if (i === Uo) return !0;
1875
+ if (i === qt) return !1;
1876
+ const r = t.depth + 1;
1877
+ switch (e.kind) {
1878
+ case "sequence":
1879
+ for (const o of e.items) if (De(o, n, {
1880
+ depth: r,
1881
+ parent: e,
1882
+ isKey: !1
1883
+ })) return !0;
1884
+ break;
1885
+ case "mapping":
1886
+ for (const { key: o, value: l } of e.items)
1887
+ if (De(o, n, {
1888
+ depth: r,
1889
+ parent: e,
1890
+ isKey: !0
1891
+ }) || De(l, n, {
1892
+ depth: r,
1893
+ parent: e,
1894
+ isKey: !1
1895
+ })) return !0;
1896
+ }
1897
+ return !1;
1898
+ }
1899
+ function dt(e, n) {
1900
+ for (const t of e) if (t.contents && De(t.contents, n, {
1901
+ depth: 0,
1902
+ parent: null,
1903
+ isKey: !1
1904
+ })) return;
1905
+ }
1906
+ function Je(e, n) {
1907
+ return (e & 1 << n) !== 0;
1908
+ }
1909
+ var pt = {
1910
+ applyQuoteFlowKeysOption: Ko,
1911
+ doubleQuoteForInvisibles: qo,
1912
+ doubleQuoteWhitespaceOnly: Vo,
1913
+ applyForceQuotesOption: Yo,
1914
+ tryLongOrMultilineAsBlock: jo,
1915
+ quoteInvalidPlain: Wo,
1916
+ fallbackToDoubleQuoted: Go
1917
+ };
1918
+ function Vt(e) {
1919
+ return e.presenterOptions.quoteStyle === "single" && Je(e.allowedStylesMask, _.SINGLE_QUOTED) ? _.SINGLE_QUOTED : _.DOUBLE_QUOTED;
1920
+ }
1921
+ function Ko(e) {
1922
+ e.presenterOptions.quoteFlowKeys && (!e.isKey || !e.flowOnly || e.style !== _.PLAIN || (e.style = _.DOUBLE_QUOTED));
1923
+ }
1924
+ function qo(e) {
1925
+ e.style === _.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(e.node.value) && (e.style = _.DOUBLE_QUOTED);
1926
+ }
1927
+ function Vo(e) {
1928
+ e.style === _.PLAIN && /^\s+$/.test(e.node.value) && (e.style = _.DOUBLE_QUOTED);
1929
+ }
1930
+ function Yo(e) {
1931
+ e.presenterOptions.forceQuotes && (e.isKey || e.style !== _.PLAIN || e.node.tag === e.presenterOptions.schema.defaultScalarTag.tagName && (e.style = e.node.value.includes(`
1932
+ `) ? _.DOUBLE_QUOTED : Vt(e)));
1933
+ }
1934
+ function jo(e) {
1935
+ if (e.style !== _.PLAIN || e.isKey) return;
1936
+ const n = e.node.value, t = n.indexOf(`
1937
+ `) !== -1;
1938
+ if (!Je(e.allowedStylesMask, _.LITERAL_BLOCK)) {
1939
+ t && (e.style = _.DOUBLE_QUOTED);
1940
+ return;
1941
+ }
1942
+ const i = e.presenterOptions.lineWidth;
1943
+ if (i === -1) {
1944
+ t && (e.style = _.LITERAL_BLOCK);
1945
+ return;
1946
+ }
1947
+ const r = Math.max(Math.min(i, 40), i - e.shiftOfContent);
1948
+ let o = 0, l = !1;
1949
+ for (; o <= n.length; ) {
1950
+ let a = n.length;
1951
+ const s = n.indexOf(`
1952
+ `, o);
1953
+ s !== -1 && (a = s);
1954
+ const c = n.slice(o, a);
1955
+ if (c.length > r && c[0] !== " " && / [^ \t]/.test(c) && (l = !0), s === -1) break;
1956
+ o = s + 1;
1957
+ }
1958
+ l ? e.style = _.FOLDED_BLOCK : t && (e.style = _.LITERAL_BLOCK);
1959
+ }
1960
+ function Wo(e) {
1961
+ e.style === _.PLAIN && !Je(e.allowedStylesMask, _.PLAIN) && (e.style = Vt(e));
1962
+ }
1963
+ function Go(e) {
1964
+ Je(e.allowedStylesMask, e.style) || (e.style = _.DOUBLE_QUOTED);
1965
+ }
1966
+ function we(e, n) {
1967
+ return e | 1 << n;
1968
+ }
1969
+ var zo = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]", Qo = "[\\n\\r]", Ho = "\\uFEFF", $n = "[ \\t]", Yt = `(?:(?!(?:${Qo}|${Ho}))${zo})`, Ze = `(?:(?!${$n})${Yt})`, jt = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]", Wt = "[-?:,\\[\\]{}#&*!|>'\"%@`]", Xo = "[,\\[\\]{}]", Sn = Ze, _n = `(?:(?!${Xo})${Ze})`, Jo = `(?:(?:(?!${Wt})${Ze})|[?:-](?=${Sn}))`, Zo = `(?:(?:(?!${Wt})${Ze})|[?:-](?=${_n}))`, Gt = `(?:(?:(?![:#])${Sn})|:(?=${Sn}))#*`, zt = `(?:(?:(?![:#])${_n})|:(?=${_n}))#*`, Qt = `(?:${$n}*${Gt})*`, Ht = `(?:${$n}*${zt})*`, Xt = `${Jo}#*${Qt}`, Jt = `${Zo}#*${Ht}`, el = Xt, nl = Jt, tl = `\\n+${Gt}${Qt}`, il = `\\n+${zt}${Ht}`, rl = `${Xt}(?:${tl})*`, ol = `${Jt}(?:${il})*`, ll = new RegExp(`^(?:${rl})$`, "u"), al = new RegExp(`^(?:${ol})$`, "u"), sl = new RegExp(`^(?:${el})$`, "u"), cl = new RegExp(`^(?:${nl})$`, "u"), ul = new RegExp(`^(?:${jt})*$`, "u"), fl = new RegExp(`^(?:${jt}|\\n)*$`, "u"), dl = new RegExp(`^(?:${Yt}|\\n)*$`, "u"), pl = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/, Pn = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;
1970
+ function ml(e) {
1971
+ const n = e.node.value;
1972
+ if (n !== "") {
1973
+ if (!(e.isKey ? e.flowOnly ? cl : sl : e.flowOnly ? al : ll).test(n) || e.shiftOfFirstLine === 0 && pl.test(n)) return !1;
1974
+ if (e.shiftOfContent === 0) {
1975
+ const i = n.indexOf(`
1976
+ `);
1977
+ if (i !== -1) {
1978
+ const r = n.slice(i + 1);
1979
+ if (Pn.test(r)) return !1;
1980
+ }
1981
+ }
1982
+ }
1983
+ const t = e.presenterOptions.schema.resolveImplicitScalarTag(n).tag.tagName;
1984
+ return !(!e.node.tagged && t !== e.node.tag || !e.node.tagged && n === "=" && t === e.presenterOptions.schema.defaultScalarTag.tagName);
1985
+ }
1986
+ function hl(e) {
1987
+ const n = e.node.value;
1988
+ if (!(e.isKey ? ul : fl).test(n) || /[ \t]\n|\n[ \t]/.test(n)) return !1;
1989
+ if (!e.isKey && e.shiftOfContent === 0) {
1990
+ const t = n.indexOf(`
1991
+ `);
1992
+ if (t !== -1 && Pn.test(n.slice(t + 1))) return !1;
1993
+ }
1994
+ return !0;
1995
+ }
1996
+ function gl(e) {
1997
+ if (e.flowOnly || !dl.test(e.node.value)) return !1;
1998
+ const n = e.shiftOfContent - e.shiftOfParent;
1999
+ return !(n < 1 || n > 9 && /^\n* /.test(e.node.value) || e.shiftOfContent === 0 && Pn.test(e.node.value));
2000
+ }
2001
+ function vl(e) {
2002
+ let n = we(0, _.DOUBLE_QUOTED);
2003
+ ml(e) && (n = we(n, _.PLAIN)), hl(e) && (n = we(n, _.SINGLE_QUOTED)), gl(e) && (n = we(we(n, _.LITERAL_BLOCK), _.FOLDED_BLOCK)), e.allowedStylesMask = n;
2004
+ }
2005
+ function yl(e) {
2006
+ switch (e.style) {
2007
+ case _.PLAIN:
2008
+ return xl(e);
2009
+ case _.SINGLE_QUOTED:
2010
+ return bl(e);
2011
+ case _.LITERAL_BLOCK:
2012
+ return Sl(e);
2013
+ case _.FOLDED_BLOCK:
2014
+ return _l(e);
2015
+ case _.DOUBLE_QUOTED:
2016
+ return kl(e);
2017
+ }
2018
+ }
2019
+ function xl(e) {
2020
+ return Zt(e.node.value, e.shiftOfContent);
2021
+ }
2022
+ function bl(e) {
2023
+ return `'${Zt(e.node.value, e.shiftOfContent).replace(/'/g, "''")}'`;
2024
+ }
2025
+ function Sl(e) {
2026
+ const n = e.node.value;
2027
+ return "|" + ni(n, e.shiftOfParent, e.shiftOfContent) + ti(ei(n, e.shiftOfContent));
2028
+ }
2029
+ function _l(e) {
2030
+ const n = e.node.value, t = e.presenterOptions.lineWidth;
2031
+ let i = 1 / 0;
2032
+ return t !== -1 && (i = Math.max(Math.min(t, 40), t - e.shiftOfContent)), ">" + ni(n, e.shiftOfParent, e.shiftOfContent) + ti(ei(Al(n, i), e.shiftOfContent));
2033
+ }
2034
+ function kl(e) {
2035
+ return `"${Il(e.node.value)}"`;
2036
+ }
2037
+ function Zt(e, n) {
2038
+ let t = e.indexOf(`
2039
+ `);
2040
+ if (t === -1) return e;
2041
+ const i = " ".repeat(n);
2042
+ let r = e.slice(0, t);
2043
+ const o = /(\n+)([^\n]*)/g;
2044
+ o.lastIndex = t;
2045
+ let l;
2046
+ for (; l = o.exec(e); ) {
2047
+ const a = l[1].length, s = l[2];
2048
+ r += `
2049
+ `.repeat(a + 1) + i + s;
2050
+ }
2051
+ return r;
2052
+ }
2053
+ function ei(e, n) {
2054
+ const t = " ".repeat(n);
2055
+ let i = 0, r = "";
2056
+ const o = e.length;
2057
+ for (; i < o; ) {
2058
+ let l;
2059
+ const a = e.indexOf(`
2060
+ `, i);
2061
+ a === -1 ? (l = e.slice(i), i = o) : (l = e.slice(i, a + 1), i = a + 1), l.length && l !== `
2062
+ ` && (r += t), r += l;
2063
+ }
2064
+ return r;
2065
+ }
2066
+ function Cl(e) {
2067
+ return /^\n* /.test(e);
2068
+ }
2069
+ function ni(e, n, t) {
2070
+ const i = Cl(e) ? String(t - n) : "", r = e[e.length - 1] === `
2071
+ `;
2072
+ return `${i}${r && (e[e.length - 2] === `
2073
+ ` || e === `
2074
+ `) ? "+" : r ? "" : "-"}
2075
+ `;
2076
+ }
2077
+ function ti(e) {
2078
+ return e[e.length - 1] === `
2079
+ ` ? e.slice(0, -1) : e;
2080
+ }
2081
+ function kn(e) {
2082
+ return e === " " || e === " ";
2083
+ }
2084
+ function mt(e, n) {
2085
+ if (e === "" || kn(e[0])) return e;
2086
+ const t = / [^ \t]/g;
2087
+ let i, r = 0, o, l = 0, a = 0, s = "";
2088
+ for (; i = t.exec(e); )
2089
+ a = i.index, a - r > n && (o = l > r ? l : a, s += `
2090
+ ${e.slice(r, o)}`, r = o + 1), l = a;
2091
+ return s += `
2092
+ `, e.length - r > n && l > r ? s += `${e.slice(r, l)}
2093
+ ${e.slice(l + 1)}` : s += e.slice(r), s.slice(1);
2094
+ }
2095
+ function Al(e, n) {
2096
+ const t = /(\n+)([^\n]*)/g;
2097
+ let i = e.indexOf(`
2098
+ `);
2099
+ i === -1 && (i = e.length), t.lastIndex = i;
2100
+ let r = mt(e.slice(0, i), n), o = e[0] === `
2101
+ ` || kn(e[0]), l, a;
2102
+ for (; a = t.exec(e); ) {
2103
+ const s = a[1], c = a[2];
2104
+ l = c !== "" && kn(c[0]), r += s + (!o && !l && c !== "" ? `
2105
+ ` : "") + mt(c, n), o = l;
2106
+ }
2107
+ return r;
2108
+ }
2109
+ var El = /["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;
2110
+ function Tl(e) {
2111
+ switch (e) {
2112
+ case "\0":
2113
+ return "\\0";
2114
+ case "\x07":
2115
+ return "\\a";
2116
+ case "\b":
2117
+ return "\\b";
2118
+ case " ":
2119
+ return "\\t";
2120
+ case `
2121
+ `:
2122
+ return "\\n";
2123
+ case "\v":
2124
+ return "\\v";
2125
+ case "\f":
2126
+ return "\\f";
2127
+ case "\r":
2128
+ return "\\r";
2129
+ case "\x1B":
2130
+ return "\\e";
2131
+ case '"':
2132
+ return '\\"';
2133
+ case "\\":
2134
+ return "\\\\";
2135
+ case "…":
2136
+ return "\\N";
2137
+ case " ":
2138
+ return "\\_";
2139
+ case "\u2028":
2140
+ return "\\L";
2141
+ case "\u2029":
2142
+ return "\\P";
2143
+ }
2144
+ const n = e.charCodeAt(0), t = n.toString(16).toUpperCase();
2145
+ return n <= 255 ? `\\x${"0".repeat(2 - t.length)}${t}` : `\\u${"0".repeat(4 - t.length)}${t}`;
2146
+ }
2147
+ function Il(e) {
2148
+ return e.replace(El, Tl);
2149
+ }
2150
+ var We = 10, Rn = {
2151
+ indent: 2,
2152
+ seqNoIndent: !1,
2153
+ seqInlineFirst: !0,
2154
+ lineWidth: 80,
2155
+ flowBracketPadding: !1,
2156
+ flowSkipCommaSpace: !1,
2157
+ flowSkipColonSpace: !1,
2158
+ quoteFlowKeys: !1,
2159
+ quoteStyle: "single",
2160
+ forceQuotes: !1,
2161
+ scalarStyleRules: Object.keys(pt).map((e) => Reflect.get(pt, e)),
2162
+ tagBeforeAnchor: !1
2163
+ };
2164
+ function wl(e) {
2165
+ return e.tagged ? e.tag : Nt(e.tag);
2166
+ }
2167
+ function Nl(e) {
2168
+ const n = {
2169
+ ...Rn,
2170
+ ...e
2171
+ };
2172
+ return n.flowSkipColonSpace && (n.quoteFlowKeys = !0), {
2173
+ ...n,
2174
+ defaultScalarTagName: n.schema.defaultScalarTag.tagName,
2175
+ openEnded: !1
2176
+ };
2177
+ }
2178
+ function Cn(e, n) {
2179
+ return `
2180
+ ${" ".repeat(e.indent * n)}`;
2181
+ }
2182
+ function Ll(e, n, t, i, r, o) {
2183
+ return {
2184
+ node: n,
2185
+ parent: t,
2186
+ level: i,
2187
+ isKey: r,
2188
+ flowOnly: o,
2189
+ shiftOfParent: i === 0 ? -1 : e.indent * (i - 1),
2190
+ shiftOfContent: e.indent * Math.max(1, i),
2191
+ shiftOfFirstLine: i === 0 ? 0 : e.indent * i,
2192
+ presenterOptions: e,
2193
+ allowedStylesMask: 0,
2194
+ style: n.style
2195
+ };
2196
+ }
2197
+ function Ol(e, n, t) {
2198
+ let i = "";
2199
+ for (let o = 0, l = t.items.length; o < l; o += 1) {
2200
+ const a = ie(e, n, t.items[o], t, {}).text;
2201
+ o > 0 && (i += `,${e.flowSkipCommaSpace ? "" : " "}`), i += a;
2202
+ }
2203
+ const r = e.flowBracketPadding && t.items.length > 0 ? " " : "";
2204
+ return `[${r}${i}${r}]`;
2205
+ }
2206
+ function ht(e, n, t, i) {
2207
+ let r = "";
2208
+ for (let o = 0, l = t.items.length; o < l; o += 1) {
2209
+ const a = ie(e, n + 1, t.items[o], t, {
2210
+ block: !0,
2211
+ compact: e.seqInlineFirst,
2212
+ isblockseq: !0
2213
+ }).text;
2214
+ (!i || r !== "") && (r += Cn(e, n)), a === "" || We === a.charCodeAt(0) ? r += "-" : r += "- ", r += a;
2215
+ }
2216
+ return r;
2217
+ }
2218
+ function Fl(e, n, t) {
2219
+ let i = "";
2220
+ for (const { key: o, value: l } of t.items) {
2221
+ let a = "";
2222
+ i !== "" && (a += `,${e.flowSkipCommaSpace ? "" : " "}`);
2223
+ const s = ie(e, n, o, t, { iskey: !0 }), c = s.text, u = ie(e, n, l, t, {}).text, y = e.flowSkipColonSpace || u === "" ? "" : " ", h = o.kind === "scalar" && s.noBody && (o.tagged || o.anchor !== void 0), x = o.kind === "alias" || h ? " " : "";
2224
+ a += `${c}${x}:${y}${u}`, i += a;
2225
+ }
2226
+ const r = e.flowBracketPadding && i !== "" ? " " : "";
2227
+ return `{${r}${i}${r}}`;
2228
+ }
2229
+ function $l(e, n, t, i) {
2230
+ let r = "";
2231
+ for (let o = 0, l = t.items.length; o < l; o += 1) {
2232
+ let a = "";
2233
+ (!i || r !== "") && (a += Cn(e, n));
2234
+ const { key: s, value: c } = t.items[o], u = (s.kind === "mapping" || s.kind === "sequence") && s.style === X.BLOCK && s.items.length !== 0 || s.kind === "scalar" && (s.style === _.LITERAL_BLOCK || s.style === _.FOLDED_BLOCK), y = u ? ie(e, n + 1, s, t, {
2235
+ block: !0,
2236
+ compact: !0,
2237
+ isblockseq: !An(e, s, n + 1)
2238
+ }) : ie(e, n + 1, s, t, {
2239
+ block: !0,
2240
+ compact: !0,
2241
+ iskey: !0
2242
+ }), h = y.text, x = s.kind === "scalar" && s.value.indexOf(`
2243
+ `) !== -1, p = h.length > 1024 && /^[\s\S]{1025}/u.test(h), m = u || x || p;
2244
+ m && (h && We === h.charCodeAt(0) ? a += "?" : a += "? "), a += h, m && (a += Cn(e, n));
2245
+ const g = ie(e, n + 1, c, t, {
2246
+ block: !0,
2247
+ compact: m,
2248
+ isblockseq: m && !An(e, c, n + 1)
2249
+ }).text, S = s.kind === "scalar" && y.noBody && (s.tagged || s.anchor !== void 0), A = !m && (s.kind === "alias" || S) ? " " : "";
2250
+ g === "" || We === g.charCodeAt(0) ? a += `${A}:` : a += `${A}: `, a += g, r += a;
2251
+ }
2252
+ return r;
2253
+ }
2254
+ function An(e, n, t) {
2255
+ return n.kind === "alias" ? !0 : n.tagged || n.anchor !== void 0 || e.indent < 2 && t > 0;
2256
+ }
2257
+ function ie(e, n, t, i, r) {
2258
+ if (t.kind === "alias")
2259
+ return e.openEnded = !1, {
2260
+ text: `*${t.anchor}`,
2261
+ noBody: !1
2262
+ };
2263
+ const { block: o = !1, iskey: l = !1, isblockseq: a = !1 } = r;
2264
+ let s = r.compact ?? !1;
2265
+ const c = t.anchor !== void 0;
2266
+ An(e, t, n) && (s = !1);
2267
+ let u, y = t.tagged;
2268
+ const h = o && (t.kind === "mapping" || t.kind === "sequence") && t.style === X.BLOCK && t.items.length !== 0;
2269
+ if (t.kind === "mapping")
2270
+ h ? u = $l(e, n, t, s) : u = Fl(e, n, t);
2271
+ else if (t.kind === "sequence")
2272
+ h ? e.seqNoIndent && !a && n > 0 ? u = ht(e, n - 1, t, s) : u = ht(e, n, t, s) : u = Ol(e, n, t);
2273
+ else {
2274
+ const m = Ll(e, t, i, n, l, !o);
2275
+ vl(m);
2276
+ for (const g of e.scalarStyleRules) g(m);
2277
+ u = yl(m), e.openEnded = (m.style === _.LITERAL_BLOCK || m.style === _.FOLDED_BLOCK) && (t.value === `
2278
+ ` || t.value.endsWith(`
2279
+
2280
+ `)), y = t.tagged || u === "" && m.flowOnly && (i == null ? void 0 : i.kind) === "sequence" && !c || m.style !== _.PLAIN && t.tag !== e.defaultScalarTagName;
2281
+ }
2282
+ (t.kind === "mapping" || t.kind === "sequence") && !h && (e.openEnded = !1), h && s && n > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`);
2283
+ const x = u === "";
2284
+ let p = u;
2285
+ if (y || c) {
2286
+ const m = [], g = y ? wl(t) : null, S = c ? `&${t.anchor}` : null;
2287
+ e.tagBeforeAnchor ? (g !== null && m.push(g), S !== null && m.push(S)) : (S !== null && m.push(S), g !== null && m.push(g));
2288
+ const A = u === "" || u.charCodeAt(0) === We ? "" : " ";
2289
+ p = `${m.join(" ")}${A}${u}`;
2290
+ }
2291
+ return {
2292
+ text: p,
2293
+ noBody: x
2294
+ };
2295
+ }
2296
+ function Pl(e) {
2297
+ return (e.kind === "sequence" || e.kind === "mapping") && e.style === X.BLOCK && e.items.length !== 0 && !e.tagged && e.anchor === void 0;
2298
+ }
2299
+ function Rl(e) {
2300
+ let n = "";
2301
+ for (const t of e.directives) {
2302
+ if (t.kind === "yaml") {
2303
+ n += `%YAML ${t.version}
2304
+ `;
2305
+ continue;
2306
+ }
2307
+ const { handle: i, prefix: r } = t;
2308
+ n += `%TAG ${i} ${r}
2309
+ `;
2310
+ }
2311
+ return n;
2312
+ }
2313
+ function Ml(e, n) {
2314
+ const t = Nl(n);
2315
+ let i = "", r = !1;
2316
+ for (let o = 0; o < e.length; o += 1) {
2317
+ const l = e[o];
2318
+ t.openEnded = !1;
2319
+ const a = Rl(l), s = a !== "", c = l.explicitStart || s || o > 0 && !r;
2320
+ if (i += a, l.contents === null)
2321
+ c && (i += `---
2322
+ `);
2323
+ else if (c) {
2324
+ const u = ie(t, 0, l.contents, null, {
2325
+ block: !0,
2326
+ compact: !0
2327
+ }).text, y = u === "" ? "" : s || Pl(l.contents) ? `
2328
+ ` : " ";
2329
+ i += `---${y}${u}
2330
+ `;
2331
+ } else i += ie(t, 0, l.contents, null, {
2332
+ block: !0,
2333
+ compact: !0
2334
+ }).text + `
2335
+ `;
2336
+ r = l.explicitEnd || t.openEnded, r && (i += `...
2337
+ `);
2338
+ }
2339
+ return i;
2340
+ }
2341
+ var Bl = {
2342
+ ...Rn,
2343
+ schema: Wr,
2344
+ skipInvalid: !1,
2345
+ noRefs: !1,
2346
+ flowLevel: -1,
2347
+ sortKeys: !1,
2348
+ transform: () => {
2349
+ }
2350
+ };
2351
+ function Dl(e, n) {
2352
+ const t = String(e), i = String(n);
2353
+ return t < i ? -1 : t > i ? 1 : 0;
2354
+ }
2355
+ function ii(e, n = {}) {
2356
+ const t = {
2357
+ ...Bl,
2358
+ ...n
2359
+ }, i = Do(e, t.schema, {
2360
+ noRefs: t.noRefs,
2361
+ skipInvalid: t.skipInvalid
2362
+ });
2363
+ if (t.flowLevel >= 0 && dt(i, (r, o) => {
2364
+ if (!(o.depth < t.flowLevel))
2365
+ return (r.kind === "sequence" || r.kind === "mapping") && (r.style = X.FLOW), qt;
2366
+ }), t.sortKeys) {
2367
+ const r = t.sortKeys === !0 ? Dl : t.sortKeys;
2368
+ dt(i, (o) => {
2369
+ o.kind === "mapping" && o.items.sort((l, a) => r(l.key.kind === "scalar" ? l.key.value : "", a.key.kind === "scalar" ? a.key.value : ""));
2370
+ });
2371
+ }
2372
+ return t.transform(i), Ml(i, {
2373
+ ...vn(t, Object.keys(Rn)),
2374
+ schema: t.schema
2375
+ });
2376
+ }
2377
+ const Ul = {}, Kl = {
2378
+ xmlns: "http://www.w3.org/2000/svg",
2379
+ width: "24",
2380
+ height: "24",
2381
+ viewBox: "0 0 24 24",
2382
+ fill: "none",
2383
+ stroke: "currentColor",
2384
+ "stroke-width": "2",
2385
+ "stroke-linecap": "round",
2386
+ "stroke-linejoin": "round",
2387
+ class: "lucide lucide-layers"
2388
+ };
2389
+ function ql(e, n) {
2390
+ return T(), q("svg", Kl, [...n[0] || (n[0] = [
2391
+ v("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }, null, -1),
2392
+ v("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }, null, -1),
2393
+ v("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" }, null, -1)
2394
+ ])]);
2395
+ }
2396
+ const Vl = /* @__PURE__ */ Ge(Ul, [["render", ql]]), Yl = {}, jl = {
2397
+ xmlns: "http://www.w3.org/2000/svg",
2398
+ width: "24",
2399
+ height: "24",
2400
+ viewBox: "0 0 24 24",
2401
+ fill: "none",
2402
+ stroke: "currentColor",
2403
+ "stroke-width": "2",
2404
+ "stroke-linecap": "round",
2405
+ "stroke-linejoin": "round",
2406
+ class: "lucide lucide-map"
2407
+ };
2408
+ function Wl(e, n) {
2409
+ return T(), q("svg", jl, [...n[0] || (n[0] = [
2410
+ v("path", { d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" }, null, -1),
2411
+ v("path", { d: "M15 5.764v15" }, null, -1),
2412
+ v("path", { d: "M9 3.236v15" }, null, -1)
2413
+ ])]);
2414
+ }
2415
+ const Gl = /* @__PURE__ */ Ge(Yl, [["render", Wl]]), zl = {}, Ql = {
2416
+ xmlns: "http://www.w3.org/2000/svg",
2417
+ width: "24",
2418
+ height: "24",
2419
+ viewBox: "0 0 24 24",
2420
+ fill: "none",
2421
+ stroke: "currentColor",
2422
+ "stroke-width": "2",
2423
+ "stroke-linecap": "round",
2424
+ "stroke-linejoin": "round",
2425
+ class: "lucide lucide-filter"
2426
+ };
2427
+ function Hl(e, n) {
2428
+ return T(), q("svg", Ql, [...n[0] || (n[0] = [
2429
+ v("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2430
+ ])]);
2431
+ }
2432
+ const Xl = /* @__PURE__ */ Ge(zl, [["render", Hl]]), Jl = { class: "flex flex-col flex-1 overflow-hidden" }, Zl = { class: "flex justify-end gap-2" }, ea = ["href"], na = { class: "flex flex-col flex-1 overflow-hidden" }, ta = { class: "bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden mt-3 flex flex-col flex-1" }, ia = { class: "relative bg-gradient-to-br from-slate-50 to-white flex-1" }, ra = /* @__PURE__ */ ae({
2433
+ __name: "vs-tab-style",
2434
+ props: {
2435
+ token: {},
2436
+ styleYaml: {},
2437
+ styleText: {}
2438
+ },
2439
+ emits: ["update:style-yaml", "update:style-text", "save"],
2440
+ setup(e, { emit: n }) {
2441
+ const t = e, i = n, r = I("");
2442
+ F(
2443
+ () => t.styleText,
2444
+ (s) => {
2445
+ const c = s ?? "";
2446
+ r.value !== c && (r.value = c);
2447
+ },
2448
+ { immediate: !0 }
2449
+ ), F(r, async (s) => {
2450
+ var u, y;
2451
+ const c = s ?? "";
2452
+ t.styleText !== c && i("update:style-text", c);
2453
+ try {
2454
+ const h = s ? bn(s) : null;
2455
+ if ((u = h == null ? void 0 : h.colorAttr) != null && u.length && ((y = t.styleYaml) == null ? void 0 : y.colorAttr) !== h.colorAttr) {
2456
+ const x = await o(h.colorAttr);
2457
+ h.colors = x.reduce(
2458
+ (m, g, S) => ({
2459
+ ...m,
2460
+ [g.id.toString()]: l[S]
2461
+ }),
2462
+ {}
2463
+ );
2464
+ const p = ii(h);
2465
+ p !== r.value && (r.value = p);
2466
+ }
2467
+ JSON.stringify(h) !== JSON.stringify(t.styleYaml) && i(
2468
+ "update:style-yaml",
2469
+ h && typeof h == "object" ? h : null
2470
+ );
2471
+ } catch {
2472
+ t.styleYaml !== null && i("update:style-yaml", null);
2473
+ }
2474
+ });
2475
+ async function o(s) {
2476
+ return (await fetch(`/api/gis-service/${t.token}/${s}`).then(
2477
+ (u) => u.json()
2478
+ )).rows;
2479
+ }
2480
+ const l = [
2481
+ "#8dd3c7",
2482
+ "#ffffb3",
2483
+ "#bebada",
2484
+ "#fb8072",
2485
+ "#80b1d3",
2486
+ "#fdb462",
2487
+ "#b3de69",
2488
+ "#fccde5",
2489
+ "#d9d9d9",
2490
+ "#bc80bd"
2491
+ ];
2492
+ function a() {
2493
+ let s = t.styleYaml;
2494
+ if (!s && r.value)
2495
+ try {
2496
+ const c = bn(r.value);
2497
+ s = c && typeof c == "object" ? c : null;
2498
+ } catch {
2499
+ oe({
2500
+ type: "error",
2501
+ title: "Помилка",
2502
+ message: "Не вдалося зберегти стилі"
2503
+ });
2504
+ return;
2505
+ }
2506
+ i("save", s && typeof s == "object" ? s : null);
2507
+ }
2508
+ return (s, c) => (T(), q("div", Jl, [
2509
+ v("div", Zl, [
2510
+ v("a", {
2511
+ target: "_blank",
2512
+ href: "/api/gis-service/" + t.token + "/col",
2513
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2514
+ }, " Атрибути ", 8, ea),
2515
+ v("button", {
2516
+ onClick: a,
2517
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2518
+ }, [...c[1] || (c[1] = [
2519
+ v("svg", {
2520
+ xmlns: "http://www.w3.org/2000/svg",
2521
+ width: "24",
2522
+ height: "24",
2523
+ viewBox: "0 0 24 24",
2524
+ fill: "none",
2525
+ stroke: "currentColor",
2526
+ "stroke-width": "2",
2527
+ "stroke-linecap": "round",
2528
+ "stroke-linejoin": "round",
2529
+ class: "lucide lucide-save h-3 w-3 mr-1"
2530
+ }, [
2531
+ v("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
2532
+ v("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
2533
+ v("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
2534
+ ], -1),
2535
+ hi(" Зберегти стилі ", -1)
2536
+ ])])
2537
+ ]),
2538
+ v("div", na, [
2539
+ v("div", ta, [
2540
+ c[2] || (c[2] = v("div", { class: "bg-gradient-to-r from-gray-50 to-gray-100 px-4 py-2 border-b border-gray-200 flex items-center justify-between" }, [
2541
+ v("div", { class: "text-xs text-gray-400" }, "YAML")
2542
+ ], -1)),
2543
+ v("div", ia, [
2544
+ P(St, {
2545
+ modelValue: r.value,
2546
+ "onUpdate:modelValue": c[0] || (c[0] = (u) => r.value = u),
2547
+ language: "yaml",
2548
+ theme: "vs-light"
2549
+ }, null, 8, ["modelValue"])
2550
+ ])
2551
+ ])
2552
+ ])
2553
+ ]));
2554
+ }
2555
+ }), oa = { class: "flex flex-col flex-1 min-h-0" }, la = { class: "flex flex-col flex-1 min-h-0" }, aa = /* @__PURE__ */ ae({
2556
+ __name: "vs-tab-popup",
2557
+ props: {
2558
+ token: {},
2559
+ fields: {},
2560
+ columns: {}
2561
+ },
2562
+ emits: ["update:columns", "save"],
2563
+ setup(e, { emit: n }) {
2564
+ const t = e, i = n, r = I(t.columns || []);
2565
+ F(
2566
+ () => t.columns,
2567
+ (p) => r.value = p || [],
2568
+ { immediate: !0 }
2569
+ ), F(r, (p) => {
2570
+ const m = qe(t.token);
2571
+ m && (m.popup = p), i("update:columns", p);
2572
+ });
2573
+ const o = I("list"), l = I(!1), a = I([]), s = [
2574
+ { key: "name", label: "Назва", type: "main" }
2575
+ // { key: "ua", label: "UA" },
2576
+ // { key: "format", label: "Format" },
2577
+ // { key: "meta", label: "Meta" },
2578
+ ], c = {
2579
+ name: { type: "text", label: "Назва", disabled: !0, validators: ["required"] },
2580
+ label: { type: "text", label: "Найменування", validators: ["required"] },
2581
+ // format: { type: "text", label: "Format", disabled: true, hidden: true },
2582
+ meta: {
2583
+ type: "radio",
2584
+ label: "Meta",
2585
+ mode: "combo",
2586
+ options: [
2587
+ { text: "Заголовок", id: "title" },
2588
+ { text: "Властивість", id: "feature" },
2589
+ { text: "Бейдж", id: "badge" }
2590
+ ]
2591
+ },
2592
+ data: {
2593
+ type: "autocomplete",
2594
+ label: "Класифікатор",
2595
+ data: "admin.cls.name"
2596
+ // conditions: ["meta", "in", ["badge", "select", "tags"]],
2597
+ }
2598
+ };
2599
+ function u() {
2600
+ a.value = r.value.map((p) => p.name || p.id), l.value = !0;
2601
+ }
2602
+ function y() {
2603
+ var S;
2604
+ const p = [...r.value], m = ((S = t.fields) == null ? void 0 : S.filter((A) => a.value.includes(A.name))) || [], g = Tn(p, m, {
2605
+ selectedKeys: a.value,
2606
+ resolveKey: (A) => Oe(A)
2607
+ });
2608
+ r.value = g, l.value = !1, a.value = [];
2609
+ }
2610
+ function h() {
2611
+ l.value = !1, a.value = [];
2612
+ }
2613
+ function x() {
2614
+ let p = [];
2615
+ o.value === "all" ? p = t.fields || [] : o.value === "none" ? p = [] : p = r.value, p.filter((m) => !m.label).forEach((m) => m.label = m.ua), i("save", p);
2616
+ }
2617
+ return (p, m) => (T(), q("div", oa, [
2618
+ v("div", { class: "flex justify-between mb-3 gap-2" }, [
2619
+ v("button", {
2620
+ onClick: u,
2621
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2622
+ }, " Імпорт "),
2623
+ v("button", {
2624
+ onClick: x,
2625
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2626
+ }, " Зберегти попап ")
2627
+ ]),
2628
+ v("div", la, [
2629
+ o.value === "list" ? (T(), U(ze, {
2630
+ key: 0,
2631
+ modelValue: r.value,
2632
+ "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value = g),
2633
+ "columns-scheme": s,
2634
+ "form-scheme": c,
2635
+ "main-col-width": "250px",
2636
+ "add-button": !1
2637
+ }, null, 8, ["modelValue"])) : H("", !0)
2638
+ ]),
2639
+ P(En, {
2640
+ visible: l.value,
2641
+ "onUpdate:visible": m[1] || (m[1] = (g) => l.value = g),
2642
+ selection: a.value,
2643
+ "onUpdate:selection": m[2] || (m[2] = (g) => a.value = g),
2644
+ fields: e.fields,
2645
+ title: "Імпорт полів",
2646
+ "id-prefix": "import-popup",
2647
+ onConfirm: y,
2648
+ onCancel: h
2649
+ }, null, 8, ["visible", "selection", "fields"])
2650
+ ]));
2651
+ }
2652
+ }), sa = { class: "flex flex-col flex-1 min-h-0" }, ca = { class: "flex justify-between mb-3 gap-2" }, ua = { class: "p-4 space-y-4 text-sm" }, fa = { class: "space-y-1" }, da = { class: "space-y-1" }, pa = { class: "flex items-center gap-3" }, ma = { class: "flex justify-end gap-2 p-4 border-t" }, ha = /* @__PURE__ */ ae({
2653
+ __name: "vs-tab-legend",
2654
+ props: {
2655
+ mapInfo: {},
2656
+ token: {},
2657
+ columns: {}
2658
+ },
2659
+ emits: ["update:columns", "save"],
2660
+ setup(e, { emit: n }) {
2661
+ const t = e, i = n, r = I(t.columns || []);
2662
+ F(
2663
+ () => t.columns,
2664
+ (p) => {
2665
+ r.value = p || [];
2666
+ }
2667
+ ), F(r, (p) => {
2668
+ i("update:columns", p);
2669
+ });
2670
+ const o = I(!1), l = I({
2671
+ name: "",
2672
+ color: "#2E86DE"
2673
+ }), a = gi(
2674
+ () => import("@opengis/core").then((p) => p.VsModal)
2675
+ ), s = [
2676
+ { key: "name", label: "Назва" },
2677
+ { key: "color", label: "Колір", type: "color" }
2678
+ ], c = {
2679
+ name: { type: "text", label: "Назва", validators: ["required"] },
2680
+ color: { type: "color", label: "Колір", validators: ["required"] }
2681
+ };
2682
+ function u(p) {
2683
+ p && y(), o.value = p;
2684
+ }
2685
+ function y() {
2686
+ l.value = { name: "", color: "#2E86DE" };
2687
+ }
2688
+ function h() {
2689
+ var S, A;
2690
+ const p = (S = l.value.name) == null ? void 0 : S.trim();
2691
+ if (!p) {
2692
+ oe({
2693
+ type: "warning",
2694
+ title: "Перевірка",
2695
+ message: "Вкажіть назву елементу легенди"
2696
+ });
2697
+ return;
2698
+ }
2699
+ const m = ((A = l.value.color) == null ? void 0 : A.trim()) || "#2E86DE";
2700
+ if (r.value.some(
2701
+ (N) => Oe(N) === Oe({ name: p })
2702
+ )) {
2703
+ oe({
2704
+ type: "warning",
2705
+ title: "Дубль",
2706
+ message: "Такий елемент легенди вже існує"
2707
+ });
2708
+ return;
2709
+ }
2710
+ r.value = [...r.value, { name: p, color: m }], y(), o.value = !1;
2711
+ }
2712
+ function x() {
2713
+ i("save", r.value);
2714
+ }
2715
+ return (p, m) => (T(), q("div", sa, [
2716
+ v("div", ca, [
2717
+ v("button", {
2718
+ onClick: m[0] || (m[0] = (g) => o.value = !0),
2719
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2720
+ }, " Додати "),
2721
+ v("button", {
2722
+ onClick: x,
2723
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2724
+ }, " Зберегти легенду ")
2725
+ ]),
2726
+ P(ze, {
2727
+ modelValue: r.value,
2728
+ "onUpdate:modelValue": m[1] || (m[1] = (g) => r.value = g),
2729
+ "columns-scheme": s,
2730
+ "form-scheme": c,
2731
+ "main-col-width": "250px",
2732
+ "add-button": !1
2733
+ }, null, 8, ["modelValue"]),
2734
+ P(Ue(a), {
2735
+ teleport: "#modal",
2736
+ visible: o.value,
2737
+ title: "Новий елемент легенди",
2738
+ "onUpdate:visible": u
2739
+ }, {
2740
+ footer: Ke(() => [
2741
+ v("div", ma, [
2742
+ v("button", {
2743
+ type: "button",
2744
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
2745
+ onClick: m[5] || (m[5] = (g) => u(!1))
2746
+ }, " Скасувати "),
2747
+ v("button", {
2748
+ type: "button",
2749
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed",
2750
+ onClick: h
2751
+ }, " Додати ")
2752
+ ])
2753
+ ]),
2754
+ default: Ke(() => [
2755
+ v("div", ua, [
2756
+ v("div", fa, [
2757
+ m[6] || (m[6] = v("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Назва ", -1)),
2758
+ ln(v("input", {
2759
+ "onUpdate:modelValue": m[2] || (m[2] = (g) => l.value.name = g),
2760
+ type: "text",
2761
+ class: "w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
2762
+ placeholder: "Наприклад, Житлова зона"
2763
+ }, null, 512), [
2764
+ [an, l.value.name]
2765
+ ])
2766
+ ]),
2767
+ v("div", da, [
2768
+ m[7] || (m[7] = v("label", { class: "block text-xs font-medium text-gray-500 uppercase tracking-wide" }, " Колір ", -1)),
2769
+ v("div", pa, [
2770
+ ln(v("input", {
2771
+ "onUpdate:modelValue": m[3] || (m[3] = (g) => l.value.color = g),
2772
+ type: "color",
2773
+ class: "h-10 w-16 rounded border border-gray-300"
2774
+ }, null, 512), [
2775
+ [an, l.value.color]
2776
+ ]),
2777
+ ln(v("input", {
2778
+ "onUpdate:modelValue": m[4] || (m[4] = (g) => l.value.color = g),
2779
+ type: "text",
2780
+ class: "flex-1 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200",
2781
+ placeholder: "#FFFFFF"
2782
+ }, null, 512), [
2783
+ [an, l.value.color]
2784
+ ])
2785
+ ])
2786
+ ])
2787
+ ])
2788
+ ]),
2789
+ _: 1
2790
+ }, 8, ["visible"])
2791
+ ]));
2792
+ }
2793
+ }), ga = { class: "space-y-3 bg-gradient-to-br from-sky-50 to-blue-50 p-4 rounded-xl border border-sky-100 shadow-sm" }, va = ["onClick"], ya = ["aria-checked", "value"], xa = { key: 0 }, ba = /* @__PURE__ */ ae({
2794
+ __name: "view-mode-toggle",
2795
+ props: {
2796
+ modelValue: {},
2797
+ options: {},
2798
+ showHtml: { type: Boolean }
2799
+ },
2800
+ emits: ["update:modelValue"],
2801
+ setup(e, { emit: n }) {
2802
+ const t = e, i = n, r = (l) => i("update:modelValue", l), o = t.options || [
2803
+ { value: "all", label: "All" },
2804
+ { value: "list", label: "List" },
2805
+ { value: "none", label: "None" }
2806
+ ];
2807
+ return (l, a) => (T(), q("div", ga, [
2808
+ a[1] || (a[1] = v("label", { class: "text-sm font-medium text-gray-600" }, "Режим відображення", -1)),
2809
+ v("div", {
2810
+ role: "radiogroup",
2811
+ class: Le(["grid gap-2", `grid-cols-${Ue(o).length}`])
2812
+ }, [
2813
+ (T(!0), q(vt, null, yt(Ue(o), (s) => (T(), q("div", {
2814
+ key: s.value,
2815
+ onClick: (c) => r(s.value),
2816
+ class: Le(["flex items-center justify-center space-x-2 rounded-lg p-2 border transition-all duration-300 cursor-pointer", [
2817
+ e.modelValue === s.value ? "bg-gradient-to-r from-sky-200 to-blue-200 border-transparent shadow-sm" : "bg-white border-gray-100 hover:border-sky-200 hover:shadow-sm"
2818
+ ]])
2819
+ }, [
2820
+ v("button", {
2821
+ type: "button",
2822
+ role: "radio",
2823
+ "aria-checked": e.modelValue === s.value,
2824
+ value: s.value,
2825
+ class: "aspect-square rounded-full border border-primary h-4 w-4 flex items-center justify-center text-sky-500"
2826
+ }, [
2827
+ e.modelValue === s.value ? (T(), q("span", xa, [...a[0] || (a[0] = [
2828
+ v("svg", {
2829
+ xmlns: "http://www.w3.org/2000/svg",
2830
+ viewBox: "0 0 24 24",
2831
+ fill: "none",
2832
+ stroke: "currentColor",
2833
+ "stroke-width": "2",
2834
+ "stroke-linecap": "round",
2835
+ "stroke-linejoin": "round",
2836
+ class: "lucide lucide-circle h-2.5 w-2.5 fill-current text-current"
2837
+ }, [
2838
+ v("circle", {
2839
+ cx: "12",
2840
+ cy: "12",
2841
+ r: "10"
2842
+ })
2843
+ ], -1)
2844
+ ])])) : H("", !0)
2845
+ ], 8, ya),
2846
+ v("label", {
2847
+ class: Le(["text-xs font-medium cursor-pointer", e.modelValue === s.value ? "text-gray-700" : "text-gray-600"])
2848
+ }, ue(s.label), 3)
2849
+ ], 10, va))), 128))
2850
+ ], 2)
2851
+ ]));
2852
+ }
2853
+ }), Sa = { class: "flex flex-col flex-1 min-h-0" }, _a = { class: "flex flex-col flex-1 min-h-0" }, ka = /* @__PURE__ */ ae({
2854
+ __name: "vs-tab-card",
2855
+ props: {
2856
+ fields: {},
2857
+ columns: {},
2858
+ viewMode: {},
2859
+ html: {}
2860
+ },
2861
+ emits: ["update:columns", "save"],
2862
+ setup(e, { emit: n }) {
2863
+ const t = e, i = n, r = I(t.columns || []);
2864
+ F(
2865
+ () => t.columns,
2866
+ (g) => r.value = g || [],
2867
+ { immediate: !0 }
2868
+ ), F(r, (g) => i("update:columns", g));
2869
+ const o = I(t.viewMode ?? "list");
2870
+ F(
2871
+ () => t.viewMode,
2872
+ (g) => {
2873
+ g && g !== o.value && (o.value = g);
2874
+ }
2875
+ );
2876
+ const l = I(t.html ?? "");
2877
+ F(
2878
+ () => t.html,
2879
+ (g) => {
2880
+ typeof g == "string" && g !== l.value && (l.value = g);
2881
+ },
2882
+ { immediate: !0 }
2883
+ );
2884
+ const a = I(!1), s = I([]), c = [
2885
+ { key: "name", label: "Name", type: "main" }
2886
+ // { key: "ua", label: "UA" },
2887
+ // { key: 'format', label: 'Format' },
2888
+ //{ key: 'is_admin', label: 'Admin', options: [{ text: "Так", id: true }, { text: "Ні", id: false }]},
2889
+ /* { key: "meta", label: "Мета" }, */
2890
+ ], u = {
2891
+ name: {
2892
+ type: "text",
2893
+ label: "Name",
2894
+ validators: ["required"],
2895
+ disabled: !0
2896
+ },
2897
+ label: { type: "text", label: "Label", validators: ["required"] },
2898
+ format: {
2899
+ type: "radio",
2900
+ label: "Format",
2901
+ mode: "inline",
2902
+ validators: ["required"],
2903
+ options: [
2904
+ { text: "Text", id: "text" },
2905
+ { text: "Number", id: "number" },
2906
+ { text: "Date", id: "date" },
2907
+ { text: "File", id: "file" },
2908
+ { text: "Select", id: "select" },
2909
+ { text: "Tags", id: "tags" }
2910
+ ]
2911
+ },
2912
+ is_admin: { type: "Switcher", label: "Тільки для адміністративної частини" },
2913
+ data: {
2914
+ type: "select",
2915
+ label: "Класифікатор",
2916
+ data: "admin.cls.name"
2917
+ // conditions: ['format', 'in', ['select', 'badge', 'tags']],
2918
+ }
2919
+ /* meta: {
2920
+ type: "combobox",
2921
+ label: "Мета",
2922
+ validators: ["required"],
2923
+ mode: "combo",
2924
+ options: [
2925
+ { text: "Title", id: "title" },
2926
+ { text: "Features", id: "features" },
2927
+ { text: "Status", id: "status" },
2928
+ { text: "Tags", id: "tags" },
2929
+ { text: "Category", id: "category" },
2930
+ ],
2931
+ }, */
2932
+ };
2933
+ function y() {
2934
+ s.value = o.value === "html" ? [] : r.value.map((g) => g.name || g.id), a.value = !0;
2935
+ }
2936
+ function h() {
2937
+ var N;
2938
+ const g = [...r.value], S = ((N = t.fields) == null ? void 0 : N.filter(($) => s.value.includes($.name)).map(($) => {
2939
+ const { type: Ae, format: pe, ...z } = $;
2940
+ return {
2941
+ ...z,
2942
+ format: pe ?? ($.name === "files" ? "file" : Ae ?? "text")
2943
+ };
2944
+ })) || [], A = Tn(g, S, {
2945
+ selectedKeys: s.value,
2946
+ resolveKey: ($) => Oe($)
2947
+ });
2948
+ if (r.value = A, o.value === "html" && S.length) {
2949
+ const $ = S.map((z) => {
2950
+ const Ee = z.label ?? "", me = z.name ?? z.id ?? "";
2951
+ return `<dd>${Ee}</dd>
2952
+ <dt>{{ ${me} }}</dt>`;
2953
+ }).join(`
2954
+ `), pe = (l.value ?? "").trimEnd();
2955
+ l.value = pe ? `${pe}
2956
+ ${$}` : $;
2957
+ }
2958
+ a.value = !1, s.value = [];
2959
+ }
2960
+ function x() {
2961
+ a.value = !1, s.value = [];
2962
+ }
2963
+ function p() {
2964
+ const g = o.value === "html" ? "html" : "list", S = {
2965
+ card_mode: g
2966
+ };
2967
+ g === "html" ? S.html = l.value : g === "list" && (S.list = r.value), i("save", "card", S);
2968
+ }
2969
+ const m = [
2970
+ { value: "all", label: "Всі" },
2971
+ { value: "list", label: "Список" },
2972
+ { value: "none", label: "Жодне" },
2973
+ { value: "html", label: "HTML" }
2974
+ ];
2975
+ return (g, S) => (T(), q("div", Sa, [
2976
+ v("div", { class: "flex justify-between mb-3 gap-2" }, [
2977
+ v("button", {
2978
+ onClick: y,
2979
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2980
+ }, " Імпорт "),
2981
+ v("button", {
2982
+ onClick: p,
2983
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
2984
+ }, " Зберегти ")
2985
+ ]),
2986
+ P(ba, {
2987
+ modelValue: o.value,
2988
+ "onUpdate:modelValue": S[0] || (S[0] = (A) => o.value = A),
2989
+ options: m
2990
+ }, null, 8, ["modelValue"]),
2991
+ v("div", _a, [
2992
+ o.value === "list" ? (T(), U(ze, {
2993
+ key: 0,
2994
+ modelValue: r.value,
2995
+ "onUpdate:modelValue": S[1] || (S[1] = (A) => r.value = A),
2996
+ "columns-scheme": c,
2997
+ "form-scheme": u,
2998
+ "main-col-width": "250px",
2999
+ "add-button": !1
3000
+ }, null, 8, ["modelValue"])) : o.value === "html" ? (T(), U(St, {
3001
+ key: 1,
3002
+ modelValue: l.value,
3003
+ "onUpdate:modelValue": S[2] || (S[2] = (A) => l.value = A),
3004
+ language: "html",
3005
+ theme: "vs-light",
3006
+ class: "flex-1 min-h-0"
3007
+ }, null, 8, ["modelValue"])) : H("", !0)
3008
+ ]),
3009
+ P(En, {
3010
+ visible: a.value,
3011
+ "onUpdate:visible": S[3] || (S[3] = (A) => a.value = A),
3012
+ selection: s.value,
3013
+ "onUpdate:selection": S[4] || (S[4] = (A) => s.value = A),
3014
+ fields: e.fields,
3015
+ title: "Імпорт полів для картки",
3016
+ "id-prefix": "import-card",
3017
+ onConfirm: h,
3018
+ onCancel: x
3019
+ }, null, 8, ["visible", "selection", "fields"])
3020
+ ]));
3021
+ }
3022
+ }), Ca = { class: "flex flex-col flex-1 min-h-0" }, Aa = /* @__PURE__ */ ae({
3023
+ __name: "vs-tab-filter",
3024
+ props: {
3025
+ fields: {},
3026
+ columns: {}
3027
+ },
3028
+ emits: ["update:columns", "save"],
3029
+ setup(e, { emit: n }) {
3030
+ const t = e, i = n;
3031
+ console.log(t.columns);
3032
+ const r = I(t.columns || []);
3033
+ F(
3034
+ () => t.columns,
3035
+ (p) => r.value = p || [],
3036
+ { immediate: !0 }
3037
+ ), F(r, (p) => i("update:columns", p), { deep: !0, immediate: !0 });
3038
+ const o = I("list"), l = I(!1), a = I([]), s = [
3039
+ { key: "id", label: "Name" },
3040
+ { key: "label", label: "UA" }
3041
+ // { key: "type", label: "Тип" },
3042
+ ], c = {
3043
+ name: { type: "text", label: "Name", disabled: !0, validators: ["required"] },
3044
+ label: { type: "text", label: "UA", validators: ["required"] },
3045
+ type: {
3046
+ type: "radio",
3047
+ label: "Тип",
3048
+ position: "horizontal",
3049
+ validators: ["required"],
3050
+ options: [
3051
+ { text: "Check", id: "check" },
3052
+ { text: "Range", id: "range" },
3053
+ { text: "Date", id: "date" },
3054
+ { text: "Text", id: "text" },
3055
+ { text: "Select", id: "autocomplete" }
3056
+ ]
3057
+ },
3058
+ hidden: {
3059
+ label: "Приховати",
3060
+ type: "Switcher"
3061
+ },
3062
+ data: {
3063
+ type: "select",
3064
+ label: "Класифікатор",
3065
+ data: "admin.cls.name",
3066
+ info: "Класифікатори можна переглянути у реєстрі “Класифікатори“. Якщо не вказувати класифікатор, то текстові дані можуть бути класифіковані системно",
3067
+ conditions: ["type", "in", ["autocomplete", "select", "check"]]
3068
+ }
3069
+ };
3070
+ function u() {
3071
+ a.value = r.value.map((p) => p.name || p.id), l.value = !0;
3072
+ }
3073
+ function y() {
3074
+ var S;
3075
+ const p = [...r.value], m = ((S = t.fields) == null ? void 0 : S.filter((A) => a.value.includes(A.name))) || [], g = Tn(p, m, {
3076
+ selectedKeys: a.value,
3077
+ resolveKey: (A) => Oe(A)
3078
+ });
3079
+ r.value = g, l.value = !1, a.value = [];
3080
+ }
3081
+ function h() {
3082
+ l.value = !1, a.value = [];
3083
+ }
3084
+ function x() {
3085
+ let p = [];
3086
+ o.value === "all" ? p = t.fields || [] : o.value === "none" ? p = [] : p = r.value, i("save", p);
3087
+ }
3088
+ return (p, m) => (T(), q("div", Ca, [
3089
+ v("div", { class: "flex justify-between mb-3 gap-2" }, [
3090
+ v("button", {
3091
+ onClick: u,
3092
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
3093
+ }, " Імпорт "),
3094
+ v("button", {
3095
+ onClick: x,
3096
+ class: "inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-md bg-sky-100 hover:bg-sky-200 text-sky-700 font-medium text-sm transition disabled:opacity-70 disabled:cursor-not-allowed"
3097
+ }, " Зберегти фільтр ")
3098
+ ]),
3099
+ o.value === "list" ? (T(), U(ze, {
3100
+ key: 0,
3101
+ modelValue: r.value,
3102
+ "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value = g),
3103
+ "columns-scheme": s,
3104
+ "form-scheme": c,
3105
+ "main-col-width": "250px",
3106
+ "add-button": !1
3107
+ }, null, 8, ["modelValue"])) : H("", !0),
3108
+ P(En, {
3109
+ visible: l.value,
3110
+ "onUpdate:visible": m[1] || (m[1] = (g) => l.value = g),
3111
+ selection: a.value,
3112
+ "onUpdate:selection": m[2] || (m[2] = (g) => a.value = g),
3113
+ fields: e.fields,
3114
+ title: "Імпорт полів",
3115
+ "id-prefix": "import-filter",
3116
+ onConfirm: y,
3117
+ onCancel: h
3118
+ }, null, 8, ["visible", "selection", "fields"])
3119
+ ]));
3120
+ }
3121
+ }), Ea = /* @__PURE__ */ ae({
3122
+ __name: "MapDataLayer",
3123
+ props: {
3124
+ id: {},
3125
+ layer: {},
3126
+ styleSpec: {},
3127
+ autoCenter: { type: [Boolean, null] }
3128
+ },
3129
+ setup(e, { expose: n }) {
3130
+ var p, m, g, S, A;
3131
+ const { map: t, flyTo: i, setZoom: r } = _i(), o = ((m = (p = xt()) == null ? void 0 : p.appContext.config.globalProperties) == null ? void 0 : m.$settings) || null, l = e, a = l.id;
3132
+ String(l.id);
3133
+ const s = `${location.origin}/api/vtile/${l.id}/ua/{z}/{x}/{y}.vmt?all=1`, c = qe(a, {
3134
+ source: {
3135
+ type: "vector",
3136
+ tiles: [s],
3137
+ minzoom: 0,
3138
+ maxzoom: 14
3139
+ },
3140
+ popup: l.layer.popup,
3141
+ card: (g = l.layer) == null ? void 0 : g.card,
3142
+ layer: {
3143
+ // id: layerId,
3144
+ // source: sourceId,
3145
+ // 'source-layer': props.id,
3146
+ style: (S = l.layer) == null ? void 0 : S.style
3147
+ /* paint: {
3148
+ 'circle-radius': 6,
3149
+ 'circle-color': 'red',
3150
+ } */
3151
+ }
3152
+ });
3153
+ n({ layerHandle: c }), (l.autoCenter ?? !0) && i({ center: l.layer.center || ((A = o == null ? void 0 : o.map) == null ? void 0 : A.center) || [30, 50], animate: !1 });
3154
+ let u = null;
3155
+ function y() {
3156
+ if (!(c != null && c.setTiles)) return;
3157
+ const N = s.includes("?") ? "&" : "?", $ = `${s}${N}_=${Date.now()}`;
3158
+ c.setTiles([$]);
3159
+ }
3160
+ function h() {
3161
+ u && clearTimeout(u), u = setTimeout(() => {
3162
+ u = null, x().catch((N) => console.error("Failed to update map layer", N));
3163
+ }, 300);
3164
+ }
3165
+ async function x() {
3166
+ t.value && (y(), c.setStyle(l.styleSpec ?? null));
3167
+ }
3168
+ return F(() => l.styleSpec, h, { deep: !0 }), F(
3169
+ () => {
3170
+ var N;
3171
+ return (N = l.layer) == null ? void 0 : N.card;
3172
+ },
3173
+ (N) => {
3174
+ c && (c.card = N);
3175
+ }
3176
+ ), bt(() => {
3177
+ c.remove();
3178
+ }), (N, $) => null;
3179
+ }
3180
+ }), Ta = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, Ia = { class: "flex-1 relative overflow-hidden" }, wa = { class: "absolute top-0 left-0 w-full z-20" }, Na = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, La = { class: "flex items-start justify-between gap-4" }, Oa = { class: "flex-1 min-w-0" }, Fa = { class: "flex items-center text-sm text-gray-500 mb-3" }, $a = { class: "text-gray-900 font-medium truncate max-w-xs" }, Pa = { class: "flex items-center justify-between gap-4" }, Ra = { class: "flex-1 min-w-0" }, Ma = { class: "flex items-center gap-3 mb-1" }, Ba = { class: "text-base font-semibold text-gray-900 truncate" }, Da = {
3181
+ key: 0,
3182
+ class: "px-2 py-0.5 bg-green-50 border border-green-200 rounded flex-shrink-0"
3183
+ }, Ua = { class: "text-xs font-medium text-green-700" }, Ka = ["title"], qa = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[115px]" }, Va = { class: "relative w-full h-full" }, Ya = { style: { top: "17px", left: "230px", position: "absolute", "z-index": "1" } }, ja = { class: "absolute top-4 left-4 z-20" }, Wa = { class: "absolute bottom-4 left-4 z-20" }, Ga = { class: "flex-1 flex flex-col h-full" }, za = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, Qa = { class: "items-center justify-center text-muted-foreground grid w-full grid-cols-6 h-12 p-1 bg-gray-50 rounded-xl shadow-sm" }, Ha = ["aria-selected", "onClick"], Xa = { class: "leading-none" }, Ja = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, Za = "OpenGIS", gt = 2, Be = 5, es = 1e3, ns = /* @__PURE__ */ ae({
3184
+ __name: "service",
3185
+ props: {
3186
+ hideServiceKey: { type: Boolean, default: !1 }
3187
+ },
3188
+ setup(e) {
3189
+ var Vn, Yn;
3190
+ const t = vi(e, "hideServiceKey"), i = bi(), r = Si(), { id: o } = i.params, l = I(null), a = I(null), s = I({}), c = I(null), u = ((Yn = (Vn = xt()) == null ? void 0 : Vn.appContext.config.globalProperties) == null ? void 0 : Yn.$settings) || null;
3191
+ function y(f) {
3192
+ typeof document > "u" || (document.title = f ? `${f} — Сервіс` : Za);
3193
+ }
3194
+ let h = null;
3195
+ const x = I(!1);
3196
+ function p() {
3197
+ var f;
3198
+ return (f = l.value) == null ? void 0 : f.ctx;
3199
+ }
3200
+ function m(f) {
3201
+ typeof window > "u" || window.dispatchEvent(
3202
+ new CustomEvent(Ni, {
3203
+ detail: f
3204
+ })
3205
+ );
3206
+ }
3207
+ function g(f) {
3208
+ var M, C, Z;
3209
+ const d = (C = (M = p()) == null ? void 0 : M.map) == null ? void 0 : C.value;
3210
+ if (!d || !f) return [];
3211
+ const k = (Z = c.value) != null && Z.service_id ? String(c.value.service_id) : null;
3212
+ return (d.queryRenderedFeatures(f) || []).filter((O) => {
3213
+ var jn, Wn, Gn, zn, Qn, Hn;
3214
+ const re = ((jn = O == null ? void 0 : O.properties) == null ? void 0 : jn.id) ?? (O == null ? void 0 : O.id);
3215
+ if (re == null || !(O != null && O.source) || k && String(O.source) !== k)
3216
+ return !1;
3217
+ const G = qe(O.source) || qe((Wn = O.layer) == null ? void 0 : Wn.id);
3218
+ if (!G) return !1;
3219
+ const ce = (zn = (Gn = G == null ? void 0 : G.opts) == null ? void 0 : Gn.source) == null ? void 0 : zn.type, Me = (Hn = (Qn = G == null ? void 0 : G.opts) == null ? void 0 : Qn.layer) == null ? void 0 : Hn.type;
3220
+ return ce !== "raster" && Me !== "raster";
3221
+ });
3222
+ }
3223
+ function S(f) {
3224
+ const d = g(f == null ? void 0 : f.point);
3225
+ m({
3226
+ features: d,
3227
+ externalItems: []
3228
+ });
3229
+ }
3230
+ function A(f) {
3231
+ if (Array.isArray(f)) return A(f[0]);
3232
+ if (typeof f != "string" && typeof f != "number") return null;
3233
+ const d = typeof f == "number" ? f : Number(f.trim());
3234
+ return Number.isFinite(d) ? d : null;
3235
+ }
3236
+ function N(f, d) {
3237
+ return f.toFixed(d);
3238
+ }
3239
+ function $(f, d, k) {
3240
+ const L = 0.5 * 10 ** -k;
3241
+ return Math.abs(f - d) > L;
3242
+ }
3243
+ function Ae() {
3244
+ var O, re, G, ce;
3245
+ const f = (re = (O = p()) == null ? void 0 : O.map) == null ? void 0 : re.value;
3246
+ if (!f) return;
3247
+ const d = A(i.query.z), k = A(i.query.x), L = A(i.query.y);
3248
+ if (d == null || k == null || L == null) return;
3249
+ const M = (G = f.getCenter) == null ? void 0 : G.call(f), C = (ce = f.getZoom) == null ? void 0 : ce.call(f);
3250
+ (!M || $(M.lng, k, Be) || $(M.lat, L, Be) || $(C ?? 0, d, gt)) && (x.value = !0, f.jumpTo({ center: [k, L], zoom: d }), x.value = !1);
3251
+ }
3252
+ function pe() {
3253
+ var M, C, Z, O;
3254
+ if (x.value) return;
3255
+ const f = (C = (M = p()) == null ? void 0 : M.map) == null ? void 0 : C.value;
3256
+ if (!f) return;
3257
+ const d = (Z = f.getCenter) == null ? void 0 : Z.call(f), k = (O = f.getZoom) == null ? void 0 : O.call(f);
3258
+ if (!d || k == null) return;
3259
+ const L = {
3260
+ ...i.query,
3261
+ z: N(k, gt),
3262
+ x: N(d.lng, Be),
3263
+ y: N(d.lat, Be)
3264
+ };
3265
+ i.query.z === L.z && i.query.x === L.x && i.query.y === L.y || r.replace({ query: L });
3266
+ }
3267
+ const z = I(null), Ee = I(""), me = I([]), en = I([]), Fe = I([]), nn = I("list"), tn = I(""), $e = I([]), Pe = I(!0);
3268
+ let se = null;
3269
+ const j = he(
3270
+ () => {
3271
+ var f, d;
3272
+ return ((f = c.value) == null ? void 0 : f.id) ?? ((d = c.value) == null ? void 0 : d.service_id) ?? null;
3273
+ }
3274
+ ), Mn = he(() => {
3275
+ const f = (u == null ? void 0 : u.map) || null, d = (f == null ? void 0 : f.boundary) ?? null, k = (f == null ? void 0 : f.katottg) ?? null;
3276
+ return !d && !k ? null : { boundary: d, katottg: k };
3277
+ }), rn = he(() => {
3278
+ const f = c.value;
3279
+ if (!f) return "";
3280
+ const d = [];
3281
+ !t.value && f.service_key && d.push(`Сервіс: ${f.service_key}`), f.description && d.push(f.description);
3282
+ const k = f.group_name || f.group_id;
3283
+ return k && d.push(`Група: ${k}`), typeof f.is_public < "u" && d.push(f.is_public ? "Публічний" : "Не публічний"), typeof f.is_active < "u" && d.push(f.is_active ? "Активний" : "Неактивний"), d.join(", ");
3284
+ }), Bn = he(() => {
3285
+ const f = c.value, d = (f == null ? void 0 : f.group_name) || (f == null ? void 0 : f.group_id);
3286
+ return d ? String(d).toUpperCase() : "";
3287
+ }), ri = he(() => {
3288
+ var k;
3289
+ const f = (k = i.matched[i.matched.length - 1]) == null ? void 0 : k.path;
3290
+ return (typeof f == "string" && f ? f : i.path).replace(/\/:id\??$/, "") || "/";
3291
+ }), oi = he(() => {
3292
+ var d;
3293
+ const f = (d = i.meta) == null ? void 0 : d.title;
3294
+ return typeof f == "string" && f.trim() ? f : "Datasets";
3295
+ });
3296
+ function li() {
3297
+ r.push(ri.value);
3298
+ }
3299
+ const Dn = [
3300
+ { key: "style", label: "Стиль", icon: Di },
3301
+ { key: "popup", label: "Попап", icon: Gl },
3302
+ { key: "filter", label: "Фільтр", icon: Xl },
3303
+ { key: "legend", label: "Легенда", icon: Vl },
3304
+ { key: "card", label: "Картка", icon: Ui },
3305
+ { key: "metadata", label: "Метадані", icon: Bi }
3306
+ ], Un = Dn.map((f) => f.key), W = I("style");
3307
+ yi(async () => {
3308
+ const f = i.query.tab;
3309
+ f && Un.includes(f) && (W.value = f), await Re(), ai();
3310
+ });
3311
+ async function ai() {
3312
+ var L;
3313
+ const f = p();
3314
+ if (!(f != null && f.ready)) return;
3315
+ await f.ready(), Ae();
3316
+ const d = (L = f.map) == null ? void 0 : L.value;
3317
+ if (!d) return;
3318
+ const k = () => pe();
3319
+ d.on("moveend", k), d.on("zoomend", k), d.on("click", S), h = () => {
3320
+ d.off("moveend", k), d.off("zoomend", k), d.off("click", S);
3321
+ };
3322
+ }
3323
+ F(
3324
+ () => [i.query.z, i.query.x, i.query.y],
3325
+ () => {
3326
+ Ae();
3327
+ }
3328
+ ), F(W, (f) => {
3329
+ i.query.tab !== f && r.replace({ query: { ...i.query, tab: f } });
3330
+ }), F(
3331
+ () => i.query.tab,
3332
+ (f) => {
3333
+ f && Un.includes(f) && W.value !== f && (W.value = f);
3334
+ }
3335
+ ), F(
3336
+ () => {
3337
+ var f;
3338
+ return (f = c.value) == null ? void 0 : f.name;
3339
+ },
3340
+ (f) => y(f),
3341
+ { immediate: !0 }
3342
+ );
3343
+ function Kn(f) {
3344
+ if (!f) return null;
3345
+ try {
3346
+ return JSON.parse(JSON.stringify(f));
3347
+ } catch (d) {
3348
+ return console.warn("Failed to clone style", d), null;
3349
+ }
3350
+ }
3351
+ function on(f) {
3352
+ if (!f) return null;
3353
+ if (typeof f == "string")
3354
+ try {
3355
+ return Jn(bn(f) || null);
3356
+ } catch (d) {
3357
+ return console.warn("Failed to parse style yaml", d), null;
3358
+ }
3359
+ return Jn(Kn(f));
3360
+ }
3361
+ function si(f, d) {
3362
+ try {
3363
+ return JSON.stringify(f) === JSON.stringify(d);
3364
+ } catch {
3365
+ return !1;
3366
+ }
3367
+ }
3368
+ function ci() {
3369
+ var d;
3370
+ if (!c.value) return;
3371
+ const f = on(z.value);
3372
+ si(f, ((d = c.value) == null ? void 0 : d.style) ?? null) || (c.value = {
3373
+ ...c.value,
3374
+ style: f
3375
+ });
3376
+ }
3377
+ function ui() {
3378
+ se && clearTimeout(se), se = setTimeout(() => {
3379
+ se = null, ci();
3380
+ }, es);
3381
+ }
3382
+ const Re = async () => {
3383
+ try {
3384
+ const f = await fetch(`/api/gis-service/${o}`);
3385
+ if (!f.ok) throw new Error(`${f.status}`);
3386
+ const d = await f.json();
3387
+ s.value = d || {}, a.value = o;
3388
+ const k = on(d.style);
3389
+ c.value = d ? { ...d, style: Kn(k) } : null, z.value = k, Ee.value = typeof (d == null ? void 0 : d.style) == "string" ? d.style : k ? ii(k) : "", en.value = (d == null ? void 0 : d.popup) || [], nn.value = d.card_mode === "html" ? "html" : "list", Fe.value = d.card, tn.value = d.html, me.value = (d == null ? void 0 : d.legend) || [], $e.value = (d == null ? void 0 : d.filters) || [];
3390
+ } catch (f) {
3391
+ console.error("Failed to fetch map info", f);
3392
+ }
3393
+ };
3394
+ F(
3395
+ () => {
3396
+ var f;
3397
+ return (f = c.value) == null ? void 0 : f.style;
3398
+ },
3399
+ (f) => {
3400
+ z.value = on(f);
3401
+ },
3402
+ { deep: !0 }
3403
+ ), F(
3404
+ () => z.value,
3405
+ () => {
3406
+ ui();
3407
+ },
3408
+ { deep: !0 }
3409
+ ), bt(() => {
3410
+ se && (clearTimeout(se), se = null), h == null || h(), h = null;
3411
+ });
3412
+ async function fi(f) {
3413
+ try {
3414
+ const d = await fetch(`/api/gis-clear-vtile/${f}`), { message: k, error: L, code: M } = await d.json();
3415
+ if (M === 200)
3416
+ return oe({ type: "success", title: "Успіх", message: k });
3417
+ oe({ type: "error", title: "Помилка", message: L });
3418
+ } catch (d) {
3419
+ oe({
3420
+ type: "error",
3421
+ title: "Помилка",
3422
+ message: "Не вдалося очистити тайли"
3423
+ }), console.error(d);
3424
+ }
3425
+ }
3426
+ async function Te(f, d) {
3427
+ await qn({ [f]: d }, f);
3428
+ }
3429
+ async function qn(f, d) {
3430
+ if (c.value = {
3431
+ ...c.value || {},
3432
+ ...f
3433
+ }, typeof f.html < "u" && (s.value = {
3434
+ ...s.value || {},
3435
+ html: f.html
3436
+ }), !!j.value)
3437
+ try {
3438
+ if (!(await fetch(`/api/gis-service/${j.value}`, {
3439
+ method: "PUT",
3440
+ headers: { "Content-Type": "application/json" },
3441
+ body: JSON.stringify(f)
3442
+ })).ok) throw new Error("Save failed");
3443
+ oe({
3444
+ type: "success",
3445
+ title: "Успіх",
3446
+ message: `${d} saved`
3447
+ }), await Re();
3448
+ } catch (k) {
3449
+ oe({
3450
+ type: "error",
3451
+ title: "Помилка",
3452
+ message: `Failed to save ${d}`
3453
+ }), console.error(k);
3454
+ }
3455
+ }
3456
+ async function di(f, d) {
3457
+ if (f !== "card") {
3458
+ await Te(f, d);
3459
+ return;
3460
+ }
3461
+ const k = (d == null ? void 0 : d.card_mode) === "html" ? "html" : "list", L = k === "html" && typeof (d == null ? void 0 : d.html) == "string" ? d.html : "", M = (k === "html" ? [] : null) || (Array.isArray(d == null ? void 0 : d.list) ? d.list : []);
3462
+ Fe.value = M, nn.value = k, tn.value = L;
3463
+ const C = {
3464
+ card_mode: k
3465
+ };
3466
+ k === "html" && (C.html = L), k === "list" && (C.card = M), await qn(C, "card");
3467
+ }
3468
+ return (f, d) => {
3469
+ var k, L, M;
3470
+ return T(), q("div", Ta, [
3471
+ v("div", Ia, [
3472
+ v("div", wa, [
3473
+ v("div", Na, [
3474
+ v("div", La, [
3475
+ v("div", Oa, [
3476
+ v("div", Fa, [
3477
+ v("button", {
3478
+ type: "button",
3479
+ class: "hover:text-gray-700 cursor-pointer transition-colors",
3480
+ onClick: li
3481
+ }, ue(oi.value), 1),
3482
+ d[11] || (d[11] = v("svg", {
3483
+ xmlns: "http://www.w3.org/2000/svg",
3484
+ width: "24",
3485
+ height: "24",
3486
+ viewBox: "0 0 24 24",
3487
+ fill: "none",
3488
+ stroke: "currentColor",
3489
+ "stroke-width": "2",
3490
+ "stroke-linecap": "round",
3491
+ "stroke-linejoin": "round",
3492
+ class: "lucide lucide-chevron-right w-4 h-4 mx-1"
3493
+ }, [
3494
+ v("path", { d: "m9 18 6-6-6-6" })
3495
+ ], -1)),
3496
+ v("span", $a, ue(((k = c.value) == null ? void 0 : k.name) || "Dataset"), 1)
3497
+ ]),
3498
+ v("div", Pa, [
3499
+ v("div", Ra, [
3500
+ v("div", Ma, [
3501
+ v("h1", Ba, ue(((L = c.value) == null ? void 0 : L.name) || "Dataset"), 1),
3502
+ Bn.value ? (T(), q("div", Da, [
3503
+ v("span", Ua, ue(Bn.value), 1)
3504
+ ])) : H("", !0)
3505
+ ]),
3506
+ rn.value ? (T(), q("p", {
3507
+ key: 0,
3508
+ class: "text-xs text-gray-500 truncate",
3509
+ title: rn.value
3510
+ }, ue(rn.value), 9, Ka)) : H("", !0)
3511
+ ])
3512
+ ])
3513
+ ]),
3514
+ j.value ? (T(), U(Li, {
3515
+ key: 0,
3516
+ class: "flex-shrink-0",
3517
+ "entity-id": j.value,
3518
+ "entity-info": { name: (M = c.value) == null ? void 0 : M.name },
3519
+ table: "gis.services.table",
3520
+ "entity-label": "Сервіс",
3521
+ "save-method": "put",
3522
+ "show-xml-item": !1,
3523
+ "clear-tiles-handler": fi,
3524
+ onSaved: Re
3525
+ }, null, 8, ["entity-id", "entity-info"])) : H("", !0)
3526
+ ])
3527
+ ])
3528
+ ]),
3529
+ v("div", qa, [
3530
+ v("div", Va, [
3531
+ P(ki, {
3532
+ ref_key: "mapViewRef",
3533
+ ref: l
3534
+ }, {
3535
+ default: Ke(() => {
3536
+ var C, Z, O, re, G, ce, Me;
3537
+ return [
3538
+ (C = c.value) != null && C.service_id ? (T(), U(Ea, {
3539
+ key: 0,
3540
+ id: (Z = c.value) == null ? void 0 : Z.service_id,
3541
+ layer: c.value,
3542
+ "style-spec": ((O = c.value) == null ? void 0 : O.style) || null,
3543
+ autoCenter: !1
3544
+ }, null, 8, ["id", "layer", "style-spec"])) : H("", !0),
3545
+ j.value ? (T(), U(Ci, {
3546
+ key: 1,
3547
+ "layer-id": j.value,
3548
+ boundary: ((re = c.value) == null ? void 0 : re.boundary) || ((G = Mn.value) == null ? void 0 : G.boundary) || null,
3549
+ katottg: ((ce = c.value) == null ? void 0 : ce.katottg) || ((Me = Mn.value) == null ? void 0 : Me.katottg) || null
3550
+ }, null, 8, ["layer-id", "boundary", "katottg"])) : H("", !0),
3551
+ v("div", Ya, [
3552
+ j.value ? (T(), U(Ai, {
3553
+ key: 0,
3554
+ "layer-id": j.value,
3555
+ filters: $e.value
3556
+ }, null, 8, ["layer-id", "filters"])) : H("", !0)
3557
+ ]),
3558
+ d[12] || (d[12] = v("div", {
3559
+ id: "map-filter-popover-host",
3560
+ class: "map-widget__filter-host"
3561
+ }, null, -1)),
3562
+ v("div", ja, [
3563
+ P(Ei)
3564
+ ]),
3565
+ P(Oi, null, {
3566
+ default: Ke(() => [
3567
+ P(Fi),
3568
+ P($i),
3569
+ P(Pi),
3570
+ P(Xn),
3571
+ s.value.center ? (T(), U(Xn, {
3572
+ key: 0,
3573
+ targetCenter: s.value.center,
3574
+ targetLabel: "Ценр даних"
3575
+ }, null, 8, ["targetCenter"])) : H("", !0)
3576
+ ]),
3577
+ _: 1
3578
+ }),
3579
+ v("div", Wa, [
3580
+ P(Ti, {
3581
+ items: me.value || null
3582
+ }, null, 8, ["items"])
3583
+ ]),
3584
+ P(Ii),
3585
+ P(wi, {
3586
+ html: s.value.html
3587
+ }, null, 8, ["html"])
3588
+ ];
3589
+ }),
3590
+ _: 1
3591
+ }, 512)
3592
+ ])
3593
+ ]),
3594
+ P(Ri, {
3595
+ open: Pe.value,
3596
+ onToggle: d[0] || (d[0] = (C) => Pe.value = !Pe.value),
3597
+ "top-class": "top-4"
3598
+ }, null, 8, ["open"])
3599
+ ]),
3600
+ v("div", {
3601
+ class: Le(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", Pe.value ? "w-[650px]" : "w-0"])
3602
+ }, [
3603
+ v("div", Ga, [
3604
+ v("div", za, [
3605
+ v("div", Qa, [
3606
+ (T(), q(vt, null, yt(Dn, (C) => v("button", {
3607
+ key: C.key,
3608
+ type: "button",
3609
+ role: "tab",
3610
+ "aria-selected": W.value === C.key,
3611
+ class: Le([
3612
+ "whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group",
3613
+ W.value === C.key ? "bg-white shadow-sm text-gray-700" : ""
3614
+ ]),
3615
+ onClick: (Z) => W.value = C.key
3616
+ }, [
3617
+ (T(), U(xi(C.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
3618
+ v("span", Xa, ue(C.label), 1)
3619
+ ], 10, Ha)), 64))
3620
+ ])
3621
+ ]),
3622
+ v("div", Ja, [
3623
+ W.value === "style" ? (T(), U(ra, {
3624
+ key: 0,
3625
+ token: j.value,
3626
+ "style-text": Ee.value,
3627
+ "style-yaml": z.value,
3628
+ "onUpdate:styleYaml": d[1] || (d[1] = (C) => z.value = C),
3629
+ "onUpdate:styleText": d[2] || (d[2] = (C) => Ee.value = C),
3630
+ onSave: d[3] || (d[3] = (C) => Te("style", C))
3631
+ }, null, 8, ["token", "style-text", "style-yaml"])) : W.value === "legend" ? (T(), U(ha, {
3632
+ key: 1,
3633
+ token: j.value,
3634
+ columns: me.value,
3635
+ "onUpdate:columns": d[4] || (d[4] = (C) => me.value = C),
3636
+ onSave: d[5] || (d[5] = (C) => Te("legend", C))
3637
+ }, null, 8, ["token", "columns"])) : W.value === "popup" ? (T(), U(aa, {
3638
+ key: 2,
3639
+ token: j.value,
3640
+ columns: en.value,
3641
+ fields: s.value.fields,
3642
+ "onUpdate:columns": d[6] || (d[6] = (C) => en.value = C),
3643
+ onSave: d[7] || (d[7] = (C) => Te("popup", C))
3644
+ }, null, 8, ["token", "columns", "fields"])) : W.value === "card" ? (T(), U(ka, {
3645
+ key: 3,
3646
+ token: j.value,
3647
+ columns: Fe.value,
3648
+ fields: s.value.fields,
3649
+ "view-mode": nn.value,
3650
+ html: tn.value,
3651
+ "onUpdate:columns": d[8] || (d[8] = (C) => Fe.value = C),
3652
+ onSave: di
3653
+ }, null, 8, ["token", "columns", "fields", "view-mode", "html"])) : W.value === "filter" ? (T(), U(Aa, {
3654
+ key: 4,
3655
+ token: j.value,
3656
+ fields: s.value.fields,
3657
+ columns: $e.value,
3658
+ "onUpdate:columns": d[9] || (d[9] = (C) => $e.value = C),
3659
+ onSave: d[10] || (d[10] = (C) => Te("filters", C))
3660
+ }, null, 8, ["token", "fields", "columns"])) : W.value === "metadata" ? (T(), U(Mi, {
3661
+ key: 5,
3662
+ data: c.value,
3663
+ "entity-id": String(Ue(o)),
3664
+ "entity-type": "service",
3665
+ onSaved: Re
3666
+ }, null, 8, ["data", "entity-id"])) : H("", !0)
3667
+ ])
3668
+ ])
3669
+ ], 2)
3670
+ ]);
3671
+ };
3672
+ }
3673
+ }), ds = /* @__PURE__ */ Ge(ns, [["__scopeId", "data-v-bccb0646"]]);
3674
+ export {
3675
+ ds as default
3676
+ };