@vunk/form 1.1.65 → 1.1.67

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 (282) hide show
  1. package/component.d.ts +1 -1
  2. package/components/button/index.css +1 -0
  3. package/components/button/index.d.ts +1 -1
  4. package/components/button/index.js +43 -57
  5. package/components/button/src/ctx.d.ts +13 -13
  6. package/components/button/src/ctx.js +1 -39
  7. package/components/button/src/index.css +1 -0
  8. package/components/button/src/index.vue.d.ts +37 -73
  9. package/components/button/src/types.d.ts +1 -1
  10. package/components/cascader/index.css +1 -0
  11. package/components/cascader/index.d.ts +1 -1
  12. package/components/cascader/index.js +34 -49
  13. package/components/cascader/src/ctx.d.ts +15 -15
  14. package/components/cascader/src/ctx.js +1 -38
  15. package/components/cascader/src/index.css +1 -0
  16. package/components/cascader/src/index.vue.d.ts +45 -70
  17. package/components/cascader/src/use.d.ts +1 -1
  18. package/components/cascader/src/use.js +1 -28
  19. package/components/checkbox/index.css +1 -0
  20. package/components/checkbox/index.d.ts +1 -1
  21. package/components/checkbox/index.js +48 -53
  22. package/components/checkbox/src/ctx.d.ts +14 -14
  23. package/components/checkbox/src/ctx.js +1 -46
  24. package/components/checkbox/src/index.css +1 -0
  25. package/components/checkbox/src/index.vue.d.ts +43 -63
  26. package/components/color-picker/index.css +1 -0
  27. package/components/color-picker/index.d.ts +1 -1
  28. package/components/color-picker/index.js +38 -42
  29. package/components/color-picker/src/ctx.d.ts +15 -13
  30. package/components/color-picker/src/ctx.js +1 -23
  31. package/components/color-picker/src/index.css +1 -0
  32. package/components/color-picker/src/index.vue.d.ts +36 -65
  33. package/components/date-picker/index.css +1 -0
  34. package/components/date-picker/index.d.ts +1 -1
  35. package/components/date-picker/index.js +42 -55
  36. package/components/date-picker/src/ctx.d.ts +41 -34
  37. package/components/date-picker/src/ctx.js +1 -31
  38. package/components/date-picker/src/index.css +1 -0
  39. package/components/date-picker/src/index.vue.d.ts +122 -133
  40. package/components/date-picker/src/types.d.ts +9 -9
  41. package/components/date-picker/src/types.js +1 -11
  42. package/components/esri-input-geojson/index.css +8 -6
  43. package/components/esri-input-geojson/index.d.ts +1 -1
  44. package/components/esri-input-geojson/index.js +417 -535
  45. package/components/esri-input-geojson/src/append.vue.d.ts +7 -7
  46. package/components/esri-input-geojson/src/const.d.ts +1 -1
  47. package/components/esri-input-geojson/src/const.js +1 -33
  48. package/components/esri-input-geojson/src/ctx.d.ts +44 -35
  49. package/components/esri-input-geojson/src/ctx.js +1 -128
  50. package/components/esri-input-geojson/src/default-view.vue.d.ts +9 -9
  51. package/components/esri-input-geojson/src/index.css +1 -0
  52. package/components/esri-input-geojson/src/index.vue.d.ts +142 -119
  53. package/components/esri-input-geojson/src/types.d.ts +1 -0
  54. package/components/esri-input-geojson/src/viewer.vue.d.ts +23 -22
  55. package/components/form/index.css +1 -0
  56. package/components/form/index.d.ts +1 -1
  57. package/components/form/index.js +57 -87
  58. package/components/form/src/ctx.d.ts +176 -204
  59. package/components/form/src/ctx.js +1 -61
  60. package/components/form/src/index.css +1 -0
  61. package/components/form/src/index.vue.d.ts +515 -601
  62. package/components/form/src/types.d.ts +3 -3
  63. package/components/form/src/utils.d.ts +1 -1
  64. package/components/form/src/utils.js +1 -55
  65. package/components/form-item/index.css +1 -0
  66. package/components/form-item/index.d.ts +1 -1
  67. package/components/form-item/index.js +22 -50
  68. package/components/form-item/src/ctx.d.ts +9 -9
  69. package/components/form-item/src/ctx.js +1 -53
  70. package/components/form-item/src/index.css +1 -0
  71. package/components/form-item/src/index.vue.d.ts +26 -26
  72. package/components/form-item/src/types.d.ts +1 -1
  73. package/components/form-item-renderer/index.css +1 -0
  74. package/components/form-item-renderer/index.d.ts +1 -1
  75. package/components/form-item-renderer/index.js +10 -18
  76. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  77. package/components/form-item-renderer/src/ctx.js +1 -16
  78. package/components/form-item-renderer/src/index.css +1 -0
  79. package/components/form-item-renderer/src/index.vue.d.ts +9 -9
  80. package/components/form-item-renderer/src/symbols.js +1 -3
  81. package/components/form-item-renderer-template/index.css +1 -0
  82. package/components/form-item-renderer-template/index.d.ts +1 -1
  83. package/components/form-item-renderer-template/index.js +6 -13
  84. package/components/form-item-renderer-template/src/ctx.js +1 -9
  85. package/components/form-item-renderer-template/src/index.css +1 -0
  86. package/components/form-item-renderer-template/src/index.vue.d.ts +2 -2
  87. package/components/geoinput/index.css +1 -0
  88. package/components/geoinput/index.d.ts +1 -1
  89. package/components/geoinput/index.js +45 -43
  90. package/components/geoinput/src/ctx.d.ts +42 -28
  91. package/components/geoinput/src/ctx.js +1 -39
  92. package/components/geoinput/src/index.css +1 -0
  93. package/components/geoinput/src/index.vue.d.ts +111 -223
  94. package/components/geoinput/src/types.d.ts +3 -3
  95. package/components/geoinput-read/index.css +1 -0
  96. package/components/geoinput-read/index.d.ts +1 -1
  97. package/components/geoinput-read/index.js +120 -160
  98. package/components/geoinput-read/src/append.vue.d.ts +4 -4
  99. package/components/geoinput-read/src/core.vue.d.ts +130 -104
  100. package/components/geoinput-read/src/ctx.d.ts +42 -30
  101. package/components/geoinput-read/src/ctx.js +1 -66
  102. package/components/geoinput-read/src/index.css +1 -0
  103. package/components/geoinput-read/src/index.vue.d.ts +108 -151
  104. package/components/geoinput-read/src/types.d.ts +1 -1
  105. package/components/geoinput-update/index.css +9 -7
  106. package/components/geoinput-update/index.d.ts +1 -1
  107. package/components/geoinput-update/index.js +335 -366
  108. package/components/geoinput-update/src/append.vue.d.ts +5 -5
  109. package/components/geoinput-update/src/ctx.d.ts +38 -28
  110. package/components/geoinput-update/src/ctx.js +1 -85
  111. package/components/geoinput-update/src/index.css +1 -0
  112. package/components/geoinput-update/src/index.vue.d.ts +120 -98
  113. package/components/geoinput-update/src/types.d.ts +2 -2
  114. package/components/input/index.css +1 -0
  115. package/components/input/index.d.ts +1 -1
  116. package/components/input/index.js +43 -60
  117. package/components/input/src/ctx.d.ts +31 -25
  118. package/components/input/src/ctx.js +1 -46
  119. package/components/input/src/index.css +1 -0
  120. package/components/input/src/index.vue.d.ts +94 -110
  121. package/components/input/src/types.d.ts +2 -2
  122. package/components/input-link/index.css +1 -0
  123. package/components/input-link/index.d.ts +1 -1
  124. package/components/input-link/index.js +71 -92
  125. package/components/input-link/src/ctx.d.ts +26 -20
  126. package/components/input-link/src/ctx.js +1 -66
  127. package/components/input-link/src/index.css +1 -0
  128. package/components/input-link/src/index.vue.d.ts +72 -116
  129. package/components/input-number/index.css +1 -0
  130. package/components/input-number/index.d.ts +1 -1
  131. package/components/input-number/index.js +37 -45
  132. package/components/input-number/src/ctx.d.ts +15 -15
  133. package/components/input-number/src/ctx.js +1 -38
  134. package/components/input-number/src/index.css +1 -0
  135. package/components/input-number/src/index.vue.d.ts +42 -65
  136. package/components/input-number/src/types.d.ts +1 -1
  137. package/components/radio/index.css +1 -0
  138. package/components/radio/index.d.ts +1 -1
  139. package/components/radio/index.js +45 -50
  140. package/components/radio/src/ctx.d.ts +11 -11
  141. package/components/radio/src/ctx.js +1 -39
  142. package/components/radio/src/index.css +1 -0
  143. package/components/radio/src/index.vue.d.ts +41 -60
  144. package/components/radio/src/types.d.ts +1 -1
  145. package/components/select/index.css +1 -0
  146. package/components/select/index.d.ts +1 -1
  147. package/components/select/index.js +59 -64
  148. package/components/select/src/ctx.d.ts +39 -41
  149. package/components/select/src/ctx.js +1 -40
  150. package/components/select/src/index.css +1 -0
  151. package/components/select/src/index.vue.d.ts +130 -162
  152. package/components/select/src/types.d.ts +2 -2
  153. package/components/slider/index.css +1 -0
  154. package/components/slider/index.d.ts +1 -1
  155. package/components/slider/index.js +33 -50
  156. package/components/slider/src/ctx.d.ts +18 -18
  157. package/components/slider/src/ctx.js +1 -29
  158. package/components/slider/src/index.css +1 -0
  159. package/components/slider/src/index.vue.d.ts +62 -81
  160. package/components/switch/index.css +1 -0
  161. package/components/switch/index.d.ts +1 -1
  162. package/components/switch/index.js +33 -50
  163. package/components/switch/src/ctx.d.ts +22 -22
  164. package/components/switch/src/ctx.js +1 -31
  165. package/components/switch/src/index.css +1 -0
  166. package/components/switch/src/index.vue.d.ts +65 -83
  167. package/components/switch/src/types.d.ts +1 -1
  168. package/components/templates-default/index.css +1 -0
  169. package/components/templates-default/index.d.ts +1 -1
  170. package/components/templates-default/index.js +243 -172
  171. package/components/templates-default/src/ctx.d.ts +1 -1
  172. package/components/templates-default/src/ctx.js +1 -18
  173. package/components/templates-default/src/index.css +1 -0
  174. package/components/templates-default/src/index.vue.d.ts +9 -9
  175. package/components/templates-default/src/types.d.ts +16 -16
  176. package/components/templates-element-plus/index.css +1 -0
  177. package/components/templates-element-plus/index.d.ts +1 -1
  178. package/components/templates-element-plus/index.js +66 -36
  179. package/components/templates-element-plus/src/ctx.js +1 -9
  180. package/components/templates-element-plus/src/index.css +1 -0
  181. package/components/templates-element-plus/src/index.vue.d.ts +7 -7
  182. package/components/templates-element-plus/src/types.d.ts +1 -1
  183. package/components/templates-esri/index.css +1 -0
  184. package/components/templates-esri/index.d.ts +1 -1
  185. package/components/templates-esri/index.js +25 -24
  186. package/components/templates-esri/src/ctx.d.ts +1 -1
  187. package/components/templates-esri/src/ctx.js +1 -11
  188. package/components/templates-esri/src/index.css +1 -0
  189. package/components/templates-esri/src/index.vue.d.ts +6 -6
  190. package/components/templates-esri/src/types.d.ts +1 -1
  191. package/components/templates-layout/index.css +1 -0
  192. package/components/templates-layout/index.d.ts +1 -1
  193. package/components/templates-layout/index.js +96 -63
  194. package/components/templates-layout/src/ctx.js +1 -9
  195. package/components/templates-layout/src/index.css +1 -0
  196. package/components/templates-layout/src/index.vue.d.ts +7 -7
  197. package/components/templates-layout/src/types.d.ts +3 -3
  198. package/components/templates-mapbox/index.css +1 -0
  199. package/components/templates-mapbox/index.d.ts +1 -1
  200. package/components/templates-mapbox/index.js +25 -24
  201. package/components/templates-mapbox/src/ctx.d.ts +1 -1
  202. package/components/templates-mapbox/src/ctx.js +1 -11
  203. package/components/templates-mapbox/src/index.css +1 -0
  204. package/components/templates-mapbox/src/index.vue.d.ts +6 -6
  205. package/components/templates-mapbox/src/types.d.ts +1 -1
  206. package/components/upload/index.css +11 -9
  207. package/components/upload/index.d.ts +1 -1
  208. package/components/upload/index.js +283 -296
  209. package/components/upload/src/ctx.d.ts +32 -22
  210. package/components/upload/src/ctx.js +1 -45
  211. package/components/upload/src/file.vue.d.ts +28 -19
  212. package/components/upload/src/index.css +1 -0
  213. package/components/upload/src/index.vue.d.ts +63 -62
  214. package/components/upload-plus/index.css +1 -0
  215. package/components/upload-plus/index.d.ts +1 -1
  216. package/components/upload-plus/index.js +911 -9539
  217. package/components/upload-plus/src/api.d.ts +3 -3
  218. package/components/upload-plus/src/api.js +21 -18114
  219. package/components/upload-plus/src/const.js +1 -12
  220. package/components/upload-plus/src/ctx.d.ts +13 -13
  221. package/components/upload-plus/src/ctx.js +1 -58
  222. package/components/upload-plus/src/index.css +1 -0
  223. package/components/upload-plus/src/index.vue.d.ts +31 -48
  224. package/components/upload-plus/src/types.d.ts +1 -1
  225. package/components/van-cascader/index.css +1 -0
  226. package/components/van-cascader/index.d.ts +1 -1
  227. package/components/van-cascader/index.js +47 -55
  228. package/components/van-cascader/src/ctx.d.ts +13 -13
  229. package/components/van-cascader/src/ctx.js +1 -22
  230. package/components/van-cascader/src/index.css +1 -0
  231. package/components/van-cascader/src/index.vue.d.ts +40 -57
  232. package/components/var-datetime-picker/index.css +1 -0
  233. package/components/var-datetime-picker/index.d.ts +1 -1
  234. package/components/var-datetime-picker/index.js +137 -168
  235. package/components/var-datetime-picker/src/const.js +1 -91
  236. package/components/var-datetime-picker/src/ctx.d.ts +10 -10
  237. package/components/var-datetime-picker/src/ctx.js +1 -43
  238. package/components/var-datetime-picker/src/index.css +1 -0
  239. package/components/var-datetime-picker/src/index.vue.d.ts +26 -42
  240. package/components/var-datetime-picker/src/types.d.ts +1 -1
  241. package/components/vditor/index.css +1 -0
  242. package/components/vditor/index.d.ts +1 -1
  243. package/components/vditor/index.js +22 -17
  244. package/components/vditor/src/ctx.js +1 -15
  245. package/components/vditor/src/index.css +1 -0
  246. package/components/vditor/src/index.vue.d.ts +4 -3
  247. package/components/vditor/src/types.d.ts +1 -1
  248. package/composables/index.css +1 -0
  249. package/composables/index.js +1 -104
  250. package/composables/useForm.d.ts +2 -2
  251. package/composables/useSourceManager.d.ts +1 -1
  252. package/index.css +127 -20
  253. package/index.esm.js +1 -44
  254. package/package.json +1 -1
  255. package/shared/const/index.css +1 -0
  256. package/shared/const/index.d.ts +1 -1
  257. package/shared/const/index.js +1 -56
  258. package/shared/element-plus/ctx.d.ts +28 -26
  259. package/shared/element-plus/index.css +1 -0
  260. package/shared/element-plus/index.js +1 -220
  261. package/shared/element-plus/instances.d.ts +45 -38
  262. package/shared/form/index.css +1 -0
  263. package/shared/form/index.js +1 -30
  264. package/shared/helper/index.css +1 -0
  265. package/shared/helper/index.js +1 -9
  266. package/shared/index.css +1 -0
  267. package/shared/index.js +1 -56
  268. package/shared/infer-prop/index.css +1 -0
  269. package/shared/infer-prop/index.d.ts +1 -1
  270. package/shared/infer-prop/index.js +1 -34
  271. package/shared/progress-it/index.css +1 -0
  272. package/shared/progress-it/index.d.ts +4 -4
  273. package/shared/progress-it/index.js +1 -57
  274. package/shared/rules/index.css +1 -0
  275. package/shared/rules/index.js +1 -32
  276. package/shared/types/form/index.css +1 -0
  277. package/shared/types/index.css +1 -0
  278. package/shared/types/source/index.css +1 -0
  279. package/shared/types/source/index.d.ts +2 -2
  280. package/shared/types/source-manager/index.css +1 -0
  281. package/shared/upload/index.css +1 -0
  282. package/shared/upload/index.js +1 -767
@@ -10,26 +10,8 @@ import { Deferred } from '@vunk/core/shared/utils-promise';
10
10
  import { VkAsyncTeleport } from '@vunk/core';
11
11
  import { VmControlDrawUi } from '@vumap/core/components/control-draw-ui';
12
12
 
13
- var __defProp = Object.defineProperty;
14
- var __defProps = Object.defineProperties;
15
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
16
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
19
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
- var __spreadValues = (a, b) => {
21
- for (var prop in b || (b = {}))
22
- if (__hasOwnProp.call(b, prop))
23
- __defNormalProp(a, prop, b[prop]);
24
- if (__getOwnPropSymbols)
25
- for (var prop of __getOwnPropSymbols(b)) {
26
- if (__propIsEnum.call(b, prop))
27
- __defNormalProp(a, prop, b[prop]);
28
- }
29
- return a;
30
- };
31
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
32
- const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
13
+ const props = {
14
+ ..._VkfInputCtx.props,
33
15
  showMap: {
34
16
  type: Boolean,
35
17
  default: false
@@ -82,29 +64,30 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
82
64
  type: Boolean,
83
65
  default: false
84
66
  }
85
- });
67
+ };
86
68
  const createBindProps = bindPropsFactory(props);
87
- const emits = __spreadProps(__spreadValues({}, _VkfInputCtx.emits), {
69
+ const emits = {
70
+ ..._VkfInputCtx.emits,
88
71
  "update:modelValue": (e) => e,
89
72
  "editUpdate": (e) => e
90
- });
73
+ };
91
74
  const createOnEmits = onEmitsFactory(emits);
92
75
 
93
76
  var ctx = /*#__PURE__*/Object.freeze({
94
77
  __proto__: null,
95
- props: props,
96
78
  createBindProps: createBindProps,
79
+ createOnEmits: createOnEmits,
97
80
  emits: emits,
98
- createOnEmits: createOnEmits
81
+ props: props
99
82
  });
100
83
 
101
84
  /*! Element Plus Icons Vue v2.1.0 */
102
85
 
86
+
103
87
  // unplugin-vue:/plugin-vue/export-helper
104
88
  var export_helper_default = (sfc, props) => {
105
89
  let target = sfc.__vccOpts || sfc;
106
- for (let [key, val] of props)
107
- target[key] = val;
90
+ for (let [key, val] of props) target[key] = val;
108
91
  return target;
109
92
  };
110
93
 
@@ -113,92 +96,64 @@ var checked_vue_vue_type_script_lang_default = {
113
96
  name: "Checked"
114
97
  };
115
98
  var _hoisted_144 = {
116
- xmlns: "http://www.w3.org/2000/svg",
117
- viewBox: "0 0 1024 1024"
118
- }, _hoisted_244 = /* @__PURE__ */ createElementVNode(
119
- "path",
120
- {
99
+ xmlns: "http://www.w3.org/2000/svg",
100
+ viewBox: "0 0 1024 1024"
101
+ },
102
+ _hoisted_244 = /* @__PURE__ */createElementVNode("path", {
121
103
  fill: "currentColor",
122
104
  d: "M704 192h160v736H160V192h160.064v64H704v-64zM311.616 537.28l-45.312 45.248L447.36 763.52l316.8-316.8-45.312-45.184L447.36 673.024 311.616 537.28zM384 192V96h256v96H384z"
123
- },
124
- null,
125
- -1
126
- /* HOISTED */
127
- ), _hoisted_343 = [
128
- _hoisted_244
129
- ];
105
+ }, null, -1
106
+ /* HOISTED */),
107
+ _hoisted_343 = [_hoisted_244];
130
108
  function _sfc_render44(_ctx, _cache, $props, $setup, $data, $options) {
131
109
  return openBlock(), createElementBlock("svg", _hoisted_144, _hoisted_343);
132
110
  }
133
- var checked_default = /* @__PURE__ */ export_helper_default(checked_vue_vue_type_script_lang_default, [["render", _sfc_render44], ["__file", "checked.vue"]]);
111
+ var checked_default = /* @__PURE__ */export_helper_default(checked_vue_vue_type_script_lang_default, [["render", _sfc_render44], ["__file", "checked.vue"]]);
134
112
 
135
113
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/edit.vue?vue&type=script&lang.ts
136
114
  var edit_vue_vue_type_script_lang_default = {
137
115
  name: "Edit"
138
116
  };
139
117
  var _hoisted_194 = {
140
- xmlns: "http://www.w3.org/2000/svg",
141
- viewBox: "0 0 1024 1024"
142
- }, _hoisted_294 = /* @__PURE__ */ createElementVNode(
143
- "path",
144
- {
118
+ xmlns: "http://www.w3.org/2000/svg",
119
+ viewBox: "0 0 1024 1024"
120
+ },
121
+ _hoisted_294 = /* @__PURE__ */createElementVNode("path", {
145
122
  fill: "currentColor",
146
123
  d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640V512z"
147
- },
148
- null,
149
- -1
150
- /* HOISTED */
151
- ), _hoisted_393 = /* @__PURE__ */ createElementVNode(
152
- "path",
153
- {
124
+ }, null, -1
125
+ /* HOISTED */),
126
+ _hoisted_393 = /* @__PURE__ */createElementVNode("path", {
154
127
  fill: "currentColor",
155
128
  d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
156
- },
157
- null,
158
- -1
159
- /* HOISTED */
160
- ), _hoisted_431 = [
161
- _hoisted_294,
162
- _hoisted_393
163
- ];
129
+ }, null, -1
130
+ /* HOISTED */),
131
+ _hoisted_431 = [_hoisted_294, _hoisted_393];
164
132
  function _sfc_render94(_ctx, _cache, $props, $setup, $data, $options) {
165
133
  return openBlock(), createElementBlock("svg", _hoisted_194, _hoisted_431);
166
134
  }
167
- var edit_default = /* @__PURE__ */ export_helper_default(edit_vue_vue_type_script_lang_default, [["render", _sfc_render94], ["__file", "edit.vue"]]);
135
+ var edit_default = /* @__PURE__ */export_helper_default(edit_vue_vue_type_script_lang_default, [["render", _sfc_render94], ["__file", "edit.vue"]]);
168
136
 
169
137
  // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/upload.vue?vue&type=script&lang.ts
170
138
  var upload_vue_vue_type_script_lang_default = {
171
139
  name: "Upload"
172
140
  };
173
141
  var _hoisted_1275 = {
174
- xmlns: "http://www.w3.org/2000/svg",
175
- viewBox: "0 0 1024 1024"
176
- }, _hoisted_2275 = /* @__PURE__ */ createElementVNode(
177
- "path",
178
- {
142
+ xmlns: "http://www.w3.org/2000/svg",
143
+ viewBox: "0 0 1024 1024"
144
+ },
145
+ _hoisted_2275 = /* @__PURE__ */createElementVNode("path", {
179
146
  fill: "currentColor",
180
147
  d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"
181
- },
182
- null,
183
- -1
184
- /* HOISTED */
185
- ), _hoisted_3274 = [
186
- _hoisted_2275
187
- ];
148
+ }, null, -1
149
+ /* HOISTED */),
150
+ _hoisted_3274 = [_hoisted_2275];
188
151
  function _sfc_render275(_ctx, _cache, $props, $setup, $data, $options) {
189
152
  return openBlock(), createElementBlock("svg", _hoisted_1275, _hoisted_3274);
190
153
  }
191
- var upload_default = /* @__PURE__ */ export_helper_default(upload_vue_vue_type_script_lang_default, [["render", _sfc_render275], ["__file", "upload.vue"]]);
154
+ var upload_default = /* @__PURE__ */export_helper_default(upload_vue_vue_type_script_lang_default, [["render", _sfc_render275], ["__file", "upload.vue"]]);
192
155
 
193
- var _export_sfc = (sfc, props) => {
194
- const target = sfc.__vccOpts || sfc;
195
- for (const [key, val] of props) {
196
- target[key] = val;
197
- }
198
- return target;
199
- };
200
-
201
- const _sfc_main$1 = defineComponent({
156
+ var script$1 = defineComponent({
202
157
  components: {
203
158
  ElButton,
204
159
  ElIcon,
@@ -221,7 +176,8 @@ const _sfc_main$1 = defineComponent({
221
176
  }
222
177
  }
223
178
  });
224
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
179
+
180
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
225
181
  const _component_Upload = resolveComponent("Upload");
226
182
  const _component_ElIcon = resolveComponent("ElIcon");
227
183
  const _component_ElUpload = resolveComponent("ElUpload");
@@ -229,109 +185,105 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
229
185
  const _component_Edit = resolveComponent("Edit");
230
186
  const _component_ElButtonGroup = resolveComponent("ElButtonGroup");
231
187
  return openBlock(), createBlock(_component_ElButtonGroup, null, {
232
- default: withCtx(() => [
233
- createVNode(_component_ElButton, { class: "vk-geoinput-upload-x" }, {
234
- default: withCtx(() => [
235
- createVNode(_component_ElUpload, {
236
- class: normalizeClass("vk-geoinput-upload"),
237
- action: "",
238
- accept: "file",
239
- multiple: false,
240
- "show-file-list": false,
241
- "auto-upload": false,
242
- "on-change": _ctx.getFile,
243
- disabled: _ctx.disabled
244
- }, {
245
- default: withCtx(() => [
246
- createVNode(_component_ElIcon, { color: "var(--el-color-primary)" }, {
247
- default: withCtx(() => [
248
- createVNode(_component_Upload)
249
- ]),
250
- _: 1
251
- }, 8, ["color"])
252
- ]),
253
- _: 1
254
- }, 8, ["on-change", "disabled"])
255
- ]),
256
- _: 1
257
- }),
258
- _ctx.dialog ? (openBlock(), createBlock(_component_ElButton, {
259
- key: 0,
260
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit")),
188
+ default: withCtx(() => [createVNode(_component_ElButton, {
189
+ class: "vk-geoinput-upload-x"
190
+ }, {
191
+ default: withCtx(() => [createVNode(_component_ElUpload, {
192
+ class: normalizeClass("vk-geoinput-upload"),
193
+ action: "",
194
+ accept: "file",
195
+ multiple: false,
196
+ "show-file-list": false,
197
+ "auto-upload": false,
198
+ "on-change": _ctx.getFile,
261
199
  disabled: _ctx.disabled
262
200
  }, {
263
- default: withCtx(() => [
264
- createVNode(_component_ElIcon, { color: "var(--el-color-primary)" }, {
265
- default: withCtx(() => [
266
- createVNode(_component_Edit)
267
- ]),
268
- _: 1
269
- }, 8, ["color"])
270
- ]),
201
+ default: withCtx(() => [createVNode(_component_ElIcon, {
202
+ color: "var(--el-color-primary)"
203
+ }, {
204
+ default: withCtx(() => [createVNode(_component_Upload)]),
205
+ _: 1
206
+ /* STABLE */
207
+ }, 8, ["color"])]),
208
+ _: 1
209
+ /* STABLE */
210
+ }, 8, ["on-change", "disabled"])]),
211
+ _: 1
212
+ /* STABLE */
213
+ }), _ctx.dialog ? (openBlock(), createBlock(_component_ElButton, {
214
+ key: 0,
215
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit")),
216
+ disabled: _ctx.disabled
217
+ }, {
218
+ default: withCtx(() => [createVNode(_component_ElIcon, {
219
+ color: "var(--el-color-primary)"
220
+ }, {
221
+ default: withCtx(() => [createVNode(_component_Edit)]),
271
222
  _: 1
272
- }, 8, ["disabled"])) : createCommentVNode("v-if", true)
273
- ]),
223
+ /* STABLE */
224
+ }, 8, ["color"])]),
225
+ _: 1
226
+ /* STABLE */
227
+ }, 8, ["disabled"])) : createCommentVNode("v-if", true)]),
274
228
  _: 1
229
+ /* STABLE */
275
230
  });
276
231
  }
277
- var AppendVue = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "append.vue"]]);
232
+
233
+ script$1.render = render$1;
234
+ script$1.__file = "geoinput-update/src/append.vue";
278
235
 
279
236
  function array_cancel() {
280
237
  this._array = null;
281
238
  return Promise.resolve();
282
239
  }
283
-
284
240
  function array_read() {
285
241
  var array = this._array;
286
242
  this._array = null;
287
- return Promise.resolve(array ? {done: false, value: array} : {done: true, value: undefined});
243
+ return Promise.resolve(array ? {
244
+ done: false,
245
+ value: array
246
+ } : {
247
+ done: true,
248
+ value: undefined
249
+ });
288
250
  }
289
-
290
251
  function array(array) {
291
252
  return new ArraySource(array instanceof Uint8Array ? array : new Uint8Array(array));
292
253
  }
293
-
294
254
  function ArraySource(array) {
295
255
  this._array = array;
296
256
  }
297
-
298
257
  ArraySource.prototype.read = array_read;
299
258
  ArraySource.prototype.cancel = array_cancel;
300
-
301
259
  function fetchPath(url) {
302
- return fetch(url).then(function(response) {
303
- return response.body && response.body.getReader
304
- ? response.body.getReader()
305
- : response.arrayBuffer().then(array);
260
+ return fetch(url).then(function (response) {
261
+ return response.body && response.body.getReader ? response.body.getReader() : response.arrayBuffer().then(array);
306
262
  });
307
263
  }
308
-
309
264
  function requestPath(url) {
310
- return new Promise(function(resolve, reject) {
311
- var request = new XMLHttpRequest;
265
+ return new Promise(function (resolve, reject) {
266
+ var request = new XMLHttpRequest();
312
267
  request.responseType = "arraybuffer";
313
- request.onload = function() { resolve(array(request.response)); };
268
+ request.onload = function () {
269
+ resolve(array(request.response));
270
+ };
314
271
  request.onerror = reject;
315
272
  request.ontimeout = reject;
316
273
  request.open("GET", url, true);
317
274
  request.send();
318
275
  });
319
276
  }
320
-
321
277
  function path(path) {
322
278
  return (typeof fetch === "function" ? fetchPath : requestPath)(path);
323
279
  }
324
-
325
280
  function stream(source) {
326
281
  return typeof source.read === "function" ? source : source.getReader();
327
282
  }
328
-
329
283
  var empty = new Uint8Array(0);
330
-
331
284
  function slice_cancel() {
332
285
  return this._source.cancel();
333
286
  }
334
-
335
287
  function concat$1(a, b) {
336
288
  if (!a.length) return b;
337
289
  if (!b.length) return a;
@@ -340,22 +292,28 @@ function concat$1(a, b) {
340
292
  c.set(b, a.length);
341
293
  return c;
342
294
  }
343
-
344
295
  function slice_read() {
345
- var that = this, array = that._array.subarray(that._index);
346
- return that._source.read().then(function(result) {
296
+ var that = this,
297
+ array = that._array.subarray(that._index);
298
+ return that._source.read().then(function (result) {
347
299
  that._array = empty;
348
300
  that._index = 0;
349
- return result.done ? (array.length > 0
350
- ? {done: false, value: array}
351
- : {done: true, value: undefined})
352
- : {done: false, value: concat$1(array, result.value)};
301
+ return result.done ? array.length > 0 ? {
302
+ done: false,
303
+ value: array
304
+ } : {
305
+ done: true,
306
+ value: undefined
307
+ } : {
308
+ done: false,
309
+ value: concat$1(array, result.value)
310
+ };
353
311
  });
354
312
  }
355
-
356
313
  function slice_slice(length) {
357
314
  if ((length |= 0) < 0) throw new Error("invalid length");
358
- var that = this, index = this._array.length - this._index;
315
+ var that = this,
316
+ index = this._array.length - this._index;
359
317
 
360
318
  // If the request fits within the remaining buffer, resolve it immediately.
361
319
  if (this._index + length <= this._array.length) {
@@ -365,9 +323,8 @@ function slice_slice(length) {
365
323
  // Otherwise, read chunks repeatedly until the request is fulfilled.
366
324
  var array = new Uint8Array(length);
367
325
  array.set(this._array.subarray(this._index));
368
- return (function read() {
369
- return that._source.read().then(function(result) {
370
-
326
+ return function read() {
327
+ return that._source.read().then(function (result) {
371
328
  // When done, it’s possible the request wasn’t fully fullfilled!
372
329
  // If so, the pre-allocated array is too big and needs slicing.
373
330
  if (result.done) {
@@ -389,47 +346,34 @@ function slice_slice(length) {
389
346
  index += result.value.length;
390
347
  return read();
391
348
  });
392
- })();
349
+ }();
393
350
  }
394
-
395
351
  function slice(source) {
396
- return typeof source.slice === "function" ? source :
397
- new SliceSource(typeof source.read === "function" ? source
398
- : source.getReader());
352
+ return typeof source.slice === "function" ? source : new SliceSource(typeof source.read === "function" ? source : source.getReader());
399
353
  }
400
-
401
354
  function SliceSource(source) {
402
355
  this._source = source;
403
356
  this._array = empty;
404
357
  this._index = 0;
405
358
  }
406
-
407
359
  SliceSource.prototype.read = slice_read;
408
360
  SliceSource.prototype.slice = slice_slice;
409
361
  SliceSource.prototype.cancel = slice_cancel;
410
-
411
362
  function dbf_cancel() {
412
363
  return this._source.cancel();
413
364
  }
414
-
415
365
  function readBoolean(value) {
416
- return /^[nf]$/i.test(value) ? false
417
- : /^[yt]$/i.test(value) ? true
418
- : null;
366
+ return /^[nf]$/i.test(value) ? false : /^[yt]$/i.test(value) ? true : null;
419
367
  }
420
-
421
368
  function readDate(value) {
422
369
  return new Date(+value.substring(0, 4), value.substring(4, 6) - 1, +value.substring(6, 8));
423
370
  }
424
-
425
371
  function readNumber(value) {
426
372
  return !(value = value.trim()) || isNaN(value = +value) ? null : value;
427
373
  }
428
-
429
374
  function readString(value) {
430
375
  return value.trim() || null;
431
376
  }
432
-
433
377
  var types$1 = {
434
378
  B: readNumber,
435
379
  C: readString,
@@ -439,31 +383,34 @@ var types$1 = {
439
383
  M: readNumber,
440
384
  N: readNumber
441
385
  };
442
-
443
386
  function dbf_read() {
444
- var that = this, i = 1;
445
- return that._source.slice(that._recordLength).then(function(value) {
446
- return value && (value[0] !== 0x1a) ? {done: false, value: that._fields.reduce(function(p, f) {
447
- p[f.name] = types$1[f.type](that._decode(value.subarray(i, i += f.length)));
448
- return p;
449
- }, {})} : {done: true, value: undefined};
387
+ var that = this,
388
+ i = 1;
389
+ return that._source.slice(that._recordLength).then(function (value) {
390
+ return value && value[0] !== 0x1a ? {
391
+ done: false,
392
+ value: that._fields.reduce(function (p, f) {
393
+ p[f.name] = types$1[f.type](that._decode(value.subarray(i, i += f.length)));
394
+ return p;
395
+ }, {})
396
+ } : {
397
+ done: true,
398
+ value: undefined
399
+ };
450
400
  });
451
401
  }
452
-
453
402
  function view(array) {
454
403
  return new DataView(array.buffer, array.byteOffset, array.byteLength);
455
404
  }
456
-
457
405
  function dbf(source, decoder) {
458
406
  source = slice(source);
459
- return source.slice(32).then(function(array) {
407
+ return source.slice(32).then(function (array) {
460
408
  var head = view(array);
461
- return source.slice(head.getUint16(8, true) - 32).then(function(array) {
409
+ return source.slice(head.getUint16(8, true) - 32).then(function (array) {
462
410
  return new Dbf(source, decoder, head, view(array));
463
411
  });
464
412
  });
465
413
  }
466
-
467
414
  function Dbf(source, decoder, head, body) {
468
415
  this._source = source;
469
416
  this._decode = decoder.decode.bind(decoder);
@@ -478,62 +425,75 @@ function Dbf(source, decoder, head, body) {
478
425
  });
479
426
  }
480
427
  }
481
-
482
428
  var prototype$2 = Dbf.prototype;
483
429
  prototype$2.read = dbf_read;
484
430
  prototype$2.cancel = dbf_cancel;
485
-
486
431
  function cancel() {
487
432
  return this._source.cancel();
488
433
  }
489
-
490
434
  function parseMultiPoint(record) {
491
- var i = 40, j, n = record.getInt32(36, true), coordinates = new Array(n);
435
+ var i = 40,
436
+ j,
437
+ n = record.getInt32(36, true),
438
+ coordinates = new Array(n);
492
439
  for (j = 0; j < n; ++j, i += 16) coordinates[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
493
- return {type: "MultiPoint", coordinates: coordinates};
440
+ return {
441
+ type: "MultiPoint",
442
+ coordinates: coordinates
443
+ };
494
444
  }
495
-
496
445
  function parseNull() {
497
446
  return null;
498
447
  }
499
-
500
448
  function parsePoint(record) {
501
- return {type: "Point", coordinates: [record.getFloat64(4, true), record.getFloat64(12, true)]};
449
+ return {
450
+ type: "Point",
451
+ coordinates: [record.getFloat64(4, true), record.getFloat64(12, true)]
452
+ };
502
453
  }
503
-
504
454
  function parsePolygon(record) {
505
- var i = 44, j, n = record.getInt32(36, true), m = record.getInt32(40, true), parts = new Array(n), points = new Array(m), polygons = [], holes = [];
455
+ var i = 44,
456
+ j,
457
+ n = record.getInt32(36, true),
458
+ m = record.getInt32(40, true),
459
+ parts = new Array(n),
460
+ points = new Array(m),
461
+ polygons = [],
462
+ holes = [];
506
463
  for (j = 0; j < n; ++j, i += 4) parts[j] = record.getInt32(i, true);
507
464
  for (j = 0; j < m; ++j, i += 16) points[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
508
-
509
- parts.forEach(function(i, j) {
465
+ parts.forEach(function (i, j) {
510
466
  var ring = points.slice(i, parts[j + 1]);
511
- if (ringClockwise(ring)) polygons.push([ring]);
512
- else holes.push(ring);
467
+ if (ringClockwise(ring)) polygons.push([ring]);else holes.push(ring);
513
468
  });
514
-
515
- holes.forEach(function(hole) {
516
- polygons.some(function(polygon) {
469
+ holes.forEach(function (hole) {
470
+ polygons.some(function (polygon) {
517
471
  if (ringContainsSome(polygon[0], hole)) {
518
472
  polygon.push(hole);
519
473
  return true;
520
474
  }
521
475
  }) || polygons.push([hole]);
522
476
  });
523
-
524
- return polygons.length === 1
525
- ? {type: "Polygon", coordinates: polygons[0]}
526
- : {type: "MultiPolygon", coordinates: polygons};
477
+ return polygons.length === 1 ? {
478
+ type: "Polygon",
479
+ coordinates: polygons[0]
480
+ } : {
481
+ type: "MultiPolygon",
482
+ coordinates: polygons
483
+ };
527
484
  }
528
485
  function ringClockwise(ring) {
529
486
  if ((n = ring.length) < 4) return false;
530
- var i = 0, n, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
487
+ var i = 0,
488
+ n,
489
+ area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
531
490
  while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
532
491
  return area >= 0;
533
492
  }
534
-
535
493
  function ringContainsSome(ring, hole) {
536
- var i = -1, n = hole.length, c;
494
+ var i = -1,
495
+ n = hole.length,
496
+ c;
537
497
  while (++i < n) {
538
498
  if (c = ringContains(ring, hole[i])) {
539
499
  return c > 0;
@@ -541,60 +501,80 @@ function ringContainsSome(ring, hole) {
541
501
  }
542
502
  return false;
543
503
  }
544
-
545
504
  function ringContains(ring, point) {
546
- var x = point[0], y = point[1], contains = -1;
505
+ var x = point[0],
506
+ y = point[1],
507
+ contains = -1;
547
508
  for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
548
- var pi = ring[i], xi = pi[0], yi = pi[1],
549
- pj = ring[j], xj = pj[0], yj = pj[1];
509
+ var pi = ring[i],
510
+ xi = pi[0],
511
+ yi = pi[1],
512
+ pj = ring[j],
513
+ xj = pj[0],
514
+ yj = pj[1];
550
515
  if (segmentContains(pi, pj, point)) {
551
516
  return 0;
552
517
  }
553
- if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) {
518
+ if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) {
554
519
  contains = -contains;
555
520
  }
556
521
  }
557
522
  return contains;
558
523
  }
559
-
560
524
  function segmentContains(p0, p1, p2) {
561
- var x20 = p2[0] - p0[0], y20 = p2[1] - p0[1];
525
+ var x20 = p2[0] - p0[0],
526
+ y20 = p2[1] - p0[1];
562
527
  if (x20 === 0 && y20 === 0) return true;
563
- var x10 = p1[0] - p0[0], y10 = p1[1] - p0[1];
528
+ var x10 = p1[0] - p0[0],
529
+ y10 = p1[1] - p0[1];
564
530
  if (x10 === 0 && y10 === 0) return false;
565
531
  var t = (x20 * x10 + y20 * y10) / (x10 * x10 + y10 * y10);
566
532
  return t < 0 || t > 1 ? false : t === 0 || t === 1 ? true : t * x10 === x20 && t * y10 === y20;
567
533
  }
568
-
569
534
  function parsePolyLine(record) {
570
- var i = 44, j, n = record.getInt32(36, true), m = record.getInt32(40, true), parts = new Array(n), points = new Array(m);
535
+ var i = 44,
536
+ j,
537
+ n = record.getInt32(36, true),
538
+ m = record.getInt32(40, true),
539
+ parts = new Array(n),
540
+ points = new Array(m);
571
541
  for (j = 0; j < n; ++j, i += 4) parts[j] = record.getInt32(i, true);
572
542
  for (j = 0; j < m; ++j, i += 16) points[j] = [record.getFloat64(i, true), record.getFloat64(i + 8, true)];
573
- return n === 1
574
- ? {type: "LineString", coordinates: points}
575
- : {type: "MultiLineString", coordinates: parts.map(function(i, j) { return points.slice(i, parts[j + 1]); })};
543
+ return n === 1 ? {
544
+ type: "LineString",
545
+ coordinates: points
546
+ } : {
547
+ type: "MultiLineString",
548
+ coordinates: parts.map(function (i, j) {
549
+ return points.slice(i, parts[j + 1]);
550
+ })
551
+ };
576
552
  }
577
-
578
553
  function concat(a, b) {
579
554
  var ab = new Uint8Array(a.length + b.length);
580
555
  ab.set(a, 0);
581
556
  ab.set(b, a.length);
582
557
  return ab;
583
558
  }
584
-
585
559
  function shp_read() {
586
560
  var that = this;
587
561
  ++that._index;
588
- return that._source.slice(12).then(function(array) {
589
- if (array == null) return {done: true, value: undefined};
562
+ return that._source.slice(12).then(function (array) {
563
+ if (array == null) return {
564
+ done: true,
565
+ value: undefined
566
+ };
590
567
  var header = view(array);
591
568
 
592
569
  // If the record starts with an invalid shape type (see #36), scan ahead in
593
570
  // four-byte increments to find the next valid record, identified by the
594
571
  // expected index, a non-empty content length and a valid shape type.
595
572
  function skip() {
596
- return that._source.slice(4).then(function(chunk) {
597
- if (chunk == null) return {done: true, value: undefined};
573
+ return that._source.slice(4).then(function (chunk) {
574
+ if (chunk == null) return {
575
+ done: true,
576
+ value: undefined
577
+ };
598
578
  header = view(array = concat(array.slice(4), chunk));
599
579
  return header.getInt32(0, false) !== that._index ? skip() : read();
600
580
  });
@@ -603,35 +583,43 @@ function shp_read() {
603
583
  // All records should have at least four bytes (for the record shape type),
604
584
  // so an invalid content length indicates corruption.
605
585
  function read() {
606
- var length = header.getInt32(4, false) * 2 - 4, type = header.getInt32(8, true);
607
- return length < 0 || (type && type !== that._type) ? skip() : that._source.slice(length).then(function(chunk) {
608
- return {done: false, value: type ? that._parse(view(concat(array.slice(8), chunk))) : null};
586
+ var length = header.getInt32(4, false) * 2 - 4,
587
+ type = header.getInt32(8, true);
588
+ return length < 0 || type && type !== that._type ? skip() : that._source.slice(length).then(function (chunk) {
589
+ return {
590
+ done: false,
591
+ value: type ? that._parse(view(concat(array.slice(8), chunk))) : null
592
+ };
609
593
  });
610
594
  }
611
-
612
595
  return read();
613
596
  });
614
597
  }
615
-
616
598
  var parsers = {
617
599
  0: parseNull,
618
600
  1: parsePoint,
619
601
  3: parsePolyLine,
620
602
  5: parsePolygon,
621
603
  8: parseMultiPoint,
622
- 11: parsePoint, // PointZ
623
- 13: parsePolyLine, // PolyLineZ
624
- 15: parsePolygon, // PolygonZ
625
- 18: parseMultiPoint, // MultiPointZ
626
- 21: parsePoint, // PointM
627
- 23: parsePolyLine, // PolyLineM
628
- 25: parsePolygon, // PolygonM
604
+ 11: parsePoint,
605
+ // PointZ
606
+ 13: parsePolyLine,
607
+ // PolyLineZ
608
+ 15: parsePolygon,
609
+ // PolygonZ
610
+ 18: parseMultiPoint,
611
+ // MultiPointZ
612
+ 21: parsePoint,
613
+ // PointM
614
+ 23: parsePolyLine,
615
+ // PolyLineM
616
+ 25: parsePolygon,
617
+ // PolygonM
629
618
  28: parseMultiPoint // MultiPointM
630
619
  };
631
-
632
620
  function shp(source) {
633
621
  source = slice(source);
634
- return source.slice(100).then(function(array) {
622
+ return source.slice(100).then(function (array) {
635
623
  return new Shp(source, view(array));
636
624
  });
637
625
  }
@@ -644,27 +632,20 @@ function Shp(source, header) {
644
632
  this._parse = parsers[type];
645
633
  this.bbox = [header.getFloat64(36, true), header.getFloat64(44, true), header.getFloat64(52, true), header.getFloat64(60, true)];
646
634
  }
647
-
648
635
  var prototype$1 = Shp.prototype;
649
636
  prototype$1.read = shp_read;
650
637
  prototype$1.cancel = cancel;
651
-
652
638
  function noop() {}
653
-
654
639
  function shapefile_cancel() {
655
- return Promise.all([
656
- this._dbf && this._dbf.cancel(),
657
- this._shp.cancel()
658
- ]).then(noop);
640
+ return Promise.all([this._dbf && this._dbf.cancel(), this._shp.cancel()]).then(noop);
659
641
  }
660
-
661
642
  function shapefile_read() {
662
643
  var that = this;
663
- return Promise.all([
664
- that._dbf ? that._dbf.read() : {value: {}},
665
- that._shp.read()
666
- ]).then(function(results) {
667
- var dbf = results[0], shp = results[1];
644
+ return Promise.all([that._dbf ? that._dbf.read() : {
645
+ value: {}
646
+ }, that._shp.read()]).then(function (results) {
647
+ var dbf = results[0],
648
+ shp = results[1];
668
649
  return shp.done ? shp : {
669
650
  done: false,
670
651
  value: {
@@ -675,26 +656,19 @@ function shapefile_read() {
675
656
  };
676
657
  });
677
658
  }
678
-
679
659
  function shapefile(shpSource, dbfSource, decoder) {
680
- return Promise.all([
681
- shp(shpSource),
682
- dbfSource && dbf(dbfSource, decoder)
683
- ]).then(function(sources) {
660
+ return Promise.all([shp(shpSource), dbfSource && dbf(dbfSource, decoder)]).then(function (sources) {
684
661
  return new Shapefile(sources[0], sources[1]);
685
662
  });
686
663
  }
687
-
688
664
  function Shapefile(shp, dbf) {
689
665
  this._shp = shp;
690
666
  this._dbf = dbf;
691
667
  this.bbox = shp.bbox;
692
668
  }
693
-
694
669
  var prototype = Shapefile.prototype;
695
670
  prototype.read = shapefile_read;
696
671
  prototype.cancel = shapefile_cancel;
697
-
698
672
  function open(shp, dbf, options) {
699
673
  if (typeof dbf === "string") {
700
674
  if (!/\.dbf$/.test(dbf)) dbf += ".dbf";
@@ -706,21 +680,22 @@ function open(shp, dbf, options) {
706
680
  }
707
681
  if (typeof shp === "string") {
708
682
  if (!/\.shp$/.test(shp)) shp += ".shp";
709
- if (dbf === undefined) dbf = path(shp.substring(0, shp.length - 4) + ".dbf").catch(function() {});
683
+ if (dbf === undefined) dbf = path(shp.substring(0, shp.length - 4) + ".dbf").catch(function () {});
710
684
  shp = path(shp);
711
685
  } else if (shp instanceof ArrayBuffer || shp instanceof Uint8Array) {
712
686
  shp = array(shp);
713
687
  } else {
714
688
  shp = stream(shp);
715
689
  }
716
- return Promise.all([shp, dbf]).then(function(sources) {
717
- var shp = sources[0], dbf = sources[1], encoding = "windows-1252";
690
+ return Promise.all([shp, dbf]).then(function (sources) {
691
+ var shp = sources[0],
692
+ dbf = sources[1],
693
+ encoding = "windows-1252";
718
694
  if (options && options.encoding != null) encoding = options.encoding;
719
695
  return shapefile(shp, dbf, dbf && new TextDecoder(encoding));
720
696
  });
721
697
  }
722
-
723
- const shpToGeojson = (file) => {
698
+ const shpToGeojson = file => {
724
699
  return new Promise((resolve, reject) => {
725
700
  const reader = new FileReader();
726
701
  reader.readAsArrayBuffer(file);
@@ -728,25 +703,22 @@ const shpToGeojson = (file) => {
728
703
  type: "FeatureCollection",
729
704
  features: []
730
705
  };
731
- reader.onload = function() {
732
- open(this.result).then((source) => source.read().then(
733
- function log(result) {
734
- if (!result.done) {
706
+ reader.onload = function () {
707
+ open(this.result).then(source => source.read().then(function log(result) {
708
+ if (!result.done) {
709
+ data.features.push(result.value);
710
+ source.read().then(log);
711
+ } else {
712
+ if (result.value) {
735
713
  data.features.push(result.value);
736
- source.read().then(log);
737
- } else {
738
- if (result.value) {
739
- data.features.push(result.value);
740
- }
741
- resolve(data);
742
714
  }
715
+ resolve(data);
743
716
  }
744
- )).catch(reject);
717
+ })).catch(reject);
745
718
  };
746
719
  });
747
720
  };
748
-
749
- const toGeojson = (file) => {
721
+ const toGeojson = file => {
750
722
  const actions = {
751
723
  shp: shpToGeojson
752
724
  };
@@ -760,7 +732,7 @@ const toGeojson = (file) => {
760
732
  });
761
733
  };
762
734
 
763
- var _sfc_main = defineComponent({
735
+ var script = defineComponent({
764
736
  name: "VkfGeoinputUpdate",
765
737
  components: {
766
738
  VkfInput,
@@ -792,8 +764,7 @@ var _sfc_main = defineComponent({
792
764
  editPlayground.value = geoInputMapXNode.value;
793
765
  });
794
766
  const mapTo = computed(() => {
795
- var _a;
796
- return editPlayground.value === geoInputMapDialogNode.value ? geoInputMapDialogNode.value : (_a = props2.mapTo) != null ? _a : editPlayground.value;
767
+ return editPlayground.value === geoInputMapDialogNode.value ? geoInputMapDialogNode.value : props2.mapTo ?? editPlayground.value;
797
768
  });
798
769
  const mapControls = computed(() => {
799
770
  return props2.readonly ? [] : typeof props2.editTypes === "string" ? [props2.editTypes, ...props2.editControls] : [...props2.editTypes, ...props2.editControls];
@@ -832,7 +803,7 @@ var _sfc_main = defineComponent({
832
803
  const map = await mapDef.promise;
833
804
  map.resize();
834
805
  };
835
- const append = () => createVNode(AppendVue, {
806
+ const append = () => createVNode(script$1, {
836
807
  "dialog": props2.dialogEdit,
837
808
  "disabled": props2.disabled,
838
809
  "onUpload": onUpload,
@@ -868,7 +839,9 @@ var _sfc_main = defineComponent({
868
839
  }
869
840
  });
870
841
 
871
- const _hoisted_1 = { class: "vkf-form-item" };
842
+ const _hoisted_1 = {
843
+ class: "vkf-form-item"
844
+ };
872
845
  const _hoisted_2 = {
873
846
  class: "geoinput-map-dialog",
874
847
  ref: "geoInputMapDialogNode"
@@ -877,8 +850,7 @@ const _hoisted_3 = {
877
850
  class: "geoinput-map-x",
878
851
  ref: "geoInputMapXNode"
879
852
  };
880
-
881
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
853
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
882
854
  const _component_VkfInput = resolveComponent("VkfInput");
883
855
  const _component_VmTdtLayers = resolveComponent("VmTdtLayers");
884
856
  const _component_Checked = resolveComponent("Checked");
@@ -888,93 +860,90 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
888
860
  const _component_VmMap = resolveComponent("VmMap");
889
861
  const _component_VkAsyncTeleport = resolveComponent("VkAsyncTeleport");
890
862
  const _component_ElDialog = resolveComponent("ElDialog");
891
-
892
- return (openBlock(), createElementBlock("div", _hoisted_1, [
893
- createVNode(_component_VkfInput, mergeProps({
894
- readonly: true,
895
- modelValue: JSON.stringify(_ctx.modelValue)
896
- }, _ctx.inputBindProps, toHandlers(_ctx.inputOnEmits), {
897
- inputSlots: _ctx.readonly ? {} : {
863
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_VkfInput, mergeProps({
864
+ readonly: true,
865
+ modelValue: JSON.stringify(_ctx.modelValue)
866
+ }, _ctx.inputBindProps, toHandlers(_ctx.inputOnEmits), {
867
+ inputSlots: _ctx.readonly ? {} : {
898
868
  append: _ctx.append
899
869
  }
900
- }), null, 16 /* FULL_PROPS */, ["modelValue", "inputSlots"]),
901
- createVNode(_component_VkAsyncTeleport, { to: _ctx.mapTo }, {
902
- default: withCtx(() => [
903
- createVNode(_component_VmMap, {
904
- defaultOptions: _ctx.mapOptions,
905
- class: "vk-geoinput-edit-map",
906
- onLoad: _cache[1] || (_cache[1] = $event => (_ctx.mapDef.resolve($event.map)))
907
- }, {
908
- default: withCtx(() => [
909
- createVNode(_component_VmTdtLayers),
910
- createVNode(_component_VmControlDraw, {
911
- styles: _ctx.editStyles,
912
- modelValue: _ctx.currentDrawValue,
913
- "onUpdate:modelValue": _ctx.setCurrentDrawValue,
914
- onUpdate: _cache[0] || (_cache[0] = $event => (_ctx.$emit('editUpdate', $event))),
915
- controls: _ctx.mapControls,
916
- multiple: _ctx.multiple
917
- }, {
918
- default: withCtx(() => [
919
- (!_ctx.spikSave)
920
- ? (openBlock(), createBlock(_component_VmControlDrawUi, {
921
- key: 0,
922
- onClick: withModifiers(_ctx.doSave, ["prevent"])
923
- }, {
924
- default: withCtx(() => [
925
- createVNode(_component_ElIcon, null, {
926
- default: withCtx(() => [
927
- createVNode(_component_Checked)
928
- ]),
929
- _: 1 /* STABLE */
930
- })
931
- ]),
932
- _: 1 /* STABLE */
933
- }, 8 /* PROPS */, ["onClick"]))
934
- : createCommentVNode("v-if", true)
935
- ]),
936
- _: 1 /* STABLE */
937
- }, 8 /* PROPS */, ["styles", "modelValue", "onUpdate:modelValue", "controls", "multiple"]),
938
- renderSlot(_ctx.$slots, "map"),
939
- (_ctx.slots.map)
940
- ? (openBlock(), createBlock(resolveDynamicComponent(typeof _ctx.slots.map === 'function' ? _ctx.slots.map() : _ctx.slots.map), { key: 0 }))
941
- : createCommentVNode("v-if", true)
942
- ]),
943
- _: 3 /* FORWARDED */
944
- }, 8 /* PROPS */, ["defaultOptions"])
945
- ]),
946
- _: 3 /* FORWARDED */
947
- }, 8 /* PROPS */, ["to"]),
948
- createVNode(_component_ElDialog, {
949
- modelValue: _ctx.dialogShow,
950
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((_ctx.dialogShow) = $event)),
951
- title: _ctx.dialogEditTitle,
952
- fullscreen: _ctx.dialogEditFullscreen,
953
- modalClass: "vk-geoinput-edit-dialog-x",
954
- appendToBody: true,
955
- onOpen: _ctx.dialogOnOpen,
956
- onClose: _ctx.dialogOnClose,
957
- closeOnClickModal: false,
958
- draggable: true
870
+ }), null, 16, ["modelValue", "inputSlots"]), createVNode(_component_VkAsyncTeleport, {
871
+ to: _ctx.mapTo
872
+ }, {
873
+ default: withCtx(() => [createVNode(_component_VmMap, {
874
+ defaultOptions: _ctx.mapOptions,
875
+ class: "vk-geoinput-edit-map",
876
+ onLoad: _cache[1] || (_cache[1] = ($event) => _ctx.mapDef.resolve($event.map))
959
877
  }, {
960
- default: withCtx(() => [
961
- createElementVNode("div", _hoisted_2, null, 512 /* NEED_PATCH */)
962
- ]),
963
- _: 1 /* STABLE */
964
- }, 8 /* PROPS */, ["modelValue", "title", "fullscreen", "onOpen", "onClose"]),
965
- withDirectives(createElementVNode("div", _hoisted_3, null, 512 /* NEED_PATCH */), [
966
- [vShow, _ctx.showMap]
967
- ])
968
- ]))
969
- }
970
- var VkfGeoinputUpdate = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',"index.vue"]]);
878
+ default: withCtx(() => [createVNode(_component_VmTdtLayers), createVNode(_component_VmControlDraw, {
879
+ styles: _ctx.editStyles,
880
+ modelValue: _ctx.currentDrawValue,
881
+ "onUpdate:modelValue": _ctx.setCurrentDrawValue,
882
+ onUpdate: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("editUpdate", $event)),
883
+ controls: _ctx.mapControls,
884
+ multiple: _ctx.multiple
885
+ }, {
886
+ default: withCtx(() => [!_ctx.spikSave ? (openBlock(), createBlock(_component_VmControlDrawUi, {
887
+ key: 0,
888
+ onClick: withModifiers(_ctx.doSave, ["prevent"])
889
+ }, {
890
+ default: withCtx(() => [createVNode(_component_ElIcon, null, {
891
+ default: withCtx(() => [createVNode(_component_Checked)]),
892
+ _: 1
893
+ /* STABLE */
894
+ })]),
895
+ _: 1
896
+ /* STABLE */
897
+ }, 8, ["onClick"])) : createCommentVNode("v-if", true)]),
898
+ _: 1
899
+ /* STABLE */
900
+ }, 8, ["styles", "modelValue", "onUpdate:modelValue", "controls", "multiple"]), renderSlot(_ctx.$slots, "map"), _ctx.slots.map ? (openBlock(), createBlock(resolveDynamicComponent(typeof _ctx.slots.map === "function" ? _ctx.slots.map() : _ctx.slots.map), {
901
+ key: 0
902
+ })) : createCommentVNode("v-if", true)]),
903
+ _: 3
904
+ /* FORWARDED */
905
+ }, 8, ["defaultOptions"])]),
906
+ _: 3
907
+ /* FORWARDED */
908
+ }, 8, ["to"]), createVNode(_component_ElDialog, {
909
+ modelValue: _ctx.dialogShow,
910
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.dialogShow = $event),
911
+ title: _ctx.dialogEditTitle,
912
+ fullscreen: _ctx.dialogEditFullscreen,
913
+ modalClass: "vk-geoinput-edit-dialog-x",
914
+ appendToBody: true,
915
+ onOpen: _ctx.dialogOnOpen,
916
+ onClose: _ctx.dialogOnClose,
917
+ closeOnClickModal: false,
918
+ draggable: true
919
+ }, {
920
+ default: withCtx(() => [createElementVNode(
921
+ "div",
922
+ _hoisted_2,
923
+ null,
924
+ 512
925
+ /* NEED_PATCH */
926
+ )]),
927
+ _: 1
928
+ /* STABLE */
929
+ }, 8, ["modelValue", "title", "fullscreen", "onOpen", "onClose"]), withDirectives(createElementVNode(
930
+ "div",
931
+ _hoisted_3,
932
+ null,
933
+ 512
934
+ /* NEED_PATCH */
935
+ ), [[vShow, _ctx.showMap]])]);
936
+ }
937
+
938
+ script.render = render;
939
+ script.__file = "geoinput-update/src/index.vue";
971
940
 
972
941
  var types = /*#__PURE__*/Object.freeze({
973
942
  __proto__: null
974
943
  });
975
944
 
976
- VkfGeoinputUpdate.install = (app) => {
977
- app.component(VkfGeoinputUpdate.name, VkfGeoinputUpdate);
945
+ script.install = (app) => {
946
+ app.component(script.name, script);
978
947
  };
979
948
 
980
- export { VkfGeoinputUpdate, ctx as _VkfGeoinputUpdateCtx, types as __VkfGeoinputUpdate, VkfGeoinputUpdate as default };
949
+ export { script as VkfGeoinputUpdate, ctx as _VkfGeoinputUpdateCtx, types as __VkfGeoinputUpdate, script as default };