eoss 0.1.0-alpha.41 → 0.1.0-alpha.43

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 (358) hide show
  1. package/lib/0.js +1 -1
  2. package/lib/1.js +1 -1
  3. package/lib/10.js +1 -1
  4. package/lib/11.js +1 -1
  5. package/lib/12.js +1 -1
  6. package/lib/13.js +1 -1
  7. package/lib/14.js +1 -1
  8. package/lib/15.js +1 -1
  9. package/lib/16.js +1 -1
  10. package/lib/17.js +1 -1
  11. package/lib/18.js +1 -1
  12. package/lib/19.js +1 -1
  13. package/lib/20.js +1 -1
  14. package/lib/21.js +1 -1
  15. package/lib/22.js +1 -1
  16. package/lib/23.js +1 -1
  17. package/lib/24.js +1 -1
  18. package/lib/25.js +1 -1
  19. package/lib/26.js +1 -1
  20. package/lib/27.js +1 -1
  21. package/lib/28.js +1 -1
  22. package/lib/29.js +1 -1
  23. package/lib/3.js +1 -1
  24. package/lib/30.js +1 -1
  25. package/lib/31.js +1 -1
  26. package/lib/32.js +1 -1
  27. package/lib/33.js +1 -1
  28. package/lib/34.js +1 -1
  29. package/lib/35.js +1 -1
  30. package/lib/36.js +1 -1
  31. package/lib/37.js +1 -1
  32. package/lib/38.js +1 -1
  33. package/lib/39.js +1 -1
  34. package/lib/4.js +1 -1
  35. package/lib/40.js +1 -1
  36. package/lib/41.js +1 -1
  37. package/lib/42.js +1 -1
  38. package/lib/43.js +1 -1
  39. package/lib/44.js +1 -1
  40. package/lib/45.js +1 -1
  41. package/lib/46.js +1 -1
  42. package/lib/47.js +1 -1
  43. package/lib/48.js +1 -1
  44. package/lib/49.js +1 -1
  45. package/lib/5.js +1 -1
  46. package/lib/50.js +1 -1
  47. package/lib/51.js +1 -1
  48. package/lib/52.js +1 -1
  49. package/lib/53.js +1 -1
  50. package/lib/54.js +1 -1
  51. package/lib/55.js +1 -1
  52. package/lib/56.js +1 -1
  53. package/lib/57.js +1 -1
  54. package/lib/58.js +1 -1
  55. package/lib/59.js +1 -1
  56. package/lib/6.js +1 -1
  57. package/lib/60.js +1 -1
  58. package/lib/61.js +1 -1
  59. package/lib/62.js +1 -1
  60. package/lib/63.js +1 -1
  61. package/lib/64.js +1 -1
  62. package/lib/65.js +1 -1
  63. package/lib/66.js +1 -1
  64. package/lib/67.js +1 -1
  65. package/lib/68.js +1 -1
  66. package/lib/69.js +1 -1
  67. package/lib/7.js +1 -1
  68. package/lib/70.js +1 -1
  69. package/lib/71.js +1 -1
  70. package/lib/72.js +1 -1
  71. package/lib/73.js +1 -1
  72. package/lib/74.js +1 -1
  73. package/lib/75.js +1 -1
  74. package/lib/76.js +1 -1
  75. package/lib/77.js +1 -1
  76. package/lib/78.js +1 -1
  77. package/lib/79.js +1 -1
  78. package/lib/8.js +1 -1
  79. package/lib/80.js +1 -1
  80. package/lib/81.js +1 -1
  81. package/lib/9.js +1 -1
  82. package/lib/account-login.js +1446 -1354
  83. package/lib/alert.js +2 -2
  84. package/lib/aside.js +2 -2
  85. package/lib/audit-trajectory.js +183 -160
  86. package/lib/autocomplete.js +2852 -2583
  87. package/lib/avatar.js +2 -2
  88. package/lib/backtop.js +4 -4
  89. package/lib/badge.js +2 -2
  90. package/lib/breadcrumb-item.js +4 -4
  91. package/lib/breadcrumb.js +4 -4
  92. package/lib/button-group.js +4 -4
  93. package/lib/button.js +2 -2
  94. package/lib/ca-login.js +1216 -1147
  95. package/lib/calendar.js +864 -839
  96. package/lib/card.js +2 -2
  97. package/lib/carousel-item.js +1199 -1130
  98. package/lib/carousel.js +1201 -1132
  99. package/lib/cascader-panel.js +1286 -1170
  100. package/lib/cascader.js +3309 -2976
  101. package/lib/checkbox-button.js +4 -4
  102. package/lib/checkbox-group.js +1670 -1388
  103. package/lib/checkbox.js +9 -7
  104. package/lib/code-editor.js +4 -4
  105. package/lib/col.js +2 -2
  106. package/lib/collapse-item.js +1258 -1191
  107. package/lib/collapse.js +1251 -1184
  108. package/lib/color-picker.js +1506 -1329
  109. package/lib/config/api.js +17 -1
  110. package/lib/container.js +2 -2
  111. package/lib/cron.js +22 -22
  112. package/lib/data-table.js +1677 -1359
  113. package/lib/date-picker.js +2707 -2466
  114. package/lib/descriptions-item.js +4 -4
  115. package/lib/descriptions.js +4 -4
  116. package/lib/dialog.js +1213 -1144
  117. package/lib/divider.js +2 -2
  118. package/lib/drawer.js +9 -9
  119. package/lib/dropdown-item.js +6 -6
  120. package/lib/dropdown-menu.js +1415 -1265
  121. package/lib/dropdown.js +1219 -1150
  122. package/lib/email-login.js +1446 -1354
  123. package/lib/empty.js +2 -2
  124. package/lib/eoss.common.js +31462 -18205
  125. package/lib/flip.js +2 -2
  126. package/lib/flow-group.js +4578 -3381
  127. package/lib/flow-list.js +9566 -0
  128. package/lib/flow.js +19284 -10275
  129. package/lib/flows.js +1483 -1391
  130. package/lib/footer.js +2 -2
  131. package/lib/form-editor.js +2825 -2035
  132. package/lib/form-item.js +1368 -1192
  133. package/lib/form.js +2297 -2036
  134. package/lib/guide.js +2 -2
  135. package/lib/header.js +2 -2
  136. package/lib/icon.js +1384 -1292
  137. package/lib/icons.js +145 -99
  138. package/lib/image-viewer.js +1204 -1135
  139. package/lib/image.js +6 -6
  140. package/lib/index.js +1 -1
  141. package/lib/infinite-scroll.js +4 -4
  142. package/lib/input-number.js +169 -122
  143. package/lib/input.js +1399 -1325
  144. package/lib/link.js +2 -2
  145. package/lib/loading.js +11 -11
  146. package/lib/login.js +1486 -1389
  147. package/lib/lowcode-view.js +1618 -1526
  148. package/lib/lowcode.js +1620 -1586
  149. package/lib/main.js +2062 -1982
  150. package/lib/marquee.js +1202 -1133
  151. package/lib/menu-item-group.js +8 -8
  152. package/lib/menu-item.js +6 -6
  153. package/lib/menu.js +2698 -2479
  154. package/lib/message-box.js +1893 -1824
  155. package/lib/message.js +1782 -1713
  156. package/lib/notification.js +1783 -1714
  157. package/lib/option-group.js +16 -7
  158. package/lib/option.js +1223 -1146
  159. package/lib/page-header.js +2 -2
  160. package/lib/pagination.js +1207 -1138
  161. package/lib/phone-login.js +1441 -1352
  162. package/lib/popconfirm.js +7 -7
  163. package/lib/popover.js +2668 -2449
  164. package/lib/process-config.js +1508 -1416
  165. package/lib/process-module.js +1453 -1361
  166. package/lib/process-rule.js +1473 -1381
  167. package/lib/progress.js +2 -2
  168. package/lib/qr-code.js +4 -4
  169. package/lib/qrcode-login.js +1434 -1342
  170. package/lib/radio-button.js +14 -7
  171. package/lib/radio-group.js +1696 -1383
  172. package/lib/radio.js +31 -9
  173. package/lib/rate.js +1286 -1182
  174. package/lib/retrial-auth.js +1444 -1352
  175. package/lib/row.js +2 -2
  176. package/lib/scrollbar.js +1205 -1136
  177. package/lib/select.js +4176 -3717
  178. package/lib/selector-panel.js +2081 -1623
  179. package/lib/selector.js +2582 -2468
  180. package/lib/slider.js +149 -109
  181. package/lib/step.js +28 -30
  182. package/lib/steps.js +2353 -2278
  183. package/lib/submenu.js +1399 -1249
  184. package/lib/switch.js +1337 -1217
  185. package/lib/tab-pane.js +4 -4
  186. package/lib/table-column.js +1208 -1139
  187. package/lib/table.js +3791 -3476
  188. package/lib/tabs.js +1202 -1133
  189. package/lib/tag.js +2 -2
  190. package/lib/theme-chalk/autocomplete.css +1 -1
  191. package/lib/theme-chalk/base.css +1 -1
  192. package/lib/theme-chalk/cascader.css +1 -1
  193. package/lib/theme-chalk/checkbox-group.css +1 -1
  194. package/lib/theme-chalk/collapse.css +1 -1
  195. package/lib/theme-chalk/date-picker.css +1 -1
  196. package/lib/theme-chalk/flow copy.css +1 -0
  197. package/lib/theme-chalk/flow-group.css +1 -1
  198. package/lib/theme-chalk/flow-list.css +1 -0
  199. package/lib/theme-chalk/flow.css +1 -1
  200. package/lib/theme-chalk/form-editor.css +1 -1
  201. package/lib/theme-chalk/form.css +1 -1
  202. package/lib/theme-chalk/icons.css +1 -1
  203. package/lib/theme-chalk/index.css +1 -1
  204. package/lib/theme-chalk/input-number.css +1 -1
  205. package/lib/theme-chalk/input.css +1 -1
  206. package/lib/theme-chalk/login.css +1 -1
  207. package/lib/theme-chalk/main.css +1 -1
  208. package/lib/theme-chalk/message-box.css +1 -1
  209. package/lib/theme-chalk/pagination.css +1 -1
  210. package/lib/theme-chalk/radio-group.css +1 -1
  211. package/lib/theme-chalk/retrial-auth.css +1 -1
  212. package/lib/theme-chalk/select.css +1 -1
  213. package/lib/theme-chalk/selector.css +1 -1
  214. package/lib/theme-chalk/slider.css +1 -1
  215. package/lib/theme-chalk/switch.css +1 -1
  216. package/lib/theme-chalk/tabs.css +1 -1
  217. package/lib/theme-chalk/time-picker.css +1 -1
  218. package/lib/theme-chalk/transfer.css +1 -1
  219. package/lib/time-picker.js +2294 -2097
  220. package/lib/time-select.js +2286 -2089
  221. package/lib/timeline-item.js +2 -2
  222. package/lib/timeline.js +2 -2
  223. package/lib/tips.js +1429 -1337
  224. package/lib/toolbar.js +71 -48
  225. package/lib/tooltip.js +3277 -3058
  226. package/lib/transfer.js +1351 -1230
  227. package/lib/tree-group.js +1405 -1313
  228. package/lib/tree.js +2214 -2122
  229. package/lib/update-history.js +184 -161
  230. package/lib/upload.js +2432 -2384
  231. package/lib/utils/label.js +56 -0
  232. package/lib/utils/util.js +43 -1
  233. package/lib/wujie.js +1204 -1135
  234. package/package.json +5 -1
  235. package/packages/autocomplete/src/autocomplete.vue +88 -55
  236. package/packages/cascader/src/cascader.vue +166 -99
  237. package/packages/cascader-panel/src/node.js +31 -16
  238. package/packages/cascader-panel/src/store.js +26 -12
  239. package/packages/checkbox/src/checkbox-group.vue +93 -1
  240. package/packages/checkbox/src/checkbox.vue +4 -1
  241. package/packages/color-picker/src/color-picker.vue +279 -261
  242. package/packages/data-table/src/data-table.vue +104 -12
  243. package/packages/data-table/src/mixins/table-methods.js +118 -0
  244. package/packages/date-picker/src/picker.vue +17 -1
  245. package/packages/dialog/src/dialog.vue +2 -2
  246. package/packages/flow/src/component/Circulate.vue +59 -93
  247. package/packages/flow/src/component/CommonOpinions.vue +390 -0
  248. package/packages/flow/src/component/CustomPreset.vue +18 -25
  249. package/packages/flow/src/component/FileList.vue +11 -28
  250. package/packages/flow/src/component/FreeCirculation.vue +48 -59
  251. package/packages/flow/src/component/Preset.vue +10 -25
  252. package/packages/flow/src/component/SendMsg.vue +22 -71
  253. package/packages/flow/src/component/SortFlow.vue +115 -0
  254. package/packages/flow/src/component/TimeLimit.vue +20 -36
  255. package/packages/flow/src/component/opinions.vue +160 -108
  256. package/packages/flow/src/component/taskUnionExamine.vue +143 -145
  257. package/packages/flow/src/flow.vue +4598 -0
  258. package/packages/flow/src/form.vue +14 -20
  259. package/packages/flow/src/freeStartFlow.vue +196 -222
  260. package/packages/flow/src/main.vue +877 -618
  261. package/packages/flow/src/processForm.vue +789 -177
  262. package/packages/flow/src/processReject.vue +87 -83
  263. package/packages/flow/src/reset.vue +71 -70
  264. package/packages/flow/src/selectUser.vue +94 -85
  265. package/packages/flow/src/startTaskRead.vue +150 -156
  266. package/packages/flow/src/supervise.vue +44 -64
  267. package/packages/flow/src/table.vue +2 -10
  268. package/packages/flow-group/src/attachment.js +78 -0
  269. package/packages/flow-group/src/flow-item.vue +250 -0
  270. package/packages/flow-group/src/main.vue +151 -416
  271. package/packages/flow-list/index.js +5 -0
  272. package/packages/flow-list/src/main.vue +2432 -0
  273. package/packages/flowOld/index.js +7 -0
  274. package/packages/flowOld/src/component/Circulate.vue +464 -0
  275. package/packages/flowOld/src/component/CustomPreset.vue +343 -0
  276. package/packages/flowOld/src/component/FileList.vue +117 -0
  277. package/packages/flowOld/src/component/FreeCirculation.vue +278 -0
  278. package/packages/flowOld/src/component/Preset.vue +283 -0
  279. package/packages/flowOld/src/component/SendMsg.vue +309 -0
  280. package/packages/flowOld/src/component/TimeLimit.vue +223 -0
  281. package/packages/flowOld/src/component/opinions-file.vue +126 -0
  282. package/packages/flowOld/src/component/opinions.vue +429 -0
  283. package/packages/flowOld/src/component/taskUnionExamine.vue +832 -0
  284. package/packages/flowOld/src/form.vue +134 -0
  285. package/packages/flowOld/src/freeStartFlow.vue +2945 -0
  286. package/packages/flowOld/src/main.vue +4141 -0
  287. package/packages/flowOld/src/processForm.vue +1431 -0
  288. package/packages/flowOld/src/processReject.vue +338 -0
  289. package/packages/flowOld/src/reset.vue +964 -0
  290. package/packages/flowOld/src/selectUser.vue +520 -0
  291. package/packages/flowOld/src/startTaskRead.vue +737 -0
  292. package/packages/flowOld/src/supervise.vue +197 -0
  293. package/packages/flowOld/src/table.vue +71 -0
  294. package/packages/form/src/collapse.vue +40 -59
  295. package/packages/form/src/form-item-render.vue +117 -13
  296. package/packages/form/src/form-item.vue +121 -22
  297. package/packages/form/src/form.vue +62 -59
  298. package/packages/form/src/label-wrap.vue +5 -4
  299. package/packages/form/src/steps.vue +5 -8
  300. package/packages/form-editor/src/components.js +1077 -145
  301. package/packages/form-editor/src/form-editor.vue +94 -80
  302. package/packages/form-editor/src/props-panel.vue +59 -12
  303. package/packages/icons/src/icons.vue +91 -51
  304. package/packages/input/src/input.vue +787 -783
  305. package/packages/input-number/src/input-number.vue +58 -39
  306. package/packages/login/src/login.vue +9 -1
  307. package/packages/lowcode/src/util/components.js +64 -149
  308. package/packages/main/src/components/pages.vue +6 -42
  309. package/packages/main/src/minxs.js +26 -14
  310. package/packages/pagination/src/pagination.js +4 -4
  311. package/packages/phone-login/src/phone-login.vue +1 -4
  312. package/packages/process-rule/src/main.vue +10 -10
  313. package/packages/radio/src/radio-button.vue +10 -1
  314. package/packages/radio/src/radio-group.vue +110 -1
  315. package/packages/radio/src/radio.vue +32 -4
  316. package/packages/rate/src/rate.vue +49 -26
  317. package/packages/retrial-auth/src/main.vue +12 -12
  318. package/packages/select/src/option-group.vue +9 -1
  319. package/packages/select/src/option.vue +9 -1
  320. package/packages/select/src/select.vue +286 -224
  321. package/packages/selector/src/selector.vue +93 -85
  322. package/packages/selector-panel/src/mixin.js +0 -1
  323. package/packages/selector-panel/src/selection.vue +16 -8
  324. package/packages/selector-panel/src/selector-panel.vue +30 -19
  325. package/packages/slider/src/slider.vue +90 -64
  326. package/packages/steps/src/steps.vue +8 -6
  327. package/packages/switch/src/switch.vue +81 -56
  328. package/packages/table/src/store/index.js +3 -3
  329. package/packages/table/src/table.vue +69 -6
  330. package/packages/theme-chalk/src/autocomplete.scss +1 -1
  331. package/packages/theme-chalk/src/base.scss +16 -0
  332. package/packages/theme-chalk/src/cascader.scss +2 -0
  333. package/packages/theme-chalk/src/checkbox-group.scss +2 -0
  334. package/packages/theme-chalk/src/collapse.scss +2 -6
  335. package/packages/theme-chalk/src/common/var.scss +2 -2
  336. package/packages/theme-chalk/src/flow copy.scss +664 -0
  337. package/packages/theme-chalk/src/flow-group.scss +9 -14
  338. package/packages/theme-chalk/src/flow-list.scss +61 -0
  339. package/packages/theme-chalk/src/flow.scss +244 -360
  340. package/packages/theme-chalk/src/form-editor.scss +14 -5
  341. package/packages/theme-chalk/src/form.scss +26 -2
  342. package/packages/theme-chalk/src/icons.scss +30 -24
  343. package/packages/theme-chalk/src/index.scss +1 -0
  344. package/packages/theme-chalk/src/input.scss +6 -0
  345. package/packages/theme-chalk/src/radio-group.scss +3 -2
  346. package/packages/theme-chalk/src/retrial-auth.scss +3 -3
  347. package/packages/theme-chalk/src/selector.scss +14 -1
  348. package/packages/theme-chalk/src/switch.scss +1 -1
  349. package/packages/theme-chalk/src/tabs.scss +2 -5
  350. package/packages/toolbar/src/toolbar.vue +51 -18
  351. package/packages/transfer/src/transfer.vue +79 -40
  352. package/packages/upload/src/index.vue +1531 -1572
  353. package/packages/upload/src/upload.vue +0 -1
  354. package/src/components/field-render.vue +10 -7
  355. package/src/config/api.js +19 -0
  356. package/src/index.js +345 -342
  357. package/src/utils/label.js +53 -0
  358. package/src/utils/util.js +39 -0
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 218);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 222);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -91,348 +91,112 @@ module.exports =
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setStorage; });
95
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getStorage; });
96
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeStorage; });
97
- /* unused harmony export setCookie */
98
- /* unused harmony export getCookie */
99
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
100
-
101
- /**
102
- * setStorage
103
- * @desc:设置本地储存数据
104
- * @author huangbo
105
- * @date 2022年5月7日
106
- * @param {String|Object} [key] - 数据的名称或包含type、key、value的对象
107
- * @param {String} [value] - 数据的值(当第一个参数为字符串时使用)
108
- **/
109
- var setStorage = function setStorage(key, value) {
110
- // 解析参数,支持两种调用方式:setStorage(key, value) 和 setStorage({type, key, value})
111
- var type = void 0,
112
- finalKey = void 0,
113
- finalValue = void 0;
114
-
115
- if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object' && key !== null) {
116
- // 对象调用方式:setStorage({type, key, value})
117
- type = key.type;
118
- finalKey = key.key;
119
- finalValue = key.value;
120
- } else {
121
- // 字符串调用方式:setStorage(key, value)
122
- type = getStorage('storageType');
123
- finalKey = key;
124
- finalValue = value;
125
- }
126
-
127
- // 使用默认存储类型如果未指定
128
- type = type || getStorage('storageType');
129
-
130
- // 获取存储对象
131
- var storage = type === 'localStorage' ? localStorage : sessionStorage;
132
-
133
- // 处理不同类型的key
134
- if (typeof finalKey === 'string') {
135
- // 单个字符串key
136
- var storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
137
- storage.setItem(finalKey, storedValue);
138
- if (finalKey === 'token') {
139
- setCookie('token', storedValue);
140
- }
141
- } else if (Array.isArray(finalKey)) {
142
- // 数组key,为多个key设置同一个value
143
- var _storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
144
- for (var i = 0; i < finalKey.length; i++) {
145
- storage.setItem(finalKey[i], _storedValue);
146
- if (finalKey[i] === 'token') {
147
- setCookie('token', _storedValue);
148
- }
149
- }
150
- } else if ((typeof finalKey === 'undefined' ? 'undefined' : _typeof(finalKey)) === 'object' && finalKey !== null) {
151
- // 对象key,对象的属性名称作为key,属性值作为value
152
- for (var k in finalKey) {
153
- if (Object.prototype.hasOwnProperty.call(finalKey, k)) {
154
- var _storedValue2 = _typeof(finalKey[k]) === 'object' ? JSON.stringify(finalKey[k]) : finalKey[k];
155
- storage.setItem(k, _storedValue2);
156
- if (k === 'token') {
157
- setCookie('token', _storedValue2);
158
- }
159
- }
160
- }
161
- }
162
- };
163
-
164
- /**
165
- * getStorage
166
- * @desc:获取本地储存数据
167
- * @author huangbo
168
- * @date 2022年5月7日
169
- * @param {String} [key] - 获取的名称
170
- **/
171
- var getStorage = function getStorage(key) {
172
- if (key) {
173
- var res = sessionStorage.getItem(key) || localStorage.getItem(key);
174
- if (!res && key === 'token') {
175
- res = getCookie('token');
176
- }
177
- if (key === 'host' && !res) {
178
- res = '';
179
- }
180
- return res;
181
- }
182
- var defaults = {};
183
- var token = sessionStorage.getItem('token') || localStorage.getItem('token') || getCookie('token');
184
- var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || getCookie('ssId');
185
-
186
- var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || getCookie('deviceUnique');
187
- if (token) {
188
- defaults.Authorization = token;
189
- }
190
- if (ssId) {
191
- defaults.ssId = ssId;
192
- }
193
- if (deviceUnique) {
194
- defaults.deviceUnique = deviceUnique;
195
- }
196
- return defaults;
197
- };
198
-
199
- /**
200
- * removeStorage
201
- * @desc:删除本地储存数据
202
- * @author huangbo
203
- * @date 2022年5月7日
204
- * @param {String, Array} [key] - 获取的名称
205
- **/
206
- var removeStorage = function removeStorage(key) {
207
- if (Array.isArray(key)) {
208
- for (var i = 0; i < key.length; i++) {
209
- sessionStorage.removeItem(key[i]);
210
- localStorage.removeItem(key[i]);
211
- if (key[i] === 'token') {
212
- removeCookie('token');
213
- }
214
- }
215
- } else if (key) {
216
- sessionStorage.removeItem(key);
217
- localStorage.removeItem(key);
218
- if (key === 'token') {
219
- removeCookie('token');
220
- }
221
- } else {
222
- sessionStorage.clear();
223
- localStorage.clear();
224
- removeCookie('token');
225
- }
226
- };
227
-
228
- /**
229
- * setCookie
230
- * @desc 设置cookie
231
- * @author huangbo
232
- * @param {string} [name] cookie名称
233
- * @param {string} [value] cookie值
234
- * @param {boolean} [isSession] 是否是会话cookie
235
- **/
236
- var setCookie = function setCookie(name, value) {
237
- var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
238
- var time = arguments[3];
239
-
240
- try {
241
- var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
242
- ];
243
- // 会话/持久Cookie设置
244
- if (!isSession) {
245
- if (/MSIE|Trident/.test(navigator.userAgent)) {
246
- // IE使用expires
247
- var date = new Date();
248
- date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
249
- cookieParts.push('expires=' + date.toUTCString());
250
- } else {
251
- // 其他浏览器使用max-age
252
- cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
253
- }
254
- }
255
- // 内核兼容处理
256
- if (/MSIE|Trident/.test(navigator.userAgent)) {
257
- // IE特殊处理:添加P3P协议头
258
- cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
259
- } else {
260
- // 现代浏览器设置
261
- cookieParts.push('samesite=lax');
262
- if (window.location.protocol === 'https:') {
263
- cookieParts.push('secure');
264
- }
265
- }
266
-
267
- // 设置Cookie
268
- document.cookie = cookieParts.join('; ');
269
- return true;
270
- } catch (e) {
271
- console.error('Cookie设置失败:', e);
272
- return false;
273
- }
274
- };
275
-
276
- /**
277
- * getCookie
278
- * @desc 获取cookie中指定名称的值
279
- * @author huangbo
280
- * @param {string} [name] cookie名称
281
- **/
282
- var getCookie = function getCookie(name) {
283
- var cookies = document.cookie.split(';');
284
- for (var _iterator = cookies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
285
- var _ref;
286
-
287
- if (_isArray) {
288
- if (_i >= _iterator.length) break;
289
- _ref = _iterator[_i++];
290
- } else {
291
- _i = _iterator.next();
292
- if (_i.done) break;
293
- _ref = _i.value;
294
- }
295
-
296
- var cookie = _ref;
297
-
298
- var _cookie$trim$split = cookie.trim().split('='),
299
- cookieName = _cookie$trim$split[0],
300
- cookieValue = _cookie$trim$split[1];
301
-
302
- if (decodeURIComponent(cookieName) === name) {
303
- return decodeURIComponent(cookieValue);
304
- }
305
- }
306
- return null;
307
- };
308
-
309
- /**
310
- * removeCookie
311
- * @desc:删除cookie
312
- * @author huangbo
313
- * @date 2022年5月7日
314
- * @param {String, Array} [key] - 获取的名称
315
- **/
316
- var removeCookie = function removeCookie(key) {
317
- if (Array.isArray(key)) {
318
- for (var i = 0; i < key.length; i++) {
319
- document.cookie = encodeURIComponent(key[i]) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
320
- }
321
- } else {
322
- document.cookie = encodeURIComponent(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
323
- }
324
- };
325
-
326
- /***/ }),
327
-
328
- /***/ 1:
329
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
330
-
331
- "use strict";
332
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return noop; });
333
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return hasOwn; });
334
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return toObject; });
335
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getValueByPath; });
336
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getPropByPath; });
337
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return generateId; });
338
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return valueEquals; });
339
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return escapeRegexpString; });
94
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return noop; });
95
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return hasOwn; });
96
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return toObject; });
97
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getValueByPath; });
98
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getPropByPath; });
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return generateId; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return valueEquals; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return escapeRegexpString; });
340
102
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return arrayFindIndex; });
341
103
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFind; });
342
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return coerceTruthyValueToArray; });
343
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isIE; });
344
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return isEdge; });
345
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isFirefox; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return coerceTruthyValueToArray; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isIE; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return isEdge; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isFirefox; });
346
108
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return autoprefixer; });
347
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return kebabCase; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return kebabCase; });
348
110
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return capitalize; });
349
111
  /* unused harmony export looseEqual */
350
112
  /* unused harmony export arrayEquals */
351
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isEqual; });
352
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return rafThrottle; });
113
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isEqual; });
114
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return rafThrottle; });
353
115
  /* unused harmony export objToArray */
354
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return requestAnimationFrame; });
116
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return requestAnimationFrame; });
355
117
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelAnimationFrame; });
356
118
  /* unused harmony export debounce */
357
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return throttle; });
119
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return throttle; });
358
120
  /* unused harmony export guid */
359
121
  /* unused harmony export uid */
360
122
  /* unused harmony export get */
361
123
  /* unused harmony export set */
362
- /* unused harmony export cloneDeep */
124
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return cloneDeep; });
363
125
  /* unused harmony export grouping */
364
126
  /* unused harmony export pager */
365
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getWinTop; });
127
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getWinTop; });
366
128
  /* unused harmony export getFileType */
367
129
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrUnique; });
368
130
  /* unused harmony export average */
369
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return formatFileSize; });
131
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return formatFileSize; });
370
132
  /* unused harmony export browser */
371
133
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return busEmit; });
372
134
  /* unused harmony export chunkToChinese */
373
135
  /* unused harmony export concatenate */
374
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return delUrlParam; });
136
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return delUrlParam; });
375
137
  /* unused harmony export domEval */
376
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return downloadFile; });
377
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return encode; });
378
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return decode; });
379
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return exclAttribute; });
138
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return downloadFile; });
139
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return encode; });
140
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return decode; });
141
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return exclAttribute; });
380
142
  /* unused harmony export exportXls */
381
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return extend; });
143
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return extend; });
382
144
  /* unused harmony export getObjectType */
383
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getParams; });
145
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getParams; });
384
146
  /* unused harmony export getScript */
385
147
  /* unused harmony export getStyle */
386
148
  /* unused harmony export getTypeName */
387
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getTypePrefix; });
149
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getTypePrefix; });
388
150
  /* unused harmony export getValues */
389
151
  /* unused harmony export getZoom */
390
152
  /* unused harmony export getLength */
391
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return timestampUrl; });
153
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return timestampUrl; });
392
154
  /* unused harmony export hasChars */
393
155
  /* unused harmony export identical */
394
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return indexOfObj; });
395
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return isEmpty; });
396
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isExist; });
156
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return indexOfObj; });
157
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isEmpty; });
158
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isExist; });
397
159
  /* unused harmony export isFunction */
398
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isObjectEqual; });
399
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return joinUrl; });
160
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return isObjectEqual; });
161
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return joinUrl; });
400
162
  /* unused harmony export getHorizontalMargin */
401
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return layoutWaterfall; });
163
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return layoutWaterfall; });
402
164
  /* unused harmony export loadJs */
403
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return loading; });
165
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return loading; });
404
166
  /* unused harmony export lowerCase */
405
167
  /* unused harmony export overbrim */
406
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return queryParams; });
168
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return queryParams; });
407
169
  /* unused harmony export receiveMessage */
408
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return renderIcon; });
170
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return renderIcon; });
409
171
  /* unused harmony export replenish */
410
172
  /* unused harmony export rmbToCapital */
411
173
  /* unused harmony export setScale */
412
174
  /* unused harmony export sendMessage */
413
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return setFavicon; });
175
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return setFavicon; });
414
176
  /* unused harmony export sum */
415
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return startWith; });
177
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return startWith; });
416
178
  /* unused harmony export takeLeft */
417
179
  /* unused harmony export takeRight */
418
180
  /* unused harmony export trimWhitespace */
419
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return toFixed; });
181
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return toFixed; });
420
182
  /* unused harmony export toFunction */
421
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return updateTheme; });
183
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return updateTheme; });
422
184
  /* unused harmony export upperType */
423
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return urlJoinParams; });
424
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return uuid; });
425
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return watermark; });
185
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return urlJoinParams; });
186
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return uuid; });
187
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return watermark; });
426
188
  /* unused harmony export winTopOpen */
427
189
  /* unused harmony export confirm */
428
- /* unused harmony export success */
429
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return error; });
430
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return warning; });
190
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return success; });
191
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return error; });
192
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return warning; });
193
+ /* unused harmony export base64 */
194
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return renderUrl; });
431
195
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
432
196
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
433
197
  /* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
434
198
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
435
- /* harmony import */ var _storage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
199
+ /* harmony import */ var _storage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
436
200
  /* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
437
201
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
438
202
 
@@ -3282,131 +3046,432 @@ var warning = function warning(content, _callback3) {
3282
3046
  }
3283
3047
  return MessageBox.alert(content, '提示', config);
3284
3048
  };
3049
+ /**
3050
+ * @desc 基于 Unicode 的 base64 编码,兼容中文等非 Latin1 字符
3051
+ * @param {any} val 任意值,null/undefined 返回空串
3052
+ * @return {string}
3053
+ **/
3054
+ var base64 = function base64(val) {
3055
+ if (val === null || val === undefined) return '';
3056
+ try {
3057
+ return window.btoa(unescape(encodeURIComponent(String(val))));
3058
+ } catch (e) {
3059
+ return '';
3060
+ }
3061
+ };
3062
+
3063
+ /**
3064
+ * @desc URL 渲染,将 userInfo 中的值替换到 URL 中的占位符
3065
+ * @param {string} url 需要渲染的 URL
3066
+ * @param {object} userInfo 用户信息
3067
+ * @return {string}
3068
+ **/
3069
+ var renderUrl = function renderUrl(url) {
3070
+ var userInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3071
+
3072
+ if (!url || typeof url !== 'string') return url;
3073
+ // const userInfo = this.$main.userInfo || this.$main.userModel || {};
3074
+ Object.keys(userInfo).forEach(function (key) {
3075
+ var val = userInfo[key];
3076
+ if (val === null || val === undefined) return;
3077
+ var safeKey = escapeRegexpString(key);
3078
+ var rawVal = String(val);
3079
+ var b64Val = base64(rawVal);
3080
+ // {base64-xxx} 与 {xxx} 两种占位符都要替换;
3081
+ // 使用函数式 replacement,避免值中的 $& / $1 等被特殊解释
3082
+ url = url.replace(new RegExp('\\{base64-' + safeKey + '\\}', 'g'), function () {
3083
+ return b64Val;
3084
+ });
3085
+ url = url.replace(new RegExp('\\{' + safeKey + '\\}', 'g'), function () {
3086
+ return rawVal;
3087
+ });
3088
+ });
3089
+ return url;
3090
+ };
3285
3091
 
3286
3092
  /***/ }),
3287
3093
 
3288
- /***/ 11:
3094
+ /***/ 1:
3289
3095
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3290
3096
 
3291
3097
  "use strict";
3292
- /* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
3293
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3294
- /* harmony import */ var eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
3295
-
3296
-
3098
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setStorage; });
3099
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getStorage; });
3100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeStorage; });
3101
+ /* unused harmony export setCookie */
3102
+ /* unused harmony export getCookie */
3103
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3297
3104
 
3298
- var hasModal = false;
3299
- var hasInitZIndex = false;
3300
- // 跨模块副本共享的 z-index 计数器宿主。
3301
- // 低代码等场景会用 eoss / eoss/src / eoss/packages 多种身份加载本文件,
3302
- // 导致出现多份 PopupManager、各自从 2000 起算,出现“后弹出的层级反而比先弹出的小”。
3303
- // 把计数器挂到全局,所有副本共用同一条单调递增序列。
3304
- var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
3105
+ /**
3106
+ * setStorage
3107
+ * @desc:设置本地储存数据
3108
+ * @author huangbo
3109
+ * @date 2022年5月7日
3110
+ * @param {String|Object} [key] - 数据的名称或包含type、key、value的对象
3111
+ * @param {String} [value] - 数据的值(当第一个参数为字符串时使用)
3112
+ **/
3113
+ var setStorage = function setStorage(key, value) {
3114
+ // 解析参数,支持两种调用方式:setStorage(key, value) 和 setStorage({type, key, value})
3115
+ var type = void 0,
3116
+ finalKey = void 0,
3117
+ finalValue = void 0;
3305
3118
 
3306
- var getModal = function getModal() {
3307
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
3308
- var modalDom = PopupManager.modalDom;
3309
- if (modalDom) {
3310
- hasModal = true;
3119
+ if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object' && key !== null) {
3120
+ // 对象调用方式:setStorage({type, key, value})
3121
+ type = key.type;
3122
+ finalKey = key.key;
3123
+ finalValue = key.value;
3311
3124
  } else {
3312
- hasModal = false;
3313
- modalDom = document.createElement('div');
3314
- PopupManager.modalDom = modalDom;
3315
-
3316
- modalDom.addEventListener('touchmove', function (event) {
3317
- event.preventDefault();
3318
- event.stopPropagation();
3319
- });
3320
-
3321
- modalDom.addEventListener('click', function () {
3322
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
3323
- });
3125
+ // 字符串调用方式:setStorage(key, value)
3126
+ type = getStorage('storageType');
3127
+ finalKey = key;
3128
+ finalValue = value;
3324
3129
  }
3325
3130
 
3326
- return modalDom;
3327
- };
3328
-
3329
- var instances = {};
3330
-
3331
- var PopupManager = {
3332
- modalFade: true,
3131
+ // 使用默认存储类型如果未指定
3132
+ type = type || getStorage('storageType');
3333
3133
 
3334
- getInstance: function getInstance(id) {
3335
- return instances[id];
3336
- },
3134
+ // 获取存储对象
3135
+ var storage = type === 'localStorage' ? localStorage : sessionStorage;
3337
3136
 
3338
- register: function register(id, instance) {
3339
- if (id && instance) {
3340
- instances[id] = instance;
3137
+ // 处理不同类型的key
3138
+ if (typeof finalKey === 'string') {
3139
+ // 单个字符串key
3140
+ var storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
3141
+ storage.setItem(finalKey, storedValue);
3142
+ if (finalKey === 'token') {
3143
+ setCookie('token', storedValue);
3341
3144
  }
3342
- },
3343
-
3344
- deregister: function deregister(id) {
3345
- if (id) {
3346
- instances[id] = null;
3347
- delete instances[id];
3145
+ } else if (Array.isArray(finalKey)) {
3146
+ // 数组key,为多个key设置同一个value
3147
+ var _storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
3148
+ for (var i = 0; i < finalKey.length; i++) {
3149
+ storage.setItem(finalKey[i], _storedValue);
3150
+ if (finalKey[i] === 'token') {
3151
+ setCookie('token', _storedValue);
3152
+ }
3348
3153
  }
3349
- },
3350
-
3351
- nextZIndex: function nextZIndex() {
3352
- return PopupManager.zIndex++;
3353
- },
3354
-
3355
- modalStack: [],
3356
-
3357
- doOnModalClick: function doOnModalClick() {
3358
- var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3359
- if (!topItem) return;
3360
-
3361
- var instance = PopupManager.getInstance(topItem.id);
3362
- if (instance && instance.closeOnClickModal) {
3363
- instance.close();
3154
+ } else if ((typeof finalKey === 'undefined' ? 'undefined' : _typeof(finalKey)) === 'object' && finalKey !== null) {
3155
+ // 对象key,对象的属性名称作为key,属性值作为value
3156
+ for (var k in finalKey) {
3157
+ if (Object.prototype.hasOwnProperty.call(finalKey, k)) {
3158
+ var _storedValue2 = _typeof(finalKey[k]) === 'object' ? JSON.stringify(finalKey[k]) : finalKey[k];
3159
+ storage.setItem(k, _storedValue2);
3160
+ if (k === 'token') {
3161
+ setCookie('token', _storedValue2);
3162
+ }
3163
+ }
3364
3164
  }
3365
- },
3165
+ }
3166
+ };
3366
3167
 
3367
- openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
3368
- if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
3369
- if (!id || zIndex === undefined) return;
3370
- this.modalFade = modalFade;
3168
+ /**
3169
+ * getStorage
3170
+ * @desc:获取本地储存数据
3171
+ * @author huangbo
3172
+ * @date 2022年5月7日
3173
+ * @param {String} [key] - 获取的名称
3174
+ **/
3175
+ var getStorage = function getStorage(key) {
3176
+ if (key) {
3177
+ var res = sessionStorage.getItem(key) || localStorage.getItem(key);
3178
+ if (!res && key === 'token') {
3179
+ res = getCookie('token');
3180
+ }
3181
+ if (key === 'host' && !res) {
3182
+ res = '';
3183
+ }
3184
+ return res;
3185
+ }
3186
+ var defaults = {};
3187
+ var token = sessionStorage.getItem('token') || localStorage.getItem('token') || getCookie('token');
3188
+ var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || getCookie('ssId');
3371
3189
 
3372
- var modalStack = this.modalStack;
3190
+ var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || getCookie('deviceUnique');
3191
+ if (token) {
3192
+ defaults.Authorization = token;
3193
+ }
3194
+ if (ssId) {
3195
+ defaults.ssId = ssId;
3196
+ }
3197
+ if (deviceUnique) {
3198
+ defaults.deviceUnique = deviceUnique;
3199
+ }
3200
+ return defaults;
3201
+ };
3373
3202
 
3374
- for (var i = 0, j = modalStack.length; i < j; i++) {
3375
- var item = modalStack[i];
3376
- if (item.id === id) {
3377
- return;
3203
+ /**
3204
+ * removeStorage
3205
+ * @desc:删除本地储存数据
3206
+ * @author huangbo
3207
+ * @date 2022年5月7日
3208
+ * @param {String, Array} [key] - 获取的名称
3209
+ **/
3210
+ var removeStorage = function removeStorage(key) {
3211
+ if (Array.isArray(key)) {
3212
+ for (var i = 0; i < key.length; i++) {
3213
+ sessionStorage.removeItem(key[i]);
3214
+ localStorage.removeItem(key[i]);
3215
+ if (key[i] === 'token') {
3216
+ removeCookie('token');
3378
3217
  }
3379
3218
  }
3219
+ } else if (key) {
3220
+ sessionStorage.removeItem(key);
3221
+ localStorage.removeItem(key);
3222
+ if (key === 'token') {
3223
+ removeCookie('token');
3224
+ }
3225
+ } else {
3226
+ sessionStorage.clear();
3227
+ localStorage.clear();
3228
+ removeCookie('token');
3229
+ }
3230
+ };
3380
3231
 
3381
- var modalDom = getModal();
3232
+ /**
3233
+ * setCookie
3234
+ * @desc 设置cookie
3235
+ * @author huangbo
3236
+ * @param {string} [name] cookie名称
3237
+ * @param {string} [value] cookie值
3238
+ * @param {boolean} [isSession] 是否是会话cookie
3239
+ **/
3240
+ var setCookie = function setCookie(name, value) {
3241
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3242
+ var time = arguments[3];
3382
3243
 
3383
- Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, 'v-modal');
3384
- if (this.modalFade && !hasModal) {
3385
- Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, 'v-modal-enter');
3386
- }
3387
- if (modalClass) {
3388
- var classArr = modalClass.trim().split(/\s+/);
3389
- classArr.forEach(function (item) {
3390
- return Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, item);
3391
- });
3244
+ try {
3245
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3246
+ ];
3247
+ // 会话/持久Cookie设置
3248
+ if (!isSession) {
3249
+ if (/MSIE|Trident/.test(navigator.userAgent)) {
3250
+ // IE使用expires
3251
+ var date = new Date();
3252
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3253
+ cookieParts.push('expires=' + date.toUTCString());
3254
+ } else {
3255
+ // 其他浏览器使用max-age
3256
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3257
+ }
3392
3258
  }
3393
- setTimeout(function () {
3394
- Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* removeClass */ "i"])(modalDom, 'v-modal-enter');
3395
- }, 200);
3396
-
3397
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
3398
- dom.parentNode.appendChild(modalDom);
3259
+ // 内核兼容处理
3260
+ if (/MSIE|Trident/.test(navigator.userAgent)) {
3261
+ // IE特殊处理:添加P3P协议头
3262
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3399
3263
  } else {
3400
- document.body.appendChild(modalDom);
3264
+ // 现代浏览器设置
3265
+ cookieParts.push('samesite=lax');
3266
+ if (window.location.protocol === 'https:') {
3267
+ cookieParts.push('secure');
3268
+ }
3401
3269
  }
3402
3270
 
3403
- if (zIndex) {
3404
- modalDom.style.zIndex = zIndex;
3405
- }
3406
- modalDom.tabIndex = 0;
3407
- modalDom.style.display = '';
3271
+ // 设置Cookie
3272
+ document.cookie = cookieParts.join('; ');
3273
+ return true;
3274
+ } catch (e) {
3275
+ console.error('Cookie设置失败:', e);
3276
+ return false;
3277
+ }
3278
+ };
3408
3279
 
3409
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
3280
+ /**
3281
+ * getCookie
3282
+ * @desc 获取cookie中指定名称的值
3283
+ * @author huangbo
3284
+ * @param {string} [name] cookie名称
3285
+ **/
3286
+ var getCookie = function getCookie(name) {
3287
+ var cookies = document.cookie.split(';');
3288
+ for (var _iterator = cookies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
3289
+ var _ref;
3290
+
3291
+ if (_isArray) {
3292
+ if (_i >= _iterator.length) break;
3293
+ _ref = _iterator[_i++];
3294
+ } else {
3295
+ _i = _iterator.next();
3296
+ if (_i.done) break;
3297
+ _ref = _i.value;
3298
+ }
3299
+
3300
+ var cookie = _ref;
3301
+
3302
+ var _cookie$trim$split = cookie.trim().split('='),
3303
+ cookieName = _cookie$trim$split[0],
3304
+ cookieValue = _cookie$trim$split[1];
3305
+
3306
+ if (decodeURIComponent(cookieName) === name) {
3307
+ return decodeURIComponent(cookieValue);
3308
+ }
3309
+ }
3310
+ return null;
3311
+ };
3312
+
3313
+ /**
3314
+ * removeCookie
3315
+ * @desc:删除cookie
3316
+ * @author huangbo
3317
+ * @date 2022年5月7日
3318
+ * @param {String, Array} [key] - 获取的名称
3319
+ **/
3320
+ var removeCookie = function removeCookie(key) {
3321
+ if (Array.isArray(key)) {
3322
+ for (var i = 0; i < key.length; i++) {
3323
+ document.cookie = encodeURIComponent(key[i]) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
3324
+ }
3325
+ } else {
3326
+ document.cookie = encodeURIComponent(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
3327
+ }
3328
+ };
3329
+
3330
+ /***/ }),
3331
+
3332
+ /***/ 101:
3333
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3334
+
3335
+ "use strict";
3336
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
3337
+ /* harmony import */ var eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3338
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3339
+
3340
+
3341
+
3342
+ /**
3343
+ * 判断一个节点是否为Vue的虚拟节点(VNode)
3344
+ * @param {*} node 要判断的节点
3345
+ * @returns {boolean} 如果是虚拟节点则返回true,否则返回false
3346
+ */
3347
+ function isVNode(node) {
3348
+ return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "y"])(node, 'componentOptions');
3349
+ }
3350
+
3351
+ /***/ }),
3352
+
3353
+ /***/ 11:
3354
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3355
+
3356
+ "use strict";
3357
+ /* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
3358
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
3359
+ /* harmony import */ var eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
3360
+
3361
+
3362
+
3363
+ var hasModal = false;
3364
+ var hasInitZIndex = false;
3365
+ // 跨模块副本共享的 z-index 计数器宿主。
3366
+ // 低代码等场景会用 eoss / eoss/src / eoss/packages 多种身份加载本文件,
3367
+ // 导致出现多份 PopupManager、各自从 2000 起算,出现“后弹出的层级反而比先弹出的小”。
3368
+ // 把计数器挂到全局,所有副本共用同一条单调递增序列。
3369
+ var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
3370
+
3371
+ var getModal = function getModal() {
3372
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
3373
+ var modalDom = PopupManager.modalDom;
3374
+ if (modalDom) {
3375
+ hasModal = true;
3376
+ } else {
3377
+ hasModal = false;
3378
+ modalDom = document.createElement('div');
3379
+ PopupManager.modalDom = modalDom;
3380
+
3381
+ modalDom.addEventListener('touchmove', function (event) {
3382
+ event.preventDefault();
3383
+ event.stopPropagation();
3384
+ });
3385
+
3386
+ modalDom.addEventListener('click', function () {
3387
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
3388
+ });
3389
+ }
3390
+
3391
+ return modalDom;
3392
+ };
3393
+
3394
+ var instances = {};
3395
+
3396
+ var PopupManager = {
3397
+ modalFade: true,
3398
+
3399
+ getInstance: function getInstance(id) {
3400
+ return instances[id];
3401
+ },
3402
+
3403
+ register: function register(id, instance) {
3404
+ if (id && instance) {
3405
+ instances[id] = instance;
3406
+ }
3407
+ },
3408
+
3409
+ deregister: function deregister(id) {
3410
+ if (id) {
3411
+ instances[id] = null;
3412
+ delete instances[id];
3413
+ }
3414
+ },
3415
+
3416
+ nextZIndex: function nextZIndex() {
3417
+ return PopupManager.zIndex++;
3418
+ },
3419
+
3420
+ modalStack: [],
3421
+
3422
+ doOnModalClick: function doOnModalClick() {
3423
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
3424
+ if (!topItem) return;
3425
+
3426
+ var instance = PopupManager.getInstance(topItem.id);
3427
+ if (instance && instance.closeOnClickModal) {
3428
+ instance.close();
3429
+ }
3430
+ },
3431
+
3432
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
3433
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
3434
+ if (!id || zIndex === undefined) return;
3435
+ this.modalFade = modalFade;
3436
+
3437
+ var modalStack = this.modalStack;
3438
+
3439
+ for (var i = 0, j = modalStack.length; i < j; i++) {
3440
+ var item = modalStack[i];
3441
+ if (item.id === id) {
3442
+ return;
3443
+ }
3444
+ }
3445
+
3446
+ var modalDom = getModal();
3447
+
3448
+ Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, 'v-modal');
3449
+ if (this.modalFade && !hasModal) {
3450
+ Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, 'v-modal-enter');
3451
+ }
3452
+ if (modalClass) {
3453
+ var classArr = modalClass.trim().split(/\s+/);
3454
+ classArr.forEach(function (item) {
3455
+ return Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* addClass */ "a"])(modalDom, item);
3456
+ });
3457
+ }
3458
+ setTimeout(function () {
3459
+ Object(eoss_src_utils_dom__WEBPACK_IMPORTED_MODULE_1__[/* removeClass */ "i"])(modalDom, 'v-modal-enter');
3460
+ }, 200);
3461
+
3462
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
3463
+ dom.parentNode.appendChild(modalDom);
3464
+ } else {
3465
+ document.body.appendChild(modalDom);
3466
+ }
3467
+
3468
+ if (zIndex) {
3469
+ modalDom.style.zIndex = zIndex;
3470
+ }
3471
+ modalDom.tabIndex = 0;
3472
+ modalDom.style.display = '';
3473
+
3474
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
3410
3475
  },
3411
3476
 
3412
3477
  closeModal: function closeModal(id) {
@@ -3517,7 +3582,7 @@ if (!vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) {
3517
3582
  /* unused harmony export hsvTorgb */
3518
3583
  /* unused harmony export mixColor */
3519
3584
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getRgb; });
3520
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
3585
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3521
3586
 
3522
3587
  var $hueStep = 2;
3523
3588
  var $saturationStep1 = 0.16;
@@ -3568,7 +3633,7 @@ var getColor = function getColor($color, $n) {
3568
3633
  var getLightness = function getLightness($v, $i, $isLight) {
3569
3634
  var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
3570
3635
  $value = $value < 1 ? $value : 1;
3571
- return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "T"])($value, 2);
3636
+ return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "W"])($value, 2);
3572
3637
  };
3573
3638
 
3574
3639
  /**
@@ -3592,7 +3657,7 @@ var getSaturation = function getSaturation($s, $i, $isLight) {
3592
3657
  $saturation = 0.1;
3593
3658
  }
3594
3659
  $saturation = $saturation > 0.06 ? $saturation : 0.06;
3595
- return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "T"])($saturation, 2);
3660
+ return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "W"])($saturation, 2);
3596
3661
  };
3597
3662
 
3598
3663
  /**
@@ -3755,7 +3820,7 @@ module.exports = require("vue");
3755
3820
 
3756
3821
  /***/ }),
3757
3822
 
3758
- /***/ 218:
3823
+ /***/ 222:
3759
3824
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3760
3825
 
3761
3826
  "use strict";
@@ -4181,10 +4246,10 @@ render._withStripped = true
4181
4246
  // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=f90801ee&
4182
4247
 
4183
4248
  // EXTERNAL MODULE: ./src/utils/popup/index.js
4184
- var popup = __webpack_require__(33);
4249
+ var popup = __webpack_require__(35);
4185
4250
 
4186
4251
  // EXTERNAL MODULE: external "eoss/lib/scrollbar"
4187
- var scrollbar_ = __webpack_require__(26);
4252
+ var scrollbar_ = __webpack_require__(30);
4188
4253
  var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
4189
4254
 
4190
4255
  // EXTERNAL MODULE: external "eoss/lib/input"
@@ -4196,10 +4261,10 @@ var button_ = __webpack_require__(13);
4196
4261
  var button_default = /*#__PURE__*/__webpack_require__.n(button_);
4197
4262
 
4198
4263
  // EXTERNAL MODULE: ./src/utils/dom.js
4199
- var dom = __webpack_require__(5);
4264
+ var dom = __webpack_require__(6);
4200
4265
 
4201
4266
  // EXTERNAL MODULE: ./src/utils/aria-utils.js
4202
- var aria_utils = __webpack_require__(63);
4267
+ var aria_utils = __webpack_require__(65);
4203
4268
 
4204
4269
  // CONCATENATED MODULE: ./src/utils/aria-dialog.js
4205
4270
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -4299,11 +4364,11 @@ aria.Dialog.prototype.trapFocus = function (event) {
4299
4364
 
4300
4365
  /* harmony default export */ var aria_dialog = (aria.Dialog);
4301
4366
  // EXTERNAL MODULE: external "eoss/lib/option"
4302
- var option_ = __webpack_require__(54);
4367
+ var option_ = __webpack_require__(49);
4303
4368
  var option_default = /*#__PURE__*/__webpack_require__.n(option_);
4304
4369
 
4305
4370
  // EXTERNAL MODULE: external "eoss/lib/select"
4306
- var select_ = __webpack_require__(41);
4371
+ var select_ = __webpack_require__(40);
4307
4372
  var select_default = /*#__PURE__*/__webpack_require__.n(select_);
4308
4373
 
4309
4374
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js&
@@ -4846,10 +4911,10 @@ var component = Object(componentNormalizer["a" /* default */])(
4846
4911
 
4847
4912
  /* harmony default export */ var main = (component.exports);
4848
4913
  // EXTERNAL MODULE: ./src/utils/merge.js
4849
- var merge = __webpack_require__(22);
4914
+ var merge = __webpack_require__(23);
4850
4915
 
4851
4916
  // EXTERNAL MODULE: ./src/utils/vdom.js
4852
- var vdom = __webpack_require__(99);
4917
+ var vdom = __webpack_require__(101);
4853
4918
 
4854
4919
  // CONCATENATED MODULE: ./packages/message-box/src/main.js
4855
4920
  var main_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -5185,7 +5250,7 @@ main_MessageBox.close = function () {
5185
5250
 
5186
5251
  /***/ }),
5187
5252
 
5188
- /***/ 22:
5253
+ /***/ 23:
5189
5254
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5190
5255
 
5191
5256
  "use strict";
@@ -5352,13 +5417,6 @@ function scrollMove(wrap) {
5352
5417
 
5353
5418
  /***/ }),
5354
5419
 
5355
- /***/ 26:
5356
- /***/ (function(module, exports) {
5357
-
5358
- module.exports = require("eoss/lib/scrollbar");
5359
-
5360
- /***/ }),
5361
-
5362
5420
  /***/ 3:
5363
5421
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5364
5422
 
@@ -5426,18 +5484,25 @@ function isDefined(val) {
5426
5484
 
5427
5485
  /***/ }),
5428
5486
 
5429
- /***/ 33:
5487
+ /***/ 30:
5488
+ /***/ (function(module, exports) {
5489
+
5490
+ module.exports = require("eoss/lib/scrollbar");
5491
+
5492
+ /***/ }),
5493
+
5494
+ /***/ 35:
5430
5495
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5431
5496
 
5432
5497
  "use strict";
5433
5498
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
5434
5499
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
5435
- /* harmony import */ var eoss_src_utils_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
5500
+ /* harmony import */ var eoss_src_utils_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
5436
5501
  /* harmony import */ var eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
5437
5502
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__["a"]; });
5438
5503
 
5439
5504
  /* harmony import */ var _scrollbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
5440
- /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
5505
+ /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
5441
5506
 
5442
5507
 
5443
5508
 
@@ -5578,1410 +5643,1433 @@ var scrollBarWidth = void 0;
5578
5643
  eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].zIndex = zIndex;
5579
5644
  }
5580
5645
 
5581
- if (modal) {
5582
- if (this._closing) {
5583
- eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
5584
- this._closing = false;
5585
- }
5586
- eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].openModal(this._popupId, eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
5587
- if (props.lockScroll) {
5588
- this.withoutHiddenClass = !Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* hasClass */ "d"])(document.body, 'es-popup-parent--hidden');
5589
- if (this.withoutHiddenClass) {
5590
- this.bodyPaddingRight = document.body.style.paddingRight;
5591
- this.computedBodyPaddingRight = parseInt(Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'paddingRight'), 10);
5592
- }
5593
- scrollBarWidth = Object(_scrollbar__WEBPACK_IMPORTED_MODULE_3__[/* getScrollbarWidth */ "b"])();
5594
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
5595
- var bodyOverflowY = Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'overflowY');
5596
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
5597
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
5598
- }
5599
- Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* addClass */ "a"])(document.body, 'es-popup-parent--hidden');
5600
- }
5601
- }
5602
-
5603
- if (getComputedStyle(dom).position === 'static') {
5604
- dom.style.position = 'absolute';
5605
- }
5606
-
5607
- dom.style.zIndex = eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex();
5608
- this.opened = true;
5609
-
5610
- this.onOpen && this.onOpen();
5611
-
5612
- this.doAfterOpen();
5613
- },
5614
- doAfterOpen: function doAfterOpen() {
5615
- this._opening = false;
5616
- },
5617
- close: function close() {
5618
- var _this4 = this;
5619
-
5620
- if (this.willClose && !this.willClose()) return;
5621
-
5622
- if (this._openTimer !== null) {
5623
- clearTimeout(this._openTimer);
5624
- this._openTimer = null;
5625
- }
5626
- clearTimeout(this._closeTimer);
5627
-
5628
- var closeDelay = Number(this.closeDelay);
5629
-
5630
- if (closeDelay > 0) {
5631
- this._closeTimer = setTimeout(function () {
5632
- _this4._closeTimer = null;
5633
- _this4.doClose();
5634
- }, closeDelay);
5635
- } else {
5636
- this.doClose();
5637
- }
5638
- },
5639
- doClose: function doClose() {
5640
- this._closing = true;
5641
-
5642
- this.onClose && this.onClose();
5643
-
5644
- if (this.lockScroll) {
5645
- setTimeout(this.restoreBodyStyle, 200);
5646
- }
5647
-
5648
- this.opened = false;
5649
-
5650
- this.doAfterClose();
5651
- },
5652
- doAfterClose: function doAfterClose() {
5653
- eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
5654
- this._closing = false;
5655
- },
5656
- restoreBodyStyle: function restoreBodyStyle() {
5657
- if (this.modal && this.withoutHiddenClass) {
5658
- document.body.style.paddingRight = this.bodyPaddingRight;
5659
- Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* removeClass */ "i"])(document.body, 'es-popup-parent--hidden');
5660
- }
5661
- this.withoutHiddenClass = true;
5662
- }
5663
- }
5664
- });
5665
-
5666
-
5667
-
5668
- /***/ }),
5669
-
5670
- /***/ 4:
5671
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5672
-
5673
- "use strict";
5674
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
5675
- /* globals __VUE_SSR_CONTEXT__ */
5676
-
5677
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
5678
- // This module is a runtime utility for cleaner component module output and will
5679
- // be included in the final webpack user bundle.
5680
-
5681
- function normalizeComponent(
5682
- scriptExports,
5683
- render,
5684
- staticRenderFns,
5685
- functionalTemplate,
5686
- injectStyles,
5687
- scopeId,
5688
- moduleIdentifier /* server only */,
5689
- shadowMode /* vue-cli only */
5690
- ) {
5691
- // Vue.extend constructor export interop
5692
- var options =
5693
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
5694
-
5695
- // render functions
5696
- if (render) {
5697
- options.render = render
5698
- options.staticRenderFns = staticRenderFns
5699
- options._compiled = true
5700
- }
5701
-
5702
- // functional template
5703
- if (functionalTemplate) {
5704
- options.functional = true
5705
- }
5706
-
5707
- // scopedId
5708
- if (scopeId) {
5709
- options._scopeId = 'data-v-' + scopeId
5710
- }
5711
-
5712
- var hook
5713
- if (moduleIdentifier) {
5714
- // server build
5715
- hook = function (context) {
5716
- // 2.3 injection
5717
- context =
5718
- context || // cached call
5719
- (this.$vnode && this.$vnode.ssrContext) || // stateful
5720
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
5721
- // 2.2 with runInNewContext: true
5722
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
5723
- context = __VUE_SSR_CONTEXT__
5724
- }
5725
- // inject component styles
5726
- if (injectStyles) {
5727
- injectStyles.call(this, context)
5728
- }
5729
- // register component module identifier for async chunk inferrence
5730
- if (context && context._registeredComponents) {
5731
- context._registeredComponents.add(moduleIdentifier)
5732
- }
5733
- }
5734
- // used by ssr in case component is cached and beforeCreate
5735
- // never gets called
5736
- options._ssrRegister = hook
5737
- } else if (injectStyles) {
5738
- hook = shadowMode
5739
- ? function () {
5740
- injectStyles.call(
5741
- this,
5742
- (options.functional ? this.parent : this).$root.$options.shadowRoot
5743
- )
5744
- }
5745
- : injectStyles
5746
- }
5747
-
5748
- if (hook) {
5749
- if (options.functional) {
5750
- // for template-only hot-reload because in that case the render fn doesn't
5751
- // go through the normalizer
5752
- options._injectStyles = hook
5753
- // register for functional component in vue file
5754
- var originalRender = options.render
5755
- options.render = function renderWithStyleInjection(h, context) {
5756
- hook.call(context)
5757
- return originalRender(h, context)
5758
- }
5759
- } else {
5760
- // inject component registration as beforeCreate hook
5761
- var existing = options.beforeCreate
5762
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
5763
- }
5764
- }
5765
-
5766
- return {
5767
- exports: scriptExports,
5768
- options: options
5769
- }
5770
- }
5771
-
5772
-
5773
- /***/ }),
5774
-
5775
- /***/ 41:
5776
- /***/ (function(module, exports) {
5777
-
5778
- module.exports = require("eoss/lib/select");
5779
-
5780
- /***/ }),
5781
-
5782
- /***/ 45:
5783
- /***/ (function(module, exports) {
5784
-
5785
- var g;
5786
-
5787
- // This works in non-strict mode
5788
- g = (function() {
5789
- return this;
5790
- })();
5791
-
5792
- try {
5793
- // This works if eval is allowed (see CSP)
5794
- g = g || new Function("return this")();
5795
- } catch (e) {
5796
- // This works if the window reference is available
5797
- if (typeof window === "object") g = window;
5798
- }
5799
-
5800
- // g can still be undefined, but nothing to do about it...
5801
- // We return undefined, instead of nothing here, so it's
5802
- // easier to handle this case. if(!global) { ...}
5803
-
5804
- module.exports = g;
5805
-
5806
-
5807
- /***/ }),
5808
-
5809
- /***/ 5:
5810
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5811
-
5812
- "use strict";
5813
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
5814
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
5815
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
5816
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
5817
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
5818
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
5819
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
5820
- /* unused harmony export setStyle */
5821
- /* unused harmony export isScroll */
5822
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
5823
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
5824
- /* unused harmony export insertAfter */
5825
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
5826
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
5827
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
5828
-
5829
- /* istanbul ignore next */
5830
-
5831
-
5832
-
5833
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
5834
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
5835
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
5836
- var ieVersion = isServer ? 0 : Number(document.documentMode);
5837
-
5838
- /* istanbul ignore next */
5839
- var trim = function trim(string) {
5840
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
5841
- };
5842
- /* istanbul ignore next */
5843
- var camelCase = function camelCase(name) {
5844
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
5845
- return offset ? letter.toUpperCase() : letter;
5846
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
5847
- };
5848
-
5849
- /* istanbul ignore next */
5850
- var on = function () {
5851
- if (!isServer && document.addEventListener) {
5852
- return function (element, event, handler) {
5853
- if (element && event && handler) {
5854
- element.addEventListener(event, handler, false);
5855
- }
5856
- };
5857
- } else {
5858
- return function (element, event, handler) {
5859
- if (element && event && handler) {
5860
- element.attachEvent('on' + event, handler);
5861
- }
5862
- };
5863
- }
5864
- }();
5865
-
5866
- /* istanbul ignore next */
5867
- var off = function () {
5868
- if (!isServer && document.removeEventListener) {
5869
- return function (element, event, handler) {
5870
- if (element && event) {
5871
- element.removeEventListener(event, handler, false);
5872
- }
5873
- };
5874
- } else {
5875
- return function (element, event, handler) {
5876
- if (element && event) {
5877
- element.detachEvent('on' + event, handler);
5878
- }
5879
- };
5880
- }
5881
- }();
5882
-
5883
- /* istanbul ignore next */
5884
- var once = function once(el, event, fn) {
5885
- var listener = function listener() {
5886
- if (fn) {
5887
- fn.apply(this, arguments);
5888
- }
5889
- off(el, event, listener);
5890
- };
5891
- on(el, event, listener);
5892
- };
5893
-
5894
- /* istanbul ignore next */
5895
- function hasClass(el, cls) {
5896
- if (!el || !cls) return false;
5897
- if (cls.indexOf(' ') !== -1) {
5898
- throw new Error('className should not contain space.');
5899
- }
5900
- if (el.classList) {
5901
- return el.classList.contains(cls);
5902
- } else {
5903
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
5904
- }
5905
- }
5906
-
5907
- /* istanbul ignore next */
5908
- function addClass(el, cls) {
5909
- if (!el) return;
5910
- var curClass = el.className;
5911
- var classes = (cls || '').split(' ');
5912
-
5913
- for (var i = 0, j = classes.length; i < j; i++) {
5914
- var clsName = classes[i];
5915
- if (!clsName) continue;
5916
-
5917
- if (el.classList) {
5918
- el.classList.add(clsName);
5919
- } else if (!hasClass(el, clsName)) {
5920
- curClass += ' ' + clsName;
5921
- }
5922
- }
5923
- if (!el.classList) {
5924
- el.className = curClass;
5925
- }
5926
- }
5927
-
5928
- /* istanbul ignore next */
5929
- function removeClass(el, cls) {
5930
- if (!el || !cls) return;
5931
- var classes = cls.split(' ');
5932
- var curClass = ' ' + el.className + ' ';
5933
-
5934
- for (var i = 0, j = classes.length; i < j; i++) {
5935
- var clsName = classes[i];
5936
- if (!clsName) continue;
5937
-
5938
- if (el.classList) {
5939
- el.classList.remove(clsName);
5940
- } else if (hasClass(el, clsName)) {
5941
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
5942
- }
5943
- }
5944
- if (!el.classList) {
5945
- el.className = trim(curClass);
5946
- }
5947
- }
5948
-
5949
- /* istanbul ignore next */
5950
- var getStyle = ieVersion < 9 ? function (element, styleName) {
5951
- if (isServer) return;
5952
- if (!element || !styleName) return null;
5953
- styleName = camelCase(styleName);
5954
- if (styleName === 'float') {
5955
- styleName = 'styleFloat';
5956
- }
5957
- try {
5958
- switch (styleName) {
5959
- case 'opacity':
5960
- try {
5961
- return element.filters.item('alpha').opacity / 100;
5962
- } catch (e) {
5963
- return 1.0;
5964
- }
5965
- default:
5966
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
5967
- }
5968
- } catch (e) {
5969
- return element.style[styleName];
5970
- }
5971
- } : function (element, styleName) {
5972
- if (isServer) return;
5973
- if (!element || !styleName) return null;
5974
- styleName = camelCase(styleName);
5975
- if (styleName === 'float') {
5976
- styleName = 'cssFloat';
5977
- }
5978
- try {
5979
- var computed = document.defaultView.getComputedStyle(element, '');
5980
- return element.style[styleName] || computed ? computed[styleName] : null;
5981
- } catch (e) {
5982
- return element.style[styleName];
5983
- }
5984
- };
5985
-
5986
- /* istanbul ignore next */
5987
- function setStyle(element, styleName, value) {
5988
- if (!element || !styleName) return;
5989
-
5990
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
5991
- for (var prop in styleName) {
5992
- if (styleName.hasOwnProperty(prop)) {
5993
- setStyle(element, prop, styleName[prop]);
5646
+ if (modal) {
5647
+ if (this._closing) {
5648
+ eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
5649
+ this._closing = false;
5650
+ }
5651
+ eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].openModal(this._popupId, eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
5652
+ if (props.lockScroll) {
5653
+ this.withoutHiddenClass = !Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* hasClass */ "d"])(document.body, 'es-popup-parent--hidden');
5654
+ if (this.withoutHiddenClass) {
5655
+ this.bodyPaddingRight = document.body.style.paddingRight;
5656
+ this.computedBodyPaddingRight = parseInt(Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'paddingRight'), 10);
5657
+ }
5658
+ scrollBarWidth = Object(_scrollbar__WEBPACK_IMPORTED_MODULE_3__[/* getScrollbarWidth */ "b"])();
5659
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
5660
+ var bodyOverflowY = Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'overflowY');
5661
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
5662
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
5663
+ }
5664
+ Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* addClass */ "a"])(document.body, 'es-popup-parent--hidden');
5665
+ }
5994
5666
  }
5995
- }
5996
- } else {
5997
- styleName = camelCase(styleName);
5998
- if (styleName === 'opacity' && ieVersion < 9) {
5999
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
6000
- } else {
6001
- element.style[styleName] = value;
6002
- }
6003
- }
6004
- }
6005
5667
 
6006
- var isScroll = function isScroll(el, vertical) {
6007
- if (isServer) return;
5668
+ if (getComputedStyle(dom).position === 'static') {
5669
+ dom.style.position = 'absolute';
5670
+ }
6008
5671
 
6009
- var determinedDirection = vertical !== null || vertical !== undefined;
6010
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
5672
+ dom.style.zIndex = eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex();
5673
+ this.opened = true;
6011
5674
 
6012
- return overflow.match(/(scroll|auto)/);
6013
- };
5675
+ this.onOpen && this.onOpen();
6014
5676
 
6015
- var getScrollContainer = function getScrollContainer(el, vertical) {
6016
- if (isServer) return;
5677
+ this.doAfterOpen();
5678
+ },
5679
+ doAfterOpen: function doAfterOpen() {
5680
+ this._opening = false;
5681
+ },
5682
+ close: function close() {
5683
+ var _this4 = this;
6017
5684
 
6018
- var parent = el;
6019
- while (parent) {
6020
- if ([window, document, document.documentElement].includes(parent)) {
6021
- return window;
6022
- }
6023
- if (isScroll(parent, vertical)) {
6024
- return parent;
6025
- }
6026
- parent = parent.parentNode;
6027
- }
5685
+ if (this.willClose && !this.willClose()) return;
6028
5686
 
6029
- return parent;
6030
- };
5687
+ if (this._openTimer !== null) {
5688
+ clearTimeout(this._openTimer);
5689
+ this._openTimer = null;
5690
+ }
5691
+ clearTimeout(this._closeTimer);
6031
5692
 
6032
- var isInContainer = function isInContainer(el, container) {
6033
- if (isServer || !el || !container) return false;
5693
+ var closeDelay = Number(this.closeDelay);
6034
5694
 
6035
- var elRect = el.getBoundingClientRect();
6036
- var containerRect = void 0;
5695
+ if (closeDelay > 0) {
5696
+ this._closeTimer = setTimeout(function () {
5697
+ _this4._closeTimer = null;
5698
+ _this4.doClose();
5699
+ }, closeDelay);
5700
+ } else {
5701
+ this.doClose();
5702
+ }
5703
+ },
5704
+ doClose: function doClose() {
5705
+ this._closing = true;
6037
5706
 
6038
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
6039
- containerRect = {
6040
- top: 0,
6041
- right: window.innerWidth,
6042
- bottom: window.innerHeight,
6043
- left: 0
6044
- };
6045
- } else {
6046
- containerRect = container.getBoundingClientRect();
6047
- }
5707
+ this.onClose && this.onClose();
6048
5708
 
6049
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
6050
- };
5709
+ if (this.lockScroll) {
5710
+ setTimeout(this.restoreBodyStyle, 200);
5711
+ }
6051
5712
 
6052
- /**
6053
- * 在元素前插入元素
6054
- * @param {HTMLElement} newEl 新DOM元素
6055
- * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
6056
- */
6057
- function insertAfter(newEl, targetEl) {
6058
- var parentEl = targetEl.parentNode;
6059
- if (parentEl.lastChild === targetEl) {
6060
- parentEl.appendChild(newEl);
6061
- } else {
6062
- parentEl.insertBefore(newEl, targetEl.nextSibling);
6063
- }
6064
- }
5713
+ this.opened = false;
6065
5714
 
6066
- /***/ }),
5715
+ this.doAfterClose();
5716
+ },
5717
+ doAfterClose: function doAfterClose() {
5718
+ eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
5719
+ this._closing = false;
5720
+ },
5721
+ restoreBodyStyle: function restoreBodyStyle() {
5722
+ if (this.modal && this.withoutHiddenClass) {
5723
+ document.body.style.paddingRight = this.bodyPaddingRight;
5724
+ Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* removeClass */ "i"])(document.body, 'es-popup-parent--hidden');
5725
+ }
5726
+ this.withoutHiddenClass = true;
5727
+ }
5728
+ }
5729
+ });
6067
5730
 
6068
- /***/ 54:
6069
- /***/ (function(module, exports) {
6070
5731
 
6071
- module.exports = require("eoss/lib/option");
6072
5732
 
6073
5733
  /***/ }),
6074
5734
 
6075
- /***/ 63:
5735
+ /***/ 4:
6076
5736
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6077
5737
 
6078
5738
  "use strict";
6079
- var aria = aria || {};
5739
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
5740
+ /* globals __VUE_SSR_CONTEXT__ */
6080
5741
 
6081
- aria.Utils = aria.Utils || {};
5742
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
5743
+ // This module is a runtime utility for cleaner component module output and will
5744
+ // be included in the final webpack user bundle.
6082
5745
 
6083
- /**
6084
- * @desc Set focus on descendant nodes until the first focusable element is
6085
- * found.
6086
- * @param element
6087
- * DOM node for which to find the first focusable descendant.
6088
- * @returns
6089
- * true if a focusable element is found and focus is set.
6090
- */
6091
- aria.Utils.focusFirstDescendant = function (element) {
6092
- for (var i = 0; i < element.childNodes.length; i++) {
6093
- var child = element.childNodes[i];
6094
- if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
6095
- return true;
6096
- }
6097
- }
6098
- return false;
6099
- };
5746
+ function normalizeComponent(
5747
+ scriptExports,
5748
+ render,
5749
+ staticRenderFns,
5750
+ functionalTemplate,
5751
+ injectStyles,
5752
+ scopeId,
5753
+ moduleIdentifier /* server only */,
5754
+ shadowMode /* vue-cli only */
5755
+ ) {
5756
+ // Vue.extend constructor export interop
5757
+ var options =
5758
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
6100
5759
 
6101
- /**
6102
- * @desc Find the last descendant node that is focusable.
6103
- * @param element
6104
- * DOM node for which to find the last focusable descendant.
6105
- * @returns
6106
- * true if a focusable element is found and focus is set.
6107
- */
5760
+ // render functions
5761
+ if (render) {
5762
+ options.render = render
5763
+ options.staticRenderFns = staticRenderFns
5764
+ options._compiled = true
5765
+ }
6108
5766
 
6109
- aria.Utils.focusLastDescendant = function (element) {
6110
- for (var i = element.childNodes.length - 1; i >= 0; i--) {
6111
- var child = element.childNodes[i];
6112
- if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
6113
- return true;
6114
- }
5767
+ // functional template
5768
+ if (functionalTemplate) {
5769
+ options.functional = true
6115
5770
  }
6116
- return false;
6117
- };
6118
5771
 
6119
- /**
6120
- * @desc Set Attempt to set focus on the current node.
6121
- * @param element
6122
- * The node to attempt to focus on.
6123
- * @returns
6124
- * true if element is focused.
6125
- */
6126
- aria.Utils.attemptFocus = function (element) {
6127
- if (!aria.Utils.isFocusable(element)) {
6128
- return false;
5772
+ // scopedId
5773
+ if (scopeId) {
5774
+ options._scopeId = 'data-v-' + scopeId
6129
5775
  }
6130
- aria.Utils.IgnoreUtilFocusChanges = true;
6131
- try {
6132
- element.focus();
6133
- } catch (e) {}
6134
- aria.Utils.IgnoreUtilFocusChanges = false;
6135
- return document.activeElement === element;
6136
- };
6137
5776
 
6138
- aria.Utils.isFocusable = function (element) {
6139
- if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
6140
- return true;
5777
+ var hook
5778
+ if (moduleIdentifier) {
5779
+ // server build
5780
+ hook = function (context) {
5781
+ // 2.3 injection
5782
+ context =
5783
+ context || // cached call
5784
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
5785
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
5786
+ // 2.2 with runInNewContext: true
5787
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
5788
+ context = __VUE_SSR_CONTEXT__
5789
+ }
5790
+ // inject component styles
5791
+ if (injectStyles) {
5792
+ injectStyles.call(this, context)
5793
+ }
5794
+ // register component module identifier for async chunk inferrence
5795
+ if (context && context._registeredComponents) {
5796
+ context._registeredComponents.add(moduleIdentifier)
5797
+ }
5798
+ }
5799
+ // used by ssr in case component is cached and beforeCreate
5800
+ // never gets called
5801
+ options._ssrRegister = hook
5802
+ } else if (injectStyles) {
5803
+ hook = shadowMode
5804
+ ? function () {
5805
+ injectStyles.call(
5806
+ this,
5807
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
5808
+ )
5809
+ }
5810
+ : injectStyles
6141
5811
  }
6142
5812
 
6143
- if (element.disabled) {
6144
- return false;
5813
+ if (hook) {
5814
+ if (options.functional) {
5815
+ // for template-only hot-reload because in that case the render fn doesn't
5816
+ // go through the normalizer
5817
+ options._injectStyles = hook
5818
+ // register for functional component in vue file
5819
+ var originalRender = options.render
5820
+ options.render = function renderWithStyleInjection(h, context) {
5821
+ hook.call(context)
5822
+ return originalRender(h, context)
5823
+ }
5824
+ } else {
5825
+ // inject component registration as beforeCreate hook
5826
+ var existing = options.beforeCreate
5827
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
5828
+ }
6145
5829
  }
6146
5830
 
6147
- switch (element.nodeName) {
6148
- case 'A':
6149
- return !!element.href && element.rel !== 'ignore';
6150
- case 'INPUT':
6151
- return element.type !== 'hidden' && element.type !== 'file';
6152
- case 'BUTTON':
6153
- case 'SELECT':
6154
- case 'TEXTAREA':
6155
- return true;
6156
- default:
6157
- return false;
5831
+ return {
5832
+ exports: scriptExports,
5833
+ options: options
6158
5834
  }
6159
- };
5835
+ }
6160
5836
 
6161
- /**
6162
- * 触发一个事件
6163
- * mouseenter, mouseleave, mouseover, keyup, change, click 等
6164
- * @param {Element} elm
6165
- * @param {String} name
6166
- * @param {*} opts
6167
- */
6168
- aria.Utils.triggerEvent = function (elm, name) {
6169
- var eventName = void 0;
6170
5837
 
6171
- if (/^mouse|click/.test(name)) {
6172
- eventName = 'MouseEvents';
6173
- } else if (/^key/.test(name)) {
6174
- eventName = 'KeyboardEvent';
6175
- } else {
6176
- eventName = 'HTMLEvents';
6177
- }
6178
- var evt = document.createEvent(eventName);
5838
+ /***/ }),
6179
5839
 
6180
- for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6181
- opts[_key - 2] = arguments[_key];
6182
- }
5840
+ /***/ 40:
5841
+ /***/ (function(module, exports) {
6183
5842
 
6184
- evt.initEvent.apply(evt, [name].concat(opts));
6185
- elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
5843
+ module.exports = require("eoss/lib/select");
6186
5844
 
6187
- return elm;
6188
- };
5845
+ /***/ }),
6189
5846
 
6190
- aria.Utils.keys = {
6191
- tab: 9,
6192
- enter: 13,
6193
- space: 32,
6194
- left: 37,
6195
- up: 38,
6196
- right: 39,
6197
- down: 40,
6198
- esc: 27
6199
- };
5847
+ /***/ 45:
5848
+ /***/ (function(module, exports) {
5849
+
5850
+ var g;
5851
+
5852
+ // This works in non-strict mode
5853
+ g = (function() {
5854
+ return this;
5855
+ })();
5856
+
5857
+ try {
5858
+ // This works if eval is allowed (see CSP)
5859
+ g = g || new Function("return this")();
5860
+ } catch (e) {
5861
+ // This works if the window reference is available
5862
+ if (typeof window === "object") g = window;
5863
+ }
5864
+
5865
+ // g can still be undefined, but nothing to do about it...
5866
+ // We return undefined, instead of nothing here, so it's
5867
+ // easier to handle this case. if(!global) { ...}
5868
+
5869
+ module.exports = g;
6200
5870
 
6201
- /* harmony default export */ __webpack_exports__["a"] = (aria.Utils);
6202
5871
 
6203
5872
  /***/ }),
6204
5873
 
6205
- /***/ 7:
5874
+ /***/ 49:
5875
+ /***/ (function(module, exports) {
5876
+
5877
+ module.exports = require("eoss/lib/option");
5878
+
5879
+ /***/ }),
5880
+
5881
+ /***/ 6:
6206
5882
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6207
5883
 
6208
5884
  "use strict";
6209
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return fecha; });
6210
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getSettings; });
6211
- /* unused harmony export toDate */
6212
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return isDate; });
6213
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return isDateObject; });
6214
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return formatDate; });
6215
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return parseDate; });
6216
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getDayCountOfMonth; });
6217
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getDayCountOfYear; });
6218
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getFirstDayOfMonth; });
6219
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return prevDate; });
6220
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return nextDate; });
6221
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getStartDateOfMonth; });
6222
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getWeekNumber; });
6223
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getRangeHours; });
6224
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getPrevMonthLastDays; });
6225
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getMonthDays; });
6226
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getRangeMinutes; });
6227
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return range; });
6228
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return modifyDate; });
6229
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return modifyTime; });
6230
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return modifyWithTimeString; });
6231
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearTime; });
6232
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return clearMilliseconds; });
6233
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return limitTimeRange; });
6234
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return timeWithinRange; });
6235
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeYearMonthAndClampDate; });
6236
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return prevMonth; });
6237
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return nextMonth; });
6238
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return prevYear; });
6239
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return nextYear; });
6240
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return extractDateFormat; });
6241
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return extractTimeFormat; });
6242
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return validateRangeInOneMonth; });
6243
- /* unused harmony export calculateNetworkDays */
6244
- /* unused harmony export dateAddDays */
6245
- /* unused harmony export dateDiff */
6246
- /* unused harmony export dayOfMonth */
6247
- /* unused harmony export getCurrentDate */
6248
- /* unused harmony export getCurrentDateTime */
6249
- /* unused harmony export getHour */
6250
- /* unused harmony export getMinute */
6251
- /* unused harmony export getMonth */
6252
- /* unused harmony export getSecond */
6253
- /* unused harmony export getWeekday */
6254
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
5885
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
5886
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
5887
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
5888
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
5889
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
5890
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
5891
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
5892
+ /* unused harmony export setStyle */
5893
+ /* unused harmony export isScroll */
5894
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
5895
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
5896
+ /* unused harmony export insertAfter */
5897
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
5898
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
5899
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6255
5900
 
5901
+ /* istanbul ignore next */
6256
5902
 
6257
- /**
6258
- * Parse or format dates
6259
- * @class fecha
6260
- */
6261
- var fecha = {};
6262
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
6263
- var twoDigits = '\\d\\d?';
6264
- var threeDigits = '\\d{3}';
6265
- var fourDigits = '\\d{4}';
6266
- var word = '[^\\s]+';
6267
- var literal = /\[([^]*?)\]/gm;
6268
- var noop = function noop() {};
6269
5903
 
6270
- function regexEscape(str) {
6271
- return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
6272
- }
6273
5904
 
6274
- function shorten(arr, sLen) {
6275
- var newArr = [];
6276
- for (var i = 0, len = arr.length; i < len; i++) {
6277
- newArr.push(arr[i].substr(0, sLen));
6278
- }
6279
- return newArr;
6280
- }
5905
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
5906
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
5907
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
5908
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
6281
5909
 
6282
- function monthUpdate() {
6283
- return function (d, v) {
6284
- var index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
6285
- if (~index) {
6286
- d.month = index;
6287
- }
6288
- };
6289
- }
5910
+ /* istanbul ignore next */
5911
+ var trim = function trim(string) {
5912
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
5913
+ };
5914
+ /* istanbul ignore next */
5915
+ var camelCase = function camelCase(name) {
5916
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
5917
+ return offset ? letter.toUpperCase() : letter;
5918
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
5919
+ };
6290
5920
 
6291
- function pad(val, len) {
6292
- val = String(val);
6293
- len = len || 2;
6294
- while (val.length < len) {
6295
- val = '0' + val;
5921
+ /* istanbul ignore next */
5922
+ var on = function () {
5923
+ if (!isServer && document.addEventListener) {
5924
+ return function (element, event, handler) {
5925
+ if (element && event && handler) {
5926
+ element.addEventListener(event, handler, false);
5927
+ }
5928
+ };
5929
+ } else {
5930
+ return function (element, event, handler) {
5931
+ if (element && event && handler) {
5932
+ element.attachEvent('on' + event, handler);
5933
+ }
5934
+ };
6296
5935
  }
6297
- return val;
6298
- }
5936
+ }();
6299
5937
 
6300
- // 直接使用中文日期名称常量
6301
- var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
6302
- var monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
6303
- var monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
6304
- var dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
6305
- var amPm = ['上午', '下午'];
6306
- var DoFn = function DoFn(D) {
6307
- return D + '日';
6308
- };
5938
+ /* istanbul ignore next */
5939
+ var off = function () {
5940
+ if (!isServer && document.removeEventListener) {
5941
+ return function (element, event, handler) {
5942
+ if (element && event) {
5943
+ element.removeEventListener(event, handler, false);
5944
+ }
5945
+ };
5946
+ } else {
5947
+ return function (element, event, handler) {
5948
+ if (element && event) {
5949
+ element.detachEvent('on' + event, handler);
5950
+ }
5951
+ };
5952
+ }
5953
+ }();
6309
5954
 
6310
- var formatFlags = {
6311
- D: function D(dateObj) {
6312
- return dateObj.getDay();
6313
- },
6314
- DD: function DD(dateObj) {
6315
- return pad(dateObj.getDay());
6316
- },
6317
- Do: function Do(dateObj) {
6318
- return DoFn(dateObj.getDate());
6319
- },
6320
- d: function d(dateObj) {
6321
- return dateObj.getDate();
6322
- },
6323
- dd: function dd(dateObj) {
6324
- return pad(dateObj.getDate());
6325
- },
6326
- ddd: function ddd(dateObj) {
6327
- return dayNamesShort[dateObj.getDay()];
6328
- },
6329
- dddd: function dddd(dateObj) {
6330
- return dayNames[dateObj.getDay()];
6331
- },
6332
- M: function M(dateObj) {
6333
- return dateObj.getMonth() + 1;
6334
- },
6335
- MM: function MM(dateObj) {
6336
- return pad(dateObj.getMonth() + 1);
6337
- },
6338
- MMM: function MMM(dateObj) {
6339
- return monthNamesShort[dateObj.getMonth()];
6340
- },
6341
- MMMM: function MMMM(dateObj) {
6342
- return monthNames[dateObj.getMonth()];
6343
- },
6344
- yy: function yy(dateObj) {
6345
- return pad(String(dateObj.getFullYear()), 4).substr(2);
6346
- },
6347
- yyyy: function yyyy(dateObj) {
6348
- return pad(dateObj.getFullYear(), 4);
6349
- },
6350
- h: function h(dateObj) {
6351
- return dateObj.getHours() % 12 || 12;
6352
- },
6353
- hh: function hh(dateObj) {
6354
- return pad(dateObj.getHours() % 12 || 12);
6355
- },
6356
- H: function H(dateObj) {
6357
- return dateObj.getHours();
6358
- },
6359
- HH: function HH(dateObj) {
6360
- return pad(dateObj.getHours());
6361
- },
6362
- m: function m(dateObj) {
6363
- return dateObj.getMinutes();
6364
- },
6365
- mm: function mm(dateObj) {
6366
- return pad(dateObj.getMinutes());
6367
- },
6368
- s: function s(dateObj) {
6369
- return dateObj.getSeconds();
6370
- },
6371
- ss: function ss(dateObj) {
6372
- return pad(dateObj.getSeconds());
6373
- },
6374
- S: function S(dateObj) {
6375
- return Math.round(dateObj.getMilliseconds() / 100);
6376
- },
6377
- SS: function SS(dateObj) {
6378
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
6379
- },
6380
- SSS: function SSS(dateObj) {
6381
- return pad(dateObj.getMilliseconds(), 3);
6382
- },
6383
- a: function a(dateObj) {
6384
- return dateObj.getHours() < 12 ? '上午' : '下午';
6385
- },
6386
- A: function A(dateObj) {
6387
- return dateObj.getHours() < 12 ? '上午' : '下午';
6388
- },
6389
- ZZ: function ZZ(dateObj) {
6390
- var o = dateObj.getTimezoneOffset();
6391
- return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
6392
- }
6393
- };
6394
-
6395
- var parseFlags = {
6396
- d: [twoDigits, function (d, v) {
6397
- d.day = v;
6398
- }],
6399
- Do: [twoDigits + word, function (d, v) {
6400
- d.day = parseInt(v, 10);
6401
- }],
6402
- M: [twoDigits, function (d, v) {
6403
- d.month = v - 1;
6404
- }],
6405
- yy: [twoDigits, function (d, v) {
6406
- var da = new Date(),
6407
- cent = +('' + da.getFullYear()).substr(0, 2);
6408
- d.year = '' + (v > 68 ? cent - 1 : cent) + v;
6409
- }],
6410
- h: [twoDigits, function (d, v) {
6411
- d.hour = v;
6412
- }],
6413
- m: [twoDigits, function (d, v) {
6414
- d.minute = v;
6415
- }],
6416
- s: [twoDigits, function (d, v) {
6417
- d.second = v;
6418
- }],
6419
- yyyy: [fourDigits, function (d, v) {
6420
- d.year = v;
6421
- }],
6422
- S: ['\\d', function (d, v) {
6423
- d.millisecond = v * 100;
6424
- }],
6425
- SS: ['\\d{2}', function (d, v) {
6426
- d.millisecond = v * 10;
6427
- }],
6428
- SSS: [threeDigits, function (d, v) {
6429
- d.millisecond = v;
6430
- }],
6431
- D: [twoDigits, noop],
6432
- ddd: [word, noop],
6433
- MMM: [word, monthUpdate('monthNamesShort')],
6434
- MMMM: [word, monthUpdate('monthNames')],
6435
- a: [word, function (d, v) {
6436
- var val = v.toLowerCase();
6437
- if (val === '上午') {
6438
- d.isPm = false;
6439
- } else if (val === '下午') {
6440
- d.isPm = true;
6441
- }
6442
- }],
6443
- ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
6444
- var parts = (v + '').match(/([+-]|\d\d)/gi),
6445
- minutes = void 0;
6446
-
6447
- if (parts) {
6448
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
6449
- d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
5955
+ /* istanbul ignore next */
5956
+ var once = function once(el, event, fn) {
5957
+ var listener = function listener() {
5958
+ if (fn) {
5959
+ fn.apply(this, arguments);
6450
5960
  }
6451
- }]
6452
- };
6453
- parseFlags.dd = parseFlags.d;
6454
- parseFlags.dddd = parseFlags.ddd;
6455
- parseFlags.DD = parseFlags.D;
6456
- parseFlags.mm = parseFlags.m;
6457
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
6458
- parseFlags.MM = parseFlags.M;
6459
- parseFlags.ss = parseFlags.s;
6460
- parseFlags.A = parseFlags.a;
6461
-
6462
- // Some common format strings
6463
- fecha.masks = {
6464
- default: 'ddd MMM dd yyyy HH:mm:ss',
6465
- shortDate: 'M/D/yy',
6466
- mediumDate: 'MMM d, yyyy',
6467
- longDate: 'MMMM d, yyyy',
6468
- fullDate: 'dddd, MMMM d, yyyy',
6469
- shortTime: 'HH:mm',
6470
- mediumTime: 'HH:mm:ss',
6471
- longTime: 'HH:mm:ss.SSS'
5961
+ off(el, event, listener);
5962
+ };
5963
+ on(el, event, listener);
6472
5964
  };
6473
5965
 
6474
- /***
6475
- * Format a date
6476
- * @method format
6477
- * @param {Date|number} dateObj
6478
- * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
6479
- */
6480
- fecha.format = function (dateObj, mask) {
6481
- if (typeof dateObj === 'number') {
6482
- dateObj = new Date(dateObj);
5966
+ /* istanbul ignore next */
5967
+ function hasClass(el, cls) {
5968
+ if (!el || !cls) return false;
5969
+ if (cls.indexOf(' ') !== -1) {
5970
+ throw new Error('className should not contain space.');
6483
5971
  }
6484
-
6485
- if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
6486
- throw new Error('Invalid Date in fecha.format');
5972
+ if (el.classList) {
5973
+ return el.classList.contains(cls);
5974
+ } else {
5975
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
6487
5976
  }
5977
+ }
6488
5978
 
6489
- mask = fecha.masks[mask] || mask || fecha.masks['default'];
6490
-
6491
- var literals = [];
5979
+ /* istanbul ignore next */
5980
+ function addClass(el, cls) {
5981
+ if (!el) return;
5982
+ var curClass = el.className;
5983
+ var classes = (cls || '').split(' ');
6492
5984
 
6493
- // Make literals inactive by replacing them with ??
6494
- mask = mask.replace(literal, function ($0, $1) {
6495
- literals.push($1);
6496
- return '@@@';
6497
- });
6498
- // Apply formatting rules
6499
- mask = mask.replace(token, function ($0) {
6500
- return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
6501
- });
6502
- // Inline literal values back into the formatted value
6503
- return mask.replace(/@@@/g, function () {
6504
- return literals.shift();
6505
- });
6506
- };
5985
+ for (var i = 0, j = classes.length; i < j; i++) {
5986
+ var clsName = classes[i];
5987
+ if (!clsName) continue;
6507
5988
 
6508
- /**
6509
- * Parse a date string into an object, changes - into /
6510
- * @method parse
6511
- * @param {string} dateStr Date string
6512
- * @param {string} format Date parse format
6513
- * @returns {Date|boolean}
6514
- */
6515
- fecha.parse = function (dateStr, format) {
6516
- if (typeof format !== 'string') {
6517
- throw new Error('Invalid format in fecha.parse');
5989
+ if (el.classList) {
5990
+ el.classList.add(clsName);
5991
+ } else if (!hasClass(el, clsName)) {
5992
+ curClass += ' ' + clsName;
5993
+ }
6518
5994
  }
6519
-
6520
- format = fecha.masks[format] || format;
6521
-
6522
- // Avoid regular expression denial of service, fail early for really long strings
6523
- // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
6524
- if (dateStr.length > 1000) {
6525
- return null;
5995
+ if (!el.classList) {
5996
+ el.className = curClass;
6526
5997
  }
5998
+ }
6527
5999
 
6528
- var dateInfo = {};
6529
- var parseInfo = [];
6530
- var literals = [];
6531
- format = format.replace(literal, function ($0, $1) {
6532
- literals.push($1);
6533
- return '@@@';
6534
- });
6535
- var newFormat = regexEscape(format).replace(token, function ($0) {
6536
- if (parseFlags[$0]) {
6537
- var info = parseFlags[$0];
6538
- parseInfo.push(info[1]);
6539
- return '(' + info[0] + ')';
6540
- }
6000
+ /* istanbul ignore next */
6001
+ function removeClass(el, cls) {
6002
+ if (!el || !cls) return;
6003
+ var classes = cls.split(' ');
6004
+ var curClass = ' ' + el.className + ' ';
6541
6005
 
6542
- return $0;
6543
- });
6544
- newFormat = newFormat.replace(/@@@/g, function () {
6545
- return literals.shift();
6546
- });
6547
- var matches = dateStr.match(new RegExp(newFormat, 'i'));
6548
- if (!matches) {
6549
- return null;
6550
- }
6006
+ for (var i = 0, j = classes.length; i < j; i++) {
6007
+ var clsName = classes[i];
6008
+ if (!clsName) continue;
6551
6009
 
6552
- for (var i = 1; i < matches.length; i++) {
6553
- parseInfo[i - 1](dateInfo, matches[i]);
6010
+ if (el.classList) {
6011
+ el.classList.remove(clsName);
6012
+ } else if (hasClass(el, clsName)) {
6013
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
6014
+ }
6554
6015
  }
6555
-
6556
- var today = new Date();
6557
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
6558
- dateInfo.hour = +dateInfo.hour + 12;
6559
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
6560
- dateInfo.hour = 0;
6016
+ if (!el.classList) {
6017
+ el.className = trim(curClass);
6561
6018
  }
6019
+ }
6562
6020
 
6563
- var date = void 0;
6564
- if (dateInfo.timezoneOffset != null) {
6565
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
6566
- date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
6567
- } else {
6568
- date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
6021
+ /* istanbul ignore next */
6022
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
6023
+ if (isServer) return;
6024
+ if (!element || !styleName) return null;
6025
+ styleName = camelCase(styleName);
6026
+ if (styleName === 'float') {
6027
+ styleName = 'styleFloat';
6569
6028
  }
6570
- return date;
6571
- };
6572
-
6573
- // 导出fecha对象
6574
-
6575
-
6576
- // 以下是从date-util.js合并的函数
6577
- var newArray = function newArray(start, end) {
6578
- var result = [];
6579
- for (var i = start; i <= end; i++) {
6580
- result.push(i);
6029
+ try {
6030
+ switch (styleName) {
6031
+ case 'opacity':
6032
+ try {
6033
+ return element.filters.item('alpha').opacity / 100;
6034
+ } catch (e) {
6035
+ return 1.0;
6036
+ }
6037
+ default:
6038
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
6039
+ }
6040
+ } catch (e) {
6041
+ return element.style[styleName];
6581
6042
  }
6582
- return result;
6583
- };
6584
-
6585
- var getSettings = function getSettings() {
6586
- return {
6587
- dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
6588
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
6589
- monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
6590
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
6591
- amPm: ['上午', '下午']
6592
- };
6593
- };
6594
-
6595
- var toDate = function toDate(date) {
6596
- return isDate(date) ? new Date(date) : null;
6597
- };
6598
-
6599
- var isDate = function isDate(date) {
6600
- if (date === null || date === undefined) return false;
6601
- if (isNaN(new Date(date).getTime())) return false;
6602
- if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
6603
- return true;
6604
- };
6605
-
6606
- var isDateObject = function isDateObject(val) {
6607
- return val instanceof Date;
6608
- };
6609
-
6610
- var formatDate = function formatDate(date) {
6611
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-MM-dd';
6612
-
6613
- // 处理多种输入类型
6614
- if (!date) return '';
6615
-
6616
- // 如果是时间戳,转成日期对象
6617
- if (typeof date === 'number') {
6618
- date = new Date(date);
6043
+ } : function (element, styleName) {
6044
+ if (isServer) return;
6045
+ if (!element || !styleName) return null;
6046
+ styleName = camelCase(styleName);
6047
+ if (styleName === 'float') {
6048
+ styleName = 'cssFloat';
6619
6049
  }
6620
- // 如果是字符串,转成日期对象
6621
- if (typeof date === 'string') {
6622
- date = new Date(date);
6050
+ try {
6051
+ var computed = document.defaultView.getComputedStyle(element, '');
6052
+ return element.style[styleName] || computed ? computed[styleName] : null;
6053
+ } catch (e) {
6054
+ return element.style[styleName];
6623
6055
  }
6624
-
6625
- // 调用toDate进一步验证和转换
6626
- date = toDate(date);
6627
- if (!date) return '';
6628
-
6629
- // 兼容大写和小写的格式标记
6630
- // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
6631
- var lowercaseFormat = format.replace(/YYYY/g, 'yyyy').replace(/D/g, 'd');
6632
-
6633
- // 使用fecha库进行格式化,支持中文配置
6634
- var str = fecha.format(date, lowercaseFormat, getSettings());
6635
- return str;
6636
- };
6637
-
6638
- var parseDate = function parseDate(string, format) {
6639
- return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
6640
6056
  };
6641
6057
 
6642
- var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
6643
- if (month === 3 || month === 5 || month === 8 || month === 10) {
6644
- return 30;
6645
- }
6058
+ /* istanbul ignore next */
6059
+ function setStyle(element, styleName, value) {
6060
+ if (!element || !styleName) return;
6646
6061
 
6647
- if (month === 1) {
6648
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
6649
- return 29;
6062
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
6063
+ for (var prop in styleName) {
6064
+ if (styleName.hasOwnProperty(prop)) {
6065
+ setStyle(element, prop, styleName[prop]);
6066
+ }
6067
+ }
6068
+ } else {
6069
+ styleName = camelCase(styleName);
6070
+ if (styleName === 'opacity' && ieVersion < 9) {
6071
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
6650
6072
  } else {
6651
- return 28;
6073
+ element.style[styleName] = value;
6652
6074
  }
6653
6075
  }
6076
+ }
6654
6077
 
6655
- return 31;
6656
- };
6078
+ var isScroll = function isScroll(el, vertical) {
6079
+ if (isServer) return;
6657
6080
 
6658
- var getDayCountOfYear = function getDayCountOfYear(year) {
6659
- var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
6660
- return isLeapYear ? 366 : 365;
6661
- };
6081
+ var determinedDirection = vertical !== null || vertical !== undefined;
6082
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
6662
6083
 
6663
- var getFirstDayOfMonth = function getFirstDayOfMonth(date) {
6664
- var temp = new Date(date.getTime());
6665
- temp.setDate(1);
6666
- return temp.getDay();
6084
+ return overflow.match(/(scroll|auto)/);
6667
6085
  };
6668
6086
 
6669
- // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
6670
- // {prev, next} Date should work for Daylight Saving Time
6671
- // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
6672
- var prevDate = function prevDate(date) {
6673
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
6674
-
6675
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
6676
- };
6087
+ var getScrollContainer = function getScrollContainer(el, vertical) {
6088
+ if (isServer) return;
6677
6089
 
6678
- var nextDate = function nextDate(date) {
6679
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
6090
+ var parent = el;
6091
+ while (parent) {
6092
+ if ([window, document, document.documentElement].includes(parent)) {
6093
+ return window;
6094
+ }
6095
+ if (isScroll(parent, vertical)) {
6096
+ return parent;
6097
+ }
6098
+ parent = parent.parentNode;
6099
+ }
6680
6100
 
6681
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
6101
+ return parent;
6682
6102
  };
6683
6103
 
6684
- var getStartDateOfMonth = function getStartDateOfMonth(year, month) {
6685
- var result = new Date(year, month, 1);
6686
- var day = result.getDay();
6104
+ var isInContainer = function isInContainer(el, container) {
6105
+ if (isServer || !el || !container) return false;
6687
6106
 
6688
- if (day === 0) {
6689
- return prevDate(result, 7);
6690
- } else {
6691
- return prevDate(result, day);
6692
- }
6693
- };
6107
+ var elRect = el.getBoundingClientRect();
6108
+ var containerRect = void 0;
6694
6109
 
6695
- var getWeekNumber = function getWeekNumber(date) {
6696
- // 支持多种输入类型
6697
- if (!date || !isDate(date)) {
6698
- date = new Date();
6699
- }
6700
- if (typeof date === 'string') {
6701
- date = new Date(date);
6110
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
6111
+ containerRect = {
6112
+ top: 0,
6113
+ right: window.innerWidth,
6114
+ bottom: window.innerHeight,
6115
+ left: 0
6116
+ };
6117
+ } else {
6118
+ containerRect = container.getBoundingClientRect();
6702
6119
  }
6703
6120
 
6704
- // 验证日期有效性
6705
- if (!isDate(date)) return null;
6706
-
6707
- var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
6708
- // 设置为最近的星期四:当前日期 + 4 - 当前星期数
6709
- // 将星期日的星期数设为7
6710
- d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
6711
- // 获取当年的第一天
6712
- var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
6713
- // 计算到最近的星期四的完整周数
6714
- var weekNo = Math.ceil(((d - yearStart) / 86400000 + 1) / 7);
6715
- // 返回周数
6716
- return weekNo;
6121
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
6717
6122
  };
6718
6123
 
6719
- var getRangeHours = function getRangeHours(ranges) {
6720
- var hours = [];
6721
- var disabledHours = [];
6722
-
6723
- (ranges || []).forEach(function (range) {
6724
- var value = range.map(function (date) {
6725
- return date.getHours();
6726
- });
6727
-
6728
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
6729
- });
6730
-
6731
- if (disabledHours.length) {
6732
- for (var i = 0; i < 24; i++) {
6733
- hours[i] = disabledHours.indexOf(i) === -1;
6734
- }
6124
+ /**
6125
+ * 在元素前插入元素
6126
+ * @param {HTMLElement} newEl 新DOM元素
6127
+ * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
6128
+ */
6129
+ function insertAfter(newEl, targetEl) {
6130
+ var parentEl = targetEl.parentNode;
6131
+ if (parentEl.lastChild === targetEl) {
6132
+ parentEl.appendChild(newEl);
6735
6133
  } else {
6736
- for (var _i = 0; _i < 24; _i++) {
6737
- hours[_i] = false;
6738
- }
6134
+ parentEl.insertBefore(newEl, targetEl.nextSibling);
6739
6135
  }
6136
+ }
6740
6137
 
6741
- return hours;
6742
- };
6138
+ /***/ }),
6743
6139
 
6744
- var getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
6745
- if (amount <= 0) return [];
6746
- var temp = new Date(date.getTime());
6747
- temp.setDate(0);
6748
- var lastDay = temp.getDate();
6749
- return range(amount).map(function (_, index) {
6750
- return lastDay - (amount - index - 1);
6751
- });
6752
- };
6140
+ /***/ 65:
6141
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6753
6142
 
6754
- var getMonthDays = function getMonthDays(date) {
6755
- var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
6756
- var days = temp.getDate();
6757
- return range(days).map(function (_, index) {
6758
- return index + 1;
6759
- });
6760
- };
6143
+ "use strict";
6144
+ var aria = aria || {};
6761
6145
 
6762
- function setRangeData(arr, start, end, value) {
6763
- for (var i = start; i < end; i++) {
6764
- arr[i] = value;
6765
- }
6766
- }
6146
+ aria.Utils = aria.Utils || {};
6767
6147
 
6768
- var getRangeMinutes = function getRangeMinutes(ranges, hour) {
6769
- var minutes = new Array(60);
6770
-
6771
- if (ranges.length > 0) {
6772
- ranges.forEach(function (range) {
6773
- var start = range[0];
6774
- var end = range[1];
6775
- var startHour = start.getHours();
6776
- var startMinute = start.getMinutes();
6777
- var endHour = end.getHours();
6778
- var endMinute = end.getMinutes();
6779
- if (startHour === hour && endHour !== hour) {
6780
- setRangeData(minutes, startMinute, 60, true);
6781
- } else if (startHour === hour && endHour === hour) {
6782
- setRangeData(minutes, startMinute, endMinute + 1, true);
6783
- } else if (startHour !== hour && endHour === hour) {
6784
- setRangeData(minutes, 0, endMinute + 1, true);
6785
- } else if (startHour < hour && endHour > hour) {
6786
- setRangeData(minutes, 0, 60, true);
6787
- }
6788
- });
6789
- } else {
6790
- setRangeData(minutes, 0, 60, true);
6148
+ /**
6149
+ * @desc Set focus on descendant nodes until the first focusable element is
6150
+ * found.
6151
+ * @param element
6152
+ * DOM node for which to find the first focusable descendant.
6153
+ * @returns
6154
+ * true if a focusable element is found and focus is set.
6155
+ */
6156
+ aria.Utils.focusFirstDescendant = function (element) {
6157
+ for (var i = 0; i < element.childNodes.length; i++) {
6158
+ var child = element.childNodes[i];
6159
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
6160
+ return true;
6161
+ }
6791
6162
  }
6792
- return minutes;
6793
- };
6794
-
6795
- var range = function range(n) {
6796
- // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
6797
- return Array.apply(null, { length: n }).map(function (_, n) {
6798
- return n;
6799
- });
6800
- };
6801
-
6802
- var modifyDate = function modifyDate(date, y, m, d) {
6803
- return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
6163
+ return false;
6804
6164
  };
6805
6165
 
6806
- var modifyTime = function modifyTime(date, h, m, s) {
6807
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
6808
- };
6166
+ /**
6167
+ * @desc Find the last descendant node that is focusable.
6168
+ * @param element
6169
+ * DOM node for which to find the last focusable descendant.
6170
+ * @returns
6171
+ * true if a focusable element is found and focus is set.
6172
+ */
6809
6173
 
6810
- var modifyWithTimeString = function modifyWithTimeString(date, time) {
6811
- if (date == null || !time) {
6812
- return date;
6174
+ aria.Utils.focusLastDescendant = function (element) {
6175
+ for (var i = element.childNodes.length - 1; i >= 0; i--) {
6176
+ var child = element.childNodes[i];
6177
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
6178
+ return true;
6179
+ }
6813
6180
  }
6814
- time = parseDate(time, 'HH:mm:ss');
6815
- return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
6816
- };
6817
-
6818
- var clearTime = function clearTime(date) {
6819
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
6181
+ return false;
6820
6182
  };
6821
6183
 
6822
- var clearMilliseconds = function clearMilliseconds(date) {
6823
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
6184
+ /**
6185
+ * @desc Set Attempt to set focus on the current node.
6186
+ * @param element
6187
+ * The node to attempt to focus on.
6188
+ * @returns
6189
+ * true if element is focused.
6190
+ */
6191
+ aria.Utils.attemptFocus = function (element) {
6192
+ if (!aria.Utils.isFocusable(element)) {
6193
+ return false;
6194
+ }
6195
+ aria.Utils.IgnoreUtilFocusChanges = true;
6196
+ try {
6197
+ element.focus();
6198
+ } catch (e) {}
6199
+ aria.Utils.IgnoreUtilFocusChanges = false;
6200
+ return document.activeElement === element;
6824
6201
  };
6825
6202
 
6826
- var limitTimeRange = function limitTimeRange(date, ranges) {
6827
- var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
6828
-
6829
- // TODO: refactory a more elegant solution
6830
- if (ranges.length === 0) return date;
6831
- var normalizeDate = function normalizeDate(date) {
6832
- return fecha.parse(fecha.format(date, format), format);
6833
- };
6834
- var ndate = normalizeDate(date);
6835
- var nranges = ranges.map(function (range) {
6836
- return range.map(normalizeDate);
6837
- });
6838
- if (nranges.some(function (nrange) {
6839
- return ndate >= nrange[0] && ndate <= nrange[1];
6840
- })) return date;
6841
-
6842
- var minDate = nranges[0][0];
6843
- var maxDate = nranges[0][0];
6844
-
6845
- nranges.forEach(function (nrange) {
6846
- minDate = new Date(Math.min(nrange[0], minDate));
6847
- maxDate = new Date(Math.max(nrange[1], minDate));
6848
- });
6203
+ aria.Utils.isFocusable = function (element) {
6204
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
6205
+ return true;
6206
+ }
6849
6207
 
6850
- var ret = ndate < minDate ? minDate : maxDate;
6851
- // preserve Year/Month/Date
6852
- return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
6853
- };
6208
+ if (element.disabled) {
6209
+ return false;
6210
+ }
6854
6211
 
6855
- var timeWithinRange = function timeWithinRange(date, selectableRange, format) {
6856
- var limitedDate = limitTimeRange(date, selectableRange, format);
6857
- return limitedDate.getTime() === date.getTime();
6212
+ switch (element.nodeName) {
6213
+ case 'A':
6214
+ return !!element.href && element.rel !== 'ignore';
6215
+ case 'INPUT':
6216
+ return element.type !== 'hidden' && element.type !== 'file';
6217
+ case 'BUTTON':
6218
+ case 'SELECT':
6219
+ case 'TEXTAREA':
6220
+ return true;
6221
+ default:
6222
+ return false;
6223
+ }
6858
6224
  };
6859
6225
 
6860
- var changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
6861
- // clamp date to the number of days in `year`, `month`
6862
- // eg: (2010-1-31, 2010, 2) => 2010-2-28
6863
- var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
6864
- return modifyDate(date, year, month, monthDate);
6865
- };
6226
+ /**
6227
+ * 触发一个事件
6228
+ * mouseenter, mouseleave, mouseover, keyup, change, click 等
6229
+ * @param {Element} elm
6230
+ * @param {String} name
6231
+ * @param {*} opts
6232
+ */
6233
+ aria.Utils.triggerEvent = function (elm, name) {
6234
+ var eventName = void 0;
6866
6235
 
6867
- var prevMonth = function prevMonth(date) {
6868
- var year = date.getFullYear();
6869
- var month = date.getMonth();
6870
- return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
6871
- };
6236
+ if (/^mouse|click/.test(name)) {
6237
+ eventName = 'MouseEvents';
6238
+ } else if (/^key/.test(name)) {
6239
+ eventName = 'KeyboardEvent';
6240
+ } else {
6241
+ eventName = 'HTMLEvents';
6242
+ }
6243
+ var evt = document.createEvent(eventName);
6872
6244
 
6873
- var nextMonth = function nextMonth(date) {
6874
- var year = date.getFullYear();
6875
- var month = date.getMonth();
6876
- return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
6877
- };
6245
+ for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6246
+ opts[_key - 2] = arguments[_key];
6247
+ }
6878
6248
 
6879
- var prevYear = function prevYear(date) {
6880
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
6249
+ evt.initEvent.apply(evt, [name].concat(opts));
6250
+ elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
6881
6251
 
6882
- var year = date.getFullYear();
6883
- var month = date.getMonth();
6884
- return changeYearMonthAndClampDate(date, year - amount, month);
6252
+ return elm;
6885
6253
  };
6886
6254
 
6887
- var nextYear = function nextYear(date) {
6888
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
6889
-
6890
- var year = date.getFullYear();
6891
- var month = date.getMonth();
6892
- return changeYearMonthAndClampDate(date, year + amount, month);
6255
+ aria.Utils.keys = {
6256
+ tab: 9,
6257
+ enter: 13,
6258
+ space: 32,
6259
+ left: 37,
6260
+ up: 38,
6261
+ right: 39,
6262
+ down: 40,
6263
+ esc: 27
6893
6264
  };
6894
6265
 
6895
- var extractDateFormat = function extractDateFormat(format) {
6896
- return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
6897
- };
6266
+ /* harmony default export */ __webpack_exports__["a"] = (aria.Utils);
6898
6267
 
6899
- var extractTimeFormat = function extractTimeFormat(format) {
6900
- return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
6901
- };
6268
+ /***/ }),
6902
6269
 
6903
- var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
6904
- return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
6905
- };
6270
+ /***/ 7:
6271
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6906
6272
 
6273
+ "use strict";
6274
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return fecha; });
6275
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getSettings; });
6276
+ /* unused harmony export toDate */
6277
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return isDate; });
6278
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return isDateObject; });
6279
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return formatDate; });
6280
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return parseDate; });
6281
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getDayCountOfMonth; });
6282
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getDayCountOfYear; });
6283
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getFirstDayOfMonth; });
6284
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return prevDate; });
6285
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return nextDate; });
6286
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getStartDateOfMonth; });
6287
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getWeekNumber; });
6288
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getRangeHours; });
6289
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getPrevMonthLastDays; });
6290
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getMonthDays; });
6291
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getRangeMinutes; });
6292
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return range; });
6293
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return modifyDate; });
6294
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return modifyTime; });
6295
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return modifyWithTimeString; });
6296
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearTime; });
6297
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return clearMilliseconds; });
6298
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return limitTimeRange; });
6299
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return timeWithinRange; });
6300
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeYearMonthAndClampDate; });
6301
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return prevMonth; });
6302
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return nextMonth; });
6303
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return prevYear; });
6304
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return nextYear; });
6305
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return extractDateFormat; });
6306
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return extractTimeFormat; });
6307
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return validateRangeInOneMonth; });
6308
+ /* unused harmony export calculateNetworkDays */
6309
+ /* unused harmony export dateAddDays */
6310
+ /* unused harmony export dateDiff */
6311
+ /* unused harmony export dayOfMonth */
6312
+ /* unused harmony export getCurrentDate */
6313
+ /* unused harmony export getCurrentDateTime */
6314
+ /* unused harmony export getHour */
6315
+ /* unused harmony export getMinute */
6316
+ /* unused harmony export getMonth */
6317
+ /* unused harmony export getSecond */
6318
+ /* unused harmony export getWeekday */
6319
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
6320
+ /* Modified from https://github.com/taylorhakes/fecha
6321
+ *
6322
+ * The MIT License (MIT)
6323
+ *
6324
+ * Copyright (c) 2015 Taylor Hakes
6325
+ *
6326
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6327
+ * of this software and associated documentation files (the "Software"), to deal
6328
+ * in the Software without restriction, including without limitation the rights
6329
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6330
+ * copies of the Software, and to permit persons to whom the Software is
6331
+ * furnished to do so, subject to the following conditions:
6332
+ *
6333
+ * The above copyright notice and this permission notice shall be included in all
6334
+ * copies or substantial portions of the Software.
6335
+ *
6336
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6337
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6338
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6339
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
6340
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6341
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6342
+ * SOFTWARE.
6343
+ */
6344
+
6345
+ /*eslint-disable*/
6346
+ // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
6347
+
6348
+
6349
+ /**
6350
+ * Parse or format dates
6351
+ * @class fecha
6352
+ */
6353
+ const fecha = {};
6354
+ const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
6355
+ const twoDigits = '\\d\\d?';
6356
+ const threeDigits = '\\d{3}';
6357
+ const fourDigits = '\\d{4}';
6358
+ const word = '[^\\s]+';
6359
+ const literal = /\[([^]*?)\]/gm;
6360
+ const noop = function () {};
6361
+
6362
+ function regexEscape(str) {
6363
+ return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
6364
+ }
6365
+
6366
+ function shorten(arr, sLen) {
6367
+ const newArr = [];
6368
+ for (let i = 0, len = arr.length; i < len; i++) {
6369
+ newArr.push(arr[i].substr(0, sLen));
6370
+ }
6371
+ return newArr;
6372
+ }
6373
+
6374
+ function monthUpdate() {
6375
+ return function (d, v) {
6376
+ const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
6377
+ if (~index) {
6378
+ d.month = index;
6379
+ }
6380
+ };
6381
+ }
6382
+
6383
+ function pad(val, len) {
6384
+ val = String(val);
6385
+ len = len || 2;
6386
+ while (val.length < len) {
6387
+ val = '0' + val;
6388
+ }
6389
+ return val;
6390
+ }
6391
+
6392
+ // 直接使用中文日期名称常量
6393
+ const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
6394
+ const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
6395
+ const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
6396
+ const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
6397
+ const amPm = ['上午', '下午'];
6398
+ const DoFn = function DoFn(D) {
6399
+ return D + '日';
6400
+ };
6401
+
6402
+ const formatFlags = {
6403
+ D: function(dateObj) {
6404
+ return dateObj.getDay();
6405
+ },
6406
+ DD: function(dateObj) {
6407
+ return pad(dateObj.getDay());
6408
+ },
6409
+ Do: function(dateObj) {
6410
+ return DoFn(dateObj.getDate());
6411
+ },
6412
+ d: function(dateObj) {
6413
+ return dateObj.getDate();
6414
+ },
6415
+ dd: function(dateObj) {
6416
+ return pad(dateObj.getDate());
6417
+ },
6418
+ ddd: function(dateObj) {
6419
+ return dayNamesShort[dateObj.getDay()];
6420
+ },
6421
+ dddd: function(dateObj) {
6422
+ return dayNames[dateObj.getDay()];
6423
+ },
6424
+ M: function(dateObj) {
6425
+ return dateObj.getMonth() + 1;
6426
+ },
6427
+ MM: function(dateObj) {
6428
+ return pad(dateObj.getMonth() + 1);
6429
+ },
6430
+ MMM: function(dateObj) {
6431
+ return monthNamesShort[dateObj.getMonth()];
6432
+ },
6433
+ MMMM: function(dateObj) {
6434
+ return monthNames[dateObj.getMonth()];
6435
+ },
6436
+ yy: function(dateObj) {
6437
+ return pad(String(dateObj.getFullYear()), 4).substr(2);
6438
+ },
6439
+ yyyy: function(dateObj) {
6440
+ return pad(dateObj.getFullYear(), 4);
6441
+ },
6442
+ h: function(dateObj) {
6443
+ return dateObj.getHours() % 12 || 12;
6444
+ },
6445
+ hh: function(dateObj) {
6446
+ return pad(dateObj.getHours() % 12 || 12);
6447
+ },
6448
+ H: function(dateObj) {
6449
+ return dateObj.getHours();
6450
+ },
6451
+ HH: function(dateObj) {
6452
+ return pad(dateObj.getHours());
6453
+ },
6454
+ m: function(dateObj) {
6455
+ return dateObj.getMinutes();
6456
+ },
6457
+ mm: function(dateObj) {
6458
+ return pad(dateObj.getMinutes());
6459
+ },
6460
+ s: function(dateObj) {
6461
+ return dateObj.getSeconds();
6462
+ },
6463
+ ss: function(dateObj) {
6464
+ return pad(dateObj.getSeconds());
6465
+ },
6466
+ S: function(dateObj) {
6467
+ return Math.round(dateObj.getMilliseconds() / 100);
6468
+ },
6469
+ SS: function(dateObj) {
6470
+ return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
6471
+ },
6472
+ SSS: function(dateObj) {
6473
+ return pad(dateObj.getMilliseconds(), 3);
6474
+ },
6475
+ a: function(dateObj) {
6476
+ return dateObj.getHours() < 12 ? '上午' : '下午';
6477
+ },
6478
+ A: function(dateObj) {
6479
+ return dateObj.getHours() < 12 ? '上午' : '下午';
6480
+ },
6481
+ ZZ: function(dateObj) {
6482
+ const o = dateObj.getTimezoneOffset();
6483
+ return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
6484
+ }
6485
+ };
6486
+
6487
+ const parseFlags = {
6488
+ d: [twoDigits, function (d, v) {
6489
+ d.day = v;
6490
+ }],
6491
+ Do: [twoDigits + word, function (d, v) {
6492
+ d.day = parseInt(v, 10);
6493
+ }],
6494
+ M: [twoDigits, function (d, v) {
6495
+ d.month = v - 1;
6496
+ }],
6497
+ yy: [twoDigits, function (d, v) {
6498
+ const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
6499
+ d.year = '' + (v > 68 ? cent - 1 : cent) + v;
6500
+ }],
6501
+ h: [twoDigits, function (d, v) {
6502
+ d.hour = v;
6503
+ }],
6504
+ m: [twoDigits, function (d, v) {
6505
+ d.minute = v;
6506
+ }],
6507
+ s: [twoDigits, function (d, v) {
6508
+ d.second = v;
6509
+ }],
6510
+ yyyy: [fourDigits, function (d, v) {
6511
+ d.year = v;
6512
+ }],
6513
+ S: ['\\d', function (d, v) {
6514
+ d.millisecond = v * 100;
6515
+ }],
6516
+ SS: ['\\d{2}', function (d, v) {
6517
+ d.millisecond = v * 10;
6518
+ }],
6519
+ SSS: [threeDigits, function (d, v) {
6520
+ d.millisecond = v;
6521
+ }],
6522
+ D: [twoDigits, noop],
6523
+ ddd: [word, noop],
6524
+ MMM: [word, monthUpdate('monthNamesShort')],
6525
+ MMMM: [word, monthUpdate('monthNames')],
6526
+ a: [word, function (d, v) {
6527
+ const val = v.toLowerCase();
6528
+ if (val === '上午') {
6529
+ d.isPm = false;
6530
+ } else if (val === '下午') {
6531
+ d.isPm = true;
6532
+ }
6533
+ }],
6534
+ ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
6535
+ let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
6536
+
6537
+ if (parts) {
6538
+ minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
6539
+ d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
6540
+ }
6541
+ }]
6542
+ };
6543
+ parseFlags.dd = parseFlags.d;
6544
+ parseFlags.dddd = parseFlags.ddd;
6545
+ parseFlags.DD = parseFlags.D;
6546
+ parseFlags.mm = parseFlags.m;
6547
+ parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
6548
+ parseFlags.MM = parseFlags.M;
6549
+ parseFlags.ss = parseFlags.s;
6550
+ parseFlags.A = parseFlags.a;
6551
+
6552
+
6553
+ // Some common format strings
6554
+ fecha.masks = {
6555
+ default: 'ddd MMM dd yyyy HH:mm:ss',
6556
+ shortDate: 'M/D/yy',
6557
+ mediumDate: 'MMM d, yyyy',
6558
+ longDate: 'MMMM d, yyyy',
6559
+ fullDate: 'dddd, MMMM d, yyyy',
6560
+ shortTime: 'HH:mm',
6561
+ mediumTime: 'HH:mm:ss',
6562
+ longTime: 'HH:mm:ss.SSS'
6563
+ };
6564
+
6565
+ /***
6566
+ * Format a date
6567
+ * @method format
6568
+ * @param {Date|number} dateObj
6569
+ * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
6570
+ */
6571
+ fecha.format = function (dateObj, mask) {
6572
+ if (typeof dateObj === 'number') {
6573
+ dateObj = new Date(dateObj);
6574
+ }
6575
+
6576
+ if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
6577
+ throw new Error('Invalid Date in fecha.format');
6578
+ }
6579
+
6580
+ mask = fecha.masks[mask] || mask || fecha.masks['default'];
6581
+
6582
+ const literals = [];
6583
+
6584
+ // Make literals inactive by replacing them with ??
6585
+ mask = mask.replace(literal, function($0, $1) {
6586
+ literals.push($1);
6587
+ return '@@@';
6588
+ });
6589
+ // Apply formatting rules
6590
+ mask = mask.replace(token, function ($0) {
6591
+ return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
6592
+ });
6593
+ // Inline literal values back into the formatted value
6594
+ return mask.replace(/@@@/g, function() {
6595
+ return literals.shift();
6596
+ });
6597
+ };
6598
+
6599
+ /**
6600
+ * Parse a date string into an object, changes - into /
6601
+ * @method parse
6602
+ * @param {string} dateStr Date string
6603
+ * @param {string} format Date parse format
6604
+ * @returns {Date|boolean}
6605
+ */
6606
+ fecha.parse = function (dateStr, format) {
6607
+ if (typeof format !== 'string') {
6608
+ throw new Error('Invalid format in fecha.parse');
6609
+ }
6610
+
6611
+ format = fecha.masks[format] || format;
6612
+
6613
+ // Avoid regular expression denial of service, fail early for really long strings
6614
+ // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
6615
+ if (dateStr.length > 1000) {
6616
+ return null;
6617
+ }
6618
+
6619
+ const dateInfo = {};
6620
+ const parseInfo = [];
6621
+ const literals = [];
6622
+ format = format.replace(literal, function($0, $1) {
6623
+ literals.push($1);
6624
+ return '@@@';
6625
+ });
6626
+ let newFormat = regexEscape(format).replace(token, function ($0) {
6627
+ if (parseFlags[$0]) {
6628
+ const info = parseFlags[$0];
6629
+ parseInfo.push(info[1]);
6630
+ return '(' + info[0] + ')';
6631
+ }
6632
+
6633
+ return $0;
6634
+ });
6635
+ newFormat = newFormat.replace(/@@@/g, function() {
6636
+ return literals.shift();
6637
+ });
6638
+ const matches = dateStr.match(new RegExp(newFormat, 'i'));
6639
+ if (!matches) {
6640
+ return null;
6641
+ }
6642
+
6643
+ for (let i = 1; i < matches.length; i++) {
6644
+ parseInfo[i - 1](dateInfo, matches[i]);
6645
+ }
6646
+
6647
+ const today = new Date();
6648
+ if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
6649
+ dateInfo.hour = +dateInfo.hour + 12;
6650
+ } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
6651
+ dateInfo.hour = 0;
6652
+ }
6653
+
6654
+ let date;
6655
+ if (dateInfo.timezoneOffset != null) {
6656
+ dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
6657
+ date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
6658
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
6659
+ } else {
6660
+ date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
6661
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
6662
+ }
6663
+ return date;
6664
+ };
6665
+
6666
+ // 导出fecha对象
6667
+
6668
+
6669
+ // 以下是从date-util.js合并的函数
6670
+ const newArray = function(start, end) {
6671
+ let result = [];
6672
+ for (let i = start; i <= end; i++) {
6673
+ result.push(i);
6674
+ }
6675
+ return result;
6676
+ };
6677
+
6678
+ const getSettings = () => {
6679
+ return {
6680
+ dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
6681
+ dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
6682
+ monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
6683
+ monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
6684
+ amPm: ['上午', '下午']
6685
+ };
6686
+ };
6687
+
6688
+ const toDate = function(date) {
6689
+ return isDate(date) ? new Date(date) : null;
6690
+ };
6691
+
6692
+ const isDate = function(date) {
6693
+ if (date === null || date === undefined) return false;
6694
+ if (isNaN(new Date(date).getTime())) return false;
6695
+ if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
6696
+ return true;
6697
+ };
6698
+
6699
+ const isDateObject = function(val) {
6700
+ return val instanceof Date;
6701
+ };
6702
+
6703
+ const formatDate = function (date, format = 'yyyy-MM-dd') {
6704
+ // 处理多种输入类型
6705
+ if (!date) return '';
6706
+
6707
+ // 如果是时间戳,转成日期对象
6708
+ if (typeof date === 'number') {
6709
+ date = new Date(date);
6710
+ }
6711
+ // 如果是字符串,转成日期对象
6712
+ if (typeof date === 'string') {
6713
+ date = new Date(date);
6714
+ }
6715
+
6716
+ // 调用toDate进一步验证和转换
6717
+ date = toDate(date);
6718
+ if (!date) return '';
6719
+
6720
+ // 兼容大写和小写的格式标记
6721
+ // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
6722
+ const lowercaseFormat = format
6723
+ .replace(/YYYY/g, 'yyyy')
6724
+ .replace(/D/g, 'd')
6725
+
6726
+ // 使用fecha库进行格式化,支持中文配置
6727
+ const str = fecha.format(date, lowercaseFormat, getSettings());
6728
+ return str;
6729
+ };
6730
+
6731
+ const parseDate = function(string, format) {
6732
+ return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
6733
+ };
6734
+
6735
+ const getDayCountOfMonth = function(year, month) {
6736
+ if (month === 3 || month === 5 || month === 8 || month === 10) {
6737
+ return 30;
6738
+ }
6739
+
6740
+ if (month === 1) {
6741
+ if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
6742
+ return 29;
6743
+ } else {
6744
+ return 28;
6745
+ }
6746
+ }
6747
+
6748
+ return 31;
6749
+ };
6750
+
6751
+ const getDayCountOfYear = function(year) {
6752
+ const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
6753
+ return isLeapYear ? 366 : 365;
6754
+ };
6755
+
6756
+ const getFirstDayOfMonth = function(date) {
6757
+ const temp = new Date(date.getTime());
6758
+ temp.setDate(1);
6759
+ return temp.getDay();
6760
+ };
6761
+
6762
+ // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
6763
+ // {prev, next} Date should work for Daylight Saving Time
6764
+ // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
6765
+ const prevDate = function(date, amount = 1) {
6766
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
6767
+ };
6768
+
6769
+ const nextDate = function(date, amount = 1) {
6770
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
6771
+ };
6772
+
6773
+ const getStartDateOfMonth = function(year, month) {
6774
+ const result = new Date(year, month, 1);
6775
+ const day = result.getDay();
6776
+
6777
+ if (day === 0) {
6778
+ return prevDate(result, 7);
6779
+ } else {
6780
+ return prevDate(result, day);
6781
+ }
6782
+ };
6783
+
6784
+ const getWeekNumber = function(date) {
6785
+ // 支持多种输入类型
6786
+ if (!date||!isDate(date)) {
6787
+ date = new Date();
6788
+ }
6789
+ if (typeof date === 'string') {
6790
+ date = new Date(date);
6791
+ }
6792
+
6793
+ // 验证日期有效性
6794
+ if (!isDate(date)) return null;
6795
+
6796
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
6797
+ // 设置为最近的星期四:当前日期 + 4 - 当前星期数
6798
+ // 将星期日的星期数设为7
6799
+ d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
6800
+ // 获取当年的第一天
6801
+ const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
6802
+ // 计算到最近的星期四的完整周数
6803
+ const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
6804
+ // 返回周数
6805
+ return weekNo;
6806
+ };
6807
+
6808
+ const getRangeHours = function(ranges) {
6809
+ const hours = [];
6810
+ let disabledHours = [];
6811
+
6812
+ (ranges || []).forEach(range => {
6813
+ const value = range.map(date => date.getHours());
6814
+
6815
+ disabledHours = disabledHours.concat(newArray(value[0], value[1]));
6816
+ });
6817
+
6818
+ if (disabledHours.length) {
6819
+ for (let i = 0; i < 24; i++) {
6820
+ hours[i] = disabledHours.indexOf(i) === -1;
6821
+ }
6822
+ } else {
6823
+ for (let i = 0; i < 24; i++) {
6824
+ hours[i] = false;
6825
+ }
6826
+ }
6827
+
6828
+ return hours;
6829
+ };
6830
+
6831
+ const getPrevMonthLastDays = (date, amount) => {
6832
+ if (amount <= 0) return [];
6833
+ const temp = new Date(date.getTime());
6834
+ temp.setDate(0);
6835
+ const lastDay = temp.getDate();
6836
+ return range(amount).map((_, index) => lastDay - (amount - index - 1));
6837
+ };
6838
+
6839
+ const getMonthDays = (date) => {
6840
+ const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
6841
+ const days = temp.getDate();
6842
+ return range(days).map((_, index) => index + 1);
6843
+ };
6844
+
6845
+ function setRangeData(arr, start, end, value) {
6846
+ for (let i = start; i < end; i++) {
6847
+ arr[i] = value;
6848
+ }
6849
+ }
6850
+
6851
+ const getRangeMinutes = function(ranges, hour) {
6852
+ const minutes = new Array(60);
6853
+
6854
+ if (ranges.length > 0) {
6855
+ ranges.forEach(range => {
6856
+ const start = range[0];
6857
+ const end = range[1];
6858
+ const startHour = start.getHours();
6859
+ const startMinute = start.getMinutes();
6860
+ const endHour = end.getHours();
6861
+ const endMinute = end.getMinutes();
6862
+ if (startHour === hour && endHour !== hour) {
6863
+ setRangeData(minutes, startMinute, 60, true);
6864
+ } else if (startHour === hour && endHour === hour) {
6865
+ setRangeData(minutes, startMinute, endMinute + 1, true);
6866
+ } else if (startHour !== hour && endHour === hour) {
6867
+ setRangeData(minutes, 0, endMinute + 1, true);
6868
+ } else if (startHour < hour && endHour > hour) {
6869
+ setRangeData(minutes, 0, 60, true);
6870
+ }
6871
+ });
6872
+ } else {
6873
+ setRangeData(minutes, 0, 60, true);
6874
+ }
6875
+ return minutes;
6876
+ };
6877
+
6878
+ const range = function(n) {
6879
+ // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
6880
+ return Array.apply(null, {length: n}).map((_, n) => n);
6881
+ };
6882
+
6883
+ const modifyDate = function(date, y, m, d) {
6884
+ return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
6885
+ };
6886
+
6887
+ const modifyTime = function(date, h, m, s) {
6888
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
6889
+ };
6890
+
6891
+ const modifyWithTimeString = (date, time) => {
6892
+ if (date == null || !time) {
6893
+ return date;
6894
+ }
6895
+ time = parseDate(time, 'HH:mm:ss');
6896
+ return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
6897
+ };
6898
+
6899
+ const clearTime = function(date) {
6900
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
6901
+ };
6902
+
6903
+ const clearMilliseconds = function(date) {
6904
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
6905
+ };
6906
+
6907
+ const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
6908
+ // TODO: refactory a more elegant solution
6909
+ if (ranges.length === 0) return date;
6910
+ const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
6911
+ const ndate = normalizeDate(date);
6912
+ const nranges = ranges.map(range => range.map(normalizeDate));
6913
+ if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
6914
+
6915
+ let minDate = nranges[0][0];
6916
+ let maxDate = nranges[0][0];
6917
+
6918
+ nranges.forEach(nrange => {
6919
+ minDate = new Date(Math.min(nrange[0], minDate));
6920
+ maxDate = new Date(Math.max(nrange[1], minDate));
6921
+ });
6922
+
6923
+ const ret = ndate < minDate ? minDate : maxDate;
6924
+ // preserve Year/Month/Date
6925
+ return modifyDate(
6926
+ ret,
6927
+ date.getFullYear(),
6928
+ date.getMonth(),
6929
+ date.getDate()
6930
+ );
6931
+ };
6932
+
6933
+ const timeWithinRange = function(date, selectableRange, format) {
6934
+ const limitedDate = limitTimeRange(date, selectableRange, format);
6935
+ return limitedDate.getTime() === date.getTime();
6936
+ };
6937
+
6938
+ const changeYearMonthAndClampDate = function(date, year, month) {
6939
+ // clamp date to the number of days in `year`, `month`
6940
+ // eg: (2010-1-31, 2010, 2) => 2010-2-28
6941
+ const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
6942
+ return modifyDate(date, year, month, monthDate);
6943
+ };
6944
+
6945
+ const prevMonth = function(date) {
6946
+ const year = date.getFullYear();
6947
+ const month = date.getMonth();
6948
+ return month === 0
6949
+ ? changeYearMonthAndClampDate(date, year - 1, 11)
6950
+ : changeYearMonthAndClampDate(date, year, month - 1);
6951
+ };
6952
+
6953
+ const nextMonth = function(date) {
6954
+ const year = date.getFullYear();
6955
+ const month = date.getMonth();
6956
+ return month === 11
6957
+ ? changeYearMonthAndClampDate(date, year + 1, 0)
6958
+ : changeYearMonthAndClampDate(date, year, month + 1);
6959
+ };
6960
+
6961
+ const prevYear = function(date, amount = 1) {
6962
+ const year = date.getFullYear();
6963
+ const month = date.getMonth();
6964
+ return changeYearMonthAndClampDate(date, year - amount, month);
6965
+ };
6966
+
6967
+ const nextYear = function(date, amount = 1) {
6968
+ const year = date.getFullYear();
6969
+ const month = date.getMonth();
6970
+ return changeYearMonthAndClampDate(date, year + amount, month);
6971
+ };
6972
+
6973
+ const extractDateFormat = function(format) {
6974
+ return format
6975
+ .replace(/\W?m{1,2}|\W?ZZ/g, '')
6976
+ .replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
6977
+ .trim();
6978
+ };
6979
+
6980
+ const extractTimeFormat = function(format) {
6981
+ return format
6982
+ .replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
6983
+ .trim();
6984
+ };
6985
+
6986
+ const validateRangeInOneMonth = function(start, end) {
6987
+ return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
6988
+ };
6989
+
6907
6990
  /**
6908
6991
  * 计算两个日期之间的工作日数量(不包括周末和节假日)
6909
6992
  * @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
6910
6993
  * @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
6911
6994
  * @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
6912
6995
  * @returns {number} 工作日数量
6913
- */
6914
- var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
6915
- var holidays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
6916
-
6917
- if (typeof start_date !== 'string' || typeof end_date !== 'string') {
6918
- throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
6919
- }
6920
-
6921
- var startDateObj = new Date(start_date);
6922
- var endDateObj = new Date(end_date);
6923
-
6924
- if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
6925
- throw new Error("Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'.");
6926
- }
6927
-
6928
- if (startDateObj > endDateObj) {
6929
- throw new Error('Start date should be earlier than or equal to end date.');
6930
- }
6931
-
6932
- var workdays = 0;
6933
-
6934
- // Iterate through each day in the date range
6935
-
6936
- var _loop = function _loop(currentDate) {
6937
- // Check if the current day is a weekend (Saturday or Sunday)
6938
- var isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
6939
-
6940
- // Check if the current day is a holiday
6941
- var isHoliday = holidays.some(function (holiday) {
6942
- var holidayDate = new Date(holiday);
6943
- return currentDate.toDateString() === holidayDate.toDateString();
6944
- });
6945
-
6946
- // If it's a workday (not a weekend or holiday), increment the workdays count
6947
- if (!isWeekend && !isHoliday) {
6948
- workdays++;
6949
- }
6950
- };
6951
-
6952
- for (var currentDate = new Date(startDateObj); currentDate <= endDateObj; currentDate.setDate(currentDate.getDate() + 1)) {
6953
- _loop(currentDate);
6954
- }
6955
-
6956
- return workdays;
6957
- };
6958
-
6996
+ */
6997
+ const calculateNetworkDays = function (start_date, end_date, holidays = []) {
6998
+ if (typeof start_date !== 'string' || typeof end_date !== 'string') {
6999
+ throw new Error(
7000
+ "Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
7001
+ );
7002
+ }
7003
+
7004
+ const startDateObj = new Date(start_date);
7005
+ const endDateObj = new Date(end_date);
7006
+
7007
+ if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
7008
+ throw new Error(
7009
+ "Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
7010
+ );
7011
+ }
7012
+
7013
+ if (startDateObj > endDateObj) {
7014
+ throw new Error('Start date should be earlier than or equal to end date.');
7015
+ }
7016
+
7017
+ let workdays = 0;
7018
+
7019
+ // Iterate through each day in the date range
7020
+ for (
7021
+ let currentDate = new Date(startDateObj);
7022
+ currentDate <= endDateObj;
7023
+ currentDate.setDate(currentDate.getDate() + 1)
7024
+ ) {
7025
+ // Check if the current day is a weekend (Saturday or Sunday)
7026
+ const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
7027
+
7028
+ // Check if the current day is a holiday
7029
+ const isHoliday = holidays.some((holiday) => {
7030
+ const holidayDate = new Date(holiday);
7031
+ return currentDate.toDateString() === holidayDate.toDateString();
7032
+ });
7033
+
7034
+ // If it's a workday (not a weekend or holiday), increment the workdays count
7035
+ if (!isWeekend && !isHoliday) {
7036
+ workdays++;
7037
+ }
7038
+ }
7039
+
7040
+ return workdays;
7041
+ };
7042
+
6959
7043
  /**
6960
7044
  * 日期加减天数
6961
7045
  * @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
6962
7046
  * @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
6963
7047
  * @returns {string} 结果日期,格式为 "YYYY-MM-DD"
6964
- */
6965
- var dateAddDays = function dateAddDays(start_date, days) {
6966
- if (typeof start_date !== 'string' || !Number.isInteger(days)) {
6967
- throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days.");
6968
- }
6969
-
6970
- var startDateObj = new Date(start_date);
6971
- if (isNaN(startDateObj.getTime())) {
6972
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
6973
- }
6974
-
6975
- var resultDateObj = new Date(startDateObj);
6976
- resultDateObj.setDate(resultDateObj.getDate() + days);
6977
-
6978
- var resultYear = resultDateObj.getFullYear();
6979
- var resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
6980
- var resultDay = String(resultDateObj.getDate()).padStart(2, '0');
6981
-
6982
- return resultYear + '-' + resultMonth + '-' + resultDay;
6983
- };
6984
-
7048
+ */
7049
+ const dateAddDays = function (start_date, days) {
7050
+ if (typeof start_date !== 'string' || !Number.isInteger(days)) {
7051
+ throw new Error(
7052
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
7053
+ );
7054
+ }
7055
+
7056
+ const startDateObj = new Date(start_date);
7057
+ if (isNaN(startDateObj.getTime())) {
7058
+ throw new Error(
7059
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
7060
+ );
7061
+ }
7062
+
7063
+ const resultDateObj = new Date(startDateObj);
7064
+ resultDateObj.setDate(resultDateObj.getDate() + days);
7065
+
7066
+ const resultYear = resultDateObj.getFullYear();
7067
+ const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
7068
+ const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
7069
+
7070
+ return `${resultYear}-${resultMonth}-${resultDay}`;
7071
+ };
7072
+
6985
7073
  /**
6986
7074
  * 计算两个日期之间的差值
6987
7075
  * @date 2023年12月14日
@@ -6989,180 +7077,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
6989
7077
  * @param {String} end_date - 结束日期字符串
6990
7078
  * @param {String} unit - 单位:year/month/day
6991
7079
  * @returns {Number} 差值
6992
- */
6993
- var dateDiff = function dateDiff(start_date, end_date) {
6994
- var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
6995
-
6996
- // Assuming date strings are in "YYYY-MM-DD" format
6997
- var startDate = new Date(start_date);
6998
- var endDate = new Date(end_date);
6999
-
7000
- // If the date is invalid, return 0
7001
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
7002
- return 0;
7003
- }
7004
-
7005
- if (unit === 'year') {
7006
- return endDate.getFullYear() - startDate.getFullYear();
7007
- } else if (unit === 'month') {
7008
- return (endDate.getFullYear() - startDate.getFullYear()) * 12 + (endDate.getMonth() - startDate.getMonth());
7009
- } else {
7010
- // Default to day
7011
- var timeDifference = endDate - startDate;
7012
- // Calculate days (86400000 milliseconds per day)
7013
- return Math.floor(timeDifference / 86400000);
7014
- }
7015
- };
7016
-
7080
+ */
7081
+ const dateDiff = function (start_date, end_date, unit = 'day') {
7082
+ // Assuming date strings are in "YYYY-MM-DD" format
7083
+ var startDate = new Date(start_date);
7084
+ var endDate = new Date(end_date);
7085
+
7086
+ // If the date is invalid, return 0
7087
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
7088
+ return 0;
7089
+ }
7090
+
7091
+ if (unit === 'year') {
7092
+ return endDate.getFullYear() - startDate.getFullYear();
7093
+ } else if (unit === 'month') {
7094
+ return (
7095
+ (endDate.getFullYear() - startDate.getFullYear()) * 12 +
7096
+ (endDate.getMonth() - startDate.getMonth())
7097
+ );
7098
+ } else {
7099
+ // Default to day
7100
+ var timeDifference = endDate - startDate;
7101
+ // Calculate days (86400000 milliseconds per day)
7102
+ return Math.floor(timeDifference / 86400000);
7103
+ }
7104
+ };
7105
+
7017
7106
  /**
7018
7107
  * 获取月份中的日期
7019
7108
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
7020
7109
  * @returns {number} 月份中的日期(1-31)
7021
- */
7022
- var dayOfMonth = function dayOfMonth(date) {
7023
- if (typeof date !== 'string') {
7024
- throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
7025
- }
7026
-
7027
- var dateObj = new Date(date);
7028
- if (isNaN(dateObj.getTime())) {
7029
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
7030
- }
7031
-
7032
- return dateObj.getDate();
7033
- };
7034
-
7110
+ */
7111
+ const dayOfMonth = function (date) {
7112
+ if (typeof date !== 'string') {
7113
+ throw new Error(
7114
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
7115
+ );
7116
+ }
7117
+
7118
+ const dateObj = new Date(date);
7119
+ if (isNaN(dateObj.getTime())) {
7120
+ throw new Error(
7121
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
7122
+ );
7123
+ }
7124
+
7125
+ return dateObj.getDate();
7126
+ };
7127
+
7035
7128
  /**
7036
7129
  * 获取当前日期
7037
7130
  * @date 2022年5月7日
7038
7131
  * @param {string} format - 日期格式,默认为'YYYY-MM-DD'
7039
7132
  * @returns {string} 当前日期的格式化字符串
7040
- */
7041
- var getCurrentDate = function getCurrentDate() {
7042
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD';
7043
-
7044
- return formatDate(new Date(), format);
7045
- };
7046
-
7133
+ */
7134
+ const getCurrentDate = function (format = 'YYYY-MM-DD') {
7135
+ return formatDate(new Date(), format);
7136
+ };
7137
+
7047
7138
  /**
7048
7139
  * 获取当前日期时间
7049
7140
  * @date 2022年5月7日
7050
7141
  * @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
7051
7142
  * @returns {string} 当前日期时间的格式化字符串
7052
- */
7053
- var getCurrentDateTime = function getCurrentDateTime() {
7054
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD HH:mm:ss';
7055
-
7056
- return formatDate(new Date(), format);
7057
- };
7058
-
7143
+ */
7144
+ const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
7145
+ return formatDate(new Date(), format);
7146
+ };
7147
+
7059
7148
  /**
7060
7149
  * 获取小时
7061
7150
  * @date 2022年5月7日
7062
7151
  * @param {Date|string} [date] - 日期对象或日期字符串
7063
7152
  * @returns {number} 小时数(0-23)
7064
- */
7065
- var getHour = function getHour(date) {
7066
- if (!date) {
7067
- return new Date().getHours();
7068
- }
7069
- if (typeof date === 'string') {
7070
- date = new Date(date);
7071
- }
7072
- return date.getHours();
7073
- };
7074
-
7153
+ */
7154
+ const getHour = function (date) {
7155
+ if (!date) {
7156
+ return new Date().getHours();
7157
+ }
7158
+ if (typeof date === 'string') {
7159
+ date = new Date(date);
7160
+ }
7161
+ return date.getHours();
7162
+ };
7163
+
7075
7164
  /**
7076
7165
  * 获取分钟
7077
7166
  * @date 2022年5月7日
7078
7167
  * @param {Date|string} [date] - 日期对象或日期字符串
7079
7168
  * @returns {number} 分钟数(0-59)
7080
- */
7081
- var getMinute = function getMinute(date) {
7082
- if (!date) {
7083
- return new Date().getMinutes();
7084
- }
7085
- if (typeof date === 'string') {
7086
- date = new Date(date);
7087
- }
7088
- return date.getMinutes();
7089
- };
7090
-
7169
+ */
7170
+ const getMinute = function (date) {
7171
+ if (!date) {
7172
+ return new Date().getMinutes();
7173
+ }
7174
+ if (typeof date === 'string') {
7175
+ date = new Date(date);
7176
+ }
7177
+ return date.getMinutes();
7178
+ };
7179
+
7091
7180
  /**
7092
7181
  * 获取月份
7093
7182
  * @date 2022年5月7日
7094
7183
  * @param {Date|string} [date] - 日期对象或日期字符串
7095
7184
  * @returns {number} 月份数(1-12)
7096
- */
7097
- var getMonth = function getMonth(date) {
7098
- if (!date) {
7099
- return new Date().getMonth() + 1;
7100
- }
7101
- if (typeof date === 'string') {
7102
- date = new Date(date);
7103
- }
7104
- return date.getMonth() + 1;
7105
- };
7106
-
7185
+ */
7186
+ const getMonth = function (date) {
7187
+ if (!date) {
7188
+ return new Date().getMonth() + 1;
7189
+ }
7190
+ if (typeof date === 'string') {
7191
+ date = new Date(date);
7192
+ }
7193
+ return date.getMonth() + 1;
7194
+ };
7195
+
7107
7196
  /**
7108
7197
  * 获取秒
7109
7198
  * @date 2022年5月7日
7110
7199
  * @param {Date|string} [date] - 日期对象或日期字符串
7111
7200
  * @returns {number} 秒数(0-59)
7112
- */
7113
- var getSecond = function getSecond(date) {
7114
- if (!date) {
7115
- return new Date().getSeconds();
7116
- }
7117
- if (typeof date === 'string') {
7118
- date = new Date(date);
7119
- }
7120
- return date.getSeconds();
7121
- };
7122
-
7201
+ */
7202
+ const getSecond = function (date) {
7203
+ if (!date) {
7204
+ return new Date().getSeconds();
7205
+ }
7206
+ if (typeof date === 'string') {
7207
+ date = new Date(date);
7208
+ }
7209
+ return date.getSeconds();
7210
+ };
7211
+
7123
7212
  /**
7124
7213
  * 获取星期几
7125
7214
  * @date 2022年5月7日
7126
7215
  * @param {Date|string} [date] - 日期对象或日期字符串
7127
7216
  * @returns {number} 星期几(0-6,0表示星期日)
7128
- */
7129
- var getWeekday = function getWeekday(date) {
7130
- if (!date) {
7131
- return new Date().getDay();
7132
- }
7133
- if (typeof date === 'string') {
7134
- date = new Date(date);
7135
- }
7136
- return date.getDay();
7137
- };
7138
-
7217
+ */
7218
+ const getWeekday = function (date) {
7219
+ if (!date) {
7220
+ return new Date().getDay();
7221
+ }
7222
+ if (typeof date === 'string') {
7223
+ date = new Date(date);
7224
+ }
7225
+ return date.getDay();
7226
+ };
7227
+
7228
+
7139
7229
  /**
7140
7230
  * @desc 获取上午/下午/晚上
7141
7231
  * @author huangbo
7142
7232
  * @date 2022年5月7日
7143
7233
  * @param {String} [time] - 时间
7144
- **/
7145
- var timeCycle = function timeCycle(time) {
7146
- var hour = 0;
7147
- if (!time) {
7148
- hour = new Date().getHours();
7149
- } else if (typeof time === 'string') {
7150
- // 从时间字符串中提取小时
7151
- var match = time.match(/^(\d{1,2})/);
7152
- if (match) {
7153
- hour = parseInt(match[1], 10);
7154
- }
7155
- } else if (typeof time === 'number') {
7156
- hour = time;
7157
- }
7158
- // 判断时间段
7159
- if (hour >= 5 && hour < 12) {
7160
- return '上午';
7161
- } else if (hour >= 12 && hour < 18) {
7162
- return '下午';
7163
- } else {
7164
- return '晚上';
7165
- }
7234
+ **/
7235
+ const timeCycle = function (time) {
7236
+ let hour = 0;
7237
+ if (!time) {
7238
+ hour = new Date().getHours();
7239
+ } else if (typeof time === 'string') {
7240
+ // 从时间字符串中提取小时
7241
+ const match = time.match(/^(\d{1,2})/);
7242
+ if (match) {
7243
+ hour = parseInt(match[1], 10);
7244
+ }
7245
+ } else if (typeof time === 'number') {
7246
+ hour = time;
7247
+ }
7248
+ // 判断时间段
7249
+ if (hour >= 5 && hour < 12) {
7250
+ return '上午';
7251
+ } else if (hour >= 12 && hour < 18) {
7252
+ return '下午';
7253
+ } else {
7254
+ return '晚上';
7255
+ }
7166
7256
  };
7167
7257
 
7168
7258
  /***/ }),
@@ -7172,27 +7262,6 @@ var timeCycle = function timeCycle(time) {
7172
7262
 
7173
7263
  module.exports = require("eoss/lib/message-box");
7174
7264
 
7175
- /***/ }),
7176
-
7177
- /***/ 99:
7178
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7179
-
7180
- "use strict";
7181
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
7182
- /* harmony import */ var eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
7183
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
7184
-
7185
-
7186
-
7187
- /**
7188
- * 判断一个节点是否为Vue的虚拟节点(VNode)
7189
- * @param {*} node 要判断的节点
7190
- * @returns {boolean} 如果是虚拟节点则返回true,否则返回false
7191
- */
7192
- function isVNode(node) {
7193
- return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "x"])(node, 'componentOptions');
7194
- }
7195
-
7196
7265
  /***/ })
7197
7266
 
7198
7267
  /******/ });