@vunk/form 2.18.2 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/components/_plugin-vue_export-helper.cjs +1 -11
  2. package/components/api-tables-select/index.cjs +1 -467
  3. package/components/api-tables-select/index.mjs +56 -413
  4. package/components/api-tables-select/src/ctx.d.ts +152 -172
  5. package/components/api-tables-select/src/index.vue.d.ts +394 -983
  6. package/components/button/index.cjs +1 -112
  7. package/components/button/index.mjs +57 -85
  8. package/components/button/src/ctx.d.ts +28 -113
  9. package/components/button/src/index.vue.d.ts +317 -625
  10. package/components/card-input-collection/index.cjs +1 -370
  11. package/components/card-input-collection/index.mjs +175 -277
  12. package/components/card-input-collection/src/core.vue.d.ts +54 -951
  13. package/components/card-input-collection/src/ctx.d.ts +19 -49
  14. package/components/card-input-collection/src/index.vue.d.ts +46 -110
  15. package/components/cascader/index.cjs +1 -150
  16. package/components/cascader/index.mjs +88 -116
  17. package/components/cascader/src/ctx.d.ts +140 -207
  18. package/components/cascader/src/index.vue.d.ts +315 -522
  19. package/components/cascader/src/use.d.ts +1 -1
  20. package/components/checkbox/index.cjs +1 -152
  21. package/components/checkbox/index.mjs +75 -119
  22. package/components/checkbox/src/ctx.d.ts +46 -69
  23. package/components/checkbox/src/index.vue.d.ts +448 -1016
  24. package/components/cloneDeep.cjs +1 -2106
  25. package/components/color-picker/index.cjs +1 -80
  26. package/components/color-picker/index.mjs +46 -69
  27. package/components/color-picker/src/ctx.d.ts +130 -107
  28. package/components/color-picker/src/index.vue.d.ts +285 -255
  29. package/components/date-picker/index.cjs +1 -119
  30. package/components/date-picker/index.mjs +63 -97
  31. package/components/date-picker/src/ctx.d.ts +123 -206
  32. package/components/date-picker/src/index.vue.d.ts +269 -1358
  33. package/components/date-picker/src/types.d.ts +7 -7
  34. package/components/date-picker-range/index.cjs +1 -177
  35. package/components/date-picker-range/index.mjs +62 -113
  36. package/components/date-picker-range/src/ctx.d.ts +130 -206
  37. package/components/date-picker-range/src/index.vue.d.ts +861 -448
  38. package/components/debounce.cjs +1 -0
  39. package/components/dialog/index.cjs +1 -126
  40. package/components/dialog/index.mjs +65 -99
  41. package/components/dialog/src/ctx.d.ts +17 -108
  42. package/components/dialog/src/index.vue.d.ts +77 -1072
  43. package/components/dialog-input-collection/index.cjs +1 -624
  44. package/components/dialog-input-collection/index.mjs +276 -498
  45. package/components/dialog-input-collection/src/ctx.d.ts +21 -52
  46. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +29 -6371
  47. package/components/dialog-input-collection/src/index.vue.d.ts +65 -7630
  48. package/components/dialog-input-collection/src/layout.vue.d.ts +13 -73
  49. package/components/download-plus/index.cjs +1 -456
  50. package/components/download-plus/index.mjs +215 -358
  51. package/components/download-plus/src/api.d.ts +1 -1
  52. package/components/download-plus/src/ctx.d.ts +21 -52
  53. package/components/download-plus/src/index.vue.d.ts +437 -1177
  54. package/components/editable-text/index.cjs +1 -295
  55. package/components/editable-text/index.mjs +113 -239
  56. package/components/editable-text/src/ctx.d.ts +24 -50
  57. package/components/editable-text/src/index.vue.d.ts +59 -3258
  58. package/components/el-slider/index.cjs +1 -0
  59. package/components/el-slider/index.d.ts +5 -0
  60. package/components/el-slider/index.mjs +475 -0
  61. package/components/el-slider/src/button.d.ts +36 -0
  62. package/components/el-slider/src/button.vue.d.ts +41 -0
  63. package/components/el-slider/src/composables/index.cjs +1 -0
  64. package/components/el-slider/src/composables/index.d.ts +6 -0
  65. package/components/el-slider/src/composables/index.mjs +9 -0
  66. package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
  67. package/components/el-slider/src/composables/use-marks.d.ts +7 -0
  68. package/components/el-slider/src/composables/use-slide.d.ts +23 -0
  69. package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
  70. package/components/el-slider/src/composables/use-stops.d.ts +8 -0
  71. package/components/el-slider/src/composables/use-watch.d.ts +4 -0
  72. package/components/el-slider/src/constants.d.ts +14 -0
  73. package/components/el-slider/src/marker.d.ts +37 -0
  74. package/components/el-slider/src/slider-core.vue.d.ts +218 -0
  75. package/components/el-slider/src/slider.d.ts +174 -0
  76. package/components/esri-input-geojson/index.cjs +2 -1604
  77. package/components/esri-input-geojson/index.mjs +682 -1290
  78. package/components/esri-input-geojson/src/append.vue.d.ts +239 -1099
  79. package/components/esri-input-geojson/src/const.d.ts +1 -1
  80. package/components/esri-input-geojson/src/ctx.d.ts +66 -161
  81. package/components/esri-input-geojson/src/default-view.vue.d.ts +8 -132
  82. package/components/esri-input-geojson/src/index.vue.d.ts +982 -708
  83. package/components/esri-input-geojson/src/types.d.ts +1 -0
  84. package/components/esri-input-geojson/src/viewer.vue.d.ts +53 -282
  85. package/components/fieldset/index.cjs +1 -110
  86. package/components/fieldset/index.mjs +63 -76
  87. package/components/fieldset/src/ctx.d.ts +4 -4
  88. package/components/fieldset/src/index.vue.d.ts +7 -7
  89. package/components/form/index.cjs +1 -248
  90. package/components/form/index.mjs +107 -161
  91. package/components/form/src/ctx.d.ts +15 -64
  92. package/components/form/src/index.vue.d.ts +374 -2431
  93. package/components/form-item/index.cjs +1 -294
  94. package/components/form-item/index.mjs +140 -229
  95. package/components/form-item/src/core.vue.d.ts +32 -1854
  96. package/components/form-item/src/ctx.d.ts +19 -51
  97. package/components/form-item/src/index.vue.d.ts +38 -101
  98. package/components/form-item-renderer/index.cjs +1 -193
  99. package/components/form-item-renderer/index.mjs +103 -162
  100. package/components/form-item-renderer/src/core.vue.d.ts +9 -9
  101. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  102. package/components/form-item-renderer/src/index.vue.d.ts +24 -74
  103. package/components/form-item-renderer-template/index.cjs +1 -47
  104. package/components/form-item-renderer-template/index.mjs +20 -33
  105. package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
  106. package/components/forms-provider/index.cjs +1 -99
  107. package/components/forms-provider/index.mjs +44 -73
  108. package/components/forms-provider/src/core.d.ts +3 -2
  109. package/components/forms-provider/src/segment.vue.d.ts +8 -8
  110. package/components/forms-provider/src/view.vue.d.ts +14 -4
  111. package/components/index.cjs +1 -399
  112. package/components/index2.cjs +1 -17
  113. package/components/information/index.cjs +1 -65
  114. package/components/information/index.mjs +28 -38
  115. package/components/information/src/ctx.d.ts +2 -2
  116. package/components/information/src/index.vue.d.ts +4 -4
  117. package/components/information-collection/index.cjs +1 -81
  118. package/components/information-collection/index.mjs +44 -48
  119. package/components/information-collection/src/ctx.d.ts +29 -65
  120. package/components/information-collection/src/index.vue.d.ts +64 -136
  121. package/components/information-renderer/index.cjs +1 -16
  122. package/components/information-renderer/index.d.ts +9 -9
  123. package/components/information-renderer/index.mjs +9 -10
  124. package/components/information-tag/index.cjs +1 -101
  125. package/components/information-tag/index.mjs +44 -54
  126. package/components/information-tag/src/ctx.d.ts +6 -21
  127. package/components/information-tag/src/index.vue.d.ts +23 -51
  128. package/components/information-templates-default/index.cjs +1 -101
  129. package/components/information-templates-default/index.mjs +63 -73
  130. package/components/information-templates-default/src/index.vue.d.ts +1 -1
  131. package/components/input/index.cjs +1 -115
  132. package/components/input/index.mjs +60 -83
  133. package/components/input/src/ctx.d.ts +51 -152
  134. package/components/input/src/index.vue.d.ts +392 -951
  135. package/components/input-array/index.cjs +1 -310
  136. package/components/input-array/index.mjs +114 -244
  137. package/components/input-array/src/ctx.d.ts +19 -49
  138. package/components/input-array/src/form-template.vue.d.ts +1 -901
  139. package/components/input-array/src/index.vue.d.ts +43 -730
  140. package/components/input-collection/index.cjs +1 -452
  141. package/components/input-collection/index.mjs +195 -355
  142. package/components/input-collection/src/core.vue.d.ts +64 -1026
  143. package/components/input-collection/src/ctx.d.ts +21 -51
  144. package/components/input-collection/src/index.vue.d.ts +50 -114
  145. package/components/input-file/index.cjs +1 -142
  146. package/components/input-file/index.mjs +68 -100
  147. package/components/input-file/src/ctx.d.ts +8 -29
  148. package/components/input-file/src/index.vue.d.ts +444 -74
  149. package/components/input-file/src/template.vue.d.ts +1 -124
  150. package/components/input-link/index.cjs +1 -167
  151. package/components/input-link/index.mjs +60 -83
  152. package/components/input-link/src/ctx.d.ts +52 -137
  153. package/components/input-link/src/index.vue.d.ts +833 -311
  154. package/components/input-number/index.cjs +1 -119
  155. package/components/input-number/index.mjs +73 -87
  156. package/components/input-number/src/ctx.d.ts +38 -131
  157. package/components/input-number/src/index.vue.d.ts +321 -683
  158. package/components/input-tag/index.cjs +1 -100
  159. package/components/input-tag/index.mjs +51 -78
  160. package/components/input-tag/src/ctx.d.ts +43 -145
  161. package/components/input-tag/src/index.vue.d.ts +324 -778
  162. package/components/isObject.cjs +1 -165
  163. package/components/monaco-editor/index.cjs +1 -83
  164. package/components/monaco-editor/index.mjs +40 -59
  165. package/components/monaco-editor/src/ctx.d.ts +19 -44
  166. package/components/monaco-editor/src/index.vue.d.ts +209 -109
  167. package/components/radio/index.cjs +1 -267
  168. package/components/radio/index.mjs +110 -209
  169. package/components/radio/src/ctx.d.ts +27 -91
  170. package/components/radio/src/index.vue.d.ts +298 -1279
  171. package/components/radio/src/option.vue.d.ts +29 -881
  172. package/components/radio/src/wraper.vue.d.ts +64 -196
  173. package/components/renderer-data/index.cjs +1 -41
  174. package/components/renderer-data/index.mjs +19 -26
  175. package/components/renderer-data/src/ctx.d.ts +1 -1
  176. package/components/renderer-data/src/index.vue.d.ts +2 -2
  177. package/components/select/index.cjs +1 -311
  178. package/components/select/index.mjs +156 -214
  179. package/components/select/src/core.vue.d.ts +638 -1080
  180. package/components/select/src/ctx.d.ts +140 -223
  181. package/components/select/src/index.vue.d.ts +334 -610
  182. package/components/select/src/options.vue.d.ts +1 -1
  183. package/components/slider/index.cjs +1 -88
  184. package/components/slider/index.mjs +41 -70
  185. package/components/slider/src/ctx.d.ts +63 -174
  186. package/components/slider/src/index.vue.d.ts +151 -420
  187. package/components/style.css +1 -0
  188. package/components/switch/index.cjs +1 -88
  189. package/components/switch/index.mjs +37 -69
  190. package/components/switch/src/ctx.d.ts +34 -113
  191. package/components/switch/src/index.vue.d.ts +88 -699
  192. package/components/switch/src/types.d.ts +2 -2
  193. package/components/tables-select/index.cjs +1 -263
  194. package/components/tables-select/index.mjs +102 -172
  195. package/components/tables-select/src/ctx.d.ts +76 -91
  196. package/components/tables-select/src/index.vue.d.ts +228 -4969
  197. package/components/template-instances-provider/index.cjs +1 -31
  198. package/components/template-instances-provider/index.mjs +18 -22
  199. package/components/template-instances-provider/src/index.vue.d.ts +2 -2
  200. package/components/templates-default/index.cjs +1 -235
  201. package/components/templates-default/index.mjs +152 -211
  202. package/components/templates-default/src/ctx.d.ts +5 -3
  203. package/components/templates-default/src/index.vue.d.ts +7298 -157
  204. package/components/templates-element-plus/index.cjs +1 -112
  205. package/components/templates-element-plus/index.mjs +49 -91
  206. package/components/templates-element-plus/src/ctx.d.ts +1 -1
  207. package/components/templates-element-plus/src/index.vue.d.ts +65 -258
  208. package/components/templates-esri/index.cjs +1 -65
  209. package/components/templates-esri/index.mjs +29 -39
  210. package/components/templates-esri/src/ctx.d.ts +1 -1
  211. package/components/templates-esri/src/index.vue.d.ts +1776 -24
  212. package/components/templates-layout/index.cjs +1 -137
  213. package/components/templates-layout/index.mjs +78 -116
  214. package/components/templates-layout/src/ctx.d.ts +1 -1
  215. package/components/templates-layout/src/index.vue.d.ts +79 -411
  216. package/components/templates-variant/index.cjs +1 -70
  217. package/components/templates-variant/index.mjs +33 -43
  218. package/components/templates-variant/src/ctx.d.ts +1 -1
  219. package/components/templates-variant/src/index.vue.d.ts +1238 -24
  220. package/components/time-picker/index.cjs +1 -104
  221. package/components/time-picker/index.mjs +57 -87
  222. package/components/time-picker/src/ctx.d.ts +121 -211
  223. package/components/time-picker/src/index.vue.d.ts +263 -1368
  224. package/components/upload/index.cjs +1 -663
  225. package/components/upload/index.mjs +343 -537
  226. package/components/upload/src/ctx.d.ts +108 -195
  227. package/components/upload/src/file.vue.d.ts +197 -776
  228. package/components/upload/src/index.vue.d.ts +689 -1931
  229. package/components/upload/src/types.d.ts +1 -1
  230. package/components/upload/src/wraper.vue.d.ts +232 -407
  231. package/components/upload-plus/index.cjs +21 -18673
  232. package/components/upload-plus/index.mjs +4598 -18372
  233. package/components/upload-plus/src/api.d.ts +2 -2
  234. package/components/upload-plus/src/ctx.d.ts +24 -51
  235. package/components/upload-plus/src/index.vue.d.ts +51 -1656
  236. package/components/use-watch.cjs +1 -0
  237. package/components/van-cascader/index.cjs +1 -125
  238. package/components/van-cascader/index.mjs +51 -96
  239. package/components/van-cascader/src/ctx.d.ts +135 -203
  240. package/components/van-cascader/src/index.vue.d.ts +312 -985
  241. package/components/var-datetime-picker/index.cjs +1 -333
  242. package/components/var-datetime-picker/index.mjs +175 -254
  243. package/components/var-datetime-picker/src/ctx.d.ts +19 -50
  244. package/components/var-datetime-picker/src/index.vue.d.ts +688 -1115
  245. package/components/vditor/index.cjs +1 -86
  246. package/components/vditor/index.mjs +40 -66
  247. package/components/vditor/src/ctx.d.ts +16 -45
  248. package/components/vditor/src/index.vue.d.ts +195 -120
  249. package/composables/element-plus/index.cjs +1 -23
  250. package/composables/element-plus/index.mjs +14 -18
  251. package/composables/index.cjs +1 -161
  252. package/composables/index.d.ts +1 -0
  253. package/composables/index.mjs +102 -135
  254. package/composables/useForm.d.ts +2 -2
  255. package/composables/useRtl.d.ts +18 -0
  256. package/composables/useSourceManager.d.ts +2 -2
  257. package/composables/useTemplateInstances.d.ts +3 -3
  258. package/index.css +1 -562
  259. package/index.d.ts +0 -3
  260. package/index.esm.js +23 -48
  261. package/locale/index.cjs +1 -102
  262. package/locale/index.mjs +34 -34
  263. package/locale/lang/index.cjs +1 -2
  264. package/locale/lang/index.d.ts +1 -0
  265. package/package.json +14 -85
  266. package/shared/const/index.cjs +1 -59
  267. package/shared/const/index.d.ts +1 -1
  268. package/shared/const/index.mjs +18 -20
  269. package/shared/element-plus/ctx.d.ts +40 -37
  270. package/shared/element-plus/index.cjs +1 -211
  271. package/shared/element-plus/index.mjs +93 -161
  272. package/shared/element-plus/instances.d.ts +207 -321
  273. package/shared/form/index.cjs +1 -33
  274. package/shared/form/index.mjs +23 -25
  275. package/shared/helper/index.cjs +1 -11
  276. package/shared/helper/index.mjs +7 -8
  277. package/shared/index.cjs +1 -8
  278. package/shared/index.mjs +5 -1
  279. package/shared/infer-prop/index.cjs +1 -36
  280. package/shared/infer-prop/index.mjs +22 -28
  281. package/shared/progress-it/index.cjs +1 -42
  282. package/shared/progress-it/index.mjs +15 -31
  283. package/shared/rules/index.cjs +1 -56
  284. package/shared/rules/index.mjs +19 -18
  285. package/shared/types/form/index.cjs +1 -2
  286. package/shared/types/index.cjs +1 -2
  287. package/shared/types/source/index.cjs +1 -2
  288. package/shared/types/source-manager/index.cjs +1 -2
  289. package/shared/upload/index.cjs +1 -774
  290. package/shared/upload/index.mjs +180 -764
  291. package/component.d.ts +0 -3
  292. package/components/_plugin-vue_export-helper.mjs +0 -9
  293. package/components/card-input-collection/index.css +0 -21
  294. package/components/cascader/index.css +0 -9
  295. package/components/checkbox/index.css +0 -30
  296. package/components/cloneDeep.mjs +0 -2104
  297. package/components/date-picker-range/index.css +0 -18
  298. package/components/dialog-input-collection/index.css +0 -21
  299. package/components/download-plus/index.css +0 -68
  300. package/components/editable-text/index.css +0 -9
  301. package/components/esri-input-geojson/index.css +0 -32
  302. package/components/fieldset/index.css +0 -5
  303. package/components/form-item/index.css +0 -35
  304. package/components/index.mjs +0 -378
  305. package/components/index2.mjs +0 -14
  306. package/components/information-tag/index.css +0 -6
  307. package/components/information-templates-default/index.css +0 -16
  308. package/components/input-array/index.css +0 -14
  309. package/components/input-collection/index.css +0 -20
  310. package/components/input-link/index.css +0 -4
  311. package/components/input-number/index.css +0 -13
  312. package/components/isObject.mjs +0 -158
  313. package/components/monaco-editor/index.css +0 -4
  314. package/components/radio/index.css +0 -40
  315. package/components/select/index.css +0 -15
  316. package/components/switch/index.css +0 -10
  317. package/components/tables-select/index.css +0 -3
  318. package/components/templates-layout/index.css +0 -3
  319. package/components/upload/index.css +0 -34
  320. package/components/upload-plus/index.css +0 -84
  321. package/components/van-cascader/index.css +0 -6
  322. package/components/var-datetime-picker/index.css +0 -17
  323. package/defaults.d.ts +0 -5
@@ -1,771 +1,187 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1
+ function I(u) {
2
+ return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
3
3
  }
4
-
5
- var sparkMd5 = {exports: {}};
6
-
7
- (function (module, exports) {
8
- (function (factory) {
9
- {
10
- // Node/CommonJS
11
- module.exports = factory();
12
- }
13
- }(function (undefined$1) {
14
-
15
- /*
16
- * Fastest md5 implementation around (JKM md5).
17
- * Credits: Joseph Myers
18
- *
19
- * @see http://www.myersdaily.org/joseph/javascript/md5-text.html
20
- * @see http://jsperf.com/md5-shootout/7
21
- */
22
-
23
- /* this function is much faster,
24
- so if possible we use it. Some IEs
25
- are the only ones I know of that
26
- need the idiotic second function,
27
- generated by an if clause. */
28
- var hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
29
-
30
- function md5cycle(x, k) {
31
- var a = x[0],
32
- b = x[1],
33
- c = x[2],
34
- d = x[3];
35
-
36
- a += (b & c | ~b & d) + k[0] - 680876936 | 0;
37
- a = (a << 7 | a >>> 25) + b | 0;
38
- d += (a & b | ~a & c) + k[1] - 389564586 | 0;
39
- d = (d << 12 | d >>> 20) + a | 0;
40
- c += (d & a | ~d & b) + k[2] + 606105819 | 0;
41
- c = (c << 17 | c >>> 15) + d | 0;
42
- b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
43
- b = (b << 22 | b >>> 10) + c | 0;
44
- a += (b & c | ~b & d) + k[4] - 176418897 | 0;
45
- a = (a << 7 | a >>> 25) + b | 0;
46
- d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
47
- d = (d << 12 | d >>> 20) + a | 0;
48
- c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
49
- c = (c << 17 | c >>> 15) + d | 0;
50
- b += (c & d | ~c & a) + k[7] - 45705983 | 0;
51
- b = (b << 22 | b >>> 10) + c | 0;
52
- a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
53
- a = (a << 7 | a >>> 25) + b | 0;
54
- d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
55
- d = (d << 12 | d >>> 20) + a | 0;
56
- c += (d & a | ~d & b) + k[10] - 42063 | 0;
57
- c = (c << 17 | c >>> 15) + d | 0;
58
- b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
59
- b = (b << 22 | b >>> 10) + c | 0;
60
- a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
61
- a = (a << 7 | a >>> 25) + b | 0;
62
- d += (a & b | ~a & c) + k[13] - 40341101 | 0;
63
- d = (d << 12 | d >>> 20) + a | 0;
64
- c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
65
- c = (c << 17 | c >>> 15) + d | 0;
66
- b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
67
- b = (b << 22 | b >>> 10) + c | 0;
68
-
69
- a += (b & d | c & ~d) + k[1] - 165796510 | 0;
70
- a = (a << 5 | a >>> 27) + b | 0;
71
- d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
72
- d = (d << 9 | d >>> 23) + a | 0;
73
- c += (d & b | a & ~b) + k[11] + 643717713 | 0;
74
- c = (c << 14 | c >>> 18) + d | 0;
75
- b += (c & a | d & ~a) + k[0] - 373897302 | 0;
76
- b = (b << 20 | b >>> 12) + c | 0;
77
- a += (b & d | c & ~d) + k[5] - 701558691 | 0;
78
- a = (a << 5 | a >>> 27) + b | 0;
79
- d += (a & c | b & ~c) + k[10] + 38016083 | 0;
80
- d = (d << 9 | d >>> 23) + a | 0;
81
- c += (d & b | a & ~b) + k[15] - 660478335 | 0;
82
- c = (c << 14 | c >>> 18) + d | 0;
83
- b += (c & a | d & ~a) + k[4] - 405537848 | 0;
84
- b = (b << 20 | b >>> 12) + c | 0;
85
- a += (b & d | c & ~d) + k[9] + 568446438 | 0;
86
- a = (a << 5 | a >>> 27) + b | 0;
87
- d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
88
- d = (d << 9 | d >>> 23) + a | 0;
89
- c += (d & b | a & ~b) + k[3] - 187363961 | 0;
90
- c = (c << 14 | c >>> 18) + d | 0;
91
- b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
92
- b = (b << 20 | b >>> 12) + c | 0;
93
- a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
94
- a = (a << 5 | a >>> 27) + b | 0;
95
- d += (a & c | b & ~c) + k[2] - 51403784 | 0;
96
- d = (d << 9 | d >>> 23) + a | 0;
97
- c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
98
- c = (c << 14 | c >>> 18) + d | 0;
99
- b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
100
- b = (b << 20 | b >>> 12) + c | 0;
101
-
102
- a += (b ^ c ^ d) + k[5] - 378558 | 0;
103
- a = (a << 4 | a >>> 28) + b | 0;
104
- d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
105
- d = (d << 11 | d >>> 21) + a | 0;
106
- c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
107
- c = (c << 16 | c >>> 16) + d | 0;
108
- b += (c ^ d ^ a) + k[14] - 35309556 | 0;
109
- b = (b << 23 | b >>> 9) + c | 0;
110
- a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
111
- a = (a << 4 | a >>> 28) + b | 0;
112
- d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
113
- d = (d << 11 | d >>> 21) + a | 0;
114
- c += (d ^ a ^ b) + k[7] - 155497632 | 0;
115
- c = (c << 16 | c >>> 16) + d | 0;
116
- b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
117
- b = (b << 23 | b >>> 9) + c | 0;
118
- a += (b ^ c ^ d) + k[13] + 681279174 | 0;
119
- a = (a << 4 | a >>> 28) + b | 0;
120
- d += (a ^ b ^ c) + k[0] - 358537222 | 0;
121
- d = (d << 11 | d >>> 21) + a | 0;
122
- c += (d ^ a ^ b) + k[3] - 722521979 | 0;
123
- c = (c << 16 | c >>> 16) + d | 0;
124
- b += (c ^ d ^ a) + k[6] + 76029189 | 0;
125
- b = (b << 23 | b >>> 9) + c | 0;
126
- a += (b ^ c ^ d) + k[9] - 640364487 | 0;
127
- a = (a << 4 | a >>> 28) + b | 0;
128
- d += (a ^ b ^ c) + k[12] - 421815835 | 0;
129
- d = (d << 11 | d >>> 21) + a | 0;
130
- c += (d ^ a ^ b) + k[15] + 530742520 | 0;
131
- c = (c << 16 | c >>> 16) + d | 0;
132
- b += (c ^ d ^ a) + k[2] - 995338651 | 0;
133
- b = (b << 23 | b >>> 9) + c | 0;
134
-
135
- a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
136
- a = (a << 6 | a >>> 26) + b | 0;
137
- d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
138
- d = (d << 10 | d >>> 22) + a | 0;
139
- c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
140
- c = (c << 15 | c >>> 17) + d | 0;
141
- b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
142
- b = (b << 21 |b >>> 11) + c | 0;
143
- a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
144
- a = (a << 6 | a >>> 26) + b | 0;
145
- d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
146
- d = (d << 10 | d >>> 22) + a | 0;
147
- c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
148
- c = (c << 15 | c >>> 17) + d | 0;
149
- b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
150
- b = (b << 21 |b >>> 11) + c | 0;
151
- a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
152
- a = (a << 6 | a >>> 26) + b | 0;
153
- d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
154
- d = (d << 10 | d >>> 22) + a | 0;
155
- c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
156
- c = (c << 15 | c >>> 17) + d | 0;
157
- b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
158
- b = (b << 21 |b >>> 11) + c | 0;
159
- a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
160
- a = (a << 6 | a >>> 26) + b | 0;
161
- d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
162
- d = (d << 10 | d >>> 22) + a | 0;
163
- c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
164
- c = (c << 15 | c >>> 17) + d | 0;
165
- b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
166
- b = (b << 21 | b >>> 11) + c | 0;
167
-
168
- x[0] = a + x[0] | 0;
169
- x[1] = b + x[1] | 0;
170
- x[2] = c + x[2] | 0;
171
- x[3] = d + x[3] | 0;
172
- }
173
-
174
- function md5blk(s) {
175
- var md5blks = [],
176
- i; /* Andy King said do it this way. */
177
-
178
- for (i = 0; i < 64; i += 4) {
179
- md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
180
- }
181
- return md5blks;
182
- }
183
-
184
- function md5blk_array(a) {
185
- var md5blks = [],
186
- i; /* Andy King said do it this way. */
187
-
188
- for (i = 0; i < 64; i += 4) {
189
- md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
190
- }
191
- return md5blks;
192
- }
193
-
194
- function md51(s) {
195
- var n = s.length,
196
- state = [1732584193, -271733879, -1732584194, 271733878],
197
- i,
198
- length,
199
- tail,
200
- tmp,
201
- lo,
202
- hi;
203
-
204
- for (i = 64; i <= n; i += 64) {
205
- md5cycle(state, md5blk(s.substring(i - 64, i)));
206
- }
207
- s = s.substring(i - 64);
208
- length = s.length;
209
- tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
210
- for (i = 0; i < length; i += 1) {
211
- tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
212
- }
213
- tail[i >> 2] |= 0x80 << ((i % 4) << 3);
214
- if (i > 55) {
215
- md5cycle(state, tail);
216
- for (i = 0; i < 16; i += 1) {
217
- tail[i] = 0;
218
- }
219
- }
220
-
221
- // Beware that the final length might not fit in 32 bits so we take care of that
222
- tmp = n * 8;
223
- tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
224
- lo = parseInt(tmp[2], 16);
225
- hi = parseInt(tmp[1], 16) || 0;
226
-
227
- tail[14] = lo;
228
- tail[15] = hi;
229
-
230
- md5cycle(state, tail);
231
- return state;
232
- }
233
-
234
- function md51_array(a) {
235
- var n = a.length,
236
- state = [1732584193, -271733879, -1732584194, 271733878],
237
- i,
238
- length,
239
- tail,
240
- tmp,
241
- lo,
242
- hi;
243
-
244
- for (i = 64; i <= n; i += 64) {
245
- md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
246
- }
247
-
248
- // Not sure if it is a bug, however IE10 will always produce a sub array of length 1
249
- // containing the last element of the parent array if the sub array specified starts
250
- // beyond the length of the parent array - weird.
251
- // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
252
- a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
253
-
254
- length = a.length;
255
- tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
256
- for (i = 0; i < length; i += 1) {
257
- tail[i >> 2] |= a[i] << ((i % 4) << 3);
258
- }
259
-
260
- tail[i >> 2] |= 0x80 << ((i % 4) << 3);
261
- if (i > 55) {
262
- md5cycle(state, tail);
263
- for (i = 0; i < 16; i += 1) {
264
- tail[i] = 0;
265
- }
266
- }
267
-
268
- // Beware that the final length might not fit in 32 bits so we take care of that
269
- tmp = n * 8;
270
- tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
271
- lo = parseInt(tmp[2], 16);
272
- hi = parseInt(tmp[1], 16) || 0;
273
-
274
- tail[14] = lo;
275
- tail[15] = hi;
276
-
277
- md5cycle(state, tail);
278
-
279
- return state;
280
- }
281
-
282
- function rhex(n) {
283
- var s = '',
284
- j;
285
- for (j = 0; j < 4; j += 1) {
286
- s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
287
- }
288
- return s;
289
- }
290
-
291
- function hex(x) {
292
- var i;
293
- for (i = 0; i < x.length; i += 1) {
294
- x[i] = rhex(x[i]);
295
- }
296
- return x.join('');
297
- }
298
-
299
- // In some cases the fast add32 function cannot be used..
300
- if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') ;
301
-
302
- // ---------------------------------------------------
303
-
304
- /**
305
- * ArrayBuffer slice polyfill.
306
- *
307
- * @see https://github.com/ttaubert/node-arraybuffer-slice
308
- */
309
-
310
- if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
311
- (function () {
312
- function clamp(val, length) {
313
- val = (val | 0) || 0;
314
-
315
- if (val < 0) {
316
- return Math.max(val + length, 0);
317
- }
318
-
319
- return Math.min(val, length);
320
- }
321
-
322
- ArrayBuffer.prototype.slice = function (from, to) {
323
- var length = this.byteLength,
324
- begin = clamp(from, length),
325
- end = length,
326
- num,
327
- target,
328
- targetArray,
329
- sourceArray;
330
-
331
- if (to !== undefined$1) {
332
- end = clamp(to, length);
333
- }
334
-
335
- if (begin > end) {
336
- return new ArrayBuffer(0);
337
- }
338
-
339
- num = end - begin;
340
- target = new ArrayBuffer(num);
341
- targetArray = new Uint8Array(target);
342
-
343
- sourceArray = new Uint8Array(this, begin, num);
344
- targetArray.set(sourceArray);
345
-
346
- return target;
347
- };
348
- })();
349
- }
350
-
351
- // ---------------------------------------------------
352
-
353
- /**
354
- * Helpers.
355
- */
356
-
357
- function toUtf8(str) {
358
- if (/[\u0080-\uFFFF]/.test(str)) {
359
- str = unescape(encodeURIComponent(str));
360
- }
361
-
362
- return str;
363
- }
364
-
365
- function utf8Str2ArrayBuffer(str, returnUInt8Array) {
366
- var length = str.length,
367
- buff = new ArrayBuffer(length),
368
- arr = new Uint8Array(buff),
369
- i;
370
-
371
- for (i = 0; i < length; i += 1) {
372
- arr[i] = str.charCodeAt(i);
373
- }
374
-
375
- return returnUInt8Array ? arr : buff;
376
- }
377
-
378
- function arrayBuffer2Utf8Str(buff) {
379
- return String.fromCharCode.apply(null, new Uint8Array(buff));
380
- }
381
-
382
- function concatenateArrayBuffers(first, second, returnUInt8Array) {
383
- var result = new Uint8Array(first.byteLength + second.byteLength);
384
-
385
- result.set(new Uint8Array(first));
386
- result.set(new Uint8Array(second), first.byteLength);
387
-
388
- return result ;
389
- }
390
-
391
- function hexToBinaryString(hex) {
392
- var bytes = [],
393
- length = hex.length,
394
- x;
395
-
396
- for (x = 0; x < length - 1; x += 2) {
397
- bytes.push(parseInt(hex.substr(x, 2), 16));
398
- }
399
-
400
- return String.fromCharCode.apply(String, bytes);
401
- }
402
-
403
- // ---------------------------------------------------
404
-
405
- /**
406
- * SparkMD5 OOP implementation.
407
- *
408
- * Use this class to perform an incremental md5, otherwise use the
409
- * static methods instead.
410
- */
411
-
412
- function SparkMD5() {
413
- // call reset to init the instance
414
- this.reset();
415
- }
416
-
417
- /**
418
- * Appends a string.
419
- * A conversion will be applied if an utf8 string is detected.
420
- *
421
- * @param {String} str The string to be appended
422
- *
423
- * @return {SparkMD5} The instance itself
424
- */
425
- SparkMD5.prototype.append = function (str) {
426
- // Converts the string to utf8 bytes if necessary
427
- // Then append as binary
428
- this.appendBinary(toUtf8(str));
429
-
430
- return this;
431
- };
432
-
433
- /**
434
- * Appends a binary string.
435
- *
436
- * @param {String} contents The binary string to be appended
437
- *
438
- * @return {SparkMD5} The instance itself
439
- */
440
- SparkMD5.prototype.appendBinary = function (contents) {
441
- this._buff += contents;
442
- this._length += contents.length;
443
-
444
- var length = this._buff.length,
445
- i;
446
-
447
- for (i = 64; i <= length; i += 64) {
448
- md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
449
- }
450
-
451
- this._buff = this._buff.substring(i - 64);
452
-
453
- return this;
454
- };
455
-
456
- /**
457
- * Finishes the incremental computation, reseting the internal state and
458
- * returning the result.
459
- *
460
- * @param {Boolean} raw True to get the raw string, false to get the hex string
461
- *
462
- * @return {String} The result
463
- */
464
- SparkMD5.prototype.end = function (raw) {
465
- var buff = this._buff,
466
- length = buff.length,
467
- i,
468
- tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
469
- ret;
470
-
471
- for (i = 0; i < length; i += 1) {
472
- tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
473
- }
474
-
475
- this._finish(tail, length);
476
- ret = hex(this._hash);
477
-
478
- if (raw) {
479
- ret = hexToBinaryString(ret);
480
- }
481
-
482
- this.reset();
483
-
484
- return ret;
485
- };
486
-
487
- /**
488
- * Resets the internal state of the computation.
489
- *
490
- * @return {SparkMD5} The instance itself
491
- */
492
- SparkMD5.prototype.reset = function () {
493
- this._buff = '';
494
- this._length = 0;
495
- this._hash = [1732584193, -271733879, -1732584194, 271733878];
496
-
497
- return this;
498
- };
499
-
500
- /**
501
- * Gets the internal state of the computation.
502
- *
503
- * @return {Object} The state
504
- */
505
- SparkMD5.prototype.getState = function () {
506
- return {
507
- buff: this._buff,
508
- length: this._length,
509
- hash: this._hash.slice()
510
- };
511
- };
512
-
513
- /**
514
- * Gets the internal state of the computation.
515
- *
516
- * @param {Object} state The state
517
- *
518
- * @return {SparkMD5} The instance itself
519
- */
520
- SparkMD5.prototype.setState = function (state) {
521
- this._buff = state.buff;
522
- this._length = state.length;
523
- this._hash = state.hash;
524
-
525
- return this;
526
- };
527
-
528
- /**
529
- * Releases memory used by the incremental buffer and other additional
530
- * resources. If you plan to use the instance again, use reset instead.
531
- */
532
- SparkMD5.prototype.destroy = function () {
533
- delete this._hash;
534
- delete this._buff;
535
- delete this._length;
536
- };
537
-
538
- /**
539
- * Finish the final calculation based on the tail.
540
- *
541
- * @param {Array} tail The tail (will be modified)
542
- * @param {Number} length The length of the remaining buffer
543
- */
544
- SparkMD5.prototype._finish = function (tail, length) {
545
- var i = length,
546
- tmp,
547
- lo,
548
- hi;
549
-
550
- tail[i >> 2] |= 0x80 << ((i % 4) << 3);
551
- if (i > 55) {
552
- md5cycle(this._hash, tail);
553
- for (i = 0; i < 16; i += 1) {
554
- tail[i] = 0;
555
- }
556
- }
557
-
558
- // Do the final computation based on the tail and length
559
- // Beware that the final length may not fit in 32 bits so we take care of that
560
- tmp = this._length * 8;
561
- tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
562
- lo = parseInt(tmp[2], 16);
563
- hi = parseInt(tmp[1], 16) || 0;
564
-
565
- tail[14] = lo;
566
- tail[15] = hi;
567
- md5cycle(this._hash, tail);
568
- };
569
-
570
- /**
571
- * Performs the md5 hash on a string.
572
- * A conversion will be applied if utf8 string is detected.
573
- *
574
- * @param {String} str The string
575
- * @param {Boolean} [raw] True to get the raw string, false to get the hex string
576
- *
577
- * @return {String} The result
578
- */
579
- SparkMD5.hash = function (str, raw) {
580
- // Converts the string to utf8 bytes if necessary
581
- // Then compute it using the binary function
582
- return SparkMD5.hashBinary(toUtf8(str), raw);
583
- };
584
-
585
- /**
586
- * Performs the md5 hash on a binary string.
587
- *
588
- * @param {String} content The binary string
589
- * @param {Boolean} [raw] True to get the raw string, false to get the hex string
590
- *
591
- * @return {String} The result
592
- */
593
- SparkMD5.hashBinary = function (content, raw) {
594
- var hash = md51(content),
595
- ret = hex(hash);
596
-
597
- return raw ? hexToBinaryString(ret) : ret;
598
- };
599
-
600
- // ---------------------------------------------------
601
-
602
- /**
603
- * SparkMD5 OOP implementation for array buffers.
604
- *
605
- * Use this class to perform an incremental md5 ONLY for array buffers.
606
- */
607
- SparkMD5.ArrayBuffer = function () {
608
- // call reset to init the instance
609
- this.reset();
610
- };
611
-
612
- /**
613
- * Appends an array buffer.
614
- *
615
- * @param {ArrayBuffer} arr The array to be appended
616
- *
617
- * @return {SparkMD5.ArrayBuffer} The instance itself
618
- */
619
- SparkMD5.ArrayBuffer.prototype.append = function (arr) {
620
- var buff = concatenateArrayBuffers(this._buff.buffer, arr),
621
- length = buff.length,
622
- i;
623
-
624
- this._length += arr.byteLength;
625
-
626
- for (i = 64; i <= length; i += 64) {
627
- md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
628
- }
629
-
630
- this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
631
-
632
- return this;
633
- };
634
-
635
- /**
636
- * Finishes the incremental computation, reseting the internal state and
637
- * returning the result.
638
- *
639
- * @param {Boolean} raw True to get the raw string, false to get the hex string
640
- *
641
- * @return {String} The result
642
- */
643
- SparkMD5.ArrayBuffer.prototype.end = function (raw) {
644
- var buff = this._buff,
645
- length = buff.length,
646
- tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
647
- i,
648
- ret;
649
-
650
- for (i = 0; i < length; i += 1) {
651
- tail[i >> 2] |= buff[i] << ((i % 4) << 3);
652
- }
653
-
654
- this._finish(tail, length);
655
- ret = hex(this._hash);
656
-
657
- if (raw) {
658
- ret = hexToBinaryString(ret);
659
- }
660
-
661
- this.reset();
662
-
663
- return ret;
664
- };
665
-
666
- /**
667
- * Resets the internal state of the computation.
668
- *
669
- * @return {SparkMD5.ArrayBuffer} The instance itself
670
- */
671
- SparkMD5.ArrayBuffer.prototype.reset = function () {
672
- this._buff = new Uint8Array(0);
673
- this._length = 0;
674
- this._hash = [1732584193, -271733879, -1732584194, 271733878];
675
-
676
- return this;
677
- };
678
-
679
- /**
680
- * Gets the internal state of the computation.
681
- *
682
- * @return {Object} The state
683
- */
684
- SparkMD5.ArrayBuffer.prototype.getState = function () {
685
- var state = SparkMD5.prototype.getState.call(this);
686
-
687
- // Convert buffer to a string
688
- state.buff = arrayBuffer2Utf8Str(state.buff);
689
-
690
- return state;
691
- };
692
-
693
- /**
694
- * Gets the internal state of the computation.
695
- *
696
- * @param {Object} state The state
697
- *
698
- * @return {SparkMD5.ArrayBuffer} The instance itself
699
- */
700
- SparkMD5.ArrayBuffer.prototype.setState = function (state) {
701
- // Convert string to buffer
702
- state.buff = utf8Str2ArrayBuffer(state.buff, true);
703
-
704
- return SparkMD5.prototype.setState.call(this, state);
705
- };
706
-
707
- SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
708
-
709
- SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
710
-
711
- /**
712
- * Performs the md5 hash on an array buffer.
713
- *
714
- * @param {ArrayBuffer} arr The array buffer
715
- * @param {Boolean} [raw] True to get the raw string, false to get the hex one
716
- *
717
- * @return {String} The result
718
- */
719
- SparkMD5.ArrayBuffer.hash = function (arr, raw) {
720
- var hash = md51_array(new Uint8Array(arr)),
721
- ret = hex(hash);
722
-
723
- return raw ? hexToBinaryString(ret) : ret;
724
- };
725
-
726
- return SparkMD5;
727
- }));
728
- } (sparkMd5));
729
-
730
- var sparkMd5Exports = sparkMd5.exports;
731
- var SparkMD5 = /*@__PURE__*/getDefaultExportFromCjs(sparkMd5Exports);
732
-
733
- function createFileChunk(file, size) {
734
- const chunks = [];
735
- let cur = 0;
736
- const intSize = parseInt(size + "");
737
- while (cur < file.size) {
738
- chunks.push(file.slice(cur, cur + intSize));
739
- cur += intSize;
740
- }
741
- return chunks;
4
+ var v = { exports: {} };
5
+ (function(u, B) {
6
+ (function(y) {
7
+ u.exports = y();
8
+ })(function(y) {
9
+ var p = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
10
+ function o(i, f) {
11
+ var r = i[0], t = i[1], n = i[2], e = i[3];
12
+ r += (t & n | ~t & e) + f[0] - 680876936 | 0, r = (r << 7 | r >>> 25) + t | 0, e += (r & t | ~r & n) + f[1] - 389564586 | 0, e = (e << 12 | e >>> 20) + r | 0, n += (e & r | ~e & t) + f[2] + 606105819 | 0, n = (n << 17 | n >>> 15) + e | 0, t += (n & e | ~n & r) + f[3] - 1044525330 | 0, t = (t << 22 | t >>> 10) + n | 0, r += (t & n | ~t & e) + f[4] - 176418897 | 0, r = (r << 7 | r >>> 25) + t | 0, e += (r & t | ~r & n) + f[5] + 1200080426 | 0, e = (e << 12 | e >>> 20) + r | 0, n += (e & r | ~e & t) + f[6] - 1473231341 | 0, n = (n << 17 | n >>> 15) + e | 0, t += (n & e | ~n & r) + f[7] - 45705983 | 0, t = (t << 22 | t >>> 10) + n | 0, r += (t & n | ~t & e) + f[8] + 1770035416 | 0, r = (r << 7 | r >>> 25) + t | 0, e += (r & t | ~r & n) + f[9] - 1958414417 | 0, e = (e << 12 | e >>> 20) + r | 0, n += (e & r | ~e & t) + f[10] - 42063 | 0, n = (n << 17 | n >>> 15) + e | 0, t += (n & e | ~n & r) + f[11] - 1990404162 | 0, t = (t << 22 | t >>> 10) + n | 0, r += (t & n | ~t & e) + f[12] + 1804603682 | 0, r = (r << 7 | r >>> 25) + t | 0, e += (r & t | ~r & n) + f[13] - 40341101 | 0, e = (e << 12 | e >>> 20) + r | 0, n += (e & r | ~e & t) + f[14] - 1502002290 | 0, n = (n << 17 | n >>> 15) + e | 0, t += (n & e | ~n & r) + f[15] + 1236535329 | 0, t = (t << 22 | t >>> 10) + n | 0, r += (t & e | n & ~e) + f[1] - 165796510 | 0, r = (r << 5 | r >>> 27) + t | 0, e += (r & n | t & ~n) + f[6] - 1069501632 | 0, e = (e << 9 | e >>> 23) + r | 0, n += (e & t | r & ~t) + f[11] + 643717713 | 0, n = (n << 14 | n >>> 18) + e | 0, t += (n & r | e & ~r) + f[0] - 373897302 | 0, t = (t << 20 | t >>> 12) + n | 0, r += (t & e | n & ~e) + f[5] - 701558691 | 0, r = (r << 5 | r >>> 27) + t | 0, e += (r & n | t & ~n) + f[10] + 38016083 | 0, e = (e << 9 | e >>> 23) + r | 0, n += (e & t | r & ~t) + f[15] - 660478335 | 0, n = (n << 14 | n >>> 18) + e | 0, t += (n & r | e & ~r) + f[4] - 405537848 | 0, t = (t << 20 | t >>> 12) + n | 0, r += (t & e | n & ~e) + f[9] + 568446438 | 0, r = (r << 5 | r >>> 27) + t | 0, e += (r & n | t & ~n) + f[14] - 1019803690 | 0, e = (e << 9 | e >>> 23) + r | 0, n += (e & t | r & ~t) + f[3] - 187363961 | 0, n = (n << 14 | n >>> 18) + e | 0, t += (n & r | e & ~r) + f[8] + 1163531501 | 0, t = (t << 20 | t >>> 12) + n | 0, r += (t & e | n & ~e) + f[13] - 1444681467 | 0, r = (r << 5 | r >>> 27) + t | 0, e += (r & n | t & ~n) + f[2] - 51403784 | 0, e = (e << 9 | e >>> 23) + r | 0, n += (e & t | r & ~t) + f[7] + 1735328473 | 0, n = (n << 14 | n >>> 18) + e | 0, t += (n & r | e & ~r) + f[12] - 1926607734 | 0, t = (t << 20 | t >>> 12) + n | 0, r += (t ^ n ^ e) + f[5] - 378558 | 0, r = (r << 4 | r >>> 28) + t | 0, e += (r ^ t ^ n) + f[8] - 2022574463 | 0, e = (e << 11 | e >>> 21) + r | 0, n += (e ^ r ^ t) + f[11] + 1839030562 | 0, n = (n << 16 | n >>> 16) + e | 0, t += (n ^ e ^ r) + f[14] - 35309556 | 0, t = (t << 23 | t >>> 9) + n | 0, r += (t ^ n ^ e) + f[1] - 1530992060 | 0, r = (r << 4 | r >>> 28) + t | 0, e += (r ^ t ^ n) + f[4] + 1272893353 | 0, e = (e << 11 | e >>> 21) + r | 0, n += (e ^ r ^ t) + f[7] - 155497632 | 0, n = (n << 16 | n >>> 16) + e | 0, t += (n ^ e ^ r) + f[10] - 1094730640 | 0, t = (t << 23 | t >>> 9) + n | 0, r += (t ^ n ^ e) + f[13] + 681279174 | 0, r = (r << 4 | r >>> 28) + t | 0, e += (r ^ t ^ n) + f[0] - 358537222 | 0, e = (e << 11 | e >>> 21) + r | 0, n += (e ^ r ^ t) + f[3] - 722521979 | 0, n = (n << 16 | n >>> 16) + e | 0, t += (n ^ e ^ r) + f[6] + 76029189 | 0, t = (t << 23 | t >>> 9) + n | 0, r += (t ^ n ^ e) + f[9] - 640364487 | 0, r = (r << 4 | r >>> 28) + t | 0, e += (r ^ t ^ n) + f[12] - 421815835 | 0, e = (e << 11 | e >>> 21) + r | 0, n += (e ^ r ^ t) + f[15] + 530742520 | 0, n = (n << 16 | n >>> 16) + e | 0, t += (n ^ e ^ r) + f[2] - 995338651 | 0, t = (t << 23 | t >>> 9) + n | 0, r += (n ^ (t | ~e)) + f[0] - 198630844 | 0, r = (r << 6 | r >>> 26) + t | 0, e += (t ^ (r | ~n)) + f[7] + 1126891415 | 0, e = (e << 10 | e >>> 22) + r | 0, n += (r ^ (e | ~t)) + f[14] - 1416354905 | 0, n = (n << 15 | n >>> 17) + e | 0, t += (e ^ (n | ~r)) + f[5] - 57434055 | 0, t = (t << 21 | t >>> 11) + n | 0, r += (n ^ (t | ~e)) + f[12] + 1700485571 | 0, r = (r << 6 | r >>> 26) + t | 0, e += (t ^ (r | ~n)) + f[3] - 1894986606 | 0, e = (e << 10 | e >>> 22) + r | 0, n += (r ^ (e | ~t)) + f[10] - 1051523 | 0, n = (n << 15 | n >>> 17) + e | 0, t += (e ^ (n | ~r)) + f[1] - 2054922799 | 0, t = (t << 21 | t >>> 11) + n | 0, r += (n ^ (t | ~e)) + f[8] + 1873313359 | 0, r = (r << 6 | r >>> 26) + t | 0, e += (t ^ (r | ~n)) + f[15] - 30611744 | 0, e = (e << 10 | e >>> 22) + r | 0, n += (r ^ (e | ~t)) + f[6] - 1560198380 | 0, n = (n << 15 | n >>> 17) + e | 0, t += (e ^ (n | ~r)) + f[13] + 1309151649 | 0, t = (t << 21 | t >>> 11) + n | 0, r += (n ^ (t | ~e)) + f[4] - 145523070 | 0, r = (r << 6 | r >>> 26) + t | 0, e += (t ^ (r | ~n)) + f[11] - 1120210379 | 0, e = (e << 10 | e >>> 22) + r | 0, n += (r ^ (e | ~t)) + f[2] + 718787259 | 0, n = (n << 15 | n >>> 17) + e | 0, t += (e ^ (n | ~r)) + f[9] - 343485551 | 0, t = (t << 21 | t >>> 11) + n | 0, i[0] = r + i[0] | 0, i[1] = t + i[1] | 0, i[2] = n + i[2] | 0, i[3] = e + i[3] | 0;
13
+ }
14
+ function c(i) {
15
+ var f = [], r;
16
+ for (r = 0; r < 64; r += 4)
17
+ f[r >> 2] = i.charCodeAt(r) + (i.charCodeAt(r + 1) << 8) + (i.charCodeAt(r + 2) << 16) + (i.charCodeAt(r + 3) << 24);
18
+ return f;
19
+ }
20
+ function g(i) {
21
+ var f = [], r;
22
+ for (r = 0; r < 64; r += 4)
23
+ f[r >> 2] = i[r] + (i[r + 1] << 8) + (i[r + 2] << 16) + (i[r + 3] << 24);
24
+ return f;
25
+ }
26
+ function a(i) {
27
+ var f = i.length, r = [1732584193, -271733879, -1732584194, 271733878], t, n, e, s, l, b;
28
+ for (t = 64; t <= f; t += 64)
29
+ o(r, c(i.substring(t - 64, t)));
30
+ for (i = i.substring(t - 64), n = i.length, e = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; t < n; t += 1)
31
+ e[t >> 2] |= i.charCodeAt(t) << (t % 4 << 3);
32
+ if (e[t >> 2] |= 128 << (t % 4 << 3), t > 55)
33
+ for (o(r, e), t = 0; t < 16; t += 1)
34
+ e[t] = 0;
35
+ return s = f * 8, s = s.toString(16).match(/(.*?)(.{0,8})$/), l = parseInt(s[2], 16), b = parseInt(s[1], 16) || 0, e[14] = l, e[15] = b, o(r, e), r;
36
+ }
37
+ function _(i) {
38
+ var f = i.length, r = [1732584193, -271733879, -1732584194, 271733878], t, n, e, s, l, b;
39
+ for (t = 64; t <= f; t += 64)
40
+ o(r, g(i.subarray(t - 64, t)));
41
+ for (i = t - 64 < f ? i.subarray(t - 64) : new Uint8Array(0), n = i.length, e = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; t < n; t += 1)
42
+ e[t >> 2] |= i[t] << (t % 4 << 3);
43
+ if (e[t >> 2] |= 128 << (t % 4 << 3), t > 55)
44
+ for (o(r, e), t = 0; t < 16; t += 1)
45
+ e[t] = 0;
46
+ return s = f * 8, s = s.toString(16).match(/(.*?)(.{0,8})$/), l = parseInt(s[2], 16), b = parseInt(s[1], 16) || 0, e[14] = l, e[15] = b, o(r, e), r;
47
+ }
48
+ function d(i) {
49
+ var f = "", r;
50
+ for (r = 0; r < 4; r += 1)
51
+ f += p[i >> r * 8 + 4 & 15] + p[i >> r * 8 & 15];
52
+ return f;
53
+ }
54
+ function A(i) {
55
+ var f;
56
+ for (f = 0; f < i.length; f += 1)
57
+ i[f] = d(i[f]);
58
+ return i.join("");
59
+ }
60
+ A(a("hello")), typeof ArrayBuffer < "u" && !ArrayBuffer.prototype.slice && function() {
61
+ function i(f, r) {
62
+ return f = f | 0 || 0, f < 0 ? Math.max(f + r, 0) : Math.min(f, r);
63
+ }
64
+ ArrayBuffer.prototype.slice = function(f, r) {
65
+ var t = this.byteLength, n = i(f, t), e = t, s, l, b, S;
66
+ return r !== y && (e = i(r, t)), n > e ? new ArrayBuffer(0) : (s = e - n, l = new ArrayBuffer(s), b = new Uint8Array(l), S = new Uint8Array(this, n, s), b.set(S), l);
67
+ };
68
+ }();
69
+ function w(i) {
70
+ return /[\u0080-\uFFFF]/.test(i) && (i = unescape(encodeURIComponent(i))), i;
71
+ }
72
+ function U(i, f) {
73
+ var r = i.length, t = new ArrayBuffer(r), n = new Uint8Array(t), e;
74
+ for (e = 0; e < r; e += 1)
75
+ n[e] = i.charCodeAt(e);
76
+ return f ? n : t;
77
+ }
78
+ function C(i) {
79
+ return String.fromCharCode.apply(null, new Uint8Array(i));
80
+ }
81
+ function F(i, f, r) {
82
+ var t = new Uint8Array(i.byteLength + f.byteLength);
83
+ return t.set(new Uint8Array(i)), t.set(new Uint8Array(f), i.byteLength), t;
84
+ }
85
+ function m(i) {
86
+ var f = [], r = i.length, t;
87
+ for (t = 0; t < r - 1; t += 2)
88
+ f.push(parseInt(i.substr(t, 2), 16));
89
+ return String.fromCharCode.apply(String, f);
90
+ }
91
+ function h() {
92
+ this.reset();
93
+ }
94
+ return h.prototype.append = function(i) {
95
+ return this.appendBinary(w(i)), this;
96
+ }, h.prototype.appendBinary = function(i) {
97
+ this._buff += i, this._length += i.length;
98
+ var f = this._buff.length, r;
99
+ for (r = 64; r <= f; r += 64)
100
+ o(this._hash, c(this._buff.substring(r - 64, r)));
101
+ return this._buff = this._buff.substring(r - 64), this;
102
+ }, h.prototype.end = function(i) {
103
+ var f = this._buff, r = f.length, t, n = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], e;
104
+ for (t = 0; t < r; t += 1)
105
+ n[t >> 2] |= f.charCodeAt(t) << (t % 4 << 3);
106
+ return this._finish(n, r), e = A(this._hash), i && (e = m(e)), this.reset(), e;
107
+ }, h.prototype.reset = function() {
108
+ return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
109
+ }, h.prototype.getState = function() {
110
+ return {
111
+ buff: this._buff,
112
+ length: this._length,
113
+ hash: this._hash.slice()
114
+ };
115
+ }, h.prototype.setState = function(i) {
116
+ return this._buff = i.buff, this._length = i.length, this._hash = i.hash, this;
117
+ }, h.prototype.destroy = function() {
118
+ delete this._hash, delete this._buff, delete this._length;
119
+ }, h.prototype._finish = function(i, f) {
120
+ var r = f, t, n, e;
121
+ if (i[r >> 2] |= 128 << (r % 4 << 3), r > 55)
122
+ for (o(this._hash, i), r = 0; r < 16; r += 1)
123
+ i[r] = 0;
124
+ t = this._length * 8, t = t.toString(16).match(/(.*?)(.{0,8})$/), n = parseInt(t[2], 16), e = parseInt(t[1], 16) || 0, i[14] = n, i[15] = e, o(this._hash, i);
125
+ }, h.hash = function(i, f) {
126
+ return h.hashBinary(w(i), f);
127
+ }, h.hashBinary = function(i, f) {
128
+ var r = a(i), t = A(r);
129
+ return f ? m(t) : t;
130
+ }, h.ArrayBuffer = function() {
131
+ this.reset();
132
+ }, h.ArrayBuffer.prototype.append = function(i) {
133
+ var f = F(this._buff.buffer, i), r = f.length, t;
134
+ for (this._length += i.byteLength, t = 64; t <= r; t += 64)
135
+ o(this._hash, g(f.subarray(t - 64, t)));
136
+ return this._buff = t - 64 < r ? new Uint8Array(f.buffer.slice(t - 64)) : new Uint8Array(0), this;
137
+ }, h.ArrayBuffer.prototype.end = function(i) {
138
+ var f = this._buff, r = f.length, t = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], n, e;
139
+ for (n = 0; n < r; n += 1)
140
+ t[n >> 2] |= f[n] << (n % 4 << 3);
141
+ return this._finish(t, r), e = A(this._hash), i && (e = m(e)), this.reset(), e;
142
+ }, h.ArrayBuffer.prototype.reset = function() {
143
+ return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
144
+ }, h.ArrayBuffer.prototype.getState = function() {
145
+ var i = h.prototype.getState.call(this);
146
+ return i.buff = C(i.buff), i;
147
+ }, h.ArrayBuffer.prototype.setState = function(i) {
148
+ return i.buff = U(i.buff, !0), h.prototype.setState.call(this, i);
149
+ }, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(i, f) {
150
+ var r = _(new Uint8Array(i)), t = A(r);
151
+ return f ? m(t) : t;
152
+ }, h;
153
+ });
154
+ })(v);
155
+ var M = v.exports;
156
+ const L = /* @__PURE__ */ I(M);
157
+ function j(u, B) {
158
+ const y = [];
159
+ let p = 0;
160
+ const o = parseInt(B + "");
161
+ for (; p < u.size; )
162
+ y.push(u.slice(p, p + o)), p += o;
163
+ return y;
742
164
  }
743
- function calculateFileHashSample(file) {
744
- return new Promise((resolve) => {
745
- const spark = new SparkMD5.ArrayBuffer();
746
- const reader = new FileReader();
747
- const size = file.size;
748
- const offset = 2 * 1024 * 1024;
749
- const chunks = [file.slice(0, offset)];
750
- let cur = offset;
751
- while (cur < size) {
752
- if (cur + offset >= size) {
753
- chunks.push(file.slice(cur, cur + offset));
754
- } else {
755
- const mid = cur + offset / 2;
756
- const end = cur + offset;
757
- chunks.push(file.slice(cur, cur + 2));
758
- chunks.push(file.slice(mid, mid + 2));
759
- chunks.push(file.slice(end - 2, end));
165
+ function z(u) {
166
+ return new Promise((B) => {
167
+ const y = new L.ArrayBuffer(), p = new FileReader(), o = u.size, c = 2 * 1024 * 1024, g = [u.slice(0, c)];
168
+ let a = c;
169
+ for (; a < o; ) {
170
+ if (a + c >= o)
171
+ g.push(u.slice(a, a + c));
172
+ else {
173
+ const _ = a + c / 2, d = a + c;
174
+ g.push(u.slice(a, a + 2)), g.push(u.slice(_, _ + 2)), g.push(u.slice(d - 2, d));
760
175
  }
761
- cur += offset;
176
+ a += c;
762
177
  }
763
- reader.readAsArrayBuffer(new Blob(chunks));
764
- reader.onload = (e) => {
765
- spark.append(e.target?.result);
766
- resolve(spark.end());
178
+ p.readAsArrayBuffer(new Blob(g)), p.onload = (_) => {
179
+ var d;
180
+ y.append((d = _.target) == null ? void 0 : d.result), B(y.end());
767
181
  };
768
182
  });
769
183
  }
770
-
771
- export { calculateFileHashSample, createFileChunk };
184
+ export {
185
+ z as calculateFileHashSample,
186
+ j as createFileChunk
187
+ };