eoss 0.1.0-alpha.25 → 0.1.0-alpha.26

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 (254) 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 +1000 -971
  83. package/lib/alert.js +2 -2
  84. package/lib/aside.js +2 -2
  85. package/lib/audit-trajectory.js +75 -71
  86. package/lib/autocomplete.js +2136 -1951
  87. package/lib/avatar.js +2 -2
  88. package/lib/backtop.js +2 -2
  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 +12 -12
  93. package/lib/button.js +2 -2
  94. package/lib/ca-login.js +913 -888
  95. package/lib/calendar.js +872 -847
  96. package/lib/card.js +2 -2
  97. package/lib/carousel-item.js +905 -880
  98. package/lib/carousel.js +1042 -1017
  99. package/lib/cascader-panel.js +926 -901
  100. package/lib/cascader.js +2022 -1837
  101. package/lib/checkbox-button.js +2 -2
  102. package/lib/checkbox-group.js +1000 -971
  103. package/lib/checkbox.js +2 -2
  104. package/lib/col.js +2 -2
  105. package/lib/collapse-item.js +2174 -1980
  106. package/lib/collapse.js +2175 -1980
  107. package/lib/color-picker.js +1112 -952
  108. package/lib/config/api.js +3 -0
  109. package/lib/container.js +2 -2
  110. package/lib/cron.js +2 -2
  111. package/lib/data-table.js +1007 -978
  112. package/lib/date-picker.js +2142 -1957
  113. package/lib/dialog.js +910 -885
  114. package/lib/divider.js +2 -2
  115. package/lib/drawer.js +2 -2
  116. package/lib/dropdown-item.js +4 -4
  117. package/lib/dropdown-menu.js +1104 -944
  118. package/lib/dropdown.js +925 -900
  119. package/lib/email-login.js +999 -970
  120. package/lib/empty.js +2 -2
  121. package/lib/eoss.common.js +8751 -4166
  122. package/lib/flip.js +2 -2
  123. package/lib/flow-group.js +906 -881
  124. package/lib/flow.js +1112 -1083
  125. package/lib/flows.js +1010 -981
  126. package/lib/footer.js +2 -2
  127. package/lib/form-item.js +909 -884
  128. package/lib/form.js +2185 -1986
  129. package/lib/guide.js +620 -0
  130. package/lib/header.js +2 -2
  131. package/lib/icon.js +981 -952
  132. package/lib/icons.js +2 -2
  133. package/lib/image-viewer.js +907 -882
  134. package/lib/image.js +4 -4
  135. package/lib/index.js +1 -1
  136. package/lib/infinite-scroll.js +2 -2
  137. package/lib/input-number.js +4 -4
  138. package/lib/input.js +910 -885
  139. package/lib/link.js +2 -2
  140. package/lib/loading.js +2 -2
  141. package/lib/login.js +1027 -998
  142. package/lib/lowcode.js +17336 -13510
  143. package/lib/main.js +14933 -14625
  144. package/lib/marquee.js +907 -882
  145. package/lib/menu-item-group.js +2 -2
  146. package/lib/menu-item.js +2 -2
  147. package/lib/menu.js +2011 -1826
  148. package/lib/message-box.js +923 -898
  149. package/lib/message.js +911 -886
  150. package/lib/notification.js +911 -886
  151. package/lib/option-group.js +2 -2
  152. package/lib/option.js +907 -882
  153. package/lib/page-header.js +2 -2
  154. package/lib/pagination.js +910 -885
  155. package/lib/phone-login.js +998 -969
  156. package/lib/popconfirm.js +12 -12
  157. package/lib/popover.js +2009 -1824
  158. package/lib/process-config.js +1015 -986
  159. package/lib/process-module.js +1001 -972
  160. package/lib/process-rule.js +1019 -990
  161. package/lib/progress.js +5 -5
  162. package/lib/qr-code.js +4 -4
  163. package/lib/qrcode-login.js +1057 -1028
  164. package/lib/radio-button.js +2 -2
  165. package/lib/radio-group.js +998 -969
  166. package/lib/radio.js +2 -2
  167. package/lib/rate.js +907 -882
  168. package/lib/row.js +2 -2
  169. package/lib/scrollbar.js +904 -879
  170. package/lib/select.js +2135 -1945
  171. package/lib/selector-panel.js +1009 -980
  172. package/lib/selector.js +1001 -972
  173. package/lib/slider.js +2 -2
  174. package/lib/step.js +2172 -1977
  175. package/lib/steps.js +907 -882
  176. package/lib/submenu.js +1119 -959
  177. package/lib/switch.js +907 -882
  178. package/lib/tab-pane.js +2 -2
  179. package/lib/table-column.js +906 -881
  180. package/lib/table.js +2236 -2047
  181. package/lib/tabs.js +911 -886
  182. package/lib/tag.js +2 -2
  183. package/lib/theme-chalk/base.css +1 -1
  184. package/lib/theme-chalk/guide.css +1 -0
  185. package/lib/theme-chalk/icon.css +1 -1
  186. package/lib/theme-chalk/index.css +1 -1
  187. package/lib/theme-chalk/lowcode-view.css +1 -0
  188. package/lib/theme-chalk/lowcode.css +1 -1
  189. package/lib/theme-chalk/main.css +1 -1
  190. package/lib/theme-chalk/pagination.css +1 -1
  191. package/lib/theme-chalk/select-dropdown.css +1 -1
  192. package/lib/theme-chalk/select.css +1 -1
  193. package/lib/theme-chalk/wujie.css +1 -0
  194. package/lib/time-picker.js +1977 -1792
  195. package/lib/time-select.js +1978 -1793
  196. package/lib/timeline-item.js +2 -2
  197. package/lib/timeline.js +2 -2
  198. package/lib/tips.js +998 -969
  199. package/lib/toolbar.js +2 -2
  200. package/lib/tooltip.js +2006 -1821
  201. package/lib/transfer.js +916 -891
  202. package/lib/tree-group.js +978 -949
  203. package/lib/tree.js +999 -970
  204. package/lib/update-history.js +76 -72
  205. package/lib/upload.js +1028 -999
  206. package/lib/utils/frame.js +133 -0
  207. package/lib/wujie.js +5037 -0
  208. package/package.json +3 -2
  209. package/packages/cascader/src/cascader.vue +1 -1
  210. package/packages/date-picker/src/picker.vue +1 -1
  211. package/packages/form/src/form-item-render.vue +10 -6
  212. package/packages/guide/index.js +8 -0
  213. package/packages/guide/src/directive.js +47 -0
  214. package/packages/guide/src/guide.vue +89 -0
  215. package/packages/guide/src/manager.js +133 -0
  216. package/packages/input/src/input.vue +1 -1
  217. package/packages/lowcode/src/aside.vue +41 -8
  218. package/packages/lowcode/src/attribute/bind.vue +2 -4
  219. package/packages/lowcode/src/attribute/dependency.vue +3 -16
  220. package/packages/lowcode/src/attribute/function.vue +2 -4
  221. package/packages/lowcode/src/attribute/property.vue +3 -15
  222. package/packages/lowcode/src/attribute/styles.vue +105 -11
  223. package/packages/lowcode/src/attribute.vue +5 -35
  224. package/packages/lowcode/src/canvas.vue +223 -97
  225. package/packages/lowcode/src/iframe.vue +60 -0
  226. package/packages/lowcode/src/lowcode.vue +32 -8
  227. package/packages/lowcode/src/pages.vue +1 -1
  228. package/packages/lowcode/src/render.vue +312 -70
  229. package/packages/lowcode/src/util/source-generator.js +7 -11
  230. package/packages/lowcode/src/util/source-parser.js +1 -1
  231. package/packages/lowcode-view/index.js +1 -1
  232. package/packages/lowcode-view/src/Iframe.vue +55 -0
  233. package/packages/lowcode-view/src/Modulels.vue +239 -0
  234. package/packages/lowcode-view/src/render.vue +337 -0
  235. package/packages/lowcode-view/src/view.vue +763 -0
  236. package/packages/main/src/components/pages.vue +11 -2
  237. package/packages/main/src/event-center.js +160 -0
  238. package/packages/main/src/minxs.js +60 -90
  239. package/packages/progress/src/progress.vue +1 -1
  240. package/packages/select/src/select.vue +2 -1
  241. package/packages/theme-chalk/src/common/var.scss +34 -10
  242. package/packages/theme-chalk/src/guide.scss +93 -0
  243. package/packages/theme-chalk/src/icon.scss +425 -426
  244. package/packages/theme-chalk/src/index.scss +2 -0
  245. package/packages/theme-chalk/src/lowcode-view.scss +288 -0
  246. package/packages/theme-chalk/src/lowcode.scss +11 -1
  247. package/packages/theme-chalk/src/select-dropdown.scss +1 -1
  248. package/packages/theme-chalk/src/wujie.scss +5 -0
  249. package/packages/wujie/index.js +10 -0
  250. package/packages/wujie/src/wujie.vue +205 -0
  251. package/src/config/api.js +3 -0
  252. package/src/index.js +325 -319
  253. package/src/utils/frame.js +102 -0
  254. package/packages/lowcode/src/view.vue +0 -187
package/lib/select.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 = 155);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 160);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -91,32 +91,32 @@ 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__, "M", 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__, "W", 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; });
94
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return noop; });
95
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return hasOwn; });
96
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return toObject; });
97
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getValueByPath; });
98
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getPropByPath; });
99
99
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return generateId; });
100
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return valueEquals; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return valueEquals; });
101
101
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return escapeRegexpString; });
102
102
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return arrayFindIndex; });
103
103
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFind; });
104
104
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return coerceTruthyValueToArray; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return isIE; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isEdge; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isFirefox; });
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; });
108
108
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return autoprefixer; });
109
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return kebabCase; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return kebabCase; });
110
110
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return capitalize; });
111
111
  /* unused harmony export looseEqual */
112
112
  /* unused harmony export arrayEquals */
113
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isEqual; });
114
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", 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; });
115
115
  /* unused harmony export objToArray */
116
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return requestAnimationFrame; });
116
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return requestAnimationFrame; });
117
117
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelAnimationFrame; });
118
118
  /* unused harmony export debounce */
119
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return throttle; });
119
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return throttle; });
120
120
  /* unused harmony export guid */
121
121
  /* unused harmony export uid */
122
122
  /* unused harmony export get */
@@ -124,7 +124,7 @@ module.exports =
124
124
  /* unused harmony export cloneDeep */
125
125
  /* unused harmony export grouping */
126
126
  /* unused harmony export pager */
127
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getWinTop; });
127
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getWinTop; });
128
128
  /* unused harmony export getFileType */
129
129
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrUnique; });
130
130
  /* unused harmony export average */
@@ -142,54 +142,54 @@ module.exports =
142
142
  /* unused harmony export exportXls */
143
143
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return extend; });
144
144
  /* unused harmony export getObjectType */
145
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getParams; });
145
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getParams; });
146
146
  /* unused harmony export getScript */
147
147
  /* unused harmony export getStyle */
148
148
  /* unused harmony export getTypeName */
149
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getTypePrefix; });
149
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getTypePrefix; });
150
150
  /* unused harmony export getValues */
151
151
  /* unused harmony export getZoom */
152
152
  /* unused harmony export getLength */
153
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return timestampUrl; });
153
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return timestampUrl; });
154
154
  /* unused harmony export hasChars */
155
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return identical; });
156
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return indexOfObj; });
157
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isEmpty; });
158
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isExist; });
155
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return identical; });
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; });
159
159
  /* unused harmony export isFunction */
160
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return isObjectEqual; });
161
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return joinUrl; });
162
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getHorizontalMargin; });
163
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return layoutWaterfall; });
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; });
162
+ /* unused harmony export getHorizontalMargin */
163
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return layoutWaterfall; });
164
164
  /* unused harmony export loadJs */
165
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return loading; });
165
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return loading; });
166
166
  /* unused harmony export lowerCase */
167
167
  /* unused harmony export overbrim */
168
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return queryParams; });
168
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return queryParams; });
169
169
  /* unused harmony export receiveMessage */
170
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return renderIcon; });
170
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return renderIcon; });
171
171
  /* unused harmony export replenish */
172
172
  /* unused harmony export rmbToCapital */
173
173
  /* unused harmony export setScale */
174
174
  /* unused harmony export sendMessage */
175
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return setFavicon; });
175
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return setFavicon; });
176
176
  /* unused harmony export sum */
177
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return startWith; });
177
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return startWith; });
178
178
  /* unused harmony export takeLeft */
179
179
  /* unused harmony export takeRight */
180
180
  /* unused harmony export trimWhitespace */
181
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return toFixed; });
181
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return toFixed; });
182
182
  /* unused harmony export toFunction */
183
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return updateTheme; });
183
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return updateTheme; });
184
184
  /* unused harmony export upperType */
185
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return urlJoinParams; });
186
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return uuid; });
187
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return watermark; });
185
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return urlJoinParams; });
186
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return uuid; });
187
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return watermark; });
188
188
  /* unused harmony export winTopOpen */
189
189
  /* unused harmony export confirm */
190
190
  /* unused harmony export success */
191
191
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return error; });
192
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return warning; });
192
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return warning; });
193
193
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
194
194
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
195
195
  /* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
@@ -2172,7 +2172,7 @@ var loadJs = function loadJs(url, callback) {
2172
2172
  var loading = function loading() {
2173
2173
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '请求中...';
2174
2174
 
2175
- var Loading = __webpack_require__(18).default;
2175
+ var Loading = __webpack_require__(17).default;
2176
2176
  return Loading.service({
2177
2177
  text: text,
2178
2178
  spinner: 'es-icon-jiazai',
@@ -3384,7 +3384,7 @@ var getColor = function getColor($color, $n) {
3384
3384
  var getLightness = function getLightness($v, $i, $isLight) {
3385
3385
  var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
3386
3386
  $value = $value < 1 ? $value : 1;
3387
- return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "V"])($value, 2);
3387
+ return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "U"])($value, 2);
3388
3388
  };
3389
3389
 
3390
3390
  /**
@@ -3408,7 +3408,7 @@ var getSaturation = function getSaturation($s, $i, $isLight) {
3408
3408
  $saturation = 0.1;
3409
3409
  }
3410
3410
  $saturation = $saturation > 0.06 ? $saturation : 0.06;
3411
- return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "V"])($saturation, 2);
3411
+ return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "U"])($saturation, 2);
3412
3412
  };
3413
3413
 
3414
3414
  /**
@@ -3945,22 +3945,6 @@ module.exports = require("throttle-debounce");
3945
3945
 
3946
3946
  /***/ }),
3947
3947
 
3948
- /***/ 155:
3949
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3950
-
3951
- "use strict";
3952
- __webpack_require__.r(__webpack_exports__);
3953
- /* harmony import */ var _src_select_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62);
3954
-
3955
-
3956
- _src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
3957
- Vue.component(_src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
3958
- };
3959
-
3960
- /* harmony default export */ __webpack_exports__["default"] = (_src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
3961
-
3962
- /***/ }),
3963
-
3964
3948
  /***/ 16:
3965
3949
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3966
3950
 
@@ -3983,17 +3967,33 @@ _src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = functi
3983
3967
 
3984
3968
  /***/ }),
3985
3969
 
3970
+ /***/ 160:
3971
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3972
+
3973
+ "use strict";
3974
+ __webpack_require__.r(__webpack_exports__);
3975
+ /* harmony import */ var _src_select_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62);
3976
+
3977
+
3978
+ _src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function (Vue) {
3979
+ Vue.component(_src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].name, _src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
3980
+ };
3981
+
3982
+ /* harmony default export */ __webpack_exports__["default"] = (_src_select_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
3983
+
3984
+ /***/ }),
3985
+
3986
3986
  /***/ 17:
3987
3987
  /***/ (function(module, exports) {
3988
3988
 
3989
- module.exports = require("eoss/lib/input");
3989
+ module.exports = require("eoss/lib/loading");
3990
3990
 
3991
3991
  /***/ }),
3992
3992
 
3993
3993
  /***/ 18:
3994
3994
  /***/ (function(module, exports) {
3995
3995
 
3996
- module.exports = require("eoss/lib/loading");
3996
+ module.exports = require("eoss/lib/input");
3997
3997
 
3998
3998
  /***/ }),
3999
3999
 
@@ -4054,736 +4054,759 @@ module.exports = require("lodash/get");
4054
4054
  /* unused harmony export getSecond */
4055
4055
  /* unused harmony export getWeekday */
4056
4056
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
4057
-
4058
-
4057
+ /* Modified from https://github.com/taylorhakes/fecha
4058
+ *
4059
+ * The MIT License (MIT)
4060
+ *
4061
+ * Copyright (c) 2015 Taylor Hakes
4062
+ *
4063
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4064
+ * of this software and associated documentation files (the "Software"), to deal
4065
+ * in the Software without restriction, including without limitation the rights
4066
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4067
+ * copies of the Software, and to permit persons to whom the Software is
4068
+ * furnished to do so, subject to the following conditions:
4069
+ *
4070
+ * The above copyright notice and this permission notice shall be included in all
4071
+ * copies or substantial portions of the Software.
4072
+ *
4073
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4074
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4075
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4076
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4077
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4078
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4079
+ * SOFTWARE.
4080
+ */
4081
+
4082
+ /*eslint-disable*/
4083
+ // 把 YYYY-MM-DD 改成了 yyyy-MM-dd
4084
+
4085
+
4059
4086
  /**
4060
4087
  * Parse or format dates
4061
4088
  * @class fecha
4062
- */
4063
- var fecha = {};
4064
- var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
4065
- var twoDigits = '\\d\\d?';
4066
- var threeDigits = '\\d{3}';
4067
- var fourDigits = '\\d{4}';
4068
- var word = '[^\\s]+';
4069
- var literal = /\[([^]*?)\]/gm;
4070
- var noop = function noop() {};
4071
-
4072
- function regexEscape(str) {
4073
- return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
4074
- }
4075
-
4076
- function shorten(arr, sLen) {
4077
- var newArr = [];
4078
- for (var i = 0, len = arr.length; i < len; i++) {
4079
- newArr.push(arr[i].substr(0, sLen));
4080
- }
4081
- return newArr;
4082
- }
4083
-
4084
- function monthUpdate() {
4085
- return function (d, v) {
4086
- var index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
4087
- if (~index) {
4088
- d.month = index;
4089
- }
4090
- };
4091
- }
4092
-
4093
- function pad(val, len) {
4094
- val = String(val);
4095
- len = len || 2;
4096
- while (val.length < len) {
4097
- val = '0' + val;
4098
- }
4099
- return val;
4100
- }
4101
-
4102
- // 直接使用中文日期名称常量
4103
- var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
4104
- var monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
4105
- var monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
4106
- var dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
4107
- var amPm = ['上午', '下午'];
4108
- var DoFn = function DoFn(D) {
4109
- return D + '日';
4110
- };
4111
-
4112
- var formatFlags = {
4113
- D: function D(dateObj) {
4114
- return dateObj.getDay();
4115
- },
4116
- DD: function DD(dateObj) {
4117
- return pad(dateObj.getDay());
4118
- },
4119
- Do: function Do(dateObj) {
4120
- return DoFn(dateObj.getDate());
4121
- },
4122
- d: function d(dateObj) {
4123
- return dateObj.getDate();
4124
- },
4125
- dd: function dd(dateObj) {
4126
- return pad(dateObj.getDate());
4127
- },
4128
- ddd: function ddd(dateObj) {
4129
- return dayNamesShort[dateObj.getDay()];
4130
- },
4131
- dddd: function dddd(dateObj) {
4132
- return dayNames[dateObj.getDay()];
4133
- },
4134
- M: function M(dateObj) {
4135
- return dateObj.getMonth() + 1;
4136
- },
4137
- MM: function MM(dateObj) {
4138
- return pad(dateObj.getMonth() + 1);
4139
- },
4140
- MMM: function MMM(dateObj) {
4141
- return monthNamesShort[dateObj.getMonth()];
4142
- },
4143
- MMMM: function MMMM(dateObj) {
4144
- return monthNames[dateObj.getMonth()];
4145
- },
4146
- yy: function yy(dateObj) {
4147
- return pad(String(dateObj.getFullYear()), 4).substr(2);
4148
- },
4149
- yyyy: function yyyy(dateObj) {
4150
- return pad(dateObj.getFullYear(), 4);
4151
- },
4152
- h: function h(dateObj) {
4153
- return dateObj.getHours() % 12 || 12;
4154
- },
4155
- hh: function hh(dateObj) {
4156
- return pad(dateObj.getHours() % 12 || 12);
4157
- },
4158
- H: function H(dateObj) {
4159
- return dateObj.getHours();
4160
- },
4161
- HH: function HH(dateObj) {
4162
- return pad(dateObj.getHours());
4163
- },
4164
- m: function m(dateObj) {
4165
- return dateObj.getMinutes();
4166
- },
4167
- mm: function mm(dateObj) {
4168
- return pad(dateObj.getMinutes());
4169
- },
4170
- s: function s(dateObj) {
4171
- return dateObj.getSeconds();
4172
- },
4173
- ss: function ss(dateObj) {
4174
- return pad(dateObj.getSeconds());
4175
- },
4176
- S: function S(dateObj) {
4177
- return Math.round(dateObj.getMilliseconds() / 100);
4178
- },
4179
- SS: function SS(dateObj) {
4180
- return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
4181
- },
4182
- SSS: function SSS(dateObj) {
4183
- return pad(dateObj.getMilliseconds(), 3);
4184
- },
4185
- a: function a(dateObj) {
4186
- return dateObj.getHours() < 12 ? '上午' : '下午';
4187
- },
4188
- A: function A(dateObj) {
4189
- return dateObj.getHours() < 12 ? '上午' : '下午';
4190
- },
4191
- ZZ: function ZZ(dateObj) {
4192
- var o = dateObj.getTimezoneOffset();
4193
- return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
4194
- }
4195
- };
4196
-
4197
- var parseFlags = {
4198
- d: [twoDigits, function (d, v) {
4199
- d.day = v;
4200
- }],
4201
- Do: [twoDigits + word, function (d, v) {
4202
- d.day = parseInt(v, 10);
4203
- }],
4204
- M: [twoDigits, function (d, v) {
4205
- d.month = v - 1;
4206
- }],
4207
- yy: [twoDigits, function (d, v) {
4208
- var da = new Date(),
4209
- cent = +('' + da.getFullYear()).substr(0, 2);
4210
- d.year = '' + (v > 68 ? cent - 1 : cent) + v;
4211
- }],
4212
- h: [twoDigits, function (d, v) {
4213
- d.hour = v;
4214
- }],
4215
- m: [twoDigits, function (d, v) {
4216
- d.minute = v;
4217
- }],
4218
- s: [twoDigits, function (d, v) {
4219
- d.second = v;
4220
- }],
4221
- yyyy: [fourDigits, function (d, v) {
4222
- d.year = v;
4223
- }],
4224
- S: ['\\d', function (d, v) {
4225
- d.millisecond = v * 100;
4226
- }],
4227
- SS: ['\\d{2}', function (d, v) {
4228
- d.millisecond = v * 10;
4229
- }],
4230
- SSS: [threeDigits, function (d, v) {
4231
- d.millisecond = v;
4232
- }],
4233
- D: [twoDigits, noop],
4234
- ddd: [word, noop],
4235
- MMM: [word, monthUpdate('monthNamesShort')],
4236
- MMMM: [word, monthUpdate('monthNames')],
4237
- a: [word, function (d, v) {
4238
- var val = v.toLowerCase();
4239
- if (val === '上午') {
4240
- d.isPm = false;
4241
- } else if (val === '下午') {
4242
- d.isPm = true;
4243
- }
4244
- }],
4245
- ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
4246
- var parts = (v + '').match(/([+-]|\d\d)/gi),
4247
- minutes = void 0;
4248
-
4249
- if (parts) {
4250
- minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
4251
- d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
4252
- }
4253
- }]
4254
- };
4255
- parseFlags.dd = parseFlags.d;
4256
- parseFlags.dddd = parseFlags.ddd;
4257
- parseFlags.DD = parseFlags.D;
4258
- parseFlags.mm = parseFlags.m;
4259
- parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
4260
- parseFlags.MM = parseFlags.M;
4261
- parseFlags.ss = parseFlags.s;
4262
- parseFlags.A = parseFlags.a;
4263
-
4264
- // Some common format strings
4265
- fecha.masks = {
4266
- default: 'ddd MMM dd yyyy HH:mm:ss',
4267
- shortDate: 'M/D/yy',
4268
- mediumDate: 'MMM d, yyyy',
4269
- longDate: 'MMMM d, yyyy',
4270
- fullDate: 'dddd, MMMM d, yyyy',
4271
- shortTime: 'HH:mm',
4272
- mediumTime: 'HH:mm:ss',
4273
- longTime: 'HH:mm:ss.SSS'
4274
- };
4275
-
4089
+ */
4090
+ const fecha = {};
4091
+ const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
4092
+ const twoDigits = '\\d\\d?';
4093
+ const threeDigits = '\\d{3}';
4094
+ const fourDigits = '\\d{4}';
4095
+ const word = '[^\\s]+';
4096
+ const literal = /\[([^]*?)\]/gm;
4097
+ const noop = function () {};
4098
+
4099
+ function regexEscape(str) {
4100
+ return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
4101
+ }
4102
+
4103
+ function shorten(arr, sLen) {
4104
+ const newArr = [];
4105
+ for (let i = 0, len = arr.length; i < len; i++) {
4106
+ newArr.push(arr[i].substr(0, sLen));
4107
+ }
4108
+ return newArr;
4109
+ }
4110
+
4111
+ function monthUpdate() {
4112
+ return function (d, v) {
4113
+ const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
4114
+ if (~index) {
4115
+ d.month = index;
4116
+ }
4117
+ };
4118
+ }
4119
+
4120
+ function pad(val, len) {
4121
+ val = String(val);
4122
+ len = len || 2;
4123
+ while (val.length < len) {
4124
+ val = '0' + val;
4125
+ }
4126
+ return val;
4127
+ }
4128
+
4129
+ // 直接使用中文日期名称常量
4130
+ const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
4131
+ const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
4132
+ const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
4133
+ const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
4134
+ const amPm = ['上午', '下午'];
4135
+ const DoFn = function DoFn(D) {
4136
+ return D + '日';
4137
+ };
4138
+
4139
+ const formatFlags = {
4140
+ D: function(dateObj) {
4141
+ return dateObj.getDay();
4142
+ },
4143
+ DD: function(dateObj) {
4144
+ return pad(dateObj.getDay());
4145
+ },
4146
+ Do: function(dateObj) {
4147
+ return DoFn(dateObj.getDate());
4148
+ },
4149
+ d: function(dateObj) {
4150
+ return dateObj.getDate();
4151
+ },
4152
+ dd: function(dateObj) {
4153
+ return pad(dateObj.getDate());
4154
+ },
4155
+ ddd: function(dateObj) {
4156
+ return dayNamesShort[dateObj.getDay()];
4157
+ },
4158
+ dddd: function(dateObj) {
4159
+ return dayNames[dateObj.getDay()];
4160
+ },
4161
+ M: function(dateObj) {
4162
+ return dateObj.getMonth() + 1;
4163
+ },
4164
+ MM: function(dateObj) {
4165
+ return pad(dateObj.getMonth() + 1);
4166
+ },
4167
+ MMM: function(dateObj) {
4168
+ return monthNamesShort[dateObj.getMonth()];
4169
+ },
4170
+ MMMM: function(dateObj) {
4171
+ return monthNames[dateObj.getMonth()];
4172
+ },
4173
+ yy: function(dateObj) {
4174
+ return pad(String(dateObj.getFullYear()), 4).substr(2);
4175
+ },
4176
+ yyyy: function(dateObj) {
4177
+ return pad(dateObj.getFullYear(), 4);
4178
+ },
4179
+ h: function(dateObj) {
4180
+ return dateObj.getHours() % 12 || 12;
4181
+ },
4182
+ hh: function(dateObj) {
4183
+ return pad(dateObj.getHours() % 12 || 12);
4184
+ },
4185
+ H: function(dateObj) {
4186
+ return dateObj.getHours();
4187
+ },
4188
+ HH: function(dateObj) {
4189
+ return pad(dateObj.getHours());
4190
+ },
4191
+ m: function(dateObj) {
4192
+ return dateObj.getMinutes();
4193
+ },
4194
+ mm: function(dateObj) {
4195
+ return pad(dateObj.getMinutes());
4196
+ },
4197
+ s: function(dateObj) {
4198
+ return dateObj.getSeconds();
4199
+ },
4200
+ ss: function(dateObj) {
4201
+ return pad(dateObj.getSeconds());
4202
+ },
4203
+ S: function(dateObj) {
4204
+ return Math.round(dateObj.getMilliseconds() / 100);
4205
+ },
4206
+ SS: function(dateObj) {
4207
+ return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
4208
+ },
4209
+ SSS: function(dateObj) {
4210
+ return pad(dateObj.getMilliseconds(), 3);
4211
+ },
4212
+ a: function(dateObj) {
4213
+ return dateObj.getHours() < 12 ? '上午' : '下午';
4214
+ },
4215
+ A: function(dateObj) {
4216
+ return dateObj.getHours() < 12 ? '上午' : '下午';
4217
+ },
4218
+ ZZ: function(dateObj) {
4219
+ const o = dateObj.getTimezoneOffset();
4220
+ return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
4221
+ }
4222
+ };
4223
+
4224
+ const parseFlags = {
4225
+ d: [twoDigits, function (d, v) {
4226
+ d.day = v;
4227
+ }],
4228
+ Do: [twoDigits + word, function (d, v) {
4229
+ d.day = parseInt(v, 10);
4230
+ }],
4231
+ M: [twoDigits, function (d, v) {
4232
+ d.month = v - 1;
4233
+ }],
4234
+ yy: [twoDigits, function (d, v) {
4235
+ const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
4236
+ d.year = '' + (v > 68 ? cent - 1 : cent) + v;
4237
+ }],
4238
+ h: [twoDigits, function (d, v) {
4239
+ d.hour = v;
4240
+ }],
4241
+ m: [twoDigits, function (d, v) {
4242
+ d.minute = v;
4243
+ }],
4244
+ s: [twoDigits, function (d, v) {
4245
+ d.second = v;
4246
+ }],
4247
+ yyyy: [fourDigits, function (d, v) {
4248
+ d.year = v;
4249
+ }],
4250
+ S: ['\\d', function (d, v) {
4251
+ d.millisecond = v * 100;
4252
+ }],
4253
+ SS: ['\\d{2}', function (d, v) {
4254
+ d.millisecond = v * 10;
4255
+ }],
4256
+ SSS: [threeDigits, function (d, v) {
4257
+ d.millisecond = v;
4258
+ }],
4259
+ D: [twoDigits, noop],
4260
+ ddd: [word, noop],
4261
+ MMM: [word, monthUpdate('monthNamesShort')],
4262
+ MMMM: [word, monthUpdate('monthNames')],
4263
+ a: [word, function (d, v) {
4264
+ const val = v.toLowerCase();
4265
+ if (val === '上午') {
4266
+ d.isPm = false;
4267
+ } else if (val === '下午') {
4268
+ d.isPm = true;
4269
+ }
4270
+ }],
4271
+ ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
4272
+ let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
4273
+
4274
+ if (parts) {
4275
+ minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
4276
+ d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
4277
+ }
4278
+ }]
4279
+ };
4280
+ parseFlags.dd = parseFlags.d;
4281
+ parseFlags.dddd = parseFlags.ddd;
4282
+ parseFlags.DD = parseFlags.D;
4283
+ parseFlags.mm = parseFlags.m;
4284
+ parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
4285
+ parseFlags.MM = parseFlags.M;
4286
+ parseFlags.ss = parseFlags.s;
4287
+ parseFlags.A = parseFlags.a;
4288
+
4289
+
4290
+ // Some common format strings
4291
+ fecha.masks = {
4292
+ default: 'ddd MMM dd yyyy HH:mm:ss',
4293
+ shortDate: 'M/D/yy',
4294
+ mediumDate: 'MMM d, yyyy',
4295
+ longDate: 'MMMM d, yyyy',
4296
+ fullDate: 'dddd, MMMM d, yyyy',
4297
+ shortTime: 'HH:mm',
4298
+ mediumTime: 'HH:mm:ss',
4299
+ longTime: 'HH:mm:ss.SSS'
4300
+ };
4301
+
4276
4302
  /***
4277
4303
  * Format a date
4278
4304
  * @method format
4279
4305
  * @param {Date|number} dateObj
4280
4306
  * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
4281
- */
4282
- fecha.format = function (dateObj, mask) {
4283
- if (typeof dateObj === 'number') {
4284
- dateObj = new Date(dateObj);
4285
- }
4286
-
4287
- if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
4288
- throw new Error('Invalid Date in fecha.format');
4289
- }
4290
-
4291
- mask = fecha.masks[mask] || mask || fecha.masks['default'];
4292
-
4293
- var literals = [];
4294
-
4295
- // Make literals inactive by replacing them with ??
4296
- mask = mask.replace(literal, function ($0, $1) {
4297
- literals.push($1);
4298
- return '@@@';
4299
- });
4300
- // Apply formatting rules
4301
- mask = mask.replace(token, function ($0) {
4302
- return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
4303
- });
4304
- // Inline literal values back into the formatted value
4305
- return mask.replace(/@@@/g, function () {
4306
- return literals.shift();
4307
- });
4308
- };
4309
-
4307
+ */
4308
+ fecha.format = function (dateObj, mask) {
4309
+ if (typeof dateObj === 'number') {
4310
+ dateObj = new Date(dateObj);
4311
+ }
4312
+
4313
+ if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
4314
+ throw new Error('Invalid Date in fecha.format');
4315
+ }
4316
+
4317
+ mask = fecha.masks[mask] || mask || fecha.masks['default'];
4318
+
4319
+ const literals = [];
4320
+
4321
+ // Make literals inactive by replacing them with ??
4322
+ mask = mask.replace(literal, function($0, $1) {
4323
+ literals.push($1);
4324
+ return '@@@';
4325
+ });
4326
+ // Apply formatting rules
4327
+ mask = mask.replace(token, function ($0) {
4328
+ return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
4329
+ });
4330
+ // Inline literal values back into the formatted value
4331
+ return mask.replace(/@@@/g, function() {
4332
+ return literals.shift();
4333
+ });
4334
+ };
4335
+
4310
4336
  /**
4311
4337
  * Parse a date string into an object, changes - into /
4312
4338
  * @method parse
4313
4339
  * @param {string} dateStr Date string
4314
4340
  * @param {string} format Date parse format
4315
4341
  * @returns {Date|boolean}
4316
- */
4317
- fecha.parse = function (dateStr, format) {
4318
- if (typeof format !== 'string') {
4319
- throw new Error('Invalid format in fecha.parse');
4320
- }
4321
-
4322
- format = fecha.masks[format] || format;
4323
-
4324
- // Avoid regular expression denial of service, fail early for really long strings
4325
- // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
4326
- if (dateStr.length > 1000) {
4327
- return null;
4328
- }
4329
-
4330
- var dateInfo = {};
4331
- var parseInfo = [];
4332
- var literals = [];
4333
- format = format.replace(literal, function ($0, $1) {
4334
- literals.push($1);
4335
- return '@@@';
4336
- });
4337
- var newFormat = regexEscape(format).replace(token, function ($0) {
4338
- if (parseFlags[$0]) {
4339
- var info = parseFlags[$0];
4340
- parseInfo.push(info[1]);
4341
- return '(' + info[0] + ')';
4342
- }
4343
-
4344
- return $0;
4345
- });
4346
- newFormat = newFormat.replace(/@@@/g, function () {
4347
- return literals.shift();
4348
- });
4349
- var matches = dateStr.match(new RegExp(newFormat, 'i'));
4350
- if (!matches) {
4351
- return null;
4352
- }
4353
-
4354
- for (var i = 1; i < matches.length; i++) {
4355
- parseInfo[i - 1](dateInfo, matches[i]);
4356
- }
4357
-
4358
- var today = new Date();
4359
- if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
4360
- dateInfo.hour = +dateInfo.hour + 12;
4361
- } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
4362
- dateInfo.hour = 0;
4363
- }
4364
-
4365
- var date = void 0;
4366
- if (dateInfo.timezoneOffset != null) {
4367
- dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
4368
- 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));
4369
- } else {
4370
- 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);
4371
- }
4372
- return date;
4373
- };
4374
-
4375
- // 导出fecha对象
4376
-
4377
-
4378
- // 以下是从date-util.js合并的函数
4379
- var newArray = function newArray(start, end) {
4380
- var result = [];
4381
- for (var i = start; i <= end; i++) {
4382
- result.push(i);
4383
- }
4384
- return result;
4385
- };
4386
-
4387
- var getSettings = function getSettings() {
4388
- return {
4389
- dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
4390
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
4391
- monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
4392
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
4393
- amPm: ['上午', '下午']
4394
- };
4395
- };
4396
-
4397
- var toDate = function toDate(date) {
4398
- return isDate(date) ? new Date(date) : null;
4399
- };
4400
-
4401
- var isDate = function isDate(date) {
4402
- if (date === null || date === undefined) return false;
4403
- if (isNaN(new Date(date).getTime())) return false;
4404
- if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
4405
- return true;
4406
- };
4407
-
4408
- var isDateObject = function isDateObject(val) {
4409
- return val instanceof Date;
4410
- };
4411
-
4412
- var formatDate = function formatDate(date) {
4413
- var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-MM-dd';
4414
-
4415
- // 处理多种输入类型
4416
- if (!date) return '';
4417
-
4418
- // 如果是时间戳,转成日期对象
4419
- if (typeof date === 'number') {
4420
- date = new Date(date);
4421
- }
4422
- // 如果是字符串,转成日期对象
4423
- if (typeof date === 'string') {
4424
- date = new Date(date);
4425
- }
4426
-
4427
- // 调用toDate进一步验证和转换
4428
- date = toDate(date);
4429
- if (!date) return '';
4430
-
4431
- // 兼容大写和小写的格式标记
4432
- // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
4433
- var lowercaseFormat = format.replace(/YYYY/g, 'yyyy').replace(/D/g, 'd');
4434
-
4435
- // 使用fecha库进行格式化,支持中文配置
4436
- var str = fecha.format(date, lowercaseFormat, getSettings());
4437
- return str;
4438
- };
4439
-
4440
- var parseDate = function parseDate(string, format) {
4441
- return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
4442
- };
4443
-
4444
- var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
4445
- if (month === 3 || month === 5 || month === 8 || month === 10) {
4446
- return 30;
4447
- }
4448
-
4449
- if (month === 1) {
4450
- if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
4451
- return 29;
4452
- } else {
4453
- return 28;
4454
- }
4455
- }
4456
-
4457
- return 31;
4458
- };
4459
-
4460
- var getDayCountOfYear = function getDayCountOfYear(year) {
4461
- var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
4462
- return isLeapYear ? 366 : 365;
4463
- };
4464
-
4465
- var getFirstDayOfMonth = function getFirstDayOfMonth(date) {
4466
- var temp = new Date(date.getTime());
4467
- temp.setDate(1);
4468
- return temp.getDay();
4469
- };
4470
-
4471
- // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
4472
- // {prev, next} Date should work for Daylight Saving Time
4473
- // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
4474
- var prevDate = function prevDate(date) {
4475
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4476
-
4477
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
4478
- };
4479
-
4480
- var nextDate = function nextDate(date) {
4481
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4482
-
4483
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
4484
- };
4485
-
4486
- var getStartDateOfMonth = function getStartDateOfMonth(year, month) {
4487
- var result = new Date(year, month, 1);
4488
- var day = result.getDay();
4489
-
4490
- if (day === 0) {
4491
- return prevDate(result, 7);
4492
- } else {
4493
- return prevDate(result, day);
4494
- }
4495
- };
4496
-
4497
- var getWeekNumber = function getWeekNumber(date) {
4498
- // 支持多种输入类型
4499
- if (!date || !isDate(date)) {
4500
- date = new Date();
4501
- }
4502
- if (typeof date === 'string') {
4503
- date = new Date(date);
4504
- }
4505
-
4506
- // 验证日期有效性
4507
- if (!isDate(date)) return null;
4508
-
4509
- var d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
4510
- // 设置为最近的星期四:当前日期 + 4 - 当前星期数
4511
- // 将星期日的星期数设为7
4512
- d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
4513
- // 获取当年的第一天
4514
- var yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
4515
- // 计算到最近的星期四的完整周数
4516
- var weekNo = Math.ceil(((d - yearStart) / 86400000 + 1) / 7);
4517
- // 返回周数
4518
- return weekNo;
4519
- };
4520
-
4521
- var getRangeHours = function getRangeHours(ranges) {
4522
- var hours = [];
4523
- var disabledHours = [];
4524
-
4525
- (ranges || []).forEach(function (range) {
4526
- var value = range.map(function (date) {
4527
- return date.getHours();
4528
- });
4529
-
4530
- disabledHours = disabledHours.concat(newArray(value[0], value[1]));
4531
- });
4532
-
4533
- if (disabledHours.length) {
4534
- for (var i = 0; i < 24; i++) {
4535
- hours[i] = disabledHours.indexOf(i) === -1;
4536
- }
4537
- } else {
4538
- for (var _i = 0; _i < 24; _i++) {
4539
- hours[_i] = false;
4540
- }
4541
- }
4542
-
4543
- return hours;
4544
- };
4545
-
4546
- var getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
4547
- if (amount <= 0) return [];
4548
- var temp = new Date(date.getTime());
4549
- temp.setDate(0);
4550
- var lastDay = temp.getDate();
4551
- return range(amount).map(function (_, index) {
4552
- return lastDay - (amount - index - 1);
4553
- });
4554
- };
4555
-
4556
- var getMonthDays = function getMonthDays(date) {
4557
- var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
4558
- var days = temp.getDate();
4559
- return range(days).map(function (_, index) {
4560
- return index + 1;
4561
- });
4562
- };
4563
-
4564
- function setRangeData(arr, start, end, value) {
4565
- for (var i = start; i < end; i++) {
4566
- arr[i] = value;
4567
- }
4568
- }
4569
-
4570
- var getRangeMinutes = function getRangeMinutes(ranges, hour) {
4571
- var minutes = new Array(60);
4572
-
4573
- if (ranges.length > 0) {
4574
- ranges.forEach(function (range) {
4575
- var start = range[0];
4576
- var end = range[1];
4577
- var startHour = start.getHours();
4578
- var startMinute = start.getMinutes();
4579
- var endHour = end.getHours();
4580
- var endMinute = end.getMinutes();
4581
- if (startHour === hour && endHour !== hour) {
4582
- setRangeData(minutes, startMinute, 60, true);
4583
- } else if (startHour === hour && endHour === hour) {
4584
- setRangeData(minutes, startMinute, endMinute + 1, true);
4585
- } else if (startHour !== hour && endHour === hour) {
4586
- setRangeData(minutes, 0, endMinute + 1, true);
4587
- } else if (startHour < hour && endHour > hour) {
4588
- setRangeData(minutes, 0, 60, true);
4589
- }
4590
- });
4591
- } else {
4592
- setRangeData(minutes, 0, 60, true);
4593
- }
4594
- return minutes;
4595
- };
4596
-
4597
- var range = function range(n) {
4598
- // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
4599
- return Array.apply(null, { length: n }).map(function (_, n) {
4600
- return n;
4601
- });
4602
- };
4603
-
4604
- var modifyDate = function modifyDate(date, y, m, d) {
4605
- return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
4606
- };
4607
-
4608
- var modifyTime = function modifyTime(date, h, m, s) {
4609
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
4610
- };
4611
-
4612
- var modifyWithTimeString = function modifyWithTimeString(date, time) {
4613
- if (date == null || !time) {
4614
- return date;
4615
- }
4616
- time = parseDate(time, 'HH:mm:ss');
4617
- return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
4618
- };
4619
-
4620
- var clearTime = function clearTime(date) {
4621
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
4622
- };
4623
-
4624
- var clearMilliseconds = function clearMilliseconds(date) {
4625
- return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
4626
- };
4627
-
4628
- var limitTimeRange = function limitTimeRange(date, ranges) {
4629
- var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss';
4630
-
4631
- // TODO: refactory a more elegant solution
4632
- if (ranges.length === 0) return date;
4633
- var normalizeDate = function normalizeDate(date) {
4634
- return fecha.parse(fecha.format(date, format), format);
4635
- };
4636
- var ndate = normalizeDate(date);
4637
- var nranges = ranges.map(function (range) {
4638
- return range.map(normalizeDate);
4639
- });
4640
- if (nranges.some(function (nrange) {
4641
- return ndate >= nrange[0] && ndate <= nrange[1];
4642
- })) return date;
4643
-
4644
- var minDate = nranges[0][0];
4645
- var maxDate = nranges[0][0];
4646
-
4647
- nranges.forEach(function (nrange) {
4648
- minDate = new Date(Math.min(nrange[0], minDate));
4649
- maxDate = new Date(Math.max(nrange[1], minDate));
4650
- });
4651
-
4652
- var ret = ndate < minDate ? minDate : maxDate;
4653
- // preserve Year/Month/Date
4654
- return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
4655
- };
4656
-
4657
- var timeWithinRange = function timeWithinRange(date, selectableRange, format) {
4658
- var limitedDate = limitTimeRange(date, selectableRange, format);
4659
- return limitedDate.getTime() === date.getTime();
4660
- };
4661
-
4662
- var changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
4663
- // clamp date to the number of days in `year`, `month`
4664
- // eg: (2010-1-31, 2010, 2) => 2010-2-28
4665
- var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
4666
- return modifyDate(date, year, month, monthDate);
4667
- };
4668
-
4669
- var prevMonth = function prevMonth(date) {
4670
- var year = date.getFullYear();
4671
- var month = date.getMonth();
4672
- return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
4673
- };
4674
-
4675
- var nextMonth = function nextMonth(date) {
4676
- var year = date.getFullYear();
4677
- var month = date.getMonth();
4678
- return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
4679
- };
4680
-
4681
- var prevYear = function prevYear(date) {
4682
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4683
-
4684
- var year = date.getFullYear();
4685
- var month = date.getMonth();
4686
- return changeYearMonthAndClampDate(date, year - amount, month);
4687
- };
4688
-
4689
- var nextYear = function nextYear(date) {
4690
- var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4691
-
4692
- var year = date.getFullYear();
4693
- var month = date.getMonth();
4694
- return changeYearMonthAndClampDate(date, year + amount, month);
4695
- };
4696
-
4697
- var extractDateFormat = function extractDateFormat(format) {
4698
- return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
4699
- };
4700
-
4701
- var extractTimeFormat = function extractTimeFormat(format) {
4702
- return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
4703
- };
4704
-
4705
- var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
4706
- return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
4707
- };
4708
-
4342
+ */
4343
+ fecha.parse = function (dateStr, format) {
4344
+ if (typeof format !== 'string') {
4345
+ throw new Error('Invalid format in fecha.parse');
4346
+ }
4347
+
4348
+ format = fecha.masks[format] || format;
4349
+
4350
+ // Avoid regular expression denial of service, fail early for really long strings
4351
+ // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
4352
+ if (dateStr.length > 1000) {
4353
+ return null;
4354
+ }
4355
+
4356
+ const dateInfo = {};
4357
+ const parseInfo = [];
4358
+ const literals = [];
4359
+ format = format.replace(literal, function($0, $1) {
4360
+ literals.push($1);
4361
+ return '@@@';
4362
+ });
4363
+ let newFormat = regexEscape(format).replace(token, function ($0) {
4364
+ if (parseFlags[$0]) {
4365
+ const info = parseFlags[$0];
4366
+ parseInfo.push(info[1]);
4367
+ return '(' + info[0] + ')';
4368
+ }
4369
+
4370
+ return $0;
4371
+ });
4372
+ newFormat = newFormat.replace(/@@@/g, function() {
4373
+ return literals.shift();
4374
+ });
4375
+ const matches = dateStr.match(new RegExp(newFormat, 'i'));
4376
+ if (!matches) {
4377
+ return null;
4378
+ }
4379
+
4380
+ for (let i = 1; i < matches.length; i++) {
4381
+ parseInfo[i - 1](dateInfo, matches[i]);
4382
+ }
4383
+
4384
+ const today = new Date();
4385
+ if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
4386
+ dateInfo.hour = +dateInfo.hour + 12;
4387
+ } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
4388
+ dateInfo.hour = 0;
4389
+ }
4390
+
4391
+ let date;
4392
+ if (dateInfo.timezoneOffset != null) {
4393
+ dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
4394
+ date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
4395
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
4396
+ } else {
4397
+ date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
4398
+ dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
4399
+ }
4400
+ return date;
4401
+ };
4402
+
4403
+ // 导出fecha对象
4404
+
4405
+
4406
+ // 以下是从date-util.js合并的函数
4407
+ const newArray = function(start, end) {
4408
+ let result = [];
4409
+ for (let i = start; i <= end; i++) {
4410
+ result.push(i);
4411
+ }
4412
+ return result;
4413
+ };
4414
+
4415
+ const getSettings = () => {
4416
+ return {
4417
+ dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
4418
+ dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
4419
+ monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
4420
+ monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
4421
+ amPm: ['上午', '下午']
4422
+ };
4423
+ };
4424
+
4425
+ const toDate = function(date) {
4426
+ return isDate(date) ? new Date(date) : null;
4427
+ };
4428
+
4429
+ const isDate = function(date) {
4430
+ if (date === null || date === undefined) return false;
4431
+ if (isNaN(new Date(date).getTime())) return false;
4432
+ if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
4433
+ return true;
4434
+ };
4435
+
4436
+ const isDateObject = function(val) {
4437
+ return val instanceof Date;
4438
+ };
4439
+
4440
+ const formatDate = function (date, format = 'yyyy-MM-dd') {
4441
+ // 处理多种输入类型
4442
+ if (!date) return '';
4443
+
4444
+ // 如果是时间戳,转成日期对象
4445
+ if (typeof date === 'number') {
4446
+ date = new Date(date);
4447
+ }
4448
+ // 如果是字符串,转成日期对象
4449
+ if (typeof date === 'string') {
4450
+ date = new Date(date);
4451
+ }
4452
+
4453
+ // 调用toDate进一步验证和转换
4454
+ date = toDate(date);
4455
+ if (!date) return '';
4456
+
4457
+ // 兼容大写和小写的格式标记
4458
+ // 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
4459
+ const lowercaseFormat = format
4460
+ .replace(/YYYY/g, 'yyyy')
4461
+ .replace(/D/g, 'd')
4462
+
4463
+ // 使用fecha库进行格式化,支持中文配置
4464
+ const str = fecha.format(date, lowercaseFormat, getSettings());
4465
+ return str;
4466
+ };
4467
+
4468
+ const parseDate = function(string, format) {
4469
+ return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
4470
+ };
4471
+
4472
+ const getDayCountOfMonth = function(year, month) {
4473
+ if (month === 3 || month === 5 || month === 8 || month === 10) {
4474
+ return 30;
4475
+ }
4476
+
4477
+ if (month === 1) {
4478
+ if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
4479
+ return 29;
4480
+ } else {
4481
+ return 28;
4482
+ }
4483
+ }
4484
+
4485
+ return 31;
4486
+ };
4487
+
4488
+ const getDayCountOfYear = function(year) {
4489
+ const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
4490
+ return isLeapYear ? 366 : 365;
4491
+ };
4492
+
4493
+ const getFirstDayOfMonth = function(date) {
4494
+ const temp = new Date(date.getTime());
4495
+ temp.setDate(1);
4496
+ return temp.getDay();
4497
+ };
4498
+
4499
+ // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
4500
+ // {prev, next} Date should work for Daylight Saving Time
4501
+ // Adding 24 * 60 * 60 * 1000 does not work in the above scenario
4502
+ const prevDate = function(date, amount = 1) {
4503
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
4504
+ };
4505
+
4506
+ const nextDate = function(date, amount = 1) {
4507
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
4508
+ };
4509
+
4510
+ const getStartDateOfMonth = function(year, month) {
4511
+ const result = new Date(year, month, 1);
4512
+ const day = result.getDay();
4513
+
4514
+ if (day === 0) {
4515
+ return prevDate(result, 7);
4516
+ } else {
4517
+ return prevDate(result, day);
4518
+ }
4519
+ };
4520
+
4521
+ const getWeekNumber = function(date) {
4522
+ // 支持多种输入类型
4523
+ if (!date||!isDate(date)) {
4524
+ date = new Date();
4525
+ }
4526
+ if (typeof date === 'string') {
4527
+ date = new Date(date);
4528
+ }
4529
+
4530
+ // 验证日期有效性
4531
+ if (!isDate(date)) return null;
4532
+
4533
+ const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
4534
+ // 设置为最近的星期四:当前日期 + 4 - 当前星期数
4535
+ // 将星期日的星期数设为7
4536
+ d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
4537
+ // 获取当年的第一天
4538
+ const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
4539
+ // 计算到最近的星期四的完整周数
4540
+ const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
4541
+ // 返回周数
4542
+ return weekNo;
4543
+ };
4544
+
4545
+ const getRangeHours = function(ranges) {
4546
+ const hours = [];
4547
+ let disabledHours = [];
4548
+
4549
+ (ranges || []).forEach(range => {
4550
+ const value = range.map(date => date.getHours());
4551
+
4552
+ disabledHours = disabledHours.concat(newArray(value[0], value[1]));
4553
+ });
4554
+
4555
+ if (disabledHours.length) {
4556
+ for (let i = 0; i < 24; i++) {
4557
+ hours[i] = disabledHours.indexOf(i) === -1;
4558
+ }
4559
+ } else {
4560
+ for (let i = 0; i < 24; i++) {
4561
+ hours[i] = false;
4562
+ }
4563
+ }
4564
+
4565
+ return hours;
4566
+ };
4567
+
4568
+ const getPrevMonthLastDays = (date, amount) => {
4569
+ if (amount <= 0) return [];
4570
+ const temp = new Date(date.getTime());
4571
+ temp.setDate(0);
4572
+ const lastDay = temp.getDate();
4573
+ return range(amount).map((_, index) => lastDay - (amount - index - 1));
4574
+ };
4575
+
4576
+ const getMonthDays = (date) => {
4577
+ const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
4578
+ const days = temp.getDate();
4579
+ return range(days).map((_, index) => index + 1);
4580
+ };
4581
+
4582
+ function setRangeData(arr, start, end, value) {
4583
+ for (let i = start; i < end; i++) {
4584
+ arr[i] = value;
4585
+ }
4586
+ }
4587
+
4588
+ const getRangeMinutes = function(ranges, hour) {
4589
+ const minutes = new Array(60);
4590
+
4591
+ if (ranges.length > 0) {
4592
+ ranges.forEach(range => {
4593
+ const start = range[0];
4594
+ const end = range[1];
4595
+ const startHour = start.getHours();
4596
+ const startMinute = start.getMinutes();
4597
+ const endHour = end.getHours();
4598
+ const endMinute = end.getMinutes();
4599
+ if (startHour === hour && endHour !== hour) {
4600
+ setRangeData(minutes, startMinute, 60, true);
4601
+ } else if (startHour === hour && endHour === hour) {
4602
+ setRangeData(minutes, startMinute, endMinute + 1, true);
4603
+ } else if (startHour !== hour && endHour === hour) {
4604
+ setRangeData(minutes, 0, endMinute + 1, true);
4605
+ } else if (startHour < hour && endHour > hour) {
4606
+ setRangeData(minutes, 0, 60, true);
4607
+ }
4608
+ });
4609
+ } else {
4610
+ setRangeData(minutes, 0, 60, true);
4611
+ }
4612
+ return minutes;
4613
+ };
4614
+
4615
+ const range = function(n) {
4616
+ // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
4617
+ return Array.apply(null, {length: n}).map((_, n) => n);
4618
+ };
4619
+
4620
+ const modifyDate = function(date, y, m, d) {
4621
+ return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
4622
+ };
4623
+
4624
+ const modifyTime = function(date, h, m, s) {
4625
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
4626
+ };
4627
+
4628
+ const modifyWithTimeString = (date, time) => {
4629
+ if (date == null || !time) {
4630
+ return date;
4631
+ }
4632
+ time = parseDate(time, 'HH:mm:ss');
4633
+ return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
4634
+ };
4635
+
4636
+ const clearTime = function(date) {
4637
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
4638
+ };
4639
+
4640
+ const clearMilliseconds = function(date) {
4641
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
4642
+ };
4643
+
4644
+ const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
4645
+ // TODO: refactory a more elegant solution
4646
+ if (ranges.length === 0) return date;
4647
+ const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
4648
+ const ndate = normalizeDate(date);
4649
+ const nranges = ranges.map(range => range.map(normalizeDate));
4650
+ if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
4651
+
4652
+ let minDate = nranges[0][0];
4653
+ let maxDate = nranges[0][0];
4654
+
4655
+ nranges.forEach(nrange => {
4656
+ minDate = new Date(Math.min(nrange[0], minDate));
4657
+ maxDate = new Date(Math.max(nrange[1], minDate));
4658
+ });
4659
+
4660
+ const ret = ndate < minDate ? minDate : maxDate;
4661
+ // preserve Year/Month/Date
4662
+ return modifyDate(
4663
+ ret,
4664
+ date.getFullYear(),
4665
+ date.getMonth(),
4666
+ date.getDate()
4667
+ );
4668
+ };
4669
+
4670
+ const timeWithinRange = function(date, selectableRange, format) {
4671
+ const limitedDate = limitTimeRange(date, selectableRange, format);
4672
+ return limitedDate.getTime() === date.getTime();
4673
+ };
4674
+
4675
+ const changeYearMonthAndClampDate = function(date, year, month) {
4676
+ // clamp date to the number of days in `year`, `month`
4677
+ // eg: (2010-1-31, 2010, 2) => 2010-2-28
4678
+ const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
4679
+ return modifyDate(date, year, month, monthDate);
4680
+ };
4681
+
4682
+ const prevMonth = function(date) {
4683
+ const year = date.getFullYear();
4684
+ const month = date.getMonth();
4685
+ return month === 0
4686
+ ? changeYearMonthAndClampDate(date, year - 1, 11)
4687
+ : changeYearMonthAndClampDate(date, year, month - 1);
4688
+ };
4689
+
4690
+ const nextMonth = function(date) {
4691
+ const year = date.getFullYear();
4692
+ const month = date.getMonth();
4693
+ return month === 11
4694
+ ? changeYearMonthAndClampDate(date, year + 1, 0)
4695
+ : changeYearMonthAndClampDate(date, year, month + 1);
4696
+ };
4697
+
4698
+ const prevYear = function(date, amount = 1) {
4699
+ const year = date.getFullYear();
4700
+ const month = date.getMonth();
4701
+ return changeYearMonthAndClampDate(date, year - amount, month);
4702
+ };
4703
+
4704
+ const nextYear = function(date, amount = 1) {
4705
+ const year = date.getFullYear();
4706
+ const month = date.getMonth();
4707
+ return changeYearMonthAndClampDate(date, year + amount, month);
4708
+ };
4709
+
4710
+ const extractDateFormat = function(format) {
4711
+ return format
4712
+ .replace(/\W?m{1,2}|\W?ZZ/g, '')
4713
+ .replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
4714
+ .trim();
4715
+ };
4716
+
4717
+ const extractTimeFormat = function(format) {
4718
+ return format
4719
+ .replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
4720
+ .trim();
4721
+ };
4722
+
4723
+ const validateRangeInOneMonth = function(start, end) {
4724
+ return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
4725
+ };
4726
+
4709
4727
  /**
4710
4728
  * 计算两个日期之间的工作日数量(不包括周末和节假日)
4711
4729
  * @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
4712
4730
  * @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
4713
4731
  * @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
4714
4732
  * @returns {number} 工作日数量
4715
- */
4716
- var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
4717
- var holidays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
4718
-
4719
- if (typeof start_date !== 'string' || typeof end_date !== 'string') {
4720
- throw new Error("Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'.");
4721
- }
4722
-
4723
- var startDateObj = new Date(start_date);
4724
- var endDateObj = new Date(end_date);
4725
-
4726
- if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
4727
- throw new Error("Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'.");
4728
- }
4729
-
4730
- if (startDateObj > endDateObj) {
4731
- throw new Error('Start date should be earlier than or equal to end date.');
4732
- }
4733
-
4734
- var workdays = 0;
4735
-
4736
- // Iterate through each day in the date range
4737
-
4738
- var _loop = function _loop(currentDate) {
4739
- // Check if the current day is a weekend (Saturday or Sunday)
4740
- var isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
4741
-
4742
- // Check if the current day is a holiday
4743
- var isHoliday = holidays.some(function (holiday) {
4744
- var holidayDate = new Date(holiday);
4745
- return currentDate.toDateString() === holidayDate.toDateString();
4746
- });
4747
-
4748
- // If it's a workday (not a weekend or holiday), increment the workdays count
4749
- if (!isWeekend && !isHoliday) {
4750
- workdays++;
4751
- }
4752
- };
4753
-
4754
- for (var currentDate = new Date(startDateObj); currentDate <= endDateObj; currentDate.setDate(currentDate.getDate() + 1)) {
4755
- _loop(currentDate);
4756
- }
4757
-
4758
- return workdays;
4759
- };
4760
-
4733
+ */
4734
+ const calculateNetworkDays = function (start_date, end_date, holidays = []) {
4735
+ if (typeof start_date !== 'string' || typeof end_date !== 'string') {
4736
+ throw new Error(
4737
+ "Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
4738
+ );
4739
+ }
4740
+
4741
+ const startDateObj = new Date(start_date);
4742
+ const endDateObj = new Date(end_date);
4743
+
4744
+ if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
4745
+ throw new Error(
4746
+ "Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
4747
+ );
4748
+ }
4749
+
4750
+ if (startDateObj > endDateObj) {
4751
+ throw new Error('Start date should be earlier than or equal to end date.');
4752
+ }
4753
+
4754
+ let workdays = 0;
4755
+
4756
+ // Iterate through each day in the date range
4757
+ for (
4758
+ let currentDate = new Date(startDateObj);
4759
+ currentDate <= endDateObj;
4760
+ currentDate.setDate(currentDate.getDate() + 1)
4761
+ ) {
4762
+ // Check if the current day is a weekend (Saturday or Sunday)
4763
+ const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
4764
+
4765
+ // Check if the current day is a holiday
4766
+ const isHoliday = holidays.some((holiday) => {
4767
+ const holidayDate = new Date(holiday);
4768
+ return currentDate.toDateString() === holidayDate.toDateString();
4769
+ });
4770
+
4771
+ // If it's a workday (not a weekend or holiday), increment the workdays count
4772
+ if (!isWeekend && !isHoliday) {
4773
+ workdays++;
4774
+ }
4775
+ }
4776
+
4777
+ return workdays;
4778
+ };
4779
+
4761
4780
  /**
4762
4781
  * 日期加减天数
4763
4782
  * @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
4764
4783
  * @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
4765
4784
  * @returns {string} 结果日期,格式为 "YYYY-MM-DD"
4766
- */
4767
- var dateAddDays = function dateAddDays(start_date, days) {
4768
- if (typeof start_date !== 'string' || !Number.isInteger(days)) {
4769
- 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.");
4770
- }
4771
-
4772
- var startDateObj = new Date(start_date);
4773
- if (isNaN(startDateObj.getTime())) {
4774
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
4775
- }
4776
-
4777
- var resultDateObj = new Date(startDateObj);
4778
- resultDateObj.setDate(resultDateObj.getDate() + days);
4779
-
4780
- var resultYear = resultDateObj.getFullYear();
4781
- var resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
4782
- var resultDay = String(resultDateObj.getDate()).padStart(2, '0');
4783
-
4784
- return resultYear + '-' + resultMonth + '-' + resultDay;
4785
- };
4786
-
4785
+ */
4786
+ const dateAddDays = function (start_date, days) {
4787
+ if (typeof start_date !== 'string' || !Number.isInteger(days)) {
4788
+ throw new Error(
4789
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
4790
+ );
4791
+ }
4792
+
4793
+ const startDateObj = new Date(start_date);
4794
+ if (isNaN(startDateObj.getTime())) {
4795
+ throw new Error(
4796
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
4797
+ );
4798
+ }
4799
+
4800
+ const resultDateObj = new Date(startDateObj);
4801
+ resultDateObj.setDate(resultDateObj.getDate() + days);
4802
+
4803
+ const resultYear = resultDateObj.getFullYear();
4804
+ const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
4805
+ const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
4806
+
4807
+ return `${resultYear}-${resultMonth}-${resultDay}`;
4808
+ };
4809
+
4787
4810
  /**
4788
4811
  * 计算两个日期之间的差值
4789
4812
  * @date 2023年12月14日
@@ -4791,180 +4814,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
4791
4814
  * @param {String} end_date - 结束日期字符串
4792
4815
  * @param {String} unit - 单位:year/month/day
4793
4816
  * @returns {Number} 差值
4794
- */
4795
- var dateDiff = function dateDiff(start_date, end_date) {
4796
- var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
4797
-
4798
- // Assuming date strings are in "YYYY-MM-DD" format
4799
- var startDate = new Date(start_date);
4800
- var endDate = new Date(end_date);
4801
-
4802
- // If the date is invalid, return 0
4803
- if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
4804
- return 0;
4805
- }
4806
-
4807
- if (unit === 'year') {
4808
- return endDate.getFullYear() - startDate.getFullYear();
4809
- } else if (unit === 'month') {
4810
- return (endDate.getFullYear() - startDate.getFullYear()) * 12 + (endDate.getMonth() - startDate.getMonth());
4811
- } else {
4812
- // Default to day
4813
- var timeDifference = endDate - startDate;
4814
- // Calculate days (86400000 milliseconds per day)
4815
- return Math.floor(timeDifference / 86400000);
4816
- }
4817
- };
4818
-
4817
+ */
4818
+ const dateDiff = function (start_date, end_date, unit = 'day') {
4819
+ // Assuming date strings are in "YYYY-MM-DD" format
4820
+ var startDate = new Date(start_date);
4821
+ var endDate = new Date(end_date);
4822
+
4823
+ // If the date is invalid, return 0
4824
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
4825
+ return 0;
4826
+ }
4827
+
4828
+ if (unit === 'year') {
4829
+ return endDate.getFullYear() - startDate.getFullYear();
4830
+ } else if (unit === 'month') {
4831
+ return (
4832
+ (endDate.getFullYear() - startDate.getFullYear()) * 12 +
4833
+ (endDate.getMonth() - startDate.getMonth())
4834
+ );
4835
+ } else {
4836
+ // Default to day
4837
+ var timeDifference = endDate - startDate;
4838
+ // Calculate days (86400000 milliseconds per day)
4839
+ return Math.floor(timeDifference / 86400000);
4840
+ }
4841
+ };
4842
+
4819
4843
  /**
4820
4844
  * 获取月份中的日期
4821
4845
  * @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
4822
4846
  * @returns {number} 月份中的日期(1-31)
4823
- */
4824
- var dayOfMonth = function dayOfMonth(date) {
4825
- if (typeof date !== 'string') {
4826
- throw new Error("Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'.");
4827
- }
4828
-
4829
- var dateObj = new Date(date);
4830
- if (isNaN(dateObj.getTime())) {
4831
- throw new Error("Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'.");
4832
- }
4833
-
4834
- return dateObj.getDate();
4835
- };
4836
-
4847
+ */
4848
+ const dayOfMonth = function (date) {
4849
+ if (typeof date !== 'string') {
4850
+ throw new Error(
4851
+ "Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
4852
+ );
4853
+ }
4854
+
4855
+ const dateObj = new Date(date);
4856
+ if (isNaN(dateObj.getTime())) {
4857
+ throw new Error(
4858
+ "Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
4859
+ );
4860
+ }
4861
+
4862
+ return dateObj.getDate();
4863
+ };
4864
+
4837
4865
  /**
4838
4866
  * 获取当前日期
4839
4867
  * @date 2022年5月7日
4840
4868
  * @param {string} format - 日期格式,默认为'YYYY-MM-DD'
4841
4869
  * @returns {string} 当前日期的格式化字符串
4842
- */
4843
- var getCurrentDate = function getCurrentDate() {
4844
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD';
4845
-
4846
- return formatDate(new Date(), format);
4847
- };
4848
-
4870
+ */
4871
+ const getCurrentDate = function (format = 'YYYY-MM-DD') {
4872
+ return formatDate(new Date(), format);
4873
+ };
4874
+
4849
4875
  /**
4850
4876
  * 获取当前日期时间
4851
4877
  * @date 2022年5月7日
4852
4878
  * @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
4853
4879
  * @returns {string} 当前日期时间的格式化字符串
4854
- */
4855
- var getCurrentDateTime = function getCurrentDateTime() {
4856
- var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'YYYY-MM-DD HH:mm:ss';
4857
-
4858
- return formatDate(new Date(), format);
4859
- };
4860
-
4880
+ */
4881
+ const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
4882
+ return formatDate(new Date(), format);
4883
+ };
4884
+
4861
4885
  /**
4862
4886
  * 获取小时
4863
4887
  * @date 2022年5月7日
4864
4888
  * @param {Date|string} [date] - 日期对象或日期字符串
4865
4889
  * @returns {number} 小时数(0-23)
4866
- */
4867
- var getHour = function getHour(date) {
4868
- if (!date) {
4869
- return new Date().getHours();
4870
- }
4871
- if (typeof date === 'string') {
4872
- date = new Date(date);
4873
- }
4874
- return date.getHours();
4875
- };
4876
-
4890
+ */
4891
+ const getHour = function (date) {
4892
+ if (!date) {
4893
+ return new Date().getHours();
4894
+ }
4895
+ if (typeof date === 'string') {
4896
+ date = new Date(date);
4897
+ }
4898
+ return date.getHours();
4899
+ };
4900
+
4877
4901
  /**
4878
4902
  * 获取分钟
4879
4903
  * @date 2022年5月7日
4880
4904
  * @param {Date|string} [date] - 日期对象或日期字符串
4881
4905
  * @returns {number} 分钟数(0-59)
4882
- */
4883
- var getMinute = function getMinute(date) {
4884
- if (!date) {
4885
- return new Date().getMinutes();
4886
- }
4887
- if (typeof date === 'string') {
4888
- date = new Date(date);
4889
- }
4890
- return date.getMinutes();
4891
- };
4892
-
4906
+ */
4907
+ const getMinute = function (date) {
4908
+ if (!date) {
4909
+ return new Date().getMinutes();
4910
+ }
4911
+ if (typeof date === 'string') {
4912
+ date = new Date(date);
4913
+ }
4914
+ return date.getMinutes();
4915
+ };
4916
+
4893
4917
  /**
4894
4918
  * 获取月份
4895
4919
  * @date 2022年5月7日
4896
4920
  * @param {Date|string} [date] - 日期对象或日期字符串
4897
4921
  * @returns {number} 月份数(1-12)
4898
- */
4899
- var getMonth = function getMonth(date) {
4900
- if (!date) {
4901
- return new Date().getMonth() + 1;
4902
- }
4903
- if (typeof date === 'string') {
4904
- date = new Date(date);
4905
- }
4906
- return date.getMonth() + 1;
4907
- };
4908
-
4922
+ */
4923
+ const getMonth = function (date) {
4924
+ if (!date) {
4925
+ return new Date().getMonth() + 1;
4926
+ }
4927
+ if (typeof date === 'string') {
4928
+ date = new Date(date);
4929
+ }
4930
+ return date.getMonth() + 1;
4931
+ };
4932
+
4909
4933
  /**
4910
4934
  * 获取秒
4911
4935
  * @date 2022年5月7日
4912
4936
  * @param {Date|string} [date] - 日期对象或日期字符串
4913
4937
  * @returns {number} 秒数(0-59)
4914
- */
4915
- var getSecond = function getSecond(date) {
4916
- if (!date) {
4917
- return new Date().getSeconds();
4918
- }
4919
- if (typeof date === 'string') {
4920
- date = new Date(date);
4921
- }
4922
- return date.getSeconds();
4923
- };
4924
-
4938
+ */
4939
+ const getSecond = function (date) {
4940
+ if (!date) {
4941
+ return new Date().getSeconds();
4942
+ }
4943
+ if (typeof date === 'string') {
4944
+ date = new Date(date);
4945
+ }
4946
+ return date.getSeconds();
4947
+ };
4948
+
4925
4949
  /**
4926
4950
  * 获取星期几
4927
4951
  * @date 2022年5月7日
4928
4952
  * @param {Date|string} [date] - 日期对象或日期字符串
4929
4953
  * @returns {number} 星期几(0-6,0表示星期日)
4930
- */
4931
- var getWeekday = function getWeekday(date) {
4932
- if (!date) {
4933
- return new Date().getDay();
4934
- }
4935
- if (typeof date === 'string') {
4936
- date = new Date(date);
4937
- }
4938
- return date.getDay();
4939
- };
4940
-
4954
+ */
4955
+ const getWeekday = function (date) {
4956
+ if (!date) {
4957
+ return new Date().getDay();
4958
+ }
4959
+ if (typeof date === 'string') {
4960
+ date = new Date(date);
4961
+ }
4962
+ return date.getDay();
4963
+ };
4964
+
4965
+
4941
4966
  /**
4942
4967
  * @desc 获取上午/下午/晚上
4943
4968
  * @author huangbo
4944
4969
  * @date 2022年5月7日
4945
4970
  * @param {String} [time] - 时间
4946
- **/
4947
- var timeCycle = function timeCycle(time) {
4948
- var hour = 0;
4949
- if (!time) {
4950
- hour = new Date().getHours();
4951
- } else if (typeof time === 'string') {
4952
- // 从时间字符串中提取小时
4953
- var match = time.match(/^(\d{1,2})/);
4954
- if (match) {
4955
- hour = parseInt(match[1], 10);
4956
- }
4957
- } else if (typeof time === 'number') {
4958
- hour = time;
4959
- }
4960
- // 判断时间段
4961
- if (hour >= 5 && hour < 12) {
4962
- return '上午';
4963
- } else if (hour >= 12 && hour < 18) {
4964
- return '下午';
4965
- } else {
4966
- return '晚上';
4967
- }
4971
+ **/
4972
+ const timeCycle = function (time) {
4973
+ let hour = 0;
4974
+ if (!time) {
4975
+ hour = new Date().getHours();
4976
+ } else if (typeof time === 'string') {
4977
+ // 从时间字符串中提取小时
4978
+ const match = time.match(/^(\d{1,2})/);
4979
+ if (match) {
4980
+ hour = parseInt(match[1], 10);
4981
+ }
4982
+ } else if (typeof time === 'number') {
4983
+ hour = time;
4984
+ }
4985
+ // 判断时间段
4986
+ if (hour >= 5 && hour < 12) {
4987
+ return '上午';
4988
+ } else if (hour >= 12 && hour < 18) {
4989
+ return '下午';
4990
+ } else {
4991
+ return '晚上';
4992
+ }
4968
4993
  };
4969
4994
 
4970
4995
  /***/ }),
@@ -5836,19 +5861,12 @@ var scrollBarWidth = void 0;
5836
5861
 
5837
5862
 
5838
5863
 
5839
- /***/ }),
5840
-
5841
- /***/ 28:
5842
- /***/ (function(module, exports) {
5843
-
5844
- module.exports = require("qs");
5845
-
5846
5864
  /***/ }),
5847
5865
 
5848
5866
  /***/ 29:
5849
5867
  /***/ (function(module, exports) {
5850
5868
 
5851
- module.exports = require("axios");
5869
+ module.exports = require("qs");
5852
5870
 
5853
5871
  /***/ }),
5854
5872
 
@@ -5960,6 +5978,13 @@ function normalizeComponent(
5960
5978
  /***/ 30:
5961
5979
  /***/ (function(module, exports) {
5962
5980
 
5981
+ module.exports = require("axios");
5982
+
5983
+ /***/ }),
5984
+
5985
+ /***/ 31:
5986
+ /***/ (function(module, exports) {
5987
+
5963
5988
  module.exports = require("json-bigint");
5964
5989
 
5965
5990
  /***/ }),
@@ -6038,9 +6063,7 @@ module.exports = require("vue");
6038
6063
  /***/ 42:
6039
6064
  /***/ (function(module, exports, __webpack_require__) {
6040
6065
 
6041
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;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; };
6042
-
6043
- /**
6066
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
6044
6067
  * @fileOverview Kickass library to create and place poppers near their reference elements.
6045
6068
  * @version {{version}}
6046
6069
  * @license
@@ -6063,60 +6086,68 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6063
6086
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6064
6087
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6065
6088
  * SOFTWARE.
6066
- */
6067
-
6068
- //
6069
- // Cross module loader
6070
- // Supported: Node, AMD, Browser globals
6071
- //
6072
- (function (root, factory) {
6073
- if (true) {
6074
- // AMD. Register as an anonymous module.
6089
+ */
6090
+
6091
+ //
6092
+ // Cross module loader
6093
+ // Supported: Node, AMD, Browser globals
6094
+ //
6095
+ (function (root, factory) {
6096
+ if (true) {
6097
+ // AMD. Register as an anonymous module.
6075
6098
  !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
6076
6099
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
6077
6100
  (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
6078
6101
  __WEBPACK_AMD_DEFINE_FACTORY__),
6079
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
6080
- } else {}
6081
- })(this, function () {
6082
- 'use strict';
6083
-
6084
- var root = window;
6085
- // default options
6086
- var DEFAULTS = {
6087
- // placement of the popper
6088
- placement: 'bottom',
6089
-
6090
- gpuAcceleration: true,
6091
-
6092
- // shift popper from its origin by the given amount of pixels (can be negative)
6093
- offset: 0,
6094
-
6095
- // the element which will act as boundary of the popper
6096
- boundariesElement: 'viewport',
6097
-
6098
- // amount of pixel used to define a minimum distance between the boundaries and the popper
6099
- boundariesPadding: 5,
6100
-
6101
- // popper will try to prevent overflow following this order,
6102
- // by default, then, it could overflow on the left and on top of the boundariesElement
6103
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
6104
-
6105
- // the behavior used by flip to change the placement of the popper
6106
- flipBehavior: 'flip',
6107
-
6108
- arrowElement: '[x-arrow]',
6109
-
6110
- arrowOffset: 0,
6111
-
6112
- // list of functions used to modify the offsets before they are applied to the popper
6113
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
6114
-
6115
- modifiersIgnored: [],
6116
-
6117
- forceAbsolute: false
6118
- };
6119
-
6102
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
6103
+ } else {}
6104
+ })(this, function () {
6105
+ 'use strict';
6106
+
6107
+ var root = window;
6108
+ // default options
6109
+ var DEFAULTS = {
6110
+ // placement of the popper
6111
+ placement: 'bottom',
6112
+
6113
+ gpuAcceleration: true,
6114
+
6115
+ // shift popper from its origin by the given amount of pixels (can be negative)
6116
+ offset: 0,
6117
+
6118
+ // the element which will act as boundary of the popper
6119
+ boundariesElement: 'viewport',
6120
+
6121
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
6122
+ boundariesPadding: 5,
6123
+
6124
+ // popper will try to prevent overflow following this order,
6125
+ // by default, then, it could overflow on the left and on top of the boundariesElement
6126
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
6127
+
6128
+ // the behavior used by flip to change the placement of the popper
6129
+ flipBehavior: 'flip',
6130
+
6131
+ arrowElement: '[x-arrow]',
6132
+
6133
+ arrowOffset: 0,
6134
+
6135
+ // list of functions used to modify the offsets before they are applied to the popper
6136
+ modifiers: [
6137
+ 'shift',
6138
+ 'offset',
6139
+ 'preventOverflow',
6140
+ 'keepTogether',
6141
+ 'arrow',
6142
+ 'flip',
6143
+ 'applyStyle'
6144
+ ],
6145
+
6146
+ modifiersIgnored: [],
6147
+
6148
+ forceAbsolute: false
6149
+ };
6150
+
6120
6151
  /**
6121
6152
  * Create a new Popper.js instance
6122
6153
  * @constructor Popper
@@ -6178,117 +6209,128 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6178
6209
  * @param {Array} [options.modifiersIgnored=[]]
6179
6210
  * Put here any built-in modifier name you want to exclude from the modifiers list
6180
6211
  * The function should reflect the @params and @returns of preventOverflow
6181
- *
6182
- * @param {Boolean} [options.removeOnDestroy=false]
6183
- * Set to true if you want to automatically remove the popper when you call the `destroy` method.
6184
- */
6185
- function Popper(reference, popper, options) {
6186
- this._reference = reference.jquery ? reference[0] : reference;
6187
- this.state = {};
6188
-
6189
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
6190
- // generate a default popper if is not defined
6191
- var isNotDefined = typeof popper === 'undefined' || popper === null;
6192
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
6193
- if (isNotDefined || isConfig) {
6194
- this._popper = this.parse(isConfig ? popper : {});
6195
- }
6196
- // otherwise, use the given HTMLElement as popper
6197
- else {
6198
- this._popper = popper.jquery ? popper[0] : popper;
6199
- }
6200
-
6201
- // with {} we create a new object with the options inside it
6202
- this._options = Object.assign({}, DEFAULTS, options);
6203
-
6204
- // refactoring modifiers' list
6205
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
6206
- // remove ignored modifiers
6207
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
6208
-
6209
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
6210
- // margins needs to be calculated to get the correct popper offsets
6211
- if (modifier === 'applyStyle') {
6212
- this._popper.setAttribute('x-placement', this._options.placement);
6213
- }
6214
-
6215
- // return predefined modifier identified by string or keep the custom one
6216
- return this.modifiers[modifier] || modifier;
6217
- }.bind(this));
6218
-
6219
- // make sure to apply the popper position before any computation
6220
- this.state.position = this._getPosition(this._popper, this._reference);
6221
- setStyle(this._popper, { position: this.state.position, top: 0 });
6222
-
6223
- // fire the first update to position the popper in the right place
6224
- this.update();
6225
-
6226
- // setup event listeners, they will take care of update the position in specific situations
6227
- this._setupEventListeners();
6228
- return this;
6229
- }
6230
-
6231
- //
6232
- // Methods
6233
- //
6212
+ *
6213
+ * @param {Boolean} [options.removeOnDestroy=false]
6214
+ * Set to true if you want to automatically remove the popper when you call the `destroy` method.
6215
+ */
6216
+ function Popper(reference, popper, options) {
6217
+ this._reference = reference.jquery ? reference[0] : reference;
6218
+ this.state = {};
6219
+
6220
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
6221
+ // generate a default popper if is not defined
6222
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
6223
+ var isConfig =
6224
+ popper && Object.prototype.toString.call(popper) === '[object Object]';
6225
+ if (isNotDefined || isConfig) {
6226
+ this._popper = this.parse(isConfig ? popper : {});
6227
+ }
6228
+ // otherwise, use the given HTMLElement as popper
6229
+ else {
6230
+ this._popper = popper.jquery ? popper[0] : popper;
6231
+ }
6232
+
6233
+ // with {} we create a new object with the options inside it
6234
+ this._options = Object.assign({}, DEFAULTS, options);
6235
+
6236
+ // refactoring modifiers' list
6237
+ this._options.modifiers = this._options.modifiers.map(
6238
+ function (modifier) {
6239
+ // remove ignored modifiers
6240
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
6241
+
6242
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
6243
+ // margins needs to be calculated to get the correct popper offsets
6244
+ if (modifier === 'applyStyle') {
6245
+ this._popper.setAttribute('x-placement', this._options.placement);
6246
+ }
6247
+
6248
+ // return predefined modifier identified by string or keep the custom one
6249
+ return this.modifiers[modifier] || modifier;
6250
+ }.bind(this)
6251
+ );
6252
+
6253
+ // make sure to apply the popper position before any computation
6254
+ this.state.position = this._getPosition(this._popper, this._reference);
6255
+ setStyle(this._popper, { position: this.state.position, top: 0 });
6256
+
6257
+ // fire the first update to position the popper in the right place
6258
+ this.update();
6259
+
6260
+ // setup event listeners, they will take care of update the position in specific situations
6261
+ this._setupEventListeners();
6262
+ return this;
6263
+ }
6264
+
6265
+ //
6266
+ // Methods
6267
+ //
6234
6268
  /**
6235
6269
  * Destroy the popper
6236
6270
  * @method
6237
6271
  * @memberof Popper
6238
- */
6239
- Popper.prototype.destroy = function () {
6240
- this._popper.removeAttribute('x-placement');
6241
- this._popper.style.left = '';
6242
- this._popper.style.position = '';
6243
- this._popper.style.top = '';
6244
- this._popper.style[getSupportedPropertyName('transform')] = '';
6245
- this._removeEventListeners();
6246
-
6247
- // remove the popper if user explicity asked for the deletion on destroy
6248
- if (this._options.removeOnDestroy) {
6249
- this._popper.remove();
6250
- }
6251
- return this;
6252
- };
6253
-
6272
+ */
6273
+ Popper.prototype.destroy = function () {
6274
+ this._popper.removeAttribute('x-placement');
6275
+ this._popper.style.left = '';
6276
+ this._popper.style.position = '';
6277
+ this._popper.style.top = '';
6278
+ this._popper.style[getSupportedPropertyName('transform')] = '';
6279
+ this._removeEventListeners();
6280
+
6281
+ // remove the popper if user explicity asked for the deletion on destroy
6282
+ if (this._options.removeOnDestroy) {
6283
+ this._popper.remove();
6284
+ }
6285
+ return this;
6286
+ };
6287
+
6254
6288
  /**
6255
6289
  * Updates the position of the popper, computing the new offsets and applying the new style
6256
6290
  * @method
6257
6291
  * @memberof Popper
6258
- */
6259
- Popper.prototype.update = function () {
6260
- var data = { instance: this, styles: {} };
6261
-
6262
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
6263
- // and refer to _originalPlacement to know the original value
6264
- data.placement = this._options.placement;
6265
- data._originalPlacement = this._options.placement;
6266
-
6267
- // compute the popper and reference offsets and put them inside data.offsets
6268
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
6269
-
6270
- // get boundaries
6271
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
6272
-
6273
- data = this.runModifiers(data, this._options.modifiers);
6274
-
6275
- if (typeof this.state.updateCallback === 'function') {
6276
- this.state.updateCallback(data);
6277
- }
6278
- };
6279
-
6292
+ */
6293
+ Popper.prototype.update = function () {
6294
+ var data = { instance: this, styles: {} };
6295
+
6296
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
6297
+ // and refer to _originalPlacement to know the original value
6298
+ data.placement = this._options.placement;
6299
+ data._originalPlacement = this._options.placement;
6300
+
6301
+ // compute the popper and reference offsets and put them inside data.offsets
6302
+ data.offsets = this._getOffsets(
6303
+ this._popper,
6304
+ this._reference,
6305
+ data.placement
6306
+ );
6307
+
6308
+ // get boundaries
6309
+ data.boundaries = this._getBoundaries(
6310
+ data,
6311
+ this._options.boundariesPadding,
6312
+ this._options.boundariesElement
6313
+ );
6314
+
6315
+ data = this.runModifiers(data, this._options.modifiers);
6316
+
6317
+ if (typeof this.state.updateCallback === 'function') {
6318
+ this.state.updateCallback(data);
6319
+ }
6320
+ };
6321
+
6280
6322
  /**
6281
6323
  * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
6282
6324
  * @method
6283
6325
  * @memberof Popper
6284
6326
  * @param {Function} callback
6285
- */
6286
- Popper.prototype.onCreate = function (callback) {
6287
- // the createCallbacks return as first argument the popper instance
6288
- callback(this);
6289
- return this;
6290
- };
6291
-
6327
+ */
6328
+ Popper.prototype.onCreate = function (callback) {
6329
+ // the createCallbacks return as first argument the popper instance
6330
+ callback(this);
6331
+ return this;
6332
+ };
6333
+
6292
6334
  /**
6293
6335
  * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
6294
6336
  * used to style popper and its arrow.
@@ -6296,93 +6338,101 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6296
6338
  * @method
6297
6339
  * @memberof Popper
6298
6340
  * @param {Function} callback
6299
- */
6300
- Popper.prototype.onUpdate = function (callback) {
6301
- this.state.updateCallback = callback;
6302
- return this;
6303
- };
6304
-
6341
+ */
6342
+ Popper.prototype.onUpdate = function (callback) {
6343
+ this.state.updateCallback = callback;
6344
+ return this;
6345
+ };
6346
+
6305
6347
  /**
6306
6348
  * Helper used to generate poppers from a configuration file
6307
6349
  * @method
6308
6350
  * @memberof Popper
6309
6351
  * @param config {Object} configuration
6310
6352
  * @returns {HTMLElement} popper
6311
- */
6312
- Popper.prototype.parse = function (config) {
6313
- var defaultConfig = {
6314
- tagName: 'div',
6315
- classNames: ['popper'],
6316
- attributes: [],
6317
- parent: root.document.body,
6318
- content: '',
6319
- contentType: 'text',
6320
- arrowTagName: 'div',
6321
- arrowClassNames: ['popper__arrow'],
6322
- arrowAttributes: ['x-arrow']
6323
- };
6324
- config = Object.assign({}, defaultConfig, config);
6325
-
6326
- var d = root.document;
6327
-
6328
- var popper = d.createElement(config.tagName);
6329
- addClassNames(popper, config.classNames);
6330
- addAttributes(popper, config.attributes);
6331
- if (config.contentType === 'node') {
6332
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
6333
- } else if (config.contentType === 'html') {
6334
- popper.innerHTML = config.content;
6335
- } else {
6336
- popper.textContent = config.content;
6337
- }
6338
-
6339
- if (config.arrowTagName) {
6340
- var arrow = d.createElement(config.arrowTagName);
6341
- addClassNames(arrow, config.arrowClassNames);
6342
- addAttributes(arrow, config.arrowAttributes);
6343
- popper.appendChild(arrow);
6344
- }
6345
-
6346
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
6347
-
6348
- // if the given parent is a string, use it to match an element
6349
- // if more than one element is matched, the first one will be used as parent
6350
- // if no elements are matched, the script will throw an error
6351
- if (typeof parent === 'string') {
6352
- parent = d.querySelectorAll(config.parent);
6353
- if (parent.length > 1) {
6354
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
6355
- }
6356
- if (parent.length === 0) {
6357
- throw "ERROR: the given `parent` doesn't exists!";
6358
- }
6359
- parent = parent[0];
6360
- }
6361
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
6362
- // the first one will be used as parent
6363
- if (parent.length > 1 && parent instanceof Element === false) {
6364
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
6365
- parent = parent[0];
6366
- }
6367
-
6368
- // append the generated popper to its parent
6369
- parent.appendChild(popper);
6370
-
6371
- return popper;
6372
-
6353
+ */
6354
+ Popper.prototype.parse = function (config) {
6355
+ var defaultConfig = {
6356
+ tagName: 'div',
6357
+ classNames: ['popper'],
6358
+ attributes: [],
6359
+ parent: root.document.body,
6360
+ content: '',
6361
+ contentType: 'text',
6362
+ arrowTagName: 'div',
6363
+ arrowClassNames: ['popper__arrow'],
6364
+ arrowAttributes: ['x-arrow']
6365
+ };
6366
+ config = Object.assign({}, defaultConfig, config);
6367
+
6368
+ var d = root.document;
6369
+
6370
+ var popper = d.createElement(config.tagName);
6371
+ addClassNames(popper, config.classNames);
6372
+ addAttributes(popper, config.attributes);
6373
+ if (config.contentType === 'node') {
6374
+ popper.appendChild(
6375
+ config.content.jquery ? config.content[0] : config.content
6376
+ );
6377
+ } else if (config.contentType === 'html') {
6378
+ popper.innerHTML = config.content;
6379
+ } else {
6380
+ popper.textContent = config.content;
6381
+ }
6382
+
6383
+ if (config.arrowTagName) {
6384
+ var arrow = d.createElement(config.arrowTagName);
6385
+ addClassNames(arrow, config.arrowClassNames);
6386
+ addAttributes(arrow, config.arrowAttributes);
6387
+ popper.appendChild(arrow);
6388
+ }
6389
+
6390
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
6391
+
6392
+ // if the given parent is a string, use it to match an element
6393
+ // if more than one element is matched, the first one will be used as parent
6394
+ // if no elements are matched, the script will throw an error
6395
+ if (typeof parent === 'string') {
6396
+ parent = d.querySelectorAll(config.parent);
6397
+ if (parent.length > 1) {
6398
+ console.warn(
6399
+ 'WARNING: the given `parent` query(' +
6400
+ config.parent +
6401
+ ') matched more than one element, the first one will be used'
6402
+ );
6403
+ }
6404
+ if (parent.length === 0) {
6405
+ throw "ERROR: the given `parent` doesn't exists!";
6406
+ }
6407
+ parent = parent[0];
6408
+ }
6409
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
6410
+ // the first one will be used as parent
6411
+ if (parent.length > 1 && parent instanceof Element === false) {
6412
+ console.warn(
6413
+ 'WARNING: you have passed as parent a list of elements, the first one will be used'
6414
+ );
6415
+ parent = parent[0];
6416
+ }
6417
+
6418
+ // append the generated popper to its parent
6419
+ parent.appendChild(popper);
6420
+
6421
+ return popper;
6422
+
6373
6423
  /**
6374
6424
  * Adds class names to the given element
6375
6425
  * @function
6376
6426
  * @ignore
6377
6427
  * @param {HTMLElement} target
6378
6428
  * @param {Array} classes
6379
- */
6380
- function addClassNames(element, classNames) {
6381
- classNames.forEach(function (className) {
6382
- element.classList.add(className);
6383
- });
6384
- }
6385
-
6429
+ */
6430
+ function addClassNames(element, classNames) {
6431
+ classNames.forEach(function (className) {
6432
+ element.classList.add(className);
6433
+ });
6434
+ }
6435
+
6386
6436
  /**
6387
6437
  * Adds attributes to the given element
6388
6438
  * @function
@@ -6391,14 +6441,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6391
6441
  * @param {Array} attributes
6392
6442
  * @example
6393
6443
  * addAttributes(element, [ 'data-info:foobar' ]);
6394
- */
6395
- function addAttributes(element, attributes) {
6396
- attributes.forEach(function (attribute) {
6397
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
6398
- });
6399
- }
6400
- };
6401
-
6444
+ */
6445
+ function addAttributes(element, attributes) {
6446
+ attributes.forEach(function (attribute) {
6447
+ element.setAttribute(
6448
+ attribute.split(':')[0],
6449
+ attribute.split(':')[1] || ''
6450
+ );
6451
+ });
6452
+ }
6453
+ };
6454
+
6402
6455
  /**
6403
6456
  * Helper used to get the position which will be applied to the popper
6404
6457
  * @method
@@ -6406,20 +6459,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6406
6459
  * @param config {HTMLElement} popper element
6407
6460
  * @param reference {HTMLElement} reference element
6408
6461
  * @returns {String} position
6409
- */
6410
- Popper.prototype._getPosition = function (popper, reference) {
6411
- var container = getOffsetParent(reference);
6412
-
6413
- if (this._options.forceAbsolute) {
6414
- return 'absolute';
6415
- }
6416
-
6417
- // Decide if the popper will be fixed
6418
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
6419
- var isParentFixed = isFixed(reference, container);
6420
- return isParentFixed ? 'fixed' : 'absolute';
6421
- };
6422
-
6462
+ */
6463
+ Popper.prototype._getPosition = function (popper, reference) {
6464
+ var container = getOffsetParent(reference);
6465
+
6466
+ if (this._options.forceAbsolute) {
6467
+ return 'absolute';
6468
+ }
6469
+
6470
+ // Decide if the popper will be fixed
6471
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
6472
+ var isParentFixed = isFixed(reference, container);
6473
+ return isParentFixed ? 'fixed' : 'absolute';
6474
+ };
6475
+
6423
6476
  /**
6424
6477
  * Get offsets to the popper
6425
6478
  * @method
@@ -6428,93 +6481,112 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6428
6481
  * @param {Element} popper - the popper element
6429
6482
  * @param {Element} reference - the reference element (the popper will be relative to this)
6430
6483
  * @returns {Object} An object containing the offsets which will be applied to the popper
6431
- */
6432
- Popper.prototype._getOffsets = function (popper, reference, placement) {
6433
- placement = placement.split('-')[0];
6434
- var popperOffsets = {};
6435
-
6436
- popperOffsets.position = this.state.position;
6437
- var isParentFixed = popperOffsets.position === 'fixed';
6438
-
6439
- //
6440
- // Get reference element position
6441
- //
6442
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
6443
-
6444
- //
6445
- // Get popper sizes
6446
- //
6447
- var popperRect = getOuterSizes(popper);
6448
-
6449
- //
6450
- // Compute offsets of popper
6451
- //
6452
-
6453
- // depending by the popper placement we have to compute its offsets slightly differently
6454
- if (['right', 'left'].indexOf(placement) !== -1) {
6455
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
6456
- if (placement === 'left') {
6457
- popperOffsets.left = referenceOffsets.left - popperRect.width;
6458
- } else {
6459
- popperOffsets.left = referenceOffsets.right;
6460
- }
6461
- } else {
6462
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
6463
- if (placement === 'top') {
6464
- popperOffsets.top = referenceOffsets.top - popperRect.height;
6465
- } else {
6466
- popperOffsets.top = referenceOffsets.bottom;
6467
- }
6468
- }
6469
-
6470
- // Add width and height to our offsets object
6471
- popperOffsets.width = popperRect.width;
6472
- popperOffsets.height = popperRect.height;
6473
-
6474
- return {
6475
- popper: popperOffsets,
6476
- reference: referenceOffsets
6477
- };
6478
- };
6479
-
6484
+ */
6485
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
6486
+ placement = placement.split('-')[0];
6487
+ var popperOffsets = {};
6488
+
6489
+ popperOffsets.position = this.state.position;
6490
+ var isParentFixed = popperOffsets.position === 'fixed';
6491
+
6492
+ //
6493
+ // Get reference element position
6494
+ //
6495
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(
6496
+ reference,
6497
+ getOffsetParent(popper),
6498
+ isParentFixed
6499
+ );
6500
+
6501
+ //
6502
+ // Get popper sizes
6503
+ //
6504
+ var popperRect = getOuterSizes(popper);
6505
+
6506
+ //
6507
+ // Compute offsets of popper
6508
+ //
6509
+
6510
+ // depending by the popper placement we have to compute its offsets slightly differently
6511
+ if (['right', 'left'].indexOf(placement) !== -1) {
6512
+ popperOffsets.top =
6513
+ referenceOffsets.top +
6514
+ referenceOffsets.height / 2 -
6515
+ popperRect.height / 2;
6516
+ if (placement === 'left') {
6517
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
6518
+ } else {
6519
+ popperOffsets.left = referenceOffsets.right;
6520
+ }
6521
+ } else {
6522
+ popperOffsets.left =
6523
+ referenceOffsets.left +
6524
+ referenceOffsets.width / 2 -
6525
+ popperRect.width / 2;
6526
+ if (placement === 'top') {
6527
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
6528
+ } else {
6529
+ popperOffsets.top = referenceOffsets.bottom;
6530
+ }
6531
+ }
6532
+
6533
+ // Add width and height to our offsets object
6534
+ popperOffsets.width = popperRect.width;
6535
+ popperOffsets.height = popperRect.height;
6536
+
6537
+ return {
6538
+ popper: popperOffsets,
6539
+ reference: referenceOffsets
6540
+ };
6541
+ };
6542
+
6480
6543
  /**
6481
6544
  * Setup needed event listeners used to update the popper position
6482
6545
  * @method
6483
6546
  * @memberof Popper
6484
6547
  * @access private
6485
- */
6486
- Popper.prototype._setupEventListeners = function () {
6487
- // NOTE: 1 DOM access here
6488
- this.state.updateBound = this.update.bind(this);
6489
- root.addEventListener('resize', this.state.updateBound);
6490
- // if the boundariesElement is window we don't need to listen for the scroll event
6491
- if (this._options.boundariesElement !== 'window') {
6492
- var target = getScrollParent(this._reference);
6493
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
6494
- if (target === root.document.body || target === root.document.documentElement) {
6495
- target = root;
6496
- }
6497
- target.addEventListener('scroll', this.state.updateBound);
6498
- this.state.scrollTarget = target;
6499
- }
6500
- };
6501
-
6548
+ */
6549
+ Popper.prototype._setupEventListeners = function () {
6550
+ // NOTE: 1 DOM access here
6551
+ this.state.updateBound = this.update.bind(this);
6552
+ root.addEventListener('resize', this.state.updateBound);
6553
+ // if the boundariesElement is window we don't need to listen for the scroll event
6554
+ if (this._options.boundariesElement !== 'window') {
6555
+ var target = getScrollParent(this._reference);
6556
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
6557
+ if (
6558
+ target === root.document.body ||
6559
+ target === root.document.documentElement
6560
+ ) {
6561
+ target = root;
6562
+ }
6563
+ target.addEventListener('scroll', this.state.updateBound);
6564
+ this.state.scrollTarget = target;
6565
+ }
6566
+ };
6567
+
6502
6568
  /**
6503
6569
  * Remove event listeners used to update the popper position
6504
6570
  * @method
6505
6571
  * @memberof Popper
6506
6572
  * @access private
6507
- */
6508
- Popper.prototype._removeEventListeners = function () {
6509
- // NOTE: 1 DOM access here
6510
- root.removeEventListener('resize', this.state.updateBound);
6511
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
6512
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
6513
- this.state.scrollTarget = null;
6514
- }
6515
- this.state.updateBound = null;
6516
- };
6517
-
6573
+ */
6574
+ Popper.prototype._removeEventListeners = function () {
6575
+ // NOTE: 1 DOM access here
6576
+ root.removeEventListener('resize', this.state.updateBound);
6577
+ if (
6578
+ this._options.boundariesElement !== 'window' &&
6579
+ this.state.scrollTarget
6580
+ ) {
6581
+ this.state.scrollTarget.removeEventListener(
6582
+ 'scroll',
6583
+ this.state.updateBound
6584
+ );
6585
+ this.state.scrollTarget = null;
6586
+ }
6587
+ this.state.updateBound = null;
6588
+ };
6589
+
6518
6590
  /**
6519
6591
  * Computed the boundaries limits and return them
6520
6592
  * @method
@@ -6524,66 +6596,98 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6524
6596
  * @param {Number} padding - Boundaries padding
6525
6597
  * @param {Element} boundariesElement - Element used to define the boundaries
6526
6598
  * @returns {Object} Coordinates of the boundaries
6527
- */
6528
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
6529
- // NOTE: 1 DOM access here
6530
- var boundaries = {};
6531
- var width, height;
6532
- if (boundariesElement === 'window') {
6533
- var body = root.document.body,
6534
- html = root.document.documentElement;
6535
-
6536
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
6537
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
6538
-
6539
- boundaries = {
6540
- top: 0,
6541
- right: width,
6542
- bottom: height,
6543
- left: 0
6544
- };
6545
- } else if (boundariesElement === 'viewport') {
6546
- var offsetParent = getOffsetParent(this._popper);
6547
- var scrollParent = getScrollParent(this._popper);
6548
- var offsetParentRect = getOffsetRect(offsetParent);
6549
-
6550
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
6551
- var getScrollTopValue = function getScrollTopValue(element) {
6552
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
6553
- };
6554
- var getScrollLeftValue = function getScrollLeftValue(element) {
6555
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
6556
- };
6557
-
6558
- // if the popper is fixed we don't have to substract scrolling from the boundaries
6559
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
6560
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
6561
-
6562
- boundaries = {
6563
- top: 0 - (offsetParentRect.top - scrollTop),
6564
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
6565
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
6566
- left: 0 - (offsetParentRect.left - scrollLeft)
6567
- };
6568
- } else {
6569
- if (getOffsetParent(this._popper) === boundariesElement) {
6570
- boundaries = {
6571
- top: 0,
6572
- left: 0,
6573
- right: boundariesElement.clientWidth,
6574
- bottom: boundariesElement.clientHeight
6575
- };
6576
- } else {
6577
- boundaries = getOffsetRect(boundariesElement);
6578
- }
6579
- }
6580
- boundaries.left += padding;
6581
- boundaries.right -= padding;
6582
- boundaries.top = boundaries.top + padding;
6583
- boundaries.bottom = boundaries.bottom - padding;
6584
- return boundaries;
6585
- };
6586
-
6599
+ */
6600
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
6601
+ // NOTE: 1 DOM access here
6602
+ var boundaries = {};
6603
+ var width, height;
6604
+ if (boundariesElement === 'window') {
6605
+ var body = root.document.body,
6606
+ html = root.document.documentElement;
6607
+
6608
+ height = Math.max(
6609
+ body.scrollHeight,
6610
+ body.offsetHeight,
6611
+ html.clientHeight,
6612
+ html.scrollHeight,
6613
+ html.offsetHeight
6614
+ );
6615
+ width = Math.max(
6616
+ body.scrollWidth,
6617
+ body.offsetWidth,
6618
+ html.clientWidth,
6619
+ html.scrollWidth,
6620
+ html.offsetWidth
6621
+ );
6622
+
6623
+ boundaries = {
6624
+ top: 0,
6625
+ right: width,
6626
+ bottom: height,
6627
+ left: 0
6628
+ };
6629
+ } else if (boundariesElement === 'viewport') {
6630
+ var offsetParent = getOffsetParent(this._popper);
6631
+ var scrollParent = getScrollParent(this._popper);
6632
+ var offsetParentRect = getOffsetRect(offsetParent);
6633
+
6634
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
6635
+ var getScrollTopValue = function (element) {
6636
+ return element == document.body
6637
+ ? Math.max(
6638
+ document.documentElement.scrollTop,
6639
+ document.body.scrollTop
6640
+ )
6641
+ : element.scrollTop;
6642
+ };
6643
+ var getScrollLeftValue = function (element) {
6644
+ return element == document.body
6645
+ ? Math.max(
6646
+ document.documentElement.scrollLeft,
6647
+ document.body.scrollLeft
6648
+ )
6649
+ : element.scrollLeft;
6650
+ };
6651
+
6652
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
6653
+ var scrollTop =
6654
+ data.offsets.popper.position === 'fixed'
6655
+ ? 0
6656
+ : getScrollTopValue(scrollParent);
6657
+ var scrollLeft =
6658
+ data.offsets.popper.position === 'fixed'
6659
+ ? 0
6660
+ : getScrollLeftValue(scrollParent);
6661
+
6662
+ boundaries = {
6663
+ top: 0 - (offsetParentRect.top - scrollTop),
6664
+ right:
6665
+ root.document.documentElement.clientWidth -
6666
+ (offsetParentRect.left - scrollLeft),
6667
+ bottom:
6668
+ root.document.documentElement.clientHeight -
6669
+ (offsetParentRect.top - scrollTop),
6670
+ left: 0 - (offsetParentRect.left - scrollLeft)
6671
+ };
6672
+ } else {
6673
+ if (getOffsetParent(this._popper) === boundariesElement) {
6674
+ boundaries = {
6675
+ top: 0,
6676
+ left: 0,
6677
+ right: boundariesElement.clientWidth,
6678
+ bottom: boundariesElement.clientHeight
6679
+ };
6680
+ } else {
6681
+ boundaries = getOffsetRect(boundariesElement);
6682
+ }
6683
+ }
6684
+ boundaries.left += padding;
6685
+ boundaries.right -= padding;
6686
+ boundaries.top = boundaries.top + padding;
6687
+ boundaries.bottom = boundaries.bottom - padding;
6688
+ return boundaries;
6689
+ };
6690
+
6587
6691
  /**
6588
6692
  * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
6589
6693
  * @method
@@ -6592,22 +6696,27 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6592
6696
  * @param {Object} data
6593
6697
  * @param {Array} modifiers
6594
6698
  * @param {Function} ends
6595
- */
6596
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
6597
- var modifiersToRun = modifiers.slice();
6598
- if (ends !== undefined) {
6599
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
6600
- }
6601
-
6602
- modifiersToRun.forEach(function (modifier) {
6603
- if (isFunction(modifier)) {
6604
- data = modifier.call(this, data);
6605
- }
6606
- }.bind(this));
6607
-
6608
- return data;
6609
- };
6610
-
6699
+ */
6700
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
6701
+ var modifiersToRun = modifiers.slice();
6702
+ if (ends !== undefined) {
6703
+ modifiersToRun = this._options.modifiers.slice(
6704
+ 0,
6705
+ getArrayKeyIndex(this._options.modifiers, ends)
6706
+ );
6707
+ }
6708
+
6709
+ modifiersToRun.forEach(
6710
+ function (modifier) {
6711
+ if (isFunction(modifier)) {
6712
+ data = modifier.call(this, data);
6713
+ }
6714
+ }.bind(this)
6715
+ );
6716
+
6717
+ return data;
6718
+ };
6719
+
6611
6720
  /**
6612
6721
  * Helper used to know if the given modifier depends from another one.
6613
6722
  * @method
@@ -6615,191 +6724,204 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6615
6724
  * @param {String} requesting - name of requesting modifier
6616
6725
  * @param {String} requested - name of requested modifier
6617
6726
  * @returns {Boolean}
6618
- */
6619
- Popper.prototype.isModifierRequired = function (requesting, requested) {
6620
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
6621
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
6622
- return modifier === requested;
6623
- }).length;
6624
- };
6625
-
6626
- //
6627
- // Modifiers
6628
- //
6629
-
6727
+ */
6728
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
6729
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
6730
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
6731
+ return modifier === requested;
6732
+ }).length;
6733
+ };
6734
+
6735
+ //
6736
+ // Modifiers
6737
+ //
6738
+
6630
6739
  /**
6631
6740
  * Modifiers list
6632
6741
  * @namespace Popper.modifiers
6633
6742
  * @memberof Popper
6634
6743
  * @type {Object}
6635
- */
6636
- Popper.prototype.modifiers = {};
6637
-
6744
+ */
6745
+ Popper.prototype.modifiers = {};
6746
+
6638
6747
  /**
6639
6748
  * Apply the computed styles to the popper element
6640
6749
  * @method
6641
6750
  * @memberof Popper.modifiers
6642
6751
  * @argument {Object} data - The data object generated by `update` method
6643
6752
  * @returns {Object} The same data object
6644
- */
6645
- Popper.prototype.modifiers.applyStyle = function (data) {
6646
- // apply the final offsets to the popper
6647
- // NOTE: 1 DOM access here
6648
- var styles = {
6649
- position: data.offsets.popper.position
6650
- };
6651
-
6652
- // round top and left to avoid blurry text
6653
- var left = Math.round(data.offsets.popper.left);
6654
- var top = Math.round(data.offsets.popper.top);
6655
-
6656
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
6657
- // we automatically use the supported prefixed version if needed
6658
- var prefixedProperty;
6659
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
6660
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
6661
- styles.top = 0;
6662
- styles.left = 0;
6663
- }
6664
- // othwerise, we use the standard `left` and `top` properties
6665
- else {
6666
- styles.left = left;
6667
- styles.top = top;
6668
- }
6669
-
6670
- // any property present in `data.styles` will be applied to the popper,
6671
- // in this way we can make the 3rd party modifiers add custom styles to it
6672
- // Be aware, modifiers could override the properties defined in the previous
6673
- // lines of this modifier!
6674
- Object.assign(styles, data.styles);
6675
-
6676
- setStyle(this._popper, styles);
6677
-
6678
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
6679
- // NOTE: 1 DOM access here
6680
- this._popper.setAttribute('x-placement', data.placement);
6681
-
6682
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
6683
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
6684
- setStyle(data.arrowElement, data.offsets.arrow);
6685
- }
6686
-
6687
- return data;
6688
- };
6689
-
6753
+ */
6754
+ Popper.prototype.modifiers.applyStyle = function (data) {
6755
+ // apply the final offsets to the popper
6756
+ // NOTE: 1 DOM access here
6757
+ var styles = {
6758
+ position: data.offsets.popper.position
6759
+ };
6760
+
6761
+ // round top and left to avoid blurry text
6762
+ var left = Math.round(data.offsets.popper.left);
6763
+ var top = Math.round(data.offsets.popper.top);
6764
+
6765
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
6766
+ // we automatically use the supported prefixed version if needed
6767
+ var prefixedProperty;
6768
+ if (
6769
+ this._options.gpuAcceleration &&
6770
+ (prefixedProperty = getSupportedPropertyName('transform'))
6771
+ ) {
6772
+ styles[prefixedProperty] =
6773
+ 'translate3d(' + left + 'px, ' + top + 'px, 0)';
6774
+ styles.top = 0;
6775
+ styles.left = 0;
6776
+ }
6777
+ // othwerise, we use the standard `left` and `top` properties
6778
+ else {
6779
+ styles.left = left;
6780
+ styles.top = top;
6781
+ }
6782
+
6783
+ // any property present in `data.styles` will be applied to the popper,
6784
+ // in this way we can make the 3rd party modifiers add custom styles to it
6785
+ // Be aware, modifiers could override the properties defined in the previous
6786
+ // lines of this modifier!
6787
+ Object.assign(styles, data.styles);
6788
+
6789
+ setStyle(this._popper, styles);
6790
+
6791
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
6792
+ // NOTE: 1 DOM access here
6793
+ this._popper.setAttribute('x-placement', data.placement);
6794
+
6795
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
6796
+ if (
6797
+ this.isModifierRequired(
6798
+ this.modifiers.applyStyle,
6799
+ this.modifiers.arrow
6800
+ ) &&
6801
+ data.offsets.arrow
6802
+ ) {
6803
+ setStyle(data.arrowElement, data.offsets.arrow);
6804
+ }
6805
+
6806
+ return data;
6807
+ };
6808
+
6690
6809
  /**
6691
6810
  * Modifier used to shift the popper on the start or end of its reference element side
6692
6811
  * @method
6693
6812
  * @memberof Popper.modifiers
6694
6813
  * @argument {Object} data - The data object generated by `update` method
6695
6814
  * @returns {Object} The data object, properly modified
6696
- */
6697
- Popper.prototype.modifiers.shift = function (data) {
6698
- var placement = data.placement;
6699
- var basePlacement = placement.split('-')[0];
6700
- var shiftVariation = placement.split('-')[1];
6701
-
6702
- // if shift shiftVariation is specified, run the modifier
6703
- if (shiftVariation) {
6704
- var reference = data.offsets.reference;
6705
- var popper = getPopperClientRect(data.offsets.popper);
6706
-
6707
- var shiftOffsets = {
6708
- y: {
6709
- start: { top: reference.top },
6710
- end: { top: reference.top + reference.height - popper.height }
6711
- },
6712
- x: {
6713
- start: { left: reference.left },
6714
- end: { left: reference.left + reference.width - popper.width }
6715
- }
6716
- };
6717
-
6718
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
6719
-
6720
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
6721
- }
6722
-
6723
- return data;
6724
- };
6725
-
6815
+ */
6816
+ Popper.prototype.modifiers.shift = function (data) {
6817
+ var placement = data.placement;
6818
+ var basePlacement = placement.split('-')[0];
6819
+ var shiftVariation = placement.split('-')[1];
6820
+
6821
+ // if shift shiftVariation is specified, run the modifier
6822
+ if (shiftVariation) {
6823
+ var reference = data.offsets.reference;
6824
+ var popper = getPopperClientRect(data.offsets.popper);
6825
+
6826
+ var shiftOffsets = {
6827
+ y: {
6828
+ start: { top: reference.top },
6829
+ end: { top: reference.top + reference.height - popper.height }
6830
+ },
6831
+ x: {
6832
+ start: { left: reference.left },
6833
+ end: { left: reference.left + reference.width - popper.width }
6834
+ }
6835
+ };
6836
+
6837
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
6838
+
6839
+ data.offsets.popper = Object.assign(
6840
+ popper,
6841
+ shiftOffsets[axis][shiftVariation]
6842
+ );
6843
+ }
6844
+
6845
+ return data;
6846
+ };
6847
+
6726
6848
  /**
6727
6849
  * Modifier used to make sure the popper does not overflows from it's boundaries
6728
6850
  * @method
6729
6851
  * @memberof Popper.modifiers
6730
6852
  * @argument {Object} data - The data object generated by `update` method
6731
6853
  * @returns {Object} The data object, properly modified
6732
- */
6733
- Popper.prototype.modifiers.preventOverflow = function (data) {
6734
- var order = this._options.preventOverflowOrder;
6735
- var popper = getPopperClientRect(data.offsets.popper);
6736
-
6737
- var check = {
6738
- left: function left() {
6739
- var left = popper.left;
6740
- if (popper.left < data.boundaries.left) {
6741
- left = Math.max(popper.left, data.boundaries.left);
6742
- }
6743
- return { left: left };
6744
- },
6745
- right: function right() {
6746
- var left = popper.left;
6747
- if (popper.right > data.boundaries.right) {
6748
- left = Math.min(popper.left, data.boundaries.right - popper.width);
6749
- }
6750
- return { left: left };
6751
- },
6752
- top: function top() {
6753
- var top = popper.top;
6754
- if (popper.top < data.boundaries.top) {
6755
- top = Math.max(popper.top, data.boundaries.top);
6756
- }
6757
- return { top: top };
6758
- },
6759
- bottom: function bottom() {
6760
- var top = popper.top;
6761
- if (popper.bottom > data.boundaries.bottom) {
6762
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
6763
- }
6764
- return { top: top };
6765
- }
6766
- };
6767
-
6768
- order.forEach(function (direction) {
6769
- data.offsets.popper = Object.assign(popper, check[direction]());
6770
- });
6771
-
6772
- return data;
6773
- };
6774
-
6854
+ */
6855
+ Popper.prototype.modifiers.preventOverflow = function (data) {
6856
+ var order = this._options.preventOverflowOrder;
6857
+ var popper = getPopperClientRect(data.offsets.popper);
6858
+
6859
+ var check = {
6860
+ left: function () {
6861
+ var left = popper.left;
6862
+ if (popper.left < data.boundaries.left) {
6863
+ left = Math.max(popper.left, data.boundaries.left);
6864
+ }
6865
+ return { left: left };
6866
+ },
6867
+ right: function () {
6868
+ var left = popper.left;
6869
+ if (popper.right > data.boundaries.right) {
6870
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
6871
+ }
6872
+ return { left: left };
6873
+ },
6874
+ top: function () {
6875
+ var top = popper.top;
6876
+ if (popper.top < data.boundaries.top) {
6877
+ top = Math.max(popper.top, data.boundaries.top);
6878
+ }
6879
+ return { top: top };
6880
+ },
6881
+ bottom: function () {
6882
+ var top = popper.top;
6883
+ if (popper.bottom > data.boundaries.bottom) {
6884
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
6885
+ }
6886
+ return { top: top };
6887
+ }
6888
+ };
6889
+
6890
+ order.forEach(function (direction) {
6891
+ data.offsets.popper = Object.assign(popper, check[direction]());
6892
+ });
6893
+
6894
+ return data;
6895
+ };
6896
+
6775
6897
  /**
6776
6898
  * Modifier used to make sure the popper is always near its reference
6777
6899
  * @method
6778
6900
  * @memberof Popper.modifiers
6779
6901
  * @argument {Object} data - The data object generated by _update method
6780
6902
  * @returns {Object} The data object, properly modified
6781
- */
6782
- Popper.prototype.modifiers.keepTogether = function (data) {
6783
- var popper = getPopperClientRect(data.offsets.popper);
6784
- var reference = data.offsets.reference;
6785
- var f = Math.floor;
6786
-
6787
- if (popper.right < f(reference.left)) {
6788
- data.offsets.popper.left = f(reference.left) - popper.width;
6789
- }
6790
- if (popper.left > f(reference.right)) {
6791
- data.offsets.popper.left = f(reference.right);
6792
- }
6793
- if (popper.bottom < f(reference.top)) {
6794
- data.offsets.popper.top = f(reference.top) - popper.height;
6795
- }
6796
- if (popper.top > f(reference.bottom)) {
6797
- data.offsets.popper.top = f(reference.bottom);
6798
- }
6799
-
6800
- return data;
6801
- };
6802
-
6903
+ */
6904
+ Popper.prototype.modifiers.keepTogether = function (data) {
6905
+ var popper = getPopperClientRect(data.offsets.popper);
6906
+ var reference = data.offsets.reference;
6907
+ var f = Math.floor;
6908
+
6909
+ if (popper.right < f(reference.left)) {
6910
+ data.offsets.popper.left = f(reference.left) - popper.width;
6911
+ }
6912
+ if (popper.left > f(reference.right)) {
6913
+ data.offsets.popper.left = f(reference.right);
6914
+ }
6915
+ if (popper.bottom < f(reference.top)) {
6916
+ data.offsets.popper.top = f(reference.top) - popper.height;
6917
+ }
6918
+ if (popper.top > f(reference.bottom)) {
6919
+ data.offsets.popper.top = f(reference.bottom);
6920
+ }
6921
+
6922
+ return data;
6923
+ };
6924
+
6803
6925
  /**
6804
6926
  * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
6805
6927
  * Requires the `preventOverflow` modifier before it in order to work.
@@ -6808,61 +6930,81 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6808
6930
  * @memberof Popper.modifiers
6809
6931
  * @argument {Object} data - The data object generated by _update method
6810
6932
  * @returns {Object} The data object, properly modified
6811
- */
6812
- Popper.prototype.modifiers.flip = function (data) {
6813
- // check if preventOverflow is in the list of modifiers before the flip modifier.
6814
- // otherwise flip would not work as expected.
6815
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
6816
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
6817
- return data;
6818
- }
6819
-
6820
- if (data.flipped && data.placement === data._originalPlacement) {
6821
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
6822
- return data;
6823
- }
6824
-
6825
- var placement = data.placement.split('-')[0];
6826
- var placementOpposite = getOppositePlacement(placement);
6827
- var variation = data.placement.split('-')[1] || '';
6828
-
6829
- var flipOrder = [];
6830
- if (this._options.flipBehavior === 'flip') {
6831
- flipOrder = [placement, placementOpposite];
6832
- } else {
6833
- flipOrder = this._options.flipBehavior;
6834
- }
6835
-
6836
- flipOrder.forEach(function (step, index) {
6837
- if (placement !== step || flipOrder.length === index + 1) {
6838
- return;
6839
- }
6840
-
6841
- placement = data.placement.split('-')[0];
6842
- placementOpposite = getOppositePlacement(placement);
6843
-
6844
- var popperOffsets = getPopperClientRect(data.offsets.popper);
6845
-
6846
- // this boolean is used to distinguish right and bottom from top and left
6847
- // they need different computations to get flipped
6848
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
6849
-
6850
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
6851
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
6852
- // we'll use this boolean to detect any flip loop
6853
- data.flipped = true;
6854
- data.placement = flipOrder[index + 1];
6855
- if (variation) {
6856
- data.placement += '-' + variation;
6857
- }
6858
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
6859
-
6860
- data = this.runModifiers(data, this._options.modifiers, this._flip);
6861
- }
6862
- }.bind(this));
6863
- return data;
6864
- };
6865
-
6933
+ */
6934
+ Popper.prototype.modifiers.flip = function (data) {
6935
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
6936
+ // otherwise flip would not work as expected.
6937
+ if (
6938
+ !this.isModifierRequired(
6939
+ this.modifiers.flip,
6940
+ this.modifiers.preventOverflow
6941
+ )
6942
+ ) {
6943
+ console.warn(
6944
+ 'WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!'
6945
+ );
6946
+ return data;
6947
+ }
6948
+
6949
+ if (data.flipped && data.placement === data._originalPlacement) {
6950
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
6951
+ return data;
6952
+ }
6953
+
6954
+ var placement = data.placement.split('-')[0];
6955
+ var placementOpposite = getOppositePlacement(placement);
6956
+ var variation = data.placement.split('-')[1] || '';
6957
+
6958
+ var flipOrder = [];
6959
+ if (this._options.flipBehavior === 'flip') {
6960
+ flipOrder = [placement, placementOpposite];
6961
+ } else {
6962
+ flipOrder = this._options.flipBehavior;
6963
+ }
6964
+
6965
+ flipOrder.forEach(
6966
+ function (step, index) {
6967
+ if (placement !== step || flipOrder.length === index + 1) {
6968
+ return;
6969
+ }
6970
+
6971
+ placement = data.placement.split('-')[0];
6972
+ placementOpposite = getOppositePlacement(placement);
6973
+
6974
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
6975
+
6976
+ // this boolean is used to distinguish right and bottom from top and left
6977
+ // they need different computations to get flipped
6978
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
6979
+
6980
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
6981
+ if (
6982
+ (a &&
6983
+ Math.floor(data.offsets.reference[placement]) >
6984
+ Math.floor(popperOffsets[placementOpposite])) ||
6985
+ (!a &&
6986
+ Math.floor(data.offsets.reference[placement]) <
6987
+ Math.floor(popperOffsets[placementOpposite]))
6988
+ ) {
6989
+ // we'll use this boolean to detect any flip loop
6990
+ data.flipped = true;
6991
+ data.placement = flipOrder[index + 1];
6992
+ if (variation) {
6993
+ data.placement += '-' + variation;
6994
+ }
6995
+ data.offsets.popper = this._getOffsets(
6996
+ this._popper,
6997
+ this._reference,
6998
+ data.placement
6999
+ ).popper;
7000
+
7001
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
7002
+ }
7003
+ }.bind(this)
7004
+ );
7005
+ return data;
7006
+ };
7007
+
6866
7008
  /**
6867
7009
  * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
6868
7010
  * The offsets will shift the popper on the side of its reference element.
@@ -6870,23 +7012,23 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6870
7012
  * @memberof Popper.modifiers
6871
7013
  * @argument {Object} data - The data object generated by _update method
6872
7014
  * @returns {Object} The data object, properly modified
6873
- */
6874
- Popper.prototype.modifiers.offset = function (data) {
6875
- var offset = this._options.offset;
6876
- var popper = data.offsets.popper;
6877
-
6878
- if (data.placement.indexOf('left') !== -1) {
6879
- popper.top -= offset;
6880
- } else if (data.placement.indexOf('right') !== -1) {
6881
- popper.top += offset;
6882
- } else if (data.placement.indexOf('top') !== -1) {
6883
- popper.left -= offset;
6884
- } else if (data.placement.indexOf('bottom') !== -1) {
6885
- popper.left += offset;
6886
- }
6887
- return data;
6888
- };
6889
-
7015
+ */
7016
+ Popper.prototype.modifiers.offset = function (data) {
7017
+ var offset = this._options.offset;
7018
+ var popper = data.offsets.popper;
7019
+
7020
+ if (data.placement.indexOf('left') !== -1) {
7021
+ popper.top -= offset;
7022
+ } else if (data.placement.indexOf('right') !== -1) {
7023
+ popper.top += offset;
7024
+ } else if (data.placement.indexOf('top') !== -1) {
7025
+ popper.left -= offset;
7026
+ } else if (data.placement.indexOf('bottom') !== -1) {
7027
+ popper.left += offset;
7028
+ }
7029
+ return data;
7030
+ };
7031
+
6890
7032
  /**
6891
7033
  * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
6892
7034
  * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
@@ -6894,136 +7036,147 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
6894
7036
  * @memberof Popper.modifiers
6895
7037
  * @argument {Object} data - The data object generated by _update method
6896
7038
  * @returns {Object} The data object, properly modified
6897
- */
6898
- Popper.prototype.modifiers.arrow = function (data) {
6899
- var arrow = this._options.arrowElement;
6900
- var arrowOffset = this._options.arrowOffset;
6901
-
6902
- // if the arrowElement is a string, suppose it's a CSS selector
6903
- if (typeof arrow === 'string') {
6904
- arrow = this._popper.querySelector(arrow);
6905
- }
6906
-
6907
- // if arrow element is not found, don't run the modifier
6908
- if (!arrow) {
6909
- return data;
6910
- }
6911
-
6912
- // the arrow element must be child of its popper
6913
- if (!this._popper.contains(arrow)) {
6914
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
6915
- return data;
6916
- }
6917
-
6918
- // arrow depends on keepTogether in order to work
6919
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
6920
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
6921
- return data;
6922
- }
6923
-
6924
- var arrowStyle = {};
6925
- var placement = data.placement.split('-')[0];
6926
- var popper = getPopperClientRect(data.offsets.popper);
6927
- var reference = data.offsets.reference;
6928
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
6929
-
6930
- var len = isVertical ? 'height' : 'width';
6931
- var side = isVertical ? 'top' : 'left';
6932
- var translate = isVertical ? 'translateY' : 'translateX';
6933
- var altSide = isVertical ? 'left' : 'top';
6934
- var opSide = isVertical ? 'bottom' : 'right';
6935
- var arrowSize = getOuterSizes(arrow)[len];
6936
-
6937
- //
6938
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
6939
- //
6940
-
6941
- // top/left side
6942
- if (reference[opSide] - arrowSize < popper[side]) {
6943
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
6944
- }
6945
- // bottom/right side
6946
- if (reference[side] + arrowSize > popper[opSide]) {
6947
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
6948
- }
6949
-
6950
- // compute center of the popper
6951
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
6952
-
6953
- var sideValue = center - popper[side];
6954
-
6955
- // prevent arrow from being placed not contiguously to its popper
6956
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
6957
- arrowStyle[side] = sideValue;
6958
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
6959
-
6960
- data.offsets.arrow = arrowStyle;
6961
- data.arrowElement = arrow;
6962
-
6963
- return data;
6964
- };
6965
-
6966
- //
6967
- // Helpers
6968
- //
6969
-
7039
+ */
7040
+ Popper.prototype.modifiers.arrow = function (data) {
7041
+ var arrow = this._options.arrowElement;
7042
+ var arrowOffset = this._options.arrowOffset;
7043
+
7044
+ // if the arrowElement is a string, suppose it's a CSS selector
7045
+ if (typeof arrow === 'string') {
7046
+ arrow = this._popper.querySelector(arrow);
7047
+ }
7048
+
7049
+ // if arrow element is not found, don't run the modifier
7050
+ if (!arrow) {
7051
+ return data;
7052
+ }
7053
+
7054
+ // the arrow element must be child of its popper
7055
+ if (!this._popper.contains(arrow)) {
7056
+ console.warn(
7057
+ 'WARNING: `arrowElement` must be child of its popper element!'
7058
+ );
7059
+ return data;
7060
+ }
7061
+
7062
+ // arrow depends on keepTogether in order to work
7063
+ if (
7064
+ !this.isModifierRequired(
7065
+ this.modifiers.arrow,
7066
+ this.modifiers.keepTogether
7067
+ )
7068
+ ) {
7069
+ console.warn(
7070
+ 'WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!'
7071
+ );
7072
+ return data;
7073
+ }
7074
+
7075
+ var arrowStyle = {};
7076
+ var placement = data.placement.split('-')[0];
7077
+ var popper = getPopperClientRect(data.offsets.popper);
7078
+ var reference = data.offsets.reference;
7079
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
7080
+
7081
+ var len = isVertical ? 'height' : 'width';
7082
+ var side = isVertical ? 'top' : 'left';
7083
+ var translate = isVertical ? 'translateY' : 'translateX';
7084
+ var altSide = isVertical ? 'left' : 'top';
7085
+ var opSide = isVertical ? 'bottom' : 'right';
7086
+ var arrowSize = getOuterSizes(arrow)[len];
7087
+
7088
+ //
7089
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
7090
+ //
7091
+
7092
+ // top/left side
7093
+ if (reference[opSide] - arrowSize < popper[side]) {
7094
+ data.offsets.popper[side] -=
7095
+ popper[side] - (reference[opSide] - arrowSize);
7096
+ }
7097
+ // bottom/right side
7098
+ if (reference[side] + arrowSize > popper[opSide]) {
7099
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
7100
+ }
7101
+
7102
+ // compute center of the popper
7103
+ var center =
7104
+ reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
7105
+
7106
+ var sideValue = center - popper[side];
7107
+
7108
+ // prevent arrow from being placed not contiguously to its popper
7109
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
7110
+ arrowStyle[side] = sideValue;
7111
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
7112
+
7113
+ data.offsets.arrow = arrowStyle;
7114
+ data.arrowElement = arrow;
7115
+
7116
+ return data;
7117
+ };
7118
+
7119
+ //
7120
+ // Helpers
7121
+ //
7122
+
6970
7123
  /**
6971
7124
  * Get the outer sizes of the given element (offset size + margins)
6972
7125
  * @function
6973
7126
  * @ignore
6974
7127
  * @argument {Element} element
6975
7128
  * @returns {Object} object containing width and height properties
6976
- */
6977
- function getOuterSizes(element) {
6978
- // NOTE: 1 DOM access here
6979
- var _display = element.style.display,
6980
- _visibility = element.style.visibility;
6981
- element.style.display = 'block';
6982
- element.style.visibility = 'hidden';
6983
- var calcWidthToForceRepaint = element.offsetWidth;
6984
- // original method
6985
- var styles = root.getComputedStyle(element);
6986
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
6987
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
6988
- var result = {
6989
- width: element.offsetWidth + y,
6990
- height: element.offsetHeight + x
6991
- };
6992
-
6993
- // reset element styles
6994
- element.style.display = _display;
6995
- element.style.visibility = _visibility;
6996
- return result;
6997
- }
6998
-
7129
+ */
7130
+ function getOuterSizes(element) {
7131
+ // NOTE: 1 DOM access here
7132
+ var _display = element.style.display,
7133
+ _visibility = element.style.visibility;
7134
+ element.style.display = 'block';
7135
+ element.style.visibility = 'hidden';
7136
+ var calcWidthToForceRepaint = element.offsetWidth;
7137
+ // original method
7138
+ var styles = root.getComputedStyle(element);
7139
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
7140
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
7141
+ var result = {
7142
+ width: element.offsetWidth + y,
7143
+ height: element.offsetHeight + x
7144
+ };
7145
+
7146
+ // reset element styles
7147
+ element.style.display = _display;
7148
+ element.style.visibility = _visibility;
7149
+ return result;
7150
+ }
7151
+
6999
7152
  /**
7000
7153
  * Get the opposite placement of the given one/
7001
7154
  * @function
7002
7155
  * @ignore
7003
7156
  * @argument {String} placement
7004
7157
  * @returns {String} flipped placement
7005
- */
7006
- function getOppositePlacement(placement) {
7007
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
7008
- return placement.replace(/left|right|bottom|top/g, function (matched) {
7009
- return hash[matched];
7010
- });
7011
- }
7012
-
7158
+ */
7159
+ function getOppositePlacement(placement) {
7160
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
7161
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
7162
+ return hash[matched];
7163
+ });
7164
+ }
7165
+
7013
7166
  /**
7014
7167
  * Given the popper offsets, generate an output similar to getBoundingClientRect
7015
7168
  * @function
7016
7169
  * @ignore
7017
7170
  * @argument {Object} popperOffsets
7018
7171
  * @returns {Object} ClientRect like output
7019
- */
7020
- function getPopperClientRect(popperOffsets) {
7021
- var offsets = Object.assign({}, popperOffsets);
7022
- offsets.right = offsets.left + offsets.width;
7023
- offsets.bottom = offsets.top + offsets.height;
7024
- return offsets;
7025
- }
7026
-
7172
+ */
7173
+ function getPopperClientRect(popperOffsets) {
7174
+ var offsets = Object.assign({}, popperOffsets);
7175
+ offsets.right = offsets.left + offsets.width;
7176
+ offsets.bottom = offsets.top + offsets.height;
7177
+ return offsets;
7178
+ }
7179
+
7027
7180
  /**
7028
7181
  * Given an array and the key to find, returns its index
7029
7182
  * @function
@@ -7031,76 +7184,88 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
7031
7184
  * @argument {Array} arr
7032
7185
  * @argument keyToFind
7033
7186
  * @returns index or null
7034
- */
7035
- function getArrayKeyIndex(arr, keyToFind) {
7036
- var i = 0,
7037
- key;
7038
- for (key in arr) {
7039
- if (arr[key] === keyToFind) {
7040
- return i;
7041
- }
7042
- i++;
7043
- }
7044
- return null;
7045
- }
7046
-
7187
+ */
7188
+ function getArrayKeyIndex(arr, keyToFind) {
7189
+ var i = 0,
7190
+ key;
7191
+ for (key in arr) {
7192
+ if (arr[key] === keyToFind) {
7193
+ return i;
7194
+ }
7195
+ i++;
7196
+ }
7197
+ return null;
7198
+ }
7199
+
7047
7200
  /**
7048
7201
  * Get CSS computed property of the given element
7049
7202
  * @function
7050
7203
  * @ignore
7051
7204
  * @argument {Eement} element
7052
7205
  * @argument {String} property
7053
- */
7054
- function getStyleComputedProperty(element, property) {
7055
- // NOTE: 1 DOM access here
7056
- var css = root.getComputedStyle(element, null);
7057
- return css[property];
7058
- }
7206
+ */
7207
+ function getStyleComputedProperty(element, property) {
7208
+ // NOTE: 1 DOM access here
7209
+ var css = root.getComputedStyle(element, null);
7210
+ return css[property];
7211
+ }
7059
7212
  /**
7060
7213
  * Returns the offset parent of the given element
7061
7214
  * @function
7062
7215
  * @ignore
7063
7216
  * @argument {Element} element
7064
7217
  * @returns {Element} offset parent
7065
- */
7066
- function getOffsetParent(element) {
7067
- var offsetParent = element.offsetParent;
7068
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
7069
- }
7070
-
7218
+ */
7219
+ function getOffsetParent(element) {
7220
+ var offsetParent = element.offsetParent;
7221
+ return offsetParent === root.document.body || !offsetParent
7222
+ ? root.document.documentElement
7223
+ : offsetParent;
7224
+ }
7225
+
7071
7226
  /**
7072
7227
  * Returns the scrolling parent of the given element
7073
7228
  * @function
7074
7229
  * @ignore
7075
7230
  * @argument {Element} element
7076
7231
  * @returns {Element} offset parent
7077
- */
7078
- function getScrollParent(element) {
7079
- var parent = element.parentNode;
7080
- if (!parent || parent.nodeType !== 1) {
7081
- return element;
7082
- }
7083
-
7084
- if (parent === root.document) {
7085
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
7086
- // greater than 0 and return the proper element
7087
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
7088
- return root.document.body;
7089
- } else {
7090
- return root.document.documentElement;
7091
- }
7092
- }
7093
-
7094
- // Firefox want us to check `-x` and `-y` variations as well
7095
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
7096
- // If the detected scrollParent is body, we perform an additional check on its parentNode
7097
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
7098
- // fixes issue #65
7099
- return parent;
7100
- }
7101
- return getScrollParent(element.parentNode);
7102
- }
7103
-
7232
+ */
7233
+ function getScrollParent(element) {
7234
+ var parent = element.parentNode;
7235
+ if (!parent || parent.nodeType !== 1) {
7236
+ return element;
7237
+ }
7238
+
7239
+ if (parent === root.document) {
7240
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
7241
+ // greater than 0 and return the proper element
7242
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
7243
+ return root.document.body;
7244
+ } else {
7245
+ return root.document.documentElement;
7246
+ }
7247
+ }
7248
+
7249
+ // Firefox want us to check `-x` and `-y` variations as well
7250
+ if (
7251
+ ['scroll', 'auto'].indexOf(
7252
+ getStyleComputedProperty(parent, 'overflow')
7253
+ ) !== -1 ||
7254
+ ['scroll', 'auto'].indexOf(
7255
+ getStyleComputedProperty(parent, 'overflow-x')
7256
+ ) !== -1 ||
7257
+ ['scroll', 'auto'].indexOf(
7258
+ getStyleComputedProperty(parent, 'overflow-y')
7259
+ ) !== -1
7260
+ ) {
7261
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
7262
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
7263
+ // fixes issue #65
7264
+ return parent;
7265
+ }
7266
+ return getScrollParent(element.parentNode);
7267
+ }
7268
+
7104
7269
  /**
7105
7270
  * Check if the given element is fixed or is inside a fixed parent
7106
7271
  * @function
@@ -7108,109 +7273,122 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
7108
7273
  * @argument {Element} element
7109
7274
  * @argument {Element} customContainer
7110
7275
  * @returns {Boolean} answer to "isFixed?"
7111
- */
7112
- function isFixed(element) {
7113
- if (element === root.document.body) {
7114
- return false;
7115
- }
7116
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
7117
- return true;
7118
- }
7119
- return element.parentNode && element.parentNode.nodeType === 1 ? isFixed(element.parentNode) : element;
7120
- }
7121
-
7276
+ */
7277
+ function isFixed(element) {
7278
+ if (element === root.document.body) {
7279
+ return false;
7280
+ }
7281
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
7282
+ return true;
7283
+ }
7284
+ return element.parentNode && element.parentNode.nodeType === 1
7285
+ ? isFixed(element.parentNode)
7286
+ : element;
7287
+ }
7288
+
7122
7289
  /**
7123
7290
  * Set the style to the given popper
7124
7291
  * @function
7125
7292
  * @ignore
7126
7293
  * @argument {Element} element - Element to apply the style to
7127
7294
  * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
7128
- */
7129
- function setStyle(element, styles) {
7130
- function is_numeric(n) {
7131
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
7132
- }
7133
- Object.keys(styles).forEach(function (prop) {
7134
- var unit = '';
7135
- // add unit if the value is numeric and is one of the following
7136
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
7137
- unit = 'px';
7138
- }
7139
- element.style[prop] = styles[prop] + unit;
7140
- });
7141
- }
7142
-
7295
+ */
7296
+ function setStyle(element, styles) {
7297
+ function is_numeric(n) {
7298
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
7299
+ }
7300
+ Object.keys(styles).forEach(function (prop) {
7301
+ var unit = '';
7302
+ // add unit if the value is numeric and is one of the following
7303
+ if (
7304
+ ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==
7305
+ -1 &&
7306
+ is_numeric(styles[prop])
7307
+ ) {
7308
+ unit = 'px';
7309
+ }
7310
+ element.style[prop] = styles[prop] + unit;
7311
+ });
7312
+ }
7313
+
7143
7314
  /**
7144
7315
  * Check if the given variable is a function
7145
7316
  * @function
7146
7317
  * @ignore
7147
7318
  * @argument {*} functionToCheck - variable to check
7148
7319
  * @returns {Boolean} answer to: is a function?
7149
- */
7150
- function isFunction(functionToCheck) {
7151
- var getType = {};
7152
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
7153
- }
7154
-
7320
+ */
7321
+ function isFunction(functionToCheck) {
7322
+ var getType = {};
7323
+ return (
7324
+ functionToCheck &&
7325
+ getType.toString.call(functionToCheck) === '[object Function]'
7326
+ );
7327
+ }
7328
+
7155
7329
  /**
7156
7330
  * Get the position of the given element, relative to its offset parent
7157
7331
  * @function
7158
7332
  * @ignore
7159
7333
  * @param {Element} element
7160
7334
  * @return {Object} position - Coordinates of the element and its `scrollTop`
7161
- */
7162
- function getOffsetRect(element) {
7163
- var transform = getStyle(element, 'transform').replace(/[^0-9\-,]/g, '').split(',');
7164
- var elementRect = {
7165
- width: element.offsetWidth,
7166
- height: element.offsetHeight,
7167
- left: element.offsetLeft + (transform[4] ? parseInt(transform[4], 10) : 0),
7168
- top: element.offsetTop + (transform[5] ? parseInt(transform[5], 10) : 0)
7169
- };
7170
-
7171
- elementRect.right = elementRect.left + elementRect.width;
7172
- elementRect.bottom = elementRect.top + elementRect.height;
7173
-
7174
- // position
7175
- return elementRect;
7176
- }
7177
-
7335
+ */
7336
+ function getOffsetRect(element) {
7337
+ var transform = getStyle(element, 'transform')
7338
+ .replace(/[^0-9\-,]/g, '')
7339
+ .split(',');
7340
+ var elementRect = {
7341
+ width: element.offsetWidth,
7342
+ height: element.offsetHeight,
7343
+ left:
7344
+ element.offsetLeft + (transform[4] ? parseInt(transform[4], 10) : 0),
7345
+ top: element.offsetTop + (transform[5] ? parseInt(transform[5], 10) : 0)
7346
+ };
7347
+
7348
+ elementRect.right = elementRect.left + elementRect.width;
7349
+ elementRect.bottom = elementRect.top + elementRect.height;
7350
+
7351
+ // position
7352
+ return elementRect;
7353
+ }
7354
+
7178
7355
  /**
7179
7356
  * Get bounding client rect of given element
7180
7357
  * @function
7181
7358
  * @ignore
7182
7359
  * @param {HTMLElement} element
7183
7360
  * @return {Object} client rect
7184
- */
7185
- function getBoundingClientRect(element) {
7186
- var rect = element.getBoundingClientRect();
7187
-
7188
- // whether the IE version is lower than 11
7189
- var isIE = /MSIE|Trident/.test(navigator.userAgent);
7190
-
7191
- // fix ie document bounding top always 0 bug
7192
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
7193
-
7194
- return {
7195
- left: rect.left,
7196
- top: rectTop,
7197
- right: rect.right,
7198
- bottom: rect.bottom,
7199
- width: rect.right - rect.left,
7200
- height: rect.bottom - rectTop
7201
- };
7202
- }
7203
-
7204
- function getStyle(dom, attr) {
7205
- if (dom.style[attr]) {
7206
- return dom.style[attr];
7207
- }
7208
- if (window.getComputedStyle) {
7209
- return getComputedStyle(dom, null)[attr];
7210
- }
7211
- return dom.currentStyle[attr];
7212
- }
7213
-
7361
+ */
7362
+ function getBoundingClientRect(element) {
7363
+ var rect = element.getBoundingClientRect();
7364
+
7365
+ // whether the IE version is lower than 11
7366
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
7367
+
7368
+ // fix ie document bounding top always 0 bug
7369
+ var rectTop =
7370
+ isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
7371
+
7372
+ return {
7373
+ left: rect.left,
7374
+ top: rectTop,
7375
+ right: rect.right,
7376
+ bottom: rect.bottom,
7377
+ width: rect.right - rect.left,
7378
+ height: rect.bottom - rectTop
7379
+ };
7380
+ }
7381
+
7382
+ function getStyle(dom, attr) {
7383
+ if (dom.style[attr]) {
7384
+ return dom.style[attr];
7385
+ }
7386
+ if (window.getComputedStyle) {
7387
+ return getComputedStyle(dom, null)[attr];
7388
+ }
7389
+ return dom.currentStyle[attr];
7390
+ }
7391
+
7214
7392
  /**
7215
7393
  * Given an element and one of its parents, return the offset
7216
7394
  * @function
@@ -7218,49 +7396,51 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
7218
7396
  * @param {HTMLElement} element
7219
7397
  * @param {HTMLElement} parent
7220
7398
  * @return {Object} rect
7221
- */
7222
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
7223
- var elementRect = getBoundingClientRect(element);
7224
- var parentRect = getBoundingClientRect(parent);
7225
-
7226
- if (fixed) {
7227
- var scrollParent = getScrollParent(parent);
7228
- parentRect.top += scrollParent.scrollTop;
7229
- parentRect.bottom += scrollParent.scrollTop;
7230
- parentRect.left += scrollParent.scrollLeft;
7231
- parentRect.right += scrollParent.scrollLeft;
7232
- }
7233
-
7234
- var rect = {
7235
- top: elementRect.top - parentRect.top,
7236
- left: elementRect.left - parentRect.left,
7237
- bottom: elementRect.top - parentRect.top + elementRect.height,
7238
- right: elementRect.left - parentRect.left + elementRect.width,
7239
- width: elementRect.width,
7240
- height: elementRect.height
7241
- };
7242
- return rect;
7243
- }
7244
-
7399
+ */
7400
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
7401
+ var elementRect = getBoundingClientRect(element);
7402
+ var parentRect = getBoundingClientRect(parent);
7403
+
7404
+ if (fixed) {
7405
+ var scrollParent = getScrollParent(parent);
7406
+ parentRect.top += scrollParent.scrollTop;
7407
+ parentRect.bottom += scrollParent.scrollTop;
7408
+ parentRect.left += scrollParent.scrollLeft;
7409
+ parentRect.right += scrollParent.scrollLeft;
7410
+ }
7411
+
7412
+ var rect = {
7413
+ top: elementRect.top - parentRect.top,
7414
+ left: elementRect.left - parentRect.left,
7415
+ bottom: elementRect.top - parentRect.top + elementRect.height,
7416
+ right: elementRect.left - parentRect.left + elementRect.width,
7417
+ width: elementRect.width,
7418
+ height: elementRect.height
7419
+ };
7420
+ return rect;
7421
+ }
7422
+
7245
7423
  /**
7246
7424
  * Get the prefixed supported property name
7247
7425
  * @function
7248
7426
  * @ignore
7249
7427
  * @argument {String} property (camelCase)
7250
7428
  * @returns {String} prefixed property (camelCase)
7251
- */
7252
- function getSupportedPropertyName(property) {
7253
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
7254
-
7255
- for (var i = 0; i < prefixes.length; i++) {
7256
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
7257
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
7258
- return toCheck;
7259
- }
7260
- }
7261
- return null;
7262
- }
7263
-
7429
+ */
7430
+ function getSupportedPropertyName(property) {
7431
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
7432
+
7433
+ for (var i = 0; i < prefixes.length; i++) {
7434
+ var toCheck = prefixes[i]
7435
+ ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1)
7436
+ : property;
7437
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
7438
+ return toCheck;
7439
+ }
7440
+ }
7441
+ return null;
7442
+ }
7443
+
7264
7444
  /**
7265
7445
  * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
7266
7446
  * objects to a target object. It will return the target object.
@@ -7268,41 +7448,46 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
7268
7448
  * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
7269
7449
  * @function
7270
7450
  * @ignore
7271
- */
7272
- if (!Object.assign) {
7273
- Object.defineProperty(Object, 'assign', {
7274
- enumerable: false,
7275
- configurable: true,
7276
- writable: true,
7277
- value: function value(target) {
7278
- if (target === undefined || target === null) {
7279
- throw new TypeError('Cannot convert first argument to object');
7280
- }
7281
-
7282
- var to = Object(target);
7283
- for (var i = 1; i < arguments.length; i++) {
7284
- var nextSource = arguments[i];
7285
- if (nextSource === undefined || nextSource === null) {
7286
- continue;
7287
- }
7288
- nextSource = Object(nextSource);
7289
-
7290
- var keysArray = Object.keys(nextSource);
7291
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
7292
- var nextKey = keysArray[nextIndex];
7293
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
7294
- if (desc !== undefined && desc.enumerable) {
7295
- to[nextKey] = nextSource[nextKey];
7296
- }
7297
- }
7298
- }
7299
- return to;
7300
- }
7301
- });
7302
- }
7451
+ */
7452
+ if (!Object.assign) {
7453
+ Object.defineProperty(Object, 'assign', {
7454
+ enumerable: false,
7455
+ configurable: true,
7456
+ writable: true,
7457
+ value: function (target) {
7458
+ if (target === undefined || target === null) {
7459
+ throw new TypeError('Cannot convert first argument to object');
7460
+ }
7461
+
7462
+ var to = Object(target);
7463
+ for (var i = 1; i < arguments.length; i++) {
7464
+ var nextSource = arguments[i];
7465
+ if (nextSource === undefined || nextSource === null) {
7466
+ continue;
7467
+ }
7468
+ nextSource = Object(nextSource);
7469
+
7470
+ var keysArray = Object.keys(nextSource);
7471
+ for (
7472
+ var nextIndex = 0, len = keysArray.length;
7473
+ nextIndex < len;
7474
+ nextIndex++
7475
+ ) {
7476
+ var nextKey = keysArray[nextIndex];
7477
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
7478
+ if (desc !== undefined && desc.enumerable) {
7479
+ to[nextKey] = nextSource[nextKey];
7480
+ }
7481
+ }
7482
+ }
7483
+ return to;
7484
+ }
7485
+ });
7486
+ }
7487
+
7488
+ return Popper;
7489
+ });
7303
7490
 
7304
- return Popper;
7305
- });
7306
7491
 
7307
7492
  /***/ }),
7308
7493
 
@@ -7601,10 +7786,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
7601
7786
  } else {
7602
7787
  var valueKey = this.select.actualValueKey;
7603
7788
  if (this.isStrict) {
7604
- return Object(util["w" /* getValueByPath */])(a, valueKey) === Object(util["w" /* getValueByPath */])(b, valueKey);
7789
+ return Object(util["v" /* getValueByPath */])(a, valueKey) === Object(util["v" /* getValueByPath */])(b, valueKey);
7605
7790
  }
7606
7791
  // eslint-disable-next-line
7607
- return Object(util["w" /* getValueByPath */])(a, valueKey) == Object(util["w" /* getValueByPath */])(b, valueKey);
7792
+ return Object(util["v" /* getValueByPath */])(a, valueKey) == Object(util["v" /* getValueByPath */])(b, valueKey);
7608
7793
  }
7609
7794
  },
7610
7795
  contains: function contains() {
@@ -7619,11 +7804,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
7619
7804
  var valueKey = this.select.actualValueKey;
7620
7805
  return arr && arr.some(function (item) {
7621
7806
  if (_this.isStrict) {
7622
- return Object(util["w" /* getValueByPath */])(item, valueKey) === Object(util["w" /* getValueByPath */])(target, valueKey);
7807
+ return Object(util["v" /* getValueByPath */])(item, valueKey) === Object(util["v" /* getValueByPath */])(target, valueKey);
7623
7808
  }
7624
7809
  return (
7625
7810
  // eslint-disable-next-line
7626
- Object(util["w" /* getValueByPath */])(item, valueKey) == Object(util["w" /* getValueByPath */])(target, valueKey)
7811
+ Object(util["v" /* getValueByPath */])(item, valueKey) == Object(util["v" /* getValueByPath */])(target, valueKey)
7627
7812
  );
7628
7813
  });
7629
7814
  }
@@ -7981,7 +8166,7 @@ function insertAfter(newEl, targetEl) {
7981
8166
 
7982
8167
  "use strict";
7983
8168
 
7984
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=d000ebfc&
8169
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=bf0e008c&
7985
8170
  var render = function () {
7986
8171
  var _vm = this
7987
8172
  var _h = _vm.$createElement
@@ -8392,7 +8577,7 @@ var render = function () {
8392
8577
  _vm.showClose
8393
8578
  ? _c("i", {
8394
8579
  staticClass:
8395
- "es-select__caret es-input__icon es-icon-circle-close",
8580
+ "es-select__caret es-input__icon es-icon-circle-guanbi",
8396
8581
  on: { click: _vm.handleClearClick },
8397
8582
  })
8398
8583
  : _vm._e(),
@@ -8620,7 +8805,7 @@ var staticRenderFns = []
8620
8805
  render._withStripped = true
8621
8806
 
8622
8807
 
8623
- // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=d000ebfc&
8808
+ // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=bf0e008c&
8624
8809
 
8625
8810
  // EXTERNAL MODULE: ./src/mixins/emitter.js
8626
8811
  var emitter = __webpack_require__(10);
@@ -8629,7 +8814,7 @@ var emitter = __webpack_require__(10);
8629
8814
  var mixins_focus = __webpack_require__(40);
8630
8815
 
8631
8816
  // EXTERNAL MODULE: external "eoss/lib/input"
8632
- var input_ = __webpack_require__(17);
8817
+ var input_ = __webpack_require__(18);
8633
8818
  var input_default = /*#__PURE__*/__webpack_require__.n(input_);
8634
8819
 
8635
8820
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=3d0b907d&
@@ -9884,7 +10069,7 @@ var _this = undefined;
9884
10069
  return (this.esFormItem || {}).esFormItemSize;
9885
10070
  },
9886
10071
  readonly: function readonly() {
9887
- return !this.filterable || this.multiple || !util["G" /* isIE */] && !util["B" /* isEdge */] && !this.visible;
10072
+ return !this.filterable || this.multiple || !util["F" /* isIE */] && !util["A" /* isEdge */] && !this.visible;
9888
10073
  },
9889
10074
  showClose: function showClose() {
9890
10075
  var hasValue = this.multiple ? Array.isArray(this.model) && this.model.length > 0 : this.model !== undefined && this.model !== null && this.model !== '';
@@ -9999,7 +10184,7 @@ var _this = undefined;
9999
10184
  if (this.filterable && !this.multiple) {
10000
10185
  this.inputLength = 20;
10001
10186
  }
10002
- if (!Object(util["ab" /* valueEquals */])(val, oldVal)) {
10187
+ if (!Object(util["Z" /* valueEquals */])(val, oldVal)) {
10003
10188
  this.dispatch('EsFormItem', 'es.form.change', val);
10004
10189
  }
10005
10190
  },
@@ -10359,7 +10544,7 @@ var _this = undefined;
10359
10544
  });
10360
10545
  },
10361
10546
  emitChange: function emitChange(val) {
10362
- if (!Object(util["ab" /* valueEquals */])(this.model, val)) {
10547
+ if (!Object(util["Z" /* valueEquals */])(this.model, val)) {
10363
10548
  this.$emit('change', val);
10364
10549
  }
10365
10550
  },
@@ -10371,8 +10556,8 @@ var _this = undefined;
10371
10556
  var isUndefined = valueType === '[object undefined]';
10372
10557
  for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
10373
10558
  var cachedOption = this.cachedOptions[i];
10374
- var oVal = Object(util["w" /* getValueByPath */])(cachedOption.value, this.actualValueKey);
10375
- var tVal = Object(util["w" /* getValueByPath */])(value, this.actualValueKey);
10559
+ var oVal = Object(util["v" /* getValueByPath */])(cachedOption.value, this.actualValueKey);
10560
+ var tVal = Object(util["v" /* getValueByPath */])(value, this.actualValueKey);
10376
10561
  var isEqual = this.strict ? oVal === tVal : oVal == tVal; //eslint-disable-line
10377
10562
  if (isEqual) {
10378
10563
  option = cachedOption;
@@ -10467,6 +10652,7 @@ var _this = undefined;
10467
10652
  this.softFocus = false;
10468
10653
  },
10469
10654
  handleClearClick: function handleClearClick(event) {
10655
+ console.log('handleClearClick');
10470
10656
  if (this.selectDisabled) return;
10471
10657
 
10472
10658
  this.deleteSelected(event);
@@ -10576,7 +10762,7 @@ var _this = undefined;
10576
10762
  this.resetInputHeight();
10577
10763
  } else {
10578
10764
  if (this.valueType === 'string') {
10579
- this.$emit('input', Object(util["w" /* getValueByPath */])(option.value, this.actualValueKey));
10765
+ this.$emit('input', Object(util["v" /* getValueByPath */])(option.value, this.actualValueKey));
10580
10766
  } else {
10581
10767
  this.$emit('input', option.value);
10582
10768
  }
@@ -10594,7 +10780,7 @@ var _this = undefined;
10594
10780
  var value = values;
10595
10781
  var newVal = val;
10596
10782
  if (this.valueType === 'string') {
10597
- newVal = Object(util["w" /* getValueByPath */])(val, this.actualValueKey);
10783
+ newVal = Object(util["v" /* getValueByPath */])(val, this.actualValueKey);
10598
10784
  }
10599
10785
  var optionIndex = this.getValueIndex(value, newVal);
10600
10786
  if (optionIndex > -1) {
@@ -10641,7 +10827,7 @@ var _this = undefined;
10641
10827
  var valueKey = this.actualValueKey;
10642
10828
  var index = -1;
10643
10829
  arr.some(function (item, i) {
10644
- if (Object(util["w" /* getValueByPath */])(item, valueKey) === Object(util["w" /* getValueByPath */])(value, valueKey)) {
10830
+ if (Object(util["v" /* getValueByPath */])(item, valueKey) === Object(util["v" /* getValueByPath */])(value, valueKey)) {
10645
10831
  index = i;
10646
10832
  return true;
10647
10833
  }
@@ -10746,7 +10932,7 @@ var _this = undefined;
10746
10932
  }
10747
10933
  },
10748
10934
  getValueKey: function getValueKey(item) {
10749
- var value = this.getType(item.value) !== '[object object]' ? item.value : Object(util["w" /* getValueByPath */])(item.value, this.actualValueKey);
10935
+ var value = this.getType(item.value) !== '[object object]' ? item.value : Object(util["v" /* getValueByPath */])(item.value, this.actualValueKey);
10750
10936
  // 确保返回字符串或数字类型的key
10751
10937
  if ((typeof value === 'undefined' ? 'undefined' : selectvue_type_script_lang_js_typeof(value)) === 'object') {
10752
10938
  return JSON.stringify(value);
@@ -10822,7 +11008,7 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10822
11008
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return doQrLogin; });
10823
11009
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nb", function() { return logout; });
10824
11010
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return initLogin; });
10825
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cc", function() { return switchUserTo; });
11011
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dc", function() { return switchUserTo; });
10826
11012
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return changeImg; });
10827
11013
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getLoginCode; });
10828
11014
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return doCodeLogin; });
@@ -10840,13 +11026,13 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10840
11026
  /* unused harmony export scanCodeRetrialAuth */
10841
11027
  /* unused harmony export codeRetrialAuth */
10842
11028
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return doAssistanceQrLogin; });
10843
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pc", function() { return userOnline; });
11029
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qc", function() { return userOnline; });
10844
11030
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return getUserAppWithTag; });
10845
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mb", function() { return recordUserApp; });
11031
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nb", function() { return recordUserApp; });
10846
11032
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return getUserRecordApp; });
10847
11033
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ob", function() { return mainConfig; });
10848
11034
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return initUserSet; });
10849
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lc", function() { return updateUserInfo; });
11035
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mc", function() { return updateUserInfo; });
10850
11036
  /* unused harmony export getUserImgUrl */
10851
11037
  /* unused harmony export getDoorIndex */
10852
11038
  /* unused harmony export refreshOnlineUsers */
@@ -10858,22 +11044,22 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10858
11044
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getByType; });
10859
11045
  /* unused harmony export getUserCustomInfo */
10860
11046
  /* unused harmony export updateUserCustomInfo */
10861
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xb", function() { return saveOrUpdate; });
10862
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dc", function() { return sysMsgPage; });
11047
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Yb", function() { return saveOrUpdate; });
11048
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ec", function() { return sysMsgPage; });
10863
11049
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return ignoreSysMsg; });
10864
11050
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return ignoreAllSysMsg; });
10865
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Yb", function() { return searchType; });
11051
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zb", function() { return searchType; });
10866
11052
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return getSysParam; });
10867
11053
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getAdjunctProperties; });
10868
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Oc", function() { return uploads; });
10869
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nc", function() { return uploadOnlyOne; });
11054
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pc", function() { return uploads; });
11055
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Oc", function() { return uploadOnlyOne; });
10870
11056
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getAdjunctFileInfos; });
10871
11057
  /* unused harmony export uploadSort */
10872
11058
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return downloadByAdjunctId; });
10873
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mc", function() { return uploadDownloads; });
10874
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Eb", function() { return previewAdjunct; });
10875
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return previewAdjunct2; });
10876
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gb", function() { return previewAdjunctOffice; });
11059
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nc", function() { return uploadDownloads; });
11060
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return previewAdjunct; });
11061
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gb", function() { return previewAdjunct2; });
11062
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return previewAdjunctOffice; });
10877
11063
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return delAdjunct; });
10878
11064
  /* unused harmony export upload_updateClassify */
10879
11065
  /* unused harmony export getDeleteAdjunctFileInfos */
@@ -10888,13 +11074,13 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10888
11074
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return gethelpdoc; });
10889
11075
  /* unused harmony export getCurrentuser */
10890
11076
  /* unused harmony export mainDetail */
10891
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tc", function() { return toStartFlow; });
10892
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oc", function() { return tempSave; });
11077
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uc", function() { return toStartFlow; });
11078
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pc", function() { return tempSave; });
10893
11079
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return commonOpion; });
10894
11080
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCommonOpion; });
10895
11081
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return editCommonOpion; });
10896
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wb", function() { return saveCommonOpinion; });
10897
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jc", function() { return updateCommonOpinion; });
11082
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xb", function() { return saveCommonOpinion; });
11083
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kc", function() { return updateCommonOpinion; });
10898
11084
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return deleteCommonOpion; });
10899
11085
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return getProcessDefList; });
10900
11086
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getNodeInfo; });
@@ -10903,27 +11089,27 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10903
11089
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return findSysCodes; });
10904
11090
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getNotificationMsg; });
10905
11091
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getHandleInfoHtml; });
10906
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fc", function() { return taskHandleHtml; });
11092
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gc", function() { return taskHandleHtml; });
10907
11093
  /* unused harmony export getView */
10908
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nb", function() { return register; });
10909
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return pendedhistoryList; });
10910
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xc", function() { return toTaskRejectHtml; });
10911
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hc", function() { return taskRejectHtml; });
10912
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uc", function() { return toStartTaskRead; });
10913
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vc", function() { return toStartTaskReadIndex; });
10914
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gc", function() { return taskReadHtml; });
10915
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return rejectAndEnd; });
10916
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sc", function() { return toSendMsg; });
10917
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zb", function() { return sendMsg; });
11094
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return register; });
11095
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Eb", function() { return pendedhistoryList; });
11096
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yc", function() { return toTaskRejectHtml; });
11097
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ic", function() { return taskRejectHtml; });
11098
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vc", function() { return toStartTaskRead; });
11099
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wc", function() { return toStartTaskReadIndex; });
11100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hc", function() { return taskReadHtml; });
11101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pb", function() { return rejectAndEnd; });
11102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tc", function() { return toSendMsg; });
11103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ac", function() { return sendMsg; });
10918
11104
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return endFlowHtml; });
10919
11105
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return handleInfo; });
10920
11106
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mb", function() { return loginUserInfo; });
10921
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qc", function() { return wss; });
10922
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hc", function() { return topic; });
11107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rc", function() { return wss; });
11108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ic", function() { return topic; });
10923
11109
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getPresetCustomInfo; });
10924
11110
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getPresetNodeInfo; });
10925
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dc", function() { return toTaskTransferIndex; });
10926
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lc", function() { return taskTransfer; });
11111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ec", function() { return toTaskTransferIndex; });
11112
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mc", function() { return taskTransfer; });
10927
11113
  /* unused harmony export toPresetInfoListIndex */
10928
11114
  /* unused harmony export deletePresetInfo */
10929
11115
  /* unused harmony export historyListJson */
@@ -10931,24 +11117,24 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10931
11117
  /* unused harmony export pressListJson */
10932
11118
  /* unused harmony export deleteFlow */
10933
11119
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lb", function() { return isCanStartSubFlow; });
10934
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ec", function() { return toTaskUnionExamine; });
10935
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mc", function() { return taskUnionExamine; });
10936
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cc", function() { return toTaskTakeAdvice; });
10937
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kc", function() { return taskTakeAdvice; });
10938
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zc", function() { return toTaskStartDraft; });
10939
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ac", function() { return toTaskSupervise; });
10940
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bc", function() { return toTaskSuperviseSub; });
10941
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jc", function() { return taskStartDraft; });
10942
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yc", function() { return toTaskReview; });
10943
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ic", function() { return taskReview; });
10944
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fc", function() { return toTaskUnionSeal; });
10945
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nc", function() { return taskUnionSeal; });
10946
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gc", function() { return toTwoOfficesDispatch; });
10947
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ic", function() { return twoOfficesDispatch; });
10948
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rc", function() { return toResetProcessIndex; });
10949
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pb", function() { return resetProcess; });
10950
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wc", function() { return toTaskContinuationIndex; });
10951
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ec", function() { return taskContinuation; });
11120
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fc", function() { return toTaskUnionExamine; });
11121
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nc", function() { return taskUnionExamine; });
11122
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dc", function() { return toTaskTakeAdvice; });
11123
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lc", function() { return taskTakeAdvice; });
11124
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ac", function() { return toTaskStartDraft; });
11125
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bc", function() { return toTaskSupervise; });
11126
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cc", function() { return toTaskSuperviseSub; });
11127
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kc", function() { return taskStartDraft; });
11128
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zc", function() { return toTaskReview; });
11129
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jc", function() { return taskReview; });
11130
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gc", function() { return toTaskUnionSeal; });
11131
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oc", function() { return taskUnionSeal; });
11132
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hc", function() { return toTwoOfficesDispatch; });
11133
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jc", function() { return twoOfficesDispatch; });
11134
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sc", function() { return toResetProcessIndex; });
11135
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return resetProcess; });
11136
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xc", function() { return toTaskContinuationIndex; });
11137
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fc", function() { return taskContinuation; });
10952
11138
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getFreeStartFlowParams; });
10953
11139
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return freeStartFlowWithSubmitTask; });
10954
11140
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return checkForeignOrgStartedCircularRead; });
@@ -10956,7 +11142,7 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10956
11142
  /* unused harmony export fyListJson */
10957
11143
  /* unused harmony export circularReadWithdraw */
10958
11144
  /* unused harmony export taskReadWithDraw */
10959
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ac", function() { return startReadTransferHandleFlowWithTaskReadEnd; });
11145
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bc", function() { return startReadTransferHandleFlowWithTaskReadEnd; });
10960
11146
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return checkBusinessIdStartedReadTransferHandle; });
10961
11147
  /* unused harmony export sendList */
10962
11148
  /* unused harmony export sendInfo */
@@ -10970,23 +11156,24 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10970
11156
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getNodeInfoForStart; });
10971
11157
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return freeStartFlow; });
10972
11158
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return getUrgencyLevelChangedNotificationType; });
10973
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qc", function() { return toFreeTaskCircularRead; });
11159
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rc", function() { return toFreeTaskCircularRead; });
10974
11160
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return freeTaskCircularRead; });
10975
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ab", function() { return pageLists; });
11161
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bb", function() { return pageLists; });
10976
11162
  /* unused harmony export publishedLists */
10977
11163
  /* unused harmony export pageInfo */
10978
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bb", function() { return pageSave; });
10979
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return pageUpdate; });
11164
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ab", function() { return pageGroup; });
11165
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return pageSave; });
11166
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return pageUpdate; });
10980
11167
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zb", function() { return pageDelete; });
10981
11168
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return batchSave; });
10982
11169
  /* unused harmony export batchUpdate */
10983
11170
  /* unused harmony export batchDelete */
10984
11171
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return batchList; });
10985
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jb", function() { return processListJson; });
10986
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return processInfo; });
10987
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return processDeleteJson; });
10988
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kb", function() { return processSave; });
10989
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lb", function() { return processUpdate; });
11172
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kb", function() { return processListJson; });
11173
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jb", function() { return processInfo; });
11174
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return processDeleteJson; });
11175
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lb", function() { return processSave; });
11176
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mb", function() { return processUpdate; });
10990
11177
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wb", function() { return nodeListJson; });
10991
11178
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ub", function() { return nodeDeleteJson; });
10992
11179
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xb", function() { return nodeSave; });
@@ -10997,22 +11184,22 @@ var select_component = Object(componentNormalizer["a" /* default */])(
10997
11184
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pb", function() { return moduleDelete; });
10998
11185
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sb", function() { return moduleSave; });
10999
11186
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tb", function() { return moduleUpdate; });
11000
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sb", function() { return ruleListJson; });
11001
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rb", function() { return ruleEdit; });
11002
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tb", function() { return ruleRead; });
11003
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ub", function() { return ruleSave; });
11187
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tb", function() { return ruleListJson; });
11188
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sb", function() { return ruleEdit; });
11189
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ub", function() { return ruleRead; });
11190
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vb", function() { return ruleSave; });
11004
11191
  /* unused harmony export ruleSupplement */
11005
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vb", function() { return ruleUndore; });
11006
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return ruleAdd; });
11192
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wb", function() { return ruleUndore; });
11193
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rb", function() { return ruleAdd; });
11007
11194
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return companyDetail; });
11008
11195
  /* unused harmony export issueDetailList */
11009
11196
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return deleteRule; });
11010
11197
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return getSysParamV1; });
11011
11198
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return companyList; });
11012
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bc", function() { return supplement; });
11199
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cc", function() { return supplement; });
11013
11200
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kb", function() { return isAddSource; });
11014
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pc", function() { return tiggerInTime; });
11015
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kc", function() { return updateHistory; });
11201
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qc", function() { return tiggerInTime; });
11202
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lc", function() { return updateHistory; });
11016
11203
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return auditTrajectory; });
11017
11204
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return changeInTime; });
11018
11205
  var flowPendingPrefix = window.flowPendingPrefix || localStorage.getItem('flowPendingPrefix') || '/bpm';
@@ -11294,6 +11481,9 @@ var pageLists = '/main2/pageComponentConfig/listJson';
11294
11481
  var publishedLists = '/main2/pageComponentConfig/listPublished';
11295
11482
  // 获取自定义配置详情
11296
11483
  var pageInfo = '/main2/pageComponentConfig/info';
11484
+ // 获取自定义配置授权列表
11485
+ var pageGroup = 'main2/pageComponentTarget/listByConfigIdAndTypeGroup';
11486
+
11297
11487
  // 保存自定义配置,发布也调这个接口但要加上字段status=1
11298
11488
  var pageSave = '/main2/pageComponentConfig/save';
11299
11489
  // 更新自定义配置
@@ -11401,12 +11591,12 @@ module.exports = require("eoss/lib/message-box");
11401
11591
  /* unused harmony export downloadZip */
11402
11592
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return deleteFile; });
11403
11593
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getTableData; });
11404
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
11594
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
11405
11595
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
11406
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29);
11596
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
11407
11597
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
11408
11598
  /* harmony import */ var _sm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
11409
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30);
11599
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
11410
11600
  /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
11411
11601
  /* harmony import */ var _storage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
11412
11602
  /* harmony import */ var fetch_request_source__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
@@ -11648,7 +11838,7 @@ var ajax = function ajax(_ref) {
11648
11838
  delete params[key];
11649
11839
  }
11650
11840
  }
11651
- url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: url, param: encodedParams });
11841
+ url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: url, param: encodedParams });
11652
11842
  }
11653
11843
  } else {
11654
11844
  params = {};
@@ -12006,7 +12196,7 @@ function redirectToLogin() {
12006
12196
 
12007
12197
  if (loginPage) {
12008
12198
  // 处理相对路径
12009
- if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "S"])(loginPage, ['http', '/'], true)) {
12199
+ if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "R"])(loginPage, ['http', '/'], true)) {
12010
12200
  var pathname = '';
12011
12201
  try {
12012
12202
  pathname = window.top.location.pathname;
@@ -12038,7 +12228,7 @@ function redirectToLogin() {
12038
12228
  * @returns {Promise} 认证完成后 resolve
12039
12229
  */
12040
12230
  var initAuth = function initAuth() {
12041
- var params = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "t"])();
12231
+ var params = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "s"])();
12042
12232
  var token = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('token') || Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('Authorization');
12043
12233
 
12044
12234
  // 已有 token 或没有认证参数,直接返回
@@ -12046,7 +12236,7 @@ var initAuth = function initAuth() {
12046
12236
  return Promise.resolve();
12047
12237
  }
12048
12238
 
12049
- var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "L"])('页面加载中...');
12239
+ var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "K"])('页面加载中...');
12050
12240
 
12051
12241
  return ajax({
12052
12242
  method: 'post',
@@ -12125,7 +12315,7 @@ var isLogined = function isLogined(_ref3) {
12125
12315
 
12126
12316
  // 处理cookie参数
12127
12317
  if (cookie === undefined) {
12128
- cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "t"])({ name: 'cookie' });
12318
+ cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "s"])({ name: 'cookie' });
12129
12319
  }
12130
12320
 
12131
12321
  // 处理登录页面路径
@@ -12140,7 +12330,7 @@ var isLogined = function isLogined(_ref3) {
12140
12330
  sessionStorage.setItem('loginPage', loginPage);
12141
12331
 
12142
12332
  // 处理相对路径
12143
- if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "S"])(loginPage, ['http', '/'], true)) {
12333
+ if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "R"])(loginPage, ['http', '/'], true)) {
12144
12334
  if (pathname !== '/') {
12145
12335
  var pathParts = pathname.split('/');
12146
12336
  pathParts.splice(pathParts.length - 1);
@@ -12165,7 +12355,7 @@ var isLogined = function isLogined(_ref3) {
12165
12355
 
12166
12356
  // 处理重定向
12167
12357
  if (redirect && (to.path === '/main' || to.path === '/login')) {
12168
- window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: '.' + to.path + '.html', param: to.query }));
12358
+ window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: '.' + to.path + '.html', param: to.query }));
12169
12359
  } else {
12170
12360
  next();
12171
12361
  }
@@ -12368,7 +12558,7 @@ var downloadFile = function downloadFile(_ref6) {
12368
12558
 
12369
12559
  // 拼接URL参数
12370
12560
  if (Object.keys(params).length > 0) {
12371
- downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: downloadUrl, param: params });
12561
+ downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: downloadUrl, param: params });
12372
12562
  }
12373
12563
  } else if (file.raw) {
12374
12564
  downloadUrl = URL.createObjectURL(file.raw);
@@ -12414,7 +12604,7 @@ var downloadZip = function downloadZip(_ref7) {
12414
12604
  code = _ref7.code,
12415
12605
  option = _objectWithoutProperties(_ref7, ['withToken', 'fileName', 'url', 'ownId', 'code']);
12416
12606
 
12417
- var dochubConfig = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('dochubConfig') || { compressDownloadDocumentUrl: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* uploadDownloads */ "Mc"] };
12607
+ var dochubConfig = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('dochubConfig') || { compressDownloadDocumentUrl: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* uploadDownloads */ "Nc"] };
12418
12608
 
12419
12609
  // 处理URL和参数
12420
12610
  var downloadUrl = url ? url : dochubConfig.compressDownloadDocumentUrl;
@@ -12430,7 +12620,7 @@ var downloadZip = function downloadZip(_ref7) {
12430
12620
 
12431
12621
  // 拼接URL参数
12432
12622
  if (Object.keys(params).length > 0) {
12433
- downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: downloadUrl, param: params });
12623
+ downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: downloadUrl, param: params });
12434
12624
  }
12435
12625
 
12436
12626
  // 创建a标签
@@ -12535,7 +12725,7 @@ var getTableData = function getTableData(_ref9) {
12535
12725
  onSuccess = _ref9.onSuccess,
12536
12726
  onError = _ref9.onError;
12537
12727
 
12538
- var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "L"])('数据加载中...');
12728
+ var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "K"])('数据加载中...');
12539
12729
  return new Promise(function (resolve, reject) {
12540
12730
  ajax({
12541
12731
  method: method,