bkui-vue 0.0.2-table-refactor.9 → 0.0.3-beta.2
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.
- package/dist/index.cjs.js +135 -161
- package/dist/index.esm.js +17178 -19445
- package/dist/index.umd.js +135 -161
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +6 -2
- package/lib/affix/index.js +321 -1
- package/lib/alert/alert.variable.css +6 -2
- package/lib/alert/index.js +214 -1
- package/lib/animate-number/index.js +155 -1
- package/lib/backtop/backtop.variable.css +6 -2
- package/lib/backtop/index.js +188 -1
- package/lib/badge/badge.css +8 -2
- package/lib/badge/badge.less +8 -4
- package/lib/badge/badge.variable.css +14 -4
- package/lib/badge/index.js +235 -1
- package/lib/breadcrumb/breadcrumb.variable.css +6 -2
- package/lib/breadcrumb/index.js +309 -1
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/button.css +10 -7
- package/lib/button/button.d.ts +1 -1
- package/lib/button/button.less +98 -93
- package/lib/button/button.variable.css +24 -17
- package/lib/button/index.d.ts +5 -5
- package/lib/button/index.js +321 -1
- package/lib/card/card.css +7 -7
- package/lib/card/card.less +7 -7
- package/lib/card/card.variable.css +13 -9
- package/lib/card/index.js +285 -1
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.css +3 -3
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.less +4 -6
- package/lib/cascader/cascader.variable.css +9 -5
- package/lib/cascader/index.d.ts +4 -0
- package/lib/cascader/index.js +2053 -2
- package/lib/checkbox/checkbox.css +13 -1
- package/lib/checkbox/checkbox.d.ts +13 -10
- package/lib/checkbox/checkbox.less +15 -1
- package/lib/checkbox/checkbox.variable.css +19 -3
- package/lib/checkbox/common.d.ts +1 -0
- package/lib/checkbox/index.d.ts +28 -19
- package/lib/checkbox/index.js +569 -1
- package/lib/code-diff/code-diff.variable.css +6 -2
- package/lib/code-diff/index.js +5501 -1
- package/lib/collapse/collapse.variable.css +6 -2
- package/lib/collapse/index.js +570 -1
- package/lib/collapse-transition/collapse-transition.variable.css +6 -2
- package/lib/collapse-transition/index.js +177 -1
- package/lib/color-picker/color-picker.variable.css +6 -2
- package/lib/color-picker/index.js +2665 -1
- package/lib/components.js +530 -1
- package/lib/config-provider/config-provider.d.ts +21 -0
- package/lib/config-provider/config-provider.variable.css +6 -2
- package/lib/config-provider/index.d.ts +28 -0
- package/lib/config-provider/index.js +365 -1
- package/lib/config-provider/token.d.ts +7 -0
- package/lib/container/container.variable.css +6 -2
- package/lib/container/index.js +391 -1
- package/lib/date-picker/common.d.ts +2 -0
- package/lib/date-picker/date-picker.d.ts +3 -1
- package/lib/date-picker/date-picker.variable.css +6 -2
- package/lib/date-picker/index.d.ts +9 -3
- package/lib/date-picker/index.js +5629 -1
- package/lib/date-picker/panel/date.d.ts +2 -2
- package/lib/date-picker/panel/time-range.d.ts +17 -0
- package/lib/date-picker/panel/time.d.ts +17 -1
- package/lib/date-picker/time-picker.d.ts +3 -1
- package/lib/dialog/dialog.css +7 -6
- package/lib/dialog/dialog.less +7 -6
- package/lib/dialog/dialog.variable.css +13 -8
- package/lib/dialog/index.js +971 -2
- package/lib/directives/index.js +1387 -2
- package/lib/dist.index.js +87 -1
- package/lib/divider/divider.variable.css +6 -2
- package/lib/divider/index.js +169 -1
- package/lib/dropdown/dropdown.css +1 -1
- package/lib/dropdown/dropdown.variable.css +7 -3
- package/lib/dropdown/index.js +369 -1
- package/lib/exception/exception.variable.css +6 -2
- package/lib/exception/index.js +385 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +6 -2
- package/lib/fixed-navbar/index.js +154 -1
- package/lib/form/form.css +2 -1
- package/lib/form/form.less +3 -2
- package/lib/form/form.variable.css +8 -3
- package/lib/form/index.js +952 -1
- package/lib/hooks.js +73 -1
- package/lib/icon/angle-double-down-line.js +191 -1
- package/lib/icon/angle-double-left-line.js +191 -1
- package/lib/icon/angle-double-left.js +191 -1
- package/lib/icon/angle-double-right-line.js +191 -1
- package/lib/icon/angle-double-right.js +191 -1
- package/lib/icon/angle-double-up-line.js +191 -1
- package/lib/icon/angle-down-fill.js +191 -1
- package/lib/icon/angle-down-line.js +191 -1
- package/lib/icon/angle-down.js +191 -1
- package/lib/icon/angle-left.js +191 -1
- package/lib/icon/angle-right.js +191 -1
- package/lib/icon/angle-up-fill.js +191 -1
- package/lib/icon/angle-up.js +191 -1
- package/lib/icon/archive-fill.js +191 -1
- package/lib/icon/arrows-left.js +191 -1
- package/lib/icon/arrows-right.js +191 -1
- package/lib/icon/assistant.js +191 -1
- package/lib/icon/audio-fill.js +191 -1
- package/lib/icon/bk.js +191 -1
- package/lib/icon/circle.js +191 -1
- package/lib/icon/close-line.js +191 -1
- package/lib/icon/close.js +191 -1
- package/lib/icon/code.js +191 -1
- package/lib/icon/cog-shape.js +191 -1
- package/lib/icon/collapse-left.js +191 -1
- package/lib/icon/copy-shape.js +191 -1
- package/lib/icon/copy.js +191 -1
- package/lib/icon/data-shape.js +191 -1
- package/lib/icon/del.js +191 -1
- package/lib/icon/doc-fill.js +191 -1
- package/lib/icon/done.js +191 -1
- package/lib/icon/down-shape.js +191 -1
- package/lib/icon/down-small.js +191 -1
- package/lib/icon/edit-line.js +191 -1
- package/lib/icon/ellipsis.js +191 -1
- package/lib/icon/enlarge-line.js +191 -1
- package/lib/icon/error.js +191 -1
- package/lib/icon/excel-fill.js +191 -1
- package/lib/icon/exclamation-circle-shape.js +191 -1
- package/lib/icon/eye.js +191 -1
- package/lib/icon/filliscreen-line.js +191 -1
- package/lib/icon/fix-line.js +191 -1
- package/lib/icon/fix-shape.js +191 -1
- package/lib/icon/folder-open.js +191 -1
- package/lib/icon/folder-shape-open.js +191 -1
- package/lib/icon/folder-shape.js +191 -1
- package/lib/icon/folder.js +191 -1
- package/lib/icon/funnel.js +191 -1
- package/lib/icon/grag-fill.d.ts +4 -0
- package/lib/icon/grag-fill.js +191 -0
- package/lib/icon/help-document-fill.js +191 -1
- package/lib/icon/help-fill.js +191 -1
- package/lib/icon/help.js +191 -1
- package/lib/icon/image-fill.js +276 -1
- package/lib/icon/img-error.js +276 -1
- package/lib/icon/img-placehoulder.js +276 -1
- package/lib/icon/index.d.ts +2 -0
- package/lib/icon/index.js +2452 -1
- package/lib/icon/info-line.js +276 -1
- package/lib/icon/info.js +276 -1
- package/lib/icon/left-shape.js +276 -1
- package/lib/icon/left-turn-line.js +276 -1
- package/lib/icon/loading.d.ts +4 -0
- package/lib/icon/loading.js +276 -0
- package/lib/icon/narrow-line.js +276 -1
- package/lib/icon/original.js +276 -1
- package/lib/icon/pdf-fill.js +276 -1
- package/lib/icon/play-shape.js +276 -1
- package/lib/icon/plus.js +276 -1
- package/lib/icon/ppt-fill.js +276 -1
- package/lib/icon/qq.js +276 -1
- package/lib/icon/right-shape.js +276 -1
- package/lib/icon/right-turn-line.js +276 -1
- package/lib/icon/search.js +276 -1
- package/lib/icon/share.js +276 -1
- package/lib/icon/spinner.js +276 -1
- package/lib/icon/success.js +276 -1
- package/lib/icon/switcher-loading.js +276 -1
- package/lib/icon/text-file.js +276 -1
- package/lib/icon/text-fill.js +276 -1
- package/lib/icon/transfer.js +276 -1
- package/lib/icon/tree-application-shape.js +276 -1
- package/lib/icon/unfull-screen.js +276 -1
- package/lib/icon/unvisible.js +276 -1
- package/lib/icon/up-shape.js +276 -1
- package/lib/icon/upload.js +276 -1
- package/lib/icon/video-fill.js +276 -1
- package/lib/icon/warn.js +276 -1
- package/lib/icon/weixin-pro.js +276 -1
- package/lib/icon/weixin.js +276 -1
- package/lib/image/image-viewer.variable.css +6 -2
- package/lib/image/image.variable.css +6 -2
- package/lib/image/index.js +641 -1
- package/lib/index.js +97 -1
- package/lib/info-box/index.js +1161 -2
- package/lib/info-box/info-box.d.ts +4 -0
- package/lib/info-box/info-box.variable.css +6 -2
- package/lib/input/index.d.ts +4 -4
- package/lib/input/index.js +1233 -2
- package/lib/input/input.css +21 -5
- package/lib/input/input.d.ts +3 -3
- package/lib/input/input.less +19 -0
- package/lib/input/input.variable.css +27 -7
- package/lib/link/index.js +160 -1
- package/lib/link/link.variable.css +6 -2
- package/lib/loading/index.d.ts +3 -3
- package/lib/loading/index.js +381 -1
- package/lib/loading/loading.css +9 -9
- package/lib/loading/loading.d.ts +1 -1
- package/lib/loading/loading.less +14 -9
- package/lib/loading/loading.variable.css +15 -11
- package/lib/locale/index.js +479 -1
- package/lib/locale/lang/en.d.ts +7 -0
- package/lib/menu/index.js +724 -1
- package/lib/menu/menu.variable.css +6 -2
- package/lib/menu/submenu.variable.css +6 -2
- package/lib/message/index.js +1795 -2
- package/lib/message/message.variable.css +6 -2
- package/lib/modal/index.js +396 -1
- package/lib/modal/modal.variable.css +6 -2
- package/lib/navigation/index.js +367 -1
- package/lib/navigation/navigation.variable.css +6 -2
- package/lib/notify/index.js +397 -1
- package/lib/notify/notify.css +6 -6
- package/lib/notify/notify.less +6 -6
- package/lib/notify/notify.variable.css +12 -8
- package/lib/overflow-title/components/overflow-title.d.ts +0 -1
- package/lib/overflow-title/index.js +285 -1
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +880 -1
- package/lib/pagination/pagination.css +1 -0
- package/lib/pagination/pagination.d.ts +3 -3
- package/lib/pagination/pagination.less +1 -0
- package/lib/pagination/pagination.variable.css +7 -2
- package/lib/plugin-popover/index.js +3833 -1
- package/lib/plugins/index.js +63 -1
- package/lib/pop-confirm/index.d.ts +42 -3
- package/lib/pop-confirm/index.js +281 -1
- package/lib/pop-confirm/pop-confirm.css +4 -4
- package/lib/pop-confirm/pop-confirm.d.ts +14 -1
- package/lib/pop-confirm/pop-confirm.less +4 -4
- package/lib/pop-confirm/pop-confirm.variable.css +10 -6
- package/lib/popover/index.js +3841 -1
- package/lib/popover/popover.css +1 -1
- package/lib/popover/popover.less +1 -1
- package/lib/popover/popover.variable.css +7 -3
- package/lib/popover2/index.js +107 -1
- package/lib/preset.d.ts +14 -0
- package/lib/preset.js +93 -1
- package/lib/process/index.js +759 -2
- package/lib/process/process.variable.css +6 -2
- package/lib/progress/index.d.ts +4 -4
- package/lib/progress/index.js +431 -1
- package/lib/progress/progress.css +7 -3
- package/lib/progress/progress.d.ts +3 -3
- package/lib/progress/progress.less +8 -3
- package/lib/progress/progress.variable.css +13 -5
- package/lib/radio/common.d.ts +1 -0
- package/lib/radio/index.d.ts +8 -2
- package/lib/radio/index.js +635 -1
- package/lib/radio/radio-button.d.ts +4 -3
- package/lib/radio/radio-group.d.ts +3 -0
- package/lib/radio/radio.css +26 -12
- package/lib/radio/radio.d.ts +1 -0
- package/lib/radio/radio.less +42 -8
- package/lib/radio/radio.variable.css +26 -8
- package/lib/rate/index.d.ts +4 -4
- package/lib/rate/index.js +354 -1
- package/lib/rate/rate.d.ts +2 -2
- package/lib/rate/rate.variable.css +6 -2
- package/lib/rate/star.css +3 -0
- package/lib/rate/star.less +3 -0
- package/lib/rate/star.variable.css +9 -2
- package/lib/resize-layout/index.js +429 -1
- package/lib/resize-layout/resize-layout.css +2 -2
- package/lib/resize-layout/resize-layout.less +2 -2
- package/lib/resize-layout/resize-layout.variable.css +8 -4
- package/lib/search-select/index.js +2729 -2
- package/lib/search-select/search-select.css +2 -4
- package/lib/search-select/search-select.less +10 -12
- package/lib/search-select/search-select.variable.css +8 -6
- package/lib/select/common.d.ts +3 -1
- package/lib/select/index.d.ts +96 -30
- package/lib/select/index.js +2384 -2
- package/lib/select/option.d.ts +1 -0
- package/lib/select/select.css +3 -0
- package/lib/select/select.d.ts +40 -14
- package/lib/select/select.less +3 -0
- package/lib/select/select.variable.css +9 -2
- package/lib/select/selectTagInput.d.ts +2 -0
- package/lib/select/type.d.ts +3 -0
- package/lib/shared/index.js +2690 -1
- package/lib/shared/vue-types.d.ts +1 -1
- package/lib/sideslider/index.js +704 -2
- package/lib/sideslider/sideslider.variable.css +6 -2
- package/lib/slider/index.js +1297 -2
- package/lib/slider/slider.css +2 -0
- package/lib/slider/slider.less +2 -0
- package/lib/slider/slider.variable.css +8 -2
- package/lib/steps/index.d.ts +4 -4
- package/lib/steps/index.js +825 -2
- package/lib/steps/steps.css +18 -6
- package/lib/steps/steps.d.ts +3 -3
- package/lib/steps/steps.less +26 -5
- package/lib/steps/steps.variable.css +24 -8
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/animate.variable.css +6 -2
- package/lib/styles/mixins/popper.variable.css +6 -2
- package/lib/styles/mixins/scroll.variable.css +6 -2
- package/lib/styles/reset.variable.css +6 -2
- package/lib/styles/themes/themes.less +7 -3
- package/lib/swiper/index.js +336 -1
- package/lib/swiper/swiper.variable.css +6 -2
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +277 -1
- package/lib/switcher/switcher.d.ts +3 -3
- package/lib/switcher/switcher.variable.css +6 -2
- package/lib/tab/index.js +914 -1
- package/lib/tab/tab.variable.css +6 -2
- package/lib/table/components/table-column.d.ts +6 -5
- package/lib/table/events.d.ts +10 -1
- package/lib/table/index.d.ts +96 -7
- package/lib/table/index.js +6655 -1
- package/lib/table/plugins/body-empty.d.ts +1 -1
- package/lib/table/plugins/head-filter.css +1 -28
- package/lib/table/plugins/head-filter.less +2 -34
- package/lib/table/plugins/head-filter.variable.css +7 -30
- package/lib/table/plugins/head-sort.variable.css +6 -2
- package/lib/table/plugins/settings.d.ts +0 -7
- package/lib/table/plugins/settings.variable.css +6 -2
- package/lib/table/plugins/use-column-resize.d.ts +1 -1
- package/lib/table/plugins/use-draggable.d.ts +17 -0
- package/lib/table/plugins/use-head-cell.d.ts +7 -0
- package/lib/table/plugins/use-pagination.d.ts +2 -1
- package/lib/table/props.d.ts +15 -1
- package/lib/table/table.css +75 -59
- package/lib/table/table.d.ts +16 -1
- package/lib/table/table.less +52 -22
- package/lib/table/table.variable.css +81 -61
- package/lib/table/use-attributes.d.ts +6 -1
- package/lib/table/use-column.d.ts +87 -0
- package/lib/table/use-common.d.ts +0 -1
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table/utils.d.ts +6 -4
- package/lib/table-column/index.d.ts +160 -10
- package/lib/table-column/index.js +779 -1
- package/lib/tag/index.d.ts +4 -21
- package/lib/tag/index.js +229 -1
- package/lib/tag/tag.css +14 -10
- package/lib/tag/tag.d.ts +2 -12
- package/lib/tag/tag.less +31 -27
- package/lib/tag/tag.variable.css +20 -12
- package/lib/tag-input/index.d.ts +3 -0
- package/lib/tag-input/index.js +1674 -1
- package/lib/tag-input/list-tag-render.d.ts +11 -0
- package/lib/tag-input/tag-input.d.ts +1 -0
- package/lib/tag-input/tag-input.variable.css +6 -2
- package/lib/time-picker/index.d.ts +9 -3
- package/lib/time-picker/index.js +71 -1
- package/lib/time-picker/time-picker.css +4 -3
- package/lib/time-picker/time-picker.less +5 -9
- package/lib/time-picker/time-picker.variable.css +10 -5
- package/lib/timeline/index.js +241 -1
- package/lib/timeline/timeline.variable.css +6 -2
- package/lib/transfer/index.js +673 -1
- package/lib/transfer/transfer.css +2 -2
- package/lib/transfer/transfer.less +2 -2
- package/lib/transfer/transfer.variable.css +8 -4
- package/lib/tree/index.d.ts +21 -33
- package/lib/tree/index.js +2584 -1
- package/lib/tree/props.d.ts +4 -8
- package/lib/tree/tree.css +13 -1
- package/lib/tree/tree.d.ts +15 -19
- package/lib/tree/tree.variable.css +19 -3
- package/lib/tree/use-empty.d.ts +1 -3
- package/lib/tree/util.d.ts +1 -0
- package/lib/upload/index.js +2874 -2
- package/lib/upload/upload.type.d.ts +1 -1
- package/lib/upload/upload.variable.css +6 -2
- package/lib/upload/use-file-handler.d.ts +2 -2
- package/lib/virtual-render/index.js +901 -1
- package/lib/virtual-render/use-fix-top.d.ts +18 -0
- package/lib/virtual-render/v-virtual-render.d.ts +6 -1
- package/lib/virtual-render/virtual-render.variable.css +6 -2
- package/package.json +17 -4
- package/lib/cascader/index.js.LICENSE.txt +0 -1
- package/lib/dialog/index.js.LICENSE.txt +0 -1
- package/lib/directives/index.js.LICENSE.txt +0 -14
- package/lib/info-box/index.js.LICENSE.txt +0 -1
- package/lib/input/index.js.LICENSE.txt +0 -1
- package/lib/message/index.js.LICENSE.txt +0 -6
- package/lib/process/index.js.LICENSE.txt +0 -1
- package/lib/search-select/index.js.LICENSE.txt +0 -1
- package/lib/select/index.js.LICENSE.txt +0 -1
- package/lib/sideslider/index.js.LICENSE.txt +0 -1
- package/lib/slider/index.js.LICENSE.txt +0 -1
- package/lib/steps/index.js.LICENSE.txt +0 -1
- package/lib/table/render.d.ts +0 -130
- package/lib/upload/index.js.LICENSE.txt +0 -1
- /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
- /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
- /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
package/lib/upload/index.js
CHANGED
@@ -1,2 +1,2874 @@
|
|
1
|
-
|
2
|
-
import*as e from"../shared";import*as t from"vue";import*as r from"../config-provider";import*as n from"../icon";import*as a from"../progress";import*as o from"../button";var i={4791:e=>{e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],a=e[2],o=e[3];n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&a)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|a>>>15)+o|0)&o|~a&r)+t[3]-1044525330|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&a)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|a>>>15)+o|0)&o|~a&r)+t[7]-45705983|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&a)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|a>>>15)+o|0)&o|~a&r)+t[11]-1990404162|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&a)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|a>>>15)+o|0)&o|~a&r)+t[15]+1236535329|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&a|n&~a)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|a>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&a|n&~a)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|a>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&a|n&~a)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|a>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&a|n&~a)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|a>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^a)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|a>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^a)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|a>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^a)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|a>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^a)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|a>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~a))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[14]-1416354905|0)<<15|a>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~a))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[10]-1051523|0)<<15|a>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~a))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[6]-1560198380|0)<<15|a>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~a))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[2]+718787259|0)<<15|a>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+a|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=a+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function a(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,a,o,i,u,l,c=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(s,n(e.substring(t-64,t)));for(a=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<a;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),l=parseInt(i[1],16)||0,o[14]=u,o[15]=l,r(s,o),s}function i(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=i(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function s(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,a,o,i,u=this.byteLength,l=e(t,u),c=u;return undefined!==r&&(c=e(r,u)),l>c?new ArrayBuffer(0):(n=c-l,a=new ArrayBuffer(n),o=new Uint8Array(a),i=new Uint8Array(this,l,n),o.set(i),a)}}(),s.prototype.append=function(e){return this.appendBinary(l(e)),this},s.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,a=this._buff.length;for(t=64;t<=a;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},s.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=c(r)),this.reset(),r},s.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},s.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},s.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},s.prototype._finish=function(e,t){var n,a,o,i=t;if(e[i>>2]|=128<<(i%4<<3),i>55)for(r(this._hash,e),i=0;i<16;i+=1)e[i]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=a,e[15]=o,r(this._hash,e)},s.hash=function(e,t){return s.hashBinary(l(e),t)},s.hashBinary=function(e,t){var r=u(o(e));return t?c(r):r},s.ArrayBuffer=function(){this.reset()},s.ArrayBuffer.prototype.append=function(e){var t,n,o,i,u,l=(n=this._buff.buffer,o=e,i=!0,(u=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),u.set(new Uint8Array(o),n.byteLength),i?u:u.buffer),c=l.length;for(this._length+=e.byteLength,t=64;t<=c;t+=64)r(this._hash,a(l.subarray(t-64,t)));return this._buff=t-64<c?new Uint8Array(l.buffer.slice(t-64)):new Uint8Array(0),this},s.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=c(r)),this.reset(),r},s.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.ArrayBuffer.prototype.getState=function(){var e,t=s.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},s.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,a=new ArrayBuffer(n),o=new Uint8Array(a);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:a}(e.buff,!0),s.prototype.setState.call(this,e)},s.ArrayBuffer.prototype.destroy=s.prototype.destroy,s.ArrayBuffer.prototype._finish=s.prototype._finish,s.ArrayBuffer.hash=function(e,t){var n=u(function(e){var t,n,o,i,u,l,c=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(s,a(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),l=parseInt(i[1],16)||0,o[14]=u,o[15]=l,r(s,o),s}(new Uint8Array(e)));return t?c(n):n},s}()},7609:(e,t,r)=>{var n=r(7425).default;function a(){e.exports=a=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),u=new V(n||[]);return i(o,"_invoke",{value:S(e,r,u)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function v(){}function m(){}function y(){}var g={};f(g,l,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(U([])));w&&w!==r&&o.call(w,l)&&(g=w);var _=y.prototype=v.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function r(a,i,u,l){var c=p(e[a],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,l)}),(function(e){r("throw",e,u,l)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(o,o):o()}})}function S(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var u=N(i,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=p(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function N(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,N(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=p(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,h;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function U(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:R}}function R(){return{value:void 0,done:!0}}return m.prototype=y,i(_,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:m,configurable:!0}),m.displayName=f(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},x(A.prototype),f(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new A(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(_),f(_,s,"Generator"),f(_,l,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=U,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:U(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,r)=>{var n=r(7609)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};(()=>{l.d(c,{Z:()=>q});const i=(u={classes:()=>e.classes,isNullOrUndef:()=>e.isNullOrUndef,withInstall:()=>e.withInstall},s={},l.d(s,u),s);var u,s;function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===f(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const p=(e=>{var t={};return l.d(t,e),t})({Fragment:()=>t.Fragment,TransitionGroup:()=>t.TransitionGroup,computed:()=>t.computed,createTextVNode:()=>t.createTextVNode,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,h:()=>t.h,isVNode:()=>t.isVNode,mergeProps:()=>t.mergeProps,onBeforeUnmount:()=>t.onBeforeUnmount,ref:()=>t.ref,shallowRef:()=>t.shallowRef,toRefs:()=>t.toRefs,vShow:()=>t.vShow,watch:()=>t.watch,withDirectives:()=>t.withDirectives});var h=l(2841),v=l.n(h);function m(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function u(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}l((n=n.apply(e,t||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var y,g,b="bk-upload";!function(e){e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture"}(y||(y={})),function(e){e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail"}(g||(g={}));var w=[y.BUTTON,y.DRAGGABLE,y.PICTURE];const _={theme:{type:String,default:"draggable",validator:function(e){return!(e&&!w.includes(e)&&(console.error("invalid theme, ".concat(e,", the theme must be one of 【").concat(w.join(" | "),"】")),1))}},files:{type:Array,default:function(){return[]}},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default:function(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default:function(e){return!(!e||0!==e.code)}},headers:{type:Object,default:function(){return{}}},header:{type:[Array,Object],default:function(){return[]}},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:function(){return[]}},formDataAttributes:{type:[Array,Object],default:function(){return[]}},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function A(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,u=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return u}}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const N=(e=>{var t={};return l.d(t,e),t})({useLocale:()=>r.useLocale}),E=(e=>{var t={};return l.d(t,e),t})({ArchiveFill:()=>n.ArchiveFill,AudioFill:()=>n.AudioFill,Del:()=>n.Del,Done:()=>n.Done,ImageFill:()=>n.ImageFill,Plus:()=>n.Plus,RightTurnLine:()=>n.RightTurnLine,TextFill:()=>n.TextFill,Upload:()=>n.Upload,VideoFill:()=>n.VideoFill}),L=(e=>{var t={};return l.d(t,e),t})({default:()=>a.default});function V(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,p.isVNode)(e)}const U=(0,p.defineComponent)({name:"UploadList",props:{theme:_.theme,disabled:_.disabled,files:_.files,multiple:_.multiple},emits:["remove","retry"],setup:function(e,t){var r=t.slots,n=t.emit,a=(0,N.useLocale)("upload"),o=(0,p.toRefs)(e),u=o.theme,l=o.disabled,c=o.multiple,s="".concat(b,"-list"),f=(0,p.computed)((function(){return u.value===y.PICTURE})),h=(0,p.computed)((function(){return f.value&&!c.value})),v=(0,p.computed)((function(){var e;return(0,i.classes)((d(e={},s,!0),d(e,"".concat(s,"--").concat(u.value),!0),d(e,"".concat(s,"--disabled"),l.value),e))}));function m(e,t){n("remove",e,t)}var g=function(e){return[(0,p.withDirectives)((0,p.createVNode)("img",{src:e.url,class:"".concat(s,"__picture-item-thumbnail"),alt:""},null),[[p.vShow,"uploading"!==e.status]]),(0,p.createVNode)(p.Fragment,null,["uploading"===e.status&&(0,p.createVNode)(L.default,{class:"".concat(s,"__picture-item-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:e.percentage},null)]),(0,p.createVNode)(p.Fragment,null,[!l.value&&(0,p.createVNode)("div",{class:"".concat(s,"__picture-item-actions")},[(0,p.createVNode)(E.Del,{class:"action-icon",onClick:function(t){return m(e,t)}},null)])])]},w=function(e){var t,r=null===(t=null==e?void 0:e.raw)||void 0===t?void 0:t.type,n=S((null==r?void 0:r.split("/"))||"",1)[0],a={text:E.TextFill,image:E.ImageFill,application:E.TextFill,video:E.VideoFill,audio:E.AudioFill}[n]||E.TextFill;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(r)&&(a=E.ArchiveFill),(0,p.h)(a,{class:"".concat(s,"__item-file-icon")})},_=function(e){return[(0,p.createVNode)("div",{class:"".concat(s,"__item-icon")},[e.isPic?(0,p.createVNode)("img",{src:e.url,class:"".concat(s,"__item-thumbnail"),alt:""},null):w(e)]),(0,p.createVNode)("div",{class:"".concat(s,"__item-summary")},[(0,p.createVNode)("div",{class:"".concat(s,"__item-name"),title:e.name},[e.name]),"uploading"!==e.status&&(0,p.createVNode)("div",{class:"".concat(s,"__item-message"),title:e.statusText},["success"===e.status&&(0,p.createVNode)(p.Fragment,null,[(0,p.createVNode)(E.Done,{class:"".concat(s,"__item-message-success-icon")},null),e.statusText||a.value.uploadSuccess]),"fail"===e.status&&(0,p.createVNode)(p.Fragment,null,[e.statusText||a.value.uploadFailed])]),"uploading"===e.status&&(0,p.createVNode)(L.default,{class:"".concat(s,"__item-progress"),showText:!1,percent:e.percentage,size:"small"},null),"fail"!==e.status&&(0,p.createVNode)("div",{class:"".concat(s,"__item-speed")},[(0,p.withDirectives)((0,p.createVNode)("span",{class:"".concat(s,"__item-speed-size")},[(t=e.size,r=Math.floor(Math.log(t)/Math.log(1024)),o=t/Math.pow(1024,r),"".concat(o.toFixed(2)).concat(["Bytes","KB","MB","GB","TB"][r]))]),[[p.vShow,e.size]]),(0,p.withDirectives)((0,p.createVNode)("span",{class:"".concat(s,"__item-speed-percentage")},[e.percentage,(0,p.createTextVNode)("%")]),[[p.vShow,"uploading"===e.status]])]),!l.value&&(0,p.createVNode)("div",{class:"".concat(s,"__item-actions")},["fail"===e.status&&(0,p.createVNode)(E.RightTurnLine,{class:"".concat(s,"__item-retry-icon"),onClick:function(t){return function(e,t){n("retry",e,t)}(e,t)}},null),(0,p.createVNode)(E.Del,{class:"".concat(s,"__item-del-icon"),onClick:function(t){return m(e,t)}},null)])])];var t,r,o};return function(){var t,n,a;return(0,p.createVNode)(p.Fragment,null,[h.value?(null==r?void 0:r.innerTrigger)&&(null==r?void 0:r.innerTrigger(null===(t=e.files)||void 0===t?void 0:t[0])):(0,p.createVNode)("ul",{class:v.value},[f.value?(0,p.createVNode)(p.TransitionGroup,{name:"".concat(s,"__item")},V(a=e.files.map((function(e){var t,n=(0,i.classes)((d(t={},"".concat(s,"__item"),!0),d(t,"".concat(s,"__item-picture"),!0),d(t,"".concat(s,"__item--").concat(e.status),!0),t));return(0,p.createVNode)("li",{key:e.uid,class:n},[(null==r?void 0:r.file)?r.file({file:e}):g(e)])})))?a:{default:function(){return[a]}}):(0,p.createVNode)(p.TransitionGroup,{name:"".concat(s,"__item")},V(n=e.files.map((function(e){var t,n=(0,i.classes)((d(t={},"".concat(s,"__item"),!0),d(t,"".concat(s,"__item--").concat(e.status),!0),t));return(0,p.createVNode)("li",{key:e.uid,class:n},[(null==r?void 0:r.file)?r.file({file:e}):_(e)])})))?n:{default:function(){return[n]}}),(null==r?void 0:r.innerTrigger)&&(null==r?void 0:r.innerTrigger())])])}}}),R=(e=>{var t={};return l.d(t,e),t})({default:()=>o.default}),F=(0,p.defineComponent)({name:"UploadTrigger",props:{theme:_.theme,disabled:_.disabled,multiple:_.multiple,accept:_.accept,file:{type:Object}},emits:["change","remove"],setup:function(e,t){var r=t.slots,n=t.emit,a=(0,N.useLocale)("upload"),o=(0,p.toRefs)(e),u=o.theme,l=o.disabled,c=o.file,s=o.multiple,f=o.accept,h="".concat(b,"-trigger"),v=(0,p.computed)((function(){return u.value===y.BUTTON})),m=(0,p.computed)((function(){return u.value===y.DRAGGABLE})),g=(0,p.computed)((function(){return u.value===y.PICTURE})),w=(0,p.computed)((function(){return g.value&&!s.value})),_=(0,p.computed)((function(){return g.value&&!f.value?"image/png,image/jpeg,image/jpg":f.value})),x=(0,p.ref)(null),A=(0,p.computed)((function(){var e,t,r,n;return(0,i.classes)((d(e={},h,!0),d(e,"".concat(h,"--").concat(u.value),!0),d(e,"".concat(h,"--single-picture"),w.value),d(e,"".concat(h,"--has-file"),null!==(t=c.value)&&void 0!==t&&t),d(e,"".concat(h,"--").concat(null===(r=c.value)||void 0===r?void 0:r.status),null!==(n=c.value)&&void 0!==n&&n),d(e,"".concat(h,"--dragover"),T.value),d(e,"".concat(h,"--disabled"),l.value),e))})),S=function(){x.value.value=null,x.value.click()},V=function(e){var t=e.target.files;n("change",Array.from(t))},U=function(){e.disabled||S()},F=function(e){e.defaultPrevented||e.target!==e.currentTarget||("Enter"!==e.code&&"Space"!==e.code||S(),e.preventDefault())},T=(0,p.ref)(!1),O=function(t){return[(0,p.withDirectives)((0,p.createVNode)("img",{src:t.url,class:"".concat(h,"__picture-thumbnail"),alt:""},null),[[p.vShow,"uploading"!==t.status]]),(0,p.createVNode)(p.Fragment,null,["uploading"===t.status&&(0,p.createVNode)(L.default,{class:"".concat(h,"__picture-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:t.percentage},null)]),(0,p.createVNode)(p.Fragment,null,[!e.disabled&&(0,p.createVNode)("div",{class:"".concat(h,"__picture-actions")},[(0,p.createVNode)(E.Del,{class:"action-icon",onClick:function(e){return function(e,t){n("remove",e,t),t.stopPropagation(),t.preventDefault()}(t,e)}},null)])])]};return function(){var t;return(0,p.createVNode)("div",{class:A.value,tabindex:"0",onClick:U,onKeydown:F},[r.trigger?[r.trigger(),null===(t=null==r?void 0:r.default)||void 0===t?void 0:t.call(r)]:v.value?(0,p.createVNode)(R.default,{disabled:l.value},{default:function(){return[(0,p.createVNode)(E.Upload,{class:"".concat(h,"__button-icon")},null),(0,p.createVNode)("span",{class:"".concat(h,"__button-text")},[a.value.uploadLabel])]}}):m.value?function(){var e=(0,i.classes)(d({},"".concat(h,"__draggable"),!0));return(0,p.createVNode)("div",{class:e,onDrop:function(e){if(!l.value){e.preventDefault(),T.value=!1;var t=Array.from(e.dataTransfer.files);if(_.value){var r=t.filter((function(e){var t=e.type,r=e.name,n=r.includes(".")?".".concat(r.split(".").pop()):"",a=t.replace(/\/.*$/,"");return _.value.split(",").map((function(e){return e.trim()})).filter((function(e){return e})).some((function(e){return e.startsWith(".")?n===e:/\/\*$/.test(e)?a===e.replace(/\/\*$/,""):!!/^[^/]+\/[^/]+$/.test(e)&&t===e}))}));n("change",r)}else n("change",t)}},onDragover:function(e){e.preventDefault(),T.value=!0},onDragleave:function(){T.value=!1}},[r.default?r.default():(0,p.createVNode)(p.Fragment,null,[(0,p.createVNode)(E.Upload,{class:"".concat(h,"__draggable-icon")},null),(0,p.createVNode)("div",{class:"".concat(h,"__draggable-text")},[a.value.drapFileOr,(0,p.createVNode)("span",{class:"".concat(h,"__draggable-upload-link")},[a.value.clickUpload])])])])}():g.value?(0,p.createVNode)(p.Fragment,null,[w.value&&e.file?O(e.file):(0,p.createVNode)(p.Fragment,null,[r.default?r.default():(0,p.createVNode)("div",{class:"".concat(h,"__picture-inner")},[(0,p.createVNode)(E.Plus,{class:"".concat(h,"__picture-icon")},null),(0,p.createVNode)("div",{class:"".concat(h,"__picture-text")},[a.value.clickUpload])])])]):void 0,(0,p.createVNode)("input",{ref:x,class:"".concat(h,"__input-file"),tabindex:"-1",onChange:V,accept:_.value,multiple:s.value,disabled:l.value,type:"file"},null)])}}});function T(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var O=l(4791),C=l.n(O);function j(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}var k=function(e){if("undefined"==typeof XMLHttpRequest)throw new Error("XMLHttpRequest is undefined");var t=new XMLHttpRequest,r=e.action;t.upload&&t.upload.addEventListener("progress",(function(t){var r=t;r.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(r)}));var n=new FormData;if(e.data){var a=e.data;Array.isArray(a)||(a=[a]),a.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var a=S(r[t],2),o=a[0],i=a[1];Array.isArray(i)?n.append.apply(n,[o].concat(T(i))):n.append(o,i)}}))}if(e.formDataAttributes){var o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach((function(e){Array.isArray(e.value)?n.append.apply(n,[e.name].concat(T(e.value))):n.append(e.name,e.value)}))}if(n.append(e.filename,e.file,e.file.name),t.addEventListener("error",(function(){e.onError(new Error("An error occurred during upload"))})),t.addEventListener("load",(function(){if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(j(t))})),t.addEventListener("loadend",(function(){e.onComplete()})),t.open(e.method,r,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach((function(e){var r=e.name,n=e.value;t.setRequestHeader(r,n)}));else{var u=e.header.name,l=e.header.value;t.setRequestHeader(u,l)}var c=e.headers||{};if(c instanceof Headers)c.forEach((function(e,r){return t.setRequestHeader(r,e)}));else for(var s=0,f=Object.entries(c);s<f.length;s++){var d=S(f[s],2),p=d[0],h=d[1];(0,i.isNullOrUndef)(h)||t.setRequestHeader(p,String(h))}return t.send(n),t},P=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,B=function(e){return m(void 0,void 0,void 0,v().mark((function t(){var r,n,a,o,i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1024*e.chunkSize*1024,n=e.file){t.next=4;break}throw new Error("File not found");case 4:return a=Math.ceil(n.size/r),t.next=7,I(n,r);case 7:return o=t.sent,z(e,n,a,o,i=[],r),t.next=12,Promise.all(i).then((function(){var t={size:n.size,name:n.name,total:a,hash:o},r=new XMLHttpRequest;r.open(e.method,e.mergeUrl,!0),r.onreadystatechange=function(){if(4===r.readyState){if(r.status<200||r.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(j(r))}},r.onloadend=function(){e.onComplete()},r.setRequestHeader("Content-type","application/JSON"),r.send(JSON.stringify(t))}));case 12:case"end":return t.stop()}}),t)})))},z=function(e,t,r,n,a,o){for(var u=function(u){var l=new Promise((function(a,l){var c=u*o,s=Math.min(t.size,c+o),f=new FormData;if(e.data){var d=e.data;Array.isArray(d)||(d=[d]),d.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=S(r[t],2),a=n[0],o=n[1];Array.isArray(o)?f.append.apply(f,[a].concat(T(o))):f.append(a,o)}}))}if(e.formDataAttributes){var p=e.formDataAttributes;Array.isArray(p)||(p=[p]),p.forEach((function(e){Array.isArray(e.value)?f.append.apply(f,[e.name].concat(T(e.value))):f.append(e.name,e.value)}))}f.append("file",P.call(t,c,s)),f.append("name",t.name),f.append("total",r.toString()),f.append("index",u.toString()),f.append("size",t.size.toString()),f.append("hash",n.toString());var h=new XMLHttpRequest;if(h.onreadystatechange=function(){if(4===h.readyState){var t=j(h);h.status<200||h.status>=300?(l(t),e.onError(new Error("An error occurred during upload"))):a("reponseText")}},h.upload.addEventListener("progress",(function(t){var r=t;e.onProgress(r,u)}),!1),e.withCredentials&&"withCredentials"in h&&(h.withCredentials=!0),h.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach((function(e){var t=e.name,r=e.value;h.setRequestHeader(t,r)}));else{var v=e.header.name,m=e.header.value;h.setRequestHeader(v,m)}var y=e.headers||{};if(y instanceof Headers)y.forEach((function(e,t){return h.setRequestHeader(t,e)}));else for(var g=0,b=Object.entries(y);g<b.length;g++){var w=S(b[g],2),_=w[0],x=w[1];(0,i.isNullOrUndef)(x)||h.setRequestHeader(_,String(x))}h.send(f)}));a.push(l)},l=0;l<r;l++)u(l)},I=function(e,t){return new Promise((function(r,n){var a=Math.ceil(e.size/t),o=0,i=new(C().ArrayBuffer),u=new FileReader;function l(){var r=o*t,n=r+t>=e.size?e.size:r+t;u.readAsArrayBuffer(P.call(e,r,n))}u.onload=function(t){if(i.append(t.target.result),(o+=1)<a)l();else{var n=i.end(),u=new(C());u.append(n),u.append(e.name);var c=u.end();r(c)}},u.onerror=function(){n(new Error("File slcie failed"))},l()})).catch((function(e){console.log(e)}))};function D(e){return Date.now()+e}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const G=(0,p.defineComponent)({name:"Upload",props:_,emits:["exceed","progress","success","error","delete","done"],setup:function(e,t){var r=t.slots,n=t.emit,a=t.expose,o=(0,p.shallowRef)({}),u=(0,p.computed)((function(){return e.theme===y.PICTURE})),l=(0,p.computed)((function(){return u.value&&!e.multiple})),c=(0,p.computed)((function(){var t,r;return(0,i.classes)((d(t={},b,!0),d(t,"".concat(b,"--").concat(e.theme),!0),d(t,"".concat(b,"--disabled"),e.disabled),d(t,"".concat(b,"--single-picture"),l.value),d(t,e.extCls,null!==(r=e.extCls)&&void 0!==r&&r),t))})),s=(0,p.computed)((function(){return{theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept}})),f=function(e,t){var r=(0,p.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),n=(0,p.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),a=(0,p.ref)([]);function o(e){return a.value.find((function(t){return t.uid===e.uid}))}var i=0;return(0,p.watch)((function(){return e.files}),(function(e){a.value=e.map((function(e){var t,r;return i+=1,Object.assign(Object.assign({},e),{uid:null!==(t=e.uid)&&void 0!==t?t:D(i),status:null!==(r=e.status)&&void 0!==r?r:g.SUCCESS})}))}),{immediate:!0,deep:!0}),{fileList:a,handlePreprocess:function(t){var o;i+=1,t.uid=D(i);var u={uid:t.uid,name:t.name,status:g.NEW,size:t.size,raw:t},l=t.type.startsWith("image/"),c=null;if(l){try{u.url=window.URL.createObjectURL(t)}catch(e){console.error(e)}u.isPic=!0}return e.validateName&&!(null===(o=e.validateName)||void 0===o?void 0:o.test(u.name))&&(u.status=g.FAIL,u.statusText="invalid filename",c=new Error(u.statusText)),l&&t.size>r.value*Math.pow(1024,2)&&(u.status=g.FAIL,u.statusText="invalid file size",c=new Error(u.statusText)),!l&&t.size>n.value*Math.pow(1024,2)&&(u.status=g.FAIL,u.statusText="invalid file size",c=new Error(u.statusText)),a.value.push(u),c},handleRemove:function(r){var n;return m(this,void 0,void 0,v().mark((function i(){var u,l;return v().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(u=r instanceof File?o(r):r,l=function(e){var r;t.onRemove(e,a.value),a.value.splice(a.value.indexOf(u),1),(null===(r=e.url)||void 0===r?void 0:r.startsWith("blob:"))&&URL.revokeObjectURL(e.url)},!e.beforeRemove){i.next=9;break}return i.next=5,null===(n=e.beforeRemove)||void 0===n?void 0:n.call(e,u,a.value);case 5:!1!==i.sent&&l(u),i.next=10;break;case 9:l(u);case 10:case"end":return i.stop()}}),i)})))},handleError:function(e,t,r){return m(this,void 0,void 0,v().mark((function n(){var a;return v().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=o(t)){n.next=3;break}return n.abrupt("return");case 3:a.status="fail",a.statusText=e.message,a.response=r;case 6:case"end":return n.stop()}}),n)})))},handleSuccess:function(e,t){return m(this,void 0,void 0,v().mark((function r(){var n;return v().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=o(t)){r.next=3;break}return r.abrupt("return");case 3:n.status="success",n.response=e;case 5:case"end":return r.stop()}}),r)})))},handleProgress:function(e,t){return m(this,void 0,void 0,v().mark((function r(){var n;return v().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=o(t)){r.next=3;break}return r.abrupt("return");case 3:n.status="uploading",n.percentage=Math.round(e.percent);case 5:case"end":return r.stop()}}),r)})))}}}(e,{onRemove:function(e,t){!function(e){var t=o.value;e&&(t=d({},e.uid,o.value[e.uid])),Object.keys(t).forEach((function(e){if(t[e]instanceof XMLHttpRequest){var r=t[e];null==r||r.abort()}delete o.value[e]}))}(e),n("delete",e,t)}}),h=f.fileList,w=f.handlePreprocess,_=f.handleRemove,x=f.handleProgress,A=f.handleSuccess,S=f.handleError;function N(t){if(t.length)if(e.limit&&h.value.length+t.length>e.limit)n("exceed",t,h.value);else{var r=t;e.multiple&&1!==e.limit||(r=t.slice(0,1));var a,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}(r);try{for(o.s();!(a=o.n()).done;){var i=a.value,u=w(i);if(u)return void n("error",i,h.value,u);e.autoUpload&&L(i,r)}}catch(e){o.e(e)}finally{o.f()}}}function E(e){V(e.raw)}function L(t,r){var n;return m(this,void 0,void 0,v().mark((function a(){var o;return v().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.beforeUpload){a.next=2;break}return a.abrupt("return",V(t,r));case 2:return a.prev=2,a.next=5,null===(n=e.beforeUpload)||void 0===n?void 0:n.call(e,t);case 5:o=a.sent,a.next=11;break;case 8:a.prev=8,a.t0=a.catch(2),o=!1;case 11:if(!1!==o){a.next=14;break}return _(t),a.abrupt("return");case 14:V(t,r);case 15:case"end":return a.stop()}}),a,null,[[2,8]])})))}function V(t,r){var a=e.headers,i=e.header,u=e.data,l=e.formDataAttributes,c=e.method,s=e.withCredentials,f=e.name,d=e.url,p=e.sliceUrl,v=e.mergeUrl,m=e.chunkSize,y=e.customRequest,g=t.uid,b={headers:a,header:i,withCredentials:s,file:t,data:u,formDataAttributes:l,method:c,filename:f,action:d,sliceUrl:p,mergeUrl:v,chunkSize:m,onProgress:function(e){x(e,t),n("progress",e,t,h.value)},onSuccess:function(r){var a,i=r;if(null===(a=null==e?void 0:e.handleResCode)||void 0===a?void 0:a.call(e,i))A(r,t),n("success",r,t,h.value);else{var u=new Error((null==i?void 0:i.message)||"unknow error");S(u,t,r),n("error",t,h.value,u)}delete o.value[g]},onError:function(e){S(e,t),n("error",t,h.value,e),delete o.value[g]},onComplete:function(){r&&r.indexOf(t)===r.length-1&&n("done",h.value)}},w=e.sliceUpload?B:k;y&&(w=y);var _=w(b);o.value[g]=_,_ instanceof Promise&&_.then(b.onSuccess,b.onError)}return(0,p.onBeforeUnmount)((function(){h.value.forEach((function(e){var t=e.url;(null==t?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(t)}))})),a({handleRemove:_,handleRetry:E}),function(){return(0,p.createVNode)("div",{class:c.value},[!u.value&&(0,p.createVNode)(F,(0,p.mergeProps)(s.value,{onChange:N}),r),r.tip?r.tip():e.tip&&(0,p.createVNode)("div",{class:"".concat(b,"__tip")},[e.tip]),(0,p.createVNode)(U,{files:h.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:_,onRetry:E},{innerTrigger:function(e){return u.value&&(0,p.createVNode)(F,(0,p.mergeProps)(s.value,{file:e,onChange:N,onRemove:_}),r)},file:r.file})])}}}),q=(0,i.withInstall)(G)})();var s=c.Z;export{s as default};
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__progress_ed4d3a99__ from "../progress";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__button_59c00871__ from "../button";
|
7
|
+
/******/ var __webpack_modules__ = ({
|
8
|
+
|
9
|
+
/***/ 4791:
|
10
|
+
/***/ ((module) => {
|
11
|
+
|
12
|
+
(function (factory) {
|
13
|
+
if (true) {
|
14
|
+
// Node/CommonJS
|
15
|
+
module.exports = factory();
|
16
|
+
} else { var glob; }
|
17
|
+
}(function (undefined) {
|
18
|
+
|
19
|
+
'use strict';
|
20
|
+
|
21
|
+
/*
|
22
|
+
* Fastest md5 implementation around (JKM md5).
|
23
|
+
* Credits: Joseph Myers
|
24
|
+
*
|
25
|
+
* @see http://www.myersdaily.org/joseph/javascript/md5-text.html
|
26
|
+
* @see http://jsperf.com/md5-shootout/7
|
27
|
+
*/
|
28
|
+
|
29
|
+
/* this function is much faster,
|
30
|
+
so if possible we use it. Some IEs
|
31
|
+
are the only ones I know of that
|
32
|
+
need the idiotic second function,
|
33
|
+
generated by an if clause. */
|
34
|
+
var add32 = function (a, b) {
|
35
|
+
return (a + b) & 0xFFFFFFFF;
|
36
|
+
},
|
37
|
+
hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
38
|
+
|
39
|
+
|
40
|
+
function cmn(q, a, b, x, s, t) {
|
41
|
+
a = add32(add32(a, q), add32(x, t));
|
42
|
+
return add32((a << s) | (a >>> (32 - s)), b);
|
43
|
+
}
|
44
|
+
|
45
|
+
function md5cycle(x, k) {
|
46
|
+
var a = x[0],
|
47
|
+
b = x[1],
|
48
|
+
c = x[2],
|
49
|
+
d = x[3];
|
50
|
+
|
51
|
+
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
|
52
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
53
|
+
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
|
54
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
55
|
+
c += (d & a | ~d & b) + k[2] + 606105819 | 0;
|
56
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
57
|
+
b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
|
58
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
59
|
+
a += (b & c | ~b & d) + k[4] - 176418897 | 0;
|
60
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
61
|
+
d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
|
62
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
63
|
+
c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
|
64
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
65
|
+
b += (c & d | ~c & a) + k[7] - 45705983 | 0;
|
66
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
67
|
+
a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
|
68
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
69
|
+
d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
|
70
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
71
|
+
c += (d & a | ~d & b) + k[10] - 42063 | 0;
|
72
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
73
|
+
b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
|
74
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
75
|
+
a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
|
76
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
77
|
+
d += (a & b | ~a & c) + k[13] - 40341101 | 0;
|
78
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
79
|
+
c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
|
80
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
81
|
+
b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
|
82
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
83
|
+
|
84
|
+
a += (b & d | c & ~d) + k[1] - 165796510 | 0;
|
85
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
86
|
+
d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
|
87
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
88
|
+
c += (d & b | a & ~b) + k[11] + 643717713 | 0;
|
89
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
90
|
+
b += (c & a | d & ~a) + k[0] - 373897302 | 0;
|
91
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
92
|
+
a += (b & d | c & ~d) + k[5] - 701558691 | 0;
|
93
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
94
|
+
d += (a & c | b & ~c) + k[10] + 38016083 | 0;
|
95
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
96
|
+
c += (d & b | a & ~b) + k[15] - 660478335 | 0;
|
97
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
98
|
+
b += (c & a | d & ~a) + k[4] - 405537848 | 0;
|
99
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
100
|
+
a += (b & d | c & ~d) + k[9] + 568446438 | 0;
|
101
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
102
|
+
d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
|
103
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
104
|
+
c += (d & b | a & ~b) + k[3] - 187363961 | 0;
|
105
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
106
|
+
b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
|
107
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
108
|
+
a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
|
109
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
110
|
+
d += (a & c | b & ~c) + k[2] - 51403784 | 0;
|
111
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
112
|
+
c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
|
113
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
114
|
+
b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
|
115
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
116
|
+
|
117
|
+
a += (b ^ c ^ d) + k[5] - 378558 | 0;
|
118
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
119
|
+
d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
|
120
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
121
|
+
c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
|
122
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
123
|
+
b += (c ^ d ^ a) + k[14] - 35309556 | 0;
|
124
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
125
|
+
a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
|
126
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
127
|
+
d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
|
128
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
129
|
+
c += (d ^ a ^ b) + k[7] - 155497632 | 0;
|
130
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
131
|
+
b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
|
132
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
133
|
+
a += (b ^ c ^ d) + k[13] + 681279174 | 0;
|
134
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
135
|
+
d += (a ^ b ^ c) + k[0] - 358537222 | 0;
|
136
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
137
|
+
c += (d ^ a ^ b) + k[3] - 722521979 | 0;
|
138
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
139
|
+
b += (c ^ d ^ a) + k[6] + 76029189 | 0;
|
140
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
141
|
+
a += (b ^ c ^ d) + k[9] - 640364487 | 0;
|
142
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
143
|
+
d += (a ^ b ^ c) + k[12] - 421815835 | 0;
|
144
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
145
|
+
c += (d ^ a ^ b) + k[15] + 530742520 | 0;
|
146
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
147
|
+
b += (c ^ d ^ a) + k[2] - 995338651 | 0;
|
148
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
149
|
+
|
150
|
+
a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
|
151
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
152
|
+
d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
|
153
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
154
|
+
c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
|
155
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
156
|
+
b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
|
157
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
158
|
+
a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
|
159
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
160
|
+
d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
|
161
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
162
|
+
c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
|
163
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
164
|
+
b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
|
165
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
166
|
+
a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
|
167
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
168
|
+
d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
|
169
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
170
|
+
c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
|
171
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
172
|
+
b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
|
173
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
174
|
+
a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
|
175
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
176
|
+
d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
|
177
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
178
|
+
c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
|
179
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
180
|
+
b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
|
181
|
+
b = (b << 21 | b >>> 11) + c | 0;
|
182
|
+
|
183
|
+
x[0] = a + x[0] | 0;
|
184
|
+
x[1] = b + x[1] | 0;
|
185
|
+
x[2] = c + x[2] | 0;
|
186
|
+
x[3] = d + x[3] | 0;
|
187
|
+
}
|
188
|
+
|
189
|
+
function md5blk(s) {
|
190
|
+
var md5blks = [],
|
191
|
+
i; /* Andy King said do it this way. */
|
192
|
+
|
193
|
+
for (i = 0; i < 64; i += 4) {
|
194
|
+
md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
|
195
|
+
}
|
196
|
+
return md5blks;
|
197
|
+
}
|
198
|
+
|
199
|
+
function md5blk_array(a) {
|
200
|
+
var md5blks = [],
|
201
|
+
i; /* Andy King said do it this way. */
|
202
|
+
|
203
|
+
for (i = 0; i < 64; i += 4) {
|
204
|
+
md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
|
205
|
+
}
|
206
|
+
return md5blks;
|
207
|
+
}
|
208
|
+
|
209
|
+
function md51(s) {
|
210
|
+
var n = s.length,
|
211
|
+
state = [1732584193, -271733879, -1732584194, 271733878],
|
212
|
+
i,
|
213
|
+
length,
|
214
|
+
tail,
|
215
|
+
tmp,
|
216
|
+
lo,
|
217
|
+
hi;
|
218
|
+
|
219
|
+
for (i = 64; i <= n; i += 64) {
|
220
|
+
md5cycle(state, md5blk(s.substring(i - 64, i)));
|
221
|
+
}
|
222
|
+
s = s.substring(i - 64);
|
223
|
+
length = s.length;
|
224
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
225
|
+
for (i = 0; i < length; i += 1) {
|
226
|
+
tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
|
227
|
+
}
|
228
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
229
|
+
if (i > 55) {
|
230
|
+
md5cycle(state, tail);
|
231
|
+
for (i = 0; i < 16; i += 1) {
|
232
|
+
tail[i] = 0;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
// Beware that the final length might not fit in 32 bits so we take care of that
|
237
|
+
tmp = n * 8;
|
238
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
239
|
+
lo = parseInt(tmp[2], 16);
|
240
|
+
hi = parseInt(tmp[1], 16) || 0;
|
241
|
+
|
242
|
+
tail[14] = lo;
|
243
|
+
tail[15] = hi;
|
244
|
+
|
245
|
+
md5cycle(state, tail);
|
246
|
+
return state;
|
247
|
+
}
|
248
|
+
|
249
|
+
function md51_array(a) {
|
250
|
+
var n = a.length,
|
251
|
+
state = [1732584193, -271733879, -1732584194, 271733878],
|
252
|
+
i,
|
253
|
+
length,
|
254
|
+
tail,
|
255
|
+
tmp,
|
256
|
+
lo,
|
257
|
+
hi;
|
258
|
+
|
259
|
+
for (i = 64; i <= n; i += 64) {
|
260
|
+
md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
|
261
|
+
}
|
262
|
+
|
263
|
+
// Not sure if it is a bug, however IE10 will always produce a sub array of length 1
|
264
|
+
// containing the last element of the parent array if the sub array specified starts
|
265
|
+
// beyond the length of the parent array - weird.
|
266
|
+
// https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
|
267
|
+
a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
|
268
|
+
|
269
|
+
length = a.length;
|
270
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
271
|
+
for (i = 0; i < length; i += 1) {
|
272
|
+
tail[i >> 2] |= a[i] << ((i % 4) << 3);
|
273
|
+
}
|
274
|
+
|
275
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
276
|
+
if (i > 55) {
|
277
|
+
md5cycle(state, tail);
|
278
|
+
for (i = 0; i < 16; i += 1) {
|
279
|
+
tail[i] = 0;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
// Beware that the final length might not fit in 32 bits so we take care of that
|
284
|
+
tmp = n * 8;
|
285
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
286
|
+
lo = parseInt(tmp[2], 16);
|
287
|
+
hi = parseInt(tmp[1], 16) || 0;
|
288
|
+
|
289
|
+
tail[14] = lo;
|
290
|
+
tail[15] = hi;
|
291
|
+
|
292
|
+
md5cycle(state, tail);
|
293
|
+
|
294
|
+
return state;
|
295
|
+
}
|
296
|
+
|
297
|
+
function rhex(n) {
|
298
|
+
var s = '',
|
299
|
+
j;
|
300
|
+
for (j = 0; j < 4; j += 1) {
|
301
|
+
s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
|
302
|
+
}
|
303
|
+
return s;
|
304
|
+
}
|
305
|
+
|
306
|
+
function hex(x) {
|
307
|
+
var i;
|
308
|
+
for (i = 0; i < x.length; i += 1) {
|
309
|
+
x[i] = rhex(x[i]);
|
310
|
+
}
|
311
|
+
return x.join('');
|
312
|
+
}
|
313
|
+
|
314
|
+
// In some cases the fast add32 function cannot be used..
|
315
|
+
if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {
|
316
|
+
add32 = function (x, y) {
|
317
|
+
var lsw = (x & 0xFFFF) + (y & 0xFFFF),
|
318
|
+
msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
319
|
+
return (msw << 16) | (lsw & 0xFFFF);
|
320
|
+
};
|
321
|
+
}
|
322
|
+
|
323
|
+
// ---------------------------------------------------
|
324
|
+
|
325
|
+
/**
|
326
|
+
* ArrayBuffer slice polyfill.
|
327
|
+
*
|
328
|
+
* @see https://github.com/ttaubert/node-arraybuffer-slice
|
329
|
+
*/
|
330
|
+
|
331
|
+
if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
|
332
|
+
(function () {
|
333
|
+
function clamp(val, length) {
|
334
|
+
val = (val | 0) || 0;
|
335
|
+
|
336
|
+
if (val < 0) {
|
337
|
+
return Math.max(val + length, 0);
|
338
|
+
}
|
339
|
+
|
340
|
+
return Math.min(val, length);
|
341
|
+
}
|
342
|
+
|
343
|
+
ArrayBuffer.prototype.slice = function (from, to) {
|
344
|
+
var length = this.byteLength,
|
345
|
+
begin = clamp(from, length),
|
346
|
+
end = length,
|
347
|
+
num,
|
348
|
+
target,
|
349
|
+
targetArray,
|
350
|
+
sourceArray;
|
351
|
+
|
352
|
+
if (to !== undefined) {
|
353
|
+
end = clamp(to, length);
|
354
|
+
}
|
355
|
+
|
356
|
+
if (begin > end) {
|
357
|
+
return new ArrayBuffer(0);
|
358
|
+
}
|
359
|
+
|
360
|
+
num = end - begin;
|
361
|
+
target = new ArrayBuffer(num);
|
362
|
+
targetArray = new Uint8Array(target);
|
363
|
+
|
364
|
+
sourceArray = new Uint8Array(this, begin, num);
|
365
|
+
targetArray.set(sourceArray);
|
366
|
+
|
367
|
+
return target;
|
368
|
+
};
|
369
|
+
})();
|
370
|
+
}
|
371
|
+
|
372
|
+
// ---------------------------------------------------
|
373
|
+
|
374
|
+
/**
|
375
|
+
* Helpers.
|
376
|
+
*/
|
377
|
+
|
378
|
+
function toUtf8(str) {
|
379
|
+
if (/[\u0080-\uFFFF]/.test(str)) {
|
380
|
+
str = unescape(encodeURIComponent(str));
|
381
|
+
}
|
382
|
+
|
383
|
+
return str;
|
384
|
+
}
|
385
|
+
|
386
|
+
function utf8Str2ArrayBuffer(str, returnUInt8Array) {
|
387
|
+
var length = str.length,
|
388
|
+
buff = new ArrayBuffer(length),
|
389
|
+
arr = new Uint8Array(buff),
|
390
|
+
i;
|
391
|
+
|
392
|
+
for (i = 0; i < length; i += 1) {
|
393
|
+
arr[i] = str.charCodeAt(i);
|
394
|
+
}
|
395
|
+
|
396
|
+
return returnUInt8Array ? arr : buff;
|
397
|
+
}
|
398
|
+
|
399
|
+
function arrayBuffer2Utf8Str(buff) {
|
400
|
+
return String.fromCharCode.apply(null, new Uint8Array(buff));
|
401
|
+
}
|
402
|
+
|
403
|
+
function concatenateArrayBuffers(first, second, returnUInt8Array) {
|
404
|
+
var result = new Uint8Array(first.byteLength + second.byteLength);
|
405
|
+
|
406
|
+
result.set(new Uint8Array(first));
|
407
|
+
result.set(new Uint8Array(second), first.byteLength);
|
408
|
+
|
409
|
+
return returnUInt8Array ? result : result.buffer;
|
410
|
+
}
|
411
|
+
|
412
|
+
function hexToBinaryString(hex) {
|
413
|
+
var bytes = [],
|
414
|
+
length = hex.length,
|
415
|
+
x;
|
416
|
+
|
417
|
+
for (x = 0; x < length - 1; x += 2) {
|
418
|
+
bytes.push(parseInt(hex.substr(x, 2), 16));
|
419
|
+
}
|
420
|
+
|
421
|
+
return String.fromCharCode.apply(String, bytes);
|
422
|
+
}
|
423
|
+
|
424
|
+
// ---------------------------------------------------
|
425
|
+
|
426
|
+
/**
|
427
|
+
* SparkMD5 OOP implementation.
|
428
|
+
*
|
429
|
+
* Use this class to perform an incremental md5, otherwise use the
|
430
|
+
* static methods instead.
|
431
|
+
*/
|
432
|
+
|
433
|
+
function SparkMD5() {
|
434
|
+
// call reset to init the instance
|
435
|
+
this.reset();
|
436
|
+
}
|
437
|
+
|
438
|
+
/**
|
439
|
+
* Appends a string.
|
440
|
+
* A conversion will be applied if an utf8 string is detected.
|
441
|
+
*
|
442
|
+
* @param {String} str The string to be appended
|
443
|
+
*
|
444
|
+
* @return {SparkMD5} The instance itself
|
445
|
+
*/
|
446
|
+
SparkMD5.prototype.append = function (str) {
|
447
|
+
// Converts the string to utf8 bytes if necessary
|
448
|
+
// Then append as binary
|
449
|
+
this.appendBinary(toUtf8(str));
|
450
|
+
|
451
|
+
return this;
|
452
|
+
};
|
453
|
+
|
454
|
+
/**
|
455
|
+
* Appends a binary string.
|
456
|
+
*
|
457
|
+
* @param {String} contents The binary string to be appended
|
458
|
+
*
|
459
|
+
* @return {SparkMD5} The instance itself
|
460
|
+
*/
|
461
|
+
SparkMD5.prototype.appendBinary = function (contents) {
|
462
|
+
this._buff += contents;
|
463
|
+
this._length += contents.length;
|
464
|
+
|
465
|
+
var length = this._buff.length,
|
466
|
+
i;
|
467
|
+
|
468
|
+
for (i = 64; i <= length; i += 64) {
|
469
|
+
md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
|
470
|
+
}
|
471
|
+
|
472
|
+
this._buff = this._buff.substring(i - 64);
|
473
|
+
|
474
|
+
return this;
|
475
|
+
};
|
476
|
+
|
477
|
+
/**
|
478
|
+
* Finishes the incremental computation, reseting the internal state and
|
479
|
+
* returning the result.
|
480
|
+
*
|
481
|
+
* @param {Boolean} raw True to get the raw string, false to get the hex string
|
482
|
+
*
|
483
|
+
* @return {String} The result
|
484
|
+
*/
|
485
|
+
SparkMD5.prototype.end = function (raw) {
|
486
|
+
var buff = this._buff,
|
487
|
+
length = buff.length,
|
488
|
+
i,
|
489
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
490
|
+
ret;
|
491
|
+
|
492
|
+
for (i = 0; i < length; i += 1) {
|
493
|
+
tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
|
494
|
+
}
|
495
|
+
|
496
|
+
this._finish(tail, length);
|
497
|
+
ret = hex(this._hash);
|
498
|
+
|
499
|
+
if (raw) {
|
500
|
+
ret = hexToBinaryString(ret);
|
501
|
+
}
|
502
|
+
|
503
|
+
this.reset();
|
504
|
+
|
505
|
+
return ret;
|
506
|
+
};
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Resets the internal state of the computation.
|
510
|
+
*
|
511
|
+
* @return {SparkMD5} The instance itself
|
512
|
+
*/
|
513
|
+
SparkMD5.prototype.reset = function () {
|
514
|
+
this._buff = '';
|
515
|
+
this._length = 0;
|
516
|
+
this._hash = [1732584193, -271733879, -1732584194, 271733878];
|
517
|
+
|
518
|
+
return this;
|
519
|
+
};
|
520
|
+
|
521
|
+
/**
|
522
|
+
* Gets the internal state of the computation.
|
523
|
+
*
|
524
|
+
* @return {Object} The state
|
525
|
+
*/
|
526
|
+
SparkMD5.prototype.getState = function () {
|
527
|
+
return {
|
528
|
+
buff: this._buff,
|
529
|
+
length: this._length,
|
530
|
+
hash: this._hash.slice()
|
531
|
+
};
|
532
|
+
};
|
533
|
+
|
534
|
+
/**
|
535
|
+
* Gets the internal state of the computation.
|
536
|
+
*
|
537
|
+
* @param {Object} state The state
|
538
|
+
*
|
539
|
+
* @return {SparkMD5} The instance itself
|
540
|
+
*/
|
541
|
+
SparkMD5.prototype.setState = function (state) {
|
542
|
+
this._buff = state.buff;
|
543
|
+
this._length = state.length;
|
544
|
+
this._hash = state.hash;
|
545
|
+
|
546
|
+
return this;
|
547
|
+
};
|
548
|
+
|
549
|
+
/**
|
550
|
+
* Releases memory used by the incremental buffer and other additional
|
551
|
+
* resources. If you plan to use the instance again, use reset instead.
|
552
|
+
*/
|
553
|
+
SparkMD5.prototype.destroy = function () {
|
554
|
+
delete this._hash;
|
555
|
+
delete this._buff;
|
556
|
+
delete this._length;
|
557
|
+
};
|
558
|
+
|
559
|
+
/**
|
560
|
+
* Finish the final calculation based on the tail.
|
561
|
+
*
|
562
|
+
* @param {Array} tail The tail (will be modified)
|
563
|
+
* @param {Number} length The length of the remaining buffer
|
564
|
+
*/
|
565
|
+
SparkMD5.prototype._finish = function (tail, length) {
|
566
|
+
var i = length,
|
567
|
+
tmp,
|
568
|
+
lo,
|
569
|
+
hi;
|
570
|
+
|
571
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
572
|
+
if (i > 55) {
|
573
|
+
md5cycle(this._hash, tail);
|
574
|
+
for (i = 0; i < 16; i += 1) {
|
575
|
+
tail[i] = 0;
|
576
|
+
}
|
577
|
+
}
|
578
|
+
|
579
|
+
// Do the final computation based on the tail and length
|
580
|
+
// Beware that the final length may not fit in 32 bits so we take care of that
|
581
|
+
tmp = this._length * 8;
|
582
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
583
|
+
lo = parseInt(tmp[2], 16);
|
584
|
+
hi = parseInt(tmp[1], 16) || 0;
|
585
|
+
|
586
|
+
tail[14] = lo;
|
587
|
+
tail[15] = hi;
|
588
|
+
md5cycle(this._hash, tail);
|
589
|
+
};
|
590
|
+
|
591
|
+
/**
|
592
|
+
* Performs the md5 hash on a string.
|
593
|
+
* A conversion will be applied if utf8 string is detected.
|
594
|
+
*
|
595
|
+
* @param {String} str The string
|
596
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex string
|
597
|
+
*
|
598
|
+
* @return {String} The result
|
599
|
+
*/
|
600
|
+
SparkMD5.hash = function (str, raw) {
|
601
|
+
// Converts the string to utf8 bytes if necessary
|
602
|
+
// Then compute it using the binary function
|
603
|
+
return SparkMD5.hashBinary(toUtf8(str), raw);
|
604
|
+
};
|
605
|
+
|
606
|
+
/**
|
607
|
+
* Performs the md5 hash on a binary string.
|
608
|
+
*
|
609
|
+
* @param {String} content The binary string
|
610
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex string
|
611
|
+
*
|
612
|
+
* @return {String} The result
|
613
|
+
*/
|
614
|
+
SparkMD5.hashBinary = function (content, raw) {
|
615
|
+
var hash = md51(content),
|
616
|
+
ret = hex(hash);
|
617
|
+
|
618
|
+
return raw ? hexToBinaryString(ret) : ret;
|
619
|
+
};
|
620
|
+
|
621
|
+
// ---------------------------------------------------
|
622
|
+
|
623
|
+
/**
|
624
|
+
* SparkMD5 OOP implementation for array buffers.
|
625
|
+
*
|
626
|
+
* Use this class to perform an incremental md5 ONLY for array buffers.
|
627
|
+
*/
|
628
|
+
SparkMD5.ArrayBuffer = function () {
|
629
|
+
// call reset to init the instance
|
630
|
+
this.reset();
|
631
|
+
};
|
632
|
+
|
633
|
+
/**
|
634
|
+
* Appends an array buffer.
|
635
|
+
*
|
636
|
+
* @param {ArrayBuffer} arr The array to be appended
|
637
|
+
*
|
638
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
639
|
+
*/
|
640
|
+
SparkMD5.ArrayBuffer.prototype.append = function (arr) {
|
641
|
+
var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),
|
642
|
+
length = buff.length,
|
643
|
+
i;
|
644
|
+
|
645
|
+
this._length += arr.byteLength;
|
646
|
+
|
647
|
+
for (i = 64; i <= length; i += 64) {
|
648
|
+
md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
|
649
|
+
}
|
650
|
+
|
651
|
+
this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
|
652
|
+
|
653
|
+
return this;
|
654
|
+
};
|
655
|
+
|
656
|
+
/**
|
657
|
+
* Finishes the incremental computation, reseting the internal state and
|
658
|
+
* returning the result.
|
659
|
+
*
|
660
|
+
* @param {Boolean} raw True to get the raw string, false to get the hex string
|
661
|
+
*
|
662
|
+
* @return {String} The result
|
663
|
+
*/
|
664
|
+
SparkMD5.ArrayBuffer.prototype.end = function (raw) {
|
665
|
+
var buff = this._buff,
|
666
|
+
length = buff.length,
|
667
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
668
|
+
i,
|
669
|
+
ret;
|
670
|
+
|
671
|
+
for (i = 0; i < length; i += 1) {
|
672
|
+
tail[i >> 2] |= buff[i] << ((i % 4) << 3);
|
673
|
+
}
|
674
|
+
|
675
|
+
this._finish(tail, length);
|
676
|
+
ret = hex(this._hash);
|
677
|
+
|
678
|
+
if (raw) {
|
679
|
+
ret = hexToBinaryString(ret);
|
680
|
+
}
|
681
|
+
|
682
|
+
this.reset();
|
683
|
+
|
684
|
+
return ret;
|
685
|
+
};
|
686
|
+
|
687
|
+
/**
|
688
|
+
* Resets the internal state of the computation.
|
689
|
+
*
|
690
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
691
|
+
*/
|
692
|
+
SparkMD5.ArrayBuffer.prototype.reset = function () {
|
693
|
+
this._buff = new Uint8Array(0);
|
694
|
+
this._length = 0;
|
695
|
+
this._hash = [1732584193, -271733879, -1732584194, 271733878];
|
696
|
+
|
697
|
+
return this;
|
698
|
+
};
|
699
|
+
|
700
|
+
/**
|
701
|
+
* Gets the internal state of the computation.
|
702
|
+
*
|
703
|
+
* @return {Object} The state
|
704
|
+
*/
|
705
|
+
SparkMD5.ArrayBuffer.prototype.getState = function () {
|
706
|
+
var state = SparkMD5.prototype.getState.call(this);
|
707
|
+
|
708
|
+
// Convert buffer to a string
|
709
|
+
state.buff = arrayBuffer2Utf8Str(state.buff);
|
710
|
+
|
711
|
+
return state;
|
712
|
+
};
|
713
|
+
|
714
|
+
/**
|
715
|
+
* Gets the internal state of the computation.
|
716
|
+
*
|
717
|
+
* @param {Object} state The state
|
718
|
+
*
|
719
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
720
|
+
*/
|
721
|
+
SparkMD5.ArrayBuffer.prototype.setState = function (state) {
|
722
|
+
// Convert string to buffer
|
723
|
+
state.buff = utf8Str2ArrayBuffer(state.buff, true);
|
724
|
+
|
725
|
+
return SparkMD5.prototype.setState.call(this, state);
|
726
|
+
};
|
727
|
+
|
728
|
+
SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
|
729
|
+
|
730
|
+
SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
|
731
|
+
|
732
|
+
/**
|
733
|
+
* Performs the md5 hash on an array buffer.
|
734
|
+
*
|
735
|
+
* @param {ArrayBuffer} arr The array buffer
|
736
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex one
|
737
|
+
*
|
738
|
+
* @return {String} The result
|
739
|
+
*/
|
740
|
+
SparkMD5.ArrayBuffer.hash = function (arr, raw) {
|
741
|
+
var hash = md51_array(new Uint8Array(arr)),
|
742
|
+
ret = hex(hash);
|
743
|
+
|
744
|
+
return raw ? hexToBinaryString(ret) : ret;
|
745
|
+
};
|
746
|
+
|
747
|
+
return SparkMD5;
|
748
|
+
}));
|
749
|
+
|
750
|
+
|
751
|
+
/***/ }),
|
752
|
+
|
753
|
+
/***/ 7609:
|
754
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
755
|
+
|
756
|
+
var _typeof = (__webpack_require__(7425)["default"]);
|
757
|
+
function _regeneratorRuntime() {
|
758
|
+
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
759
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
760
|
+
return exports;
|
761
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
762
|
+
var exports = {},
|
763
|
+
Op = Object.prototype,
|
764
|
+
hasOwn = Op.hasOwnProperty,
|
765
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
766
|
+
obj[key] = desc.value;
|
767
|
+
},
|
768
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
769
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
770
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
771
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
772
|
+
function define(obj, key, value) {
|
773
|
+
return Object.defineProperty(obj, key, {
|
774
|
+
value: value,
|
775
|
+
enumerable: !0,
|
776
|
+
configurable: !0,
|
777
|
+
writable: !0
|
778
|
+
}), obj[key];
|
779
|
+
}
|
780
|
+
try {
|
781
|
+
define({}, "");
|
782
|
+
} catch (err) {
|
783
|
+
define = function define(obj, key, value) {
|
784
|
+
return obj[key] = value;
|
785
|
+
};
|
786
|
+
}
|
787
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
788
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
789
|
+
generator = Object.create(protoGenerator.prototype),
|
790
|
+
context = new Context(tryLocsList || []);
|
791
|
+
return defineProperty(generator, "_invoke", {
|
792
|
+
value: makeInvokeMethod(innerFn, self, context)
|
793
|
+
}), generator;
|
794
|
+
}
|
795
|
+
function tryCatch(fn, obj, arg) {
|
796
|
+
try {
|
797
|
+
return {
|
798
|
+
type: "normal",
|
799
|
+
arg: fn.call(obj, arg)
|
800
|
+
};
|
801
|
+
} catch (err) {
|
802
|
+
return {
|
803
|
+
type: "throw",
|
804
|
+
arg: err
|
805
|
+
};
|
806
|
+
}
|
807
|
+
}
|
808
|
+
exports.wrap = wrap;
|
809
|
+
var ContinueSentinel = {};
|
810
|
+
function Generator() {}
|
811
|
+
function GeneratorFunction() {}
|
812
|
+
function GeneratorFunctionPrototype() {}
|
813
|
+
var IteratorPrototype = {};
|
814
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
815
|
+
return this;
|
816
|
+
});
|
817
|
+
var getProto = Object.getPrototypeOf,
|
818
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
819
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
820
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
821
|
+
function defineIteratorMethods(prototype) {
|
822
|
+
["next", "throw", "return"].forEach(function (method) {
|
823
|
+
define(prototype, method, function (arg) {
|
824
|
+
return this._invoke(method, arg);
|
825
|
+
});
|
826
|
+
});
|
827
|
+
}
|
828
|
+
function AsyncIterator(generator, PromiseImpl) {
|
829
|
+
function invoke(method, arg, resolve, reject) {
|
830
|
+
var record = tryCatch(generator[method], generator, arg);
|
831
|
+
if ("throw" !== record.type) {
|
832
|
+
var result = record.arg,
|
833
|
+
value = result.value;
|
834
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
835
|
+
invoke("next", value, resolve, reject);
|
836
|
+
}, function (err) {
|
837
|
+
invoke("throw", err, resolve, reject);
|
838
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
839
|
+
result.value = unwrapped, resolve(result);
|
840
|
+
}, function (error) {
|
841
|
+
return invoke("throw", error, resolve, reject);
|
842
|
+
});
|
843
|
+
}
|
844
|
+
reject(record.arg);
|
845
|
+
}
|
846
|
+
var previousPromise;
|
847
|
+
defineProperty(this, "_invoke", {
|
848
|
+
value: function value(method, arg) {
|
849
|
+
function callInvokeWithMethodAndArg() {
|
850
|
+
return new PromiseImpl(function (resolve, reject) {
|
851
|
+
invoke(method, arg, resolve, reject);
|
852
|
+
});
|
853
|
+
}
|
854
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
855
|
+
}
|
856
|
+
});
|
857
|
+
}
|
858
|
+
function makeInvokeMethod(innerFn, self, context) {
|
859
|
+
var state = "suspendedStart";
|
860
|
+
return function (method, arg) {
|
861
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
862
|
+
if ("completed" === state) {
|
863
|
+
if ("throw" === method) throw arg;
|
864
|
+
return doneResult();
|
865
|
+
}
|
866
|
+
for (context.method = method, context.arg = arg;;) {
|
867
|
+
var delegate = context.delegate;
|
868
|
+
if (delegate) {
|
869
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
870
|
+
if (delegateResult) {
|
871
|
+
if (delegateResult === ContinueSentinel) continue;
|
872
|
+
return delegateResult;
|
873
|
+
}
|
874
|
+
}
|
875
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
876
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
877
|
+
context.dispatchException(context.arg);
|
878
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
879
|
+
state = "executing";
|
880
|
+
var record = tryCatch(innerFn, self, context);
|
881
|
+
if ("normal" === record.type) {
|
882
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
883
|
+
return {
|
884
|
+
value: record.arg,
|
885
|
+
done: context.done
|
886
|
+
};
|
887
|
+
}
|
888
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
889
|
+
}
|
890
|
+
};
|
891
|
+
}
|
892
|
+
function maybeInvokeDelegate(delegate, context) {
|
893
|
+
var methodName = context.method,
|
894
|
+
method = delegate.iterator[methodName];
|
895
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
896
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
897
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
898
|
+
var info = record.arg;
|
899
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
900
|
+
}
|
901
|
+
function pushTryEntry(locs) {
|
902
|
+
var entry = {
|
903
|
+
tryLoc: locs[0]
|
904
|
+
};
|
905
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
906
|
+
}
|
907
|
+
function resetTryEntry(entry) {
|
908
|
+
var record = entry.completion || {};
|
909
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
910
|
+
}
|
911
|
+
function Context(tryLocsList) {
|
912
|
+
this.tryEntries = [{
|
913
|
+
tryLoc: "root"
|
914
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
915
|
+
}
|
916
|
+
function values(iterable) {
|
917
|
+
if (iterable) {
|
918
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
919
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
920
|
+
if ("function" == typeof iterable.next) return iterable;
|
921
|
+
if (!isNaN(iterable.length)) {
|
922
|
+
var i = -1,
|
923
|
+
next = function next() {
|
924
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
925
|
+
return next.value = undefined, next.done = !0, next;
|
926
|
+
};
|
927
|
+
return next.next = next;
|
928
|
+
}
|
929
|
+
}
|
930
|
+
return {
|
931
|
+
next: doneResult
|
932
|
+
};
|
933
|
+
}
|
934
|
+
function doneResult() {
|
935
|
+
return {
|
936
|
+
value: undefined,
|
937
|
+
done: !0
|
938
|
+
};
|
939
|
+
}
|
940
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
941
|
+
value: GeneratorFunctionPrototype,
|
942
|
+
configurable: !0
|
943
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
944
|
+
value: GeneratorFunction,
|
945
|
+
configurable: !0
|
946
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
947
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
948
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
949
|
+
}, exports.mark = function (genFun) {
|
950
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
951
|
+
}, exports.awrap = function (arg) {
|
952
|
+
return {
|
953
|
+
__await: arg
|
954
|
+
};
|
955
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
956
|
+
return this;
|
957
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
958
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
959
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
960
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
961
|
+
return result.done ? result.value : iter.next();
|
962
|
+
});
|
963
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
964
|
+
return this;
|
965
|
+
}), define(Gp, "toString", function () {
|
966
|
+
return "[object Generator]";
|
967
|
+
}), exports.keys = function (val) {
|
968
|
+
var object = Object(val),
|
969
|
+
keys = [];
|
970
|
+
for (var key in object) keys.push(key);
|
971
|
+
return keys.reverse(), function next() {
|
972
|
+
for (; keys.length;) {
|
973
|
+
var key = keys.pop();
|
974
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
975
|
+
}
|
976
|
+
return next.done = !0, next;
|
977
|
+
};
|
978
|
+
}, exports.values = values, Context.prototype = {
|
979
|
+
constructor: Context,
|
980
|
+
reset: function reset(skipTempReset) {
|
981
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
982
|
+
},
|
983
|
+
stop: function stop() {
|
984
|
+
this.done = !0;
|
985
|
+
var rootRecord = this.tryEntries[0].completion;
|
986
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
987
|
+
return this.rval;
|
988
|
+
},
|
989
|
+
dispatchException: function dispatchException(exception) {
|
990
|
+
if (this.done) throw exception;
|
991
|
+
var context = this;
|
992
|
+
function handle(loc, caught) {
|
993
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
994
|
+
}
|
995
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
996
|
+
var entry = this.tryEntries[i],
|
997
|
+
record = entry.completion;
|
998
|
+
if ("root" === entry.tryLoc) return handle("end");
|
999
|
+
if (entry.tryLoc <= this.prev) {
|
1000
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
1001
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
1002
|
+
if (hasCatch && hasFinally) {
|
1003
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
1004
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
1005
|
+
} else if (hasCatch) {
|
1006
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
1007
|
+
} else {
|
1008
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
1009
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
}
|
1013
|
+
},
|
1014
|
+
abrupt: function abrupt(type, arg) {
|
1015
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1016
|
+
var entry = this.tryEntries[i];
|
1017
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
1018
|
+
var finallyEntry = entry;
|
1019
|
+
break;
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
1023
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
1024
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
1025
|
+
},
|
1026
|
+
complete: function complete(record, afterLoc) {
|
1027
|
+
if ("throw" === record.type) throw record.arg;
|
1028
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
1029
|
+
},
|
1030
|
+
finish: function finish(finallyLoc) {
|
1031
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1032
|
+
var entry = this.tryEntries[i];
|
1033
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
1034
|
+
}
|
1035
|
+
},
|
1036
|
+
"catch": function _catch(tryLoc) {
|
1037
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1038
|
+
var entry = this.tryEntries[i];
|
1039
|
+
if (entry.tryLoc === tryLoc) {
|
1040
|
+
var record = entry.completion;
|
1041
|
+
if ("throw" === record.type) {
|
1042
|
+
var thrown = record.arg;
|
1043
|
+
resetTryEntry(entry);
|
1044
|
+
}
|
1045
|
+
return thrown;
|
1046
|
+
}
|
1047
|
+
}
|
1048
|
+
throw new Error("illegal catch attempt");
|
1049
|
+
},
|
1050
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
1051
|
+
return this.delegate = {
|
1052
|
+
iterator: values(iterable),
|
1053
|
+
resultName: resultName,
|
1054
|
+
nextLoc: nextLoc
|
1055
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
1056
|
+
}
|
1057
|
+
}, exports;
|
1058
|
+
}
|
1059
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
1060
|
+
|
1061
|
+
/***/ }),
|
1062
|
+
|
1063
|
+
/***/ 7425:
|
1064
|
+
/***/ ((module) => {
|
1065
|
+
|
1066
|
+
function _typeof(obj) {
|
1067
|
+
"@babel/helpers - typeof";
|
1068
|
+
|
1069
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
1070
|
+
return typeof obj;
|
1071
|
+
} : function (obj) {
|
1072
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1073
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
1074
|
+
}
|
1075
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
1076
|
+
|
1077
|
+
/***/ }),
|
1078
|
+
|
1079
|
+
/***/ 2841:
|
1080
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1081
|
+
|
1082
|
+
// TODO(Babel 8): Remove this file.
|
1083
|
+
|
1084
|
+
var runtime = __webpack_require__(7609)();
|
1085
|
+
module.exports = runtime;
|
1086
|
+
|
1087
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
1088
|
+
try {
|
1089
|
+
regeneratorRuntime = runtime;
|
1090
|
+
} catch (accidentalStrictMode) {
|
1091
|
+
if (typeof globalThis === "object") {
|
1092
|
+
globalThis.regeneratorRuntime = runtime;
|
1093
|
+
} else {
|
1094
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
1095
|
+
}
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
|
1099
|
+
/***/ })
|
1100
|
+
|
1101
|
+
/******/ });
|
1102
|
+
/************************************************************************/
|
1103
|
+
/******/ // The module cache
|
1104
|
+
/******/ var __webpack_module_cache__ = {};
|
1105
|
+
/******/
|
1106
|
+
/******/ // The require function
|
1107
|
+
/******/ function __webpack_require__(moduleId) {
|
1108
|
+
/******/ // Check if module is in cache
|
1109
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
1110
|
+
/******/ if (cachedModule !== undefined) {
|
1111
|
+
/******/ return cachedModule.exports;
|
1112
|
+
/******/ }
|
1113
|
+
/******/ // Create a new module (and put it into the cache)
|
1114
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
1115
|
+
/******/ // no module.id needed
|
1116
|
+
/******/ // no module.loaded needed
|
1117
|
+
/******/ exports: {}
|
1118
|
+
/******/ };
|
1119
|
+
/******/
|
1120
|
+
/******/ // Execute the module function
|
1121
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
1122
|
+
/******/
|
1123
|
+
/******/ // Return the exports of the module
|
1124
|
+
/******/ return module.exports;
|
1125
|
+
/******/ }
|
1126
|
+
/******/
|
1127
|
+
/************************************************************************/
|
1128
|
+
/******/ /* webpack/runtime/compat get default export */
|
1129
|
+
/******/ (() => {
|
1130
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
1131
|
+
/******/ __webpack_require__.n = (module) => {
|
1132
|
+
/******/ var getter = module && module.__esModule ?
|
1133
|
+
/******/ () => (module['default']) :
|
1134
|
+
/******/ () => (module);
|
1135
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
1136
|
+
/******/ return getter;
|
1137
|
+
/******/ };
|
1138
|
+
/******/ })();
|
1139
|
+
/******/
|
1140
|
+
/******/ /* webpack/runtime/define property getters */
|
1141
|
+
/******/ (() => {
|
1142
|
+
/******/ // define getter functions for harmony exports
|
1143
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
1144
|
+
/******/ for(var key in definition) {
|
1145
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
1146
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
1147
|
+
/******/ }
|
1148
|
+
/******/ }
|
1149
|
+
/******/ };
|
1150
|
+
/******/ })();
|
1151
|
+
/******/
|
1152
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
1153
|
+
/******/ (() => {
|
1154
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
1155
|
+
/******/ })();
|
1156
|
+
/******/
|
1157
|
+
/************************************************************************/
|
1158
|
+
var __webpack_exports__ = {};
|
1159
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
1160
|
+
(() => {
|
1161
|
+
|
1162
|
+
// EXPORTS
|
1163
|
+
__webpack_require__.d(__webpack_exports__, {
|
1164
|
+
Z: () => (/* binding */ src)
|
1165
|
+
});
|
1166
|
+
|
1167
|
+
;// CONCATENATED MODULE: external "../shared"
|
1168
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1169
|
+
var y = x => () => x
|
1170
|
+
const external_shared_namespaceObject = x({ ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["isNullOrUndef"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.isNullOrUndef, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
1171
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
1172
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
1173
|
+
try {
|
1174
|
+
var info = gen[key](arg);
|
1175
|
+
var value = info.value;
|
1176
|
+
} catch (error) {
|
1177
|
+
reject(error);
|
1178
|
+
return;
|
1179
|
+
}
|
1180
|
+
if (info.done) {
|
1181
|
+
resolve(value);
|
1182
|
+
} else {
|
1183
|
+
Promise.resolve(value).then(_next, _throw);
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
function _asyncToGenerator(fn) {
|
1187
|
+
return function () {
|
1188
|
+
var self = this,
|
1189
|
+
args = arguments;
|
1190
|
+
return new Promise(function (resolve, reject) {
|
1191
|
+
var gen = fn.apply(self, args);
|
1192
|
+
function _next(value) {
|
1193
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
1194
|
+
}
|
1195
|
+
function _throw(err) {
|
1196
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
1197
|
+
}
|
1198
|
+
_next(undefined);
|
1199
|
+
});
|
1200
|
+
};
|
1201
|
+
}
|
1202
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
1203
|
+
function _typeof(obj) {
|
1204
|
+
"@babel/helpers - typeof";
|
1205
|
+
|
1206
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
1207
|
+
return typeof obj;
|
1208
|
+
} : function (obj) {
|
1209
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1210
|
+
}, _typeof(obj);
|
1211
|
+
}
|
1212
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
1213
|
+
|
1214
|
+
function _toPrimitive(input, hint) {
|
1215
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
1216
|
+
var prim = input[Symbol.toPrimitive];
|
1217
|
+
if (prim !== undefined) {
|
1218
|
+
var res = prim.call(input, hint || "default");
|
1219
|
+
if (_typeof(res) !== "object") return res;
|
1220
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1221
|
+
}
|
1222
|
+
return (hint === "string" ? String : Number)(input);
|
1223
|
+
}
|
1224
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
1225
|
+
|
1226
|
+
|
1227
|
+
function _toPropertyKey(arg) {
|
1228
|
+
var key = _toPrimitive(arg, "string");
|
1229
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
1230
|
+
}
|
1231
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
1232
|
+
|
1233
|
+
function _defineProperty(obj, key, value) {
|
1234
|
+
key = _toPropertyKey(key);
|
1235
|
+
if (key in obj) {
|
1236
|
+
Object.defineProperty(obj, key, {
|
1237
|
+
value: value,
|
1238
|
+
enumerable: true,
|
1239
|
+
configurable: true,
|
1240
|
+
writable: true
|
1241
|
+
});
|
1242
|
+
} else {
|
1243
|
+
obj[key] = value;
|
1244
|
+
}
|
1245
|
+
return obj;
|
1246
|
+
}
|
1247
|
+
;// CONCATENATED MODULE: external "vue"
|
1248
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1249
|
+
var external_vue_y = x => () => x
|
1250
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["TransitionGroup"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.TransitionGroup, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
1251
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
|
1252
|
+
var regenerator = __webpack_require__(2841);
|
1253
|
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
1254
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/upload.type.ts
|
1255
|
+
/*
|
1256
|
+
* Tencent is pleased to support the open source community by making
|
1257
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1258
|
+
*
|
1259
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1260
|
+
*
|
1261
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1262
|
+
*
|
1263
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1264
|
+
*
|
1265
|
+
* ---------------------------------------------------
|
1266
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1267
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1268
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1269
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1270
|
+
*
|
1271
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1272
|
+
* the Software.
|
1273
|
+
*
|
1274
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1275
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1276
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1277
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1278
|
+
* IN THE SOFTWARE.
|
1279
|
+
*/
|
1280
|
+
var CLASS_PREFIX = 'bk-upload';
|
1281
|
+
var EThemes;
|
1282
|
+
(function (EThemes) {
|
1283
|
+
EThemes["BUTTON"] = "button";
|
1284
|
+
EThemes["DRAGGABLE"] = "draggable";
|
1285
|
+
EThemes["PICTURE"] = "picture";
|
1286
|
+
})(EThemes || (EThemes = {}));
|
1287
|
+
var EUploadStatus;
|
1288
|
+
(function (EUploadStatus) {
|
1289
|
+
EUploadStatus["NEW"] = "new";
|
1290
|
+
EUploadStatus["UPLOADING"] = "uploading";
|
1291
|
+
EUploadStatus["SUCCESS"] = "success";
|
1292
|
+
EUploadStatus["FAIL"] = "fail";
|
1293
|
+
})(EUploadStatus || (EUploadStatus = {}));
|
1294
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
|
1295
|
+
/*
|
1296
|
+
* Tencent is pleased to support the open source community by making
|
1297
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1298
|
+
*
|
1299
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1300
|
+
*
|
1301
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1302
|
+
*
|
1303
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1304
|
+
*
|
1305
|
+
* ---------------------------------------------------
|
1306
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1307
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1308
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1309
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1310
|
+
*
|
1311
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1312
|
+
* the Software.
|
1313
|
+
*
|
1314
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1315
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1316
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1317
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1318
|
+
* IN THE SOFTWARE.
|
1319
|
+
*/
|
1320
|
+
|
1321
|
+
var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
|
1322
|
+
/* harmony default export */ const props = ({
|
1323
|
+
theme: {
|
1324
|
+
type: String,
|
1325
|
+
"default": 'draggable',
|
1326
|
+
validator: function validator(val) {
|
1327
|
+
if (!val || themes.includes(val)) {
|
1328
|
+
return true;
|
1329
|
+
}
|
1330
|
+
console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(themes.join(' | '), "\u3011"));
|
1331
|
+
return false;
|
1332
|
+
}
|
1333
|
+
},
|
1334
|
+
files: {
|
1335
|
+
type: Array,
|
1336
|
+
"default": function _default() {
|
1337
|
+
return [];
|
1338
|
+
}
|
1339
|
+
},
|
1340
|
+
name: {
|
1341
|
+
type: String,
|
1342
|
+
"default": 'upload_file'
|
1343
|
+
},
|
1344
|
+
multiple: {
|
1345
|
+
type: Boolean,
|
1346
|
+
"default": true
|
1347
|
+
},
|
1348
|
+
disabled: {
|
1349
|
+
type: Boolean,
|
1350
|
+
"default": false
|
1351
|
+
},
|
1352
|
+
autoUpload: {
|
1353
|
+
type: Boolean,
|
1354
|
+
"default": true
|
1355
|
+
},
|
1356
|
+
accept: {
|
1357
|
+
type: String
|
1358
|
+
},
|
1359
|
+
delayTime: {
|
1360
|
+
type: Number,
|
1361
|
+
"default": 0
|
1362
|
+
},
|
1363
|
+
url: {
|
1364
|
+
type: String,
|
1365
|
+
required: false
|
1366
|
+
},
|
1367
|
+
method: {
|
1368
|
+
type: String,
|
1369
|
+
"default": 'post'
|
1370
|
+
},
|
1371
|
+
size: {
|
1372
|
+
type: [Number, Object],
|
1373
|
+
"default": function _default() {
|
1374
|
+
return {
|
1375
|
+
maxFileSize: 5,
|
1376
|
+
maxImgSize: 1
|
1377
|
+
};
|
1378
|
+
}
|
1379
|
+
},
|
1380
|
+
handleResCode: {
|
1381
|
+
type: Function,
|
1382
|
+
"default": function _default(res) {
|
1383
|
+
if (res && res.code === 0) {
|
1384
|
+
return true;
|
1385
|
+
}
|
1386
|
+
return false;
|
1387
|
+
}
|
1388
|
+
},
|
1389
|
+
headers: {
|
1390
|
+
type: Object,
|
1391
|
+
"default": function _default() {
|
1392
|
+
return {};
|
1393
|
+
}
|
1394
|
+
},
|
1395
|
+
header: {
|
1396
|
+
type: [Array, Object],
|
1397
|
+
"default": function _default() {
|
1398
|
+
return [];
|
1399
|
+
}
|
1400
|
+
},
|
1401
|
+
tip: {
|
1402
|
+
type: String,
|
1403
|
+
"default": ''
|
1404
|
+
},
|
1405
|
+
validateName: {
|
1406
|
+
type: RegExp
|
1407
|
+
},
|
1408
|
+
withCredentials: {
|
1409
|
+
type: Boolean,
|
1410
|
+
"default": false
|
1411
|
+
},
|
1412
|
+
limit: Number,
|
1413
|
+
data: {
|
1414
|
+
type: [Array, Object],
|
1415
|
+
"default": function _default() {
|
1416
|
+
return [];
|
1417
|
+
}
|
1418
|
+
},
|
1419
|
+
formDataAttributes: {
|
1420
|
+
type: [Array, Object],
|
1421
|
+
"default": function _default() {
|
1422
|
+
return [];
|
1423
|
+
}
|
1424
|
+
},
|
1425
|
+
extCls: {
|
1426
|
+
type: String,
|
1427
|
+
"default": ''
|
1428
|
+
},
|
1429
|
+
customRequest: Function,
|
1430
|
+
beforeUpload: {
|
1431
|
+
type: Function
|
1432
|
+
},
|
1433
|
+
beforeRemove: {
|
1434
|
+
type: Function
|
1435
|
+
},
|
1436
|
+
sliceUpload: {
|
1437
|
+
type: Boolean,
|
1438
|
+
"default": false
|
1439
|
+
},
|
1440
|
+
sliceUrl: {
|
1441
|
+
type: String,
|
1442
|
+
"default": ''
|
1443
|
+
},
|
1444
|
+
mergeUrl: {
|
1445
|
+
type: String,
|
1446
|
+
"default": ''
|
1447
|
+
},
|
1448
|
+
chunkSize: {
|
1449
|
+
type: Number,
|
1450
|
+
"default": 10
|
1451
|
+
}
|
1452
|
+
});
|
1453
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
1454
|
+
function _arrayWithHoles(arr) {
|
1455
|
+
if (Array.isArray(arr)) return arr;
|
1456
|
+
}
|
1457
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
1458
|
+
function _iterableToArrayLimit(arr, i) {
|
1459
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
1460
|
+
if (null != _i) {
|
1461
|
+
var _s,
|
1462
|
+
_e,
|
1463
|
+
_x,
|
1464
|
+
_r,
|
1465
|
+
_arr = [],
|
1466
|
+
_n = !0,
|
1467
|
+
_d = !1;
|
1468
|
+
try {
|
1469
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
1470
|
+
if (Object(_i) !== _i) return;
|
1471
|
+
_n = !1;
|
1472
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
1473
|
+
} catch (err) {
|
1474
|
+
_d = !0, _e = err;
|
1475
|
+
} finally {
|
1476
|
+
try {
|
1477
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
1478
|
+
} finally {
|
1479
|
+
if (_d) throw _e;
|
1480
|
+
}
|
1481
|
+
}
|
1482
|
+
return _arr;
|
1483
|
+
}
|
1484
|
+
}
|
1485
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
1486
|
+
function _arrayLikeToArray(arr, len) {
|
1487
|
+
if (len == null || len > arr.length) len = arr.length;
|
1488
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1489
|
+
return arr2;
|
1490
|
+
}
|
1491
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
1492
|
+
|
1493
|
+
function _unsupportedIterableToArray(o, minLen) {
|
1494
|
+
if (!o) return;
|
1495
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
1496
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1497
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1498
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
1499
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
1500
|
+
}
|
1501
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
1502
|
+
function _nonIterableRest() {
|
1503
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1504
|
+
}
|
1505
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
1506
|
+
|
1507
|
+
|
1508
|
+
|
1509
|
+
|
1510
|
+
function _slicedToArray(arr, i) {
|
1511
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
1512
|
+
}
|
1513
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
1514
|
+
var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1515
|
+
var external_config_provider_y = x => () => x
|
1516
|
+
const external_config_provider_namespaceObject = external_config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.useLocale });
|
1517
|
+
;// CONCATENATED MODULE: external "../icon"
|
1518
|
+
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1519
|
+
var external_icon_y = x => () => x
|
1520
|
+
const external_icon_namespaceObject = external_icon_x({ ["ArchiveFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.ArchiveFill, ["AudioFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AudioFill, ["Del"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Del, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Done, ["ImageFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.ImageFill, ["Plus"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Plus, ["RightTurnLine"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.RightTurnLine, ["TextFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.TextFill, ["Upload"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Upload, ["VideoFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.VideoFill });
|
1521
|
+
;// CONCATENATED MODULE: external "../progress"
|
1522
|
+
var external_progress_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1523
|
+
var external_progress_y = x => () => x
|
1524
|
+
const external_progress_namespaceObject = external_progress_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__progress_ed4d3a99__["default"] });
|
1525
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/upload-list.tsx
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
/*
|
1530
|
+
* Tencent is pleased to support the open source community by making
|
1531
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1532
|
+
*
|
1533
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1534
|
+
*
|
1535
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1536
|
+
*
|
1537
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1538
|
+
*
|
1539
|
+
* ---------------------------------------------------
|
1540
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1541
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1542
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1543
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1544
|
+
*
|
1545
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1546
|
+
* the Software.
|
1547
|
+
*
|
1548
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1549
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1550
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1551
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1552
|
+
* IN THE SOFTWARE.
|
1553
|
+
*/
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
|
1558
|
+
|
1559
|
+
|
1560
|
+
|
1561
|
+
function _isSlot(s) {
|
1562
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
1563
|
+
}
|
1564
|
+
/* harmony default export */ const upload_list = ((0,external_vue_namespaceObject.defineComponent)({
|
1565
|
+
name: 'UploadList',
|
1566
|
+
props: {
|
1567
|
+
theme: props.theme,
|
1568
|
+
disabled: props.disabled,
|
1569
|
+
files: props.files,
|
1570
|
+
multiple: props.multiple
|
1571
|
+
},
|
1572
|
+
emits: ['remove', 'retry'],
|
1573
|
+
setup: function setup(props, _ref) {
|
1574
|
+
var slots = _ref.slots,
|
1575
|
+
emit = _ref.emit;
|
1576
|
+
var t = (0,external_config_provider_namespaceObject.useLocale)('upload');
|
1577
|
+
var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
|
1578
|
+
theme = _toRefs.theme,
|
1579
|
+
disabled = _toRefs.disabled,
|
1580
|
+
multiple = _toRefs.multiple;
|
1581
|
+
var classBlock = "".concat(CLASS_PREFIX, "-list");
|
1582
|
+
var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
|
1583
|
+
return theme.value === EThemes.PICTURE;
|
1584
|
+
});
|
1585
|
+
var isSinglePhoto = (0,external_vue_namespaceObject.computed)(function () {
|
1586
|
+
return isPhotowall.value && !multiple.value;
|
1587
|
+
});
|
1588
|
+
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
1589
|
+
var _classes;
|
1590
|
+
return (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
|
1591
|
+
});
|
1592
|
+
function formatSize(value) {
|
1593
|
+
var uints = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
1594
|
+
var index = Math.floor(Math.log(value) / Math.log(1024));
|
1595
|
+
var size = value / Math.pow(1024, index);
|
1596
|
+
return "".concat(size.toFixed(2)).concat(uints[index]);
|
1597
|
+
}
|
1598
|
+
function handleRemove(file, e) {
|
1599
|
+
emit('remove', file, e);
|
1600
|
+
}
|
1601
|
+
function handleRetry(file, e) {
|
1602
|
+
emit('retry', file, e);
|
1603
|
+
}
|
1604
|
+
var Photowall = function Photowall() {
|
1605
|
+
var _slot;
|
1606
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
|
1607
|
+
"name": "".concat(classBlock, "__item")
|
1608
|
+
}, _isSlot(_slot = props.files.map(function (file) {
|
1609
|
+
var _classes2;
|
1610
|
+
var classNames = (0,external_shared_namespaceObject.classes)((_classes2 = {}, _defineProperty(_classes2, "".concat(classBlock, "__item"), true), _defineProperty(_classes2, "".concat(classBlock, "__item-picture"), true), _defineProperty(_classes2, "".concat(classBlock, "__item--").concat(file.status), true), _classes2));
|
1611
|
+
return (0,external_vue_namespaceObject.createVNode)("li", {
|
1612
|
+
"key": file.uid,
|
1613
|
+
"class": classNames
|
1614
|
+
}, [slots !== null && slots !== void 0 && slots.file ? slots.file({
|
1615
|
+
file: file
|
1616
|
+
}) : PhotoItem(file)]);
|
1617
|
+
})) ? _slot : {
|
1618
|
+
"default": function _default() {
|
1619
|
+
return [_slot];
|
1620
|
+
}
|
1621
|
+
});
|
1622
|
+
};
|
1623
|
+
var PhotoItem = function PhotoItem(file) {
|
1624
|
+
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1625
|
+
"src": file.url,
|
1626
|
+
"class": "".concat(classBlock, "__picture-item-thumbnail"),
|
1627
|
+
"alt": ""
|
1628
|
+
}, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(external_progress_namespaceObject["default"], {
|
1629
|
+
"class": "".concat(classBlock, "__picture-item-progress"),
|
1630
|
+
"type": "circle",
|
1631
|
+
"color": "#3a84ff",
|
1632
|
+
"bgColor": "#333",
|
1633
|
+
"width": 50,
|
1634
|
+
"titleStyle": {
|
1635
|
+
color: '#fff'
|
1636
|
+
},
|
1637
|
+
"percent": file.percentage
|
1638
|
+
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!disabled.value && (0,external_vue_namespaceObject.createVNode)("div", {
|
1639
|
+
"class": "".concat(classBlock, "__picture-item-actions")
|
1640
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Del, {
|
1641
|
+
"class": "action-icon",
|
1642
|
+
"onClick": function onClick(e) {
|
1643
|
+
return handleRemove(file, e);
|
1644
|
+
}
|
1645
|
+
}, null)])])];
|
1646
|
+
};
|
1647
|
+
var Normal = function Normal() {
|
1648
|
+
var _slot2;
|
1649
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
|
1650
|
+
"name": "".concat(classBlock, "__item")
|
1651
|
+
}, _isSlot(_slot2 = props.files.map(function (file) {
|
1652
|
+
var _classes3;
|
1653
|
+
var classNames = (0,external_shared_namespaceObject.classes)((_classes3 = {}, _defineProperty(_classes3, "".concat(classBlock, "__item"), true), _defineProperty(_classes3, "".concat(classBlock, "__item--").concat(file.status), true), _classes3));
|
1654
|
+
return (0,external_vue_namespaceObject.createVNode)("li", {
|
1655
|
+
"key": file.uid,
|
1656
|
+
"class": classNames
|
1657
|
+
}, [slots !== null && slots !== void 0 && slots.file ? slots.file({
|
1658
|
+
file: file
|
1659
|
+
}) : NormalItem(file)]);
|
1660
|
+
})) ? _slot2 : {
|
1661
|
+
"default": function _default() {
|
1662
|
+
return [_slot2];
|
1663
|
+
}
|
1664
|
+
});
|
1665
|
+
};
|
1666
|
+
var FileIcon = function FileIcon(file) {
|
1667
|
+
var _file$raw;
|
1668
|
+
var rawType = file === null || file === void 0 || (_file$raw = file.raw) === null || _file$raw === void 0 ? void 0 : _file$raw.type;
|
1669
|
+
var _ref2 = (rawType === null || rawType === void 0 ? void 0 : rawType.split('/')) || '',
|
1670
|
+
_ref3 = _slicedToArray(_ref2, 1),
|
1671
|
+
type = _ref3[0];
|
1672
|
+
var iconMap = {
|
1673
|
+
text: external_icon_namespaceObject.TextFill,
|
1674
|
+
image: external_icon_namespaceObject.ImageFill,
|
1675
|
+
application: external_icon_namespaceObject.TextFill,
|
1676
|
+
video: external_icon_namespaceObject.VideoFill,
|
1677
|
+
audio: external_icon_namespaceObject.AudioFill
|
1678
|
+
};
|
1679
|
+
var icon = iconMap[type] || external_icon_namespaceObject.TextFill;
|
1680
|
+
var zipType = ['application/zip', 'application/rar', 'application/tar', 'application/gz', 'application/x-gzip'];
|
1681
|
+
if (zipType.includes(rawType)) {
|
1682
|
+
icon = external_icon_namespaceObject.ArchiveFill;
|
1683
|
+
}
|
1684
|
+
return (0,external_vue_namespaceObject.h)(icon, {
|
1685
|
+
"class": "".concat(classBlock, "__item-file-icon")
|
1686
|
+
});
|
1687
|
+
};
|
1688
|
+
var NormalItem = function NormalItem(file) {
|
1689
|
+
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
1690
|
+
"class": "".concat(classBlock, "__item-icon")
|
1691
|
+
}, [file.isPic ? (0,external_vue_namespaceObject.createVNode)("img", {
|
1692
|
+
"src": file.url,
|
1693
|
+
"class": "".concat(classBlock, "__item-thumbnail"),
|
1694
|
+
"alt": ""
|
1695
|
+
}, null) : FileIcon(file)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1696
|
+
"class": "".concat(classBlock, "__item-summary")
|
1697
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
1698
|
+
"class": "".concat(classBlock, "__item-name"),
|
1699
|
+
"title": file.name
|
1700
|
+
}, [file.name]), file.status !== 'uploading' && (0,external_vue_namespaceObject.createVNode)("div", {
|
1701
|
+
"class": "".concat(classBlock, "__item-message"),
|
1702
|
+
"title": file.statusText
|
1703
|
+
}, [file.status === 'success' && (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Done, {
|
1704
|
+
"class": "".concat(classBlock, "__item-message-success-icon")
|
1705
|
+
}, null), file.statusText || t.value.uploadSuccess]), file.status === 'fail' && (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.statusText || t.value.uploadFailed])]), file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(external_progress_namespaceObject["default"], {
|
1706
|
+
"class": "".concat(classBlock, "__item-progress"),
|
1707
|
+
"showText": false,
|
1708
|
+
"percent": file.percentage,
|
1709
|
+
"size": "small"
|
1710
|
+
}, null), file.status !== 'fail' && (0,external_vue_namespaceObject.createVNode)("div", {
|
1711
|
+
"class": "".concat(classBlock, "__item-speed")
|
1712
|
+
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
1713
|
+
"class": "".concat(classBlock, "__item-speed-size")
|
1714
|
+
}, [formatSize(file.size)]), [[external_vue_namespaceObject.vShow, file.size]]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
1715
|
+
"class": "".concat(classBlock, "__item-speed-percentage")
|
1716
|
+
}, [file.percentage, (0,external_vue_namespaceObject.createTextVNode)("%")]), [[external_vue_namespaceObject.vShow, file.status === 'uploading']])]), !disabled.value && (0,external_vue_namespaceObject.createVNode)("div", {
|
1717
|
+
"class": "".concat(classBlock, "__item-actions")
|
1718
|
+
}, [file.status === 'fail' && (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.RightTurnLine, {
|
1719
|
+
"class": "".concat(classBlock, "__item-retry-icon"),
|
1720
|
+
"onClick": function onClick(e) {
|
1721
|
+
return handleRetry(file, e);
|
1722
|
+
}
|
1723
|
+
}, null), (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Del, {
|
1724
|
+
"class": "".concat(classBlock, "__item-del-icon"),
|
1725
|
+
"onClick": function onClick(e) {
|
1726
|
+
return handleRemove(file, e);
|
1727
|
+
}
|
1728
|
+
}, null)])])];
|
1729
|
+
};
|
1730
|
+
return function () {
|
1731
|
+
var _props$files;
|
1732
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePhoto.value ? (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger((_props$files = props.files) === null || _props$files === void 0 ? void 0 : _props$files[0])) : (0,external_vue_namespaceObject.createVNode)("ul", {
|
1733
|
+
"class": classNames.value
|
1734
|
+
}, [isPhotowall.value ? Photowall() : Normal(), (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger())])]);
|
1735
|
+
};
|
1736
|
+
}
|
1737
|
+
}));
|
1738
|
+
;// CONCATENATED MODULE: external "../button"
|
1739
|
+
var external_button_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1740
|
+
var external_button_y = x => () => x
|
1741
|
+
const external_button_namespaceObject = external_button_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__button_59c00871__["default"] });
|
1742
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/upload-trigger.tsx
|
1743
|
+
|
1744
|
+
|
1745
|
+
/*
|
1746
|
+
* Tencent is pleased to support the open source community by making
|
1747
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1748
|
+
*
|
1749
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1750
|
+
*
|
1751
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1752
|
+
*
|
1753
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1754
|
+
*
|
1755
|
+
* ---------------------------------------------------
|
1756
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1757
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1758
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1759
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1760
|
+
*
|
1761
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1762
|
+
* the Software.
|
1763
|
+
*
|
1764
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1765
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1766
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1767
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1768
|
+
* IN THE SOFTWARE.
|
1769
|
+
*/
|
1770
|
+
|
1771
|
+
|
1772
|
+
|
1773
|
+
|
1774
|
+
|
1775
|
+
|
1776
|
+
|
1777
|
+
|
1778
|
+
/* harmony default export */ const upload_trigger = ((0,external_vue_namespaceObject.defineComponent)({
|
1779
|
+
name: 'UploadTrigger',
|
1780
|
+
props: {
|
1781
|
+
theme: props.theme,
|
1782
|
+
disabled: props.disabled,
|
1783
|
+
multiple: props.multiple,
|
1784
|
+
accept: props.accept,
|
1785
|
+
file: {
|
1786
|
+
type: Object
|
1787
|
+
}
|
1788
|
+
},
|
1789
|
+
emits: ['change', 'remove'],
|
1790
|
+
setup: function setup(props, _ref) {
|
1791
|
+
var slots = _ref.slots,
|
1792
|
+
emit = _ref.emit;
|
1793
|
+
var t = (0,external_config_provider_namespaceObject.useLocale)('upload');
|
1794
|
+
var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
|
1795
|
+
theme = _toRefs.theme,
|
1796
|
+
disabled = _toRefs.disabled,
|
1797
|
+
file = _toRefs.file,
|
1798
|
+
multiple = _toRefs.multiple,
|
1799
|
+
accept = _toRefs.accept;
|
1800
|
+
var classBlock = "".concat(CLASS_PREFIX, "-trigger");
|
1801
|
+
var isButton = (0,external_vue_namespaceObject.computed)(function () {
|
1802
|
+
return theme.value === EThemes.BUTTON;
|
1803
|
+
});
|
1804
|
+
var isDrag = (0,external_vue_namespaceObject.computed)(function () {
|
1805
|
+
return theme.value === EThemes.DRAGGABLE;
|
1806
|
+
});
|
1807
|
+
var isPicture = (0,external_vue_namespaceObject.computed)(function () {
|
1808
|
+
return theme.value === EThemes.PICTURE;
|
1809
|
+
});
|
1810
|
+
var isSinglePicture = (0,external_vue_namespaceObject.computed)(function () {
|
1811
|
+
return isPicture.value && !multiple.value;
|
1812
|
+
});
|
1813
|
+
var acceptTypes = (0,external_vue_namespaceObject.computed)(function () {
|
1814
|
+
return isPicture.value && !accept.value ? 'image/png,image/jpeg,image/jpg' : accept.value;
|
1815
|
+
});
|
1816
|
+
var inputEl = (0,external_vue_namespaceObject.ref)(null);
|
1817
|
+
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
1818
|
+
var _file$value, _file$value2, _file$value3, _classes;
|
1819
|
+
return (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--single-picture"), isSinglePicture.value), _defineProperty(_classes, "".concat(classBlock, "--has-file"), (_file$value = file.value) !== null && _file$value !== void 0 ? _file$value : false), _defineProperty(_classes, "".concat(classBlock, "--").concat((_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.status), (_file$value3 = file.value) !== null && _file$value3 !== void 0 ? _file$value3 : false), _defineProperty(_classes, "".concat(classBlock, "--dragover"), dragover.value), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
|
1820
|
+
});
|
1821
|
+
var invoke = function invoke() {
|
1822
|
+
inputEl.value.value = null;
|
1823
|
+
inputEl.value.click();
|
1824
|
+
};
|
1825
|
+
var handleFileChange = function handleFileChange(e) {
|
1826
|
+
var files = e.target.files;
|
1827
|
+
emit('change', Array.from(files));
|
1828
|
+
};
|
1829
|
+
var handleClick = function handleClick() {
|
1830
|
+
if (props.disabled) {
|
1831
|
+
return;
|
1832
|
+
}
|
1833
|
+
invoke();
|
1834
|
+
};
|
1835
|
+
var handleKeydown = function handleKeydown(e) {
|
1836
|
+
if (e.defaultPrevented || e.target !== e.currentTarget) {
|
1837
|
+
return;
|
1838
|
+
}
|
1839
|
+
if (e.code === 'Enter' || e.code === 'Space') {
|
1840
|
+
invoke();
|
1841
|
+
}
|
1842
|
+
e.preventDefault();
|
1843
|
+
};
|
1844
|
+
function handleRemove(file, e) {
|
1845
|
+
emit('remove', file, e);
|
1846
|
+
e.stopPropagation();
|
1847
|
+
e.preventDefault();
|
1848
|
+
}
|
1849
|
+
var dragover = (0,external_vue_namespaceObject.ref)(false);
|
1850
|
+
var Dragger = function Dragger() {
|
1851
|
+
var handleDrop = function handleDrop(e) {
|
1852
|
+
if (disabled.value) {
|
1853
|
+
return;
|
1854
|
+
}
|
1855
|
+
e.preventDefault();
|
1856
|
+
dragover.value = false;
|
1857
|
+
var files = Array.from(e.dataTransfer.files);
|
1858
|
+
if (!acceptTypes.value) {
|
1859
|
+
emit('change', files);
|
1860
|
+
return;
|
1861
|
+
}
|
1862
|
+
var filesFiltered = files.filter(function (file) {
|
1863
|
+
var type = file.type,
|
1864
|
+
name = file.name;
|
1865
|
+
var extension = name.includes('.') ? ".".concat(name.split('.').pop()) : '';
|
1866
|
+
var baseType = type.replace(/\/.*$/, '');
|
1867
|
+
return acceptTypes.value.split(',').map(function (type) {
|
1868
|
+
return type.trim();
|
1869
|
+
}).filter(function (type) {
|
1870
|
+
return type;
|
1871
|
+
}).some(function (acceptedType) {
|
1872
|
+
if (acceptedType.startsWith('.')) {
|
1873
|
+
return extension === acceptedType;
|
1874
|
+
}
|
1875
|
+
if (/\/\*$/.test(acceptedType)) {
|
1876
|
+
return baseType === acceptedType.replace(/\/\*$/, '');
|
1877
|
+
}
|
1878
|
+
if (/^[^/]+\/[^/]+$/.test(acceptedType)) {
|
1879
|
+
return type === acceptedType;
|
1880
|
+
}
|
1881
|
+
return false;
|
1882
|
+
});
|
1883
|
+
});
|
1884
|
+
emit('change', filesFiltered);
|
1885
|
+
};
|
1886
|
+
var handleDragover = function handleDragover(e) {
|
1887
|
+
e.preventDefault();
|
1888
|
+
dragover.value = true;
|
1889
|
+
};
|
1890
|
+
var handleDragleave = function handleDragleave() {
|
1891
|
+
dragover.value = false;
|
1892
|
+
};
|
1893
|
+
var classNames = (0,external_shared_namespaceObject.classes)(_defineProperty({}, "".concat(classBlock, "__draggable"), true));
|
1894
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
1895
|
+
"class": classNames,
|
1896
|
+
"onDrop": handleDrop,
|
1897
|
+
"onDragover": handleDragover,
|
1898
|
+
"onDragleave": handleDragleave
|
1899
|
+
}, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Upload, {
|
1900
|
+
"class": "".concat(classBlock, "__draggable-icon")
|
1901
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
1902
|
+
"class": "".concat(classBlock, "__draggable-text")
|
1903
|
+
}, [t.value.drapFileOr, (0,external_vue_namespaceObject.createVNode)("span", {
|
1904
|
+
"class": "".concat(classBlock, "__draggable-upload-link")
|
1905
|
+
}, [t.value.clickUpload])])])]);
|
1906
|
+
};
|
1907
|
+
var Picture = function Picture() {
|
1908
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePicture.value && props.file ? SinglePicture(props.file) : DefaultPicture()]);
|
1909
|
+
};
|
1910
|
+
var DefaultPicture = function DefaultPicture() {
|
1911
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)("div", {
|
1912
|
+
"class": "".concat(classBlock, "__picture-inner")
|
1913
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Plus, {
|
1914
|
+
"class": "".concat(classBlock, "__picture-icon")
|
1915
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
1916
|
+
"class": "".concat(classBlock, "__picture-text")
|
1917
|
+
}, [t.value.clickUpload])])]);
|
1918
|
+
};
|
1919
|
+
var SinglePicture = function SinglePicture(file) {
|
1920
|
+
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1921
|
+
"src": file.url,
|
1922
|
+
"class": "".concat(classBlock, "__picture-thumbnail"),
|
1923
|
+
"alt": ""
|
1924
|
+
}, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(external_progress_namespaceObject["default"], {
|
1925
|
+
"class": "".concat(classBlock, "__picture-progress"),
|
1926
|
+
"type": "circle",
|
1927
|
+
"color": "#3a84ff",
|
1928
|
+
"bgColor": "#333",
|
1929
|
+
"width": 50,
|
1930
|
+
"titleStyle": {
|
1931
|
+
color: '#fff'
|
1932
|
+
},
|
1933
|
+
"percent": file.percentage
|
1934
|
+
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.disabled && (0,external_vue_namespaceObject.createVNode)("div", {
|
1935
|
+
"class": "".concat(classBlock, "__picture-actions")
|
1936
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Del, {
|
1937
|
+
"class": "action-icon",
|
1938
|
+
"onClick": function onClick(e) {
|
1939
|
+
return handleRemove(file, e);
|
1940
|
+
}
|
1941
|
+
}, null)])])];
|
1942
|
+
};
|
1943
|
+
var xButton = function xButton() {
|
1944
|
+
return (0,external_vue_namespaceObject.createVNode)(external_button_namespaceObject["default"], {
|
1945
|
+
"disabled": disabled.value
|
1946
|
+
}, {
|
1947
|
+
"default": function _default() {
|
1948
|
+
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Upload, {
|
1949
|
+
"class": "".concat(classBlock, "__button-icon")
|
1950
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("span", {
|
1951
|
+
"class": "".concat(classBlock, "__button-text")
|
1952
|
+
}, [t.value.uploadLabel])])])];
|
1953
|
+
}
|
1954
|
+
});
|
1955
|
+
};
|
1956
|
+
var Trigger = function Trigger() {
|
1957
|
+
if (isButton.value) return xButton();
|
1958
|
+
if (isDrag.value) return Dragger();
|
1959
|
+
if (isPicture.value) return Picture();
|
1960
|
+
};
|
1961
|
+
return function () {
|
1962
|
+
var _slots$default;
|
1963
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
1964
|
+
"class": classNames.value,
|
1965
|
+
"tabindex": "0",
|
1966
|
+
"onClick": handleClick,
|
1967
|
+
"onKeydown": handleKeydown
|
1968
|
+
}, [slots.trigger ? [slots.trigger(), slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)] : Trigger(), (0,external_vue_namespaceObject.createVNode)("input", {
|
1969
|
+
"ref": inputEl,
|
1970
|
+
"class": "".concat(classBlock, "__input-file"),
|
1971
|
+
"tabindex": "-1",
|
1972
|
+
"onChange": handleFileChange,
|
1973
|
+
"accept": acceptTypes.value,
|
1974
|
+
"multiple": multiple.value,
|
1975
|
+
"disabled": disabled.value,
|
1976
|
+
"type": "file"
|
1977
|
+
}, null)]);
|
1978
|
+
};
|
1979
|
+
}
|
1980
|
+
}));
|
1981
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
1982
|
+
|
1983
|
+
function _arrayWithoutHoles(arr) {
|
1984
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
1985
|
+
}
|
1986
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
1987
|
+
function _iterableToArray(iter) {
|
1988
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
1989
|
+
}
|
1990
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
1991
|
+
function _nonIterableSpread() {
|
1992
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1993
|
+
}
|
1994
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
1995
|
+
|
1996
|
+
|
1997
|
+
|
1998
|
+
|
1999
|
+
function _toConsumableArray(arr) {
|
2000
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
2001
|
+
}
|
2002
|
+
// EXTERNAL MODULE: ../../node_modules/spark-md5/spark-md5.js
|
2003
|
+
var spark_md5 = __webpack_require__(4791);
|
2004
|
+
var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
|
2005
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/use-ajax-upload.ts
|
2006
|
+
|
2007
|
+
|
2008
|
+
|
2009
|
+
|
2010
|
+
/*
|
2011
|
+
* Tencent is pleased to support the open source community by making
|
2012
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2013
|
+
*
|
2014
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2015
|
+
*
|
2016
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2017
|
+
*
|
2018
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2019
|
+
*
|
2020
|
+
* ---------------------------------------------------
|
2021
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2022
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2023
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2024
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2025
|
+
*
|
2026
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2027
|
+
* the Software.
|
2028
|
+
*
|
2029
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2030
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2031
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2032
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2033
|
+
* IN THE SOFTWARE.
|
2034
|
+
*/
|
2035
|
+
|
2036
|
+
|
2037
|
+
function getRes(xhr) {
|
2038
|
+
var res = xhr.responseText || xhr.response;
|
2039
|
+
if (!res) {
|
2040
|
+
return res;
|
2041
|
+
}
|
2042
|
+
try {
|
2043
|
+
return JSON.parse(res);
|
2044
|
+
} catch (_unused) {
|
2045
|
+
return res;
|
2046
|
+
}
|
2047
|
+
}
|
2048
|
+
var ajaxUpload = function ajaxUpload(option) {
|
2049
|
+
if (typeof XMLHttpRequest === 'undefined') {
|
2050
|
+
throw new Error('XMLHttpRequest is undefined');
|
2051
|
+
}
|
2052
|
+
var xhr = new XMLHttpRequest();
|
2053
|
+
var action = option.action;
|
2054
|
+
if (xhr.upload) {
|
2055
|
+
xhr.upload.addEventListener('progress', function (event) {
|
2056
|
+
var progressEvent = event;
|
2057
|
+
progressEvent.percent = event.total > 0 ? event.loaded / event.total * 100 : 0;
|
2058
|
+
option.onProgress(progressEvent);
|
2059
|
+
});
|
2060
|
+
}
|
2061
|
+
var formData = new FormData();
|
2062
|
+
if (option.data) {
|
2063
|
+
var appendData = option.data;
|
2064
|
+
if (!Array.isArray(appendData)) {
|
2065
|
+
appendData = [appendData];
|
2066
|
+
}
|
2067
|
+
appendData.forEach(function (data) {
|
2068
|
+
for (var _i = 0, _Object$entries = Object.entries(data); _i < _Object$entries.length; _i++) {
|
2069
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
2070
|
+
key = _Object$entries$_i[0],
|
2071
|
+
value = _Object$entries$_i[1];
|
2072
|
+
if (Array.isArray(value)) formData.append.apply(formData, [key].concat(_toConsumableArray(value)));else formData.append(key, value);
|
2073
|
+
}
|
2074
|
+
});
|
2075
|
+
}
|
2076
|
+
if (option.formDataAttributes) {
|
2077
|
+
var _appendData = option.formDataAttributes;
|
2078
|
+
if (!Array.isArray(_appendData)) {
|
2079
|
+
_appendData = [_appendData];
|
2080
|
+
}
|
2081
|
+
_appendData.forEach(function (item) {
|
2082
|
+
if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
|
2083
|
+
});
|
2084
|
+
}
|
2085
|
+
formData.append(option.filename, option.file, option.file.name);
|
2086
|
+
xhr.addEventListener('error', function () {
|
2087
|
+
option.onError(new Error('An error occurred during upload'));
|
2088
|
+
});
|
2089
|
+
xhr.addEventListener('load', function () {
|
2090
|
+
if (xhr.status < 200 || xhr.status >= 300) {
|
2091
|
+
return option.onError(new Error('An error occurred during upload'));
|
2092
|
+
}
|
2093
|
+
option.onSuccess(getRes(xhr));
|
2094
|
+
});
|
2095
|
+
xhr.addEventListener('loadend', function () {
|
2096
|
+
option.onComplete();
|
2097
|
+
});
|
2098
|
+
xhr.open(option.method, action, true);
|
2099
|
+
if (option.withCredentials && 'withCredentials' in xhr) {
|
2100
|
+
xhr.withCredentials = true;
|
2101
|
+
}
|
2102
|
+
if (option.header) {
|
2103
|
+
if (Array.isArray(option.header)) {
|
2104
|
+
option.header.forEach(function (head) {
|
2105
|
+
var headerKey = head.name;
|
2106
|
+
var headerVal = head.value;
|
2107
|
+
xhr.setRequestHeader(headerKey, headerVal);
|
2108
|
+
});
|
2109
|
+
} else {
|
2110
|
+
var headerKey = option.header.name;
|
2111
|
+
var headerVal = option.header.value;
|
2112
|
+
xhr.setRequestHeader(headerKey, headerVal);
|
2113
|
+
}
|
2114
|
+
}
|
2115
|
+
var headers = option.headers || {};
|
2116
|
+
if (headers instanceof Headers) {
|
2117
|
+
headers.forEach(function (value, key) {
|
2118
|
+
return xhr.setRequestHeader(key, value);
|
2119
|
+
});
|
2120
|
+
} else {
|
2121
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(headers); _i2 < _Object$entries2.length; _i2++) {
|
2122
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
2123
|
+
key = _Object$entries2$_i[0],
|
2124
|
+
value = _Object$entries2$_i[1];
|
2125
|
+
if ((0,external_shared_namespaceObject.isNullOrUndef)(value)) continue;
|
2126
|
+
xhr.setRequestHeader(key, String(value));
|
2127
|
+
}
|
2128
|
+
}
|
2129
|
+
xhr.send(formData);
|
2130
|
+
return xhr;
|
2131
|
+
};
|
2132
|
+
// 该方法用于在不同的浏览器使用不同的方式
|
2133
|
+
var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
2134
|
+
var ajaxSliceUpload = /*#__PURE__*/function () {
|
2135
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(option) {
|
2136
|
+
var chunkSize, file, blockCount, hash, progressList;
|
2137
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
2138
|
+
while (1) switch (_context.prev = _context.next) {
|
2139
|
+
case 0:
|
2140
|
+
chunkSize = option.chunkSize * 1024 * 1024;
|
2141
|
+
file = option.file;
|
2142
|
+
if (file) {
|
2143
|
+
_context.next = 4;
|
2144
|
+
break;
|
2145
|
+
}
|
2146
|
+
throw new Error('File not found');
|
2147
|
+
case 4:
|
2148
|
+
blockCount = Math.ceil(file.size / chunkSize);
|
2149
|
+
_context.next = 7;
|
2150
|
+
return hashFile(file, chunkSize);
|
2151
|
+
case 7:
|
2152
|
+
hash = _context.sent;
|
2153
|
+
progressList = [];
|
2154
|
+
sliceSend(option, file, blockCount, hash, progressList, chunkSize);
|
2155
|
+
// 所有分片上传后,请求合并分片文件
|
2156
|
+
_context.next = 12;
|
2157
|
+
return Promise.all(progressList).then(function () {
|
2158
|
+
// 合并chunks
|
2159
|
+
var data = {
|
2160
|
+
size: file.size,
|
2161
|
+
name: file.name,
|
2162
|
+
total: blockCount,
|
2163
|
+
hash: hash
|
2164
|
+
};
|
2165
|
+
var req = new XMLHttpRequest();
|
2166
|
+
req.open(option.method, option.mergeUrl, true);
|
2167
|
+
req.onreadystatechange = function () {
|
2168
|
+
if (req.readyState === 4) {
|
2169
|
+
if (req.status < 200 || req.status >= 300) {
|
2170
|
+
return option.onError(new Error('An error occurred during upload'));
|
2171
|
+
}
|
2172
|
+
option.onSuccess(getRes(req));
|
2173
|
+
}
|
2174
|
+
};
|
2175
|
+
req.onloadend = function () {
|
2176
|
+
option.onComplete();
|
2177
|
+
};
|
2178
|
+
req.setRequestHeader('Content-type', 'application/JSON');
|
2179
|
+
req.send(JSON.stringify(data));
|
2180
|
+
});
|
2181
|
+
case 12:
|
2182
|
+
case "end":
|
2183
|
+
return _context.stop();
|
2184
|
+
}
|
2185
|
+
}, _callee);
|
2186
|
+
}));
|
2187
|
+
return function ajaxSliceUpload(_x) {
|
2188
|
+
return _ref.apply(this, arguments);
|
2189
|
+
};
|
2190
|
+
}();
|
2191
|
+
// 请求分片上传,保存在progressList中
|
2192
|
+
var sliceSend = function sliceSend(option, file, blockCount, hash, progressList, chunkSize) {
|
2193
|
+
var _loop = function _loop(i) {
|
2194
|
+
// eslint-disable-next-line no-loop-func
|
2195
|
+
var pooltask = new Promise(function (resolve, reject) {
|
2196
|
+
var start = i * chunkSize;
|
2197
|
+
var end = Math.min(file.size, start + chunkSize);
|
2198
|
+
// 构建表单
|
2199
|
+
var formData = new FormData();
|
2200
|
+
if (option.data) {
|
2201
|
+
var appendData = option.data;
|
2202
|
+
if (!Array.isArray(appendData)) {
|
2203
|
+
appendData = [appendData];
|
2204
|
+
}
|
2205
|
+
appendData.forEach(function (data) {
|
2206
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(data); _i3 < _Object$entries3.length; _i3++) {
|
2207
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
2208
|
+
key = _Object$entries3$_i[0],
|
2209
|
+
value = _Object$entries3$_i[1];
|
2210
|
+
if (Array.isArray(value)) formData.append.apply(formData, [key].concat(_toConsumableArray(value)));else formData.append(key, value);
|
2211
|
+
}
|
2212
|
+
});
|
2213
|
+
}
|
2214
|
+
if (option.formDataAttributes) {
|
2215
|
+
var _appendData2 = option.formDataAttributes;
|
2216
|
+
if (!Array.isArray(_appendData2)) {
|
2217
|
+
_appendData2 = [_appendData2];
|
2218
|
+
}
|
2219
|
+
_appendData2.forEach(function (item) {
|
2220
|
+
if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
|
2221
|
+
});
|
2222
|
+
}
|
2223
|
+
formData.append('file', blobSlice.call(file, start, end));
|
2224
|
+
formData.append('name', file.name);
|
2225
|
+
formData.append('total', blockCount.toString());
|
2226
|
+
formData.append('index', i.toString());
|
2227
|
+
formData.append('size', file.size.toString());
|
2228
|
+
formData.append('hash', hash.toString());
|
2229
|
+
var xhr = new XMLHttpRequest();
|
2230
|
+
xhr.onreadystatechange = function () {
|
2231
|
+
if (xhr.readyState === 4) {
|
2232
|
+
var res = getRes(xhr);
|
2233
|
+
if (xhr.status < 200 || xhr.status >= 300) {
|
2234
|
+
reject(res);
|
2235
|
+
option.onError(new Error('An error occurred during upload'));
|
2236
|
+
} else {
|
2237
|
+
resolve('reponseText');
|
2238
|
+
}
|
2239
|
+
}
|
2240
|
+
};
|
2241
|
+
xhr.upload.addEventListener('progress', function (event) {
|
2242
|
+
var progressEvent = event;
|
2243
|
+
option.onProgress(progressEvent, i);
|
2244
|
+
}, false);
|
2245
|
+
if (option.withCredentials && 'withCredentials' in xhr) {
|
2246
|
+
xhr.withCredentials = true;
|
2247
|
+
}
|
2248
|
+
xhr.open(option.method, option.sliceUrl, true);
|
2249
|
+
if (option.header) {
|
2250
|
+
if (Array.isArray(option.header)) {
|
2251
|
+
option.header.forEach(function (head) {
|
2252
|
+
var headerKey = head.name;
|
2253
|
+
var headerVal = head.value;
|
2254
|
+
xhr.setRequestHeader(headerKey, headerVal);
|
2255
|
+
});
|
2256
|
+
} else {
|
2257
|
+
var headerKey = option.header.name;
|
2258
|
+
var headerVal = option.header.value;
|
2259
|
+
xhr.setRequestHeader(headerKey, headerVal);
|
2260
|
+
}
|
2261
|
+
}
|
2262
|
+
var headers = option.headers || {};
|
2263
|
+
if (headers instanceof Headers) {
|
2264
|
+
headers.forEach(function (value, key) {
|
2265
|
+
return xhr.setRequestHeader(key, value);
|
2266
|
+
});
|
2267
|
+
} else {
|
2268
|
+
for (var _i4 = 0, _Object$entries4 = Object.entries(headers); _i4 < _Object$entries4.length; _i4++) {
|
2269
|
+
var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
|
2270
|
+
key = _Object$entries4$_i[0],
|
2271
|
+
value = _Object$entries4$_i[1];
|
2272
|
+
if ((0,external_shared_namespaceObject.isNullOrUndef)(value)) continue;
|
2273
|
+
xhr.setRequestHeader(key, String(value));
|
2274
|
+
}
|
2275
|
+
}
|
2276
|
+
xhr.send(formData);
|
2277
|
+
});
|
2278
|
+
progressList.push(pooltask);
|
2279
|
+
};
|
2280
|
+
for (var i = 0; i < blockCount; i++) {
|
2281
|
+
_loop(i);
|
2282
|
+
}
|
2283
|
+
};
|
2284
|
+
// SparkMD5分片文件
|
2285
|
+
var hashFile = function hashFile(file, chunkSize) {
|
2286
|
+
return new Promise(function (resolve, reject) {
|
2287
|
+
var chunks = Math.ceil(file.size / chunkSize);
|
2288
|
+
var currentChunk = 0;
|
2289
|
+
var spark = new (spark_md5_default()).ArrayBuffer();
|
2290
|
+
var fileReader = new FileReader();
|
2291
|
+
function loadNext() {
|
2292
|
+
var start = currentChunk * chunkSize;
|
2293
|
+
var end = start + chunkSize >= file.size ? file.size : start + chunkSize;
|
2294
|
+
fileReader.readAsArrayBuffer(blobSlice.call(file, start, end));
|
2295
|
+
}
|
2296
|
+
fileReader.onload = function (e) {
|
2297
|
+
spark.append(e.target.result); // Append array buffer
|
2298
|
+
currentChunk += 1;
|
2299
|
+
if (currentChunk < chunks) {
|
2300
|
+
loadNext();
|
2301
|
+
} else {
|
2302
|
+
var result = spark.end();
|
2303
|
+
// 如果单纯的使用result 作为hash值的时候, 如果文件内容相同,而名称不同的时候
|
2304
|
+
// 想保留两个文件无法保留。所以把文件名称加上。
|
2305
|
+
var sparkMd5 = new (spark_md5_default())();
|
2306
|
+
sparkMd5.append(result);
|
2307
|
+
sparkMd5.append(file.name);
|
2308
|
+
var hexHash = sparkMd5.end();
|
2309
|
+
resolve(hexHash);
|
2310
|
+
}
|
2311
|
+
};
|
2312
|
+
fileReader.onerror = function () {
|
2313
|
+
reject(new Error('File slcie failed'));
|
2314
|
+
};
|
2315
|
+
loadNext();
|
2316
|
+
})["catch"](function (err) {
|
2317
|
+
console.log(err);
|
2318
|
+
});
|
2319
|
+
};
|
2320
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/use-file-handler.ts
|
2321
|
+
|
2322
|
+
|
2323
|
+
|
2324
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2325
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
2326
|
+
/*
|
2327
|
+
* Tencent is pleased to support the open source community by making
|
2328
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2329
|
+
*
|
2330
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2331
|
+
*
|
2332
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2333
|
+
*
|
2334
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2335
|
+
*
|
2336
|
+
* ---------------------------------------------------
|
2337
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2338
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2339
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2340
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2341
|
+
*
|
2342
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2343
|
+
* the Software.
|
2344
|
+
*
|
2345
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2346
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2347
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2348
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2349
|
+
* IN THE SOFTWARE.
|
2350
|
+
*/
|
2351
|
+
|
2352
|
+
|
2353
|
+
function buildFileId(index) {
|
2354
|
+
return Date.now() + index;
|
2355
|
+
}
|
2356
|
+
/* harmony default export */ const use_file_handler = (function (props, hooks) {
|
2357
|
+
var maxImgSize = (0,external_vue_namespaceObject.computed)(function () {
|
2358
|
+
var _props$size;
|
2359
|
+
if (typeof props.size === 'number') {
|
2360
|
+
return props.size;
|
2361
|
+
}
|
2362
|
+
return props === null || props === void 0 || (_props$size = props.size) === null || _props$size === void 0 ? void 0 : _props$size.maxImgSize;
|
2363
|
+
});
|
2364
|
+
var maxFileSize = (0,external_vue_namespaceObject.computed)(function () {
|
2365
|
+
var _props$size2;
|
2366
|
+
if (typeof props.size === 'number') {
|
2367
|
+
return props.size;
|
2368
|
+
}
|
2369
|
+
return props === null || props === void 0 || (_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.maxImgSize;
|
2370
|
+
});
|
2371
|
+
// 文件列表,包括选择的和已上传
|
2372
|
+
var fileList = (0,external_vue_namespaceObject.ref)([]);
|
2373
|
+
function findFile(rawFile) {
|
2374
|
+
return fileList.value.find(function (item) {
|
2375
|
+
return item.uid === rawFile.uid;
|
2376
|
+
});
|
2377
|
+
}
|
2378
|
+
var activeIndex = 0;
|
2379
|
+
function handlePreprocess(file) {
|
2380
|
+
var _props$validateName;
|
2381
|
+
activeIndex += 1;
|
2382
|
+
file.uid = buildFileId(activeIndex);
|
2383
|
+
var uploadFile = {
|
2384
|
+
uid: file.uid,
|
2385
|
+
name: file.name,
|
2386
|
+
status: EUploadStatus.NEW,
|
2387
|
+
size: file.size,
|
2388
|
+
raw: file
|
2389
|
+
};
|
2390
|
+
var isImage = file.type.startsWith('image/');
|
2391
|
+
var error = null;
|
2392
|
+
// 图片缩略图处理
|
2393
|
+
if (isImage) {
|
2394
|
+
try {
|
2395
|
+
uploadFile.url = window.URL.createObjectURL(file);
|
2396
|
+
} catch (err) {
|
2397
|
+
console.error(err);
|
2398
|
+
}
|
2399
|
+
uploadFile.isPic = true;
|
2400
|
+
}
|
2401
|
+
// 文件名称校验
|
2402
|
+
if (props.validateName && !((_props$validateName = props.validateName) !== null && _props$validateName !== void 0 && _props$validateName.test(uploadFile.name))) {
|
2403
|
+
uploadFile.status = EUploadStatus.FAIL;
|
2404
|
+
uploadFile.statusText = 'invalid filename';
|
2405
|
+
error = new Error(uploadFile.statusText);
|
2406
|
+
}
|
2407
|
+
if (isImage && file.size > maxImgSize.value * Math.pow(1024, 2)) {
|
2408
|
+
uploadFile.status = EUploadStatus.FAIL;
|
2409
|
+
uploadFile.statusText = 'invalid file size';
|
2410
|
+
error = new Error(uploadFile.statusText);
|
2411
|
+
}
|
2412
|
+
if (!isImage && file.size > maxFileSize.value * Math.pow(1024, 2)) {
|
2413
|
+
uploadFile.status = EUploadStatus.FAIL;
|
2414
|
+
uploadFile.statusText = 'invalid file size';
|
2415
|
+
error = new Error(uploadFile.statusText);
|
2416
|
+
}
|
2417
|
+
fileList.value.push(uploadFile);
|
2418
|
+
return error;
|
2419
|
+
}
|
2420
|
+
function handleRemove(_x) {
|
2421
|
+
return _handleRemove.apply(this, arguments);
|
2422
|
+
}
|
2423
|
+
function _handleRemove() {
|
2424
|
+
_handleRemove = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(file) {
|
2425
|
+
var uploadFile, remove, _props$beforeRemove, before;
|
2426
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
2427
|
+
while (1) switch (_context.prev = _context.next) {
|
2428
|
+
case 0:
|
2429
|
+
uploadFile = file instanceof File ? findFile(file) : file;
|
2430
|
+
remove = function remove(file) {
|
2431
|
+
var _file$url;
|
2432
|
+
hooks.onRemove(file, fileList.value);
|
2433
|
+
fileList.value.splice(fileList.value.indexOf(uploadFile), 1);
|
2434
|
+
if ((_file$url = file.url) !== null && _file$url !== void 0 && _file$url.startsWith('blob:')) {
|
2435
|
+
URL.revokeObjectURL(file.url);
|
2436
|
+
}
|
2437
|
+
};
|
2438
|
+
if (!props.beforeRemove) {
|
2439
|
+
_context.next = 9;
|
2440
|
+
break;
|
2441
|
+
}
|
2442
|
+
_context.next = 5;
|
2443
|
+
return (_props$beforeRemove = props.beforeRemove) === null || _props$beforeRemove === void 0 ? void 0 : _props$beforeRemove.call(props, uploadFile, fileList.value);
|
2444
|
+
case 5:
|
2445
|
+
before = _context.sent;
|
2446
|
+
if (before !== false) {
|
2447
|
+
remove(uploadFile);
|
2448
|
+
}
|
2449
|
+
_context.next = 10;
|
2450
|
+
break;
|
2451
|
+
case 9:
|
2452
|
+
remove(uploadFile);
|
2453
|
+
case 10:
|
2454
|
+
case "end":
|
2455
|
+
return _context.stop();
|
2456
|
+
}
|
2457
|
+
}, _callee);
|
2458
|
+
}));
|
2459
|
+
return _handleRemove.apply(this, arguments);
|
2460
|
+
}
|
2461
|
+
function handleError(_x2, _x3, _x4) {
|
2462
|
+
return _handleError.apply(this, arguments);
|
2463
|
+
}
|
2464
|
+
function _handleError() {
|
2465
|
+
_handleError = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee2(err, rawFile, res) {
|
2466
|
+
var file;
|
2467
|
+
return regenerator_default().wrap(function _callee2$(_context2) {
|
2468
|
+
while (1) switch (_context2.prev = _context2.next) {
|
2469
|
+
case 0:
|
2470
|
+
file = findFile(rawFile);
|
2471
|
+
if (file) {
|
2472
|
+
_context2.next = 3;
|
2473
|
+
break;
|
2474
|
+
}
|
2475
|
+
return _context2.abrupt("return");
|
2476
|
+
case 3:
|
2477
|
+
file.status = 'fail';
|
2478
|
+
file.statusText = err.message;
|
2479
|
+
file.response = res;
|
2480
|
+
case 6:
|
2481
|
+
case "end":
|
2482
|
+
return _context2.stop();
|
2483
|
+
}
|
2484
|
+
}, _callee2);
|
2485
|
+
}));
|
2486
|
+
return _handleError.apply(this, arguments);
|
2487
|
+
}
|
2488
|
+
function handleSuccess(_x5, _x6) {
|
2489
|
+
return _handleSuccess.apply(this, arguments);
|
2490
|
+
}
|
2491
|
+
function _handleSuccess() {
|
2492
|
+
_handleSuccess = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee3(res, rawFile) {
|
2493
|
+
var file;
|
2494
|
+
return regenerator_default().wrap(function _callee3$(_context3) {
|
2495
|
+
while (1) switch (_context3.prev = _context3.next) {
|
2496
|
+
case 0:
|
2497
|
+
file = findFile(rawFile);
|
2498
|
+
if (file) {
|
2499
|
+
_context3.next = 3;
|
2500
|
+
break;
|
2501
|
+
}
|
2502
|
+
return _context3.abrupt("return");
|
2503
|
+
case 3:
|
2504
|
+
file.status = 'success';
|
2505
|
+
file.response = res;
|
2506
|
+
case 5:
|
2507
|
+
case "end":
|
2508
|
+
return _context3.stop();
|
2509
|
+
}
|
2510
|
+
}, _callee3);
|
2511
|
+
}));
|
2512
|
+
return _handleSuccess.apply(this, arguments);
|
2513
|
+
}
|
2514
|
+
function handleProgress(_x7, _x8) {
|
2515
|
+
return _handleProgress.apply(this, arguments);
|
2516
|
+
}
|
2517
|
+
function _handleProgress() {
|
2518
|
+
_handleProgress = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee4(event, rawFile) {
|
2519
|
+
var file;
|
2520
|
+
return regenerator_default().wrap(function _callee4$(_context4) {
|
2521
|
+
while (1) switch (_context4.prev = _context4.next) {
|
2522
|
+
case 0:
|
2523
|
+
// TODO slideUpload progress
|
2524
|
+
file = findFile(rawFile);
|
2525
|
+
if (file) {
|
2526
|
+
_context4.next = 3;
|
2527
|
+
break;
|
2528
|
+
}
|
2529
|
+
return _context4.abrupt("return");
|
2530
|
+
case 3:
|
2531
|
+
file.status = 'uploading';
|
2532
|
+
file.percentage = Math.round(event.percent);
|
2533
|
+
case 5:
|
2534
|
+
case "end":
|
2535
|
+
return _context4.stop();
|
2536
|
+
}
|
2537
|
+
}, _callee4);
|
2538
|
+
}));
|
2539
|
+
return _handleProgress.apply(this, arguments);
|
2540
|
+
}
|
2541
|
+
(0,external_vue_namespaceObject.watch)(function () {
|
2542
|
+
return props.files;
|
2543
|
+
}, function (files) {
|
2544
|
+
fileList.value = files.map(function (file) {
|
2545
|
+
var _file$uid, _file$status;
|
2546
|
+
activeIndex += 1;
|
2547
|
+
return _objectSpread(_objectSpread({}, file), {}, {
|
2548
|
+
uid: (_file$uid = file.uid) !== null && _file$uid !== void 0 ? _file$uid : buildFileId(activeIndex),
|
2549
|
+
status: (_file$status = file.status) !== null && _file$status !== void 0 ? _file$status : EUploadStatus.SUCCESS
|
2550
|
+
});
|
2551
|
+
});
|
2552
|
+
}, {
|
2553
|
+
immediate: true,
|
2554
|
+
deep: true
|
2555
|
+
});
|
2556
|
+
return {
|
2557
|
+
fileList: fileList,
|
2558
|
+
handlePreprocess: handlePreprocess,
|
2559
|
+
handleRemove: handleRemove,
|
2560
|
+
handleError: handleError,
|
2561
|
+
handleSuccess: handleSuccess,
|
2562
|
+
handleProgress: handleProgress
|
2563
|
+
};
|
2564
|
+
});
|
2565
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/upload.tsx
|
2566
|
+
|
2567
|
+
|
2568
|
+
|
2569
|
+
|
2570
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = upload_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
2571
|
+
function upload_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return upload_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return upload_arrayLikeToArray(o, minLen); }
|
2572
|
+
function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
2573
|
+
/*
|
2574
|
+
* Tencent is pleased to support the open source community by making
|
2575
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2576
|
+
*
|
2577
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2578
|
+
*
|
2579
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2580
|
+
*
|
2581
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2582
|
+
*
|
2583
|
+
* ---------------------------------------------------
|
2584
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2585
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2586
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2587
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2588
|
+
*
|
2589
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2590
|
+
* the Software.
|
2591
|
+
*
|
2592
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2593
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2594
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2595
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2596
|
+
* IN THE SOFTWARE.
|
2597
|
+
*/
|
2598
|
+
|
2599
|
+
|
2600
|
+
|
2601
|
+
|
2602
|
+
|
2603
|
+
|
2604
|
+
|
2605
|
+
|
2606
|
+
/* harmony default export */ const upload = ((0,external_vue_namespaceObject.defineComponent)({
|
2607
|
+
name: 'Upload',
|
2608
|
+
props: props,
|
2609
|
+
emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done'],
|
2610
|
+
setup: function setup(props, _ref) {
|
2611
|
+
var slots = _ref.slots,
|
2612
|
+
emit = _ref.emit,
|
2613
|
+
expose = _ref.expose;
|
2614
|
+
var requests = (0,external_vue_namespaceObject.shallowRef)({});
|
2615
|
+
var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
|
2616
|
+
return props.theme === EThemes.PICTURE;
|
2617
|
+
});
|
2618
|
+
var isSinglePhoto = (0,external_vue_namespaceObject.computed)(function () {
|
2619
|
+
return isPhotowall.value && !props.multiple;
|
2620
|
+
});
|
2621
|
+
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
2622
|
+
var _props$extCls, _classes;
|
2623
|
+
return (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, CLASS_PREFIX, true), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--").concat(props.theme), true), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--disabled"), props.disabled), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--single-picture"), isSinglePhoto.value), _defineProperty(_classes, props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false), _classes));
|
2624
|
+
});
|
2625
|
+
var triggerProps = (0,external_vue_namespaceObject.computed)(function () {
|
2626
|
+
return {
|
2627
|
+
theme: props.theme,
|
2628
|
+
multiple: props.multiple,
|
2629
|
+
disabled: props.disabled,
|
2630
|
+
accept: props.accept
|
2631
|
+
};
|
2632
|
+
});
|
2633
|
+
function onRemove(file, fileList) {
|
2634
|
+
abort(file);
|
2635
|
+
emit('delete', file, fileList);
|
2636
|
+
}
|
2637
|
+
var _useFileHandler = use_file_handler(props, {
|
2638
|
+
onRemove: onRemove
|
2639
|
+
}),
|
2640
|
+
fileList = _useFileHandler.fileList,
|
2641
|
+
handlePreprocess = _useFileHandler.handlePreprocess,
|
2642
|
+
handleRemove = _useFileHandler.handleRemove,
|
2643
|
+
handleProgress = _useFileHandler.handleProgress,
|
2644
|
+
handleSuccess = _useFileHandler.handleSuccess,
|
2645
|
+
handleError = _useFileHandler.handleError;
|
2646
|
+
function handleFiles(files) {
|
2647
|
+
if (!files.length) {
|
2648
|
+
return;
|
2649
|
+
}
|
2650
|
+
// limit检查
|
2651
|
+
if (props.limit && fileList.value.length + files.length > props.limit) {
|
2652
|
+
emit('exceed', files, fileList.value);
|
2653
|
+
return;
|
2654
|
+
}
|
2655
|
+
var sendFiles = files;
|
2656
|
+
if (!props.multiple || props.limit === 1) {
|
2657
|
+
sendFiles = files.slice(0, 1);
|
2658
|
+
}
|
2659
|
+
var _iterator = _createForOfIteratorHelper(sendFiles),
|
2660
|
+
_step;
|
2661
|
+
try {
|
2662
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
2663
|
+
var file = _step.value;
|
2664
|
+
var rawFile = file;
|
2665
|
+
var error = handlePreprocess(rawFile);
|
2666
|
+
if (error) {
|
2667
|
+
emit('error', rawFile, fileList.value, error);
|
2668
|
+
return;
|
2669
|
+
}
|
2670
|
+
if (props.autoUpload) {
|
2671
|
+
upload(rawFile, sendFiles);
|
2672
|
+
}
|
2673
|
+
}
|
2674
|
+
} catch (err) {
|
2675
|
+
_iterator.e(err);
|
2676
|
+
} finally {
|
2677
|
+
_iterator.f();
|
2678
|
+
}
|
2679
|
+
}
|
2680
|
+
function handleRetry(file) {
|
2681
|
+
send(file.raw);
|
2682
|
+
}
|
2683
|
+
function upload(_x, _x2) {
|
2684
|
+
return _upload.apply(this, arguments);
|
2685
|
+
}
|
2686
|
+
function _upload() {
|
2687
|
+
_upload = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(file, sendFiles) {
|
2688
|
+
var beforeResult, _props$beforeUpload;
|
2689
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
2690
|
+
while (1) switch (_context.prev = _context.next) {
|
2691
|
+
case 0:
|
2692
|
+
if (props.beforeUpload) {
|
2693
|
+
_context.next = 2;
|
2694
|
+
break;
|
2695
|
+
}
|
2696
|
+
return _context.abrupt("return", send(file, sendFiles));
|
2697
|
+
case 2:
|
2698
|
+
_context.prev = 2;
|
2699
|
+
_context.next = 5;
|
2700
|
+
return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file);
|
2701
|
+
case 5:
|
2702
|
+
beforeResult = _context.sent;
|
2703
|
+
_context.next = 11;
|
2704
|
+
break;
|
2705
|
+
case 8:
|
2706
|
+
_context.prev = 8;
|
2707
|
+
_context.t0 = _context["catch"](2);
|
2708
|
+
beforeResult = false;
|
2709
|
+
case 11:
|
2710
|
+
if (!(beforeResult === false)) {
|
2711
|
+
_context.next = 14;
|
2712
|
+
break;
|
2713
|
+
}
|
2714
|
+
handleRemove(file);
|
2715
|
+
return _context.abrupt("return");
|
2716
|
+
case 14:
|
2717
|
+
send(file, sendFiles);
|
2718
|
+
case 15:
|
2719
|
+
case "end":
|
2720
|
+
return _context.stop();
|
2721
|
+
}
|
2722
|
+
}, _callee, null, [[2, 8]]);
|
2723
|
+
}));
|
2724
|
+
return _upload.apply(this, arguments);
|
2725
|
+
}
|
2726
|
+
function send(file, sendFiles) {
|
2727
|
+
var headers = props.headers,
|
2728
|
+
header = props.header,
|
2729
|
+
data = props.data,
|
2730
|
+
formDataAttributes = props.formDataAttributes,
|
2731
|
+
method = props.method,
|
2732
|
+
withCredentials = props.withCredentials,
|
2733
|
+
filename = props.name,
|
2734
|
+
url = props.url,
|
2735
|
+
sliceUrl = props.sliceUrl,
|
2736
|
+
mergeUrl = props.mergeUrl,
|
2737
|
+
chunkSize = props.chunkSize,
|
2738
|
+
customRequest = props.customRequest;
|
2739
|
+
var uid = file.uid;
|
2740
|
+
var options = {
|
2741
|
+
headers: headers,
|
2742
|
+
header: header,
|
2743
|
+
withCredentials: withCredentials,
|
2744
|
+
file: file,
|
2745
|
+
data: data,
|
2746
|
+
formDataAttributes: formDataAttributes,
|
2747
|
+
method: method,
|
2748
|
+
filename: filename,
|
2749
|
+
action: url,
|
2750
|
+
sliceUrl: sliceUrl,
|
2751
|
+
mergeUrl: mergeUrl,
|
2752
|
+
chunkSize: chunkSize,
|
2753
|
+
onProgress: function onProgress(event) {
|
2754
|
+
handleProgress(event, file);
|
2755
|
+
emit('progress', event, file, fileList.value);
|
2756
|
+
},
|
2757
|
+
onSuccess: function onSuccess(res) {
|
2758
|
+
var _props$handleResCode;
|
2759
|
+
var result = res;
|
2760
|
+
if (props !== null && props !== void 0 && (_props$handleResCode = props.handleResCode) !== null && _props$handleResCode !== void 0 && _props$handleResCode.call(props, result)) {
|
2761
|
+
handleSuccess(res, file);
|
2762
|
+
emit('success', res, file, fileList.value);
|
2763
|
+
} else {
|
2764
|
+
var err = new Error((result === null || result === void 0 ? void 0 : result.message) || 'unknow error');
|
2765
|
+
handleError(err, file, res);
|
2766
|
+
emit('error', file, fileList.value, err);
|
2767
|
+
}
|
2768
|
+
delete requests.value[uid];
|
2769
|
+
},
|
2770
|
+
onError: function onError(err) {
|
2771
|
+
handleError(err, file);
|
2772
|
+
emit('error', file, fileList.value, err);
|
2773
|
+
delete requests.value[uid];
|
2774
|
+
},
|
2775
|
+
onComplete: function onComplete() {
|
2776
|
+
if (sendFiles && sendFiles.indexOf(file) === sendFiles.length - 1) {
|
2777
|
+
emit('done', fileList.value);
|
2778
|
+
}
|
2779
|
+
}
|
2780
|
+
};
|
2781
|
+
var uploadFn = props.sliceUpload ? ajaxSliceUpload : ajaxUpload;
|
2782
|
+
if (customRequest) {
|
2783
|
+
uploadFn = customRequest;
|
2784
|
+
}
|
2785
|
+
var request = uploadFn(options);
|
2786
|
+
requests.value[uid] = request;
|
2787
|
+
if (request instanceof Promise) {
|
2788
|
+
request.then(options.onSuccess, options.onError);
|
2789
|
+
}
|
2790
|
+
}
|
2791
|
+
function abort(file) {
|
2792
|
+
var reqs = requests.value;
|
2793
|
+
if (file) {
|
2794
|
+
reqs = _defineProperty({}, file.uid, requests.value[file.uid]);
|
2795
|
+
}
|
2796
|
+
Object.keys(reqs).forEach(function (uid) {
|
2797
|
+
if (reqs[uid] instanceof XMLHttpRequest) {
|
2798
|
+
var xhr = reqs[uid];
|
2799
|
+
xhr === null || xhr === void 0 ? void 0 : xhr.abort();
|
2800
|
+
}
|
2801
|
+
delete requests.value[uid];
|
2802
|
+
});
|
2803
|
+
}
|
2804
|
+
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
2805
|
+
fileList.value.forEach(function (_ref2) {
|
2806
|
+
var url = _ref2.url;
|
2807
|
+
if (url !== null && url !== void 0 && url.startsWith('blob:')) URL.revokeObjectURL(url);
|
2808
|
+
});
|
2809
|
+
});
|
2810
|
+
expose({
|
2811
|
+
handleRemove: handleRemove,
|
2812
|
+
handleRetry: handleRetry
|
2813
|
+
});
|
2814
|
+
return function () {
|
2815
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
2816
|
+
"class": classNames.value
|
2817
|
+
}, [!isPhotowall.value && (0,external_vue_namespaceObject.createVNode)(upload_trigger, (0,external_vue_namespaceObject.mergeProps)(triggerProps.value, {
|
2818
|
+
"onChange": handleFiles
|
2819
|
+
}), slots), slots.tip ? slots.tip() : props.tip && (0,external_vue_namespaceObject.createVNode)("div", {
|
2820
|
+
"class": "".concat(CLASS_PREFIX, "__tip")
|
2821
|
+
}, [props.tip]), (0,external_vue_namespaceObject.createVNode)(upload_list, {
|
2822
|
+
"files": fileList.value,
|
2823
|
+
"theme": props.theme,
|
2824
|
+
"disabled": props.disabled,
|
2825
|
+
"multiple": props.multiple,
|
2826
|
+
"onRemove": handleRemove,
|
2827
|
+
"onRetry": handleRetry
|
2828
|
+
}, {
|
2829
|
+
innerTrigger: function innerTrigger(file) {
|
2830
|
+
return isPhotowall.value && (0,external_vue_namespaceObject.createVNode)(upload_trigger, (0,external_vue_namespaceObject.mergeProps)(triggerProps.value, {
|
2831
|
+
"file": file,
|
2832
|
+
"onChange": handleFiles,
|
2833
|
+
"onRemove": handleRemove
|
2834
|
+
}), slots);
|
2835
|
+
},
|
2836
|
+
file: slots.file
|
2837
|
+
})]);
|
2838
|
+
};
|
2839
|
+
}
|
2840
|
+
}));
|
2841
|
+
;// CONCATENATED MODULE: ../../packages/upload/src/index.ts
|
2842
|
+
/*
|
2843
|
+
* Tencent is pleased to support the open source community by making
|
2844
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
2845
|
+
*
|
2846
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
2847
|
+
*
|
2848
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
2849
|
+
*
|
2850
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
2851
|
+
*
|
2852
|
+
* ---------------------------------------------------
|
2853
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
2854
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
2855
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
2856
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2857
|
+
*
|
2858
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
2859
|
+
* the Software.
|
2860
|
+
*
|
2861
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
2862
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2863
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
2864
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2865
|
+
* IN THE SOFTWARE.
|
2866
|
+
*/
|
2867
|
+
|
2868
|
+
|
2869
|
+
var Upload = (0,external_shared_namespaceObject.withInstall)(upload);
|
2870
|
+
/* harmony default export */ const src = (Upload);
|
2871
|
+
})();
|
2872
|
+
|
2873
|
+
var __webpack_exports__default = __webpack_exports__.Z;
|
2874
|
+
export { __webpack_exports__default as default };
|