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
package/lib/message.js CHANGED
@@ -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 = 222);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 227);
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
  /**
@@ -3741,29 +3806,7 @@ module.exports = require("vue");
3741
3806
 
3742
3807
  /***/ }),
3743
3808
 
3744
- /***/ 22:
3745
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3746
-
3747
- "use strict";
3748
- /* harmony default export */ __webpack_exports__["a"] = (function (target) {
3749
- for (var i = 1, j = arguments.length; i < j; i++) {
3750
- var source = arguments[i] || {};
3751
- for (var prop in source) {
3752
- if (source.hasOwnProperty(prop)) {
3753
- var value = source[prop];
3754
- if (value !== undefined) {
3755
- target[prop] = value;
3756
- }
3757
- }
3758
- }
3759
- }
3760
-
3761
- return target;
3762
- });;
3763
-
3764
- /***/ }),
3765
-
3766
- /***/ 222:
3809
+ /***/ 227:
3767
3810
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3768
3811
 
3769
3812
  "use strict";
@@ -4058,10 +4101,10 @@ var component = Object(componentNormalizer["a" /* default */])(
4058
4101
 
4059
4102
  /* harmony default export */ var main = (component.exports);
4060
4103
  // EXTERNAL MODULE: ./src/utils/popup/index.js
4061
- var popup = __webpack_require__(33);
4104
+ var popup = __webpack_require__(35);
4062
4105
 
4063
4106
  // EXTERNAL MODULE: ./src/utils/vdom.js
4064
- var vdom = __webpack_require__(99);
4107
+ var vdom = __webpack_require__(101);
4065
4108
 
4066
4109
  // CONCATENATED MODULE: ./packages/message/src/main.js
4067
4110
  /**
@@ -4183,6 +4226,28 @@ main_Message.closeAll = function () {
4183
4226
 
4184
4227
  /***/ }),
4185
4228
 
4229
+ /***/ 23:
4230
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4231
+
4232
+ "use strict";
4233
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
4234
+ for (var i = 1, j = arguments.length; i < j; i++) {
4235
+ var source = arguments[i] || {};
4236
+ for (var prop in source) {
4237
+ if (source.hasOwnProperty(prop)) {
4238
+ var value = source[prop];
4239
+ if (value !== undefined) {
4240
+ target[prop] = value;
4241
+ }
4242
+ }
4243
+ }
4244
+ }
4245
+
4246
+ return target;
4247
+ });;
4248
+
4249
+ /***/ }),
4250
+
4186
4251
  /***/ 24:
4187
4252
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4188
4253
 
@@ -4395,18 +4460,18 @@ function isDefined(val) {
4395
4460
 
4396
4461
  /***/ }),
4397
4462
 
4398
- /***/ 33:
4463
+ /***/ 35:
4399
4464
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4400
4465
 
4401
4466
  "use strict";
4402
4467
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4403
4468
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
4404
- /* harmony import */ var eoss_src_utils_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
4469
+ /* harmony import */ var eoss_src_utils_merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
4405
4470
  /* harmony import */ var eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
4406
4471
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__["a"]; });
4407
4472
 
4408
4473
  /* harmony import */ var _scrollbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
4409
- /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
4474
+ /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
4410
4475
 
4411
4476
 
4412
4477
 
@@ -4557,1256 +4622,1279 @@ var scrollBarWidth = void 0;
4557
4622
  this.withoutHiddenClass = !Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* hasClass */ "d"])(document.body, 'es-popup-parent--hidden');
4558
4623
  if (this.withoutHiddenClass) {
4559
4624
  this.bodyPaddingRight = document.body.style.paddingRight;
4560
- this.computedBodyPaddingRight = parseInt(Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'paddingRight'), 10);
4561
- }
4562
- scrollBarWidth = Object(_scrollbar__WEBPACK_IMPORTED_MODULE_3__[/* getScrollbarWidth */ "b"])();
4563
- var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
4564
- var bodyOverflowY = Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'overflowY');
4565
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
4566
- document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
4567
- }
4568
- Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* addClass */ "a"])(document.body, 'es-popup-parent--hidden');
4569
- }
4570
- }
4571
-
4572
- if (getComputedStyle(dom).position === 'static') {
4573
- dom.style.position = 'absolute';
4574
- }
4575
-
4576
- dom.style.zIndex = eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex();
4577
- this.opened = true;
4578
-
4579
- this.onOpen && this.onOpen();
4580
-
4581
- this.doAfterOpen();
4582
- },
4583
- doAfterOpen: function doAfterOpen() {
4584
- this._opening = false;
4585
- },
4586
- close: function close() {
4587
- var _this4 = this;
4588
-
4589
- if (this.willClose && !this.willClose()) return;
4590
-
4591
- if (this._openTimer !== null) {
4592
- clearTimeout(this._openTimer);
4593
- this._openTimer = null;
4594
- }
4595
- clearTimeout(this._closeTimer);
4596
-
4597
- var closeDelay = Number(this.closeDelay);
4598
-
4599
- if (closeDelay > 0) {
4600
- this._closeTimer = setTimeout(function () {
4601
- _this4._closeTimer = null;
4602
- _this4.doClose();
4603
- }, closeDelay);
4604
- } else {
4605
- this.doClose();
4606
- }
4607
- },
4608
- doClose: function doClose() {
4609
- this._closing = true;
4610
-
4611
- this.onClose && this.onClose();
4612
-
4613
- if (this.lockScroll) {
4614
- setTimeout(this.restoreBodyStyle, 200);
4615
- }
4616
-
4617
- this.opened = false;
4618
-
4619
- this.doAfterClose();
4620
- },
4621
- doAfterClose: function doAfterClose() {
4622
- eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
4623
- this._closing = false;
4624
- },
4625
- restoreBodyStyle: function restoreBodyStyle() {
4626
- if (this.modal && this.withoutHiddenClass) {
4627
- document.body.style.paddingRight = this.bodyPaddingRight;
4628
- Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* removeClass */ "i"])(document.body, 'es-popup-parent--hidden');
4629
- }
4630
- this.withoutHiddenClass = true;
4631
- }
4632
- }
4633
- });
4634
-
4635
-
4636
-
4637
- /***/ }),
4638
-
4639
- /***/ 4:
4640
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4641
-
4642
- "use strict";
4643
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
4644
- /* globals __VUE_SSR_CONTEXT__ */
4645
-
4646
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
4647
- // This module is a runtime utility for cleaner component module output and will
4648
- // be included in the final webpack user bundle.
4649
-
4650
- function normalizeComponent(
4651
- scriptExports,
4652
- render,
4653
- staticRenderFns,
4654
- functionalTemplate,
4655
- injectStyles,
4656
- scopeId,
4657
- moduleIdentifier /* server only */,
4658
- shadowMode /* vue-cli only */
4659
- ) {
4660
- // Vue.extend constructor export interop
4661
- var options =
4662
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
4663
-
4664
- // render functions
4665
- if (render) {
4666
- options.render = render
4667
- options.staticRenderFns = staticRenderFns
4668
- options._compiled = true
4669
- }
4670
-
4671
- // functional template
4672
- if (functionalTemplate) {
4673
- options.functional = true
4674
- }
4675
-
4676
- // scopedId
4677
- if (scopeId) {
4678
- options._scopeId = 'data-v-' + scopeId
4679
- }
4680
-
4681
- var hook
4682
- if (moduleIdentifier) {
4683
- // server build
4684
- hook = function (context) {
4685
- // 2.3 injection
4686
- context =
4687
- context || // cached call
4688
- (this.$vnode && this.$vnode.ssrContext) || // stateful
4689
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
4690
- // 2.2 with runInNewContext: true
4691
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4692
- context = __VUE_SSR_CONTEXT__
4693
- }
4694
- // inject component styles
4695
- if (injectStyles) {
4696
- injectStyles.call(this, context)
4697
- }
4698
- // register component module identifier for async chunk inferrence
4699
- if (context && context._registeredComponents) {
4700
- context._registeredComponents.add(moduleIdentifier)
4701
- }
4702
- }
4703
- // used by ssr in case component is cached and beforeCreate
4704
- // never gets called
4705
- options._ssrRegister = hook
4706
- } else if (injectStyles) {
4707
- hook = shadowMode
4708
- ? function () {
4709
- injectStyles.call(
4710
- this,
4711
- (options.functional ? this.parent : this).$root.$options.shadowRoot
4712
- )
4713
- }
4714
- : injectStyles
4715
- }
4716
-
4717
- if (hook) {
4718
- if (options.functional) {
4719
- // for template-only hot-reload because in that case the render fn doesn't
4720
- // go through the normalizer
4721
- options._injectStyles = hook
4722
- // register for functional component in vue file
4723
- var originalRender = options.render
4724
- options.render = function renderWithStyleInjection(h, context) {
4725
- hook.call(context)
4726
- return originalRender(h, context)
4727
- }
4728
- } else {
4729
- // inject component registration as beforeCreate hook
4730
- var existing = options.beforeCreate
4731
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
4732
- }
4733
- }
4734
-
4735
- return {
4736
- exports: scriptExports,
4737
- options: options
4738
- }
4739
- }
4740
-
4741
-
4742
- /***/ }),
4743
-
4744
- /***/ 45:
4745
- /***/ (function(module, exports) {
4746
-
4747
- var g;
4748
-
4749
- // This works in non-strict mode
4750
- g = (function() {
4751
- return this;
4752
- })();
4753
-
4754
- try {
4755
- // This works if eval is allowed (see CSP)
4756
- g = g || new Function("return this")();
4757
- } catch (e) {
4758
- // This works if the window reference is available
4759
- if (typeof window === "object") g = window;
4760
- }
4761
-
4762
- // g can still be undefined, but nothing to do about it...
4763
- // We return undefined, instead of nothing here, so it's
4764
- // easier to handle this case. if(!global) { ...}
4765
-
4766
- module.exports = g;
4767
-
4768
-
4769
- /***/ }),
4770
-
4771
- /***/ 5:
4772
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4773
-
4774
- "use strict";
4775
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
4776
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
4777
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
4778
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
4779
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
4780
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
4781
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
4782
- /* unused harmony export setStyle */
4783
- /* unused harmony export isScroll */
4784
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
4785
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
4786
- /* unused harmony export insertAfter */
4787
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4788
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
4789
- 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; };
4790
-
4791
- /* istanbul ignore next */
4792
-
4793
-
4794
-
4795
- var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
4796
- var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
4797
- var MOZ_HACK_REGEXP = /^moz([A-Z])/;
4798
- var ieVersion = isServer ? 0 : Number(document.documentMode);
4799
-
4800
- /* istanbul ignore next */
4801
- var trim = function trim(string) {
4802
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
4803
- };
4804
- /* istanbul ignore next */
4805
- var camelCase = function camelCase(name) {
4806
- return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
4807
- return offset ? letter.toUpperCase() : letter;
4808
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
4809
- };
4810
-
4811
- /* istanbul ignore next */
4812
- var on = function () {
4813
- if (!isServer && document.addEventListener) {
4814
- return function (element, event, handler) {
4815
- if (element && event && handler) {
4816
- element.addEventListener(event, handler, false);
4817
- }
4818
- };
4819
- } else {
4820
- return function (element, event, handler) {
4821
- if (element && event && handler) {
4822
- element.attachEvent('on' + event, handler);
4823
- }
4824
- };
4825
- }
4826
- }();
4827
-
4828
- /* istanbul ignore next */
4829
- var off = function () {
4830
- if (!isServer && document.removeEventListener) {
4831
- return function (element, event, handler) {
4832
- if (element && event) {
4833
- element.removeEventListener(event, handler, false);
4834
- }
4835
- };
4836
- } else {
4837
- return function (element, event, handler) {
4838
- if (element && event) {
4839
- element.detachEvent('on' + event, handler);
4840
- }
4841
- };
4842
- }
4843
- }();
4844
-
4845
- /* istanbul ignore next */
4846
- var once = function once(el, event, fn) {
4847
- var listener = function listener() {
4848
- if (fn) {
4849
- fn.apply(this, arguments);
4850
- }
4851
- off(el, event, listener);
4852
- };
4853
- on(el, event, listener);
4854
- };
4855
-
4856
- /* istanbul ignore next */
4857
- function hasClass(el, cls) {
4858
- if (!el || !cls) return false;
4859
- if (cls.indexOf(' ') !== -1) {
4860
- throw new Error('className should not contain space.');
4861
- }
4862
- if (el.classList) {
4863
- return el.classList.contains(cls);
4864
- } else {
4865
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
4866
- }
4867
- }
4868
-
4869
- /* istanbul ignore next */
4870
- function addClass(el, cls) {
4871
- if (!el) return;
4872
- var curClass = el.className;
4873
- var classes = (cls || '').split(' ');
4874
-
4875
- for (var i = 0, j = classes.length; i < j; i++) {
4876
- var clsName = classes[i];
4877
- if (!clsName) continue;
4878
-
4879
- if (el.classList) {
4880
- el.classList.add(clsName);
4881
- } else if (!hasClass(el, clsName)) {
4882
- curClass += ' ' + clsName;
4883
- }
4884
- }
4885
- if (!el.classList) {
4886
- el.className = curClass;
4887
- }
4888
- }
4889
-
4890
- /* istanbul ignore next */
4891
- function removeClass(el, cls) {
4892
- if (!el || !cls) return;
4893
- var classes = cls.split(' ');
4894
- var curClass = ' ' + el.className + ' ';
4895
-
4896
- for (var i = 0, j = classes.length; i < j; i++) {
4897
- var clsName = classes[i];
4898
- if (!clsName) continue;
4899
-
4900
- if (el.classList) {
4901
- el.classList.remove(clsName);
4902
- } else if (hasClass(el, clsName)) {
4903
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
4904
- }
4905
- }
4906
- if (!el.classList) {
4907
- el.className = trim(curClass);
4908
- }
4909
- }
4910
-
4911
- /* istanbul ignore next */
4912
- var getStyle = ieVersion < 9 ? function (element, styleName) {
4913
- if (isServer) return;
4914
- if (!element || !styleName) return null;
4915
- styleName = camelCase(styleName);
4916
- if (styleName === 'float') {
4917
- styleName = 'styleFloat';
4918
- }
4919
- try {
4920
- switch (styleName) {
4921
- case 'opacity':
4922
- try {
4923
- return element.filters.item('alpha').opacity / 100;
4924
- } catch (e) {
4925
- return 1.0;
4926
- }
4927
- default:
4928
- return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
4929
- }
4930
- } catch (e) {
4931
- return element.style[styleName];
4932
- }
4933
- } : function (element, styleName) {
4934
- if (isServer) return;
4935
- if (!element || !styleName) return null;
4936
- styleName = camelCase(styleName);
4937
- if (styleName === 'float') {
4938
- styleName = 'cssFloat';
4939
- }
4940
- try {
4941
- var computed = document.defaultView.getComputedStyle(element, '');
4942
- return element.style[styleName] || computed ? computed[styleName] : null;
4943
- } catch (e) {
4944
- return element.style[styleName];
4945
- }
4946
- };
4947
-
4948
- /* istanbul ignore next */
4949
- function setStyle(element, styleName, value) {
4950
- if (!element || !styleName) return;
4951
-
4952
- if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
4953
- for (var prop in styleName) {
4954
- if (styleName.hasOwnProperty(prop)) {
4955
- setStyle(element, prop, styleName[prop]);
4956
- }
4957
- }
4958
- } else {
4959
- styleName = camelCase(styleName);
4960
- if (styleName === 'opacity' && ieVersion < 9) {
4961
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
4962
- } else {
4963
- element.style[styleName] = value;
4964
- }
4965
- }
4966
- }
4967
-
4968
- var isScroll = function isScroll(el, vertical) {
4969
- if (isServer) return;
4970
-
4971
- var determinedDirection = vertical !== null || vertical !== undefined;
4972
- var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
4973
-
4974
- return overflow.match(/(scroll|auto)/);
4975
- };
4976
-
4977
- var getScrollContainer = function getScrollContainer(el, vertical) {
4978
- if (isServer) return;
4979
-
4980
- var parent = el;
4981
- while (parent) {
4982
- if ([window, document, document.documentElement].includes(parent)) {
4983
- return window;
4984
- }
4985
- if (isScroll(parent, vertical)) {
4986
- return parent;
4987
- }
4988
- parent = parent.parentNode;
4989
- }
4990
-
4991
- return parent;
4992
- };
4993
-
4994
- var isInContainer = function isInContainer(el, container) {
4995
- if (isServer || !el || !container) return false;
4625
+ this.computedBodyPaddingRight = parseInt(Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'paddingRight'), 10);
4626
+ }
4627
+ scrollBarWidth = Object(_scrollbar__WEBPACK_IMPORTED_MODULE_3__[/* getScrollbarWidth */ "b"])();
4628
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
4629
+ var bodyOverflowY = Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* getStyle */ "c"])(document.body, 'overflowY');
4630
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
4631
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
4632
+ }
4633
+ Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* addClass */ "a"])(document.body, 'es-popup-parent--hidden');
4634
+ }
4635
+ }
4996
4636
 
4997
- var elRect = el.getBoundingClientRect();
4998
- var containerRect = void 0;
4637
+ if (getComputedStyle(dom).position === 'static') {
4638
+ dom.style.position = 'absolute';
4639
+ }
4999
4640
 
5000
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
5001
- containerRect = {
5002
- top: 0,
5003
- right: window.innerWidth,
5004
- bottom: window.innerHeight,
5005
- left: 0
5006
- };
5007
- } else {
5008
- containerRect = container.getBoundingClientRect();
5009
- }
4641
+ dom.style.zIndex = eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].nextZIndex();
4642
+ this.opened = true;
5010
4643
 
5011
- return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
5012
- };
4644
+ this.onOpen && this.onOpen();
5013
4645
 
5014
- /**
5015
- * 在元素前插入元素
5016
- * @param {HTMLElement} newEl 新DOM元素
5017
- * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
5018
- */
5019
- function insertAfter(newEl, targetEl) {
5020
- var parentEl = targetEl.parentNode;
5021
- if (parentEl.lastChild === targetEl) {
5022
- parentEl.appendChild(newEl);
5023
- } else {
5024
- parentEl.insertBefore(newEl, targetEl.nextSibling);
5025
- }
5026
- }
4646
+ this.doAfterOpen();
4647
+ },
4648
+ doAfterOpen: function doAfterOpen() {
4649
+ this._opening = false;
4650
+ },
4651
+ close: function close() {
4652
+ var _this4 = this;
5027
4653
 
5028
- /***/ }),
4654
+ if (this.willClose && !this.willClose()) return;
5029
4655
 
5030
- /***/ 7:
5031
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4656
+ if (this._openTimer !== null) {
4657
+ clearTimeout(this._openTimer);
4658
+ this._openTimer = null;
4659
+ }
4660
+ clearTimeout(this._closeTimer);
5032
4661
 
5033
- "use strict";
5034
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return fecha; });
5035
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getSettings; });
5036
- /* unused harmony export toDate */
5037
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return isDate; });
5038
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return isDateObject; });
5039
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return formatDate; });
5040
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return parseDate; });
5041
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getDayCountOfMonth; });
5042
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getDayCountOfYear; });
5043
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getFirstDayOfMonth; });
5044
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return prevDate; });
5045
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return nextDate; });
5046
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getStartDateOfMonth; });
5047
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getWeekNumber; });
5048
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getRangeHours; });
5049
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getPrevMonthLastDays; });
5050
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getMonthDays; });
5051
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getRangeMinutes; });
5052
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return range; });
5053
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return modifyDate; });
5054
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return modifyTime; });
5055
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return modifyWithTimeString; });
5056
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearTime; });
5057
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return clearMilliseconds; });
5058
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return limitTimeRange; });
5059
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return timeWithinRange; });
5060
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeYearMonthAndClampDate; });
5061
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return prevMonth; });
5062
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return nextMonth; });
5063
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return prevYear; });
5064
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return nextYear; });
5065
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return extractDateFormat; });
5066
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return extractTimeFormat; });
5067
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return validateRangeInOneMonth; });
5068
- /* unused harmony export calculateNetworkDays */
5069
- /* unused harmony export dateAddDays */
5070
- /* unused harmony export dateDiff */
5071
- /* unused harmony export dayOfMonth */
5072
- /* unused harmony export getCurrentDate */
5073
- /* unused harmony export getCurrentDateTime */
5074
- /* unused harmony export getHour */
5075
- /* unused harmony export getMinute */
5076
- /* unused harmony export getMonth */
5077
- /* unused harmony export getSecond */
5078
- /* unused harmony export getWeekday */
5079
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
4662
+ var closeDelay = Number(this.closeDelay);
5080
4663
 
4664
+ if (closeDelay > 0) {
4665
+ this._closeTimer = setTimeout(function () {
4666
+ _this4._closeTimer = null;
4667
+ _this4.doClose();
4668
+ }, closeDelay);
4669
+ } else {
4670
+ this.doClose();
4671
+ }
4672
+ },
4673
+ doClose: function doClose() {
4674
+ this._closing = true;
5081
4675
 
5082
- /**
5083
- * Parse or format dates
5084
- * @class fecha
5085
- */
5086
- var fecha = {};
5087
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
5088
- var twoDigits = '\\d\\d?';
5089
- var threeDigits = '\\d{3}';
5090
- var fourDigits = '\\d{4}';
5091
- var word = '[^\\s]+';
5092
- var literal = /\[([^]*?)\]/gm;
5093
- var noop = function noop() {};
4676
+ this.onClose && this.onClose();
5094
4677
 
5095
- function regexEscape(str) {
5096
- return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
5097
- }
4678
+ if (this.lockScroll) {
4679
+ setTimeout(this.restoreBodyStyle, 200);
4680
+ }
5098
4681
 
5099
- function shorten(arr, sLen) {
5100
- var newArr = [];
5101
- for (var i = 0, len = arr.length; i < len; i++) {
5102
- newArr.push(arr[i].substr(0, sLen));
5103
- }
5104
- return newArr;
5105
- }
4682
+ this.opened = false;
5106
4683
 
5107
- function monthUpdate() {
5108
- return function (d, v) {
5109
- var index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
5110
- if (~index) {
5111
- d.month = index;
4684
+ this.doAfterClose();
4685
+ },
4686
+ doAfterClose: function doAfterClose() {
4687
+ eoss_src_utils_popup_popup_manager__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].closeModal(this._popupId);
4688
+ this._closing = false;
4689
+ },
4690
+ restoreBodyStyle: function restoreBodyStyle() {
4691
+ if (this.modal && this.withoutHiddenClass) {
4692
+ document.body.style.paddingRight = this.bodyPaddingRight;
4693
+ Object(_dom__WEBPACK_IMPORTED_MODULE_4__[/* removeClass */ "i"])(document.body, 'es-popup-parent--hidden');
4694
+ }
4695
+ this.withoutHiddenClass = true;
5112
4696
  }
5113
- };
5114
- }
5115
-
5116
- function pad(val, len) {
5117
- val = String(val);
5118
- len = len || 2;
5119
- while (val.length < len) {
5120
- val = '0' + val;
5121
4697
  }
5122
- return val;
5123
- }
5124
-
5125
- // 直接使用中文日期名称常量
5126
- var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
5127
- var monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
5128
- var monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
5129
- var dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
5130
- var amPm = ['上午', '下午'];
5131
- var DoFn = function DoFn(D) {
5132
- return D + '日';
5133
- };
4698
+ });
5134
4699
 
5135
- var formatFlags = {
5136
- D: function D(dateObj) {
5137
- return dateObj.getDay();
5138
- },
5139
- DD: function DD(dateObj) {
5140
- return pad(dateObj.getDay());
5141
- },
5142
- Do: function Do(dateObj) {
5143
- return DoFn(dateObj.getDate());
5144
- },
5145
- d: function d(dateObj) {
5146
- return dateObj.getDate();
5147
- },
5148
- dd: function dd(dateObj) {
5149
- return pad(dateObj.getDate());
5150
- },
5151
- ddd: function ddd(dateObj) {
5152
- return dayNamesShort[dateObj.getDay()];
5153
- },
5154
- dddd: function dddd(dateObj) {
5155
- return dayNames[dateObj.getDay()];
5156
- },
5157
- M: function M(dateObj) {
5158
- return dateObj.getMonth() + 1;
5159
- },
5160
- MM: function MM(dateObj) {
5161
- return pad(dateObj.getMonth() + 1);
5162
- },
5163
- MMM: function MMM(dateObj) {
5164
- return monthNamesShort[dateObj.getMonth()];
5165
- },
5166
- MMMM: function MMMM(dateObj) {
5167
- return monthNames[dateObj.getMonth()];
5168
- },
5169
- yy: function yy(dateObj) {
5170
- return pad(String(dateObj.getFullYear()), 4).substr(2);
5171
- },
5172
- yyyy: function yyyy(dateObj) {
5173
- return pad(dateObj.getFullYear(), 4);
5174
- },
5175
- h: function h(dateObj) {
5176
- return dateObj.getHours() % 12 || 12;
5177
- },
5178
- hh: function hh(dateObj) {
5179
- return pad(dateObj.getHours() % 12 || 12);
5180
- },
5181
- H: function H(dateObj) {
5182
- return dateObj.getHours();
5183
- },
5184
- HH: function HH(dateObj) {
5185
- return pad(dateObj.getHours());
5186
- },
5187
- m: function m(dateObj) {
5188
- return dateObj.getMinutes();
5189
- },
5190
- mm: function mm(dateObj) {
5191
- return pad(dateObj.getMinutes());
5192
- },
5193
- s: function s(dateObj) {
5194
- return dateObj.getSeconds();
5195
- },
5196
- ss: function ss(dateObj) {
5197
- return pad(dateObj.getSeconds());
5198
- },
5199
- S: function S(dateObj) {
5200
- return Math.round(dateObj.getMilliseconds() / 100);
5201
- },
5202
- SS: function SS(dateObj) {
5203
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
5204
- },
5205
- SSS: function SSS(dateObj) {
5206
- return pad(dateObj.getMilliseconds(), 3);
5207
- },
5208
- a: function a(dateObj) {
5209
- return dateObj.getHours() < 12 ? '上午' : '下午';
5210
- },
5211
- A: function A(dateObj) {
5212
- return dateObj.getHours() < 12 ? '上午' : '下午';
5213
- },
5214
- ZZ: function ZZ(dateObj) {
5215
- var o = dateObj.getTimezoneOffset();
5216
- return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
5217
- }
5218
- };
5219
4700
 
5220
- var parseFlags = {
5221
- d: [twoDigits, function (d, v) {
5222
- d.day = v;
5223
- }],
5224
- Do: [twoDigits + word, function (d, v) {
5225
- d.day = parseInt(v, 10);
5226
- }],
5227
- M: [twoDigits, function (d, v) {
5228
- d.month = v - 1;
5229
- }],
5230
- yy: [twoDigits, function (d, v) {
5231
- var da = new Date(),
5232
- cent = +('' + da.getFullYear()).substr(0, 2);
5233
- d.year = '' + (v > 68 ? cent - 1 : cent) + v;
5234
- }],
5235
- h: [twoDigits, function (d, v) {
5236
- d.hour = v;
5237
- }],
5238
- m: [twoDigits, function (d, v) {
5239
- d.minute = v;
5240
- }],
5241
- s: [twoDigits, function (d, v) {
5242
- d.second = v;
5243
- }],
5244
- yyyy: [fourDigits, function (d, v) {
5245
- d.year = v;
5246
- }],
5247
- S: ['\\d', function (d, v) {
5248
- d.millisecond = v * 100;
5249
- }],
5250
- SS: ['\\d{2}', function (d, v) {
5251
- d.millisecond = v * 10;
5252
- }],
5253
- SSS: [threeDigits, function (d, v) {
5254
- d.millisecond = v;
5255
- }],
5256
- D: [twoDigits, noop],
5257
- ddd: [word, noop],
5258
- MMM: [word, monthUpdate('monthNamesShort')],
5259
- MMMM: [word, monthUpdate('monthNames')],
5260
- a: [word, function (d, v) {
5261
- var val = v.toLowerCase();
5262
- if (val === '上午') {
5263
- d.isPm = false;
5264
- } else if (val === '下午') {
5265
- d.isPm = true;
5266
- }
5267
- }],
5268
- ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
5269
- var parts = (v + '').match(/([+-]|\d\d)/gi),
5270
- minutes = void 0;
5271
-
5272
- if (parts) {
5273
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
5274
- d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
5275
- }
5276
- }]
5277
- };
5278
- parseFlags.dd = parseFlags.d;
5279
- parseFlags.dddd = parseFlags.ddd;
5280
- parseFlags.DD = parseFlags.D;
5281
- parseFlags.mm = parseFlags.m;
5282
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
5283
- parseFlags.MM = parseFlags.M;
5284
- parseFlags.ss = parseFlags.s;
5285
- parseFlags.A = parseFlags.a;
5286
-
5287
- // Some common format strings
5288
- fecha.masks = {
5289
- default: 'ddd MMM dd yyyy HH:mm:ss',
5290
- shortDate: 'M/D/yy',
5291
- mediumDate: 'MMM d, yyyy',
5292
- longDate: 'MMMM d, yyyy',
5293
- fullDate: 'dddd, MMMM d, yyyy',
5294
- shortTime: 'HH:mm',
5295
- mediumTime: 'HH:mm:ss',
5296
- longTime: 'HH:mm:ss.SSS'
5297
- };
5298
4701
 
5299
- /***
5300
- * Format a date
5301
- * @method format
5302
- * @param {Date|number} dateObj
5303
- * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
5304
- */
5305
- fecha.format = function (dateObj, mask) {
5306
- if (typeof dateObj === 'number') {
5307
- dateObj = new Date(dateObj);
5308
- }
4702
+ /***/ }),
5309
4703
 
5310
- if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
5311
- throw new Error('Invalid Date in fecha.format');
5312
- }
4704
+ /***/ 4:
4705
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
5313
4706
 
5314
- mask = fecha.masks[mask] || mask || fecha.masks['default'];
4707
+ "use strict";
4708
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
4709
+ /* globals __VUE_SSR_CONTEXT__ */
5315
4710
 
5316
- var literals = [];
4711
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
4712
+ // This module is a runtime utility for cleaner component module output and will
4713
+ // be included in the final webpack user bundle.
5317
4714
 
5318
- // Make literals inactive by replacing them with ??
5319
- mask = mask.replace(literal, function ($0, $1) {
5320
- literals.push($1);
5321
- return '@@@';
5322
- });
5323
- // Apply formatting rules
5324
- mask = mask.replace(token, function ($0) {
5325
- return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
5326
- });
5327
- // Inline literal values back into the formatted value
5328
- return mask.replace(/@@@/g, function () {
5329
- return literals.shift();
5330
- });
5331
- };
4715
+ function normalizeComponent(
4716
+ scriptExports,
4717
+ render,
4718
+ staticRenderFns,
4719
+ functionalTemplate,
4720
+ injectStyles,
4721
+ scopeId,
4722
+ moduleIdentifier /* server only */,
4723
+ shadowMode /* vue-cli only */
4724
+ ) {
4725
+ // Vue.extend constructor export interop
4726
+ var options =
4727
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
5332
4728
 
5333
- /**
5334
- * Parse a date string into an object, changes - into /
5335
- * @method parse
5336
- * @param {string} dateStr Date string
5337
- * @param {string} format Date parse format
5338
- * @returns {Date|boolean}
5339
- */
5340
- fecha.parse = function (dateStr, format) {
5341
- if (typeof format !== 'string') {
5342
- throw new Error('Invalid format in fecha.parse');
4729
+ // render functions
4730
+ if (render) {
4731
+ options.render = render
4732
+ options.staticRenderFns = staticRenderFns
4733
+ options._compiled = true
5343
4734
  }
5344
4735
 
5345
- format = fecha.masks[format] || format;
4736
+ // functional template
4737
+ if (functionalTemplate) {
4738
+ options.functional = true
4739
+ }
5346
4740
 
5347
- // Avoid regular expression denial of service, fail early for really long strings
5348
- // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
5349
- if (dateStr.length > 1000) {
5350
- return null;
4741
+ // scopedId
4742
+ if (scopeId) {
4743
+ options._scopeId = 'data-v-' + scopeId
5351
4744
  }
5352
4745
 
5353
- var dateInfo = {};
5354
- var parseInfo = [];
5355
- var literals = [];
5356
- format = format.replace(literal, function ($0, $1) {
5357
- literals.push($1);
5358
- return '@@@';
5359
- });
5360
- var newFormat = regexEscape(format).replace(token, function ($0) {
5361
- if (parseFlags[$0]) {
5362
- var info = parseFlags[$0];
5363
- parseInfo.push(info[1]);
5364
- return '(' + info[0] + ')';
4746
+ var hook
4747
+ if (moduleIdentifier) {
4748
+ // server build
4749
+ hook = function (context) {
4750
+ // 2.3 injection
4751
+ context =
4752
+ context || // cached call
4753
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
4754
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
4755
+ // 2.2 with runInNewContext: true
4756
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4757
+ context = __VUE_SSR_CONTEXT__
4758
+ }
4759
+ // inject component styles
4760
+ if (injectStyles) {
4761
+ injectStyles.call(this, context)
4762
+ }
4763
+ // register component module identifier for async chunk inferrence
4764
+ if (context && context._registeredComponents) {
4765
+ context._registeredComponents.add(moduleIdentifier)
4766
+ }
5365
4767
  }
5366
-
5367
- return $0;
5368
- });
5369
- newFormat = newFormat.replace(/@@@/g, function () {
5370
- return literals.shift();
5371
- });
5372
- var matches = dateStr.match(new RegExp(newFormat, 'i'));
5373
- if (!matches) {
5374
- return null;
5375
- }
5376
-
5377
- for (var i = 1; i < matches.length; i++) {
5378
- parseInfo[i - 1](dateInfo, matches[i]);
5379
- }
5380
-
5381
- var today = new Date();
5382
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
5383
- dateInfo.hour = +dateInfo.hour + 12;
5384
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
5385
- dateInfo.hour = 0;
5386
- }
5387
-
5388
- var date = void 0;
5389
- if (dateInfo.timezoneOffset != null) {
5390
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
5391
- 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));
5392
- } else {
5393
- 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);
4768
+ // used by ssr in case component is cached and beforeCreate
4769
+ // never gets called
4770
+ options._ssrRegister = hook
4771
+ } else if (injectStyles) {
4772
+ hook = shadowMode
4773
+ ? function () {
4774
+ injectStyles.call(
4775
+ this,
4776
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
4777
+ )
4778
+ }
4779
+ : injectStyles
5394
4780
  }
5395
- return date;
5396
- };
5397
-
5398
- // 导出fecha对象
5399
4781
 
5400
-
5401
- // 以下是从date-util.js合并的函数
5402
- var newArray = function newArray(start, end) {
5403
- var result = [];
5404
- for (var i = start; i <= end; i++) {
5405
- result.push(i);
4782
+ if (hook) {
4783
+ if (options.functional) {
4784
+ // for template-only hot-reload because in that case the render fn doesn't
4785
+ // go through the normalizer
4786
+ options._injectStyles = hook
4787
+ // register for functional component in vue file
4788
+ var originalRender = options.render
4789
+ options.render = function renderWithStyleInjection(h, context) {
4790
+ hook.call(context)
4791
+ return originalRender(h, context)
4792
+ }
4793
+ } else {
4794
+ // inject component registration as beforeCreate hook
4795
+ var existing = options.beforeCreate
4796
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
4797
+ }
5406
4798
  }
5407
- return result;
5408
- };
5409
4799
 
5410
- var getSettings = function getSettings() {
5411
4800
  return {
5412
- dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
5413
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
5414
- monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
5415
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
5416
- amPm: ['上午', '下午']
5417
- };
5418
- };
4801
+ exports: scriptExports,
4802
+ options: options
4803
+ }
4804
+ }
5419
4805
 
5420
- var toDate = function toDate(date) {
5421
- return isDate(date) ? new Date(date) : null;
5422
- };
5423
4806
 
5424
- var isDate = function isDate(date) {
5425
- if (date === null || date === undefined) return false;
5426
- if (isNaN(new Date(date).getTime())) return false;
5427
- if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
5428
- return true;
5429
- };
4807
+ /***/ }),
5430
4808
 
5431
- var isDateObject = function isDateObject(val) {
5432
- return val instanceof Date;
5433
- };
4809
+ /***/ 45:
4810
+ /***/ (function(module, exports) {
5434
4811
 
5435
- var formatDate = function formatDate(date) {
5436
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-MM-dd';
4812
+ var g;
5437
4813
 
5438
- // 处理多种输入类型
5439
- if (!date) return '';
4814
+ // This works in non-strict mode
4815
+ g = (function() {
4816
+ return this;
4817
+ })();
5440
4818
 
5441
- // 如果是时间戳,转成日期对象
5442
- if (typeof date === 'number') {
5443
- date = new Date(date);
5444
- }
5445
- // 如果是字符串,转成日期对象
5446
- if (typeof date === 'string') {
5447
- date = new Date(date);
5448
- }
4819
+ try {
4820
+ // This works if eval is allowed (see CSP)
4821
+ g = g || new Function("return this")();
4822
+ } catch (e) {
4823
+ // This works if the window reference is available
4824
+ if (typeof window === "object") g = window;
4825
+ }
5449
4826
 
5450
- // 调用toDate进一步验证和转换
5451
- date = toDate(date);
5452
- if (!date) return '';
4827
+ // g can still be undefined, but nothing to do about it...
4828
+ // We return undefined, instead of nothing here, so it's
4829
+ // easier to handle this case. if(!global) { ...}
5453
4830
 
5454
- // 兼容大写和小写的格式标记
5455
- // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
5456
- var lowercaseFormat = format.replace(/YYYY/g, 'yyyy').replace(/D/g, 'd');
4831
+ module.exports = g;
5457
4832
 
5458
- // 使用fecha库进行格式化,支持中文配置
5459
- var str = fecha.format(date, lowercaseFormat, getSettings());
5460
- return str;
5461
- };
5462
4833
 
5463
- var parseDate = function parseDate(string, format) {
5464
- return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
5465
- };
4834
+ /***/ }),
5466
4835
 
5467
- var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
5468
- if (month === 3 || month === 5 || month === 8 || month === 10) {
5469
- return 30;
5470
- }
4836
+ /***/ 6:
4837
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
5471
4838
 
5472
- if (month === 1) {
5473
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
5474
- return 29;
5475
- } else {
5476
- return 28;
5477
- }
5478
- }
4839
+ "use strict";
4840
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
4841
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
4842
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
4843
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
4844
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
4845
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
4846
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
4847
+ /* unused harmony export setStyle */
4848
+ /* unused harmony export isScroll */
4849
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
4850
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
4851
+ /* unused harmony export insertAfter */
4852
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
4853
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
4854
+ 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; };
5479
4855
 
5480
- return 31;
5481
- };
4856
+ /* istanbul ignore next */
5482
4857
 
5483
- var getDayCountOfYear = function getDayCountOfYear(year) {
5484
- var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
5485
- return isLeapYear ? 366 : 365;
5486
- };
5487
4858
 
5488
- var getFirstDayOfMonth = function getFirstDayOfMonth(date) {
5489
- var temp = new Date(date.getTime());
5490
- temp.setDate(1);
5491
- return temp.getDay();
5492
- };
5493
4859
 
5494
- // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
5495
- // {prev, next} Date should work for Daylight Saving Time
5496
- // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
5497
- var prevDate = function prevDate(date) {
5498
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4860
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
4861
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
4862
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
4863
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
5499
4864
 
5500
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
4865
+ /* istanbul ignore next */
4866
+ var trim = function trim(string) {
4867
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
5501
4868
  };
5502
-
5503
- var nextDate = function nextDate(date) {
5504
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5505
-
5506
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
4869
+ /* istanbul ignore next */
4870
+ var camelCase = function camelCase(name) {
4871
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
4872
+ return offset ? letter.toUpperCase() : letter;
4873
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
5507
4874
  };
5508
4875
 
5509
- var getStartDateOfMonth = function getStartDateOfMonth(year, month) {
5510
- var result = new Date(year, month, 1);
5511
- var day = result.getDay();
5512
-
5513
- if (day === 0) {
5514
- return prevDate(result, 7);
4876
+ /* istanbul ignore next */
4877
+ var on = function () {
4878
+ if (!isServer && document.addEventListener) {
4879
+ return function (element, event, handler) {
4880
+ if (element && event && handler) {
4881
+ element.addEventListener(event, handler, false);
4882
+ }
4883
+ };
5515
4884
  } else {
5516
- return prevDate(result, day);
4885
+ return function (element, event, handler) {
4886
+ if (element && event && handler) {
4887
+ element.attachEvent('on' + event, handler);
4888
+ }
4889
+ };
5517
4890
  }
5518
- };
4891
+ }();
5519
4892
 
5520
- var getWeekNumber = function getWeekNumber(date) {
5521
- // 支持多种输入类型
5522
- if (!date || !isDate(date)) {
5523
- date = new Date();
5524
- }
5525
- if (typeof date === 'string') {
5526
- date = new Date(date);
4893
+ /* istanbul ignore next */
4894
+ var off = function () {
4895
+ if (!isServer && document.removeEventListener) {
4896
+ return function (element, event, handler) {
4897
+ if (element && event) {
4898
+ element.removeEventListener(event, handler, false);
4899
+ }
4900
+ };
4901
+ } else {
4902
+ return function (element, event, handler) {
4903
+ if (element && event) {
4904
+ element.detachEvent('on' + event, handler);
4905
+ }
4906
+ };
5527
4907
  }
4908
+ }();
5528
4909
 
5529
- // 验证日期有效性
5530
- if (!isDate(date)) return null;
5531
-
5532
- var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
5533
- // 设置为最近的星期四:当前日期 + 4 - 当前星期数
5534
- // 将星期日的星期数设为7
5535
- d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
5536
- // 获取当年的第一天
5537
- var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
5538
- // 计算到最近的星期四的完整周数
5539
- var weekNo = Math.ceil(((d - yearStart) / 86400000 + 1) / 7);
5540
- // 返回周数
5541
- return weekNo;
4910
+ /* istanbul ignore next */
4911
+ var once = function once(el, event, fn) {
4912
+ var listener = function listener() {
4913
+ if (fn) {
4914
+ fn.apply(this, arguments);
4915
+ }
4916
+ off(el, event, listener);
4917
+ };
4918
+ on(el, event, listener);
5542
4919
  };
5543
4920
 
5544
- var getRangeHours = function getRangeHours(ranges) {
5545
- var hours = [];
5546
- var disabledHours = [];
4921
+ /* istanbul ignore next */
4922
+ function hasClass(el, cls) {
4923
+ if (!el || !cls) return false;
4924
+ if (cls.indexOf(' ') !== -1) {
4925
+ throw new Error('className should not contain space.');
4926
+ }
4927
+ if (el.classList) {
4928
+ return el.classList.contains(cls);
4929
+ } else {
4930
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
4931
+ }
4932
+ }
5547
4933
 
5548
- (ranges || []).forEach(function (range) {
5549
- var value = range.map(function (date) {
5550
- return date.getHours();
5551
- });
4934
+ /* istanbul ignore next */
4935
+ function addClass(el, cls) {
4936
+ if (!el) return;
4937
+ var curClass = el.className;
4938
+ var classes = (cls || '').split(' ');
5552
4939
 
5553
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
5554
- });
4940
+ for (var i = 0, j = classes.length; i < j; i++) {
4941
+ var clsName = classes[i];
4942
+ if (!clsName) continue;
5555
4943
 
5556
- if (disabledHours.length) {
5557
- for (var i = 0; i < 24; i++) {
5558
- hours[i] = disabledHours.indexOf(i) === -1;
5559
- }
5560
- } else {
5561
- for (var _i = 0; _i < 24; _i++) {
5562
- hours[_i] = false;
4944
+ if (el.classList) {
4945
+ el.classList.add(clsName);
4946
+ } else if (!hasClass(el, clsName)) {
4947
+ curClass += ' ' + clsName;
5563
4948
  }
5564
4949
  }
4950
+ if (!el.classList) {
4951
+ el.className = curClass;
4952
+ }
4953
+ }
5565
4954
 
5566
- return hours;
5567
- };
5568
-
5569
- var getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
5570
- if (amount <= 0) return [];
5571
- var temp = new Date(date.getTime());
5572
- temp.setDate(0);
5573
- var lastDay = temp.getDate();
5574
- return range(amount).map(function (_, index) {
5575
- return lastDay - (amount - index - 1);
5576
- });
5577
- };
4955
+ /* istanbul ignore next */
4956
+ function removeClass(el, cls) {
4957
+ if (!el || !cls) return;
4958
+ var classes = cls.split(' ');
4959
+ var curClass = ' ' + el.className + ' ';
5578
4960
 
5579
- var getMonthDays = function getMonthDays(date) {
5580
- var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
5581
- var days = temp.getDate();
5582
- return range(days).map(function (_, index) {
5583
- return index + 1;
5584
- });
5585
- };
4961
+ for (var i = 0, j = classes.length; i < j; i++) {
4962
+ var clsName = classes[i];
4963
+ if (!clsName) continue;
5586
4964
 
5587
- function setRangeData(arr, start, end, value) {
5588
- for (var i = start; i < end; i++) {
5589
- arr[i] = value;
4965
+ if (el.classList) {
4966
+ el.classList.remove(clsName);
4967
+ } else if (hasClass(el, clsName)) {
4968
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
4969
+ }
4970
+ }
4971
+ if (!el.classList) {
4972
+ el.className = trim(curClass);
5590
4973
  }
5591
4974
  }
5592
4975
 
5593
- var getRangeMinutes = function getRangeMinutes(ranges, hour) {
5594
- var minutes = new Array(60);
5595
-
5596
- if (ranges.length > 0) {
5597
- ranges.forEach(function (range) {
5598
- var start = range[0];
5599
- var end = range[1];
5600
- var startHour = start.getHours();
5601
- var startMinute = start.getMinutes();
5602
- var endHour = end.getHours();
5603
- var endMinute = end.getMinutes();
5604
- if (startHour === hour && endHour !== hour) {
5605
- setRangeData(minutes, startMinute, 60, true);
5606
- } else if (startHour === hour && endHour === hour) {
5607
- setRangeData(minutes, startMinute, endMinute + 1, true);
5608
- } else if (startHour !== hour && endHour === hour) {
5609
- setRangeData(minutes, 0, endMinute + 1, true);
5610
- } else if (startHour < hour && endHour > hour) {
5611
- setRangeData(minutes, 0, 60, true);
5612
- }
5613
- });
5614
- } else {
5615
- setRangeData(minutes, 0, 60, true);
4976
+ /* istanbul ignore next */
4977
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
4978
+ if (isServer) return;
4979
+ if (!element || !styleName) return null;
4980
+ styleName = camelCase(styleName);
4981
+ if (styleName === 'float') {
4982
+ styleName = 'styleFloat';
5616
4983
  }
5617
- return minutes;
5618
- };
5619
-
5620
- var range = function range(n) {
5621
- // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
5622
- return Array.apply(null, { length: n }).map(function (_, n) {
5623
- return n;
5624
- });
5625
- };
5626
-
5627
- var modifyDate = function modifyDate(date, y, m, d) {
5628
- return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
5629
- };
5630
-
5631
- var modifyTime = function modifyTime(date, h, m, s) {
5632
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
5633
- };
5634
-
5635
- var modifyWithTimeString = function modifyWithTimeString(date, time) {
5636
- if (date == null || !time) {
5637
- return date;
4984
+ try {
4985
+ switch (styleName) {
4986
+ case 'opacity':
4987
+ try {
4988
+ return element.filters.item('alpha').opacity / 100;
4989
+ } catch (e) {
4990
+ return 1.0;
4991
+ }
4992
+ default:
4993
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
4994
+ }
4995
+ } catch (e) {
4996
+ return element.style[styleName];
4997
+ }
4998
+ } : function (element, styleName) {
4999
+ if (isServer) return;
5000
+ if (!element || !styleName) return null;
5001
+ styleName = camelCase(styleName);
5002
+ if (styleName === 'float') {
5003
+ styleName = 'cssFloat';
5004
+ }
5005
+ try {
5006
+ var computed = document.defaultView.getComputedStyle(element, '');
5007
+ return element.style[styleName] || computed ? computed[styleName] : null;
5008
+ } catch (e) {
5009
+ return element.style[styleName];
5638
5010
  }
5639
- time = parseDate(time, 'HH:mm:ss');
5640
- return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
5641
- };
5642
-
5643
- var clearTime = function clearTime(date) {
5644
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5645
- };
5646
-
5647
- var clearMilliseconds = function clearMilliseconds(date) {
5648
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
5649
5011
  };
5650
5012
 
5651
- var limitTimeRange = function limitTimeRange(date, ranges) {
5652
- var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
5653
-
5654
- // TODO: refactory a more elegant solution
5655
- if (ranges.length === 0) return date;
5656
- var normalizeDate = function normalizeDate(date) {
5657
- return fecha.parse(fecha.format(date, format), format);
5658
- };
5659
- var ndate = normalizeDate(date);
5660
- var nranges = ranges.map(function (range) {
5661
- return range.map(normalizeDate);
5662
- });
5663
- if (nranges.some(function (nrange) {
5664
- return ndate >= nrange[0] && ndate <= nrange[1];
5665
- })) return date;
5013
+ /* istanbul ignore next */
5014
+ function setStyle(element, styleName, value) {
5015
+ if (!element || !styleName) return;
5666
5016
 
5667
- var minDate = nranges[0][0];
5668
- var maxDate = nranges[0][0];
5017
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
5018
+ for (var prop in styleName) {
5019
+ if (styleName.hasOwnProperty(prop)) {
5020
+ setStyle(element, prop, styleName[prop]);
5021
+ }
5022
+ }
5023
+ } else {
5024
+ styleName = camelCase(styleName);
5025
+ if (styleName === 'opacity' && ieVersion < 9) {
5026
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
5027
+ } else {
5028
+ element.style[styleName] = value;
5029
+ }
5030
+ }
5031
+ }
5669
5032
 
5670
- nranges.forEach(function (nrange) {
5671
- minDate = new Date(Math.min(nrange[0], minDate));
5672
- maxDate = new Date(Math.max(nrange[1], minDate));
5673
- });
5033
+ var isScroll = function isScroll(el, vertical) {
5034
+ if (isServer) return;
5674
5035
 
5675
- var ret = ndate < minDate ? minDate : maxDate;
5676
- // preserve Year/Month/Date
5677
- return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
5678
- };
5036
+ var determinedDirection = vertical !== null || vertical !== undefined;
5037
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
5679
5038
 
5680
- var timeWithinRange = function timeWithinRange(date, selectableRange, format) {
5681
- var limitedDate = limitTimeRange(date, selectableRange, format);
5682
- return limitedDate.getTime() === date.getTime();
5039
+ return overflow.match(/(scroll|auto)/);
5683
5040
  };
5684
5041
 
5685
- var changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
5686
- // clamp date to the number of days in `year`, `month`
5687
- // eg: (2010-1-31, 2010, 2) => 2010-2-28
5688
- var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
5689
- return modifyDate(date, year, month, monthDate);
5690
- };
5042
+ var getScrollContainer = function getScrollContainer(el, vertical) {
5043
+ if (isServer) return;
5691
5044
 
5692
- var prevMonth = function prevMonth(date) {
5693
- var year = date.getFullYear();
5694
- var month = date.getMonth();
5695
- return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
5696
- };
5045
+ var parent = el;
5046
+ while (parent) {
5047
+ if ([window, document, document.documentElement].includes(parent)) {
5048
+ return window;
5049
+ }
5050
+ if (isScroll(parent, vertical)) {
5051
+ return parent;
5052
+ }
5053
+ parent = parent.parentNode;
5054
+ }
5697
5055
 
5698
- var nextMonth = function nextMonth(date) {
5699
- var year = date.getFullYear();
5700
- var month = date.getMonth();
5701
- return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
5056
+ return parent;
5702
5057
  };
5703
5058
 
5704
- var prevYear = function prevYear(date) {
5705
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5059
+ var isInContainer = function isInContainer(el, container) {
5060
+ if (isServer || !el || !container) return false;
5706
5061
 
5707
- var year = date.getFullYear();
5708
- var month = date.getMonth();
5709
- return changeYearMonthAndClampDate(date, year - amount, month);
5710
- };
5062
+ var elRect = el.getBoundingClientRect();
5063
+ var containerRect = void 0;
5711
5064
 
5712
- var nextYear = function nextYear(date) {
5713
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5065
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
5066
+ containerRect = {
5067
+ top: 0,
5068
+ right: window.innerWidth,
5069
+ bottom: window.innerHeight,
5070
+ left: 0
5071
+ };
5072
+ } else {
5073
+ containerRect = container.getBoundingClientRect();
5074
+ }
5714
5075
 
5715
- var year = date.getFullYear();
5716
- var month = date.getMonth();
5717
- return changeYearMonthAndClampDate(date, year + amount, month);
5076
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
5718
5077
  };
5719
5078
 
5720
- var extractDateFormat = function extractDateFormat(format) {
5721
- return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
5722
- };
5079
+ /**
5080
+ * 在元素前插入元素
5081
+ * @param {HTMLElement} newEl 新DOM元素
5082
+ * @param {HTMLElement} targetEl 在指定目标DOM元素前插入
5083
+ */
5084
+ function insertAfter(newEl, targetEl) {
5085
+ var parentEl = targetEl.parentNode;
5086
+ if (parentEl.lastChild === targetEl) {
5087
+ parentEl.appendChild(newEl);
5088
+ } else {
5089
+ parentEl.insertBefore(newEl, targetEl.nextSibling);
5090
+ }
5091
+ }
5723
5092
 
5724
- var extractTimeFormat = function extractTimeFormat(format) {
5725
- return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
5726
- };
5093
+ /***/ }),
5727
5094
 
5728
- var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
5729
- return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
5730
- };
5095
+ /***/ 7:
5096
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
5731
5097
 
5098
+ "use strict";
5099
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return fecha; });
5100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getSettings; });
5101
+ /* unused harmony export toDate */
5102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return isDate; });
5103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return isDateObject; });
5104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return formatDate; });
5105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return parseDate; });
5106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getDayCountOfMonth; });
5107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getDayCountOfYear; });
5108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getFirstDayOfMonth; });
5109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return prevDate; });
5110
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return nextDate; });
5111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getStartDateOfMonth; });
5112
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getWeekNumber; });
5113
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getRangeHours; });
5114
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getPrevMonthLastDays; });
5115
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getMonthDays; });
5116
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getRangeMinutes; });
5117
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return range; });
5118
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return modifyDate; });
5119
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return modifyTime; });
5120
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return modifyWithTimeString; });
5121
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return clearTime; });
5122
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return clearMilliseconds; });
5123
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return limitTimeRange; });
5124
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return timeWithinRange; });
5125
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeYearMonthAndClampDate; });
5126
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return prevMonth; });
5127
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return nextMonth; });
5128
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return prevYear; });
5129
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return nextYear; });
5130
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return extractDateFormat; });
5131
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return extractTimeFormat; });
5132
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return validateRangeInOneMonth; });
5133
+ /* unused harmony export calculateNetworkDays */
5134
+ /* unused harmony export dateAddDays */
5135
+ /* unused harmony export dateDiff */
5136
+ /* unused harmony export dayOfMonth */
5137
+ /* unused harmony export getCurrentDate */
5138
+ /* unused harmony export getCurrentDateTime */
5139
+ /* unused harmony export getHour */
5140
+ /* unused harmony export getMinute */
5141
+ /* unused harmony export getMonth */
5142
+ /* unused harmony export getSecond */
5143
+ /* unused harmony export getWeekday */
5144
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
5145
+ /* Modified from https://github.com/taylorhakes/fecha
5146
+ *
5147
+ * The MIT License (MIT)
5148
+ *
5149
+ * Copyright (c) 2015 Taylor Hakes
5150
+ *
5151
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5152
+ * of this software and associated documentation files (the "Software"), to deal
5153
+ * in the Software without restriction, including without limitation the rights
5154
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5155
+ * copies of the Software, and to permit persons to whom the Software is
5156
+ * furnished to do so, subject to the following conditions:
5157
+ *
5158
+ * The above copyright notice and this permission notice shall be included in all
5159
+ * copies or substantial portions of the Software.
5160
+ *
5161
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5162
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5163
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5164
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5165
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5166
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5167
+ * SOFTWARE.
5168
+ */
5169
+
5170
+ /*eslint-disable*/
5171
+ // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
5172
+
5173
+
5174
+ /**
5175
+ * Parse or format dates
5176
+ * @class fecha
5177
+ */
5178
+ const fecha = {};
5179
+ const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
5180
+ const twoDigits = '\\d\\d?';
5181
+ const threeDigits = '\\d{3}';
5182
+ const fourDigits = '\\d{4}';
5183
+ const word = '[^\\s]+';
5184
+ const literal = /\[([^]*?)\]/gm;
5185
+ const noop = function () {};
5186
+
5187
+ function regexEscape(str) {
5188
+ return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
5189
+ }
5190
+
5191
+ function shorten(arr, sLen) {
5192
+ const newArr = [];
5193
+ for (let i = 0, len = arr.length; i < len; i++) {
5194
+ newArr.push(arr[i].substr(0, sLen));
5195
+ }
5196
+ return newArr;
5197
+ }
5198
+
5199
+ function monthUpdate() {
5200
+ return function (d, v) {
5201
+ const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
5202
+ if (~index) {
5203
+ d.month = index;
5204
+ }
5205
+ };
5206
+ }
5207
+
5208
+ function pad(val, len) {
5209
+ val = String(val);
5210
+ len = len || 2;
5211
+ while (val.length < len) {
5212
+ val = '0' + val;
5213
+ }
5214
+ return val;
5215
+ }
5216
+
5217
+ // 直接使用中文日期名称常量
5218
+ const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
5219
+ const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
5220
+ const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
5221
+ const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
5222
+ const amPm = ['上午', '下午'];
5223
+ const DoFn = function DoFn(D) {
5224
+ return D + '日';
5225
+ };
5226
+
5227
+ const formatFlags = {
5228
+ D: function(dateObj) {
5229
+ return dateObj.getDay();
5230
+ },
5231
+ DD: function(dateObj) {
5232
+ return pad(dateObj.getDay());
5233
+ },
5234
+ Do: function(dateObj) {
5235
+ return DoFn(dateObj.getDate());
5236
+ },
5237
+ d: function(dateObj) {
5238
+ return dateObj.getDate();
5239
+ },
5240
+ dd: function(dateObj) {
5241
+ return pad(dateObj.getDate());
5242
+ },
5243
+ ddd: function(dateObj) {
5244
+ return dayNamesShort[dateObj.getDay()];
5245
+ },
5246
+ dddd: function(dateObj) {
5247
+ return dayNames[dateObj.getDay()];
5248
+ },
5249
+ M: function(dateObj) {
5250
+ return dateObj.getMonth() + 1;
5251
+ },
5252
+ MM: function(dateObj) {
5253
+ return pad(dateObj.getMonth() + 1);
5254
+ },
5255
+ MMM: function(dateObj) {
5256
+ return monthNamesShort[dateObj.getMonth()];
5257
+ },
5258
+ MMMM: function(dateObj) {
5259
+ return monthNames[dateObj.getMonth()];
5260
+ },
5261
+ yy: function(dateObj) {
5262
+ return pad(String(dateObj.getFullYear()), 4).substr(2);
5263
+ },
5264
+ yyyy: function(dateObj) {
5265
+ return pad(dateObj.getFullYear(), 4);
5266
+ },
5267
+ h: function(dateObj) {
5268
+ return dateObj.getHours() % 12 || 12;
5269
+ },
5270
+ hh: function(dateObj) {
5271
+ return pad(dateObj.getHours() % 12 || 12);
5272
+ },
5273
+ H: function(dateObj) {
5274
+ return dateObj.getHours();
5275
+ },
5276
+ HH: function(dateObj) {
5277
+ return pad(dateObj.getHours());
5278
+ },
5279
+ m: function(dateObj) {
5280
+ return dateObj.getMinutes();
5281
+ },
5282
+ mm: function(dateObj) {
5283
+ return pad(dateObj.getMinutes());
5284
+ },
5285
+ s: function(dateObj) {
5286
+ return dateObj.getSeconds();
5287
+ },
5288
+ ss: function(dateObj) {
5289
+ return pad(dateObj.getSeconds());
5290
+ },
5291
+ S: function(dateObj) {
5292
+ return Math.round(dateObj.getMilliseconds() / 100);
5293
+ },
5294
+ SS: function(dateObj) {
5295
+ return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
5296
+ },
5297
+ SSS: function(dateObj) {
5298
+ return pad(dateObj.getMilliseconds(), 3);
5299
+ },
5300
+ a: function(dateObj) {
5301
+ return dateObj.getHours() < 12 ? '上午' : '下午';
5302
+ },
5303
+ A: function(dateObj) {
5304
+ return dateObj.getHours() < 12 ? '上午' : '下午';
5305
+ },
5306
+ ZZ: function(dateObj) {
5307
+ const o = dateObj.getTimezoneOffset();
5308
+ return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
5309
+ }
5310
+ };
5311
+
5312
+ const parseFlags = {
5313
+ d: [twoDigits, function (d, v) {
5314
+ d.day = v;
5315
+ }],
5316
+ Do: [twoDigits + word, function (d, v) {
5317
+ d.day = parseInt(v, 10);
5318
+ }],
5319
+ M: [twoDigits, function (d, v) {
5320
+ d.month = v - 1;
5321
+ }],
5322
+ yy: [twoDigits, function (d, v) {
5323
+ const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
5324
+ d.year = '' + (v > 68 ? cent - 1 : cent) + v;
5325
+ }],
5326
+ h: [twoDigits, function (d, v) {
5327
+ d.hour = v;
5328
+ }],
5329
+ m: [twoDigits, function (d, v) {
5330
+ d.minute = v;
5331
+ }],
5332
+ s: [twoDigits, function (d, v) {
5333
+ d.second = v;
5334
+ }],
5335
+ yyyy: [fourDigits, function (d, v) {
5336
+ d.year = v;
5337
+ }],
5338
+ S: ['\\d', function (d, v) {
5339
+ d.millisecond = v * 100;
5340
+ }],
5341
+ SS: ['\\d{2}', function (d, v) {
5342
+ d.millisecond = v * 10;
5343
+ }],
5344
+ SSS: [threeDigits, function (d, v) {
5345
+ d.millisecond = v;
5346
+ }],
5347
+ D: [twoDigits, noop],
5348
+ ddd: [word, noop],
5349
+ MMM: [word, monthUpdate('monthNamesShort')],
5350
+ MMMM: [word, monthUpdate('monthNames')],
5351
+ a: [word, function (d, v) {
5352
+ const val = v.toLowerCase();
5353
+ if (val === '上午') {
5354
+ d.isPm = false;
5355
+ } else if (val === '下午') {
5356
+ d.isPm = true;
5357
+ }
5358
+ }],
5359
+ ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
5360
+ let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
5361
+
5362
+ if (parts) {
5363
+ minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
5364
+ d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
5365
+ }
5366
+ }]
5367
+ };
5368
+ parseFlags.dd = parseFlags.d;
5369
+ parseFlags.dddd = parseFlags.ddd;
5370
+ parseFlags.DD = parseFlags.D;
5371
+ parseFlags.mm = parseFlags.m;
5372
+ parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
5373
+ parseFlags.MM = parseFlags.M;
5374
+ parseFlags.ss = parseFlags.s;
5375
+ parseFlags.A = parseFlags.a;
5376
+
5377
+
5378
+ // Some common format strings
5379
+ fecha.masks = {
5380
+ default: 'ddd MMM dd yyyy HH:mm:ss',
5381
+ shortDate: 'M/D/yy',
5382
+ mediumDate: 'MMM d, yyyy',
5383
+ longDate: 'MMMM d, yyyy',
5384
+ fullDate: 'dddd, MMMM d, yyyy',
5385
+ shortTime: 'HH:mm',
5386
+ mediumTime: 'HH:mm:ss',
5387
+ longTime: 'HH:mm:ss.SSS'
5388
+ };
5389
+
5390
+ /***
5391
+ * Format a date
5392
+ * @method format
5393
+ * @param {Date|number} dateObj
5394
+ * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
5395
+ */
5396
+ fecha.format = function (dateObj, mask) {
5397
+ if (typeof dateObj === 'number') {
5398
+ dateObj = new Date(dateObj);
5399
+ }
5400
+
5401
+ if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
5402
+ throw new Error('Invalid Date in fecha.format');
5403
+ }
5404
+
5405
+ mask = fecha.masks[mask] || mask || fecha.masks['default'];
5406
+
5407
+ const literals = [];
5408
+
5409
+ // Make literals inactive by replacing them with ??
5410
+ mask = mask.replace(literal, function($0, $1) {
5411
+ literals.push($1);
5412
+ return '@@@';
5413
+ });
5414
+ // Apply formatting rules
5415
+ mask = mask.replace(token, function ($0) {
5416
+ return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
5417
+ });
5418
+ // Inline literal values back into the formatted value
5419
+ return mask.replace(/@@@/g, function() {
5420
+ return literals.shift();
5421
+ });
5422
+ };
5423
+
5424
+ /**
5425
+ * Parse a date string into an object, changes - into /
5426
+ * @method parse
5427
+ * @param {string} dateStr Date string
5428
+ * @param {string} format Date parse format
5429
+ * @returns {Date|boolean}
5430
+ */
5431
+ fecha.parse = function (dateStr, format) {
5432
+ if (typeof format !== 'string') {
5433
+ throw new Error('Invalid format in fecha.parse');
5434
+ }
5435
+
5436
+ format = fecha.masks[format] || format;
5437
+
5438
+ // Avoid regular expression denial of service, fail early for really long strings
5439
+ // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
5440
+ if (dateStr.length > 1000) {
5441
+ return null;
5442
+ }
5443
+
5444
+ const dateInfo = {};
5445
+ const parseInfo = [];
5446
+ const literals = [];
5447
+ format = format.replace(literal, function($0, $1) {
5448
+ literals.push($1);
5449
+ return '@@@';
5450
+ });
5451
+ let newFormat = regexEscape(format).replace(token, function ($0) {
5452
+ if (parseFlags[$0]) {
5453
+ const info = parseFlags[$0];
5454
+ parseInfo.push(info[1]);
5455
+ return '(' + info[0] + ')';
5456
+ }
5457
+
5458
+ return $0;
5459
+ });
5460
+ newFormat = newFormat.replace(/@@@/g, function() {
5461
+ return literals.shift();
5462
+ });
5463
+ const matches = dateStr.match(new RegExp(newFormat, 'i'));
5464
+ if (!matches) {
5465
+ return null;
5466
+ }
5467
+
5468
+ for (let i = 1; i < matches.length; i++) {
5469
+ parseInfo[i - 1](dateInfo, matches[i]);
5470
+ }
5471
+
5472
+ const today = new Date();
5473
+ if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
5474
+ dateInfo.hour = +dateInfo.hour + 12;
5475
+ } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
5476
+ dateInfo.hour = 0;
5477
+ }
5478
+
5479
+ let date;
5480
+ if (dateInfo.timezoneOffset != null) {
5481
+ dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
5482
+ date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
5483
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
5484
+ } else {
5485
+ date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
5486
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
5487
+ }
5488
+ return date;
5489
+ };
5490
+
5491
+ // 导出fecha对象
5492
+
5493
+
5494
+ // 以下是从date-util.js合并的函数
5495
+ const newArray = function(start, end) {
5496
+ let result = [];
5497
+ for (let i = start; i <= end; i++) {
5498
+ result.push(i);
5499
+ }
5500
+ return result;
5501
+ };
5502
+
5503
+ const getSettings = () => {
5504
+ return {
5505
+ dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
5506
+ dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
5507
+ monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
5508
+ monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
5509
+ amPm: ['上午', '下午']
5510
+ };
5511
+ };
5512
+
5513
+ const toDate = function(date) {
5514
+ return isDate(date) ? new Date(date) : null;
5515
+ };
5516
+
5517
+ const isDate = function(date) {
5518
+ if (date === null || date === undefined) return false;
5519
+ if (isNaN(new Date(date).getTime())) return false;
5520
+ if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
5521
+ return true;
5522
+ };
5523
+
5524
+ const isDateObject = function(val) {
5525
+ return val instanceof Date;
5526
+ };
5527
+
5528
+ const formatDate = function (date, format = 'yyyy-MM-dd') {
5529
+ // 处理多种输入类型
5530
+ if (!date) return '';
5531
+
5532
+ // 如果是时间戳,转成日期对象
5533
+ if (typeof date === 'number') {
5534
+ date = new Date(date);
5535
+ }
5536
+ // 如果是字符串,转成日期对象
5537
+ if (typeof date === 'string') {
5538
+ date = new Date(date);
5539
+ }
5540
+
5541
+ // 调用toDate进一步验证和转换
5542
+ date = toDate(date);
5543
+ if (!date) return '';
5544
+
5545
+ // 兼容大写和小写的格式标记
5546
+ // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
5547
+ const lowercaseFormat = format
5548
+ .replace(/YYYY/g, 'yyyy')
5549
+ .replace(/D/g, 'd')
5550
+
5551
+ // 使用fecha库进行格式化,支持中文配置
5552
+ const str = fecha.format(date, lowercaseFormat, getSettings());
5553
+ return str;
5554
+ };
5555
+
5556
+ const parseDate = function(string, format) {
5557
+ return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
5558
+ };
5559
+
5560
+ const getDayCountOfMonth = function(year, month) {
5561
+ if (month === 3 || month === 5 || month === 8 || month === 10) {
5562
+ return 30;
5563
+ }
5564
+
5565
+ if (month === 1) {
5566
+ if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
5567
+ return 29;
5568
+ } else {
5569
+ return 28;
5570
+ }
5571
+ }
5572
+
5573
+ return 31;
5574
+ };
5575
+
5576
+ const getDayCountOfYear = function(year) {
5577
+ const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
5578
+ return isLeapYear ? 366 : 365;
5579
+ };
5580
+
5581
+ const getFirstDayOfMonth = function(date) {
5582
+ const temp = new Date(date.getTime());
5583
+ temp.setDate(1);
5584
+ return temp.getDay();
5585
+ };
5586
+
5587
+ // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
5588
+ // {prev, next} Date should work for Daylight Saving Time
5589
+ // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
5590
+ const prevDate = function(date, amount = 1) {
5591
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
5592
+ };
5593
+
5594
+ const nextDate = function(date, amount = 1) {
5595
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
5596
+ };
5597
+
5598
+ const getStartDateOfMonth = function(year, month) {
5599
+ const result = new Date(year, month, 1);
5600
+ const day = result.getDay();
5601
+
5602
+ if (day === 0) {
5603
+ return prevDate(result, 7);
5604
+ } else {
5605
+ return prevDate(result, day);
5606
+ }
5607
+ };
5608
+
5609
+ const getWeekNumber = function(date) {
5610
+ // 支持多种输入类型
5611
+ if (!date||!isDate(date)) {
5612
+ date = new Date();
5613
+ }
5614
+ if (typeof date === 'string') {
5615
+ date = new Date(date);
5616
+ }
5617
+
5618
+ // 验证日期有效性
5619
+ if (!isDate(date)) return null;
5620
+
5621
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
5622
+ // 设置为最近的星期四:当前日期 + 4 - 当前星期数
5623
+ // 将星期日的星期数设为7
5624
+ d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
5625
+ // 获取当年的第一天
5626
+ const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
5627
+ // 计算到最近的星期四的完整周数
5628
+ const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
5629
+ // 返回周数
5630
+ return weekNo;
5631
+ };
5632
+
5633
+ const getRangeHours = function(ranges) {
5634
+ const hours = [];
5635
+ let disabledHours = [];
5636
+
5637
+ (ranges || []).forEach(range => {
5638
+ const value = range.map(date => date.getHours());
5639
+
5640
+ disabledHours = disabledHours.concat(newArray(value[0], value[1]));
5641
+ });
5642
+
5643
+ if (disabledHours.length) {
5644
+ for (let i = 0; i < 24; i++) {
5645
+ hours[i] = disabledHours.indexOf(i) === -1;
5646
+ }
5647
+ } else {
5648
+ for (let i = 0; i < 24; i++) {
5649
+ hours[i] = false;
5650
+ }
5651
+ }
5652
+
5653
+ return hours;
5654
+ };
5655
+
5656
+ const getPrevMonthLastDays = (date, amount) => {
5657
+ if (amount <= 0) return [];
5658
+ const temp = new Date(date.getTime());
5659
+ temp.setDate(0);
5660
+ const lastDay = temp.getDate();
5661
+ return range(amount).map((_, index) => lastDay - (amount - index - 1));
5662
+ };
5663
+
5664
+ const getMonthDays = (date) => {
5665
+ const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
5666
+ const days = temp.getDate();
5667
+ return range(days).map((_, index) => index + 1);
5668
+ };
5669
+
5670
+ function setRangeData(arr, start, end, value) {
5671
+ for (let i = start; i < end; i++) {
5672
+ arr[i] = value;
5673
+ }
5674
+ }
5675
+
5676
+ const getRangeMinutes = function(ranges, hour) {
5677
+ const minutes = new Array(60);
5678
+
5679
+ if (ranges.length > 0) {
5680
+ ranges.forEach(range => {
5681
+ const start = range[0];
5682
+ const end = range[1];
5683
+ const startHour = start.getHours();
5684
+ const startMinute = start.getMinutes();
5685
+ const endHour = end.getHours();
5686
+ const endMinute = end.getMinutes();
5687
+ if (startHour === hour && endHour !== hour) {
5688
+ setRangeData(minutes, startMinute, 60, true);
5689
+ } else if (startHour === hour && endHour === hour) {
5690
+ setRangeData(minutes, startMinute, endMinute + 1, true);
5691
+ } else if (startHour !== hour && endHour === hour) {
5692
+ setRangeData(minutes, 0, endMinute + 1, true);
5693
+ } else if (startHour < hour && endHour > hour) {
5694
+ setRangeData(minutes, 0, 60, true);
5695
+ }
5696
+ });
5697
+ } else {
5698
+ setRangeData(minutes, 0, 60, true);
5699
+ }
5700
+ return minutes;
5701
+ };
5702
+
5703
+ const range = function(n) {
5704
+ // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
5705
+ return Array.apply(null, {length: n}).map((_, n) => n);
5706
+ };
5707
+
5708
+ const modifyDate = function(date, y, m, d) {
5709
+ return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
5710
+ };
5711
+
5712
+ const modifyTime = function(date, h, m, s) {
5713
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
5714
+ };
5715
+
5716
+ const modifyWithTimeString = (date, time) => {
5717
+ if (date == null || !time) {
5718
+ return date;
5719
+ }
5720
+ time = parseDate(time, 'HH:mm:ss');
5721
+ return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
5722
+ };
5723
+
5724
+ const clearTime = function(date) {
5725
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5726
+ };
5727
+
5728
+ const clearMilliseconds = function(date) {
5729
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
5730
+ };
5731
+
5732
+ const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
5733
+ // TODO: refactory a more elegant solution
5734
+ if (ranges.length === 0) return date;
5735
+ const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
5736
+ const ndate = normalizeDate(date);
5737
+ const nranges = ranges.map(range => range.map(normalizeDate));
5738
+ if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
5739
+
5740
+ let minDate = nranges[0][0];
5741
+ let maxDate = nranges[0][0];
5742
+
5743
+ nranges.forEach(nrange => {
5744
+ minDate = new Date(Math.min(nrange[0], minDate));
5745
+ maxDate = new Date(Math.max(nrange[1], minDate));
5746
+ });
5747
+
5748
+ const ret = ndate < minDate ? minDate : maxDate;
5749
+ // preserve Year/Month/Date
5750
+ return modifyDate(
5751
+ ret,
5752
+ date.getFullYear(),
5753
+ date.getMonth(),
5754
+ date.getDate()
5755
+ );
5756
+ };
5757
+
5758
+ const timeWithinRange = function(date, selectableRange, format) {
5759
+ const limitedDate = limitTimeRange(date, selectableRange, format);
5760
+ return limitedDate.getTime() === date.getTime();
5761
+ };
5762
+
5763
+ const changeYearMonthAndClampDate = function(date, year, month) {
5764
+ // clamp date to the number of days in `year`, `month`
5765
+ // eg: (2010-1-31, 2010, 2) => 2010-2-28
5766
+ const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
5767
+ return modifyDate(date, year, month, monthDate);
5768
+ };
5769
+
5770
+ const prevMonth = function(date) {
5771
+ const year = date.getFullYear();
5772
+ const month = date.getMonth();
5773
+ return month === 0
5774
+ ? changeYearMonthAndClampDate(date, year - 1, 11)
5775
+ : changeYearMonthAndClampDate(date, year, month - 1);
5776
+ };
5777
+
5778
+ const nextMonth = function(date) {
5779
+ const year = date.getFullYear();
5780
+ const month = date.getMonth();
5781
+ return month === 11
5782
+ ? changeYearMonthAndClampDate(date, year + 1, 0)
5783
+ : changeYearMonthAndClampDate(date, year, month + 1);
5784
+ };
5785
+
5786
+ const prevYear = function(date, amount = 1) {
5787
+ const year = date.getFullYear();
5788
+ const month = date.getMonth();
5789
+ return changeYearMonthAndClampDate(date, year - amount, month);
5790
+ };
5791
+
5792
+ const nextYear = function(date, amount = 1) {
5793
+ const year = date.getFullYear();
5794
+ const month = date.getMonth();
5795
+ return changeYearMonthAndClampDate(date, year + amount, month);
5796
+ };
5797
+
5798
+ const extractDateFormat = function(format) {
5799
+ return format
5800
+ .replace(/\W?m{1,2}|\W?ZZ/g, '')
5801
+ .replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
5802
+ .trim();
5803
+ };
5804
+
5805
+ const extractTimeFormat = function(format) {
5806
+ return format
5807
+ .replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
5808
+ .trim();
5809
+ };
5810
+
5811
+ const validateRangeInOneMonth = function(start, end) {
5812
+ return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
5813
+ };
5814
+
5732
5815
  /**
5733
5816
  * 计算两个日期之间的工作日数量(不包括周末和节假日)
5734
5817
  * @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
5735
5818
  * @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
5736
5819
  * @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
5737
5820
  * @returns {number} 工作日数量
5738
- */
5739
- var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
5740
- var holidays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5741
-
5742
- if (typeof start_date !== 'string' || typeof end_date !== 'string') {
5743
- throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
5744
- }
5745
-
5746
- var startDateObj = new Date(start_date);
5747
- var endDateObj = new Date(end_date);
5748
-
5749
- if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
5750
- throw new Error("Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'.");
5751
- }
5752
-
5753
- if (startDateObj > endDateObj) {
5754
- throw new Error('Start date should be earlier than or equal to end date.');
5755
- }
5756
-
5757
- var workdays = 0;
5758
-
5759
- // Iterate through each day in the date range
5760
-
5761
- var _loop = function _loop(currentDate) {
5762
- // Check if the current day is a weekend (Saturday or Sunday)
5763
- var isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
5764
-
5765
- // Check if the current day is a holiday
5766
- var isHoliday = holidays.some(function (holiday) {
5767
- var holidayDate = new Date(holiday);
5768
- return currentDate.toDateString() === holidayDate.toDateString();
5769
- });
5770
-
5771
- // If it's a workday (not a weekend or holiday), increment the workdays count
5772
- if (!isWeekend && !isHoliday) {
5773
- workdays++;
5774
- }
5775
- };
5776
-
5777
- for (var currentDate = new Date(startDateObj); currentDate <= endDateObj; currentDate.setDate(currentDate.getDate() + 1)) {
5778
- _loop(currentDate);
5779
- }
5780
-
5781
- return workdays;
5782
- };
5783
-
5821
+ */
5822
+ const calculateNetworkDays = function (start_date, end_date, holidays = []) {
5823
+ if (typeof start_date !== 'string' || typeof end_date !== 'string') {
5824
+ throw new Error(
5825
+ "Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
5826
+ );
5827
+ }
5828
+
5829
+ const startDateObj = new Date(start_date);
5830
+ const endDateObj = new Date(end_date);
5831
+
5832
+ if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
5833
+ throw new Error(
5834
+ "Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
5835
+ );
5836
+ }
5837
+
5838
+ if (startDateObj > endDateObj) {
5839
+ throw new Error('Start date should be earlier than or equal to end date.');
5840
+ }
5841
+
5842
+ let workdays = 0;
5843
+
5844
+ // Iterate through each day in the date range
5845
+ for (
5846
+ let currentDate = new Date(startDateObj);
5847
+ currentDate <= endDateObj;
5848
+ currentDate.setDate(currentDate.getDate() + 1)
5849
+ ) {
5850
+ // Check if the current day is a weekend (Saturday or Sunday)
5851
+ const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
5852
+
5853
+ // Check if the current day is a holiday
5854
+ const isHoliday = holidays.some((holiday) => {
5855
+ const holidayDate = new Date(holiday);
5856
+ return currentDate.toDateString() === holidayDate.toDateString();
5857
+ });
5858
+
5859
+ // If it's a workday (not a weekend or holiday), increment the workdays count
5860
+ if (!isWeekend && !isHoliday) {
5861
+ workdays++;
5862
+ }
5863
+ }
5864
+
5865
+ return workdays;
5866
+ };
5867
+
5784
5868
  /**
5785
5869
  * 日期加减天数
5786
5870
  * @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
5787
5871
  * @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
5788
5872
  * @returns {string} 结果日期,格式为 "YYYY-MM-DD"
5789
- */
5790
- var dateAddDays = function dateAddDays(start_date, days) {
5791
- if (typeof start_date !== 'string' || !Number.isInteger(days)) {
5792
- 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.");
5793
- }
5794
-
5795
- var startDateObj = new Date(start_date);
5796
- if (isNaN(startDateObj.getTime())) {
5797
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5798
- }
5799
-
5800
- var resultDateObj = new Date(startDateObj);
5801
- resultDateObj.setDate(resultDateObj.getDate() + days);
5802
-
5803
- var resultYear = resultDateObj.getFullYear();
5804
- var resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
5805
- var resultDay = String(resultDateObj.getDate()).padStart(2, '0');
5806
-
5807
- return resultYear + '-' + resultMonth + '-' + resultDay;
5808
- };
5809
-
5873
+ */
5874
+ const dateAddDays = function (start_date, days) {
5875
+ if (typeof start_date !== 'string' || !Number.isInteger(days)) {
5876
+ throw new Error(
5877
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
5878
+ );
5879
+ }
5880
+
5881
+ const startDateObj = new Date(start_date);
5882
+ if (isNaN(startDateObj.getTime())) {
5883
+ throw new Error(
5884
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
5885
+ );
5886
+ }
5887
+
5888
+ const resultDateObj = new Date(startDateObj);
5889
+ resultDateObj.setDate(resultDateObj.getDate() + days);
5890
+
5891
+ const resultYear = resultDateObj.getFullYear();
5892
+ const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
5893
+ const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
5894
+
5895
+ return `${resultYear}-${resultMonth}-${resultDay}`;
5896
+ };
5897
+
5810
5898
  /**
5811
5899
  * 计算两个日期之间的差值
5812
5900
  * @date 2023年12月14日
@@ -5814,180 +5902,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
5814
5902
  * @param {String} end_date - 结束日期字符串
5815
5903
  * @param {String} unit - 单位:year/month/day
5816
5904
  * @returns {Number} 差值
5817
- */
5818
- var dateDiff = function dateDiff(start_date, end_date) {
5819
- var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
5820
-
5821
- // Assuming date strings are in "YYYY-MM-DD" format
5822
- var startDate = new Date(start_date);
5823
- var endDate = new Date(end_date);
5824
-
5825
- // If the date is invalid, return 0
5826
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
5827
- return 0;
5828
- }
5829
-
5830
- if (unit === 'year') {
5831
- return endDate.getFullYear() - startDate.getFullYear();
5832
- } else if (unit === 'month') {
5833
- return (endDate.getFullYear() - startDate.getFullYear()) * 12 + (endDate.getMonth() - startDate.getMonth());
5834
- } else {
5835
- // Default to day
5836
- var timeDifference = endDate - startDate;
5837
- // Calculate days (86400000 milliseconds per day)
5838
- return Math.floor(timeDifference / 86400000);
5839
- }
5840
- };
5841
-
5905
+ */
5906
+ const dateDiff = function (start_date, end_date, unit = 'day') {
5907
+ // Assuming date strings are in "YYYY-MM-DD" format
5908
+ var startDate = new Date(start_date);
5909
+ var endDate = new Date(end_date);
5910
+
5911
+ // If the date is invalid, return 0
5912
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
5913
+ return 0;
5914
+ }
5915
+
5916
+ if (unit === 'year') {
5917
+ return endDate.getFullYear() - startDate.getFullYear();
5918
+ } else if (unit === 'month') {
5919
+ return (
5920
+ (endDate.getFullYear() - startDate.getFullYear()) * 12 +
5921
+ (endDate.getMonth() - startDate.getMonth())
5922
+ );
5923
+ } else {
5924
+ // Default to day
5925
+ var timeDifference = endDate - startDate;
5926
+ // Calculate days (86400000 milliseconds per day)
5927
+ return Math.floor(timeDifference / 86400000);
5928
+ }
5929
+ };
5930
+
5842
5931
  /**
5843
5932
  * 获取月份中的日期
5844
5933
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
5845
5934
  * @returns {number} 月份中的日期(1-31)
5846
- */
5847
- var dayOfMonth = function dayOfMonth(date) {
5848
- if (typeof date !== 'string') {
5849
- throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5850
- }
5851
-
5852
- var dateObj = new Date(date);
5853
- if (isNaN(dateObj.getTime())) {
5854
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
5855
- }
5856
-
5857
- return dateObj.getDate();
5858
- };
5859
-
5935
+ */
5936
+ const dayOfMonth = function (date) {
5937
+ if (typeof date !== 'string') {
5938
+ throw new Error(
5939
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
5940
+ );
5941
+ }
5942
+
5943
+ const dateObj = new Date(date);
5944
+ if (isNaN(dateObj.getTime())) {
5945
+ throw new Error(
5946
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
5947
+ );
5948
+ }
5949
+
5950
+ return dateObj.getDate();
5951
+ };
5952
+
5860
5953
  /**
5861
5954
  * 获取当前日期
5862
5955
  * @date 2022年5月7日
5863
5956
  * @param {string} format - 日期格式,默认为'YYYY-MM-DD'
5864
5957
  * @returns {string} 当前日期的格式化字符串
5865
- */
5866
- var getCurrentDate = function getCurrentDate() {
5867
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD';
5868
-
5869
- return formatDate(new Date(), format);
5870
- };
5871
-
5958
+ */
5959
+ const getCurrentDate = function (format = 'YYYY-MM-DD') {
5960
+ return formatDate(new Date(), format);
5961
+ };
5962
+
5872
5963
  /**
5873
5964
  * 获取当前日期时间
5874
5965
  * @date 2022年5月7日
5875
5966
  * @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
5876
5967
  * @returns {string} 当前日期时间的格式化字符串
5877
- */
5878
- var getCurrentDateTime = function getCurrentDateTime() {
5879
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD HH:mm:ss';
5880
-
5881
- return formatDate(new Date(), format);
5882
- };
5883
-
5968
+ */
5969
+ const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
5970
+ return formatDate(new Date(), format);
5971
+ };
5972
+
5884
5973
  /**
5885
5974
  * 获取小时
5886
5975
  * @date 2022年5月7日
5887
5976
  * @param {Date|string} [date] - 日期对象或日期字符串
5888
5977
  * @returns {number} 小时数(0-23)
5889
- */
5890
- var getHour = function getHour(date) {
5891
- if (!date) {
5892
- return new Date().getHours();
5893
- }
5894
- if (typeof date === 'string') {
5895
- date = new Date(date);
5896
- }
5897
- return date.getHours();
5898
- };
5899
-
5978
+ */
5979
+ const getHour = function (date) {
5980
+ if (!date) {
5981
+ return new Date().getHours();
5982
+ }
5983
+ if (typeof date === 'string') {
5984
+ date = new Date(date);
5985
+ }
5986
+ return date.getHours();
5987
+ };
5988
+
5900
5989
  /**
5901
5990
  * 获取分钟
5902
5991
  * @date 2022年5月7日
5903
5992
  * @param {Date|string} [date] - 日期对象或日期字符串
5904
5993
  * @returns {number} 分钟数(0-59)
5905
- */
5906
- var getMinute = function getMinute(date) {
5907
- if (!date) {
5908
- return new Date().getMinutes();
5909
- }
5910
- if (typeof date === 'string') {
5911
- date = new Date(date);
5912
- }
5913
- return date.getMinutes();
5914
- };
5915
-
5994
+ */
5995
+ const getMinute = function (date) {
5996
+ if (!date) {
5997
+ return new Date().getMinutes();
5998
+ }
5999
+ if (typeof date === 'string') {
6000
+ date = new Date(date);
6001
+ }
6002
+ return date.getMinutes();
6003
+ };
6004
+
5916
6005
  /**
5917
6006
  * 获取月份
5918
6007
  * @date 2022年5月7日
5919
6008
  * @param {Date|string} [date] - 日期对象或日期字符串
5920
6009
  * @returns {number} 月份数(1-12)
5921
- */
5922
- var getMonth = function getMonth(date) {
5923
- if (!date) {
5924
- return new Date().getMonth() + 1;
5925
- }
5926
- if (typeof date === 'string') {
5927
- date = new Date(date);
5928
- }
5929
- return date.getMonth() + 1;
5930
- };
5931
-
6010
+ */
6011
+ const getMonth = function (date) {
6012
+ if (!date) {
6013
+ return new Date().getMonth() + 1;
6014
+ }
6015
+ if (typeof date === 'string') {
6016
+ date = new Date(date);
6017
+ }
6018
+ return date.getMonth() + 1;
6019
+ };
6020
+
5932
6021
  /**
5933
6022
  * 获取秒
5934
6023
  * @date 2022年5月7日
5935
6024
  * @param {Date|string} [date] - 日期对象或日期字符串
5936
6025
  * @returns {number} 秒数(0-59)
5937
- */
5938
- var getSecond = function getSecond(date) {
5939
- if (!date) {
5940
- return new Date().getSeconds();
5941
- }
5942
- if (typeof date === 'string') {
5943
- date = new Date(date);
5944
- }
5945
- return date.getSeconds();
5946
- };
5947
-
6026
+ */
6027
+ const getSecond = function (date) {
6028
+ if (!date) {
6029
+ return new Date().getSeconds();
6030
+ }
6031
+ if (typeof date === 'string') {
6032
+ date = new Date(date);
6033
+ }
6034
+ return date.getSeconds();
6035
+ };
6036
+
5948
6037
  /**
5949
6038
  * 获取星期几
5950
6039
  * @date 2022年5月7日
5951
6040
  * @param {Date|string} [date] - 日期对象或日期字符串
5952
6041
  * @returns {number} 星期几(0-6,0表示星期日)
5953
- */
5954
- var getWeekday = function getWeekday(date) {
5955
- if (!date) {
5956
- return new Date().getDay();
5957
- }
5958
- if (typeof date === 'string') {
5959
- date = new Date(date);
5960
- }
5961
- return date.getDay();
5962
- };
5963
-
6042
+ */
6043
+ const getWeekday = function (date) {
6044
+ if (!date) {
6045
+ return new Date().getDay();
6046
+ }
6047
+ if (typeof date === 'string') {
6048
+ date = new Date(date);
6049
+ }
6050
+ return date.getDay();
6051
+ };
6052
+
6053
+
5964
6054
  /**
5965
6055
  * @desc 获取上午/下午/晚上
5966
6056
  * @author huangbo
5967
6057
  * @date 2022年5月7日
5968
6058
  * @param {String} [time] - 时间
5969
- **/
5970
- var timeCycle = function timeCycle(time) {
5971
- var hour = 0;
5972
- if (!time) {
5973
- hour = new Date().getHours();
5974
- } else if (typeof time === 'string') {
5975
- // 从时间字符串中提取小时
5976
- var match = time.match(/^(\d{1,2})/);
5977
- if (match) {
5978
- hour = parseInt(match[1], 10);
5979
- }
5980
- } else if (typeof time === 'number') {
5981
- hour = time;
5982
- }
5983
- // 判断时间段
5984
- if (hour >= 5 && hour < 12) {
5985
- return '上午';
5986
- } else if (hour >= 12 && hour < 18) {
5987
- return '下午';
5988
- } else {
5989
- return '晚上';
5990
- }
6059
+ **/
6060
+ const timeCycle = function (time) {
6061
+ let hour = 0;
6062
+ if (!time) {
6063
+ hour = new Date().getHours();
6064
+ } else if (typeof time === 'string') {
6065
+ // 从时间字符串中提取小时
6066
+ const match = time.match(/^(\d{1,2})/);
6067
+ if (match) {
6068
+ hour = parseInt(match[1], 10);
6069
+ }
6070
+ } else if (typeof time === 'number') {
6071
+ hour = time;
6072
+ }
6073
+ // 判断时间段
6074
+ if (hour >= 5 && hour < 12) {
6075
+ return '上午';
6076
+ } else if (hour >= 12 && hour < 18) {
6077
+ return '下午';
6078
+ } else {
6079
+ return '晚上';
6080
+ }
5991
6081
  };
5992
6082
 
5993
6083
  /***/ }),
@@ -5997,27 +6087,6 @@ var timeCycle = function timeCycle(time) {
5997
6087
 
5998
6088
  module.exports = require("eoss/lib/message-box");
5999
6089
 
6000
- /***/ }),
6001
-
6002
- /***/ 99:
6003
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6004
-
6005
- "use strict";
6006
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
6007
- /* harmony import */ var eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
6008
- 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; };
6009
-
6010
-
6011
-
6012
- /**
6013
- * 判断一个节点是否为Vue的虚拟节点(VNode)
6014
- * @param {*} node 要判断的节点
6015
- * @returns {boolean} 如果是虚拟节点则返回true,否则返回false
6016
- */
6017
- function isVNode(node) {
6018
- return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "x"])(node, 'componentOptions');
6019
- }
6020
-
6021
6090
  /***/ })
6022
6091
 
6023
6092
  /******/ });